PDA

View Full Version : error when uploading from another website


txbritt
01-19-2009, 11:05 PM
Warning: tempnam() [function.tempnam]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/leetnet:/usr/lib/php:/usr/local/lib/php:/tmp) in [path]/includes/class_upload.php on line 275


{
// ... in normal mode
$this->upload['location'] = $this->registry->userinfo['permissions']['adminpermissions'] & $this->registry->bf_ugp_adminpermissions['cancontrolpanel'] ? tempnam(ini_get('upload_tmp_dir'), 'vbupload') : @tempnam(ini_get('upload_tmp_dir'), 'vbupload');
}


what can I do to stop this error?

glennybee
01-19-2009, 11:19 PM
You have open_basedir restrictions on your server. To get uploads to work you need to create a 'tmp' subdirectory under your /home/leetnet/ directory and chmod it to 777. Then in the Admin CP set "Upload In Safe Mode?" to 'Yes' and point the "Safe Mode Temp Directory" to that directory. If you placed the tmp directory in the right place, the path to the Safe Mode Temp Directory will be:

/home/leetnet/tmp

Or get your host to disable open_basedir restrictions.

txbritt
01-20-2009, 05:07 PM
thank you so much! I had the .tmp but I had not done the chmod but once I did it worked!