Jump to content

Psytanium

Members
  • Content count

    525
  • Joined

  • Last visited

  • Days Won

    4

Psytanium last won the day on December 21 2018

Psytanium had the most liked content!

2 Followers

About Psytanium

  • Birthday 12/06/1982

Profile Information

  • Real Name
    Psytanium
  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Psytanium

    SMTP Authentication and OSCommerce

    I removed : namespace PHPMailer\PHPMailer; from PHPMailer.php Is that OK to remove it ? Anyway, now I have another error: Fatal error: Class 'SMTP' not found in /home/woodandgasleb/public_html/ext/modules/PHPMailer/PHPMailer.php on line 1939 Any idea ? I appreciate your help. Because apparently all the docs and topics I already found are for older version of PHPMailer.
  2. Psytanium

    SMTP Authentication and OSCommerce

    I downloaded the latest version of PHPMailer, I found 5 files inside it : Exception.php OAuth.php PHPMailer.php POP3.php SMTP.php Uploaded to ext/modules/PHPMailer But in your admin/includes/classes/mail.php filem the first line started with : require_once '../ext/modules/PHPMailer/class.phpmailer.php'; There is no such file (class.phpmailer.php) in PHPMailer folder. If I change the line to require_once '../ext/modules/PHPMailer/PHPMailer.php'; I get an error when I open the backend: Fatal error: Class 'PHPMailer' not found in /home/user/public_html/backend/includes/classes/email.php on line 11
  3. Psytanium

    SMTP Authentication and OSCommerce

    Hi, I don't have catalog/includes/classes.php file in my OSC2.3.4 I have catalog/includes/classes/email.php Is that the same ? I copy paste your code into my catalog/includes/classes/email.php ? I tries this but i get an error it says fatal erro PHPMAILER class not found
  4. Psytanium

    [Development] Products Specifications

    I changed this in includes/functions/general.php function tep_get_all_get_params( $exclude_array = 'allow' ) { global $HTTP_GET_VARS; if ( !is_array( $exclude_array ) )$exclude_array = array(); $get_url = ''; if ( is_array( $HTTP_GET_VARS ) && ( sizeof( $HTTP_GET_VARS ) > 0 ) ) { reset( $HTTP_GET_VARS ); while ( list( $key, $value ) = each( $HTTP_GET_VARS ) ) { if ( is_string( $value ) && ( strlen( $value ) > 0 ) && ( $key != tep_session_name() ) && ( $key != 'error' ) && ( !in_array( $key, $exclude_array ) ) && ( $key != 'x' ) && ( $key != 'y' ) ) { $get_url .= $key . '=' . rawurlencode( stripslashes( $value ) ) . '&'; } } } return $get_url; } To this function tep_get_all_get_params($exclude_array = '') { global $HTTP_GET_VARS; if ($exclude_array == '') $exclude_array = array(); $get_url = ''; reset($HTTP_GET_VARS); while (list($key, $value) = each($HTTP_GET_VARS)) { if (($key != tep_session_name()) && ($key != 'error') && (!in_array($key, $exclude_array))) { if (is_array($value)) { while (list($key2, $value2) = each($value)) { $get_url .= $key . '['.$key2.']=' . rawurlencode(stripslashes($value2)) . '&'; } } else { $get_url .= $key . '=' . $value . '&'; } } } return $get_url; } Now the filter arrays work fine when changing currency. Hopefully I didn't mess with something else.
  5. Psytanium

    [Development] Products Specifications

    Hi, If i choose some multiple selection in the filters, then change the currency, the page load and the selected specifications are unchecked. You have a quick fix for this ? I think the default osc2.3.4 tep_get_all_get_params function can't handle arrays in the url. For example this url https://www.domain.com/products_filter.php?f28[3]=Samsung&f22[1]=Blue&cPath=220_83_97 Become like this after I change currency: https://www.woodandgas.com/products_filter.php?cPath=220_83_97&currency=EUR The filter parameters disappeared.
  6. Psytanium

    Add "Keep me logged in" on login page

    Currently I'm only 1 step away, after I used Demitry addon, I only still have to add to the session file : if $_SESSION["keep_login"] == 1 { do this } else { do that } I'm sure $_SESSION["keep_login"] is stored and equal 1, but don't know why when i use it in a if statement in session.php it's not working.
  7. Psytanium

    Add "Keep me logged in" on login page

    Thank you, will give it a try if what i started led me to a dead end.
  8. Psytanium

    Add "Keep me logged in" on login page

    @Demitry I created this file cron_session.php and its working fine when added to Cronjob, it will delete old sessions records from the database <?php require( 'includes/application_top.php' ); return tep_db_query( "delete from " . TABLE_SESSIONS . " where expiry < '" . ( time() - SESSION_EXPIRATION_CATALOG ) . "'" ); require( DIR_WS_INCLUDES . 'application_bottom.php' ); ?> I added the Keep me signed in checkbox in the login screen, but still didn't manage to make it functional. Probably I should register a session variable in login page : $keep_logged_in = tep_db_prepare_input( $HTTP_POST_VARS[ 'keep_logged_in' ] ); tep_session_register( 'keep_logged_in' ); and then add to sessions.php around your addon code : if ( is_numeric( SESSION_EXPIRATION_CATALOG ) && SESSION_EXPIRATION_CATALOG != 0 && $_SESSION['keep_logged_in'] == 1) { I checked the session value now include [keep_logged_in] => 1 but still didn't get it to work i don't know why
  9. Psytanium

    Add "Keep me logged in" on login page

    Big thanks to you and for Jack too, you offered great support in this forum. and hope the osC4 will looks like the current osc in structure. Probably i will write a simple delete query to remove the sessions older than the time set already in your addon. and put it in cronjob.
  10. Psytanium

    Add "Keep me logged in" on login page

    Just a quick question, trying to clean the expired sessions from the sessions table. Do you think when a session expire, it is automatically deleted ? or we should run a query to delete it ? so i can keep the number of records in this table under control.
  11. Psytanium

    Add "Keep me logged in" on login page

    I switched to define('STORE_SESSIONS', 'MYSQL'); Now your addon works. Thank you for sharing it. Now i have to periodically clean the expired sessions from the Sessions database table. But I think your addon will not work when the session storage is files instead of MySQL. Because it looks on the database table sessions to get the value from there: // BOF: Session Expiration Control v1.0 function _sess_read( $key ) { $value_query = tep_db_query( "select value, expiry from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input( $key ) . "'" ); $value = tep_db_fetch_array( $value_query ); if ( isset( $value[ 'value' ] ) ) { // A session was found if ( is_numeric( SESSION_EXPIRATION_ADMIN ) && SESSION_EXPIRATION_ADMIN > 30 ) { $max_session_length = SESSION_EXPIRATION_ADMIN; // Set how long a session should last in seconds (3600 = 60 min). $current_session_length = time() - $value[ 'expiry' ]; // Calculate how long ago this session was last updated. if ( $current_session_length < $max_session_length ) { // If this session has not expired yet: return $value[ 'value' ]; } } else { // if admin configuration value is blank or 0 then session expiration settings are likely to be from the server side return $value[ 'value' ]; } } return ''; } // EOF: Session Expiration Control v1.0 Maybe this is how osC function by default.
  12. Psytanium

    Add "Keep me logged in" on login page

    Sure no problem, I really appreciate your time.. talk later
  13. Psytanium

    Add "Keep me logged in" on login page

    Actually my sessions are not stored in a sessions database table. I changed this by switching the storage to file, in includes/configure.php I changedg : define('STORE_SESSIONS', 'SQL'); To define('STORE_SESSIONS', ''); Now sessions are stored in public_html/includes/work
  14. Psytanium

    Add "Keep me logged in" on login page

    php_value session.gc_maxlifetime 1440 php_value session.save_path "/var/cpanel/php/sessions/ea-php56" I have full access to my VPS server in case i have to change or retrieve something.
  15. Psytanium

    Add "Keep me logged in" on login page

    @Demitry I think your Addon work ONLY if sessions are stored in SQL database right ? In my website, I switch sessions storage from SQL to files because the database grow to 1 GB in 6 months. Is there a way to automatically delete old sessions from database ? this way I can switch back to SQL
×