[SOLVED] PHP 4 Image Uploads
Posted: Fri Mar 02, 2007 3:27 am
Yo guys, having a bit of a nightmare.
One of my client's hosting companies I've just found to be running PHP 4 instead of 5 (which I've built the whole website in). I've managed to sort out the mail function, but the image upload is still failing.
I'm getting a Permissions issue error message, but I've changed all the permissions on the folder and the script itself to 0777.
Here's the code I'm using at the momemnt:
If anyone could help, it would be much appreciated.
Thanks in advance
One of my client's hosting companies I've just found to be running PHP 4 instead of 5 (which I've built the whole website in). I've managed to sort out the mail function, but the image upload is still failing.
I'm getting a Permissions issue error message, but I've changed all the permissions on the folder and the script itself to 0777.
Code: Select all
Warning: move_uploaded_file(images/news/HIPs.jpg): failed to open stream: Permission denied in /vhost/vhost5/c/o/n/converge-it.net/www/newsEdit.php on line 92
Warning: move_uploaded_file(): Unable to move '/tmp/phpf4LzU1' to 'images/news/HIPs.jpg' in /vhost/vhost5/c/o/n/converge-it.net/www/newsEdit.php on line 92
Could not copy HIPs.jpgHere's the code I'm using at the momemnt:
Code: Select all
if ($image != NULL){
move_uploaded_file($_FILES['image']['tmp_name'], "images/news/" . $image)
or die("Could not copy " . $image . "<br/>");
}Thanks in advance