PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB_DataObject » Bug #1219

Apache will die on ->find()

Details

Submitted2004-04-16 08:09 UTC
Fromkotouc at go dot com
StatusBogus
PackageDB_DataObject
PHP Version4.3.4
OSWin XP
Roadmaps(Not assigned)

Comments

[2004-04-16 08:09 UTC] kotouc at go dot com

Description:
------------
DB_DataObject 1.5.3
httpd: LoadModule php4_module "C:/Program Files/Apache Group/Apache/modules/php434/sapi/php4apache.dll"
also I tried Zend module with same results (not sure if they are same .dlls)
LoadModule php4_module "C:/Program Files/Zend/lib/php4apache.dll"

Problem: 23.php example from PHP Anthology book by Harry Fueks from sitepoint.com.
While debugging from ZEND ZDE 3.0.0 it works and when I try to list it in browser it will kill Apache.
(I am not using ZEND Optimizer)
By quoting I found out that it will die after $articles-find() call.

Everything works as supposed to just not in browser on localhost. There is only one other minor issue which I don't understand and that is relative paths in schema_location and class_location in .ini file. It does not work, I had to provide full path and I don't know why.

Reproduce code:
---------------
require_once('Articles.php');
$dbconfig = parse_ini_file('C:/Program Files/Apache Group/Apache/htdocs/PEAR/_workdir/data/DB_DataObject/articles/db_dataobject.ini',true);

foreach($dbconfig as $class=>$values) {
$options = &PEAR::getStaticProperty($class,'options');
$options = $values;
}

$articles = new DataObject_Articles();
$articles->author = 'Kevin Yank';

$articles->find(); //here it dies without error log

echo ( 'Kevin has written the following articles:<br />' );
while ( $articles->fetch() ) {
//
echo ( ' - '.$articles->title.', published: '.
date('jS M Y',$articles->published).'<br />' );
}

Expected result:
----------------
Kevin has written the following articles:
- Build your own Database Driven Website using PHP & MySQL, published: 12th Apr 2004
- Write Secure Scripts with PHP 4.2!, published: 13th Apr 2004
- Advanced email in PHP, published: 14th Apr 2004

Actual result:
--------------
nothing from browser. Apache will die. ZEND local and remote debugging will return correct result.

[2004-04-18 14:22 UTC] kotouc at go dot com

Yes it works, now. Thanks for help!!
Just, I don't get it why it does have to go before you include dataobjects and why it doesn't work when I unquote it among dataobject definitions. Is it that Optimizer flaw? I don't encode with Zend Encoder to engage Optimizer after. Is this happening in php module? Maybe someone could enlight me via email. Thanks.