News:

Support the VirtueMart project and become a member

Main Menu

PHP errors in Cart

Started by commonangle, April 19, 2012, 18:04:35 PM

Previous topic - Next topic

commonangle

J 2.5.6 VM 2.0.6

I can add products to cart without issue, but when I go to view cart I get these errors:


  • Warning: mysqli_real_escape_string() [function.mysqli-real-escape-string]: Couldn't fetch mysqli in /mypath/libraries/joomla/database/database/mysqli.php on line 157

    Warning: mysqli_query() [function.mysqli-query]: Couldn't fetch mysqli in /mypath/libraries/joomla/database/database/mysqli.php on line 382

    Warning: mysqli_errno() [function.mysqli-errno]: Couldn't fetch mysqli in /mypath/libraries/joomla/database/database/mysqli.php on line 387

    Warning: mysqli_error() [function.mysqli-error]: Couldn't fetch mysqli in /mypath/libraries/joomla/database/database/mysqli.php on line 388

I tried using mysql instead of mysqli, but then the cart page has no templating and I get a fatal error.

I have found similar issues in this forum but the errors aren't exactly the same, and there were no solutions posted for the ones I found. Any help would be greatly appreciated!

jenkinhill

The warning is coming from the Joomla library file. You could try changing the setting for error reporting in Joomla Gobal config Server/Server settings.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

commonangle

Thanks jenkinhill - I changed the setting from System Default to Simple and now VM is fine.

If errors are coming from the Joomla library and I disable or minimize the display of these errors, can I be sure that there isn't something seriously wrong? My reaction to errors is that they require a proper fix, not the proverbial bandaid, so I want to be sure that these errors won't affect the operation or security of the site,

jenkinhill

I'll guess your PHP version is 5.3? If so there are various reports of issues when using MySQLi  eg http://www.phpfreaks.com/forums/index.php?topic=281801.0

The warnings are advisory and may bite when updating PHP to version 6 (already used on some hosts) as currently depracated methods are removed from the code.  It has already been clearly stated by the Joomla developers that current Joomla 2.5 does not work with PHP6 but I'm sure the issues will be addressed as Joomla goes through the next development versions.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum