[PHP-DEV] Quality of this list

2002-06-04 Thread Hans Rakers


Hello all,

No offence, but whatever happened to the technical level on this list? Last 
two weeks i posted 2 serious stories on the list, one about some 
difficulties i had when building an extension and one about a possible 
problem in the memory limit code of the Zend engine, but nobody seems to care.

Yet discussions like 'PHP's vision' seem to get enough attention, which is 
a discussion that IMHO should really be held on php-evangelism. I thought 
my questions would make the most sense on php-dev, but if i'm wrong it 
would have been nice if someone told me so. It's not just my 
development-related questions on this list that go unanswered.

I don't want to bitch about too much, but as a lurker and occasional 
question-asker on this list its just something i noticed lately.

With regards,

Hans Rakers


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Problems with memory limit code and memory leaks in scripts

2002-06-03 Thread Hans Rakers


Hello all,

While working on one of our projects i stumbled on what i think is a 
problem in the Zend engine regarding the memory limit code. On some scripts 
the server reported memexhausts when the site had heavy traffic. I wrote a 
PHP extension that can return a script's memory usage at any time during 
execution, to find out what caused these errors. The memory usage extension 
uses two methods, the first being the total of all allocated persistent and 
regular memory blocks (REAL_SIZE), the second method is just a return of 
the variable AG(allocated_memory).

Now in one of the scripts i was monitoring i noticed a constant increase in 
memory usage (using the second method described earlier) of 10KB when 
constantly reloading in my browser. Using the second method the memory 
usage was constant.

After some investigation i discovered that that particular script leaked 10 
KB of memory on every request. I analyzed the memory limit code in Zend, 
and adapted sapi/apache/mod_php4.c to not only return 
AG(allocated_memory_peak) as an Apache variable, but also 
AG(allocated_memory) to check whether AG(allocated_memory) was zero after 
execution of each script.

This was not the case. When a script leaks memory (which really shouldn't 
happen, but it does), after its execution AG(allocated_memory) still 
contains the amount of memory that was not de-allocated. This is what seems 
to cause the trouble. Since AG(allocated_memory) is not always zero after 
execution of a script, and AG(allocated_memory_peak) is dependant on it, 
consecutive requests on a leaking script result in an ever increasing 
AG(allocated_memory) and thus an ever increasing AG(allocated_memory_peak), 
which at a certain moment results in AG(allocated_memory_peak) > 
AG(memory_limit). This is what caused the memory exhaust errors.

I noticed that AG(allocated_memory_peak) *is* reset after script execution 
in sapi/apache/mod_php4.c, but AG(allocated_memory) isn't. I should really 
be tracking down the reason for the script to leak 10 KB of memory, but i 
fixed this problem temporarily by adding a AG(allocated_memory) = 0 line to 
mod_php4.c in function send_parsed_php(), though i'm not sure if this is 
the right thing to do. For now it fixes the memory exhausts.

I am interested in hearing your views on this matter.

With regards,

Hans Rakers


-- 
Hans Rakers ([EMAIL PROTECTED]) Tel: +31 (0)23 5325689
System administrator/Developer  Fax: +31 (0)23 5314332
Parse - Postcode.NL - TeKoop.NL http://www.parse.nl/
Haarlem, the Netherlands


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Memory usage of a running script. 2 methods, 2 different results

2002-05-26 Thread Hans Rakers


Hello all,

I've been working on a small extension that can tell me the memory usage of 
a script in run-time. I've discovered two methods of doing so (when PHP is 
compiled with debugging and memory limit). One is by reading the 
AG(allocated_memory) and/or AG(allocated_memory_peak) global var, the other 
is a construction like this (partially taken from the pdf extension as i 
recall):

 int allocated_memory = 0;
 int allocated_pmemory = 0;
 int allocated_memory_total = 0;
 zend_mem_header *zmh, *zpmh;

 zmh = AG(head);
 while(zmh != NULL) {
 allocated_memory += zmh->size;
 zmh = zmh->pNext;
 }
 zpmh = AG(phead);
 while(zpmh != NULL) {
 allocated_pmemory += zpmh->size;
 zpmh = zpmh->pNext;
 }
 allocated_memory_total = allocated_memory + allocated_pmemory;

