Jump to content
dianepep

Product Reviews Not Showing

Recommended Posts

17 hours ago, bsmither said:

PHP is fairly reliable about getting its errors logged. There are two instances where I can guess why a log file is not getting created:

1. The hosting provider has somehow managed to really lock down the INI setting for where to log errors.
2. The SMARTY template rendering engine also gets tied into PHP's error reporting sub-system. If there were an issue with rendering a template, that has been known to cause a blank screen with absolutely no errors getting reported. That's not so much an issue anymore with the latest versions of CubeCart.

(I saw your reply in the "How to..." conversation.)

Update on my reviews table: I was able to successfully copy over all reviews. I guess I just messed up something the first time. I am new to phpmyadmin and sql so I researched a bit and gave myself a quick lesson in both.

I am now getting an error when I try to do anything in Admin Panel. The error says: 

This page isn’t working

ilovemybigbooty.com is currently unable to handle this request.

HTTP ERROR 500
 
I read another post from someone getting this error and you advised them to check Php Info for mbstring Multibyte support and mine says Enabled. I also have a message there is an update to Paypal Commerce so I attempted to update that in case that was causing the issue but I got the http error 500 trying to update that also. Could this be an issue with my hosting provider?

Share this post


Link to post
Share on other sites

If the web server is now sending back this "response code", either PHP is still crashing (and is now able to tell the web server something went wrong, and might even have logged what went wrong in error_log), or the web server itself is disagreeing with something that is coming in (the POST payload).

Your hosting account control panel should have a place to view web server's error log.

Share this post


Link to post
Share on other sites
4 hours ago, bsmither said:

If the web server is now sending back this "response code", either PHP is still crashing (and is now able to tell the web server something went wrong, and might even have logged what went wrong in error_log), or the web server itself is disagreeing with something that is coming in (the POST payload).

Your hosting account control panel should have a place to view web server's error log.

Thanks again. I followed the steps to create an error log but no log is showing so I've contacted my hosting provider and they are looking into it. I cannot even get the Admin Panel to appear now. it gives the 500 error as soon as I login.

Edited by dianepep

Share this post


Link to post
Share on other sites

The error-log just showed up and is showing errors in my database.class.php file on line 1009 which is this line:         $trace = debug_backtrace();   under Log Sql Errors Section.

The error states: PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 64 bytes) in /homepages/1/d236694210/htdocs/clickandbuilds/cubecart/Ilovemybigbootyshop/classes/db/database.class.php on line 1009

Share this post


Link to post
Share on other sites

Ok, so we now know that the environment given to you for your site to run in has a memory limit of 256MB. This is not unreasonable.

On the other hand, there is something about what CubeCart is doing with your data (or images) that is gobbling up all of that 256MB. It's not likely to be textual data, probably you have images that exceed recommended size: 600x600 pixels at less than 350KB filesize.

(Too large of images is the only thing that has crossed my path that exhausts memory.)

The error in the error_log may be related to certain admin pages -- but no images are in play when simply trying to get to the admin dashboard.

In the ini-custom.inc.php file, change the memory_limit value to '512M' and see what that gets you.

If you have CubeCart's debug mode enabled, at the bottom of each page, there is a report of the Memory Peak Usage.

Share this post


Link to post
Share on other sites
15 hours ago, bsmither said:

Ok, so we now know that the environment given to you for your site to run in has a memory limit of 256MB. This is not unreasonable.

On the other hand, there is something about what CubeCart is doing with your data (or images) that is gobbling up all of that 256MB. It's not likely to be textual data, probably you have images that exceed recommended size: 600x600 pixels at less than 350KB filesize.

(Too large of images is the only thing that has crossed my path that exhausts memory.)

The error in the error_log may be related to certain admin pages -- but no images are in play when simply trying to get to the admin dashboard.

In the ini-custom.inc.php file, change the memory_limit value to '512M' and see what that gets you.

If you have CubeCart's debug mode enabled, at the bottom of each page, there is a report of the Memory Peak Usage.

I thought I made all images according to the recommendations but I will double check when I can get back into the Admin Panel. Everything should be exactly the same as my other store under Aprils-choice, even the same images and product. 

I modified the ini-custom.inc.php file from 256m to 512m but still am unable to log into the Admin Panel and still receiving the http 500 error. 

Share this post


Link to post
Share on other sites

Visiting what I guess to be your site web address, I find that every "friendly" link shows me the homepage (for example, your 'privacy policy' link).

