VyReN Posted February 14, 2014 Posted February 14, 2014 Fresh install, OSC 2.3.3.4, PHP 5.4.24, Apache, catalog seems to be working correctly, any attempt to visit admin page results in an infinite redirect loop to the login page, executed by line 159 of /admin/includes/application_top.php. Fixes found via Google are not the issue. No .htaccess issues, nothing else standing out to me. Any ideas/suggestions welcome! /admin/includes/configure.php: define('HTTP_SERVER', 'http://dev.internal'); define('HTTP_CATALOG_SERVER', 'http://dev.internal'); define('HTTPS_CATALOG_SERVER', 'http://dev.internal'); define('ENABLE_SSL_CATALOG', 'false'); define('DIR_FS_DOCUMENT_ROOT', '/var/www/vhosts/dev.internal/httpdocs/'); define('DIR_WS_ADMIN', '/admin/'); define('DIR_FS_ADMIN', '/var/www/vhosts/dev.internal/httpdocs/admin/'); define('DIR_WS_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/'); define('DIR_FS_CATALOG', '/var/www/vhosts/dev.internal/httpdocs/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); *removed DB info* define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); define('CFG_TIME_ZONE', 'America/Chicago');
VyReN Posted February 14, 2014 Author Posted February 14, 2014 It appears to be a sessions issue. I cannot add anything to the cart. PHP sessions ARE working on this server, but shouldn't matter since the config file is set to put sessions in the database. So, the question is: Why is a fresh install of OSC not storing session data in the database? Cookies are being created in the browser, both admin and public sides....
VyReN Posted February 15, 2014 Author Posted February 15, 2014 Disregard. Server issue with PHP 5.4 and suhosin.
MrPhil Posted February 18, 2014 Posted February 18, 2014 In case someone ends up here in the future, with the same problem, can you explain or elaborate on the problem and the fix? That would be helpful for others.
Xavier_SG Posted March 8, 2014 Posted March 8, 2014 I had the same problem with my osC 2.2 version when my ISP upgraded to php5.4. This comes from the $HTTP_SERVER_VARS (GET, POST, etc..) not being supported in PHP 5.4. (was still supported in php5.3 with the register_long_arrays set to on). I found a very simple way to make the updates (instead of changing every file) by using this: http://www.stevekamerman.com/2007/01/oscommerce-doesnt-work-on-php5-seriously/ After implementing it (10mn work), my site was back up and running. Please note that if you are upgrading from a much older version of php, the register_globals does not work any longer either and you will need to apply the corresponding patch http://addons.oscommerce.com/info/2097 (mine was already applied), as well as the replacement of Ereg_ functions by Preg_ which was already deprecated in php5.3
MrPhil Posted March 10, 2014 Posted March 10, 2014 Was that an add-on using $HTTP_*_VARS? osC does indeed still use those arrays, but it has a compatibility layer to create those arrays from $_* if PHP doesn't provide it. If some add-on is bypassing the compatibility layer, thus requiring that PHP provide $HTTP_*_VARS, that would be a problem. osC 2.3.3.4 certainly has the compatibility layer and doesn't use register global variables.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.