t8mas062184 Posted September 16, 2011 Share Posted September 16, 2011 I am having problem with /tmp directory and i don't want it to be used as a default temp directory. We have a dedicated temp directory location and I wan to use it. I am getting the following error below: SYSTEM WARNING: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/tmp/Juf3OS) is not within the allowed path(s): (/data/somelocation/) SYSTEM WARNING: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/tmp/tmpdpWiXN) is not within the allowed path(s): (/data/somelocation/) My question is, how to override the default temp directory? Let's say i want to just declare /data/somelocation as my default temp directory. Quote Link to comment Share on other sites More sharing options...
WebStyles Posted September 16, 2011 Share Posted September 16, 2011 I'm guessing it's for file uploads? you can configure the tmp directory in php.ini Quote Link to comment Share on other sites More sharing options...
t8mas062184 Posted September 17, 2011 Author Share Posted September 17, 2011 basically a certain plugin is using the default temp location and i do not have permission to change the php.ini file. i think it uses the sys_get_temp_dir but since no value for the TMP, TEMP and TMPDIR, the default /tmp was used. at least can i override these values so that i can assign a temp directory of my own, say /data/otherlocation? Quote Link to comment Share on other sites More sharing options...
Doug G Posted September 17, 2011 Share Posted September 17, 2011 You probably need to add the path to your temp directory to your openbasedir list of allowed paths. Quote Link to comment Share on other sites More sharing options...
t8mas062184 Posted September 18, 2011 Author Share Posted September 18, 2011 You probably need to add the path to your temp directory to your openbasedir list of allowed paths. Sorry Doug, I'm a bit new with php, would you please let me know how can i do that? take note that i prefer to work on it on the code not on the server-side. but server admin let us allow to use /data/otherlocation as temp location. Quote Link to comment Share on other sites More sharing options...
Doug G Posted September 18, 2011 Share Posted September 18, 2011 look for the setting in this documentation page (in the uploads section) http://php.net/manual/en/ini.core.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.