Strange thing is, i get different results with these two methods. Running a 
test script that outputs results of both methods gives me the following:

1st method: Current memory usage: 545331 Peak memory usage: 545331
2nd method: Memory: regular(68423) persistent(0) total(68423)

Now i wonder which method is right, and where the difference in results 
comes from. Or am i doing this all wrong? Can someone please shed some 
light on this?

System is Linux-2.4.18, Apache_1.3.24, php-4.2.1, php built as an Apache 
module with debugging and memory limit.

Thanks in advance.


With kind regards,

Hans Rakers
Parse BV, the Netherlands


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Need help with the build system

2002-05-23 Thread Hans Rakers


Thats it! Downgraded to autoconf-2.13 and works like a charm now.
Finally i can get to coding :)

Thanks,

Hans

At 21:14 23-5-2002 +0200, you wrote:
> 2.5x version proved to do not work well with the build
> system. Try 2.13 for a start.
>
> - Markus
>
>On Thu, May 23, 2002 at 07:39:02PM +0200, Hans Rakers wrote :
> >
> > Sorry for replying to my own message, but i realized i may have provided
> > too little info about my setup.
> >
> > Im using Slackware 8.0 with kernel 2.4.18
> > autoconf (GNU Autoconf) 2.50
> > automake (GNU automake) 1.4-p4
> > ltmain.sh (GNU libtool) 1.4 (1.920 2001/04/24 23:26:18)
> >
> > Thanks,
> >
> > Hans
> >
> > At 15:26 23-5-2002 +0200, you wrote:
> >
> > >Hello all,
> > >
> > >I'm trying to make a module for php-4.2.1 but i'm having difficulties 
> with
> > >the build system.
> > >
> > >I perform the following steps:
> > >
> > >1. extract a fresh source tree (php-4.2.1)
> > >2. go to ext/ and run ./ext_skel --extname=mymodule
> > >3. edit config.m4 and uncomment some lines to make this:
> > >
> > >PHP_ARG_ENABLE(memusage, whether to enable memusage support,
> > >dnl Make sure that the comment is aligned:
> > >[  --enable-memusage   Enable memusage support])
> > >
> > >if test "$PHP_MEMUSAGE" != "no"; then
> > >  PHP_EXTENSION(memusage, $ext_shared)
> > >fi
> > >
> > >4. go to the root of the source and run ./buildconf
> > >5. run ./configure --enable-mymodule
> > >6. run make, and then i get the error 'make: *** No targets specified and
> > >no makefile found.  Stop.'
> > >
> > >So it seems configure doesnt create a Makefile. I exactly followed the
> > >steps outlined in the manual and the output of ext_skel. Can anyone tell
> > >me whats going wrong here?
> > >
> > >Thanks in advance,
> > >
> > >Hans Rakers
> > >Parse BV, the Netherlands


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Need help with the build system

2002-05-23 Thread Hans Rakers


Sorry for replying to my own message, but i realized i may have provided 
too little info about my setup.

Im using Slackware 8.0 with kernel 2.4.18
autoconf (GNU Autoconf) 2.50
automake (GNU automake) 1.4-p4
ltmain.sh (GNU libtool) 1.4 (1.920 2001/04/24 23:26:18)

Thanks,

Hans

At 15:26 23-5-2002 +0200, you wrote:

