Koozali.org: home of the SME Server

PHP upload_tmp_dir setting

James Redfern

PHP upload_tmp_dir setting
« on: November 05, 2002, 04:44:44 AM »
I had been having a problem installing phpAdsNew on an i-bay and the answer I got from the developer was that my server (5.5) was incorrectly configured.  When I tried to upload the banner files to mySQL, phpAdsNew just barfed and complained "Could not access uploaded file, probably due to safemode or open_basedir restrictions".  The developer said "The problem is most likely caused by the upload_tmp_dir setting. Currently this PHP setting is empty, which causes the following problem. When phpAdsNew tries to read the uploaded file the path is checked to see if it in the open_basedir directory. This isn't the case and PHP lets phpAdsNew know it can't access the file. Now if the upload_tmp_dir is set, PHP would also check if the uploaded file is in the upload dir, if this is the case it would allow phpAdsNew to read the file despite the fact it is not in the open_basedir directory.  And also he said, "This usually happens when safemode or open_basedir restrictions are enabled on your webserver. It isn't a flaw in phpAdsNew, it's just the way your server is configured. If the server doesn't allow the uploaded file to be accessed, what else can we do except displaying an error
message".  

How can I fix this?

JR.

Dan Brown

Re: PHP upload_tmp_dir setting
« Reply #1 on: November 05, 2002, 05:10:57 AM »
You can search here for open_basedir, which is enabled by default.