php-general Digest 21 Aug 2007 07:12:50 -0000 Issue 4973

Topics (messages 261049 through 261068):

Re: PHP eval() fatal error
        261049 by: Stut
        261050 by: M. Sokolewicz

Re: This is a bug?
        261051 by: Daniel Brown

Re: Pass $_GET to php cli.
        261052 by: Daniel Brown
        261054 by: N0K

for/foreach speed
        261053 by: Sascha Braun, CEO . fit-o-matic
        261055 by: Robert Cummings
        261056 by: Sascha Braun, CEO . fit-o-matic

php 4.4.7 make install with pear causes zend freeing errors
        261057 by: John Mendenhall
        261063 by: Chris
        261064 by: John Mendenhall
        261065 by: M. Sokolewicz
        261066 by: Chris

Re: php 5 and ms sql server express won't play nice !
        261058 by: Andrew Ballard

Monitoring system resources used by PHP
        261059 by: Evan Kaufman

Best Practices for calling 'setup' classes that extend 'parent' classes?
        261060 by: Graham Anderson
        261061 by: Jay Blanchard

good os, php drive classifieds package?
        261062 by: blackwater dev

Declare variables in advance question
        261067 by: nitrox .

LDAP
        261068 by: Alain Roger

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Maarten Balliauw wrote:
Here's the thing: I'm trying to do some dynamic code compilation within PHP using eval(). The code I'm trying to compile raises an E_ERROR (Fatal).

Here's a simple example:

<?php
$code = '  $returnValue = 12*A+;  '; // Clearly incorrect code :-)
$returnValue = 0;

eval($code);
?>

Now, I'd like to catch the error made by eval:

// ...
try {
  eval($code);
} catch (Exception $ex) {
  var_dump($ex);
}
// ...

Problem persists: a fatal error occurs.
Using set_error_handler() and set_exception_handler() is not working either...

Is there any way to gracefully catch this error?

Fatal errors are exactly that... fatal. You cannot catch them or recover from them.

Your best option is to shell out another PHP process, capture the output and parse that for error messages.

-Stut

--
http://stut.net/

--- End Message ---
--- Begin Message ---
Maarten Balliauw wrote:
Here's the thing: I'm trying to do some dynamic code compilation within PHP using eval(). The code I'm trying to compile raises an E_ERROR (Fatal).

Here's a simple example:

<?php
$code = '  $returnValue = 12*A+;  '; // Clearly incorrect code :-)
$returnValue = 0;

eval($code);
?>

Now, I'd like to catch the error made by eval:

// ...
try {
  eval($code);
} catch (Exception $ex) {
  var_dump($ex);
}
// ...

Problem persists: a fatal error occurs.
Using set_error_handler() and set_exception_handler() is not working either...

Is there any way to gracefully catch this error?

Regards,
Maarten

If you read the manual (RTFM) at http://www.php.net/eval you'll notice the following:
"
If there is a parse error in the evaluated code, eval() returns FALSE and execution of the following code continues normally. It is not possible to catch a parse error in eval() using set_error_handler().

Note: In case of a fatal error in the evaluated code, the whole script exits.
"

So, no.

--- End Message ---
--- Begin Message ---
On 8/20/07, Augusto Morais <[EMAIL PROTECTED]> wrote:
[snip!]
> // - foo.php
> include "lib/clients.class.php";
> $clients = new clients(); //instatiating the clients class
>
[snip again!]
>
> var_dump($clients); //i dont get the object here. I got NULL!!! why?!?!!?
>
> problem:
> When the method(include_file) return "include FILE" the $client object
> stay NULL but when the same method only return "FILE" :
> include $globalactions->include_file("foo");
>
> the $client object isnt empty.

    Augusto,

    I read your code over several times.... where is the clients();
code, and how is that returned to the script?  I couldn't find it
anywhere in there, and I didn't see an explanation.

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Hey, PHP-General list....
50% off for life on web hosting plans $10/mo. or more at
http://www.pilotpig.net/.
Use the coupon code phpgeneralaug07
Register domains for about $0.01 more than what it costs me at
http://domains.pilotpig.net/.

--- End Message ---
--- Begin Message ---
On 8/20/07, N0K <[EMAIL PROTECTED]> wrote:
[snip!]
> But if i do in a browser:
> http://www.example.com/administration.php?varpass=112233&checkpass=Submit
>
> Then i go directly to the administration web, without request pass.
>
> So, im trying to the the same in php command line
[snippity-snip!]

    One method:

