|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
error on image upload..worked locally now doesnt on web
Hi,
I have got the script to add an image to my DB from the article on this website... it worked fine on my local webserver on my PC... but when i uploaded it to the web, I get this error message: --------------------------------------------- Warning: open_basedir restriction in effect. File is in wrong directory in /usr/local/psa/home/vhosts/thebluenowhere.co.uk/httpdocs/demo/grabfile.php on line 25 Warning: fopen("/tmp/phpULCtWQ","r") - Operation not permitted in /usr/local/psa/home/vhosts/thebluenowhere.co.uk/httpdocs/demo/grabfile.php on line 25 Warning: Supplied argument is not a valid File-Handle resource in /usr/local/psa/home/vhosts/thebluenowhere.co.uk/httpdocs/demo/grabfile.php on line 26 ------------------------------------------------ Anyone got any ideas? Thanks, |
|
#2
|
|||
|
|||
|
Permissions?
If it worked locally, but doesn't work on the remote server, then I'm guessing that it has to do with permissions. To upload a file to a directory, you must CHMOD 777 that directory. Try that and see if that works.
|
|
#3
|
|||
|
|||
|
Hey,
Seems like your host has disabled file uploading. You don't have access to the temporary directory where the files are uploaded to. You will need to email them and ask them if you can have upload file privleges for your PHP scripts. |
|
#4
|
|||
|
|||
|
cheers for this...
CTretina - I did try changing the DIR CHMOD to 777 but still it didnt work. mytch - Do you know if there is a way to specify which directory the images are placed in? I would like it to be placed in (for example) www.mydomain.com/image if possible... Thanks guys! |
|
#5
|
|||
|
|||
|
Hi again..
I have run phpinfo() on the server and got back this info on upload: Base_dir: /usr/local/psa/home/vhosts/thebluenowhere.co.uk/httpdocs Value: "no value" upload_tmp_dir: /tmp file_uploads: 1 From that I can assume that file uploads are allowed but the error suggests that there is something wrong with the base_dir. I have tried creating a /tmp directory unde httpdocs but that didnt work.... I have emailed the host, so we'll see soon! Any ideas what might be up though?! ![]() |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > error on image upload..worked locally now doesnt on web |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|