>Hello all,
>
>I'm trying to make a module for php-4.2.1 but i'm having difficulties with 
>the build system.
>
>I perform the following steps:
>
>1. extract a fresh source tree (php-4.2.1)
>2. go to ext/ and run ./ext_skel --extname=mymodule
>3. edit config.m4 and uncomment some lines to make this:
>
>PHP_ARG_ENABLE(memusage, whether to enable memusage support,
>dnl Make sure that the comment is aligned:
>[  --enable-memusage   Enable memusage support])
>
>if test "$PHP_MEMUSAGE" != "no"; then
>   PHP_EXTENSION(memusage, $ext_shared)
>fi
>
>4. go to the root of the source and run ./buildconf
>5. run ./configure --enable-mymodule
>6. run make, and then i get the error 'make: *** No targets specified and 
>no makefile found.  Stop.'
>
>So it seems configure doesnt create a Makefile. I exactly followed the 
>steps outlined in the manual and the output of ext_skel. Can anyone tell 
>me whats going wrong here?
>
>Thanks in advance,
>
>Hans Rakers
>Parse BV, the Netherlands


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Need help with the build system

2002-05-23 Thread Hans Rakers


Hello all,

I'm trying to make a module for php-4.2.1 but i'm having difficulties with 
the build system.

I perform the following steps:

1. extract a fresh source tree (php-4.2.1)
2. go to ext/ and run ./ext_skel --extname=mymodule
3. edit config.m4 and uncomment some lines to make this:

PHP_ARG_ENABLE(memusage, whether to enable memusage support,
dnl Make sure that the comment is aligned:
[  --enable-memusage   Enable memusage support])

if test "$PHP_MEMUSAGE" != "no"; then
   PHP_EXTENSION(memusage, $ext_shared)
fi

4. go to the root of the source and run ./buildconf
5. run ./configure --enable-mymodule
6. run make, and then i get the error 'make: *** No targets specified and 
no makefile found.  Stop.'

So it seems configure doesnt create a Makefile. I exactly followed the 
steps outlined in the manual and the output of ext_skel. Can anyone tell me 
whats going wrong here?

Thanks in advance,

Hans Rakers
Parse BV, the Netherlands


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Bug #15023 Updated: Apache thread segfaults in optimizer using php-4.1.1 and Zend Optimizer

2002-01-13 Thread Hans Rakers


Gee, thanks for the wonderful input. I at least thought the Zend folks 
where following this list. As i said, i cant find anything on bug reports 
at zend.com. Any pointers, or should i just chuck the optimizer and forget 
about my bugreport?

Hans

