Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

URGENT Help needed : Oscommerce crashes my SQL


jay2k5

Recommended Posts

Every week I get my system going down with an error of :

 

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/site/public_html/site/includes/functions/database.php on line 19
Unable to connect to database server!

 

it take down all the sites on my hosting

 

My hosts say it is due to over flow and could be linked to sessions not being closed properly

 

I'm completely lost and need help :(

 

:'(

 

Thanks in advance

 

I am now getting

 

Warning: session_start() [function.session-start]: open(/tmp/sess_a6edd2faa6225dd4ecf98cdf6c8404cd, O_RDWR) failed: Permission denied (13) in /home/site/public_html/site-co-uk/includes/functions/sessions.php on line 68

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/site/public_html/site-co-uk/includes/functions/sessions.php:68) in /home/site/public_html/site-co-uk/includes/functions/sessions.php on line 68

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/site/public_html/site-co-uk/includes/functions/sessions.php:68) in /home/site/public_html/site-co-uk/includes/functions/sessions.php on line 68

Link to comment
Share on other sites

set your sessions directory to a valid and fully qualified path via your osc admin. And set the sessions to be stored in the mysql dbase in includes\configure.php (catalog & admin files)

Link to comment
Share on other sites

On a shared server you must use database storage for sessions. During the install you must have left the option to file storeage.

 

If you can not get into admin you will have to drop all the tables in your database and run the installer over again and this time choose database storage for sessions. do a back up first and then do a restore.

 

 

 

 

 

 

 

Every week I get my system going down with an error of :

 

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/site/public_html/site/includes/functions/database.php on line 19
 Unable to connect to database server!

 

it take down all the sites on my hosting

 

My hosts say it is due to over flow and could be linked to sessions not being closed properly

 

I'm completely lost and need help :(

 

:'(

 

Thanks in advance

 

I am now getting

 

Warning: session_start() [function.session-start]: open(/tmp/sess_a6edd2faa6225dd4ecf98cdf6c8404cd, O_RDWR) failed: Permission denied (13) in /home/site/public_html/site-co-uk/includes/functions/sessions.php on line 68

 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/site/public_html/site-co-uk/includes/functions/sessions.php:68) in /home/site/public_html/site-co-uk/includes/functions/sessions.php on line 68

 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/site/public_html/site-co-uk/includes/functions/sessions.php:68) in /home/site/public_html/site-co-uk/includes/functions/sessions.php on line 68

Link to comment
Share on other sites

On a shared server you must use database storage for sessions. During the install you must have left the option to file storeage.

no you don't. You can use either files or dbase for sessions in a shared env. All you need to do is specify the fully qualified path outside your domain.

 

If you can not get into admin you will have to drop all the tables in your database and run the installer over again and this time choose database storage for sessions. do a back up first and then do a restore.

why? the error occurs because the code cannot write to the specified path.

Link to comment
Share on other sites

Your right, however it is recomended during install for shared servers that you use database sessions for security reasons and since oscommerce does not include a temp folder for sessions the only choice is to either add the blank temp folder (should be done before install ) or set it at database sessions.

 

The new to oscommerce will not know the the file is missing.

 

 

 

no you don't. You can use either files or dbase for sessions in a shared env. All you need to do is specify the fully qualified path outside your domain.

 

 

why? the error occurs because the code cannot write to the specified path.

Link to comment
Share on other sites

Your right, however it is recomended during install for shared servers that you use database sessions for security reasons and since oscommerce does not include a temp folder for sessions the only choice is to either add the blank temp folder (should be done before install ) or set it at database sessions.

 

The new to oscommerce will not know the the file is missing.

 

Well that's the thing. You cannot use the default "/tmp" on the live server.

 

If say the configuration is like this:

/host_given_root/www_starts_here/osc_catalog_starts_here/

 

then you create a folder called tmp under the host_given_root fodler and then the sessions dir will be:

/host_given_root/tmp

 

And that is outside the www space but inside your given space. And distinct from other accounts in the shared env. It's more work though but in terms of security it's the same. You should never install osc live btw. You should separately ftp files use phpmyadmin to upload the database etc.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...