Zend Framework

Apache Crash on Zend_Db_Select

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.0.1, 1.0.2, 1.6.1
  • Fix Version/s: 1.8.1
  • Labels:
    None
  • Fix Version Priority:
    Nice to Have

Description

This is a simple function I use to get a parseable string out of for an AJAX call on the site. I put the die() at the end so that the header/footer are not sent to the client.

function getStatusAction() {
$id = $this->_request->getParam("id");
if (!$id)
die(", No ID sent\n");
$db = Zend_Registry::get('db');
$stmt = $db->query("SELECT ds., st.id AS st_id, st. FROM deliverables_status AS ds INNER JOIN status_types AS st ON ds.status_type=st.id WHERE ds.deliverable={$id}");
$res = $stmt->fetchAll();
// This is where i'd loop through the results to print out the list, but it never gets here. It crashes on the $db->query() line.
print ", YAY\n";
die();
}

This crashes Apache running :
httpd-2.0.59-1.el4s1.8.el4.centos
mysql-5.0.48-1.el4.centos
php-cli-5.1.6-3.el4s1.8
php-mysql-5.1.6-3.el4s1.8
php-pear-1.4.11-1.el4s1.1
php-5.1.6-3.el4s1.8
php-gd-5.1.6-3.el4s1.8
php-soap-5.1.6-3.el4s1.8
php-common-5.1.6-3.el4s1.8
php-pdo-5.1.6-3.el4s1.8
php-mbstring-5.1.6-3.el4s1.8
php-xmlrpc-5.1.6-3.el4s1.8

OS Version: CentOS release 4.5 (Final)

Activity

Hide
Jordan Ryan Moore added a comment -

Could you post the error from your server log?

Show
Jordan Ryan Moore added a comment - Could you post the error from your server log?
Hide
Sean Holt-Carden added a comment -

I'm afraid I no longer have access to those log files, I don't work at that company anymore. All I can tell you is that it was a standard Apache crash (core dump) error message... But I don't remember any specifics... If any relevant information was given I could have fixed it myself.

Show
Sean Holt-Carden added a comment - I'm afraid I no longer have access to those log files, I don't work at that company anymore. All I can tell you is that it was a standard Apache crash (core dump) error message... But I don't remember any specifics... If any relevant information was given I could have fixed it myself.
Hide
Jordan Ryan Moore added a comment -

Was it using the Mysqli adapter?

Show
Jordan Ryan Moore added a comment - Was it using the Mysqli adapter?
Hide
Sean Holt-Carden added a comment -

Yes it was.

Show
Sean Holt-Carden added a comment - Yes it was.
Hide
Jordan Ryan Moore added a comment -

Were any of the fields LONGBLOB or LONGTEXT? There is a known issue (ZF-1498) where these columns cause Apache to crash.

Show
Jordan Ryan Moore added a comment - Were any of the fields LONGBLOB or LONGTEXT? There is a known issue (ZF-1498) where these columns cause Apache to crash.
Hide
Sean Holt-Carden added a comment -

No, neither were of that type... standard int or varchar fields.

Show
Sean Holt-Carden added a comment - No, neither were of that type... standard int or varchar fields.
Hide
Wil Sinclair added a comment -

This issue should have been fixed for the 1.5 release.

Show
Wil Sinclair added a comment - This issue should have been fixed for the 1.5 release.
Hide
Wil Sinclair added a comment -

This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.

Show
Wil Sinclair added a comment - This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.
Hide
Wil Sinclair added a comment -

Please evaluate and categorize as necessary.

Show
Wil Sinclair added a comment - Please evaluate and categorize as necessary.
Hide
Bart McLeod added a comment -

I have a similar problem where Apache 2.x crashes on Vista Business, PHP 5.2.5. This happens when I try to update from Zend_Db_Table_Abstract inheritor. Zend_Db::update works fine with the same query setup.

Show
Bart McLeod added a comment - I have a similar problem where Apache 2.x crashes on Vista Business, PHP 5.2.5. This happens when I try to update from Zend_Db_Table_Abstract inheritor. Zend_Db::update works fine with the same query setup.
Hide
Bart McLeod added a comment -

I think this affect latest trunk, at least the crash on update does, see my comment.

Show
Bart McLeod added a comment - I think this affect latest trunk, at least the crash on update does, see my comment.
Hide
Bart McLeod added a comment -

//works
$this->db->update($this->_name, $this->data,$this->buildCriteria($keys));

//crashes apache
$this->update($this->data, $this->buildCriteria($keys, false));

Show
Bart McLeod added a comment - //works $this->db->update($this->_name, $this->data,$this->buildCriteria($keys)); //crashes apache $this->update($this->data, $this->buildCriteria($keys, false));
Hide
Bart McLeod added a comment -

Forget about my previous comments. The reason Apache crashed in my case on Zend_Db_Table was that I was calling $this->update() inside $this->update function. Stupid. It caused an infinite loop while calling itself. What I ment to do was call parent::update() inside $this->update().

Show
Bart McLeod added a comment - Forget about my previous comments. The reason Apache crashed in my case on Zend_Db_Table was that I was calling $this->update() inside $this->update function. Stupid. It caused an infinite loop while calling itself. What I ment to do was call parent::update() inside $this->update().
Hide
Wil Sinclair added a comment -

Reassigning to Ralph since he's the new maintainer of Zend_Db

Show
Wil Sinclair added a comment - Reassigning to Ralph since he's the new maintainer of Zend_Db
Hide
Ralph Schindler added a comment -

Is this still an issue? Was that 64bit machine by chance? If so I will attempt to create a unit test for this issue. If not, i'll close.

Show
Ralph Schindler added a comment - Is this still an issue? Was that 64bit machine by chance? If so I will attempt to create a unit test for this issue. If not, i'll close.
Hide
Ralph Schindler added a comment -

Cannot reproduce this test case. If you have a simple db & simple use case code, please provide it.

Also, please note if this is a 64bit machine.

Show
Ralph Schindler added a comment - Cannot reproduce this test case. If you have a simple db & simple use case code, please provide it. Also, please note if this is a 64bit machine.

People

Vote (2)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
4h
Original Estimate - 4 hours
Remaining:
4h
Remaining Estimate - 4 hours
Logged:
Not Specified
Time Spent - Not Specified