php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18718 PHP w/ the Zend Engine 2 make Apache core dump
Submitted: 2002-08-03 02:42 UTC Modified: 2002-11-09 01:00 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:0 of 1 (0.0%)
From: alibarim at yahoo dot com Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 4.3.0-dev OS: AIX433
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: alibarim at yahoo dot com
New email:
PHP Version: OS:

 

 [2002-08-03 02:42 UTC] alibarim at yahoo dot com
I downwload the latest version of PHP (PHP w/ the Zend Engine 2) and try to play with it !

The problem comes when I use the XTemplate class. I got a warning like "Illegal offset ..." and then the Apache (1.3.20) core dump.

The same development work perfectly with the PHP 4.2.2.

I you need more details let me know to send you the source code.

Best Regards,
Ali Barimani.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-03 03:14 UTC] eru@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
 [2002-08-13 08:20 UTC] alibarim at yahoo dot com
The Apache server core dump when we try to use the XTemplate class with the following message before exiting:

"Warning: Illegal offset type in class.XTemplate.php on line 189"

A dbx on the core file gives:

Segmentation fault in sig_coredump at 0x10003f58
0x10003f58 (sig_coredump+0x4c) 80410014        lwz   r2,0x14(r1)
(dbx) where
sig_coredump(0xb) at 0x10003f58
_object_and_properties_init(??, ??, ??) at 0xd313adc4
_object_init_ex(??, ??) at 0xd313ae48
php_var_unserialize(??, ??, ??, ??) at 0xd32b33fc
php_var_unserialize(??, ??, ??, ??) at 0xd32b3bbc
ps_srlzr_decode_php(??, ??) at 0xd32c092c
php_session_decode(??, ??) at 0xd32c0c44
php_session_initialize() at 0xd32c0f9c
php_session_start() at 0xd32c2334
zif_session_start(??, ??, ??, ??) at 0xd32c40b0
zend_execute.execute(??) at 0xd315e9f8
zend_execute.execute(??) at 0xd315eb58
zend_execute_scripts(??, ??) at 0xd312c5f8
php_execute_script(??) at 0xd3192d94
apache_php_module_main(??, ??) at 0xd33732d8
send_php(??, ??, ??) at 0xd3375cd8
send_parsed_php(??) at 0xd3375d6c
ap_invoke_handler(0x20196dc0) at 0x100164f0
process_request_internal(0x20196dc0) at 0x100438b0
ap_internal_redirect(0x20196d68, 0x20196110) at 0x10043ed8
handle_dir(0x20196110) at 0xd081fbd0
ap_invoke_handler(0x20196110) at 0x100164f0
process_request_internal(0x20196110) at 0x100438b0
ap_process_request(0x20196110) at 0x10043974
child_main(0x5) at 0x10006020
make_child(0x20018c30, 0x5, 0x3d58f483) at 0x10006398
perform_idle_server_maintenance() at 0x100068a4
standalone_main(0x3, 0x2ff2293c) at 0x10007040
http_main.main(0x3, 0x2ff2293c) at 0x10007884
 [2002-08-14 16:14 UTC] alibarim at yahoo dot com
