Guest Posted January 30, 2004 Share Posted January 30, 2004 I have all of a sudden started getting mysql errors. Which where not present yesterday. It happens when I try to upload images. Warning: move_uploaded_file(): open_basedir restriction in effect. File(/home2/rcrt/public_html/catalog/images/12a.jpg) is not within the allowed path(s): (/home2/rcrt:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/rcrt/public_html/catalog/admin/includes/classes/upload.php on line 94 Does anyone know what this means? I havent changed anything on the actual site. Link to comment Share on other sites More sharing options...
Guest Posted January 30, 2004 Share Posted January 30, 2004 Lee, ?open_basedir? is a security oriented restriction parameter placed in the ?php.ini? file (the master file that tells the php system how to process .php files). This restriction, when used, allows files to be placed on the server only in the directories defined by ?open_basedir? thereby prohibiting php programs from uploading files into non-approved directories. Typically, there are three causes for the problem: 1) It is configured incorrectly 2) ?Safe? mode may be turned on for PHP (shouldn?t directly be influenced with ?open_basedir?, but it will give this type of error) 3) PHP version 4.2.3 is running (check which version of PHP is running, 4.2.3 had a bug that caused this show up even if the open_basedir variable was configured correctly ) If you are using a shared host, you may want to check with your provider to see if they changed anything on their end regarding the above. As it relates to cause #1, your error string doesn?t indicate that it is configured wrong. With the open_basedir directive, when you define it, it allows all subdirectories to be used for uploading files. For example, the error says it can?t write a file to ?/home2/rcrt/public_html/?? however the allowed paths (again according to the error string) include ?/home2/rcrt?. Given this, I would check to see if someone has changed the mode your PHP is running in, or if the version had been changed. -Bill Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.