Muscator Posted June 19, 2020 Share Posted June 19, 2020 Hi, I have just migrated from one host to another - all went fine and all apparently worked, that is until the first customer after the migration tried to order When clciking the payment button he would normally be moved to the gateway choice page - instead of this he gets a server 500 error ALL files have been transferred correct and the database is intact and works just fine Only issue is the payment gateways that does not show up when trying to pay......? Anybody outthere having an idea that can help me? Issue: "index.php?_a=gateway - produces server 500 error" Link to comment Share on other sites More sharing options...
bsmither Posted June 19, 2020 Share Posted June 19, 2020 We would ask that you create the error log (https://forums.cubecart.com/topic/51550-how-to-create-the-error-log/) There may already be a log entry in admin, Error Log, System Error Log tab. Link to comment Share on other sites More sharing options...
Muscator Posted June 19, 2020 Author Share Posted June 19, 2020 I get this output: [19-Jun-2020 19:59:59 UTC] PHP Warning: preg_match() [<a href='http://docs.php.net/manual/en/function.preg-match.php'>function.preg-match.php</a>]: The /e modifier is no longer supported, use preg_replace_callback instead in /usr/www/users/xxxxx/classes/seo.class.php on line 613 Line 613 says: if (preg_match('#^(.*/)?[\w]+.[a-z]+\?_a\=([\w]+)(?:\&(amp;)?([\w\[\]]+)\=([\w\-\_]+)([^"\']*))$#ieS', $path, $match)) { Link to comment Share on other sites More sharing options...
bsmither Posted June 19, 2020 Share Posted June 19, 2020 So, I see that you are using a version of CubeCart several versions old. Running an older CubeCart is not a big deal, unless your new environment is running PHP 7. There may be other warnings and notices. This Warning will not crash PHP (if a crash, the web server will report a 500 error because of it). This SEO function is used by many other routines in CubeCart. It is strange that it only appeared once. Was there anything in admin, Error Log, System Error Log tab? Link to comment Share on other sites More sharing options...
Muscator Posted June 19, 2020 Author Share Posted June 19, 2020 It has several lines that says the same - actually the error log has been running for 2 years, since the original install, with absolutely no problems - it also ran on the old server until 2 days ago with no problems Right now I just tried to go back to PHP 5.6 from the present 7.3, just to see if it had any effect - still same error 500 blank page Hmnn - after going back to PHP5.6 the new following error occurred: [19-Jun-2020 22:45:53 Europe/Copenhagen] PHP Warning: Shipping not setup or allow no shipping not enabled in /usr/www/users/xxxx/classes/cubecart.class.php on line 1675 [19-Jun-2020 22:45:56 Europe/Copenhagen] PHP Warning: Shipping not setup or allow no shipping not enabled in /usr/www/users/xxxx/classes/cubecart.class.php on line 1675 [19-Jun-2020 22:46:36 Europe/Copenhagen] PHP Fatal error: require_once() [<a href='http://docs.php.net/manual/en/function.require.php'>function.require.php</a>]: Failed opening required '/home/testshop/public_html/includes/lib/smarty/plugins/modifier.replace.php' (include_path='.:/usr/local/lib/php/') in /usr/www/users/xxx/cache/skin/013463d28fb18a8fc0c766ac6b3777fc1a45f311_0.string.php on line 18 Hmmn - I can also see that it tries to fetch something from the old host - the part that says /home/testshop... Where do that come from and how can I modify it to show the present path? Link to comment Share on other sites More sharing options...
bsmither Posted June 19, 2020 Share Posted June 19, 2020 In your hosting control panel, there may be a feature where you can look at error logs. We need to find a log that has captured why the server issued a 500 error. It could be caused by PHP crashing, or (happens often enough) if there is a directive in the .htaccess file (in CubeCart's main folder) that the web server cannot parse, or an environmental security rule that triggered a fault. If there are no logs available to you that would explain a .htaccess directive fault, or security rule trigger, you may need to have your hosting provider tech support scan their logs. Link to comment Share on other sites More sharing options...
Muscator Posted June 19, 2020 Author Share Posted June 19, 2020 here´s the .htaccess: ##### START CubeCart .htaccess ##### ### File Security ### <FilesMatch "\.(htaccess)$"> Order Allow,Deny Deny from all </FilesMatch> ### Apache directory listing rules ### DirectoryIndex index.php index.htm index.html IndexIgnore * <ifModule mod_headers.c> Header always append X-Frame-Options SAMEORIGIN </ifModule> ### Rewrite rules for SEO functionality ### <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / ##### START v4 SEO URL BACKWARD COMPATIBILITY ##### RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule cat_([0-9]+)(\.[a-z]{3,4})?(.*)$ index.php?_a=category&cat_id=$1&%1 [NC] RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule prod_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=product&product_id=$1&%1 [NC] RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule info_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=document&doc_id=$1&%1 [NC] RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule tell_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=product&product_id=$1&%1 [NC] RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule _saleItems(\.[a-z]+)?(\?.*)?$ index.php?_a=saleitems&%1 [NC,L] ##### END v4 SEO URL BACKWARD COMPATIBILITY ##### RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)\.html?$ index.php?seo_path=$1 [L,QSA] </IfModule> ### Default store 404 page ### ErrorDocument 404 /index.php ## Override default 404 error document for missing page resources ## <FilesMatch "\.(gif|jpe?g|png|ico|css|js|svg)$"> ErrorDocument 404 "<html></html> </FilesMatch> ##### END CubeCart .htaccess ##### Link to comment Share on other sites More sharing options...
bsmither Posted June 19, 2020 Share Posted June 19, 2020 I just reloaded your prior post with new content added. PHP Fatal error: require_once(): Failed opening required '/home/testshop/public_html/includes/lib/smarty/plugins/modifier.replace.php' in /usr/www/users/xxx/cache/skin/013463d28fb18a8fc0c766ac6b3777fc1a45f311_0.string.php on line 18 This suggests that when the move to a new host was made, all the stuff in the /cache/ folder came along with it. That will probably cause problems. Please have CubeCart clear its internal cache (in admin, top-right corner is a button to do so). Link to comment Share on other sites More sharing options...
Muscator Posted June 19, 2020 Author Share Posted June 19, 2020 bsmither - you are as usual fantastic to spot the problems This did the trick - thanks a lot! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.