At 00:59 14-1-2002 +, you wrote:
>ID: 15023
>Updated by: rasmus
>Reported By: [EMAIL PROTECTED]
>Old Status: Open
>Status: Bogus
>Bug Type: Scripting Engine problem
>Operating System: Linux-2.2.20
>PHP Version: 4.1.1
>New Comment:
>
>It's not, go to somewhere on www.zend.com
>
>
>Previous Comments:
>
>
>[2002-01-13 19:42:12] [EMAIL PROTECTED]
>
>I'm not sure if this is the place to submit problems related to Zend
>Optimizer, but i couldnt find anything on zend.com.
>
>I'm having reproducible crashes of Apache threads on certain pages of
>our CMS. Our developers are currently trying to pinpoint the critical
>point in the scripts to create a script for reproduction of the
>problem. For now the critical point seems to be around some
>preg_replace's.
>
>What i do have atm is a backtrace and some sysinfo. Since Zend
>Optimizer doesnt load when PHP is compiled with debug info, i couldnt
>squeeze out any more info than this:
>
>Program received signal SIGSEGV, Segmentation fault.
>0x40582378 in zend_assign_to_variable_reference ()
>from /usr/local/Zend/ZendOptimizer.so
>(gdb) bt
>#0  0x40582378 in zend_assign_to_variable_reference ()
>from /usr/local/Zend/ZendOptimizer.so
>#1  0x40587e8e in zend_assign_to_variable_reference ()
>from /usr/local/Zend/ZendOptimizer.so
>#2  0x40587e8e in zend_assign_to_variable_reference ()
>from /usr/local/Zend/ZendOptimizer.so
>#3  0x4058b325 in zend_oe () from /usr/local/Zend/ZendOptimizer.so
>#4  0x8163e9a in zend_execute_scripts () at eval.c:88
>#5  0x80c223d in php_execute_script () at eval.c:88
>#6  0x816c0ca in apache_php_module_main () at eval.c:88
>#7  0x80bf5a6 in php_restore_umask () at eval.c:88
>#8  0x80bf602 in php_restore_umask () at eval.c:88
>#9  0x8188969 in ap_invoke_handler () at eval.c:88
>#10 0x819dd1f in ap_some_auth_required () at eval.c:88
>#11 0x819dd86 in ap_process_request () at eval.c:88
>#12 0x8194b46 in ap_child_terminate () at eval.c:88
>#13 0x8194dea in ap_child_terminate () at eval.c:88
>#14 0x8195178 in ap_child_terminate () at eval.c:88
>#15 0x819574c in ap_child_terminate () at eval.c:88
>#16 0x8195dac in main () at eval.c:88
>#17 0x403572eb in __libc_start_main (main=0x81959f8 , argc=2,
> ubp_av=0xbb24, init=0x8076e04 <_init>, fini=0x821acdc <_fini>,
> rtld_fini=0x4000c130 <_dl_fini>, stack_end=0xbb1c)
> at ../sysdeps/generic/libc-start.c:129
>
>System is Slackware Linux 8.0 running kernel
>2.2.20/glibc-2.2.3/gcc-2.95.3
>Apache_1.3.22
>php-4.1.1
>ZendOptimizer-1.2.0-PHP_4.1.0-Linux_glibc21-i386
>
>php config:
>
>./configure  --with-apache=../apache_1.3.22 --with-mysql=/usr/local
>--with-pgsql=/usr/local --with-gd=../gd-1.8.4 --with-freetype-dir=/usr
>--with-jpeg-dir=/usr --with-png-dir=/usr/local --with-zlib --with-imap
>--with-openssl --with-curl --with-gettext --with-xml --enable-ftp
>--enable-sysvsem --enable-sysvshm --enable-track-vars
>--enable-memory-limit --enable-trans-sid --enable-debug=no
>
>Optimizer config from php.ini:
>
>zend_optimizer.optimization_level=15
>zend_optimizer.enable_loader=0
>zend_extension="/usr/local/Zend/ZendOptimizer.so"
>
>If you need more info i'd be glad to help.
>
>
>
>
>
>
>Edit this bug report at http://bugs.php.net/?id=15023&edit=1
>
>
>--
>PHP Development Mailing List 
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #14381 Updated: xlst_error causes error with valid XSLT processor instance

2001-12-14 Thread Hans Rakers


That still doesnt explain the segfault. Somebody else already pointed out 
the arguments to xslt_process changed. I changed this in the script 
according to the manual. But still the xslt_error() function should not 
segfault.

--
Hans Rakers

