I have a page which allows users to upload photos - fairly standard php I think.
This works on the live server I've been using to date but I've recently set up php on my Mac and now the uploads have stopped working.
I'm guessing this is because the the upload_tmp_dir is not set properly in the php.ini file.
Does anyone know what I need to do?
EDIT:
Here's the error message that's output...
Warning: imagejpeg(): Unable to open 'upload/thumbs/AL.jpg' for writing: Permission denied in /Users/tom/Sites/tombrennand/add.php on line 128 Warning: imagejpeg(): Unable to open 'upload/images/AL.jpg' for writing: Permission denied in /Users/me/Sites/mysite/add.php on line 135 Notice: Undefined variable: con in /Users/me/Sites/mysite/add.php on line 172 Warning: mysql_close() expects parameter 1 to be resource, null given in /Users/me/Sites/mysite/add.php on line 172
So from that I think I need to set permissions on that folder. Any ideas?
Change the
upload_tmp_dir = /tmp/whatever
entry in your php.ini
file. Ensure that this location is writable by the appropriate user/group.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With