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?
You need to set the write permission on folder
upload/thumbsSince this is your personal computer, you can just
cdinto folderuploadand thenchmod 777 thumbsin Terminal.