At 17:03 14-12-2001 +, you wrote:
>ID: 14381
>Updated by: sterling
>Reported By: [EMAIL PROTECTED]
>Old Status: Open
>Status: Bogus
>Bug Type: XSLT related
>Operating System: Linux-2.4.14 glibc-2.2.3
>PHP Version: 4.1.0
>New Comment:
>
>RTFM, the syntax for the xslt extension has changed...
>
>Previous Comments:
>
>
>[2001-12-07 12:07:06] [EMAIL PROTECTED]
>
>
>the following code causes Apache processes to segfault:
>
> $xsl_handle = xslt_create();
> echo $xsl_handle; // returns a valid xslt processor handle
> // $xslData and $xmlData contain valid information
> xslt_process($xslData, $xmlData, $result);
> echo xslt_error($xsl_handle);
> xslt_free($xsl_handle);
>
>This piece of code also returns a "Warning: Supplied argument is not a 
>valid XSLT Processor resource in *** on line 27", where line 27 is 
>"xslt_process($xslData, $xmlData, $result);
>"
>
>Backtrace:
>
>Program received signal SIGSEGV, Segmentation fault.
>0x404b251b in strlen (str=0x0) at ../sysdeps/i386/strlen.c:27
>27  ../sysdeps/i386/strlen.c: No such file or directory.
>(gdb) bt
>#0  0x404b251b in strlen (str=0x0) at ../sysdeps/i386/strlen.c:27
>#1  0x8114a6d in zif_xslt_error (ht=1, return_value=0x8367dfc, this_ptr=0x0,
> return_value_used=1) at sablot.c:584
>#2  0x8155e2a in execute (op_array=0x835694c) at ./zend_execute.c:1590
>#3  0x8131419 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
> at zend.c:814
>#4  0x8073ae1 in php_execute_script (primary_file=0xb358) at main.c:1309
>#5  0x813cc6c in apache_php_module_main (r=0x8337ba8, display_source_mode=0)
> at sapi_apache.c:90
>#6  0x80700e6 in send_php () at eval.c:88
>#7  0x8070142 in send_parsed_php () at eval.c:88
>#8  0x81a4819 in ap_invoke_handler () at eval.c:88
>#9  0x81b9b6f in process_request_internal () at eval.c:88
>#10 0x81b9fd6 in ap_internal_redirect () at eval.c:88
>#11 0x8196a2d in mod_gzip_redir1_handler () at eval.c:88
>#12 0x81952c2 in mod_gzip_handler () at eval.c:88
>#13 0x81a4819 in ap_invoke_handler () at eval.c:88
>#14 0x81b9b6f in process_request_internal () at eval.c:88
>#15 0x81b9bd6 in ap_process_request () at eval.c:88
>#16 0x81b09f6 in child_main () at eval.c:88
>#17 0x81b0bd5 in make_child () at eval.c:88
>#18 0x81b0d4c in startup_children () at eval.c:88
>#19 0x81b13dd in standalone_main () at eval.c:88
>#20 0x81b1c5c in main () at eval.c:88
>#21 0x4045a2eb in __libc_start_main (main=0x81b18a8 , argc=2,
> ubp_av=0xbb34, init=0x806cdec <_init>, fini=0x81d83ac <_fini>,
> rtld_fini=0x4000c130 <_dl_fini>, stack_end=0xbb2c)
> at ../sysdeps/generic/libc-start.c:129
>
>Specs:
>
>Slackware-8.0 glibc-2.2.3 (Linux osiris 2.4.14 #1 Thu Nov 8 15:02:47 CET 
>2001 i686 unknown)
>apache_1.3.22
>php-4.1.0RC5
>expat-1.95.2
>Sablot-0.71
>
>PHP config:
>
>./configure \
>--with-apache=../apache_1.3.22 \
>--with-mysql=/usr/local/mysql \
>--with-gd=/usr/local \
>--with-freetype-dir=/usr/local \
>--with-jpeg-dir=/usr \
>--with-png-dir=/usr \
>--with-zlib \
>--with-openssl \
>--with-curl \
>--enable-xslt \
>--with-xslt-sablot \
>--enable-sysvsem \
>--enable-sysvshm \
>--enable-track-vars \
>--enable-memory-limit \
>--enable-debug=yes
>
>Apache config:
>
>EAPI_MM=../mm-1.1.3 \
>SSL_BASE=/usr \
>./configure \
>--with-layout=Apache \
>--prefix=/usr/local/apache \
>--enable-module=rewrite \
>--enable-module=ssl \
>--add-module=/root/downloads/mod_gzip.c \
>--activate-module=src/modules/php4/libphp4.a
>
>
>
>
>
>
>
>Edit this bug report at http://bugs.php.net/?id=14381&edit=1
>
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #14381: xlst_error causes error with valid XSLT processor instance

