I am trying to create an embedded application that executes arbitrary PHP
scripts. If the script is syntactically correct, all works as desired.
However, if there is a syntax error, I don't get any error text that I can
return or log, etc. zend_eval_string does indeed return a -1 if there is
Hi
I discovered that php_errmsg is populated with the error text from
zend_eval_string. Is this the correct way for my embedded-php program to
access error text?
code:
if (zend_eval_string(buffer, 0, "embedded code" TSRMLS_CC) == FAILURE)
{
zval **php_errmsg;
if (zend_hash_find(EG(acti
Hi
Some of my PHP scripts use a large volume of memory. Is there a way I can:
1) Increase the script memory limit, and
2) Force a garbage collect at script end (and reset the limit).
I am currently using PHP 5.1.4
Thanks,
Bruce
___
Thanks, that might work to change the limit. When I reset it at the end of
the script, wouldn't the next script to be run by the Apache child be
aborted since the amount of memory in use is now over the limit?
Bruce
From: Stanislav Malyshev <[EMAIL PROTECTED]>
To: Bruce Bai
t;Richard Lynch" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: "Bruce Bailey" <[EMAIL PROTECTED]>
Subject: Re: [PHP-DEV] Temporarily overriding memory limit in extension
Date: Fri, 1 Dec 2006 14:41:35 -0600 (CST)
Not only is the php.ini value reset, all the stuff you
Richard
Thanks very much for the information -- it really helps.
Bruce
From: "Richard Lynch" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: "Bruce Bailey" <[EMAIL PROTECTED]>
CC: internals@lists.php.net
Subject: Re: [PHP-DEV] Temporarily overriding mem
Hi
I am using PHP 5.2.3. In the Apache error log file I see:
[Mon Jul 13 16:15:32 2009] [notice] child pid 21521 exit signal Bus error (7)
After many attempts, I have caught the following backtrace:
(gdb) bt
#0 0xb73447bc in memcpy () from /lib/libc.so.6
#1 0xb70a76f3 in _php_stream_copy_t
Help!
I was patching out a new version of my PHP extension, with a different version
as part of the name:
libmyext.so.1.0 is now libmyext.so.2.0
I updated php.ini (extension=libmyext.so.2.0) and restarted apache with the
graceful option. For some reason, both extensions were loaded simultane
.@daylessday.org
> To: bruce1...@hotmail.com
> CC: internals@lists.php.net
> Subject: Re: [PHP-DEV] Apache has two versions on my extension loaded!
>
> On 01/14/2010 02:55 AM, Bruce Bailey wrote:
> > Help!
> >
> > I was patching out a new version of my PHP extens
Hi
I recently upgraded from PHP 5.2.3 to PHP 5.2.17.
After that, some of my pages keep failing with either Segfaults or calls to
zend_mm_panic. My gdb backtrace shows:
(gdb) bt
#0 zend_mm_panic (message=0xb71fbda4 "zend_mm_heap corrupted") at
/src/php-5.2.17/Zend/zend_alloc.c:92
#1 0xb7
I have two problems with a PHP extension that I wrote that creates PHP
arrays.
1) If I call my extension function that creates PHP arrays and returns them,
unless I either unset or assign it to the empty string the process acts
like there is a memory leak.
PHP:
For ($I = 0; $I < $count; $I+
y, I can't just blindly do the separate_zval and array init. I
have tried several combinations using the ZVAL_IS_NULL and Z_TYPE_P() ==
IS_ARRAY beforehand, but I'm just not getting it.
Bruce
From: "Wez Furlong" <[EMAIL PROTECTED]>
To: "Bruce Bailey" <[EMA
Is there a way to determine how much memory a particular variable is using
(either in php or in an extension)?
It might be nice to check all variables in the php process (perhaps scanning
the interpreter's symbol table).
Thanks in advance,
Bruce
_
I have an extension written in C running with PHP4.3.9 on RH8. All
functions performed as expected. When I upgraded to PHP5.0.3RC1, for some
reason when I try to call a particular function, httpd (or php) dumps core.
It seems to be only one function. The rest appear to work as I expect them
Oops! This was my error, sorry . . .
Bruce
From: "Bruce Bailey" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [PHP-DEV] [PHP5.0.3RC1] C Extension Function not Found Anymore
Date: Wed, 08 Dec 2004 15:01:01 -0800
I have an extension written in C running with PHP4.3.9 on RH8.
I hope this is the right place for this type of question. If not, please
let me know a more appropriate forum.
I have a PHP extension (written in C) that calls a utility library that I
wrote in C++. For my testing and debugging, I have been trying to exercise
my code using PHP from the comman
I should have thought of including a backtrace before:
(gdb) bt
#0 0x030002891c30 in ?? ()
#1 0x03ff800dd7d0 in exit () from /usr/shlib/libc.so
#2 0x03ff800dd7d0 in exit () from /usr/shlib/libc.so
Cannot access memory at address 0x20
(gdb)
From: "Bruce Bailey" <[EM
n exit () from /usr/shlib/libc.so
#2 0x03ff800dd7d0 in exit () from /usr/shlib/libc.so
Cannot access memory at address 0x20
(gdb)
>From: "Bruce Bailey" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: [PHP-DEV] PHP dumps core loading extension
>Date: Fri, 25 Jul 2003 1
. . .
Bruce
-Original Message-
From: Bruce Bailey [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 9:52 AM
To: Bruce Bailey
Subject: PHP dumps core loading extension - more information
A new discovery . . .
I created a new extension with only one function and it calls a dso library
Hi
I would like to access the PHP script name and line number from within my C
extension. Is there a function that I can call that will give me this
information? I know I can call 'zend_error', but that really doesn't do
what I want.
Thanks in advance,
Bruce
___
Hi
What are the functional or practical differences between loading a custom
extension via 'extension=' in the php.ini file and having the extension
automatically load by building php using --enable? I have an extension that
calls libraries written in C++ and I see sporadic core dumps when loa
21 matches
Mail list logo