Elmo Posted March 23, 2003 Share Posted March 23, 2003 Hi, I went to my admin panel and in the Tools> Cache Control section, I see the error message: Warning: open_basedir restriction in effect. File is in wrong directory in /home/.........<snip>...../admin/cache.php on line 82 Fatal error: Call to a member function on a non-object in /home/.........<snip>...../admin/cache.php on line 83 May I ask how I can solve the problem? I did not place the admin directory under the catalog directory but in the root directory. may I ask if that's why I have this error message? Thanks in advance. Best regards, Elmo Link to comment Share on other sites More sharing options...
toolcrazy Posted March 23, 2003 Share Posted March 23, 2003 It doesn't have or doesn't know where a /tmp dir is. And the open_basedir error message is becuase OSC is trying to write to the severs root /tmp dir and PHP safe mode won't let it. So, in the cache dir listing you need to put a full path to a tmp dir. But, you need to be carful of this. If you do use a tmp in you root dir, be sure to move your sessions to the database for security reasons. Steve ------------------------- Link to comment Share on other sites More sharing options...
Elmo Posted March 23, 2003 Author Share Posted March 23, 2003 Hi Steve, thanks very much for your reply. Sorry I am a newbie and please bear with me. Do you mean that I should create a new directory called "tmp" in the root directory? If so, should I chmod that directory to 777 too? May I ask what do you mean by "in the cache dir listing you need to put a full path to a tmp dir"? When I installed oscommerce in the site, I chose to store sessions as Files instead of in the Database. May I ask how I can change that setting now such that the sessions would be stored in the database instead of as Files? Please help! Many thanks! It doesn't have or doesn't know where a /tmp dir is. And the open_basedir error message is becuase OSC is trying to write to the severs root /tmp dir and PHP safe mode won't let it. So, in the cache dir listing you need to put a full path to a tmp dir. But, you need to be carful of this. If you do use a tmp in you root dir, be sure to move your sessions to the database for security reasons. Best regards, Elmo Link to comment Share on other sites More sharing options...
toolcrazy Posted March 23, 2003 Share Posted March 23, 2003 For the full path for cache, go to Admin->Configuration->Cache and enter you full path to the /tmp file. And yes, create a /tmp/ dir and chmod 777 in your root. example, from my home server, yours will be diffrent: /var/www/html/tmp/ Yours may be: /home/.........<snip>...../tmp/ And to move sessions to mySQL, open both configure.php file and at the bottom find this define. catalog/includes/configure.php admin/includes/configure.php define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql' And change it to: define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' This will take care of your errors. Steve ------------------------- Link to comment Share on other sites More sharing options...
Elmo Posted March 24, 2003 Author Share Posted March 24, 2003 HI Steve, thansk for your help. I followed your instructions and when I go to tools> cache control in the admin panel, it shows these lines and the pth to my tmp folder: Cache Blocks Categories Box File does not exist Manufacturers Box File does not exist Also Purchased Module File does not exist May I ask why it says "File does not exist " for Categories Box, Manufacturers Box and Also Purchased Module? I clicked the "reset buttons" but it still show the same thing, may I ask if it's because I did not turn on cache? (The "use cache" option in the admin panel is the default setting which is set to "false") Best regards, Elmo Link to comment Share on other sites More sharing options...
Elmo Posted March 24, 2003 Author Share Posted March 24, 2003 I just enabled cache in the admin panel but it does not help, it still shows the same thing. :( Best regards, Elmo Link to comment Share on other sites More sharing options...
Elmo Posted March 25, 2003 Author Share Posted March 25, 2003 I just logged in the admin panel again and this time when I went to tools>cache control, the following messages're no longer there: Categories Box File does not exist Manufacturers Box File does not exist Also Purchased Module File does not exist but there's an error message on top fo the page saying: Error: Cache directory is not writeable. May I ask if it's because the /tmp folder is not set to 777 yet? I tried to chmod it to 777 but everytime I check the chmod of that folder, it's back to 644. May I ask if it's because only my web host can chmod that folder in the root? Best regards, Elmo Link to comment Share on other sites More sharing options...
toolcrazy Posted March 25, 2003 Share Posted March 25, 2003 I just logged in the admin panel again and this time when I went to tools>cache control, the following messages're no longer there: Categories Box File does not exist Manufacturers Box File does not exist Also Purchased Module File does not exist but there's an error message on top fo the page saying: Error: Cache directory is not writeable. May I ask if it's because the /tmp folder is not set to 777 yet? I tried to chmod it to 777 but everytime I check the chmod of that folder, it's back to 644. May I ask if it's because only my web host can chmod that folder in the root? The below messages are what you are suppose to get. Categories Box File does not existManufacturers Box File does not exist Also Purchased Module File does not exist It is saying that there is no cache file in the tmp dir. What FTP are you using for your chmod. I found that some programs don't handle that to well. Steve ------------------------- Link to comment Share on other sites More sharing options...
Elmo Posted March 25, 2003 Author Share Posted March 25, 2003 I am using ws_ftp 95 because I use Windows XP so I cannot use the newer version of ws_ftp :cry: Best regards, Elmo Link to comment Share on other sites More sharing options...
Elmo Posted March 25, 2003 Author Share Posted March 25, 2003 hey I just checked the admin panel again and it's now showing these messages again: Categories Box File does not exist Manufacturers Box File does not exist Also Purchased Module File does not exist and the other error message that was on top of the page was gone! This is weird. But I think the problem's been fixed. Thanks so much for your help! Many thanks!! :D Best regards, Elmo Link to comment Share on other sites More sharing options...
toolcrazy Posted March 25, 2003 Share Posted March 25, 2003 I am using ws_ftp 95 because I use Windows XP so I cannot use the newer version of ws_ftp :cry: Then bring up your site. And click dir info. This will tell you what permissions are on the site. you should see. drwxrwxrwx user usergroup ______________ /tmp this is 777 Maybe try to take off execute from the last two this is 766. But all three need read and write permissions. Steve ------------------------- Link to comment Share on other sites More sharing options...
toolcrazy Posted March 25, 2003 Share Posted March 25, 2003 I just checked on my site. The file has to have 777 permissions. If you can't set this, ask your host to do it. You really don't need the cache until your site becomes a very high traffic site. It is just to help with load times. Steve ------------------------- Link to comment Share on other sites More sharing options...
Elmo Posted March 25, 2003 Author Share Posted March 25, 2003 HI Steve! Thanks very much for your help, the problem's been resolved! Many thanks again! :D Best regards, Elmo Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.