Jump to content

Basket page blank


Christopher Short
 Share

Recommended Posts

It's a 500 Internal Server Error (your browser may not be configured to show this message).

 

Please double check the contents of any .htaccess file you have at your main site, plus any .htaccess file you have in the /store/ folder.

 

The web server may not like the request:

GET /store/index.php?_a=basket

although there was no problem with

GET /store/index.php?_a=category&cat_id=127

 

You should also find and look at the PHP error_log.

 

There isn't much else we can suggest.

Link to comment
Share on other sites

These errors are certainly a problem, but I really doubt the this plugin's malformed SQL query would eventually lead to a 500ISE. I am looking for something that the web server (Apache?) does not like.

 

And, what you found is CubeCart's catching and logging of malformed SQL errors. It is very rare for CubeCart to catch an error that causes PHP to crash (blank page), and certainly will not catch anything even before the web server starts PHP to run the CubeCart script.

 

In your hosting control panel (cPanel?), you should be able to find PHP's error_log, as well as any other error log the web server may be using.

 

And we still need to verify nothing weird is in the .htaccess file(s).

Link to comment
Share on other sites

These errors are certainly a problem, but I really doubt the this plugin's malformed SQL query would eventually lead to a 500ISE. I am looking for something that the web server (Apache?) does not like.

 

And, what you found is CubeCart's catching and logging of malformed SQL errors. It is very rare for CubeCart to catch an error that causes PHP to crash (blank page), and certainly will not catch anything even before the web server starts PHP to run the CubeCart script.

 

In your hosting control panel (cPanel?), you should be able to find PHP's error_log, as well as any other error log the web server may be using.

 

And we still need to verify nothing weird is in the .htaccess file(s).

What would weird look like? I'll request the php logs.

Link to comment
Share on other sites

Something weird, for example, would be when PHP is running as a CGI/FastCGI service -- as opposed to an Apache mod_php module -- and you have added a statement in the .htaccess file that attempts to set a PHP configuration setting. In this scenario, the web server will throw an error because one cannot set PHP config values in the .htaccess file when PHP is not "under the direct control" of Apache.

 

But, since this happens with only one (so far discovered) particular page request, the View Basket page, there may something else causing the web server to error.

Link to comment
Share on other sites

Something weird, for example, would be when PHP is running as a CGI/FastCGI service -- as opposed to an Apache mod_php module -- and you have added a statement in the .htaccess file that attempts to set a PHP configuration setting. In this scenario, the web server will throw an error because one cannot set PHP config values in the .htaccess file when PHP is not "under the direct control" of Apache.

 

But, since this happens with only one (so far discovered) particular page request, the View Basket page, there may something else causing the web server to error.

This is the one from the store:

 

## File Security

<FilesMatch ".(htaccess)$">

 Order Allow,Deny

 Deny from all

</FilesMatch>

#### Apache directory listing rules ####

DirectoryIndex index.php index.htm index.html

IndexIgnore *

#### Rewrite rules for SEO functionality ####

<IfModule mod_rewrite.c>

  RewriteEngine On

  ######## 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>

 

Link to comment
Share on other sites

Plenty. It's very much like your car won't start in the morning.

 

It is unfortunate you have to ask for your site's error logs.

 

Maybe we can force the error logging to be saved at your site.

 

Create a file named ini-custom.inc.php. It will be placed in CubeCart's main folder. It's contents are:

<?php
# Custom initialization commands
# Filename: ini-custom.inc.php
# File location: main CubeCart folder

ini_set('memory_limit', '256M'); // Platypus Suhosin limit is 256M
ini_set('max_execution_time', '60');
ini_set('error_log', 'error_log');
ini_set('log_errors', 'on');

?>
Link to comment
Share on other sites

 

Plenty. It's very much like your car won't start in the morning.

 

It is unfortunate you have to ask for your site's error logs.

 

Maybe we can force the error logging to be saved at your site.

 

Create a file named ini-custom.inc.php. It will be placed in CubeCart's main folder. It's contents are:

<?php
# Custom initialization commands
# Filename: ini-custom.inc.php
# File location: main CubeCart folder

ini_set('memory_limit', '256M'); // Platypus Suhosin limit is 256M
ini_set('max_execution_time', '60');
ini_set('error_log', 'error_log');
ini_set('log_errors', 'on');

?>

Done. WHere might this show up?

Link to comment
Share on other sites

