Link to home
Start Free TrialLog in
Avatar of cdesk458
cdesk458

asked on

XAMPP throws MySQL error when submitting a PHP form

I have a Windows 2008 R2 running XAMPP 1.8.3-1 (with XAMPP Control Panel v3.2.1), with PHP, MySQL, Apache all being in that package.
The website runs smoothly, all looks good except for one thing: we have a "Request Info" page, in which the user fills out a form an it is emailed out. The form is submitted successfully, but this error appear on the screen:
"
Store row failed:
Could not connect to MySQL.
"
Functionally is not affected, it just looks ugly and misleading.
Here's what I did so far:
In php.ini I have:
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
display_errors = Off
http://www.waytocode.com/2011/disable-warning-and-notices-in-xampp-wamp-or-lamp/
http://stackoverflow.com/questions/10160859/turn-php-error-reporting-off-in-xampp
And I've also set error_reporting in similar manner (to now display) in some other files (forgot which).
But still getting this MySQL error. How do I suppress it? Thanks
SOLUTION
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cdesk458
cdesk458

ASKER

Thanks for the help, the issue is resolved.
Looks like there was this line of PHP that returning FALSE
$ok = $this->insertObject($table->db_table_name, $oRecord, $primaryKey, false);
So an email was being generated, but a record of it also inserted into the db (which is not very important).
Seeing no easy fix/trobleshooting steps, I just commented that code block for now.
It works.