2001-12-07 Thread Hans Rakers

At 18:54 7-12-2001 +0100, Alexander Wagner wrote:
>Am Freitag 07 Dezember 2001 18:33 schrieb Rasmus Lerdorf:
> > > AFAIK (and according to the manual) the first argument to xslt_process()
> > > should be a string containing the XSL data ($xslData) and not the XSLT
> > > processor handle. Please advise.
> >
> > Then the manual is wrong.  The code is clearly expecting arguments in this
> > order:
>
>ext/sablot or ext/xslt ?
>The manual seems to be right for old ext/sablot.
>
>Are you two talking about the same extension?
>
>regards
>Wagner


I'm using --enable-xslt --with-xslt-sablot (the new 4.1.0 ext/xslt extension)


-- 
Hans Rakers ([EMAIL PROTECTED])Tel: +31 (0)23 5325689
System engineer / Webmaster / Webdeveloper Fax: +31 (0)23 5324957
Parse - TeKoop http://www.parse.nl
Haarlem, the Netherlands   http://www.tekoop.nl


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #14381: xlst_error causes error with valid XSLT processor instance

2001-12-07 Thread Hans Rakers

At 09:33 7-12-2001 -0800, Rasmus Lerdorf wrote:
> > At 09:10 7-12-2001 -0800, Rasmus Lerdorf wrote:
> > > > the following code causes Apache processes to segfault:
> > > >
> > > > $xsl_handle = xslt_create();
> > > > echo $xsl_handle; // returns a valid xslt processor handle
> > > > // $xslData and $xmlData contain valid information
> > > > xslt_process($xslData, $xmlData, $result);
> > > > echo xslt_error($xsl_handle);
> > > > xslt_free($xsl_handle);
> > > >
> > > > This piece of code also returns a "Warning: Supplied argument is not a
> > > > valid XSLT Processor resource in *** on line 27", where line 27 is
> > > > "xslt_process($xslData, $xmlData, $result);
> > > > "
> > >
> > >It obviously shouldn't crash, but the first argument to xslt_process()
> > >needs to be $xsl_handle in your case.  The warning you are seeing is
> > >correct.
> > >
> > >-Rasmus
> >
> >
> > AFAIK (and according to the manual) the first argument to xslt_process()
> > should be a string containing the XSL data ($xslData) and not the XSLT
> > processor handle. Please advise.
>
>Then the manual is wrong.  The code is clearly expecting arguments in this
>order:
>
>resource processor,
>string xml,
>string xsl
>
>-Rasmus


I adapted the php source to read "xslt_process($xsl_handle, $xmlData, 
$xslData);", and this results in another (weird) segfault. Backtrace follows:

Program received signal SIGSEGV, Segmentation fault.
0x40081963 in Situation::generateMessage (this=0x6f660909, type=1932358766,
 code=543521385, arg1=@0x7039203a, arg2=@0xa203b74, theMessage=@0x6f660909)
 at situa.cpp:263
263 if (messenger && !(flags & SAB_NO_ERROR_REPORTING))
Current language:  auto; currently c++
(gdb) bt
#0  0x40081963 in Situation::generateMessage (this=0x6f660909,
 type=1932358766, code=543521385, arg1=@0x7039203a, arg2=@0xa203b74,
 theMessage=@0x6f660909) at situa.cpp:263
#1  0xa203b30 in ?? () at eval.c:88
Cannot access memory at address 0x30303030



-- 
Hans Rakers ([EMAIL PROTECTED])Tel: +31 (0)23 5325689
System engineer / Webmaster / Webdeveloper Fax: +31 (0)23 5324957
Parse - TeKoop http://www.parse.nl
Haarlem, the Netherlands   http://www.tekoop.nl


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #14381: xlst_error causes error with valid XSLT processor instance

2001-12-07 Thread Hans Rakers