[13-Nov-2014 21:01:17 America/New_York] PHP Notice:  Error: Hook 'Featured_Products/hooks/admin.navigation.php' was not found in /home/clarkword/public_html/csrocketry.com/store/classes/hookloader.class.php on line 163
[13-Nov-2014 21:01:25 America/New_York] PHP Notice:  Error: Hook 'Featured_Products/hooks/admin.navigation.php' was not found in /home/clarkword/public_html/csrocketry.com/store/classes/hookloader.class.php on line 163
[13-Nov-2014 21:04:53 America/New_York] PHP Notice:  Error: Hook 'Featured_Products/hooks/admin.navigation.php' was not found in /home/clarkword/public_html/csrocketry.com/store/classes/hookloader.class.php on line 163
[13-Nov-2014 21:09:02 America/New_York] PHP Notice:  Error: Hook 'Featured_Products/hooks/admin.navigation.php' was not found in /home/clarkword/public_html/csrocketry.com/store/classes/hookloader.class.php on line 163
[13-Nov-2014 21:09:10 America/New_York] PHP Warning:  Invalid argument supplied for foreach() in /home/clarkword/public_html/csrocketry.com/store/modules/plugins/GWorks_Featured_Item/hooks/class.gui.display_random_product.php(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code on line 200
[13-Nov-2014 21:09:10 America/New_York] PHP Warning:  implode() [<a href='http://docs.php.net/manual/en/function.implode.php'>function.implode.php</a>]: Invalid arguments passed in /home/clarkword/public_html/csrocketry.com/store/modules/plugins/GWorks_Featured_Item/hooks/class.gui.display_random_product.php(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code on line 203
[13-Nov-2014 21:09:10 America/New_York] PHP Warning:  Invalid argument supplied for foreach() in /home/clarkword/public_html/csrocketry.com/store/modules/plugins/GWorks_Featured_Item/hooks/class.gui.display_random_product.php(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code on line 208
[13-Nov-2014 21:09:10 America/New_York] PHP Warning:  implode() [<a href='http://docs.php.net/manual/en/function.implode.php'>function.implode.php</a>]: Invalid arguments passed in /home/clarkword/public_html/csrocketry.com/store/modules/plugins/GWorks_Featured_Item/hooks/class.gui.display_random_product.php(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code on line 211
[13-Nov-2014 21:09:10 America/New_York] PHP Warning:  array_rand() expects parameter 1 to be array, boolean given in /home/clarkword/public_html/csrocketry.com/store/modules/plugins/GWorks_Featured_Item/hooks/class.gui.display_random_product.php(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code on line 230
[13-Nov-2014 21:09:10 America/New_York] PHP Notice:  Error: Hook 'Featured_Products/hooks/class.gui.display.php' was not found in /home/clarkword/public_html/csrocketry.com/store/classes/hookloader.class.php on line 163
[13-Nov-2014 21:09:14 America/New_York] PHP Notice:  Error: Hook 'Featured_Products/hooks/admin.navigation.php' was not found in /home/clarkword/public_html/csrocketry.com/store/classes/hookloader.class.php on line 163
[13-Nov-2014 21:15:37 America/New_York] PHP Notice:  Error: Hook 'Featured_Products/hooks/admin.navigation.php' was not found in /home/clarkword/public_html/csrocketry.com/store/classes/hookloader.class.php on line 163
 

Link to comment
Share on other sites

I think none of these will cause a blank page when going to View Basket.

 

But It is evident that a plugin, "Featured Products", did not make it into the installation. "GWorks Featured Item" may be there, but some other aspect of CubeCart or the plugin is causing a minor problem.

 

Unfortunately, without the plugin, you cannot disable those hooks. (An oversight.) You will need to either install those plugins, or use phpMyAdmin to disable the appropriate records in the CubeCart_hooks database table.

Link to comment
Share on other sites

I deleted the Log, refreshed the site, clicked basket and pulled this from the new log:

 

 

[13-Nov-2014 21:47:47 America/New_York] PHP Fatal error:  Cannot use object of type stdClass as array in /home/clarkword/public_html/csrocketry.com/store/modules/shipping/FedEx/shipping.class.php on line 185
 

Link to comment
Share on other sites

Please remind us of the exact version of CubeCart you are running. Your sig says 5.2.4.

 

I've compared the module code between CC520 and CC5214. Apart from a few unrelated differences, the functions are the same.

 

So, either FedEx has changed something, or something in the module's control panel is not set right.

Link to comment
Share on other sites

Please remind us of the exact version of CubeCart you are running. Your sig says 5.2.4.

 

I've compared the module code between CC520 and CC5214. Apart from a few unrelated differences, the functions are the same.

 

So, either FedEx has changed something, or something in the module's control panel is not set right.

I have the most recent version

Link to comment
Share on other sites

For the briefest of time, make the following edit, enable the FedEx module, cause FedEx to output a blank screen, disable the module, and reply with the contents of the error file. It should be located in the main CubeCart folder.

 

In the FedEx file shipping.class.php, near line 177:

Find:
$response = $this->_client->getRates($request);
 
On a blank line just after that, add:
error_log(print_r($response)."n", 3, CC_ROOT_DIR.CC_DS.'fedex_error.log');
Link to comment
Share on other sites

 

For the briefest of time, make the following edit, enable the FedEx module, cause FedEx to output a blank screen, disable the module, and reply with the contents of the error file. It should be located in the main CubeCart folder.

 

In the FedEx file shipping.class.php, near line 177:

Find:
$response = $this->_client->getRates($request);
 
On a blank line just after that, add:
error_log(print_r($response)."n", 3, CC_ROOT_DIR.CC_DS.'fedex_error.log');

Did you find anything? I badly need to get the shipping back online.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...