Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changed servers now I get warnings and can't access admin


jcannaveno

Recommended Posts

Posted

Hello,

I recently upgraded to an SSD server with my host provider DotEasy.com.  I now get these three errors across the top of my website:

 

Warning: session_save_path(): open_basedir restriction in effect. File(/var/www/html/testsite/includes/work/) is not within the allowed path(s): (/home/:/usr/lib/php:/usr/local/lib/php:/tmp:/usr/local/apache/htdocs) in /home/nemco10051/public_html/includes/functions/sessions.php on line 169

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/nemco10051/public_html/includes/functions/sessions.php:169) in /home/nemco10051/public_html/includes/functions/sessions.php on line 102

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/nemco10051/public_html/includes/functions/sessions.php:169) in /home/nemco10051/public_html/includes/functions/sessions.php on line 102

 

also most of the links I have in banners are now broken. When i try to access my admin panel I get these errors on a white screen:

 

Warning: session_save_path(): open_basedir restriction in effect. File(/var/www/html/testsite/includes/work/) is not within the allowed path(s): (/home/:/usr/lib/php:/usr/local/lib/php:/tmp:/usr/local/apache/htdocs) in /home/nemco10051/public_html/admin/includes/functions/sessions.php on line 165

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/nemco10051/public_html/admin/includes/functions/sessions.php:165) in /home/nemco10051/public_html/admin/includes/functions/sessions.php on line 102

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/nemco10051/public_html/admin/includes/functions/sessions.php:165) in /home/nemco10051/public_html/admin/includes/functions/sessions.php on line 102

Warning: Cannot modify header information - headers already sent by (output started at /home/nemco10051/public_html/admin/includes/functions/sessions.php:165) in /home/nemco10051/public_html/admin/includes/functions/general.php on line 38

 

I have no idea what the problem is nor where to look to resolve it.  I have seen similar topics posted but none of those seemed to help me. And tech support at DotEasy told me it's an OsCommerce issue. The database seems to be linked properly. Please help. My site is https://www.newarkmusical.com and is an OsCommerce 2.3 build.

Posted

Of all those messages, only the "open basedir" ones need to be fixed. The others will go away when you do that.

 

The error message seems to be saying that you're not allowed to write to /var/www/html/testsite/ on your new system (but could on your old). Check with your host whether that path setting in osC needs to be modified, and if so, where they would suggest placing session data. Did you upgrade PHP at the same time? There have been a number of changes to osC with regards to session handling (related to PHP changes) over the course of 2.3.x, and you may need to do some osC upgrading to gain compatibility with your new PHP level.

Posted

I didn't upgrade PHP. My hosting site has done very little to help me saying that I needed to Google search the warnings to find a solution. I was told before i switched servers that all I had to do was backup my site and re upload it after they moved the domain to the new ssd server.

Posted

Could the PHP was upgraded on the server and they didn't tell me?  I really am at a loss here.  I had a beautifully functioning website before I made the server switch.

Posted

The problem is that the server isn't recognizing a path as valid. It could be something simple like you have the cache option enabled and the cache path is not valid on the new server. It could also be that you have a php.ini file in the root that is causing it. If you have one, try removing it to see if it helps. It could also be caused by an entry in the ,htaccess file so you may want to remove that for a quick test too.

 

Problems like this really should be handled by the host, in my opinion, though it may be you don't have such support in your plan. If you do, I would complain to them about it.

 

If they won't (can't) help and the above changes don't help, try installing a new shop. If the new shop doesn't have the problem you can use it to compare to yours to find the problem.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Posted

From PHP 5.1 to 5.5 is quite a jump. I think you're going to have to upgrade osC to 2.3.4 (the current latest version), which I think is 5.5-compatible. If you're currently at 2.3 (2.3.0), it's quite a few steps to upgrade level-by-level to 2.3.4. Or, if you have a stock system with no modifications or add-ons, you could just try installing 2.3.4 and migrating your data files and (step by step) database.

 

Either way, getting to the latest osC version will ensure that you are PHP 5.5 ready. You might be able to use a lower level of osC than 2.3.4, (that won't give errors) but as long as you're going through the effort, you might as well get to the latest. Some people will try to patch their existing store's code just to fix the errors, but I recommend against that, as it leaves you in a not-quite-here, not-quite-there state.

Posted

I'm at 2.3.3 now.  Forgot to put that in my original post.  I changed /var/www/html to the correct path /public_html in both configure.php files.  I'm still getting the warnings and still can't access my admin. Will updating the PHP or Upgrading to 2.3.4 really fix this issue.  And if it is a cached option where would I go to fix that?

Posted

It's pretty obvious from the error message:

 

 

 

Warning: session_save_path(): open_basedir restriction in effect. File(/var/www/html/testsite/includes/work/) is not within the allowed path(s): (/home/:/usr/lib/php:/usr/local/lib/php:/tmp:/usr/local/apache/htdocs) in /home/nemco10051/public_html/includes/functions/sessions.php on line 169

 

Somewhere you have this:

/var/www/html/testsite/includes/work/

 

Which is not correct in the new server.  It should be:

/home/nemco10051/public_html/includes/work/

 

So far as I recall, this is a config setting in shop admin.  As you presumably cannot get into the admin, you'll need to change it via phpmyadmin to hit the database directly.  In phpmyadmin search for SESSION_WRITE_DIRECTORY and see what it contains.

Posted

Ok If found the old file path on phpmyadmin in SESSION_WRITE_DIRECTORY and changed it.  Errors on the main site went away but now I get these errors when trying to access the admin panel:

 

 

Warning: require(/public_html/includes/classes/action_recorder.php): failed to open stream: No such file or directory in /home/nemco10051/public_html/admin/includes/classes/action_recorder.php on line 13

Fatal error: require(): Failed opening required '/public_html/includes/classes/action_recorder.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/nemco10051/public_html/admin/includes/classes/action_recorder.php on line 13

Posted

Fixed all of my issues and site is working again.  Gonna finish the upgrade to 2.3.4 but I'm at 2.3.3.2 for now.  Thank you everyone for the help!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...