At 09:10 7-12-2001 -0800, Rasmus Lerdorf wrote:
> > the following code causes Apache processes to segfault:
> >
> > $xsl_handle = xslt_create();
> > echo $xsl_handle; // returns a valid xslt processor handle
> > // $xslData and $xmlData contain valid information
> > xslt_process($xslData, $xmlData, $result);
> > echo xslt_error($xsl_handle);
> > xslt_free($xsl_handle);
> >
> > This piece of code also returns a "Warning: Supplied argument is not a
> > valid XSLT Processor resource in *** on line 27", where line 27 is
> > "xslt_process($xslData, $xmlData, $result);
> > "
>
>It obviously shouldn't crash, but the first argument to xslt_process()
>needs to be $xsl_handle in your case.  The warning you are seeing is
>correct.
>
>-Rasmus


AFAIK (and according to the manual) the first argument to xslt_process() 
should be a string containing the XSL data ($xslData) and not the XSLT 
processor handle. Please advise.


-- 
Hans Rakers ([EMAIL PROTECTED])Tel: +31 (0)23 5325689
System engineer / Webmaster / Webdeveloper Fax: +31 (0)23 5324957
Parse - TeKoop http://www.parse.nl
Haarlem, the Netherlands   http://www.tekoop.nl


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] 4.1.0 Final RC

2001-11-21 Thread Hans Rakers


** Successfull Build **

Slackware 7.1
Linux postman 2.2.19 #1 SMP Fri Apr 6 15:05:23 /etc/localtime 2001 i686 unknown

./configure \
--with-apache=../apache_1.3.22 \
--with-mysql=/usr/local/mysql \
--with-gd \
--with-ttf \
--enable-debug=no \
--enable-track-vars \
--enable-memory-limit

gd-1.8.3
freetype-1.3.1
mysql-3.23.44

Working fine so far on a very busy box.

--
Hans Rakers 


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] 4.1.0 Final RC

2001-11-20 Thread Hans Rakers


** Successfull Build **

Slackware 8.0
Linux osiris 2.4.14 #1 Thu Nov 8 15:02:47 CET 2001 i686 unknown

./configure \
--with-apache=../apache_1.3.22 \
--with-mysql=/usr/local/mysql \
--with-gd=/usr/local \
--with-freetype-dir=/usr/local \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-openssl \
--with-zlib \
--enable-sysvsem \
--enable-sysvshm \
--enable-track-vars \
--enable-memory-limit \
--enable-debug=no

All sites seem to work ok.

--
Hans Rakers


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Re: Bug #14036: Segfault when using multipart form data

2001-11-12 Thread Hans Rakers


I've tried many combinations on the specific box, i will try to explain.

The box initially was a Slackware 7.1 box with glibc-2.1.3. Tried the 
following combinations:

apache_1.3.20 + php-4.0.6
apache_1.3.22 + php-4.0.6
apache_1.3.22 + php4-latest from 20011106

Then after checking out the backtraces(included in my initial bug report) i 
saw the crash happened due to some routine in libc. I thought since the box 
was running an old slackware version i'd upgrade it to slackware-8.0, and 
hope the problem would be gone.
Installed slackware-8.0 (glibc-2.2.3) and tried the following combinations:

apache_1.3.22 + php-4.0.6
apache_1.3.22 + php4-latest from 20011106

also tried leaving out some of the features i compiled into PHP, and tried 
without some of the apache modules i used to have. No luck. The weirdest 
thing is probably that the problem disappears when i compile PHP with debug 
enabled, and that the scripts causing the segfaults do not always result in 
a segfault (sometimes, like 1 in 10 times, they do run properly).

Let me know if you need any more info. I can provide you with php scripts 
that cause this crash.

Hans Rakers