The real version used is 4.3.0-dev. Dowloaded from php.net web site.
 [2002-10-17 22:51 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip

If the bug still occures, make sure that when you compile PHP with --enable-debug, so that the backtrace shows meaningful information.
 [2002-10-24 03:52 UTC] alibarim at yahoo dot com
The link http://snaps.php.net/php4-latest.tar.gz does not exit !
 [2002-10-24 03:57 UTC] derick@php.net
It really does exist. I just downloaded it. Please try again.

Derick
 [2002-10-24 04:41 UTC] alibarim at yahoo dot com
I download the 4.3.0pre1 from the official PHP site.
This version seems to be stable an working correctly.

But it does'nt include the Zend Engine 2 !
How can I build with the new Engine ?

Regards.
 [2002-10-24 15:47 UTC] iliaa@php.net
Zend Engine you need to download seperately as the 4.3.0 comes with ZE1. ZE2 can be downloaded from the CVS.
 [2002-11-09 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2007-10-23 04:43 UTC] nagaappireddy at yahoo dot co dot in
<?

#################################################################

## PHP Pro Bid v6.00															##

##-------------------------------------------------------------##

## Copyright ?2007 PHP Pro Software LTD. All rights reserved.	##

##-------------------------------------------------------------##

#################################################################



session_start();



define ('IN_SITE', 1);



include_once ('includes/global.php');



include_once ('global_header.php');



$header_browse_auctions = header5(MSG_AUCTION_SEARCH);

/**

 * below we have the variables that need to be declared in each separate browse page

 */

$page_url = 'auction_search';## PHP Pro Bid v6.00 we will now build the addl_query variable depending on the search type requested

(array) $query = null;

(string) $where_query = null;





if ($_REQUEST['option'] == 'basic_search')## PHP Pro Bid v6.00 quick search - header form

{

	$query[] = "a.closed=0";



	if (!empty($_REQUEST['basic_search'])) 

	{

		$basic_search = $db->rem_special_chars($_REQUEST['basic_search']);

		$query[] = "(MATCH (a.name, a.description) AGAINST ('" . $basic_search . "*' IN BOOLEAN MODE))";

		/**

		 * or the old and SLOW search using LIKE - disabled by default, just added the line in case 

		 * anyone might want to use this instead

		 */## PHP Pro Bid v6.00 $query[] = "(a.name LIKE '%" . $basic_search . "%' OR a.description LIKE '%" . $basic_search . "%')";

	}

}

else if ($_REQUEST['option'] == 'auction_search')## PHP Pro Bid v6.00 auction search - advanced form

{

	if (!empty($_REQUEST['keywords_search']))

	{

		$keywords_search = $db->rem_special_chars($_REQUEST['keywords_search']);

		$query[] = "MATCH (a.name, a.description) AGAINST ('" . $keywords_search . "*' IN BOOLEAN MODE)";		

		/**

		 * or the old and SLOW search using LIKE - disabled by default, just added the line in case 

		 * anyone might want to use this instead

		 */## PHP Pro Bid v6.00 $query[] = "(a.name LIKE '%" . $keywords_search . "%' OR a.description LIKE '%" . $keywords_search . "%')";

	}

	if ($_REQUEST['buyout_price'] == 1)

	{

		$query[] = "a.buyout_price>0";

	}

	if ($_REQUEST['reserve_price'] == 1)

	{

		$query[] = "a.reserve_price>0";

	}

	if ($_REQUEST['quantity'] == 1)

	{

		$query[] = "a.quantity>1";

	}

	if ($_REQUEST['enable_swap'] == 1)

	{

		$query[] = "a.enable_swap=1";

	}

	if (!empty($_REQUEST['list_in']))

	{

		$list_in = $db->rem_special_chars($_REQUEST['list_in']);

		$query[] = "a.list_in='" . $list_in . "'";

	}

	if (!empty($_REQUEST['country']))

	{

		$query[] = "a.country='" . intval($_REQUEST['country']) . "'";

	}

	if (!empty($_REQUEST['zip_code']))

	{

		$zip_code = $db->rem_special_chars($_REQUEST['zip_code']);

		$query[] = "MATCH (a.zip_code) AGAINST ('" . $zip_code . "*' IN BOOLEAN MODE)";

		/**

		 * or the old and SLOW search using LIKE - disabled by default, just added the line in case 

		 * anyone might want to use this instead

		 */## PHP Pro Bid v6.00 $query[] = "(a.zip_code LIKE '%" . $zip_code . "%')";

	}## PHP Pro Bid v6.00 now add the custom fields search feature

	$sql_select_custom_boxes = $db->query("SELECT b.*, t.box_type AS box_type_name FROM " . DB_PREFIX . "custom_fields_boxes b, 

	" . DB_PREFIX . "custom_fields f, " . DB_PREFIX . "custom_fields_types t WHERE 

		f.active=1 AND f.page_handle='auction' AND f.field_id=b.field_id AND b.box_searchable=1 AND b.box_type=t.type_id");

	

	$is_searchable_boxes = $db->num_rows($sql_select_custom_boxes);

	

	if ($is_searchable_boxes)

	{

		(string) $custom_addl_vars = null;

		while ($custom_box = $db->fetch_array($sql_select_custom_boxes))

		{			

			if (!empty($_REQUEST['custom_box_' . $custom_box['box_id']]))

			{

				$box_id = $custom_box['box_id'];

				$where_query .= "LEFT JOIN " . DB_PREFIX . "custom_fields_data cfd_" . $box_id . " ON cfd_" . $box_id . ".owner_id=a.auction_id AND cfd_" . $box_id . ".page_handle='auction' ";

				$custom_box_value = $db->rem_special_chars($_REQUEST['custom_box_' . $custom_box['box_id']]);

				$custom_addl_vars .= '&custom_box_' . $custom_box['box_id'] . '=' . $custom_box_value;

								

				if (in_array($custom_box['box_type_name'], array('list', 'radio')))

				{

					$query[] = "cfd_" . $box_id . ".box_value = '" . $custom_box_value . "'";					

				}

				else if (in_array($custom_box['box_type_name'], array('checkbox')))

				{

					(array) $checkbox_query = null;

					foreach ($_REQUEST['custom_box_' . $custom_box['box_id']] as $value)

					{

						$checkbox_query[] = "MATCH (cfd_" . $box_id . ".box_value) AGAINST ('" . $value . "*' IN BOOLEAN MODE)";

					}



					if (count($checkbox_query) > 0) 

					{

						$query[] = "(" . $db->implode_array($checkbox_query, ' OR ') . ")";

					}

				}

				else 

				{

					$query[] = "MATCH (cfd_" . $box_id . ".box_value) AGAINST ('" . $custom_box_value . "*' IN BOOLEAN MODE)";

					

					/**

					 * or the old and SLOW search using LIKE - disabled by default, just added the line in case 

					 * anyone might want to use this instead

					 */## PHP Pro Bid v6.00 $query[] = "(cfd.box_value LIKE '%" . $custom_box_value . "%')";

				}

			}

		}

	}

}

else if ($_REQUEST['option'] == 'seller_search')## PHP Pro Bid v6.00 search auctions posted by the seller requested

{

	if (!empty($_REQUEST['username']))

	{

		$username = $db->rem_special_chars($_REQUEST['username']);

		$where_query = "LEFT JOIN " . DB_PREFIX . "users u ON u.user_id=a.owner_id ";

		$query[] = "MATCH u.username AGAINST ('" . $username . "*' IN BOOLEAN MODE) AND u.active=1";

		/**

		 * or the old and SLOW search using LIKE - disabled by default, just added the line in case 

		 * anyone might want to use this instead

		 */## PHP Pro Bid v6.00 $query[] = "(u.username LIKE '%" . $username . "%')";

	}

}

else if ($_REQUEST['option'] == 'buyer_search')## PHP Pro Bid v6.00 search auctions on which the buyer requested has placed bids

{

	if (!empty($_REQUEST['username']))

	{

		$username = $db->rem_special_chars($_REQUEST['username']);

		$where_query = "LEFT JOIN " . DB_PREFIX . "bids b ON b.auction_id=a.auction_id

			LEFT JOIN " . DB_PREFIX . "users u ON u.user_id=b.bidder_id ";

		$query[] = "MATCH u.username AGAINST ('" . $username . "*' IN BOOLEAN MODE) AND u.active=1";

		/**

		 * or the old and SLOW search using LIKE - disabled by default, just added the line in case 

		 * anyone might want to use this instead

		 */## PHP Pro Bid v6.00 $query[] = "(u.username LIKE '%" . $username . "%')";

	}	

}



if ($_REQUEST['option'] != 'basic_search') 

{

	if (!empty($_REQUEST['results_view']))

	{

		switch ($_REQUEST['results_view'])## PHP Pro Bid v6.00 all value means we add no variables to the query

		{

			case 'open':

				$query[] = "a.closed=0";

				break;

			case 'closed':

				$query[] = "a.closed=1";

				break;

		}

	}

}	



if (count($query))

{

	$addl_query = " AND " . $db->implode_array($query, ' AND ');

}

	

$where_query .= "WHERE a.active=1 AND a.approved=1 AND a.deleted=0 AND a.creation_in_progress=0 " . $addl_query;



$order_field = (in_array($_REQUEST['order_field'], $auction_ordering)) ? $_REQUEST['order_field'] : 'a.end_time'; 

$order_type = (in_array($_REQUEST['order_type'], $order_types)) ? $_REQUEST['order_type'] : 'ASC';



## if we are on the page for the first time, we will override the ordering variables

if (!empty($_REQUEST['ordering']))

{

	switch ($_REQUEST['ordering'])

	{

		case 'end_time_asc':

			$order_field = 'a.end_time';

			$order_type = 'ASC';

			break;

		case 'end_time_desc':

			$order_field = 'a.end_time';

			$order_type = 'DESC';

			break;

		case 'start_price_asc':

			$order_field = 'a.start_price';

			$order_type = 'ASC';

			break;

	}

}



$additional_vars = '&option=' . $_REQUEST['option'] . '&keywords_search=' . $_REQUEST['keywords_search'] .

	'&buyout_price=' . $_REQUEST['buyout_price'] . '&reserve_price=' . $_REQUEST['reserve_price'] . 

	'&quantity=' . $_REQUEST['quantity'] . '&enable_swap=' . $_REQUEST['enable_swap'] . 

	'&list_in=' . $_REQUEST['list_in'] . '&results_view=' . $_REQUEST['results_view'] . 

	'&country=' . $_REQUEST['country'] . '&zip_code=' . $_REQUEST['zip_code'] . '&username=' . $_REQUEST['username'] . 

	'&basic_search=' . $_REQUEST['basic_search'] . $custom_addl_vars;



include_once('includes/page_browse_auctions.php');



include_once ('global_footer.php');



echo $template_output;



?>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 15:01:28 2024 UTC