If swisscart®/osCommerce is configured to store sessions in database then `sessions` table have to be purged from time to time. Here is the small script that does it:

<?php 

 include('/[path_to_your]/includes/configure.php');

 $lnk = mysql_connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD);
 mysql_select_db(DB_DATABASE);

 $query = 'DELETE FROM sessions WHERE expiry < "'.time().'"';
 mysql_query($query);

It have to be dropped somewhere on the server and triggered as a cron-job.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.