[PHP-DEV] readfile() suggestion
Hi, i've a small suggestion to improve the behavior of the readfile() function. First, since the command use the php streams, sometimes php crashes, especially with big files (10MB). Also, if you output a file with readfile(), the memory consumption is excacly the same as the reading file. I using the readfile command to deliver files with a typical content-disposition header, but since i have some 'big' files, i've change the delivering to this small code: ?php $filename='megafile.txt'; $fh=fopen($filename, 'rb'); if ($fh!=false){ while (!feof($fh) !connection_aborted()) echo fread ($fh, 8192); fclose($fh); } ? On a 2 MB file, this script needs 35KB (test is with a php_memory log) and the readfile version needs 2MB. I think it is also possible to reduce the memory consume in the readfile() command, because it is not required to read the complete file first and than output it. The problem is in the php_stream_passthru function. We need a sapi_flush(TSRMLS_C) or php_end_ob_buffer(1, 1 TSRMLS_CC) call. Not only the readfile command is affected, also the gzpassthru command. Any comments? Best regards, Steve -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Changelog broken?
Hi, the Changelog file in the php4 cvs tree is unchanged since 7 days. Is the script (cvs2cl ?) broken? Regards, Steve -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] html_error related to phpinfo() output
Hi, why result the functions phpinfo() and phpcredits() as plain text when i set the html_error = Off. I think this is not the correct behavior, or not? Regards, Steve -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] pcntl_signal problem
Hi, i've a small problem with the signal handler. These short script demonstrate my problem. #!/usr/local/bin/php ?php set_time_limit(0); function signals($signo) { switch($signo) { case SIGTERM: echo Termination signal; exit; break; case SIGINT: echo Interrupt from keyboard; exit break; } } $result=pcntl_signal(SIGTERM, 'signals'); if ($result == false) echo 'could not install sighandler for TERM'; $result=pcntl_signal(SIGINT,'signals'); if ($result == false) echo 'could not install sighandler for INT'; echo goto loop ...\n; $c=0; while (true){ $c++; usleep(1); } ? The problem is, that the script doesnt exit when i'm sending the TERM signal or pressing CTRL-C (INT signal). I've test it with the lastest cvs version. Any help? Regards, Steve -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Upload broken?
Hi, is in the cvs tree the file upload currently broken? I miss the $_FILES['myfile'] variables. Regards, Steve -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] file_register_wrapper not binary safe?
hi, i've made some tests with file_register_wrapper and a possible my-own-get-from-variable-instead-of-file-handle wrapper, but i think that the stream_open function handler is not binary safe. Here a small code snip to demonstrate the problem: ?php class variable_stream { var $data; var $data_length=0; var $pointer; function stream_open($path, $mode, $options, $opened_path) { // not really elegant, because the class don't know // the own name $this-data=substr($path,11); $this-data_length=strlen($this-data); $this-pointer=0; return true; } function stream_close(){ unset($this-data, $this-pointer); } function stream_read($count) { $returnvalue=substr($this-data,$this-pointer,$count); $this-pointer+=$count; return $returnvalue; } function stream_gets() { $this-pointer=$this-data_length; return $this-data; } } file_register_wrapper('variable', 'variable_stream') or die('Failed to register protocol'); $content='foo'.chr(0).'bar'; echo strlen( file_get_contents ('variable://'.$content) ); ? results a length of 3 instead of 7. Also when stream_read results more bytes as file_get_contents or another command requested, php results a segfault. here the backtrace: Program received signal SIGSEGV, Segmentation fault. 0x403ff2ad in zend_get_executed_lineno () at /usr/src/php4/Zend/zend_execute_API.c:260 260 return active_opline-lineno; (gdb) bt #0 0x403ff2ad in zend_get_executed_lineno () at /usr/src/php4/Zend/zend_execute_API.c:260 #1 0x4040a2e7 in zend_error (type=1, format=0x40450040 Maximum execution time of %d second%s exceeded) at /usr/src/php4/Zend/zend.c:666 #2 0x40400a50 in zend_timeout (dummy=27) at /usr/src/php4/Zend/zend_execute_API.c:688 #3 0x4009e478 in killpg () from /lib/libc.so.6 #4 0x403f602f in _efree (ptr=0x8165cec, __zend_filename=0x404514e0 /usr/src/php4/Zend/zend_hash.c, __zend_lineno=548, __zend_orig_filename=0x0, __zend_orig_lineno=0) at /usr/src/php4/Zend/zend_alloc.c:213 #5 0x40410d11 in zend_hash_destroy (ht=0x8161374) at /usr/src/php4/Zend/zend_hash.c:548 #6 0x40400306 in call_user_function_ex (function_table=0x8167440, object_pp=0x8167648, function_name=0xbfffcef0, retval_ptr_ptr=0xbfffceec, param_count=1, params=0xbfffcee8, no_separation=0, symbol_table=0x0) at /usr/src/php4/Zend/zend_execute_API.c:539 #7 0x403e89c6 in php_userstreamop_read (stream=0x8161424, buf= 0x4275982d hallo, count=3044) at /usr/src/php4/main/user_streams.c:321 #8 0x403de175 in _php_stream_read (stream=0x8161424, buf=0x4275982d hallo, size=3044) at /usr/src/php4/main/streams.c:313 #9 0x403dec57 in _php_stream_copy_to_mem (src=0x8161424, buf= 0xbfffd058, maxlen=0, persistent=0, __php_stream_call_depth=0, __zend_filename=0x4042e000 /usr/src/php4/ext/standard/file.c, __zend_lineno=423, __zend_orig_filename=0x0, __zend_orig_lineno=0) at /usr/src/php4/main/streams.c:591 #10 0x4035b14a in zif_file_get_contents (ht=1, return_value=0x816739c, this_ptr=0x0, return_value_used=1) at /usr/src/php4/ext/standard/file.c:423 #11 0x4041de99 in execute (op_array=0x8161194) at /usr/src/php4/Zend/zend_execute.c:1602 #12 0x4040a99e in zend_execute_scripts (type=8, retval=0x0, file_count= 3) at /usr/src/php4/Zend/zend.c:814 Any helps? Regards, Steve -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Predefined Classes in Zend2
Hi, is it possible that predefined classes no longer working in zend2 engine ? eg: ?php $chk= new __PHP_Incomplete_Class; var_dump($chk); ? in zend1: the incomplete message is written: Fatal error: The script tried to execute a method or access ... correct, but in zend2: object(__PHP_Incomplete_Class)(0) {} also the same example with ming: ?php $dir= new SWFMovie; var_dump($dir); ? in zend1: object(swfmovie)(1) { [movie]= resource(2) of type (SWFMovie) } in zend2: object(swfmovie)(0) {} and the PHP_FUNCTION(swfmorph_init) in ming.c is definitively not longer calling in zend2. A bug or a new behavior in zend 2? Regards, Steve -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] zend_hash_find,Z_OBJPROP and Zend2
Hi, i have problems with ming and the new zend2engine. Is it not possible to detect zend objects about the zend_hash_find method with the new zend engine? e.g.: in ming.c SWFgetProperty() zend_hash_find cant locate the objects which is defined with $movie=new SWFMovie(); (swfmovie_init()) ming.c line 138 if (zend_hash_find(Z_OBJPROP_P(id), name, namelen+1, (void **)tmp) == FAILURE) { php_error(E_WARNING, unable to find property %s, name); return NULL; } /ming.c Is it only a problem with Z_OBJPROP ? In this context, i have also sometimes a segfault with ming and zend engine2. Here is the backtrace: #0 0x20200a3b in ?? () #1 0x40400119 in _object_init_ex (arg=0x409536d8, class_type=0x8168c4c, __zend_filename=0x4042eb82 var_unserializer.re, __zend_lineno=196) at /usr/src/php5/Zend/zend_API.c:610 #2 0x403b5f12 in object_common1 (rval=0xbffedbec, p=0xbffedca8, max= 0x408d9f0f , var_hash=0xbffedcac, ce=0x8168c4c) at var_unserializer.re:196 #3 0x403b4ff2 in php_var_unserialize (rval=0xbffedbec, p=0xbffedca8, max=0x408d9f0f , var_hash=0xbffedcac) at var_unserializer.re:386 #4 0x403b5d61 in process_nested_data (rval=0xbffedcc4, p=0xbffedca8, max=0x408d9f0f , var_hash=0xbffedcac, ht=0x409530e0, elements=1) at var_unserializer.re:152 #5 0x403b52df in php_var_unserialize (rval=0xbffedcc4, p=0xbffedca8, max=0x408d9f0f , var_hash=0xbffedcac) at var_unserializer.re:315 #6 0x403acd94 in zif_unserialize (ht=1, return_value=0x40953268, this_ptr=0x0, return_value_used=1) at /usr/src/php5/ext/standard/var.c:667 #7 0x404147a9 in execute (op_array=0x408f98f8) at /usr/src/php5/Zend/zend_execute.c:2079 #8 0x40414941 in execute (op_array=0x407b4f40) at /usr/src/php5/Zend/zend_execute.c:2103 #9 0x40414941 in execute (op_array=0x407597d8) at /usr/src/php5/Zend/zend_execute.c:2103 #10 0x40414941 in execute (op_array=0x8165af0) at /usr/src/php5/Zend/zend_execute.c:2103 #11 0x403f3579 in call_user_function_ex (function_table=0x4048cab0, object_pp=0x0, function_name=0x408e03a0, retval_ptr_ptr=0xbfff4ef4, param_count=5, params=0x408891c8, no_separation=1, symbol_table=0x0) at /usr/src/php5/Zend/zend_execute_API.c:610 #12 0x403fe563 in zend_error (type=2, format=0x406cd360 unable to find property %s) at /usr/src/php5/Zend/zend.c:758 #13 0x4069f878 in SWFgetProperty () from /usr/local/lib/php/extensions/debug-non-zts-20020429/php_ming.so #14 0x406a4b7a in getMovie () from /usr/local/lib/php/extensions/debug- non-zts-20020429/php_ming.so #15 0x406a4d3e in zif_swfmovie_add () from /usr/local/lib/php/extensions/debug-non-zts-20020429/php_ming.so #16 0x404147a9 in execute (op_array=0x40755498) at /usr/src/php5/Zend/zend_execute.c:2079 #17 0x40414941 in execute (op_array=0x40634a40) at /usr/src/php5/Zend/zend_execute.c:2103 #18 0x403fe7d0 in zend_execute_scripts (type=8, retval=0x0, file_count= 3) at /usr/src/php5/Zend/zend.c:829 #19 0x403c5755 in php_execute_script (primary_file=0xb4c0) at /usr/src/php5/main/main.c:1504 #20 0x4041a5de in apache_php_module_main (r=0x81605a8, display_source_mode=0) at /usr/src/php5/sapi/apache/sapi_apache.c:55 #21 0x4041b52c in send_php (r=0x81605a8, display_source_mode=0, filename=0x8160ca0 /web/foo.php) at /usr/src/php5/sapi/apache/mod_php4.c:558 #22 0x4041b5b2 in send_parsed_php (r=0x81605a8) at /usr/src/php5/sapi/apache/mod_php4.c:573 #23 0x08055ef7 in ap_invoke_handler () #24 0x0806bdab in process_request_internal () #25 0x0806c207 in ap_internal_redirect () #26 0x402cae12 in handle_dir () from /usr/local/apache/1.3.dev/libexec/mod_dir.so #27 0x08055ef7 in ap_invoke_handler () #28 0x0806bdab in process_request_internal () #29 0x0806be20 in ap_process_request () #30 0x08062932 in child_main () #31 0x08062b04 in make_child () #32 0x08062c78 in startup_children () #33 0x08063320 in standalone_main () #34 0x08063bbf in main () #35 0x4008c280 in __libc_start_main () from /lib/libc.so.6 Regards, Steve -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Pass by reference
Yes, see bug #14237 http://bugs.php.net/bug.php?id=14237 or http://phpxpath.sourceforge.net/benchmark/phpBench.php Regards, Steve -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] CVS Account Request: staybyte
Hi, i need cvs access, because i'm currently in the ming developer group and i have improve some functions in this extension and some adjustments of ming.c are required in the near future. Ming is currently very experimental and i hope i can improve the state. Also i'll complete the incomplete ming documentation. Regards, Steve -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] callback in classes?
Hi, how can i use a callback function in preg_replace_callback or set_error_handler; with functions in classes? e.g: ?php class foo{ function bar($x){ return 'world'; } } echo preg_replace_callback('/hello/','bar','hello'); ? What's the right syntax? Regards, Steve -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] TSRM Problem with dmalloc
Hi, when i compile php with dmalloc (because i develop an own extension), php crashes in combination with apache 2, but i think this is not a problem with apache 2 or with dmalloc. Maybe it is a problem with the --with-config-file-path option. I have set it to /etc/debug/php.ini ... here is the backtrace from gdb: -- Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1024 (LWP 30068)] 0x4043bf07 in virtual_file_ex (state=0xbfffe6d8, path=0xbfffc670 /etc/debug/php.ini, verify_path=0) at /usr/src/php4/TSRM/tsrm_virtual_cwd.c:362 362 state-cwd[copy_amount] = '\0'; (gdb) bt #0 0x4043bf07 in virtual_file_ex (state=0xbfffe6d8, path=0xbfffc670 /etc/debug/php.ini, verify_path=0) at /usr/src/php4/TSRM/tsrm_virtual_cwd.c:362 #1 0x40442ef6 in expand_filepath (filepath=0xbfffe790 /etc/debug/php.ini, real_path=0x0) at /usr/src/php4/main/fopen_wrappers.c:509 #2 0x404423bf in php_fopen_and_set_opened_path (path=0xbfffe790 /etc/debug/php.ini, mode=0x404ab1df r, opened_path=0x404ea490) at /usr/src/php4/main/fopen_wrappers.c:237 #3 0x40442d29 in php_fopen_with_path (filename=0x404ab1e1 php.ini, mode=0x404ab1df r, path=0x8175024 .:/etc/debug, opened_path=0x404ea490) at /usr/src/php4/main/fopen_wrappers.c:446 #4 0x404437d1 in php_init_config () at /usr/src/php4/main/php_ini.c:315 #5 0x4043e7fa in php_module_startup (sf=0x404ed640) at /usr/src/php4/main/main.c:930 #6 0x4048cfb1 in php_apache_server_startup (pconf=0x80a2330, plog= 0x80d03e8, ptemp=0x80a4338, s=0x80d46d0) at /usr/src/php4/sapi/apache2filter/sapi_apache2.c:492 #7 0x0806ca1f in ap_run_post_config (pconf=0x80a2330, plog=0x80d03e8, ptemp=0x80a4338, s=0x80d46d0) at config.c:127 #8 0x08071187 in main (argc=2, argv=0xba14) at main.c:633 #9 0x401f0280 in __libc_start_main () from /lib/libc.so.6 -- Regards, Steve -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Bug #14237 Updated: reference calls in some cases very slow
ID: 14237 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Performance problem Operating System: i686-pc-linux-gnu PHP Version: 4.1.0 New Comment: I think, this is an very annoying behavior of the zend engine and also there are no warning or clue in the documentation. Someone must change it. Previous Comments: [2001-12-12 20:06:28] [EMAIL PROTECTED] That's a known issue with the current Zend Engine. We could move it to a ZE feature request, but will it change anything soon? I doubt ... [2001-12-12 19:59:37] [EMAIL PROTECTED] PHP Version updated to 4.1.0 [2001-12-12 19:58:57] [EMAIL PROTECTED] Output from Linux Celeron 433/384MB/PHP 4.1.0/Apache 1.3.22. Loopcount: 100 String size: 1048576 Time for function request with_reference : 1.6308959722519 secs Time for function request without_reference: 0.0011709928512573 secsexecution time of without_reference is 1393 times fast as with_reference! There must be something wrong [2001-11-26 11:26:29] [EMAIL PROTECTED] Hi, i have found a very critical behavior with references under php. The usage of references push in some cases the execution time extremly higher. I have written a small php script to explain the problem. The main problem is, the longer the string the higher the execution time, if you use a reference to the string. ?php // a function with using a reference to a parameter function with_reference ($stream, $loopcounter){ for ($x=0;$x $loopcounter; $x++){ $xyz=substr($stream,0,5); // i take only the first 5 characters } } // the same function, but without a reference function without_reference ($stream, $loopcounter){ for ($x=0;$x $loopcounter; $x++){ $xyz=substr($stream,0,5); } } set_time_limit(60); $loopcount=100; // only 100 function calls! $streamsize=1048576; // 1MB, the longer the slower!!! Try 2MB. // First, made a big string for($x=0,$stream='';$x$streamsize;$x++,$stream.='x'){} // Start function with a reference and measure start time $tmp = explode(' ', microtime()); $measure['Start Reference']=(double)$tmp[0] + (double)$tmp[1]; with_reference ($stream, $loopcount); // Start function without a reference $tmp = explode(' ', microtime()); $measure['Start Normal']=(double)$tmp[0] + (double)$tmp[1]; without_reference ($stream, $loopcount); // measure end time $tmp = explode(' ', microtime()); $measure['End']=(double)$tmp[0] + (double)$tmp[1]; // subtract times $with_ref_sec=$measure['Start Normal']-$measure['Start Reference']; $without_ref_sec=$measure['End']-$measure['Start Normal']; // output the times echo tt; echo Loopcount: $loopcountbr; echo String size: $streamsizebr; echo Time for function request \with_reference\nbsp;nbsp;nbsp;: ; echo $with_ref_sec; echo secsbr; echo Time for function request \without_reference\: ; echo $without_ref_sec; echo secshr; echo execution time of without_reference is b.round($with_ref_sec/$without_ref_sec)./b times fast as with_reference!/tt; ? Edit this bug report at http://bugs.php.net/?id=14237edit=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-DEV] Bug #14237: reference calls in some cases very slow
From: [EMAIL PROTECTED] Operating system: i686-pc-linux-gnu PHP version: 4.0CVS-2001-11-26 PHP Bug Type: Performance problem Bug description: reference calls in some cases very slow Hi, i have found a very critical behavior with references under php. The usage of references push in some cases the execution time extremly higher. I have written a small php script to explain the problem. The main problem is, the longer the string the higher the execution time, if you use a reference to the string. ?php // a function with using a reference to a parameter function with_reference ($stream, $loopcounter){ for ($x=0;$x $loopcounter; $x++){ $xyz=substr($stream,0,5); // i take only the first 5 characters } } // the same function, but without a reference function without_reference ($stream, $loopcounter){ for ($x=0;$x $loopcounter; $x++){ $xyz=substr($stream,0,5); } } set_time_limit(60); $loopcount=100; // only 100 function calls! $streamsize=1048576; // 1MB, the longer the slower!!! Try 2MB. // First, made a big string for($x=0,$stream='';$x$streamsize;$x++,$stream.='x'){} // Start function with a reference and measure start time $tmp = explode(' ', microtime()); $measure['Start Reference']=(double)$tmp[0] + (double)$tmp[1]; with_reference ($stream, $loopcount); // Start function without a reference $tmp = explode(' ', microtime()); $measure['Start Normal']=(double)$tmp[0] + (double)$tmp[1]; without_reference ($stream, $loopcount); // measure end time $tmp = explode(' ', microtime()); $measure['End']=(double)$tmp[0] + (double)$tmp[1]; // subtract times $with_ref_sec=$measure['Start Normal']-$measure['Start Reference']; $without_ref_sec=$measure['End']-$measure['Start Normal']; // output the times echo tt; echo Loopcount: $loopcountbr; echo String size: $streamsizebr; echo Time for function request \with_reference\nbsp;nbsp;nbsp;: ; echo $with_ref_sec; echo secsbr; echo Time for function request \without_reference\: ; echo $without_ref_sec; echo secshr; echo execution time of without_reference is b.round($with_ref_sec/$without_ref_sec)./b times fast as with_reference!/tt; ? -- Edit bug report at: http://bugs.php.net/?id=14237edit=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-DEV] Bug #14162: wrong init with mcrypt_generic_init crashes php
From: [EMAIL PROTECTED] Operating system: i686-pc-linux-gnu PHP version: 4.0CVS-2001-11-21 PHP Bug Type: Unknown/Other Function Bug description: wrong init with mcrypt_generic_init crashes php Hi, php crashes with libmcrypt (ive test it with 2.4.17) with the follow php script. The problem is the complete wrong initalising with mcrypt_generic_init. The mcrypt_generic_init results -3 and mcrypt_generic crashes. ?php $stream='Hello World!'; $td = @mcrypt_module_open (MCRYPT_ARCFOUR , '', MCRYPT_MODE_STREAM, ''); if ($td!=false){ $result=@mcrypt_generic_init ($td, false, false); if ($result!=-1){ $stream = mcrypt_generic ($td, $stream); mcrypt_generic_deinit ($td); } } echo $stream; ? -- Edit bug report at: http://bugs.php.net/?id=14162edit=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-DEV] Bug #14082: unserialize have problems with negative numbers
From: [EMAIL PROTECTED] Operating system: i686-pc-linux-gnu PHP version: 4.0CVS-2001-11-16 PHP Bug Type: Variables related Bug description: unserialize have problems with negative numbers Hi, i have detect two annoyingly bugs ;-) with serialize/unserialize. The first bug indicate that unserialize can't work with negative integer numbers. The second problem brings php to crash! Unserialize crash if you manipulate the count of expecting array vars. Bug 1: ?php // Results: 'Warning: unserialize() failed at offset 13 of 39 bytes' // and an empty result string, but not false // because $foo['a'] is -1 error_reporting(2047); $foo['a']=(int)-1; $foo['b']=(string)'Paris'; $bar=serialize($foo); if ($bar!=false){ echo $bar; $nop=unserialize($bar); print_r($nop); } ? --- Bug 2: ?php // Result: PHP crash, because the array number is smaller than serialized string error_reporting(2047); $ser_string='a:1:{s:1:a;i:1000;s:1:b;s:5:Paris;}'; // ^- actually 2 $unser_string=unserialize($ser_string); ? I have tried to make a bt, but gdb notify no fault. In debug mode some of my script warns with this: Warning: String is not zero-terminated (source: ./zend_execute.c:449) but i think that is another problem. -- Edit bug report at: http://bugs.php.net/?id=14082edit=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-DEV] Bug #13561: --without-pear prevent install of php-config,phpize,...
From: [EMAIL PROTECTED] Operating system: i686-pc-linux-gnu PHP version: 4.0CVS-2001-10-05 PHP Bug Type: *Configuration Issues Bug description: --without-pear prevent install of php-config,phpize,... Hi, a little configure bug. If you disable the pear installation with --without-pear then php-config,phpize, ... files will not copy with make install Regards, -- Steve -- Edit bug report at: http://bugs.php.net/?id=13561edit=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-DEV] Bug #12894 Updated: GD crashes PHP by using GD Format
ID: 12894 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Status: Closed Status: Open Bug Type: GD related Operating System: i686-pc-linux-gnu PHP Version: 4.0.7-dev (latest CVS) New Comment: oops, i have post a message to this problem in php.dev under: GD seg fault on save however, here is another code example to reproduce the problem: ?php $im_main=ImageCreateFromGD('2.gd'); ImageJPEG($im_main); ? The problem is _not_ ImageJPEG! You can reproduce the problem also with ImagePNG. here is the backtrace: Program received signal SIGSEGV, Segmentation fault. gdImageJpegCtx (im=???, outfile=???, quality=???) at gd_jpeg.c:207 207 int val = im-tpixels[i][j]; (gdb) bt #0 gdImageJpegCtx (im=???, outfile=???, quality=???) at gd_jpeg.c:207 --- you can download the '2.gd' file under: http://www.alberty.de/2.gd Previous Comments: [2001-10-02 19:05:23] [EMAIL PROTECTED] No feedback and not enought information. If problem still exists with latest CVS / GD reopen with required information. [2001-08-30 22:36:22] [EMAIL PROTECTED] I can not reproduce this. Does this happen with that example script included in this report? Does this crash happen with specific images? Where could I get those images? What was the configure line like for configuring PHP ? --Jani [2001-08-27 08:50:44] [EMAIL PROTECTED] Hi Jani, here is the backtrace of the second script: Program received signal SIGSEGV, Segmentation fault. 0x40411786 in gd_module_entry () from /usr/local/apache/current/libexec/libphp4.so (gdb) bt #0 0x40411786 in gd_module_entry () from /usr/local/apache/current/libexec/libphp4.so (gdb) the script fails only if you call ImagePNG after the ImageCreateFromGD. Also ImageGD2 creates corrupted files, but this is another bug ... Regards, -- Steve [2001-08-22 13:04:34] [EMAIL PROTECTED] I can't get your scripts to crash. Could you please generate a GDB backtrace of the crash? --Jani [2001-08-22 12:13:54] [EMAIL PROTECTED] Sorry, my submitted PHP Version was wrong. I mean 4.0.7-dev from the latest CVS. The script crash under cvs version. Regards, Steve The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/?id=12894 Edit this bug report at http://bugs.php.net/?id=12894edit=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-DEV] compile with cURL,ming,.. and apxs2 breaks
compile with cURL,ming,.. and apxs2 breaks Hi, What's wrong? Is the development on apache2 sapi stop? The current compile breaks if --with-apxs2 with Apache 2.0.26dev (prefork) is use with the follow configure options: --with-curl=shared,/usr/local/curl/current curl.c: In function `curl_write': curl.c:291: `tsrm_ls' undeclared (first use in this function) curl.c:291: (Each undeclared identifier is reported only once curl.c:291: for each function it appears in.) curl.c: In function `curl_write_header': curl.c:407: `tsrm_ls' undeclared (first use in this function) make[3]: *** [curl.slo] Error 1 make[3]: Leaving directory `/usr/src/php4/ext/curl' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/src/php4/ext/curl' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/src/php4/ext' make: *** [all-recursive] Error 1 --with-ming=shared ming.c: In function `getInput': ming.c:231: warning: passing arg 2 of `zend_fetch_resource' makes pointer from integer without a cast ming.c:231: warning: passing arg 3 of `zend_fetch_resource' makes integer from pointer without a cast ming.c:231: warning: passing arg 4 of `zend_fetch_resource' from incompatible pointer type ming.c:231: warning: passing arg 5 of `zend_fetch_resource' makes pointer from integer without a cast ming.c:238: `tsrm_ls' undeclared (first use in this function) ming.c:238: (Each undeclared identifier is reported only once ming.c:238: for each function it appears in.) ming.c: In function `zif_swfdisplayitem_addAction': ming.c:987: too few arguments to function `getDisplayItem' ming.c:996: too few arguments to function `getAction' ming.c: In function `zm_startup_ming': ming.c:3135: warning: passing arg 1 of `zend_register_list_destructors_ex' from incompatible pointer type make[3]: *** [ming.slo] Error 1 make[3]: Leaving directory `/usr/src/php4/ext/ming' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/src/php4/ext/ming' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/src/php4/ext' make: *** [all-recursive] Error 1 --with-recode In file included from recode.c:28: php_recode.h:35: warning: #warning Recode module has not been tested for thread-safety. recode.c: In function `zm_startup_recode': recode.c:77: `recode_globals_id' undeclared (first use in this function) recode.c:77: (Each undeclared identifier is reported only once recode.c:77: for each function it appears in.) recode.c: In function `zm_shutdown_recode': recode.c:87: `recode_globals_id' undeclared (first use in this function) recode.c: In function `zif_recode_string': recode.c:122: `recode_globals_id' undeclared (first use in this function) recode.c: In function `zif_recode_file': recode.c:187: `recode_globals_id' undeclared (first use in this function) make[3]: *** [recode.lo] Error 1 make[3]: Leaving directory `/usr/src/php4/ext/recode' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/src/php4/ext/recode' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/src/php4/ext' make: *** [all-recursive] Error 1 - --with-mm - mod_mm.c:35: #error mm is not thread-safe make[3]: *** [mod_mm.lo] Error 1 make[3]: Leaving directory `/usr/src/php4/ext/session' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/src/php4/ext/session' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/src/php4/ext' make: *** [all-recursive] Error 1 - and also the rest have some serious warnings: - gd.c: In function `php_imagettftext_common': gd.c:2740: warning: passing arg 2 of `virtual_filepath' from incompatible pointer type mcrypt.c: In function `zm_startup_mcrypt': mcrypt.c:266: warning: passing arg 1 of `zend_register_list_destructors_ex' from incompatible pointer type In file included from /usr/local/mysql/3.23.42/include/mysql/mysql.h:77, from php_mysql.c:61: /usr/local/mysql/current/include/mysql/mysql_version.h:15: warning: `MYSQL_UNIX_ADDR' redefined /usr/src/php4/TSRM/../main/php_config.h:1620: warning: this is the location of the previous definition sysvsem.c: In function `zif_sem_remove': sysvsem.c:405: warning: passing arg 2 of `semctl' makes integer from pointer without a cast sysvsem.c:413: warning: passing arg 2 of `semctl' makes integer from pointer without a cast sysvshm.c: In function `zm_startup_sysvshm': sysvshm.c:87: warning: passing arg 1 of `zend_register_list_destructors_ex' from incompatible pointer type zip.c: In function `zif_zip_entry_open': zip.c:263: warning: assignment makes integer from pointer without a cast - Regards, Steve -- 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-DEV] chunk_split seg fault: bt
Hi, chunk_split in the follow code snip ?php echo chunk_split(str_repeat('x',1024),10); ? produces sometimes a seg. fault. Here is the backtrace, i hope it helps a little bit: Program received signal SIGSEGV, Segmentation fault. 0x400cb007 in memcpy (dstpp=0x81926e0, srcpp=0x81922a8, len=135878960) at ../sysdeps/generic/memcpy.c:55 55 ../sysdeps/generic/memcpy.c: No such file or directory. #0 0x400cb007 in memcpy (dstpp=0x81926e0, srcpp=0x81922a8, len= 135878960) at ../sysdeps/generic/memcpy.c:55 #1 0x4055104f in zif_chunk_split (ht=Cannot access memory at address 0xcdc9 ) at string.c:1549 Cannot access memory at address 0xcd79 Regards, Steve -- 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-DEV] GD seg fault on save: (bt) - 2.gd [0/1]
Hi, i have create a gd image with the gd tools and the follow code produces a seg fault. ?php $im_main=ImageCreateFromGD('2.gd'); ImageJPEG($im_main); ? The problem is _not_ ImageJPEG! You can reproduce the problem also with ImagePNG. here is the backtrace: Program received signal SIGSEGV, Segmentation fault. gdImageJpegCtx (im=???, outfile=???, quality=???) at gd_jpeg.c:207 207 int val = im-tpixels[i][j]; (gdb) bt #0 gdImageJpegCtx (im=???, outfile=???, quality=???) at gd_jpeg.c:207 I have attached the gd file. Regards, -- Steve -- 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-DEV] GD seg fault on save: (bt) - 2.gd [1/1]
begin 755 2.gd M__\`%0`:`?]_?W]_?W]_?W__ M__]_=[!P']_?W]_?W]_?___ M_W]_?W]_?W]_?W]A\M+1 M+_7:V17LNKA'WHJ'=EVG]_?W]_?W]_ M?W]_?W]_?W\B\,K)`//5TP#J MLK``VX!\/]%T'X```!NZ;N^JJ']_?W]_?___ M_W]_?W]_?W/BEY0`YJ6C`.BMJP#ADH\`UV]K M#]5X=#39EY0IZ;2R`.:FI!W8V]GR#PV?W]_?W]_ M?W]_?V+8V\#V'9R`-EU0#49%\`T%91`-9M:0+? MCHL`Y)V:`-I\`#,RT;KRTH?'\```!_?W]_?___ M_W]_?W+!4$L4RE)-`,]230#,2D4`RD$\`,Y/2@#275@`SU-. M`+XQ*PF*R8)EB8B@```'P```!_?W]_?W]_ M?WXAP3\Z`,M$/@#*0CT`QS4O`,0S+0_,2L`LTH`)HH(P) M(Q\M:!H79P```'@```!_?W]_?W?'/D-QSY#4,^ M0T_#/4$NMC8T`,@[-0#(.S4`P3(L`+8O*0G*R8`DR8A`(DC'Q-\(!Q*+PP+ M9'```!_?W][QSY#6,^0T7'/D-8QSY#,^0WO'/D-E MEBK\R+`#`,2P`LBXH`)XI)`+)`%AB(W4T,\#PU::@```'H` M``!_?W/'/D--QSY#5,^0WO'/D-_?W]['+$N M*0O+2@`F2C`(DC'PF#(AX=Q\0ST1$%D```!D='T```!_ M\^0TW'/D-8QSY#?W]_?W]]19G(@:*R` MB0@'@?T!$0\\4!@;.8@(V,6!PARP```'\```!_6,^0U3' M/D-_?W]_?W]_2VUQ9P!^3$,S71T:2#`, MUD```!A1X`H*U:,#-\?P```']WQSY#1^0WO'/D-_ M?W]_?W]_#72/@09F?W-=#P0#70```4```!P M=4@6$3!/$%WNCH_?W]QSY#6,^0W]_?W__ M__]_?W]W)6'`'3A3AKA7EN;0```'0```![?P`` M`%C'/D-QSY#?W]0QSY#,^0W]_?W]_ M?W\I)6'`7B5AWX```![P```'T```!_?W#'/D-- MQSY#?W]0QSY#\^0W]_?W]_?W__ M__\%)6'$7B5AW]_?W]_?WO'/D-!QSY#?___ M_W]0QSY#?W]_?W]_?V)XE8`)6' M:'B5AW]_?W]_?W]!QSY#?W]0 MQSY#\^0W]_?W]_?PYXE8)6'?W__ M__]_?W]_?WO'/D-!QSY#?W]0QSY#,^ M0W]_?W]_?P1XE8I)6'?W]_ M?W]_?W#'/D--QSY#?W]QSY#6,^0W]_ M?W]_?V=XE8=W)6'?W]_?W__ M__]_?UC'/D-QSY#?W]WQSY#1^0WO'/D-_?___ M_W]_?W]_?W]_?W]_ M\^0T7'/D-WQSY#?W]_6,^0U3'/D-_?W]_ M?W]_?W]_?W]_5,^0UC' M/D-_?W]_\^0TW'/D-8QSY#?W]_?___ M_W]_?W]_?W]8QSY#3^0WO'/D-_ M?W]_?W/'/D--QSY#5,^0WO'/D-_?W]_ M?W]_\^0U3'/D--QSY#\^0W]_?W__ M__]_?W][QSY#6,^0T7'/D-8QSY#,^0WO'/D-_\^ M0W#'/D-8QSY#1^0UC'/D-[QSY#?W]_?W]_ M?W]_?W?'/D-QSY#3^0T''/D-!QSY#0^0TW'/D- CQSY#=\^0W]_?W]_?W\ ` end -- 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-DEV] Bug #13287 Updated: MySQL, PHP and a random problem
ID: 13287 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Status: Feedback Status: Open Bug Type: MySQL related Operating System: i686-pc-linux-gnu PHP Version: 4.0CVS-2001-09-13 New Comment: Yes, with mysql -e select ID from footest order by rand() limit 8; the same problem. okay, i post it to the mysql dev. forum. Regards, -- Steve Previous Comments: [2001-09-13 13:48:29] [EMAIL PROTECTED] i guess it's timing-related (and definetly on the MySQL side) what happens if you call mysql ... -e select ID from footest order by rand() limit 8; from command line several times instead of typing the query into the same client multiple times? my first guess would be that you get similar not-so-random results as the RAND() result seems to be related to MySQL client runtime somehow ... [2001-09-13 12:31:08] [EMAIL PROTECTED] Hi, i have found a mystic behavior with MySQL and PHP. The follow code describes a problem which i have only observe in the combination between PHP and MySQL. i have test it with PHP (406,407dev,408dev) and MySQL (3.23.39-3.23.42) under suse-linux. okay, lets go to the problem. First make a simple table like: // SQL-Dump CREATE TABLE footest ( ID int(10) unsigned NOT NULL default '0', KEY ID (ID) ) TYPE=MyISAM; then push many rows in the table with increasing numbers! ?php for ($i=1;$i=6;$i++){ mysql_query(insert into footest (ID) values($i)); } ? okay, and now the miracle comes with this script: ?php $result=mysql_query(select ID from footest order by rand() limit 8); if ($result!=false) while ($tmp=mysql_fetch_assoc($result)){ echo $tmp['ID'].br; } else echo mysql_error(); ? i have attached 5 series from the little code: Call 1: 52839,36271, 2555,42892,32471,13967,52990,27917 Call 2: 52823,36255, 2539,42876,32455,13951,52974,27901 Call 3: 52775,36207, 2491,42828,32407,13903,52926,27853 Call 4: 52751,36183, 2467,42804,32383,13879,52902,27829 Call 5: 52735,36167, 2451,42788,32367,13863,52886,27813 you see the problem ? No, okay make the same test under the mysql console. Type: select ID from footest order by rand() limit 8; and mysql results really random rows. strange problem ;-) i hope some developer have an idea, where the problem is, but perhaps it is a mysql problem. Regards, -- Steve Edit this bug report at http://bugs.php.net/?id=13287edit=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-DEV] Bug #13284: Other behavior of chunk_split in 4.07
From: [EMAIL PROTECTED] Operating system: i686-pc-linux-gnu PHP version: 4.0CVS-2001-09-13 PHP Bug Type: Strings related Bug description: Other behavior of chunk_split in 4.07 Hi, in the current cvs version (407|408) the following code have another result as in PHP =406 ?php echo chunk_split(str_repeat('x',1024),100); ? chunk_split dont split the strings if a split size is given. Without the splitsize, ... ?php echo chunk_split(str_repeat('x',1024)); ? ... chunk_split works correct. Regards, -- Steve -- Edit bug report at: http://bugs.php.net/?id=13284edit=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-DEV] Bug #13287: MySQL, PHP and a random problem
From: [EMAIL PROTECTED] Operating system: i686-pc-linux-gnu PHP version: 4.0CVS-2001-09-13 PHP Bug Type: MySQL related Bug description: MySQL, PHP and a random problem Hi, i have found a mystic behavior with MySQL and PHP. The follow code describes a problem which i have only observe in the combination between PHP and MySQL. i have test it with PHP (406,407dev,408dev) and MySQL (3.23.39-3.23.42) under suse-linux. okay, lets go to the problem. First make a simple table like: // SQL-Dump CREATE TABLE footest ( ID int(10) unsigned NOT NULL default '0', KEY ID (ID) ) TYPE=MyISAM; then push many rows in the table with increasing numbers! ?php for ($i=1;$i=6;$i++){ mysql_query(insert into footest (ID) values($i)); } ? okay, and now the miracle comes with this script: ?php $result=mysql_query(select ID from footest order by rand() limit 8); if ($result!=false) while ($tmp=mysql_fetch_assoc($result)){ echo $tmp['ID'].br; } else echo mysql_error(); ? i have attached 5 series from the little code: Call 1: 52839,36271, 2555,42892,32471,13967,52990,27917 Call 2: 52823,36255, 2539,42876,32455,13951,52974,27901 Call 3: 52775,36207, 2491,42828,32407,13903,52926,27853 Call 4: 52751,36183, 2467,42804,32383,13879,52902,27829 Call 5: 52735,36167, 2451,42788,32367,13863,52886,27813 you see the problem ? No, okay make the same test under the mysql console. Type: select ID from footest order by rand() limit 8; and mysql results really random rows. strange problem ;-) i hope some developer have an idea, where the problem is, but perhaps it is a mysql problem. Regards, -- Steve -- Edit bug report at: http://bugs.php.net/?id=13287edit=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-DEV] Bug #12894 Updated: GD crashes PHP by using GD Format
ID: 12894 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Status: Feedback Status: Open Bug Type: GD related Operating System: i686-pc-linux-gnu PHP Version: 4.0.7-dev (latest CVS) New Comment: Hi Jani, here is the backtrace of the second script: Program received signal SIGSEGV, Segmentation fault. 0x40411786 in gd_module_entry () from /usr/local/apache/current/libexec/libphp4.so (gdb) bt #0 0x40411786 in gd_module_entry () from /usr/local/apache/current/libexec/libphp4.so (gdb) the script fails only if you call ImagePNG after the ImageCreateFromGD. Also ImageGD2 creates corrupted files, but this is another bug ... Regards, -- Steve Previous Comments: [2001-08-22 13:04:34] [EMAIL PROTECTED] I can't get your scripts to crash. Could you please generate a GDB backtrace of the crash? --Jani [2001-08-22 12:13:54] [EMAIL PROTECTED] Sorry, my submitted PHP Version was wrong. I mean 4.0.7-dev from the latest CVS. The script crash under cvs version. Regards, Steve [2001-08-22 10:57:00] [EMAIL PROTECTED] I doubt that you could crash PHP by using functions that don't exist.. Both imageGD2 and ImageCreateFromGD where added AFTER PHP 4.0.6 was released. So they are only available in the CVS. And with the latest CVS version, both of your scripts work just fine. --Jani [2001-08-22 09:20:30] [EMAIL PROTECTED] Hi, the follow 2 different scripts using ImageCreateFromGD ImageGD2 and crashes PHP. (using gd2.0.1 and 4.0.6) ?php $im_main=ImageCreateFromPNG(./images/some_picture.png); ImageGD2($im_main,./images/some_picture.gd2); ImageDestroy($im_main); ? // the gd image is created with pngtogd from the gd lib package. ?php $im_main=ImageCreateFromGD(./images/some_picture.gd); ImagePNG($im_main,./images/some_picture.png); ImageDestroy($im_main); ? Regards, -- Steve Edit this bug report at http://bugs.php.net/?id=12894edit=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-DEV] Bug #12894: GD crashes PHP by using GD Format
From: [EMAIL PROTECTED] Operating system: i686-pc-linux-gnu PHP version: 4.0.6 PHP Bug Type: GD related Bug description: GD crashes PHP by using GD Format Hi, the follow 2 different scripts using ImageCreateFromGD ImageGD2 and crashes PHP. (using gd2.0.1 and 4.0.6) ?php $im_main=ImageCreateFromPNG(./images/some_picture.png); ImageGD2($im_main,./images/some_picture.gd2); ImageDestroy($im_main); ? // the gd image is created with pngtogd from the gd lib package. ?php $im_main=ImageCreateFromGD(./images/some_picture.gd); ImagePNG($im_main,./images/some_picture.png); ImageDestroy($im_main); ? Regards, -- Steve -- Edit bug report at: http://bugs.php.net/?id=12894edit=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-DEV] Bug #12894 Updated: GD crashes PHP by using GD Format
ID: 12894 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: GD related Operating System: i686-pc-linux-gnu PHP Version: 4.0.6 New Comment: Sorry, my submitted PHP Version was wrong. I mean 4.0.7-dev from the latest CVS. The script crash under cvs version. Regards, Steve Previous Comments: [2001-08-22 10:57:00] [EMAIL PROTECTED] I doubt that you could crash PHP by using functions that don't exist.. Both imageGD2 and ImageCreateFromGD where added AFTER PHP 4.0.6 was released. So they are only available in the CVS. And with the latest CVS version, both of your scripts work just fine. --Jani [2001-08-22 09:20:30] [EMAIL PROTECTED] Hi, the follow 2 different scripts using ImageCreateFromGD ImageGD2 and crashes PHP. (using gd2.0.1 and 4.0.6) ?php $im_main=ImageCreateFromPNG(./images/some_picture.png); ImageGD2($im_main,./images/some_picture.gd2); ImageDestroy($im_main); ? // the gd image is created with pngtogd from the gd lib package. ?php $im_main=ImageCreateFromGD(./images/some_picture.gd); ImagePNG($im_main,./images/some_picture.png); ImageDestroy($im_main); ? Regards, -- Steve Edit this bug report at http://bugs.php.net/?id=12894edit=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-DEV] Bug #12791: mcrypt doesnt work in 4.0.7 rc1 by this code
From: [EMAIL PROTECTED] Operating system: i686-pc-linux-gnu PHP version: 4.0CVS-2001-08-16 PHP Bug Type: mcrypt related Bug description: mcrypt doesnt work in 4.0.7 rc1 by this code Hi all, mcrypt doesnt work in 4.0.7 with the following code: the following code produce a bWarning/b: Unknown list entry type in request shutdown (0) in ---PHP--- function cipherx_stream(){ $td = @mcrypt_module_open (MCRYPT_ARCFOUR , , MCRYPT_MODE_STREAM, ); } $xyz=cipherx_stream(); ---/PHP--- if you use this, PHP crashes: ---PHP--- function cipherx_stream(){ $td = @mcrypt_module_open (MCRYPT_ARCFOUR , , MCRYPT_MODE_STREAM, ); if ($td) mcrypt_generic_end ($td); } $xyz=cipherx_stream(); ---/PHP--- PHP 4.0.6 work fine with the first code, but it crashes also with the second :-( Regards, -- Steve -- Edit bug report at: http://bugs.php.net/?id=12791edit=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-DEV] Bug #12091 Updated: zlib uncompress buffer error/ inflate failed
ID: 12091 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Closed Bug Type: Zlib Related Operating System: i686-pc-linux-gnu PHP Version: 4.0CVS-2001-07-12 New Comment: Hi Thies, thank you for your changes in zlib.c but you have not really fix the problem. If i increase the string repeating from 5000 to 35000, i have the same problem again, but i don't no why, sometimes php works correct... ---snip--- tt ?php error_reporting(63); mt_srand ((double) microtime() * 100); for ($original=,$i=0;$i35000;$i++){ //$out.=chr(mt_rand()); // $original.=lala ; // problem } $packed=gzdeflate($original); // gzcompress $unpacked=gzinflate($packed); // gzuncompress echo Length original:.strlen($original).br; echo Length packed:.strlen($packed).br; echo Length unpacked:.strlen($unpacked).br; if (strcmp($original,$unpacked)==0) echo Strings are equal; else echo bStrings unot/u equal/b; ? /tt ---snap--- Regards, -- Steve Previous Comments: [2001-07-13 11:15:07] [EMAIL PROTECTED] fixed in CVS you can make it work in 4.0.6 by changing maxfactor from 8 to lets say 16 in zlib.c around line 912 [2001-07-12 05:38:24] [EMAIL PROTECTED] Hi, the follow code produces a deflated string which php can not inflate. php results: Warning: gzinflate: buffer error in /web/htdocs/thisfile.php tt ?php error_reporting(63); mt_srand ((double) microtime() * 100); for ($original=,$i=0;$i5000;$i++){ //$original.=chr(mt_rand()); // $original.=lala ; // problem } $packed=gzdeflate($original); // gzcompress $unpacked=gzinflate($packed); // gzuncompress echo Length original:.strlen($original).br; echo Length packed:.strlen($packed).br; echo Length unpacked:.strlen($unpacked).br; if (strcmp($original,$unpacked)==0) echo Strings are equal; else echo bStrings unot/u equal/b; ? /tt Regards, -- Steve Edit this bug report at http://bugs.php.net/?id=12091edit=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-DEV] Bug #12146: PHP warns if mysql have a special problem
From: [EMAIL PROTECTED] Operating system: i686-pc-linux-gnu PHP version: 4.0.6 PHP Bug Type: MySQL related Bug description: PHP warns if mysql have a special problem Hi, the follow 'wrong' MySQL statement produce not only a MySQL error number, it also makes a php warning: MySQL: Unable to save result set ---snip--- error_reporting(63); $query=show table status from foo; // instead of show table status from foo like 'bar' $result=mysql_query($query); if ($result==false) echo br.mysql_errno().: .mysql_error().BR; ---snap--- Regards, -- Steve -- Edit bug report at: http://bugs.php.net/?id=12146edit=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-DEV] Bug #12091: zlib uncompress buffer error/ inflate failed
From: [EMAIL PROTECTED] Operating system: i686-pc-linux-gnu PHP version: 4.0CVS-2001-07-12 PHP Bug Type: Zlib Related Bug description: zlib uncompress buffer error/ inflate failed Hi, the follow code produces a deflated string which php can not inflate. php results: Warning: gzinflate: buffer error in /web/htdocs/thisfile.php tt ?php error_reporting(63); mt_srand ((double) microtime() * 100); for ($original=,$i=0;$i5000;$i++){ //$original.=chr(mt_rand()); // $original.=lala ; // problem } $packed=gzdeflate($original); // gzcompress $unpacked=gzinflate($packed); // gzuncompress echo Length original:.strlen($original).br; echo Length packed:.strlen($packed).br; echo Length unpacked:.strlen($unpacked).br; if (strcmp($original,$unpacked)==0) echo Strings are equal; else echo bStrings unot/u equal/b; ? /tt Regards, -- Steve -- Edit bug report at: http://bugs.php.net/?id=12091edit=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-DEV] Bug #12045: no content=cURL crashes sometimes
From: [EMAIL PROTECTED] Operating system: i686 PHP version: 4.0.6 PHP Bug Type: cURL related Bug description: no content=cURL crashes sometimes Hi, sometimes cURL crashes when Server gives correct headers but no content. unfortunately the problem is difficult to reproduce. a access with curl to a php script like: --- ?php ? --- produces sometimes the problem. Regards, -- Steve -- Edit bug report at: http://bugs.php.net/?id=12045edit=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-DEV] Bug #11901: CURLOPT_HEADERFUNCTION result wrong header
From: [EMAIL PROTECTED] Operating system: i686-pc-linux-gnu PHP version: 4.0 Latest CVS (2001-07-05) PHP Bug Type: cURL related Bug description: CURLOPT_HEADERFUNCTION result wrong header Hi, the code: function get_header($tmp1,$tmp2){ echo R1:$tmp1brR2:$tmp2br; return false; } curl_setopt ($ch, CURLOPT_HEADERFUNCTION, get_header); results only: HTTP/1.1 200 OK and not the complete header. also the function get_header was not called for each header line. Regards, Steve -- Edit Bug report at: http://bugs.php.net/?id=11901edit=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-DEV] Bug #11908: Post not binary safe
From: [EMAIL PROTECTED] Operating system: i686-pc-linux-gnu PHP version: 4.0 Latest CVS (2001-07-05) PHP Bug Type: cURL related Bug description: Post not binary safe Hi, the code: $ch = curl_init (http://www.php.net/;); $fp = fopen (php_homepage.txt, w); for ($str[field1]=,$i=0;$i256;$i++,$str[field1].=chr($i)){} curl_setopt ($ch, CURLOPT_POSTFIELDS, $str); curl_setopt ($ch, CURLOPT_FILE, $fp); curl_setopt ($ch, CURLOPT_HEADER, 1); //curl_setopt ($ch, CURLOPT_BINARYTRANSFER, 1); curl_exec ($ch); curl_close ($ch); fclose ($fp); - are not binary safe. if the CURLOPT_BINARYTRANSFER set to 1, cURL results: Warning: Cannot call the CURLOPT_WRITEFUNCTION Regards, -- Steve -- Edit Bug report at: http://bugs.php.net/?id=11908edit=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-DEV] Bug #11804: curl_error results strange strings
From: [EMAIL PROTECTED] Operating system: i686-pc-linux-gnu PHP version: 4.0 Latest CVS (2001-06-29) PHP Bug Type: cURL related Bug description: curl_error results strange strings Hi, - cURL 7.8, PHP CVS, Apache 1.3.20, linux-i686 curl_errno doesnt work with follow code: -- ?php $url=http://www.foo.com;; $ch = curl_init ($url); $header_file = fopen (header_curl.dat, w); $content_file = fopen (content_curl.dat, w); curl_setopt ($ch, CURLOPT_FILE, $content_file); curl_setopt ($ch, CURLOPT_WRITEHEADER, $header_file); curl_setopt ($ch, CURLOPT_REFERER, $url); curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt ($ch, CURLOPT_NOPROGRESS, true); curl_setopt ($ch, CURLOPT_TIMEOUT, 30); $result=curl_exec ($ch); $returncode=curl_getinfo($ch, CURLINFO_HTTP_CODE); $totaltime=curl_getinfo($ch,CURLINFO_TOTAL_TIME); $realurl=curl_getinfo($ch,CURLINFO_EFFECTIVE_URL); $contentsize=curl_getinfo($ch,CURLINFO_SIZE_DOWNLOAD); if (curl_errno($ch)0){ $error=curl_error($ch); echo $error; } fclose($header_file); fclose($content_file); ? -- curl_errno($ch) results a wrong error number and also curl_error($ch) contains broken strings. -- Steve -- Edit Bug report at: http://bugs.php.net/?id=11804edit=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-DEV] Bug #11083: buildconf Undefined macros Zend/ylwrap
From: [EMAIL PROTECTED] Operating system: i686-pc-linux-gnu PHP version: 4.0 Latest CVS (2001-05-24) PHP Bug Type: *Install and Config Bug description: buildconf Undefined macros Zend/ylwrap buildconf results on my suse 7.0 distribution: buildconf: checking installation... buildconf: autoconf version 2.13 (ok) buildconf: automake version 1.4 (ok) buildconf: libtool version 1.4 (ok) rebuilding Makefile templates automake: configure.in: installing `Zend/ylwrap' rebuilding configure autoconf: Undefined macros: ***BUG in Autoconf--please report*** AC_ZEND_BROKEN_SPRINTF ***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF ***BUG in Autoconf--please report*** AC_ZEND_BROKEN_SPRINTF ***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF ***BUG in Autoconf--please report*** AC_ZEND_BROKEN_SPRINTF ***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF ***BUG in Autoconf--please report*** AC_ZEND_BROKEN_SPRINTF ***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF ***BUG in Autoconf--please report*** AC_ZEND_BROKEN_SPRINTF ***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF ***BUG in Autoconf--please report*** AC_ZEND_BROKEN_SPRINTF ***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF ***BUG in Autoconf--please report*** AC_ZEND_BROKEN_SPRINTF ***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF ***BUG in Autoconf--please report*** AC_ZEND_BROKEN_SPRINTF ***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF configure.in:92:AC_AIX rebuilding acconfig.h rebuilding main/php_config.h.in --- a simple ./configure results: checking for type of readdir_r... POSIX checking whether to include debugging 2.13... ./configure: line 8085: syntax error near unexpected token `else' ./configure: line 8085: `else' --- here is my config GNU Bison version 1.28 flex version 2.5.4 glibc 2.1 -- Edit Bug report at: http://bugs.php.net/?id=11083edit=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]