[solved]2.0.18b Internal Server Error 500

Started by atrus, February 15, 2013, 13:19:47 PM

Previous topic - Next topic

atrus

hi to all,

after installing 2.018b, our site went down and at the home page we got:

'Internal Server Error 500'

Checked the error log file and saw the following:

[15-Feb-2013 12:13:16 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/qualityb/public_html/plugins/vmcustom/stockable/stockable.php on line 229
[15-Feb-2013 12:14:15 UTC] PHP Fatal error:  Cannot access private property calculationHelper::$_cats in /home/qualityb/public_html/administrator/components/com_virtuemart/models/customfields.php on line 841
[15-Feb-2013 12:14:37 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/qualityb/public_html/administrator/components/com_virtuemart/plugins/vmcustomplugin.php on line 104

I guess the Fatal error above is the problem; would appreciate your advice. Fow now we have switched back to 2.0.18a and the site works ok.

Rgrds,
Chris

Milbo

This a very strange error, seems like the update was only partly implemented. Because it was before a private attribute and is is now public.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

atrus

Thanks for your reply Milbo; tested the version you uploaded today and the problem happened again. Is there any VM file i can check for this attribute?

Rgrds,
Chris

Milbo

You could upload the files per ftp directly. the structure in the installer is the same as on the server.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

atrus

#4
Did a full ftp copy of the 2.0.18b files - all transfered succesfully - however the same Fatal error appeared and the site is broken, returned back to 2.0.18a. Maybe i should check a specific VM2 file? Do you have an idea?

Milbo

you can check the line in calculationh.php and check if the $_cats is using var
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

atrus

#6
Thanks; checked calculationh.php and i can see:

var $_cats;

So i guess no problem there?

For now, i have disabled the following line 841 from customfields.php and the site is working again:

$calculator->_cats = $product->categories;

Maybe there is some problem with above line? This line was added in 2.0.18b and maybe it is causing the problem. Is the code correct?

UPDATE: Things get weirder: after adding a few products to the cart we got another FATAL error and the site broken again:

[20-Feb-2013 08:04:41 UTC] PHP Fatal error:  Cannot access private property calculationHelper::$_cartData in /home/qualityb/public_html/administrator/components/com_virtuemart/plugins/vmpsplugin.php on line 952

I checked again calculationh.php and saw:

var $_cartData; (that was private also before)

Line 952 in vmpsplugin is the following:

if(!empty($calculator->_cartData['VatTax']) and count ($calculator->_cartData['VatTax']) == 1){

this is also new in 2.0.18b

FYI, we are using PHP 5.3.17. We'd appreciate your assistance!

Thanks,
Chris

Milbo

Maybe it is some strange caching on your server. It looks like it uses the old calculationh.php
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

atrus

Thanks for the hint Milbo, it was finally a 3rd party plugin that needs to be updated (Chameleon)

Rgrds,
Chris