At 15:40 12-11-2001 -0800, you wrote:
>Well, file uploads do work in general in PHP 4.0.6 or the whole world
>would be screaming.  So there is something specific to your test case or
>your system that is causing this.
>
>-Rasmus
>
>On Tue, 13 Nov 2001, Hans Rakers wrote:
>
> >
> > As i reported in my bug report, i can reproduce this problem with 4.0.6 
> and
> > current cvs.
> >
> > Hans Rakers
> >
> > At 15:18 12-11-2001 -0800, you wrote:
> > >This code has changed significantly in current CVS.  4.0.6 and 4.1.0RC1
> > >should not have the problem.
> > >
> > >-Rasmus
> > >
> > >On Tue, 13 Nov 2001, Yasuo Ohgaki wrote:
> > >
> > > > [EMAIL PROTECTED] wrote:
> > > >
> > > > > From: [EMAIL PROTECTED]
> > > > > Operating system: Linux 2.2.20 and 2.4.14
> > > > > PHP version:  4.0CVS-2001-11-12
> > > > > PHP Bug Type: Reproducible crash
> > > > > Bug description:  Segfault when using multipart form data
> > > > >
> > > > > When submitting a form with enctype multipart/form-data Apache childs
> > > > > segfault. Weird thing is that the problem is not reproducible when
> > > > > compiling PHP with debugging enabled. I have tried PHP-4.0.6 and CVS
> > > > > snapshot php4-20020600.
> > > >
> > > >
> > > > 4.1.0RC may not have this problem. I cannot reprocude with 4.1.0.
> > > > I need to know to the script/config to be sure, though.
> > > >
> > > > --
> > > > Yasuo Ohgaki
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> >
> >
> >
>
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Re: Bug #14036: Segfault when using multipart form data

2001-11-12 Thread Hans Rakers


Config is included in the bugreport, and i can reproduce the problem with 
several scripts using multipart forms. Tell me whatever information you 
will need and i will try to provide it to you.

Hans Rakers

At 08:19 13-11-2001 +0900, you wrote:
>[EMAIL PROTECTED] wrote:
>
> > From: [EMAIL PROTECTED]
> > Operating system: Linux 2.2.20 and 2.4.14
> > PHP version:  4.0CVS-2001-11-12
> > PHP Bug Type: Reproducible crash
> > Bug description:  Segfault when using multipart form data
> >
> > When submitting a form with enctype multipart/form-data Apache childs
> > segfault. Weird thing is that the problem is not reproducible when
> > compiling PHP with debugging enabled. I have tried PHP-4.0.6 and CVS
> > snapshot php4-20020600.
>
>
>4.1.0RC may not have this problem. I cannot reprocude with 4.1.0.
>I need to know to the script/config to be sure, though.
>
>--
>Yasuo Ohgaki


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Re: Bug #14036: Segfault when using multipart form data

2001-11-12 Thread Hans Rakers


As i reported in my bug report, i can reproduce this problem with 4.0.6 and 
current cvs.

Hans Rakers

At 15:18 12-11-2001 -0800, you wrote:
>This code has changed significantly in current CVS.  4.0.6 and 4.1.0RC1
>should not have the problem.
>
>-Rasmus
>
>On Tue, 13 Nov 2001, Yasuo Ohgaki wrote:
>
> > [EMAIL PROTECTED] wrote:
> >
> > > From: [EMAIL PROTECTED]
> > > Operating system: Linux 2.2.20 and 2.4.14
> > > PHP version:  4.0CVS-2001-11-12
> > > PHP Bug Type: Reproducible crash
> > > Bug description:  Segfault when using multipart form data
> > >
> > > When submitting a form with enctype multipart/form-data Apache childs
> > > segfault. Weird thing is that the problem is not reproducible when
> > > compiling PHP with debugging enabled. I have tried PHP-4.0.6 and CVS
> > > snapshot php4-20020600.
> >
> >
> > 4.1.0RC may not have this problem. I cannot reprocude with 4.1.0.
> > I need to know to the script/config to be sure, though.
> >
> > --
> > Yasuo Ohgaki
> >
> >
> >
> >
> >
> >


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]