[filename=foo.php]
<?
for($i=1;$i<$argc;$i++) {
        $things = split("=",$argv[$i]);
        $_GET[$things[0]] = $things[1];
}
include('administration.php');
?>

    Then just call it like so (from a Unix-like command line ---
change this as appropriate for Windows, etc.):

`which php` foo.php varpass=112233 checkpass=Submit

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Hey, PHP-General list....
50% off for life on web hosting plans $10/mo. or more at
http://www.pilotpig.net/.
Use the coupon code phpgeneralaug07
Register domains for about $0.01 more than what it costs me at
http://domains.pilotpig.net/.

--- End Message ---
--- Begin Message ---
> On 8/20/07, N0K <[EMAIL PROTECTED]> wrote:
> [snip!]
>> But if i do in a browser:
>> http://www.example.com/administration.php?varpass=112233&checkpass=Submit
>>
>> Then i go directly to the administration web, without request pass.
>>
>> So, im trying to the the same in php command line
> [snippity-snip!]
>
>     One method:
>
> [filename=foo.php]
> <?
> for($i=1;$i<$argc;$i++) {
>         $things = split("=",$argv[$i]);
>         $_GET[$things[0]] = $things[1];
> }
> include('administration.php');
> ?>
>
>     Then just call it like so (from a Unix-like command line ---
> change this as appropriate for Windows, etc.):
>
> `which php` foo.php varpass=112233 checkpass=Submit
>

Hello,
Thanks for your faster answer.
I have to say im runing php cli from linux.
And i havent got many idea about php, i only want to run from command line
that script.
I have test with Daniel Brown's script, but dont work.
If you dont specific the password, then you get the html body  when run
the script and with your script, still getting the html body which request
the password.
I cant see the code because is encode with Zend, so, i cant give many
details about it or modify it.
But if it run in the browser, i think it have to run in cli, dont you think ?

Thanks.

--- End Message ---
--- Begin Message ---
Hi people,

could somebody please explain me, what loop construct is
faster? The for, while or foreach.

I at the moment don't know if there are more.

And thanks to the person who is missusing the list here
for sending trojan horses everywhere.

Since I write to the PHP General list I am receiving round
about 5 E-Mails from random domains, from this list, containing
a Jpeg image with an embeded trojan horse.

Thats really wonderfull. But maybe I should say, that we are
using a nice mailscanner, and as well we are only working on
linux machines.

So better find another way of performing your frauds.

If there are people here in the list, who would like to discuss
how its possible to fight this kind of fraud. I am very open to
that.

Get the hacking tools prepared and lets fight back. I am sure
the police would love to get an inquiry from a hole bunch of
senior developers wanting to see little assholes in jail!

Best Regards,

Sascha Braun

--
BRAUN Networks

--- End Message ---
--- Begin Message ---
On Mon, 2007-08-20 at 18:50 +0200, Sascha Braun, CEO @ fit-o-matic
wrote:
> Hi people,
> 
> could somebody please explain me, what loop construct is
> faster? The for, while or foreach.

I haven't bothered testing but I'd wager $5 that the following is the
fastest loop:

<?php

while( 1 )
{
}

?>

Depending on bytecode creation though, the following might be just as
fast:

<?php

for( ;; )
{
}

?>

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message ---
Thank you very much. When we might have time for testing we can
wager :))

Am Montag, den 20.08.2007, 13:21 -0400 schrieb Robert Cummings:
> On Mon, 2007-08-20 at 18:50 +0200, Sascha Braun, CEO @ fit-o-matic
> wrote:
> > Hi people,
> > 
> > could somebody please explain me, what loop construct is
> > faster? The for, while or foreach.
> 
> I haven't bothered testing but I'd wager $5 that the following is the
> fastest loop:
> 
> <?php
> 
> while( 1 )
> {
> }
> 
> ?>
> 
> Depending on bytecode creation though, the following might be just as
> fast:
> 
> <?php
> 
> for( ;; )
> {
> }
> 
> ?>
> 
> Cheers,
> Rob.

--- End Message ---
--- Begin Message ---
Is the only valid response to problems with php4 to
upgrade to php5?  Or, are there still some people
out there still using php4 and possibly have had
problems with install such as the following?

If php5 is the only answer, I guess we'll just have
to go with what we have and limp along until we can
get everything converted to work on php5.