This tells me that you have either copied the whole main page's HTML in the "Store Offline" content and your store is offline, or there isn't any URL rewriting happening.

 

Share this post


Link to post
Share on other sites
17 minutes ago, bsmither said:

Visiting what I guess to be your site web address, I find that every "friendly" link shows me the homepage (for example, your 'privacy policy' link).

This tells me that you have either copied the whole main page's HTML in the "Store Offline" content and your store is offline, or there isn't any URL rewriting happening.

 

uh oh. that's not good. I had all those filled in and were working fine. This is a good reminder for me to switch hosting companies sometime soon. The support either has no clue what they are doing or they are rude and unhelpful. I called and they had no idea where to access error logs and said they had to escalate the issue and I will receive an email when the next team have a chance to look at it. That was last night and of course there has been no email yet. I will call them again tonight. The only email I received from them was an email stating they reset my files to two days ago to see if that helps with the issue. I have no idea what files they reset or how much of my work they undid by this. I do not recommend 1 & 1  inois to anyone. 

Share this post


Link to post
Share on other sites

I just noticed in the error log for my latest attempt to access the Admin Panel, it says "Allowed memory size of 268435456 bytes exhausted" so the change I made to ini-custom.inc.php file did not increase the allowed memory. Should I try placing the memory limit in htaccess file instead?

Share this post


Link to post
Share on other sites

