Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo

Tutorial Upload Issue


Go to End
Reply


3 Posts   1730 Views

Avatar
teejay

Community Member, 63 Posts

21 July 2008 at 5:56pm

Hi,

first wow I am really impressed of Silverstripe *thumbsup*

I have tried the latest version 2.2.2 and the tutorial. Everything works like a charm til the image upload part of the staff section. I get the following error when I want to attach a image. Maybe someone could help me.

Best regards Thomas

Warning: File upload error - unable to create a temporary file in Unknown on line 0


Warning: Cannot modify header information - headers already sent in /Applications/xampp/xamppfiles/htdocs/mySilverstripe/sapphire/main.php on line 49

Notice: Undefined variable: _SESSION in /Applications/xampp/xamppfiles/htdocs/mySilverstripe/sapphire/core/control/Director.php on line 102

FATAL ERROR: Security ID doesn't match, possible CRSF attack.
At line 223 in /Applications/xampp/xamppfiles/htdocs/mySilverstripe/sapphire/core/control/Controller.php

trigger_error(Security ID doesn't match, possible CRSF attack.,256)
line 223 of Controller.php

Controller->run(Array)
line 104 of Director.php

Director::direct(/images/index/StaffPage/13/Photo)
line 158 of main.php

# requestParams =

    * url =

      /mySilverstripe/images/index/StaffPage/13/Photo   // this folder does not exist !!

    * executeForm =

      EditImageForm

    * Class =

      StaffPage

    * ID =

      13

    * Field =

      Photo

    * ImageSource =

      new

    * MAX_FILE_SIZE =

      31457280

    * ExistingFile =

    * SecurityID =

      725979733

    * action_save =

      Attach Image

    * Upload =
          o name =

            me.jpg

          o type =

          o tmp_name =

          o error =

            6

          o size =

            0

# funcName =

save

# paramVal =

Attach Image

# paramName =

action_save

# formController =
# form = 

Avatar
teejay

Community Member, 63 Posts

22 July 2008 at 9:48am

Sorry for posting again. I have tried to chmod 777 the whole silverstripe folder with no success. I have absolutly no idea where i can look to solve the issue :(

Avatar
teejay

Community Member, 63 Posts

22 July 2008 at 10:03am

Solved the problem !

For all people who are using xampp for mac you should add the following to your php.ini

upload_tmp_dir= /your path to a temp dir /

Can be closed