I sent this to the php-install list.  However, with
no response, I knew there would be more eyes looking
at it here.  Hopefully, someone can send me a pointer
on how to resolve this issue.  It might be the root of
other problems I am having.

Per my previous message, I have recently upgraded from
php 4.4.0, to php 4.4.7.  My configure options are as
follows:

-----
./configure \
 --prefix=/usr/local/php4 \
 --with-apxs=/usr/sbin/apxs \
 --enable-debug \
 --disable-cgi \
 --enable-force-cgi-redirect \
 --enable-discard-path \
 --enable-safe-mode \
 --disable-short-tags \
 --disable-ipv6 \
 --enable-magic-quotes \
 --with-openssl \
 --with-pcre-regex \
 --with-curl \
 --with-curlwrappers \
 --with-mcrypt \
 --enable-session \
 --with-mysql=/usr/local \
 --with-mysql-sock=/var/www/var/run/mysql/mysql.sock
-----

After running configure and make, I run make install.
This is the output of the make install:

-----
calvin:php-4.4.7 {156} sudo make install
Installing PHP SAPI module:       apache
[activating module `php4' in /var/www/conf/httpd.conf]
cp libs/libphp4.so /usr/lib/apache/modules/libphp4.so
chmod 755 /usr/lib/apache/modules/libphp4.so
cp /var/www/conf/httpd.conf /var/www/conf/httpd.conf.bak
cp /var/www/conf/httpd.conf.new /var/www/conf/httpd.conf
rm /var/www/conf/httpd.conf.new
Installing PHP CLI binary:        /usr/local/php4/bin/
Installing PHP CLI man page:      /usr/local/php4/man/man1/
Installing PEAR environment:      /usr/local/php4/lib/php/
[PEAR] Archive_Tar    - already installed: 1.3.2
[PEAR] Console_Getopt - already installed: 1.2.3
[PEAR] HTML_Template_IT- already installed: 1.2.1
[PEAR] Net_UserAgent_Detect- already installed: 2.3.0
[PEAR] PEAR           - already installed: 1.6.1
Wrote PEAR system config file at: /usr/local/php4/etc/pear.conf
You may want to add: /usr/local/php4/lib/php to your php.ini include_path
[PEAR] Structures_Graph- already installed: 1.0.2
/usr/local/src/php.net/php-4.4.7/Zend/zend_hash.c(458) :  Freeing 0x3CB27624 
(128 bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 89 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(795) :  Freeing 0x3CBB9EA4 
(44 bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_variables.c(123) : Actual location 
(location was relayed)
Last leak repeated 30 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_hash.c(280) :  Freeing 0x3CBB9724 
(43 bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 4173 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_hash.c(204) :  Freeing 0x3CBB96A4 
(32 bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 1504 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(2392) :  Freeing 
0x3CBB94A4 (44 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_variables.c(123) : Actual location 
(location was relayed)
Last leak repeated 27 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(1818) :  Freeing 
0x3CB26D24 (12 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 18 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(2126) :  Freeing 
0x3CB26CE4 (12 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 568 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(2129) :  Freeing 
0x3CBB9124 (45 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_variables.c(111) : Actual location 
(location was relayed)
Last leak repeated 568 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(512) :  Freeing 0x3CB266A4 
(12 bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 525 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(2106) :  Freeing 
0x3CBB8A24 (44 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_API.c(563) : Actual location 
(location was relayed)
Last leak repeated 512 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_API.c(595) :  Freeing 0x3CBB8424 (44 
bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_API.c(583) : Actual location 
(location was relayed)
Last leak repeated 35 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_hash.c(424) :  Freeing 0x3CBB51A4 
(35 bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 1202 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(1950) :  Freeing 
0x3CB262E4 (12 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 29 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(1676) :  Freeing 
0x3CB02DE4 (12 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 42 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(1845) :  Freeing 
0x3CAF98A4 (12 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 40 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(276) :  Freeing 0x3CA67624 
(131 bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_variables.c(111) : Actual location 
(location was relayed)
Last leak repeated 781 times
/usr/local/src/php.net/php-4.4.7/ext/xml/xml.c(512) :  Freeing 0x3CB2CA24 (48 
bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 1613 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(273) :  Freeing 0x3CAEA624 
(12 bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 801 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(1297) :  Freeing 
0x3CB2C424 (44 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_variables.c(123) : Actual location 
(location was relayed)
Last leak repeated 23 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_API.c(679) :  Freeing 0x3CAE0AE4 (12 
bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 1613 times
/usr/local/src/php.net/php-4.4.7/ext/xml/xml.c(647) :  Freeing 0x3CA8A1A4 (12 
bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 547 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(1812) :  Freeing 
0x3CB04BA4 (44 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_variables.c(138) : Actual location 
(location was relayed)
Last leak repeated 5 times
/usr/local/src/php.net/php-4.4.7/ext/xml/xml.c(648) :  Freeing 0x3CB03BA4 (44 
bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_API.c(563) : Actual location 
(location was relayed)
Last leak repeated 547 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(1808) :  Freeing 
0x3CA497E4 (12 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 5 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(2075) :  Freeing 
0x3CA49764 (12 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 35 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_operators.c(1030) :  Freeing 
0x3C9F8624 (27 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 5 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(504) :  Freeing 0x3CA4BCA4 
(44 bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_variables.c(138) : Actual location 
(location was relayed)
Last leak repeated 9 times
/usr/local/src/php.net/php-4.4.7/ext/standard/string.c(569) :  Freeing 
0x3CB11964 (5 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 35 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(1848) :  Freeing 
0x3CB21464 (17 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_variables.c(111) : Actual location 
(location was relayed)
Last leak repeated 25 times
/usr/local/src/php.net/php-4.4.7/ext/standard/php_smart_str.h(83) :  Freeing 
0x3C94BF24 (129 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 1 time
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(501) :  Freeing 0x3CB79AA4 
(12 bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 9 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(2608) :  Freeing 
0x3CA52224 (62 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_variables.c(111) : Actual location 
(location was relayed)
Last leak repeated 5 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_operators.c(1069) :  Freeing 
0x3C94B724 (97 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 38 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(2114) :  Freeing 
0x3CA353E4 (12 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 23 times
/usr/local/src/php.net/php-4.4.7/ext/standard/var_unserializer.c(679) :  
Freeing 0x3C884C24 (3 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 66 times
/usr/local/src/php.net/php-4.4.7/ext/standard/var_unserializer.c(230) :  
Freeing 0x3C884BE4 (12 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 115 times
/usr/local/src/php.net/php-4.4.7/ext/standard/var_unserializer.c(625) :  
Freeing 0x3C885D24 (44 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 42 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_compile.c(1703) :  Freeing 
0x3C75F524 (12 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 23 times
Zend/zend_language_parser.c(3915) :  Freeing 0x3C7622A4 (44 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_API.c(563) : Actual location 
(location was relayed)
Last leak repeated 5 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(784) :  Freeing 0x3C5B3624 
(12 bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute_API.c(339) :  Freeing 
0x3C4FC724 (44 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_variables.c(123) : Actual location 
(location was relayed)
Last leak repeated 3 times
/usr/local/src/php.net/php-4.4.7/ext/standard/array.c(2205) :  Freeing 
0x3C4FC6A4 (44 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_API.c(563) : Actual location 
(location was relayed)
/usr/local/src/php.net/php-4.4.7/Zend/zend_hash.c(1076) :  Freeing 0x3C5AF924 
(6 bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 5 times
/usr/local/src/php.net/php-4.4.7/ext/standard/array.c(2433) :  Freeing 
0x3C5B3224 (12 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 2 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute_API.c(312) :  Freeing 
0x3C5AFEE4 (12 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 5 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_execute.c(787) :  Freeing 0x3C5AA224 
(44 bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_API.c(563) : Actual location 
(location was relayed)
/usr/local/src/php.net/php-4.4.7/ext/standard/array.c(2160) :  Freeing 
0x3C5A5E64 (12 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 2 times
/usr/local/src/php.net/php-4.4.7/ext/standard/array.c(2148) :  Freeing 
0x3C4FB024 (44 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_API.c(563) : Actual location 
(location was relayed)
/usr/local/src/php.net/php-4.4.7/Zend/zend_constants.c(238) :  Freeing 
0x3C5A5B24 (19 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_variables.c(111) : Actual location 
(location was relayed)
Last leak repeated 14 times
Zend/zend_language_scanner.c(4673) :  Freeing 0x3C3C03E4 (4 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 123 times
/usr/local/src/php.net/php-4.4.7/Zend/zend_compile.c(1899) :  Freeing 
0x3C2A5264 (12 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 164 times
Zend/zend_language_parser.c(3935) :  Freeing 0x3C2A4CA4 (44 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_API.c(563) : Actual location 
(location was relayed)
Last leak repeated 23 times
Zend/zend_language_parser.c(3940) :  Freeing 0x3C2A3F24 (44 bytes), 
script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
/usr/local/src/php.net/php-4.4.7/Zend/zend_API.c(563) : Actual location 
(location was relayed)
Last leak repeated 2 times
/usr/local/src/php.net/php-4.4.7/main/main.c(1597) :  Freeing 0x3C09E724 (20 
bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 1 time
/usr/local/src/php.net/php-4.4.7/main/main.c(1594) :  Freeing 0x3C09E6E4 (12 
bytes), script=/usr/local/src/php.net/php-4.4.7/pear/install-pear.php
Last leak repeated 1 time
Installing build environment:     /usr/local/php4/lib/php/build/
Installing header files:          /usr/local/php4/include/php/
Installing helper programs:       /usr/local/php4/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php4/man/man1/
  page: phpize.1
  page: php-config.1
-----

I would like to know what I am doing wrong here.
When I turn off pear, this does not happen.
When I try to upgrade or install pear packages,
I get the same types of errors.

Thanks in advance for any pointers you can
provide.

Thanks!

JohnM

-- 
john mendenhall
[EMAIL PROTECTED]
surf utopia
internet services

--- End Message ---
--- Begin Message ---
John Mendenhall wrote:
Is the only valid response to problems with php4 to
upgrade to php5?  Or, are there still some people
out there still using php4 and possibly have had
problems with install such as the following?

If php5 is the only answer, I guess we'll just have
to go with what we have and limp along until we can
get everything converted to work on php5.

I sent this to the php-install list.

Try the -internals list.

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
Chris,

> >I sent this to the php-install list.
> 
> Try the -internals list.

Thanks!

JohnM

-- 
john mendenhall
[EMAIL PROTECTED]
surf utopia
internet services

--- End Message ---
--- Begin Message ---
Chris wrote:
John Mendenhall wrote:
Is the only valid response to problems with php4 to
upgrade to php5?  Or, are there still some people
out there still using php4 and possibly have had
problems with install such as the following?

If php5 is the only answer, I guess we'll just have
to go with what we have and limp along until we can
get everything converted to work on php5.

I sent this to the php-install list.

Try the -internals list.


I don't think the php-internals folks would appreciate such emails. For problems with the install, first make sure it's not your fault (sounds stupid, but usually is), and if it's a bug, report it via the bugtracker. There is no need to bother the PHP developers with such things.

Just as a note, the internals list is (afaik) not meant to provide _any_ type of support, it's for discussion about the internals of PHP (mainly).
--- End Message ---
--- Begin Message ---
M. Sokolewicz wrote:
Chris wrote:
John Mendenhall wrote:
Is the only valid response to problems with php4 to
upgrade to php5?  Or, are there still some people
out there still using php4 and possibly have had
problems with install such as the following?

If php5 is the only answer, I guess we'll just have
to go with what we have and limp along until we can
get everything converted to work on php5.

I sent this to the php-install list.

Try the -internals list.


I don't think the php-internals folks would appreciate such emails. For problems with the install, first make sure it's not your fault (sounds stupid, but usually is), and if it's a bug, report it via the bugtracker. There is no need to bother the PHP developers with such things.

The compiler complaining about free'ing memory is something they should pay attention to as far as I'm concerned. *shrug*

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
> ... but the
> second comment seems helpful.
>
> [1] http://www.php.net/manual/en/function.mssql-connect.php

For SQL Server 2005, getting the right version of that ntwdblib.dll is
crucial. However, Microsoft has apparently abandoned the NTWDBLIB
library, so I have begun working with PDO ODBC instead. (It isn't
100%, though.)

--- End Message ---
--- Begin Message ---
I'm looking for a way to monitor the system resources (CPU, memory, Disk
I/O, etc) used by the PHP engine on a linux machine. I can't monitor it by
the usual
means (top, etc), since it runs as part of the apache process(es).

Does anyone know if a tool exists from Zend, or a module for Apache, to
monitor resource usage for internal subprocesses such as PHP?  The machines
I need to
monitor are a cluster of load-balanced servers running Perl and mod_jk in
addition to PHP, so that complicates things a bit.

It was suggested to me on a message board to set up a similar test
environment with just PHP and some kind of profiling built into all the
scripts, but this would kind of defeat the point, since we're wanting to
monitor production machines so that in the case they do down for whatever
reason, we can see which applications spiked when and why.

Sorry for the lengthy question, hope someone can help.  Thanks for your
time.

--- End Message ---
--- Begin Message --- What is the best practice for correctly targeting 'include' paths when using Initialization/Setup classes that extend Parent classes?

In my extend_parent_class.php file, I have to provide an incorrect relative path. Apparently, the path (that does work) is relative to php file that calls the initialization/setup class (call_the_extend_parent_class.php). Is there a less confusing way to correctly target include paths when creating initialization classes?

Should I be using absolute paths instead?

many thanks in advance



extend_parent_class.php:

include_once('./path/to/parent_class.php'); # Works with 'incorrect' relative path //include_once('../path/to/parent_class.php'); # Fatal Error with 'correct' relative path

class Initialize_Parent_Class extends Parent_Class {

function Initialize_Parent_Class()
 {              
$this->Parent_Class();
echo "This was successful and does not result in a fatal 'class not found' error";
}

}



Call the initialization class.
call_the_extend_parent_class.php:
<?php

require('./includes/extend_parent_class.php'); # initialize Parent Class

$parent_class = new Initialize_Parent_Class();
// prints 'This was successful and does not result in a fatal 'class not found' error'

?>

File structure:

php
++call_the_extend_parent_class.php
++ includes directory
  ++++ extend_parent_class.php
++ classes directory
   ++++ parent_class.php

--- End Message ---
--- Begin Message ---
[snip]
What is the best practice for correctly targeting  'include' paths  
when using Initialization/Setup classes that extend Parent classes?

In my extend_parent_class.php file, I have to provide an incorrect  
relative path. Apparently, the path (that does work) is relative to  
php file that calls the initialization/setup class  
(call_the_extend_parent_class.php).  Is there a less confusing way to  
correctly target include paths when creating initialization classes?

Should I be using absolute paths instead?
[/snip]

Have you considered autoloading? 

http://us2.php.net/autoload

--- End Message ---
--- Begin Message ---
I need to put together a car classifieds site and before I re-invent the
wheel was curious if anyone new of any good php driven OS packages
available.  Does anyone have any recommendations?

Thanks!

--- End Message ---
--- Begin Message ---
I want to declare these variables Game_id and Member_id in advance. Following 
the suggestionfrom one of my books can I do something like this:
 
$expected = array('Game_id', 'Member_id');foreach($expected AS $key) {    if ( 
!empty($_POST[$key])) {      ${$key} = $_POST[$key];    }    else {     ${$key} 
= NULL;    }}      case "addmember":      switch ($_GET['type']) {        case 
"membergame":          $sql = "INSERT INTO xsm_membergames                    
(Game_id,                    Member_id)                  VALUES                 
   ('" . mysql_real_escape_string((int)$_POST["Game_id"])) . "',                
    '" . mysql_real_escape_string((int)$_POST["Member_id"])) . "')";          
break;      }      break; 
My concern is did I achieve anything with the code I just added to declare the 
variables? Is it actually being passed to this:      case "addmember":      
switch ($_GET['type']) {        case "membergame":          $sql = "INSERT INTO 
xsm_membergames                    (Game_id,                    Member_id)      
            VALUES                    ('" . 
mysql_real_escape_string((int)$_POST["Game_id"]) . "',                    '" . 
mysql_real_escape_string((int)$_POST["Member_id"]) . "')";          break;      
}      break; 
I did add this and tested it on my server and I didnt recieve any errors. So 
how can I be sure its doing what I intended? 
_________________________________________________________________
See what you’re getting into…before you go there
http://newlivehotmail.com/?ocid=TXT_TAGHM_migration_HM_viral_preview_0507

--- End Message ---
--- Begin Message ---
Hi,

I have a stupid issue with ldap_connect.

i've reinstalled PHP, postgreSQL and restore my data (web files) after
reinstalling my PC.
now, when i try : $ds = ldap_connect($ldaphost, $ldapport) or die("Could not
connect to $ldaphost");

nothing works.
i wrote before error_reporting(E_ALL); in order to check which error message
i get, but nothing is return as error.

what could be the problem ?

thx.

-- 
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.2.3
Apache 2.2.4
PHP 5.2.3

--- End Message ---

Reply via email to