Setting the memory limit, if it didn't work in the script, then it won't work in the .htaccess file (if changing it would work there anyway - I don't know). Your hosting provider may have that locked down as well.

 

Share this post


Link to post
Share on other sites
5 minutes ago, bsmither said:

Setting the memory limit, if it didn't work in the script, then it won't work in the .htaccess file (if changing it would work there anyway - I don't know). Your hosting provider may have that locked down as well.

 

I just found a section on my hosting accounts website that says they set differing limits on different accounts and if exceed the limit my site wont work. That may be what is happening. I emailed them asking what the limits are. But even if I need more memory, doesn't that mean I have an issue somewhere that is causing me to need more memory? I am wondering if my paypal extension is causing issues because it removed the < from the php script again and I had to add that back and shortly after is when the http error 500 started happening. If my hosting company says my limit is 256m how do I get into my Admin Panel to try to remove the paypal extension to see if that is causing issues?

Thanks again for your help!

Share this post


Link to post
Share on other sites

If you believe you need to remove a plugin manually, then:

1. In your hosting control panel, use the File Explorer (File Manager?) to view /modules/plugins/ (might be /modules/gateway/ depending on the actual PayPal module)
2. Delete the PayPal folder
3. Using phpMyAdmin, view the CubeCart_modules table. Find and delete the record where 'folder' is "PayPal".
4. View the CubeCart_config table. Find and delete the record where 'name' = "PayPal"

The word "PayPal" is used where the actual module might be named something slightly different.

Factually speaking, if your site uses more memory than what PHP is specified to use, then PHP will crash - and report that memory had been exhausted. This is just a fact of PHP and not because of having tripped a hosting service's 'resource monitor' that will shut down your script (like, for example, hogging access to the database).

Edited by bsmither

Share this post


Link to post
Share on other sites
27 minutes ago, bsmither said:

If you believe you need to remove a plugin manually, then:

1. In your hosting control panel, use the File Explorer (File Manager?) to view /modules/plugins/ (might be /modules/gateway/ depending on the actual PayPal module)
2. Delete the PayPal folder
3. Using phpMyAdmin, view the CubeCart_modules table. Find and delete the record where 'folder' is "PayPal".
4. View the CubeCart_config table. Find and delete the record where 'name' = "PayPal"

The word "PayPal" is used where the actual module might be named something slightly different.

Factually speaking, if your site uses more memory than what PHP is specified to use, then PHP will crash - and report that memory had been exhausted. This is just a fact of PHP and not because of having tripped a hosting service's 'resource monitor' that will shut down your script (like, for example, hogging access to the database).

 I'm wondering why it's using so much memory if my first site that I copied all info from isn't crashing. Both sites are almost identical except my first site has 4 products in it and this new one only has the one product.  I was hoping if I could increase the memory limit then I could get into the Admin Panel and try updating or reinstalling my paypal extension and/or look for other issues because I am assuming increasing the memory is just a bandaid and I still need to find out why it is using so much memory. Maybe I best wait for my hosting company to get back to me after they look into it before I start changing things and confuse them more. lol. It's frustrating waiting for them to get back to me. 

Thanks again. 

Share this post


Link to post
Share on other sites

If you can ever get to an admin page....

When having visited what I guess is your site, I noticed I was getting the cached/squeezed version of your CSS files.

This tells me that you have not been able to switch on debug mode. Is this correct?

If so, visit www.showmyip.com to get your workstation's IP address.

Then, in /includes/global.inc.php, add these lines just before the last line (which is ?>😞😞

$glob['debug'] = 1;
$glob['debug_ip_addresses'] = "AAA.BBB.CCC.DDD"; // YOUR IP ADDRESS

Then, in /classes/debug.class.php, near line 221:

Find:
$this->_sql[$type][] = '<span style="color:#'.$colour.'">'.htmlentities($message.' ['.$tag.']', ENT_COMPAT, 'UTF-8').'</span>';

Change to:
$this->_sql[$type][] = $this->_debugMemoryUsage(true).' <span style="color:#'.$colour.'">'.htmlentities($message.' ['.$tag.']', ENT_COMPAT, 'UTF-8').'</span>';

This will add the peak amount of memory used to each SQL statement in the debug list. From this, we can tell just about where the sudden jump in memory consumption happened.

Share this post


Link to post
Share on other sites
14 hours ago, bsmither said:

If you can ever get to an admin page....

When having visited what I guess is your site, I noticed I was getting the cached/squeezed version of your CSS files.

This tells me that you have not been able to switch on debug mode. Is this correct?

If so, visit www.showmyip.com to get your workstation's IP address.

Then, in /includes/global.inc.php, add these lines just before the last line (which is ?>😞😞

$glob['debug'] = 1;
$glob['debug_ip_addresses'] = "AAA.BBB.CCC.DDD"; // YOUR IP ADDRESS

Then, in /classes/debug.class.php, near line 221:

Find:
$this->_sql[$type][] = '<span style="color:#'.$colour.'">'.htmlentities($message.' ['.$tag.']', ENT_COMPAT, 'UTF-8').'</span>';

Change to:
$this->_sql[$type][] = $this->_debugMemoryUsage(true).' <span style="color:#'.$colour.'">'.htmlentities($message.' ['.$tag.']', ENT_COMPAT, 'UTF-8').'</span>';

This will add the peak amount of memory used to each SQL statement in the debug list. From this, we can tell just about where the sudden jump in memory consumption happened.

no I have not been able to get back into Admin Panel to turn on debug mode. I will turn on debug and add the code you provided as soon as I am able to get back into my Admin Panel. I have asked my hosting company 4 times now how to get access to the system logs or if they can look at them and the agent is just ignoring my requests. They do this when they do not know how to do something I am asking them to do. lol. I will take time to call them a little later today and hopefully get some answers. Thanks again! 

Share this post


Link to post
Share on other sites

The edit to global.inc.php will force debug mode to be enabled, regardless what you do in admin, Store Settings.

Share this post


Link to post
Share on other sites
22 hours ago, bsmither said:

If you can ever get to an admin page....

When having visited what I guess is your site, I noticed I was getting the cached/squeezed version of your CSS files.

This tells me that you have not been able to switch on debug mode. Is this correct?

If so, visit www.showmyip.com to get your workstation's IP address.

Then, in /includes/global.inc.php, add these lines just before the last line (which is ?>😞😞

$glob['debug'] = 1;
$glob['debug_ip_addresses'] = "AAA.BBB.CCC.DDD"; // YOUR IP ADDRESS

Then, in /classes/debug.class.php, near line 221:

Find:
$this->_sql[$type][] = '<span style="color:#'.$colour.'">'.htmlentities($message.' ['.$tag.']', ENT_COMPAT, 'UTF-8').'</span>';

Change to:
$this->_sql[$type][] = $this->_debugMemoryUsage(true).' <span style="color:#'.$colour.'">'.htmlentities($message.' ['.$tag.']', ENT_COMPAT, 'UTF-8').'</span>';

This will add the peak amount of memory used to each SQL statement in the debug list. From this, we can tell just about where the sudden jump in memory consumption happened.

Okay I modified the code as you requested but when I went to my site www.ilovemybigbooty.com it now gives me the http error 500 instead of showing the site and no debug code. I noticed also in the error-log that the error was on the $trace = debug_backtrace(); statement (I should clarify I did have debug enabled but it did not show anything so I disabled it to see if the error would go away and after that I could not access my admin panel again to turn it back on). 

Edited by dianepep
added info

Share this post


Link to post
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.


×
×
  • Create New...