Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Getting a sessions.php error in admin pages


Guest

Recommended Posts

Hi everyone.

 

The wierd thing is that lately I haven't made any changes to my store.

 

I checked it today and the store front is fine, no errors, but the admin pages have:

 

Warning: session_start(): open(tmp/sess_62b4240124cabc084192624bc3998f06, O_RDWR) failed: No such file or directory (2) in /home/httpd/vhosts/migraineaudio.co.uk/httpdocs/shop/admin/includes/functions/sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/httpd/vhosts/migraineaudio.co.uk/httpdocs/shop/admin/includes/functions/sessions.php:67) in /home/httpd/vhosts/migraineaudio.co.uk/httpdocs/shop/admin/includes/functions/sessions.php on line 67

 

Warning above them.

 

So its obviously to do with sessions. I've removed the instruction (in admin) to use the /tmp sessions directory, and the problem goes away.

 

Can I have a brief explanation of sessions and why I'd want to use them? And any reccomendations?

 

Thanks

Link to comment
Share on other sites

Can I have a brief explanation of sessions and why I'd want to use them? And any reccomendations?

 

osCommerce tracks visitors to your site via a session id - either viewable in your address bar, or, if their computer accepts cookies, wrapped in a cookie and stored on the users computer. If osCommerce can't keep track of someone as they progress through your website then they can't stay logged in and can't buy anything from you (because they'll keep losing their cart contents).

 

Vger

Link to comment
Share on other sites

Many thanks for your help so far everyone.

 

The only thing I've done recently is configured use of SSL and also copied the contents of my httpdocs to my httpsdocs folder, under instruction from my host!

 

I followed the guide here on enabling SSL and I'm confident I didn't do anything wrong!!

Link to comment
Share on other sites

Moving a copy of the contents to the httpsdocs folder is probably what caused the error notice to appear. Two folder systems are a bit of a nightmare to administer - and totally unnecessary. All your hosts had to do was to add a symbolic link from their httpsdocs folder to the httpdocs folder and you wouldn't have had to copy the files over, and wouldn't have to keep them synchronised.

 

Vger

Link to comment
Share on other sites

Moving a copy of the contents to the httpsdocs folder is probably what caused the error notice to appear.  Two folder systems are a bit of a nightmare to administer - and totally unnecessary.  All your hosts had to do was to add a symbolic link from their httpsdocs folder to the httpdocs folder and you wouldn't have had to copy the files over, and wouldn't have to keep them synchronised.

 

Vger

 

Doesnt work if your host is using Plesk (I know i run a Plesk based server), in the case of plesk you need to add a vhost_ssl.conf file to the conf directory of the site and point any reference to httpsdocs to httpdocs

 

e.g.

 

DocumentRoot /home/httpd/vhosts/site.com/httpdocs

<Directory /home/httpd/vhosts/site.com/httpdocs>

<IfModule mod_perl.c>

<Files ~ (\.pl)>

SetHandler perl-script

PerlHandler ModPerl::Registry

Options ExecCGI

allow from all

PerlSendHeader On

</Files>

</IfModule>

<IfModule sapi_apache2.c>

php_admin_flag engine on

php_admin_value open_basedir "/home/httpd/vhosts/site.com/httpdocs:/tmp"

</IfModule>

SSLRequireSSL

Options +includes +ExecCGI

</Directory>

<IfModule sapi_apache2.c>

php_admin_flag engine on

php_admin_value open_basedir "/home/httpd/vhosts/site.com/httpdocs:/tmp"

</IfModule>

Link to comment
Share on other sites

  • 1 month later...

Well I eventually fixed this.. It had me completely stumped and I couldn't see any errors with sessions.php.

 

The answer was that in admin, sessions, the sessions directory was set to "tmp" and not "/tmp".

 

I hope this info is of use to someone! :D

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...