SilverCart Forum

We moderate this Forum and we're here to help. Have you already run a forum search to check if your problem has already been solved?

You can help us helping you by providing detailed error messages, screenshots and logfile entries.

SebastianRamon

Page: 1
Topic Adding products causing timeout 2612 Views

Adding products causing timeout

10 August 2012 at 12:10am Last edited: 10 August 2012 12:11am

Hi,

Installed Silvercart (1.3) on Mamp running PHP 5.3.6. Can get it all up and running but as I soon as I add any products I get a PHP timeout (30 seconds) fatal error when trying to access the Product page (other pages work fine). This happens whether I populate using the Test data or create a new product from scratch. Have tried several reinstalls but always get stuck at this point:

[09-Aug-2012 04:17:56] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /Applications/MAMP/htdocs/silvercart_1.3/sapphire/thirdparty/Zend/Locale/Format.php on line 478

(I have updated memory allocation to 128M, etc., but no joy.)

I have also tried updating to PHP 5.4.4 to see if this would solve the problems, but it only creates new problems when trying to install Silvercart (I can get Silverstripe installed but get stymied when trying to add Silvercart to the mix):

[09-Aug-2012 21:56:23 UTC] PHP Fatal error: Call-time pass-by-reference has been removed in /Applications/MAMP/htdocs/SilverStripe_v2/silvercart/code/plugins/SilvercartPlugin.php on line 168

(Presumably Silvercart is not compatible with 5.4.)

Re: Adding products causing timeout

10 August 2012 at 9:42am Last edited: 10 August 2012 9:44am

Hi,

this is a known bug with SilverStripe. We fixed in the the SilverStripe source that we ship in the full package with SilverCart because our pull-request was not implemented by SilverStripe at that time. The problem is, that SilverStripe 2.4x uses some umpteen year old Zend framework distribution that causes the problem.

Either update the Zend Framework by yourself or use the full package including SilverStripe we provide. SilverCart 1.3 Full (with SilverStripe)

Cheers
Ramon

Re: Adding products causing timeout

10 August 2012 at 1:46pm

Hi Ramon,

The first issue (timeout) was using the full install of Silvercart (1.3).

The second installation problem (using PHP 5.4.4) happened both with the full install and doing a manual update using the the smaller download after the full install failed.

Re: Adding products causing timeout

13 August 2012 at 5:09pm

Hello graememck,

can you check if the version tag in the file "/MAMP/htdocs/silvercart_1.3/sapphire/thirdparty/Zend/Locale/Format.php" is like the following:

@version $Id: Locale.php 23775 2011-03-01 17:25:24Z ralph $

Your description of the issue seems to indicate that the Zend library is still that of the original Silverstripe installation.

Apart from that I just did a plain install with the full SilverCart 1.3 download package (including Silverstripe) on MAMP 2.0.5 on Mac OS X 10.6.8.

The MAMP installation provides PHP 5.3.6 and MySQL 5.5.9, with the memory limit in php.ini set to 128 MB and magic_quotes_gpc = Off.

There had been a problem with the customer ratings module when installing in a subdirectory. This issue is fixed already and available on the download page (bumped Rating version from 1.0 to 1.0.1).

Apart from that everything else worked fine, including adding products to the cart.

SilverCart hasn't been tested on PHP 5.4 yet and PHP 5.2 versions can be quite buggy, so use version 5.3 for the time being, please.
We'll be trying to get PHP 5.4 compatible in the course of this week.

All the best,
Sascha

Re: Adding products causing timeout

14 August 2012 at 12:13am Last edited: 14 August 2012 12:13am

Hi Sascha,

I appreciate the support.

I have now gone back to running an older version of MAMP (2.0.1) with PHP 5.3.6 and MySQL 5.5.9.

The installation works from a full version of Silvercart but I still get the same PHP error when after adding test products and then trying to access any page that references the products in a browser (including the Home page):

[13-Aug-2012 23:45:53] PHP Fatal error: Maximum execution time of 300 seconds exceeded in /Applications/MAMP/htdocs/silvercart_1.3_full_with_PHP536/sapphire/thirdparty/Zend/Locale/Format.php on line 478

The version number in the Zend Format file is the same as you mentioned:

* @version $Id: Format.php 23775 2011-03-01 17:25:24Z ralph $

I can access the /admin page and rebuild using /dev/build, etc., but it locks up when navigating to any page that references the products.

I have checked the memory (128M). Should I be using any of the caches (XCache, etc.)?

Graeme

Re: Adding products causing timeout

14 August 2012 at 4:31am Last edited: 14 August 2012 8:40am

Found the source of the timeout. The iconvstrpos call used in the Zend Format.php apparently has a bug in the installed PHP version of the MAMP I was running (2.0.1).

I am now upgrading to 2.0.5 to see if this will work. MAMP 2.1.1 (the latest) only installs PHP 5.2.17 and 5.4.4—neither of which will work with SilverCart.

I didn't realize that SilverCart would be so picky about PHP versions!

Re: Adding products causing timeout

14 August 2012 at 7:04am Last edited: 14 August 2012 8:39am

Well that fixed the problem (after I increased the memory allocation in the php.ini file to 128M).

So the summary:
• MAMP 2.0.1 no good even though it has the right versions of PHP and MySQL—bugs in installation
• MAMP 2.1.1 no good as the default installation (without going to Pro) are either too old (5.2.17) or too new (5.4.4)
• MAMP 2.0.5 does work, using PHP 5.3.6, as long as you increase the memory allocation.

Now I just need to get my web host to upgrade their version of PHP, but in the meantime I can at least experiment with SilverCart.

Regards

Graeme

Re: Adding products causing timeout

14 August 2012 at 8:33am

Hi Graeme,

glad to hear that you got it working and thanks for taking the time to try and post your observations.

We'll update the download page to display the requirements regarding MAMP and PHP more prominently and detailed.

All the best,
Sascha