Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Debugging problem w/Zend Studio
 
Mendosoft
Jr. Member
 
Total Posts:  4
Joined:  2008-05-12
 

Hi,

I’m running Magento under Zend Studio debugger. I can’t get the system to load index.php (Magento main()) completely due to an error when using PDO_mysql. Here’s the line that fails in Mysql.php on line 95:

parent::_connect();

/** @link http://bugs.mysql.com/bug.php?id=18551 */
try {
$this->_connection->query("SET SQL_MODE=’’");
} catch (Exception $e) {
print $e;
}

The parent::_connect call succeeds and I can confirm a connection on the mysql server. But the first time a query is executed ($this->_connection->query("SET SQL_MODE=’’");), the php container seems to crash w/out any errors.

My Debug settings in Zend Studio run the following php container:

/Applications/Zend/Zend Studio for Eclipse - 6.0.1/plugins/org.zend.php.debug.debugger.macosx_5.2.14.v20080602/resources/php5/php-cgi

I see other php containers in this directory - maybe I need to run one of these instead of php-cgi? Just a guess....

Like I said, when you step through with the debugger, once you execute the query() method it never returns - as if the php container has failed due to a fatal runtime error.

Thanks.

Steve

 
Magento Community Magento Community
Magento Community
Magento Community
 
mateis
Jr. Member
 
Total Posts:  24
Joined:  2008-06-09
 

Hello,
make sure you have pdo_mysql installed (check with phpinfo() ) . Also try turning display_errors to ‘On’ in your loaded php.ini file (it might be different in zend studio from the one used by apache so watch out for that)

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mendosoft
Jr. Member
 
Total Posts:  4
Joined:  2008-05-12
 

Since I’m getting a successful connection (verified on MySQL server side) and the attached phpinfo() shows pdo, pdo_mysql and pdo_sqlite, I assume I have the pdo framework set up correctly.

I’ve attached my phpinfo() PDO output which, I assume, looks correct. The only strange thing (?) is that the pdo_mysql doesn’t have any runtime param values in the phpinfo() output. Don’t know if anyone can verify this output or not…

Like I said, the connection to the db is fine, it’s only when the first query is sent along (see original post) that the php container seems to generate a fatal error and terminates. Weird!

Image Attachments
Picture 81.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
Mendosoft
Jr. Member
 
Total Posts:  4
Joined:  2008-05-12
 

Looking at the diff between my production (hosted) pdo_mysql config and my development config it looks like the dev version is using the 3.23.58 version of the mysql client driver and the production version is running 5.0.51a.

I’m going to move my dev version up to 5.0.51a and see if that eliminates my problem re: debugging. It would make sense if there’s a mismatch in versions between what pdo_mysql expects and the actual driver being used at runtime.

I’ll update this post after I try this out.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mendosoft
Jr. Member
 
Total Posts:  4
Joined:  2008-05-12
 

Just confirming that this was due to a version mismatch between pdo_mysql and mysql_client. Once I configured in the right mysql extenstion w/the right mysql client version (5.x.x instead of 3.x.x), this problem went away.

My guess is that the php was generating a segmentation fault or something severe that lead to termination of the php container. I’m sure there’s a way to have php show the details of this fault (via errno/perror()?) but I couldn’t find the error output so didn’t know what was causing the underlying failure.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top