[PHP-DEV] RE: Re: How do I register a constructor in PHP (C code)
I have write using the init but still do not work. Any other ideea. Best regards, Emanuel Dejanu -Original Message- From: Hansuck Jo [mailto:sizer@.php.net] Sent: Tuesday, September 25, 2001 6:31 PM To: [EMAIL PROTECTED] Subject: [PHP-DEV] Re: How do I register a constructor in PHP (C code) You use rt66clsss_init() instead of rt66class_contstructor(). may be, it's will work. :) Emanuel Dejanu wrote: I write an extension and I want to register a new class but I can not get my function to be registered as a constructor. ex: PHP_FUNCTION(rt66class_constructor); static zend_function_entry php_rt66class_class_functions[] = { PHP_FALIAS(RT66Class, rt66class_constructor, NULL) }; PHP_MINIT_FUNCTION(rt66util) { zend_class_entry rt66class_class_entry; INIT_CLASS_ENTRY(rt66class_class_entry, RT66Class, php_rt66class_class_functions); RT66Class_class_entry_ptr = zend_register_internal_class(rt66class_class_entry); return SUCCESS; } PHP_FUNCTION(rt66class_constructor) { ZEND_PUTS(RT66Class Contructor); } - ?php dl(myext.so); $myvar = RT66Class(); ? nothing appear on the screen. Please tell me how can I make it to work. Many thanks, Emanuel Dejanu -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 01, 2001 3:27 PM To: [EMAIL PROTECTED] Subject: Fwd: FW: [PHP-DEV] print_r -- Forwarded Message -- Subject: FW: [PHP-DEV] print_r Date: Wed, 1 Aug 2001 08:19:09 +0300 From: Emanuel Dejanu [EMAIL PROTECTED] Sorry to forward this to you but I really have problems in printing a doubled linked class. Can you take a look at the following message and give me an answer. Thanks, Emanuel Dejanu -Original Message- From: Emanuel Dejanu [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 31, 2001 9:22 AM To: [EMAIL PROTECTED] Subject: [PHP-DEV] print_r Hi, Is there a posibility to print an object but to not print some fields. If I use print_r he will print all variabiles from my object, but I want on variabile to not be printed. I do not want to write my own function. Ex. class Node { var $name; var $parent = '/' var $children = array(); function Node($name, $parent) { $this-parent = $parent; $this-name = $name; } } $rootNode = new Node('root', ''); array_push($rootNode-children, new Node('child1', $rootNode)); $child1Node = $rootNode-children[0]; array_push($child1Node-children, new Node('child1', $child1Node)); print_r($rootNode); will print make a recursivity. What will be nice is to allow that some variabiles to not be printed like this: class Node { var $name; var $__parent = '/' var $children = array(); function Node($name, $parent) { $this-__parent = $parent; $this-name = $name; } } . /* add the root and childrens */ print_r($rootNode); will print now the corret tree. Bellow you find the only modification that need to be done for this to work. Best regards, Emanuel Dejanu File: Zend/zend.c static void print_hash(HashTable *ht, int indent) { zval **tmp; char *string_key; HashPosition iterator; unsigned long num_key, str_len; int i, key_type; /** HERE */ for (i=0; iindent; i++) { ZEND_PUTS( ); } ZEND_PUTS((\n); indent += PRINT_ZVAL_INDENT; zend_hash_internal_pointer_reset_ex(ht, iterator); while (zend_hash_get_current_data_ex(ht, (void **) tmp, iterator) == SUCCESS) { / HERE **/ key_type = zend_hash_get_current_key_ex(ht, string_key, str_len, num_key, 0, iterator); if (key_type == HASH_KEY_IS_STRING) if (string_key[0] == '_' string_key[1] == '_') continue; /*** HERE **/ for (i=0; iindent; i++) { ZEND_PUTS( ); } ZEND_PUTS([); switch (key_type) { case HASH_KEY_IS_STRING: ZEND_PUTS(string_key); break; case HASH_KEY_IS_LONG: zend_printf(%ld,num_key); break; } ZEND_PUTS(] = ); zend_print_zval_r(*tmp, indent+PRINT_ZVAL_INDENT); ZEND_PUTS(\n); zend_hash_move_forward_ex(ht, iterator); } indent -= PRINT_ZVAL_INDENT; for (i=0; iindent; i++) { ZEND_PUTS( ); } ZEND_PUTS()\n); } -- 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] How do I register a constructor in PHP (C code)
I have put zend_class_entry variabiles global and still no success in having my constructor called. You PHP guru do not have any ideea what is the problem. Best regards, Emanuel Dejanu -Original Message- From: Jeff Hughes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 25, 2001 9:23 PM To: Emanuel Dejanu Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] How do I register a constructor in PHP (C code) I believe the problem you are having is that the zend_class_entry structure destroyed as you leave the scope of the MINIT function. This is definitely going to have undefined behavior. Move the zend_class_entry so that it is global and you should be good to go. Jeff Hughes [EMAIL PROTECTED] On Tue, Sep 25, 2001 at 05:12:37PM +0300, Emanuel Dejanu wrote: I write an extension and I want to register a new class but I can not get my function to be registered as a constructor. ex: PHP_FUNCTION(rt66class_constructor); static zend_function_entry php_rt66class_class_functions[] = { PHP_FALIAS(RT66Class, rt66class_constructor, NULL) }; PHP_MINIT_FUNCTION(rt66util) { zend_class_entry rt66class_class_entry; INIT_CLASS_ENTRY(rt66class_class_entry, RT66Class, php_rt66class_class_functions); RT66Class_class_entry_ptr = zend_register_internal_class(rt66class_class_entry); return SUCCESS; } PHP_FUNCTION(rt66class_constructor) { ZEND_PUTS(RT66Class Contructor); } - ?php dl(myext.so); $myvar = RT66Class(); ? nothing appear on the screen. Please tell me how can I make it to work. Many thanks, Emanuel Dejanu -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 01, 2001 3:27 PM To: [EMAIL PROTECTED] Subject: Fwd: FW: [PHP-DEV] print_r -- Forwarded Message -- Subject: FW: [PHP-DEV] print_r Date: Wed, 1 Aug 2001 08:19:09 +0300 From: Emanuel Dejanu [EMAIL PROTECTED] Sorry to forward this to you but I really have problems in printing a doubled linked class. Can you take a look at the following message and give me an answer. Thanks, Emanuel Dejanu -Original Message- From: Emanuel Dejanu [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 31, 2001 9:22 AM To: [EMAIL PROTECTED] Subject: [PHP-DEV] print_r Hi, Is there a posibility to print an object but to not print some fields. If I use print_r he will print all variabiles from my object, but I want on variabile to not be printed. I do not want to write my own function. Ex. class Node { var $name; var $parent = '/' var $children = array(); function Node($name, $parent) { $this-parent = $parent; $this-name = $name; } } $rootNode = new Node('root', ''); array_push($rootNode-children, new Node('child1', $rootNode)); $child1Node = $rootNode-children[0]; array_push($child1Node-children, new Node('child1', $child1Node)); print_r($rootNode); will print make a recursivity. What will be nice is to allow that some variabiles to not be printed like this: class Node { var $name; var $__parent = '/' var $children = array(); function Node($name, $parent) { $this-__parent = $parent; $this-name = $name; } } . /* add the root and childrens */ print_r($rootNode); will print now the corret tree. Bellow you find the only modification that need to be done for this to work. Best regards, Emanuel Dejanu File: Zend/zend.c static void print_hash(HashTable *ht, int indent) { zval **tmp; char *string_key; HashPosition iterator; unsigned long num_key, str_len; int i, key_type; /** HERE */ for (i=0; iindent; i++) { ZEND_PUTS( ); } ZEND_PUTS((\n); indent += PRINT_ZVAL_INDENT; zend_hash_internal_pointer_reset_ex(ht, iterator); while (zend_hash_get_current_data_ex(ht, (void **) tmp, iterator) == SUCCESS) { / HERE **/ key_type = zend_hash_get_current_key_ex(ht, string_key, str_len, num_key, 0, iterator); if (key_type == HASH_KEY_IS_STRING) if (string_key[0] == '_' string_key[1] == '_') continue; /*** HERE **/ for (i=0; iindent; i++) { ZEND_PUTS( ); } ZEND_PUTS([); switch (key_type) { case HASH_KEY_IS_STRING: ZEND_PUTS(string_key); break; case HASH_KEY_IS_LONG: zend_printf(%ld,num_key); break; }
Re: [PHP-DEV] [RFC] Versioning rules for PHP/Zend/PEAR/Extensions
At 09:12 PM 9/25/2001 +0200, Stig Sæther Bakken wrote: But just to get back to release frequency, I do think we release too seldom. There's a lot of process in place now, with a QA branch and all. I think this process is good, but it's congesting. At this point we're almost ready to start the 4.0.8 release before 4.0.7 is through the needle's eye. There's simply too much weight. For every extension we shake off, it the release process gets lighter, and some ISP sysadmins may even get their hair back. I disagree. It does seem annoying that when we finally release 4.0.7, 4.0.8 is pretty much ready for its own QA round but I thought about this a lot and I think it's better than the alternatives. It allows us to release a more stable version and it's not such a big deal because 4.0.8 will take a long time to finish QA anyway. Most people I talk to *don't* like having to upgrade every month or two. Even three month releases is relatively tight for them so I think the amount of releases we are doing right now is pretty good. Speaking of 4.0.7, I think it's time for RC3 and then a quick release :) Anyone have anything to commit before that? Andi -- 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] mod_php4 question...
We actually use the getcwd() result in order to support good error messages and include_once() and friends. It's a bit sucky that getcwd() is so slow on Solaris. On Linux it's extremely fast because it doesn't do a million chdir(..). I'm not that enthusiastic about changing the current behavior. Andi At 06:01 PM 9/25/2001 -0600, Andy Sautins wrote: I posted a previous message that, I must admit, was probably not that well thought out. I've looked a little further and I'm getting a better feel for what is going on, but I was wondering if someone in the know would be able to clarify. I'm using php with Apache. When I truss a simple file, I see the majority of the system calls in stat calls. It tracks down to a getcwd ( defined with VCWD_GETCWD ), which seems to do alot of I/O on solaris. Given that on a heavily loaded box, avoid that much I/O ( especially if it is just checking the same filepath that was checked previously), seems wasteful and can lead to high I/O waits. The call stack is something along the lines of: 1 send_php 2 zend_execute_scripts 3 zend_compile_file 4 complie_file 5 open_file_for_scanning 6 zend_fopen 7 php_fopen_wrapper_for_zend 8 php_fopen_wrapper 9 php_fopen_url_wrapper 10 php_fopen_with_path 11 php_fopen_and_set_opened_path 12 expand_filepath 13 vcwd_getcwd It seems to me that the path is available from apache ( either through the request structure or as part of the filename ). My question is, what would be the harm in doing something like have mod_php4.c open the file and set file_handle-handle.fp and close it ( or some other mechanism from having to call the whole php_fopen_and_set_opened_path ) to avoid the getcwd? Any thoughts? I'll do some more testing, but I wanted to get some expert feedback before I went too far down the wrong path. Thanks Andy -- 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: Re: How do I register a constructor in PHP (C code)
hm... ZEND_* functions instead PHP_* functions. This is sample code..(of course. You must include zend.h etc..) static zend_function_entry scl_functions[] = { {NULL, NULL, NULL} }; zend_module_entry scl_module_entry = { scl, scl_functions, ZEND_MINIT(scl), NULL, NULL, NULL, ZEND_MINFO(scl), STANDARD_MODULE_PROPERTIES }; zend_class_entry scl_object_class_entry; zend_function_entry scl_object_functions[] = { ZEND_FALIAS(object, object_init, NULL) {NULL, NULL, NULL} }; ZEND_FUNCTION(object_init) { zval *obj; obj = getThis(); if (obj) { if (ZEND_NUM_ARGS() != 0) { ZEND_WRONG_PARAM_COUNT(); } zend_printf(Object Create.); RETURN_TRUE; } else { zend_error(E_WARNING, This can't excute in Class Method); RETURN_FALSE; } } ZEND_MINIT_FUNCTION(scl) { INIT_CLASS_ENTRY(scl_object_class_entry, object, scl_object_functions); zend_register_internal_class(scl_object_class_entry); } Emanuel Dejanu wrote: I have write using the init but still do not work. Any other ideea. Best regards, Emanuel Dejanu -Original Message- From: Hansuck Jo [mailto:sizer@.php.net] Sent: Tuesday, September 25, 2001 6:31 PM To: [EMAIL PROTECTED] Subject: [PHP-DEV] Re: How do I register a constructor in PHP (C code) You use rt66clsss_init() instead of rt66class_contstructor(). may be, it's will work. :) Emanuel Dejanu wrote: I write an extension and I want to register a new class but I can not get my function to be registered as a constructor. ex: PHP_FUNCTION(rt66class_constructor); static zend_function_entry php_rt66class_class_functions[] = { PHP_FALIAS(RT66Class, rt66class_constructor, NULL) }; PHP_MINIT_FUNCTION(rt66util) { zend_class_entry rt66class_class_entry; INIT_CLASS_ENTRY(rt66class_class_entry, RT66Class, php_rt66class_class_functions); RT66Class_class_entry_ptr = zend_register_internal_class(rt66class_class_entry); return SUCCESS; } PHP_FUNCTION(rt66class_constructor) { ZEND_PUTS(RT66Class Contructor); } - ?php dl(myext.so); $myvar = RT66Class(); ? nothing appear on the screen. Please tell me how can I make it to work. Many thanks, Emanuel Dejanu -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 01, 2001 3:27 PM To: [EMAIL PROTECTED] Subject: Fwd: FW: [PHP-DEV] print_r -- Forwarded Message -- Subject: FW: [PHP-DEV] print_r Date: Wed, 1 Aug 2001 08:19:09 +0300 From: Emanuel Dejanu [EMAIL PROTECTED] Sorry to forward this to you but I really have problems in printing a doubled linked class. Can you take a look at the following message and give me an answer. Thanks, Emanuel Dejanu -Original Message- From: Emanuel Dejanu [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 31, 2001 9:22 AM To: [EMAIL PROTECTED] Subject: [PHP-DEV] print_r Hi, Is there a posibility to print an object but to not print some fields. If I use print_r he will print all variabiles from my object, but I want on variabile to not be printed. I do not want to write my own function. Ex. class Node { var $name; var $parent = '/' var $children = array(); function Node($name, $parent) { $this-parent = $parent; $this-name = $name; } } $rootNode = new Node('root', ''); array_push($rootNode-children, new Node('child1', $rootNode)); $child1Node = $rootNode-children[0]; array_push($child1Node-children, new Node('child1', $child1Node)); print_r($rootNode); will print make a recursivity. What will be nice is to allow that some variabiles to not be printed like this: class Node { var $name; var $__parent = '/' var $children = array(); function Node($name, $parent) { $this-__parent = $parent; $this-name = $name; } } . /* add the root and childrens */ print_r($rootNode); will print now the corret tree. Bellow you find the only modification that need to be done for this to work. Best regards, Emanuel Dejanu File: Zend/zend.c static void print_hash(HashTable *ht, int indent) { zval **tmp; char *string_key; HashPosition iterator; unsigned long num_key, str_len; int i, key_type; /** HERE */ for (i=0; iindent; i++) { ZEND_PUTS( ); } ZEND_PUTS((\n); indent += PRINT_ZVAL_INDENT; zend_hash_internal_pointer_reset_ex(ht, iterator); while (zend_hash_get_current_data_ex(ht, (void **) tmp, iterator) == SUCCESS) { / HERE **/ key_type = zend_hash_get_current_key_ex(ht, string_key, str_len, num_key, 0, iterator); if (key_type == HASH_KEY_IS_STRING) if (string_key[0]
[PHP-DEV] Bug #13446: Compile fails in Zend with NSAPI and GCC 3
From: [EMAIL PROTECTED] Operating system: Solaris 2.6/7/8 PHP version: 4.0.6 PHP Bug Type: Compile Failure Bug description: Compile fails in Zend with NSAPI and GCC 3 Compile fails with STL errors in the Zend parser. Using Solaris OS various versions. Using GCC 3 from ftp.sunfreeware.com. Saw a similar bug report for Apache 2 so I suppose this is a general issue for threaded web servers with Gcc 3. Problem is fixed in CVS. -- Edit bug report at: http://bugs.php.net/?id=13446edit=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 #13446 Updated: Compile fails in Zend with NSAPI and GCC 3
ID: 13446 Updated by: derick Reported By: [EMAIL PROTECTED] Old Status: Open Status: Closed Bug Type: Compile Failure Operating System: Solaris 2.6/7/8 PHP Version: 4.0.6 New Comment: If it's fixed in CVS, it is not a bug anymore. Closing... Derick Previous Comments: [2001-09-26 04:12:38] [EMAIL PROTECTED] Compile fails with STL errors in the Zend parser. Using Solaris OS various versions. Using GCC 3 from ftp.sunfreeware.com. Saw a similar bug report for Apache 2 so I suppose this is a general issue for threaded web servers with Gcc 3. Problem is fixed in CVS. Edit this bug report at http://bugs.php.net/?id=13446edit=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]
Re: [PHP-DEV] [RFC] Versioning rules for PHP/Zend/PEAR/Extensions
Andi Gutmans wrote: Speaking of 4.0.7, I think it's time for RC3 and then a quick release :) Anyone have anything to commit before that? yes, a bunch of ext/dbplus stuff i won't touch the config.m4 and it does not interfere with other extensions afaik i'm the only one to test it anyway and what is in the RC branch is not really useable yet so things can only improve (there will be an article in the german LinuxEnterprise magazine early in october and i would like to have the extension working at least for it's core functionality as described in the article so that those readers who eventually might want to play with it can use a release and do not have to get a CVS version -- 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: Re: How do I register a constructor in PHP (C code)
tr(/PHP_/ZEND_/) and still do not work. I have compared your example with my code and no difference found on it. Have you any other suggestions. I really need the constructor and I can not do it. Best regards, Emanuel Dejanu P.S. I run Apache 1.3.20 PHP 4.0.6 Linux 2.2.18-SMP SuSE 7.1 on Dual Pentium III 800 MHz (712 MB RAM) machine. -Original Message- From: Hansuck Jo [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 26, 2001 11:02 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] RE: Re: How do I register a constructor in PHP (C code) hm... ZEND_* functions instead PHP_* functions. This is sample code..(of course. You must include zend.h etc..) static zend_function_entry scl_functions[] = { {NULL, NULL, NULL} }; zend_module_entry scl_module_entry = { scl, scl_functions, ZEND_MINIT(scl), NULL, NULL, NULL, ZEND_MINFO(scl), STANDARD_MODULE_PROPERTIES }; zend_class_entry scl_object_class_entry; zend_function_entry scl_object_functions[] = { ZEND_FALIAS(object, object_init, NULL) {NULL, NULL, NULL} }; ZEND_FUNCTION(object_init) { zval *obj; obj = getThis(); if (obj) { if (ZEND_NUM_ARGS() != 0) { ZEND_WRONG_PARAM_COUNT(); } zend_printf(Object Create.); RETURN_TRUE; } else { zend_error(E_WARNING, This can't excute in Class Method); RETURN_FALSE; } } ZEND_MINIT_FUNCTION(scl) { INIT_CLASS_ENTRY(scl_object_class_entry, object, scl_object_functions); zend_register_internal_class(scl_object_class_entry); } Emanuel Dejanu wrote: I have write using the init but still do not work. Any other ideea. Best regards, Emanuel Dejanu -Original Message- From: Hansuck Jo [mailto:sizer@.php.net] Sent: Tuesday, September 25, 2001 6:31 PM To: [EMAIL PROTECTED] Subject: [PHP-DEV] Re: How do I register a constructor in PHP (C code) You use rt66clsss_init() instead of rt66class_contstructor(). may be, it's will work. :) Emanuel Dejanu wrote: I write an extension and I want to register a new class but I can not get my function to be registered as a constructor. ex: PHP_FUNCTION(rt66class_constructor); static zend_function_entry php_rt66class_class_functions[] = { PHP_FALIAS(RT66Class, rt66class_constructor, NULL) }; PHP_MINIT_FUNCTION(rt66util) { zend_class_entry rt66class_class_entry; INIT_CLASS_ENTRY(rt66class_class_entry, RT66Class, php_rt66class_class_functions); RT66Class_class_entry_ptr = zend_register_internal_class(rt66class_class_entry); return SUCCESS; } PHP_FUNCTION(rt66class_constructor) { ZEND_PUTS(RT66Class Contructor); } - ?php dl(myext.so); $myvar = RT66Class(); ? nothing appear on the screen. Please tell me how can I make it to work. Many thanks, Emanuel Dejanu -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 01, 2001 3:27 PM To: [EMAIL PROTECTED] Subject: Fwd: FW: [PHP-DEV] print_r -- Forwarded Message -- Subject: FW: [PHP-DEV] print_r Date: Wed, 1 Aug 2001 08:19:09 +0300 From: Emanuel Dejanu [EMAIL PROTECTED] Sorry to forward this to you but I really have problems in printing a doubled linked class. Can you take a look at the following message and give me an answer. Thanks, Emanuel Dejanu -Original Message- From: Emanuel Dejanu [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 31, 2001 9:22 AM To: [EMAIL PROTECTED] Subject: [PHP-DEV] print_r Hi, Is there a posibility to print an object but to not print some fields. If I use print_r he will print all variabiles from my object, but I want on variabile to not be printed. I do not want to write my own function. Ex. class Node { var $name; var $parent = '/' var $children = array(); function Node($name, $parent) { $this-parent = $parent; $this-name = $name; } } $rootNode = new Node('root', ''); array_push($rootNode-children, new Node('child1', $rootNode)); $child1Node = $rootNode-children[0]; array_push($child1Node-children, new Node('child1', $child1Node)); print_r($rootNode); will print make a recursivity. What will be nice is to allow that some variabiles to not be printed like this: class Node { var $name; var $__parent = '/' var $children = array(); function Node($name, $parent) { $this-__parent = $parent; $this-name = $name; } } . /* add the root and childrens */ print_r($rootNode); will print now the corret tree. Bellow you find the only modification that need to be done for this to work. Best regards, Emanuel
[PHP-DEV] Bug #13447: Security not blocking unlink delete functions
From: [EMAIL PROTECTED] Operating system: windows 2000 PHP version: 4.0.6 PHP Bug Type: Filesystem function related Bug description: Security not blocking unlink delete functions Running PHP in Apache using the MODULE configuration. Apache/1.3.14 (Win32) PHP/4.0.6 mod_ssl/2.7.2 OpenSSL/0.9.6 running. With the following: php_admin_flag safe_mode on php_admin_value open_basedir c:/pr php_admin_value doc_root c:/pr php_admin_value user_dir c:/pr IT SUCCESSFULLY blocks reads in directories other than c:/pr, but it DOES NOT block unlinks (file deletion) outside. So... My users cannot read other users files, however they can delete anything they want. Very strange. I DO NOT care about it checking UIDs as I do not create different Users for each USER... I want to be able to restrict access to a directory and call it good. ?php echo Peace!; //unlink (c:/test.txt);// UNLINK WORKS (This should fail) $fp = fopen (c:/test.txt, r); // FAILS SECURITY CHECK echo Dude10; ? -- Edit bug report at: http://bugs.php.net/?id=13447edit=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]
Re: [PHP-DEV] [RFC] Versioning rules for PHP/Zend/PEAR/Extensions
[Andi Gutmans [EMAIL PROTECTED]] At 09:12 PM 9/25/2001 +0200, Stig Sæther Bakken wrote: But just to get back to release frequency, I do think we release too seldom. There's a lot of process in place now, with a QA branch and all. I think this process is good, but it's congesting. At this point we're almost ready to start the 4.0.8 release before 4.0.7 is through the needle's eye. There's simply too much weight. For every extension we shake off, it the release process gets lighter, and some ISP sysadmins may even get their hair back. I disagree. It does seem annoying that when we finally release 4.0.7, 4.0.8 is pretty much ready for its own QA round but I thought about this a lot and I think it's better than the alternatives. It allows us to release a more stable version and it's not such a big deal because 4.0.8 will take a long time to finish QA anyway. Most people I talk to *don't* like having to upgrade every month or two. Even three month releases is relatively tight for them so I think the amount of releases we are doing right now is pretty good. Okay, I can agree that given the current situation, three months is a reasonable release frequency. What I'm after is not really having a new PHP release every two weeks. Often I'm waiting for a new release because of a new/changed/bugfixed extension that comes with it, and in these cases it's frustrating having to wait for three months. The start of this thread was a versioning scheme, and that's still what this is all about, because it's required to solve the problem I'm describing above. - Stig -- Stig Sæther Bakken [EMAIL PROTECTED] Fast Search Transfer ASA, Trondheim, Norway -- 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] zip ext compile problem
Hi, in the current cvs tree the zip extension have problems to compile with zziplib 0.10.27 zip.c: In function `zif_zip_entry_open': zip.c:265: parse error before `else' zip.c: At top level: zip.c:266: parse error before `return' zip.c: In function `zif_zip_entry_read': zip.c:290: parse error before `else' zip.c:291: `__l' undeclared (first use in this function) zip.c:291: (Each undeclared identifier is reported only once zip.c:291: for each function it appears in.) zip.c:291: `__s' undeclared (first use in this function) zip.c: At top level: zip.c:291: parse error before `return' Regards, Holger -- 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] How do I register a constructor in PHP (C code)
Another thing I noticed is that you didn't end the zend_function_entry list with { NULL, NULL, NULL }. That could cause some problems too. Jeff On Wed, Sep 26, 2001 at 09:55:35AM +0300, Emanuel Dejanu wrote: I have put zend_class_entry variabiles global and still no success in having my constructor called. You PHP guru do not have any ideea what is the problem. Best regards, Emanuel Dejanu -Original Message- From: Jeff Hughes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 25, 2001 9:23 PM To: Emanuel Dejanu Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] How do I register a constructor in PHP (C code) I believe the problem you are having is that the zend_class_entry structure destroyed as you leave the scope of the MINIT function. This is definitely going to have undefined behavior. Move the zend_class_entry so that it is global and you should be good to go. Jeff Hughes [EMAIL PROTECTED] On Tue, Sep 25, 2001 at 05:12:37PM +0300, Emanuel Dejanu wrote: I write an extension and I want to register a new class but I can not get my function to be registered as a constructor. ex: PHP_FUNCTION(rt66class_constructor); static zend_function_entry php_rt66class_class_functions[] = { PHP_FALIAS(RT66Class, rt66class_constructor, NULL) }; PHP_MINIT_FUNCTION(rt66util) { zend_class_entry rt66class_class_entry; INIT_CLASS_ENTRY(rt66class_class_entry, RT66Class, php_rt66class_class_functions); RT66Class_class_entry_ptr = zend_register_internal_class(rt66class_class_entry); return SUCCESS; } PHP_FUNCTION(rt66class_constructor) { ZEND_PUTS(RT66Class Contructor); } - ?php dl(myext.so); $myvar = RT66Class(); ? nothing appear on the screen. Please tell me how can I make it to work. Many thanks, Emanuel Dejanu -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 01, 2001 3:27 PM To: [EMAIL PROTECTED] Subject: Fwd: FW: [PHP-DEV] print_r -- Forwarded Message -- Subject: FW: [PHP-DEV] print_r Date: Wed, 1 Aug 2001 08:19:09 +0300 From: Emanuel Dejanu [EMAIL PROTECTED] Sorry to forward this to you but I really have problems in printing a doubled linked class. Can you take a look at the following message and give me an answer. Thanks, Emanuel Dejanu -Original Message- From: Emanuel Dejanu [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 31, 2001 9:22 AM To: [EMAIL PROTECTED] Subject: [PHP-DEV] print_r Hi, Is there a posibility to print an object but to not print some fields. If I use print_r he will print all variabiles from my object, but I want on variabile to not be printed. I do not want to write my own function. Ex. class Node { var $name; var $parent = '/' var $children = array(); function Node($name, $parent) { $this-parent = $parent; $this-name = $name; } } $rootNode = new Node('root', ''); array_push($rootNode-children, new Node('child1', $rootNode)); $child1Node = $rootNode-children[0]; array_push($child1Node-children, new Node('child1', $child1Node)); print_r($rootNode); will print make a recursivity. What will be nice is to allow that some variabiles to not be printed like this: class Node { var $name; var $__parent = '/' var $children = array(); function Node($name, $parent) { $this-__parent = $parent; $this-name = $name; } } . /* add the root and childrens */ print_r($rootNode); will print now the corret tree. Bellow you find the only modification that need to be done for this to work. Best regards, Emanuel Dejanu File: Zend/zend.c static void print_hash(HashTable *ht, int indent) { zval **tmp; char *string_key; HashPosition iterator; unsigned long num_key, str_len; int i, key_type; /** HERE */ for (i=0; iindent; i++) { ZEND_PUTS( ); } ZEND_PUTS((\n); indent += PRINT_ZVAL_INDENT; zend_hash_internal_pointer_reset_ex(ht, iterator); while (zend_hash_get_current_data_ex(ht, (void **) tmp, iterator) == SUCCESS) { / HERE **/ key_type = zend_hash_get_current_key_ex(ht, string_key, str_len, num_key, 0, iterator); if (key_type == HASH_KEY_IS_STRING)
[PHP-DEV] Re: zip ext compile problem
Fixed - Original Message - From: Holger Schopohl [EMAIL PROTECTED] Newsgroups: php.dev To: [EMAIL PROTECTED] Sent: Wednesday, September 26, 2001 10:51 AM Subject: zip ext compile problem Hi, in the current cvs tree the zip extension have problems to compile with zziplib 0.10.27 zip.c: In function `zif_zip_entry_open': zip.c:265: parse error before `else' zip.c: At top level: zip.c:266: parse error before `return' zip.c: In function `zif_zip_entry_read': zip.c:290: parse error before `else' zip.c:291: `__l' undeclared (first use in this function) zip.c:291: (Each undeclared identifier is reported only once zip.c:291: for each function it appears in.) zip.c:291: `__s' undeclared (first use in this function) zip.c: At top level: zip.c:291: parse error before `return' Regards, Holger -- 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] How do I register a constructor in PHP (C code)
I have them in my code. I have miss them in my e-mail, sorry. Have somebody an real example that is working, really checked because I have really check all the sources and found anything!!! Thanks, Emanuel Dejanu -Original Message- From: Jeff Hughes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 26, 2001 11:54 AM To: Emanuel Dejanu Cc: 'Jeff Hughes'; [EMAIL PROTECTED] Subject: Re: [PHP-DEV] How do I register a constructor in PHP (C code) Another thing I noticed is that you didn't end the zend_function_entry list with { NULL, NULL, NULL }. That could cause some problems too. Jeff On Wed, Sep 26, 2001 at 09:55:35AM +0300, Emanuel Dejanu wrote: I have put zend_class_entry variabiles global and still no success in having my constructor called. You PHP guru do not have any ideea what is the problem. Best regards, Emanuel Dejanu -Original Message- From: Jeff Hughes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 25, 2001 9:23 PM To: Emanuel Dejanu Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] How do I register a constructor in PHP (C code) I believe the problem you are having is that the zend_class_entry structure destroyed as you leave the scope of the MINIT function. This is definitely going to have undefined behavior. Move the zend_class_entry so that it is global and you should be good to go. Jeff Hughes [EMAIL PROTECTED] On Tue, Sep 25, 2001 at 05:12:37PM +0300, Emanuel Dejanu wrote: I write an extension and I want to register a new class but I can not get my function to be registered as a constructor. ex: PHP_FUNCTION(rt66class_constructor); static zend_function_entry php_rt66class_class_functions[] = { PHP_FALIAS(RT66Class, rt66class_constructor, NULL) }; PHP_MINIT_FUNCTION(rt66util) { zend_class_entry rt66class_class_entry; INIT_CLASS_ENTRY(rt66class_class_entry, RT66Class, php_rt66class_class_functions); RT66Class_class_entry_ptr = zend_register_internal_class(rt66class_class_entry); return SUCCESS; } PHP_FUNCTION(rt66class_constructor) { ZEND_PUTS(RT66Class Contructor); } - ?php dl(myext.so); $myvar = RT66Class(); ? nothing appear on the screen. Please tell me how can I make it to work. Many thanks, Emanuel Dejanu -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 01, 2001 3:27 PM To: [EMAIL PROTECTED] Subject: Fwd: FW: [PHP-DEV] print_r -- Forwarded Message -- Subject: FW: [PHP-DEV] print_r Date: Wed, 1 Aug 2001 08:19:09 +0300 From: Emanuel Dejanu [EMAIL PROTECTED] Sorry to forward this to you but I really have problems in printing a doubled linked class. Can you take a look at the following message and give me an answer. Thanks, Emanuel Dejanu -Original Message- From: Emanuel Dejanu [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 31, 2001 9:22 AM To: [EMAIL PROTECTED] Subject: [PHP-DEV] print_r Hi, Is there a posibility to print an object but to not print some fields. If I use print_r he will print all variabiles from my object, but I want on variabile to not be printed. I do not want to write my own function. Ex. class Node { var $name; var $parent = '/' var $children = array(); function Node($name, $parent) { $this-parent = $parent; $this-name = $name; } } $rootNode = new Node('root', ''); array_push($rootNode-children, new Node('child1', $rootNode)); $child1Node = $rootNode-children[0]; array_push($child1Node-children, new Node('child1', $child1Node)); print_r($rootNode); will print make a recursivity. What will be nice is to allow that some variabiles to not be printed like this: class Node { var $name; var $__parent = '/' var $children = array(); function Node($name, $parent) { $this-__parent = $parent; $this-name = $name; } } . /* add the root and childrens */ print_r($rootNode); will print now the corret tree. Bellow you find the only modification that need to be done for this to work. Best regards, Emanuel Dejanu File: Zend/zend.c static void print_hash(HashTable *ht, int indent) { zval **tmp; char *string_key; HashPosition
Re: [PHP-DEV] Bug in autoconf report
Jeroen van Wolffelaar wrote: Yes, retrieving the whole CVS again takes quite some time again... what's the command to clean all files that are not from CVS, so that I've got a really clean tree again? make clean / make distclean? (But they don't yet work before you run configure...) So you think libtool is mal-installed? Could be possible... had this once and manualy removing php4/aclocal.m4 solved it -- 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] How do I register a constructor in PHP (C code)
On Wed, Sep 26, 2001 at 12:13:36PM +0300, Emanuel Dejanu wrote : I have them in my code. I have miss them in my e-mail, sorry. Have somebody an real example that is working, really checked because I have really check all the sources and found anything!!! Maybe you can find useful information when looking at the PHP-GTK extension because its creates classes with constructors. - Markus -- 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 #13448: The recode_string() function doesn't work.
From: [EMAIL PROTECTED] Operating system: PHP version: 4.0.5 PHP Bug Type: Unknown/Other Function Bug description: The recode_string() function doesn't work. The recode_string() function doesn't work. -- Edit bug report at: http://bugs.php.net/?id=13448edit=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 #13448 Updated: The recode_string() function doesn't work.
ID: 13448 Updated by: derick Reported By: [EMAIL PROTECTED] Old Status: Open Status: Feedback Bug Type: Unknown/Other Function Operating System: PHP Version: 4.0.5 New Comment: What does not work? Please add a short script so that we can check what goes wrong. Derick Previous Comments: [2001-09-26 06:41:35] [EMAIL PROTECTED] The recode_string() function doesn't work. Edit this bug report at http://bugs.php.net/?id=13448edit=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 #13448 Updated: The recode_string() function doesn't work.
ID: 13448 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Status: Feedback Status: Open Bug Type: Unknown/Other Function Operating System: PHP Version: 4.0.5 New Comment: The parser say's: Call to undefined function: recode_string() in ... . So, is the function not implemented? Previous Comments: [2001-09-26 06:48:52] [EMAIL PROTECTED] What does not work? Please add a short script so that we can check what goes wrong. Derick [2001-09-26 06:41:35] [EMAIL PROTECTED] The recode_string() function doesn't work. Edit this bug report at http://bugs.php.net/?id=13448edit=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 #13448 Updated: The recode_string() function doesn't work.
ID: 13448 Updated by: mfischer Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: Unknown/Other Function Operating System: PHP Version: 4.0.5 New Comment: You haven't compiled your php version with support for recode. It depends on an external librecode library. Next time, please read the do's and don'ts and ask such question at [EMAIL PROTECTED] No bug - bogusified. - Markus Previous Comments: [2001-09-26 06:51:15] [EMAIL PROTECTED] The parser say's: Call to undefined function: recode_string() in ... . So, is the function not implemented? [2001-09-26 06:48:52] [EMAIL PROTECTED] What does not work? Please add a short script so that we can check what goes wrong. Derick [2001-09-26 06:41:35] [EMAIL PROTECTED] The recode_string() function doesn't work. Edit this bug report at http://bugs.php.net/?id=13448edit=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]
RE: [PHP-DEV] RE: Re: How do I register a constructor in PHP (C code)
Thank you for the example. Is working. I was figure out what was the problem: INIT_CLASS_ENTRY(rt66class_class_entry, RT66Class, /* here */ php_rt66class_class_functions); writing RT66Class do not work, but writing rt66class is working!!! Many thanks for your help, Emanuel Dejanu Writing an PHP extension is a real adventure. P.S. I also write very pour english so sorry for my mistakes. -Original Message- From: Hansuck Jo [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 26, 2001 1:04 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] RE: Re: How do I register a constructor in PHP (C code) Hm.. attachement file is my full source.. To compile: tar xzf scl.tgz mv scl any_path/php-4.0.6/ext cd php-4.0.6 rm configure config.cache ./buildconf ./confgure --with-scl make To Test: ./php -q ext/scl/scl.php Testing Results: Object Created. Subojbect Created. PS. I can't speak English... ^^;; but I can readonly English... (You understand?? ^^;;) PS. I have 64M DRAM cylix 166MHz.. TT PHP 4.0.6, Wow-Linux 7.1 (Redhat 7.1 compat...) No Apache.. (I compile CGI mode) Emanuel Dejanu wrote: tr(/PHP_/ZEND_/) and still do not work. I have compared your example with my code and no difference found on it. Have you any other suggestions. I really need the constructor and I can not do it. Best regards, Emanuel Dejanu P.S. I run Apache 1.3.20 PHP 4.0.6 Linux 2.2.18-SMP SuSE 7.1 on Dual Pentium III 800 MHz (712 MB RAM) machine. -Original Message- From: Hansuck Jo [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 26, 2001 11:02 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] RE: Re: How do I register a constructor in PHP (C code) hm... ZEND_* functions instead PHP_* functions. This is sample code..(of course. You must include zend.h etc..) static zend_function_entry scl_functions[] = { {NULL, NULL, NULL} }; zend_module_entry scl_module_entry = { scl, scl_functions, ZEND_MINIT(scl), NULL, NULL, NULL, ZEND_MINFO(scl), STANDARD_MODULE_PROPERTIES }; zend_class_entry scl_object_class_entry; zend_function_entry scl_object_functions[] = { ZEND_FALIAS(object, object_init, NULL) {NULL, NULL, NULL} }; ZEND_FUNCTION(object_init) { zval *obj; obj = getThis(); if (obj) { if (ZEND_NUM_ARGS() != 0) { ZEND_WRONG_PARAM_COUNT(); } zend_printf(Object Create.); RETURN_TRUE; } else { zend_error(E_WARNING, This can't excute in Class Method); RETURN_FALSE; } } ZEND_MINIT_FUNCTION(scl) { INIT_CLASS_ENTRY(scl_object_class_entry, object, scl_object_functions); zend_register_internal_class(scl_object_class_entry); } Emanuel Dejanu wrote: I have write using the init but still do not work. Any other ideea. Best regards, Emanuel Dejanu -Original Message- From: Hansuck Jo [mailto:sizer@.php.net] Sent: Tuesday, September 25, 2001 6:31 PM To: [EMAIL PROTECTED] Subject: [PHP-DEV] Re: How do I register a constructor in PHP (C code) You use rt66clsss_init() instead of rt66class_contstructor(). may be, it's will work. :) Emanuel Dejanu wrote: I write an extension and I want to register a new class but I can not get my function to be registered as a constructor. ex: PHP_FUNCTION(rt66class_constructor); static zend_function_entry php_rt66class_class_functions[] = { PHP_FALIAS(RT66Class, rt66class_constructor, NULL) }; PHP_MINIT_FUNCTION(rt66util) { zend_class_entry rt66class_class_entry; INIT_CLASS_ENTRY(rt66class_class_entry, RT66Class, php_rt66class_class_functions); RT66Class_class_entry_ptr = zend_register_internal_class(rt66class_class_entry); return SUCCESS; } PHP_FUNCTION(rt66class_constructor) { ZEND_PUTS(RT66Class Contructor); } - ?php dl(myext.so); $myvar = RT66Class(); ? nothing appear on the screen. Please tell me how can I make it to work. Many thanks, Emanuel Dejanu -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 01, 2001 3:27 PM To: [EMAIL PROTECTED] Subject: Fwd: FW: [PHP-DEV] print_r -- Forwarded Message -- Subject: FW: [PHP-DEV] print_r Date: Wed, 1 Aug 2001 08:19:09 +0300 From: Emanuel Dejanu [EMAIL PROTECTED] Sorry to forward this to you but I really have problems in printing a doubled linked class. Can you take a look at the following message and give me an answer. Thanks, Emanuel Dejanu -Original Message- From: Emanuel Dejanu [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 31, 2001 9:22 AM To: [EMAIL PROTECTED] Subject: [PHP-DEV] print_r Hi, Is there a posibility to print an object but to not print some
Re: [PHP-DEV] [RFC] Versioning rules for PHP/Zend/PEAR/Extensions
At 10:48 AM 9/26/2001 +0200, Stig Sæther Bakken wrote: [Andi Gutmans [EMAIL PROTECTED]] At 09:12 PM 9/25/2001 +0200, Stig Sæther Bakken wrote: But just to get back to release frequency, I do think we release too seldom. There's a lot of process in place now, with a QA branch and all. I think this process is good, but it's congesting. At this point we're almost ready to start the 4.0.8 release before 4.0.7 is through the needle's eye. There's simply too much weight. For every extension we shake off, it the release process gets lighter, and some ISP sysadmins may even get their hair back. I disagree. It does seem annoying that when we finally release 4.0.7, 4.0.8 is pretty much ready for its own QA round but I thought about this a lot and I think it's better than the alternatives. It allows us to release a more stable version and it's not such a big deal because 4.0.8 will take a long time to finish QA anyway. Most people I talk to *don't* like having to upgrade every month or two. Even three month releases is relatively tight for them so I think the amount of releases we are doing right now is pretty good. Okay, I can agree that given the current situation, three months is a reasonable release frequency. What I'm after is not really having a new PHP release every two weeks. Often I'm waiting for a new release because of a new/changed/bugfixed extension that comes with it, and in these cases it's frustrating having to wait for three months. The start of this thread was a versioning scheme, and that's still what this is all about, because it's required to solve the problem I'm describing above. I think the key still lies in creating a repository for C extensions where each extension can have its own release cycle. Anndi -- 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 #13449: php.net: search bug
From: [EMAIL PROTECTED] Operating system: mac os 9.1 PHP version: 4.0.6 PHP Bug Type: Unknown/Other Function Bug description: php.net: search bug Searching php.net and got this..:: Displaying results to ht://Dig error next page --- - Unable to read word database file '/local/htdig/db/db.words.db' --- - Did you run htmerge? --- - --- - --- - Displaying results to ht://Dig error -- Edit bug report at: http://bugs.php.net/?id=13449edit=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] Re: zip ext compile problem
In article 00d101c1466a$ad962320$040a@giga, [EMAIL PROTECTED] says... Fixed Hmm, i have even now: zip.c: In function `zif_zip_entry_open': zip.c:263: warning: assignment makes integer from pointer without a cast zip.c: In function `zif_zip_entry_read': zip.c:287: parse error before `else' zip.c:288: `__l' undeclared (first use in this function) zip.c:288: (Each undeclared identifier is reported only once zip.c:288: for each function it appears in.) zip.c:288: `__s' undeclared (first use in this function) zip.c: At top level: zip.c:288: parse error before `return' -- 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: zip ext compile problem
Hello Holger, fixed now. Oh Jeroen, you did test this commit too ofcourse...? regards, Derick On Wed, 26 Sep 2001, Holger Schopohl wrote: In article 00d101c1466a$ad962320$040a@giga, [EMAIL PROTECTED] says... Fixed Hmm, i have even now: zip.c: In function `zif_zip_entry_open': zip.c:263: warning: assignment makes integer from pointer without a cast zip.c: In function `zif_zip_entry_read': zip.c:287: parse error before `else' zip.c:288: `__l' undeclared (first use in this function) zip.c:288: (Each undeclared identifier is reported only once zip.c:288: for each function it appears in.) zip.c:288: `__s' undeclared (first use in this function) zip.c: At top level: zip.c:288: parse error before `return' -- 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] Derick Rethans - PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED] SRM: Site Resource Manager - www.vl-srm.net - -- 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 #11658: COM passing by refrence
[2001-07-05 20:43:44] [EMAIL PROTECTED] but by definition every interface derived from IDispatch that should support references must expect VARIANT *var instead of anothertype *var . am i wrong ? [2001-07-23 13:50:06] [EMAIL PROTECTED] doesn't work with VBScript either and due to the provided typelib i assume that it is a user (component) error. -harald. Ive played around with this, and can tell you that a IDispatch interface can have ( pass by ref ) args that are of any type ( BSTR *, long *, etc ). These can be accesed without using a typelib from both VBScript and Perl but not php. For example, given an interface like this HRESULT test( [ out, ref ] unsigned char *n ); I can call that from PERL like use Win32::OLE; use Win32::OLE::Variant; $obj = Win32::OLE-new( comobjectname ); $n = Variant( VT_UI1 | VT_BYREF, 0 ); $obj-test( $n ); and in VBScript its called like this var obj = Server.CreateObject( comobjectname ) var n = 0 obj.test( n ) you dont need to have 'n' defined as a VARIANT, as in VBScript ALL variables are VARIANT's. Note that both these DONT use a typelib. Given that you would expect this to work in php $obj = new COM( comobjectname ); $n = new VARIANT( 0, VT_UI1 | VT_BYREF ); $obj-test( $n ); But you get this error: Warning: Invoke() failed: Type mismatch in filename on line line I understand from what Ive read that if the interface was defined with the arg as type VARIANT *, it would work. BUT if you wish to be able to support existing interfaces ( which dont use type VARIANT * ) and to provide the same 'level' of COM support as VBScript and Perl. You should be able to call the above interface with the ( above ) php code. Rich P.S. when is php 4.0.7 due out ? -- 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 #13450: Save method adds delimiters
From: [EMAIL PROTECTED] Operating system: Win 2000 PHP version: 4.0.6 PHP Bug Type: OCI8 related Bug description: Save method adds delimiters When using the lob-save method after posting data from a form php string delimiters are inserted before the lob is written to the database. String delimiters are not added to lobs written using lob-savefile. Surely this should be consistent between methods and, given that it is likely that Oracle needs to interface to more than PHP it should be removed from the save method. This doesn't seem to be documented either. EG: original post data - Welcome to Chez Moi becomes Welcome to \Chez Moi\ submit again and it becomes Welcome to \\\Chez Moi\\\ -- Edit bug report at: http://bugs.php.net/?id=13450edit=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 #13451: no images ;(
From: [EMAIL PROTECTED] Operating system: FreeBSD 4.4/Windows 98 SE PHP version: 4.0.6 PHP Bug Type: GD related Bug description: no images ;( after upgrade from version 4.0.4pl1 to 4.0.6, i cannot generate images ;( i don't know why: maybe i've missed some install or configuration steps, but i don't thing so. under windows when i did: php.exe image.php image.jpg, i've got an image, but when the same script is run from under apache - it doesn't work ;( -- Edit bug report at: http://bugs.php.net/?id=13451edit=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 #13451 Updated: no images ;(
ID: 13451 Updated by: derick Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: GD related Operating System: FreeBSD 4.4/Windows 98 SE PHP Version: 4.0.6 New Comment: Very likely not a bug, try asking on the [EMAIL PROTECTED] or [EMAIL PROTECTED] mailinglist for support questions. Derick Previous Comments: [2001-09-26 09:31:12] [EMAIL PROTECTED] after upgrade from version 4.0.4pl1 to 4.0.6, i cannot generate images ;( i don't know why: maybe i've missed some install or configuration steps, but i don't thing so. under windows when i did: php.exe image.php image.jpg, i've got an image, but when the same script is run from under apache - it doesn't work ;( Edit this bug report at http://bugs.php.net/?id=13451edit=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 #13452: compiling fails because of missing target to 'zend_lanuage_scanner.lo'
From: [EMAIL PROTECTED] Operating system: solaris 8 PHP version: 4.0CVS-2001-09-26 PHP Bug Type: Compile Failure Bug description: compiling fails because of missing target to 'zend_lanuage_scanner.lo' Hello Developers i installed all recommended files gcc, make, flex ... and so on i've got problems compiling php 4.0.x and the latest cvs september 26 configure with oracle and apxs works also tried with... ./configure --with-mysql --with-apxs trying to make i get this message: Making all in Zend /bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main -D_POSIX_PTHREAD_SEMANTICS -DEAPI -DMOD_PERL -DUSE_EXPAT -I../TSRM -g -O2 -prefer-pic -c zend_language_parser.c /usr/ccs/bin/as: /var/tmp/ccX4vxNG.s, line 15344: error: unknown opcode .subsection /usr/ccs/bin/as: /var/tmp/ccX4vxNG.s, line 15344: error: statement syntax /usr/ccs/bin/as: /var/tmp/ccX4vxNG.s, line 15690: error: unknown opcode .previous /usr/ccs/bin/as: /var/tmp/ccX4vxNG.s, line 15690: error: statement syntax *** Error code 1 make: Fatal error: Command failed for target `zend_language_parser.lo' Current working directory /export/home/netadmin/php4-200109260435/Zend *** Error code 1 make: Fatal error: Command failed for target `all-recursive' thanx Markus Decke -- Edit bug report at: http://bugs.php.net/?id=13452edit=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 #13452 Updated: compiling fails because of missing target to 'zend_lanuage_scanner.lo'
ID: 13452 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Compile Failure Operating System: solaris 8 PHP Version: 4.0CVS-2001-09-26 New Comment: used tools - autoconf 2.13 - automake 1.4 - bison 1.28 - flex 2.5.4a - gcc 3.0.1 - m4 1.4 - make 3.79.1 all for solaris 8 sparc thanks Markus Decke Previous Comments: [2001-09-26 09:50:11] [EMAIL PROTECTED] Hello Developers i installed all recommended files gcc, make, flex ... and so on i've got problems compiling php 4.0.x and the latest cvs september 26 configure with oracle and apxs works also tried with... ./configure --with-mysql --with-apxs trying to make i get this message: Making all in Zend /bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main -D_POSIX_PTHREAD_SEMANTICS -DEAPI -DMOD_PERL -DUSE_EXPAT -I../TSRM -g -O2 -prefer-pic -c zend_language_parser.c /usr/ccs/bin/as: /var/tmp/ccX4vxNG.s, line 15344: error: unknown opcode .subsection /usr/ccs/bin/as: /var/tmp/ccX4vxNG.s, line 15344: error: statement syntax /usr/ccs/bin/as: /var/tmp/ccX4vxNG.s, line 15690: error: unknown opcode .previous /usr/ccs/bin/as: /var/tmp/ccX4vxNG.s, line 15690: error: statement syntax *** Error code 1 make: Fatal error: Command failed for target `zend_language_parser.lo' Current working directory /export/home/netadmin/php4-200109260435/Zend *** Error code 1 make: Fatal error: Command failed for target `all-recursive' thanx Markus Decke Edit this bug report at http://bugs.php.net/?id=13452edit=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]
Re: [PHP-DEV] Bug #13452 Updated: compiling fails because of missingtarget to 'zend_lanuage_scanner.lo'
- gcc 3.0.1 GNU binutils might be required to support GCC-3.0.1 on your platform. - Sascha Experience IRCG http://schumann.cx/http://schumann.cx/ircg -- 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 #12678 Updated: gethostbyname returns hostname instead of adresss
ID: 12678 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Status: Duplicate Status: Open Bug Type: Network related Operating System: Linux 2.2.16-22 PHP Version: 4.0.6 New Comment: I'm having a hard time understanding how bug 13243 has anything to do with this bug. Previous Comments: [2001-09-25 16:47:42] [EMAIL PROTECTED] duplicate of 13243. (yes, that's a later bug. but it documents the problem more concisely.) [2001-08-10 13:06:52] [EMAIL PROTECTED] ?php $domain = www.yahoo.com; echo gethostbyname($domain) . br\n; print_r (gethostbynamel($domain)); ? www.yahoo.com Array () As I've thought about this some, I believe I started having problems with this only after upgrading to 4.06. It may have worked with 4.05 and I know it was working for me with 4.04plx Maybe this has something to do with my Linux Disto? I'm using RedHat 7.0 Thanks for your thoughts. For now, I'm just hard coding the ip address I need, so it's not like this is bogging me down. Adam [2001-08-09 21:51:12] [EMAIL PROTECTED] Could you please try gethostbynamel() with the same hostname? (these both work for me just fine..) --Jani [2001-08-09 16:13:52] [EMAIL PROTECTED] Can you access the internet from a browser? Yes, I can resolve any hostname using nslookup, host, etc. This machine accesses the internet just fine. ie. from the command line: [hydro@mail htdocs]$ host calc.intershipper.net calc.intershipper.net is a nickname for www.intershipper.net www.intershipper.net has address 216.58.153.11 [hydro@mail htdocs]$ but from PHP ?php echo gethostbyname (calc.intershipper.net); ? calc.intershipper.net Make sure your nameserver's are setup correctly. To the best of my knowledge, they are. [2001-08-09 16:02:33] [EMAIL PROTECTED] Can you access the internet from a browser? gethostbyname() returns the hostname when it can't find the IP (invalid address.) Make sure your nameserver's are setup correctly. 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=12678 Edit this bug report at http://bugs.php.net/?id=12678edit=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] PHP/Zend Virtual Machine Documentation
I'm playing around with translating PHP byte code to the Parrot Virtual Machine - the new virtual machine being designed and built for Perl 6 specifically with translation between languages in mind (there's already work being done on Python VM and JVM conversions). Many of the opcodes look like they'll be similar (I'm presuming that the only opcodes are the ones that are defined in zend_compile.h) but I'm looking for more documentation on what some of the rest actually do (ZEND_(BEGIN|END)_SILENCE for example), what sort of operands they take and the how the rest of the Zend virtual machine is made up (from the code it looks like it's stack based - Parrot is going to be register based which should make things interesting). Also I'm looking for the easiest way to get hold of some intermediate code or bytecode for simple scripts so that I can gradually start adding conversion routines. What's the best way to do this? Hack together code from the rest of the source tree or can I get stuff from the cache/optimiser? Has anybody else tried doing anything like this? Am I smoking huge quantities of crack? Simon -- 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 #13454: odbc_execute gives SQL data type out of range error for store procedure
From: [EMAIL PROTECTED] Operating system: PHP version: 4.0.4pl1 PHP Bug Type: ODBC related Bug description: odbc_execute gives SQL data type out of range error for store procedure I am going to an informix 9.3 server and the following code works: $ce_notes =sfasdfasdfsadfsadfasdfasdf; $sql = insert into call_extension(ce_activity,ce_callresult,ce_notes) values ( . $ce_activity . ,3211664,?);; $stmt = odbc_prepare ($crs,$sql ); $sqldata = array ($ce_notes); $r = odbc_execute ($stmt, $sqldata); they following code fails: $sql = execute procedure web_cr_update(?,'ADD',1312,4748999,17057,'2001-09-25 15:34:16.000','2001-09-25 15:34:16',0,277,null,0,null,14999); $stmt = odbc_prepare ($crs,$sql ); $sqldata = array ($ce_notes); $r = odbc_execute ($stmt, $sqldata); with the following error: Warning: SQL error: [Informix][Informix ODBC Driver]SQL data type out of range., SQL state S1004 in SQLExecute in /home/httpd/html/followup/calladd.php on line 65 Note: The value in $ce_notes is the same in each case and the line number refers to odbc_execute line. It also fails when I try: $sql = execute procedure web_filter_modify(?,14999,1312); Both stored procedures work within a c++ program. -- Edit bug report at: http://bugs.php.net/?id=13454edit=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]
Re: [PHP-DEV] [RFC] Versioning rules for PHP/Zend/PEAR/Extensions
On Wed, 26 Sep 2001, Andi Gutmans wrote: I think the key still lies in creating a repository for C extensions where each extension can have its own release cycle. That is also true, but we still need a reliable way to check for the version of specific extensions. Having just bumped into an inconsistency between GD 1.6.2 and GD 2.01 output, this would help a lot. However, the problem is already out there and to create code that is truly portable I couldn't rely on even this new (if it ever comes to life) feature. This sort of thing really complicates writing portable code. not just for different platforms but also for different versions of extensions. Just a repository wouldn't help much from the programmer's perspective IMHO, if the current situation continues. Cheers, Joao -- João Prado Maia [EMAIL PROTECTED] http://phpbrasil.com - php com um jeitinho brasileiro -- Precisando de consultoria em desenvolvimento para a Internet ? Impleo.net - http://impleo.net/?lang=br -- 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] [RFC] Versioning rules for PHP/Zend/PEAR/Extensions
At 12:01 PM 9/26/2001 -0400, Joao Prado Maia wrote: On Wed, 26 Sep 2001, Andi Gutmans wrote: I think the key still lies in creating a repository for C extensions where each extension can have its own release cycle. That is also true, but we still need a reliable way to check for the version of specific extensions. Having just bumped into an inconsistency between GD 1.6.2 and GD 2.01 output, this would help a lot. However, the problem is already out there and to create code that is truly portable I couldn't rely on even this new (if it ever comes to life) feature. This sort of thing really complicates writing portable code. not just for different platforms but also for different versions of extensions. Just a repository wouldn't help much from the programmer's perspective IMHO, if the current situation continues. I agree completely. We need a way to check what version each extension is. We have broken BC quite a bit in 4.0.7 so maybe we should add this to 4.0.7 so that we can get this whole external C extension thing going ASAP? Andi -- 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] PostgreSQL / PHP Overrun Error
I have just upgraded to the new PostgreSQL 7.1.3 (from 7.0.3) and have been experiencing a pretty serious problem: On one particular page, in what seems to be completely random instances, I get buffer overruns and either 0-rows or a crashed apache child. Turning on PHP's --enable-debug, I receive the following [in httpd error log]: [Wed Sep 26 06:21:12 2001] Script: '/path/to/script.php' --- pgsql.c(167) : Block 0x086A6DF8 status: Beginning: Overrun (magic=0x, expected=0x7312F8DC) End: Unknown --- Sometimes it will actually crash mid-way (probably overwrote some valuable code): --- pgsql.c(167) : Block 0x08684290 status: Beginning: Overrun (magic=0x111A, expected=0x7312F8DC) [Wed Sep 26 09:22:46 2001] [notice] child pid 8710 exit signal Segmentation fault (11) This problem is of great concern to me and I have been working for days trying to debug it myself and find other reports, with little success. The line it claims to be failing on is PHP's ext/pgsql/pgsql.c on line 167 (by what this claims) which is the following function [the efree(PGG(last_notice)) line]. static void _notice_handler(void *arg, const char *message) { PGLS_FETCH(); if (! PGG(ignore_notices)) { php_log_err((char *) message); if (PGG(last_notice) != NULL) { efree(PGG(last_notice)); } PGG(last_notice) = estrdup(message); } } Can anyone provide further input as to why this is causing problems? The PHP code works sometimes and not others, and it seems to be only that one script, so I do not believe it to be a hardware issue. Any thoughts? I can provide any further system information if needed. I have tried recompiling pgsql, php and apache with different optimizations [including none at all and debug mode on as i have now] with little change in the result. Thanks in advance; -- Mike cc: pgp-db-help; pgp-dev -- 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 #13455: Using include() with Apache ErrorDocument directive can crash the webserver
From: [EMAIL PROTECTED] Operating system: Any Linux with any Apache PHP version: 4.0.6 PHP Bug Type: Apache related Bug description: Using include() with Apache ErrorDocument directive can crash the webserver HOW TO REPRODUCE 1. You must run Apache in any version on a Linux system and have setup an VirtualHost entry with an example domain www.domain.com. 2. Configure an .htaccess file like ErrorDocument 404 http://www.domain.com/notfound.html 3. The notfound.html file MUST NOT exist and you MUST use an external path 4. Write a php script like ?php include(http://www.domain.com/any_file_that_does_not_exist.html;); ? WHAT HAPPENS The include() function tries to get the specified document but cannot find it. So the Apache webserver sends an 404 error together with a HTTP redirection. The include() tries to catch this address which leads into an infinite loop. The webserver will die shortly. HOW TO SOLVE The include() function should have a limit on how many levels it tries to catch since the webserver is not able to determine if the caller runs into an infinite loop. -- Edit bug report at: http://bugs.php.net/?id=13455edit=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 #13456: mysql_query() returns incorrect result whith do not perform real MySQL state
From: [EMAIL PROTECTED] Operating system: Linix PHP version: 4.0.6 PHP Bug Type: MySQL related Bug description: mysql_query() returns incorrect result whith do not perform real MySQL state We use MySQL 3.22.32 and recive false using mysql_query() wherever SQL is correct and has effect on database. So, in file ext/mysql/php_mysql.c line 99 must be at least such line: #if MYSQL_VERSION_ID 32233 instead of #if MYSQL_VERSION_ID 32224 -- Edit bug report at: http://bugs.php.net/?id=13456edit=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 #13457: function_exists always returns false
From: [EMAIL PROTECTED] Operating system: Linux 2.4.9 PHP version: 4.0.6 PHP Bug Type: Unknown/Other Function Bug description: function_exists always returns false function_exists() always returns false regardless of the specified input unless the function is not part of php core and is avaliable. For example function_exists('include_once') returns false (on php 4.0.6) however it does return true for function_exists('shmop_open'). -- Edit bug report at: http://bugs.php.net/?id=13457edit=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 #13458 Updated: mysql_query() returns incorrect result whith do not perform real MySQL state
ID: 13458 Updated by: derick Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: MySQL related Operating System: PHP Version: 4.0.6 New Comment: Submitted twice Previous Comments: [2001-09-26 13:22:40] [EMAIL PROTECTED] We use MySQL 3.22.32 and recive false using mysql_query() wherever SQL is correct and has effect on database. So, in file ext/mysql/php_mysql.c line 99 must be at least such line: #if MYSQL_VERSION_ID 32233 instead of #if MYSQL_VERSION_ID 32224 in our situation it works properly Edit this bug report at http://bugs.php.net/?id=13458edit=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 #13457 Updated: function_exists always returns false
ID: 13457 Updated by: derick Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: Unknown/Other Function Operating System: Linux 2.4.9 PHP Version: 4.0.6 New Comment: Not a bug, include_once is not a function, but a language construct. And thus it does not appear in Zend's internal functionlist. Derick Previous Comments: [2001-09-26 13:13:49] [EMAIL PROTECTED] function_exists() always returns false regardless of the specified input unless the function is not part of php core and is avaliable. For example function_exists('include_once') returns false (on php 4.0.6) however it does return true for function_exists('shmop_open'). Edit this bug report at http://bugs.php.net/?id=13457edit=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] more than 130 warning during compile ?
Hi, is it normal that a simple compile results more than 130 warnings? here is my warning results: zend_language_scanner.c:2714: warning: `yy_last_accepting_state' defined but not used zend_language_scanner.c:2715: warning: `yy_last_accepting_cpos' defined but not used zend_language_scanner.c:2721: warning: `yy_more_flag' defined but not used zend_language_scanner.c:2722: warning: `yy_more_len' defined but not used zend_ini_scanner.c: In function `ini_lex': zend_ini_scanner.c:818: warning: label `find_rule' defined but not used ./zend_ini_scanner.l: At top level: zend_ini_scanner.c:1342: warning: `yyunput' defined but not used zend_list.c: In function `zend_destroy_rsrc_list': zend_list.c:233: warning: variable `p' might be clobbered by `longjmp' or `vfork' zend_hash.c: In function `zend_hash_compare': zend_hash.c:1149: warning: `p2' might be used uninitialized in this function main.c: In function `php_request_startup': main.c:638: warning: variable `retval' might be clobbered by `longjmp' or `vfork' main.c: In function `php_hash_environment': main.c:1053: warning: `dummy_track_vars_array' might be used uninitialized in this function rfc1867.c: In function `php_mime_split': rfc1867.c:105: warning: `c' might be used uninitialized in this function curl.c: In function `curl_write_header': curl.c:398: warning: `length' might be used uninitialized in this function curl.c: In function `zif_curl_setopt': curl.c:615: warning: `error' might be used uninitialized in this function ming.c: In function `destroy_SWFFont_resource': ming.c:1208: warning: implicit declaration of function `destroySWFBlock' ming.c: In function `zif_swfshape_addfill': ming.c:1845: warning: `fill' might be used uninitialized in this function ming.c: In function `zif_swfshape_setleftfill': ming.c:1944: warning: `fill' might be used uninitialized in this function ming.c: In function `zif_swfshape_setrightfill': ming.c:1997: warning: `fill' might be used uninitialized in this function ming.c: In function `zif_swfshape_drawglyph': ming.c:2220: warning: `size' might be used uninitialized in this function In file included from /usr/local/mysql/current/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 openssl.c: In function `php_openssl_csr_from_zval': openssl.c:1253: warning: `filename' might be used uninitialized in this function openssl.c: In function `zif_openssl_csr_sign': openssl.c:1379: warning: `key' might be used uninitialized in this function openssl.c:1379: warning: `priv_key' might be used uninitialized in this function openssl.c: In function `zif_openssl_pkcs7_verify': openssl.c:1931: warning: `store' might be used uninitialized in this function openssl.c: In function `zif_openssl_pkcs7_sign': openssl.c:2150: warning: `outfilename' might be used uninitialized in this function openssl.c: In function `zif_openssl_private_decrypt': openssl.c:2360: warning: `cryptedbuf' might be used uninitialized in this function openssl.c: In function `zif_openssl_public_decrypt': openssl.c:2480: warning: `cryptedbuf' might be used uninitialized in this function php_pcre.c: In function `php_pcre_replace': php_pcre.c:683: warning: `replace_len' might be used uninitialized in this function php_pcre.c:685: warning: `replace' might be used uninitialized in this function php_pcre.c:691: warning: `replace_end' might be used uninitialized in this function posix.c: In function `zif_posix_getpgid': posix.c:449: warning: implicit declaration of function `getpgid' posix.c: In function `zif_posix_getsid': posix.c:478: warning: implicit declaration of function `getsid' mod_files.c: In function `ps_read_files': mod_files.c:268: warning: implicit declaration of function `pread' mod_files.c: In function `ps_write_files': mod_files.c:299: warning: implicit declaration of function `pwrite' sockets.c: In function `zif_socket_select': sockets.c:547: warning: `max_fd' might be used uninitialized in this function sockets.c: In function `zif_socket_bind': sockets.c:1078: warning: `php_sock' might be used uninitialized in this function sockets.c: In function `zif_socket_recvfrom': sockets.c:1417: warning: `php_sock' might be used uninitialized in this function sockets.c: In function `zif_socket_sendto': sockets.c:1511: warning: `php_sock' might be used uninitialized in this function sockets.c: In function `zif_socket_recvmsg': sockets.c:1585: warning: `iov' might be used uninitialized in this function sockets.c:1588: warning: `php_sock' might be used uninitialized in this function sockets.c: In function `zif_socket_sendmsg': sockets.c:1735: warning: `iov' might be used uninitialized in this function sockets.c:1736: warning: `php_sock' might be used uninitialized in this function array.c: In function `zif_array_map': array.c:3064:
[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]
Re: [PHP-DEV] more than 130 warning during compile ?
Hello, what is your configure line? Derick On Wed, 26 Sep 2001, Holger Schopohl wrote: Hi, is it normal that a simple compile results more than 130 warnings? here is my warning results: zend_language_scanner.c:2714: warning: `yy_last_accepting_state' defined but not used zend_language_scanner.c:2715: warning: `yy_last_accepting_cpos' defined but not used zend_language_scanner.c:2721: warning: `yy_more_flag' defined but not used zend_language_scanner.c:2722: warning: `yy_more_len' defined but not used zend_ini_scanner.c: In function `ini_lex': zend_ini_scanner.c:818: warning: label `find_rule' defined but not used ./zend_ini_scanner.l: At top level: zend_ini_scanner.c:1342: warning: `yyunput' defined but not used zend_list.c: In function `zend_destroy_rsrc_list': zend_list.c:233: warning: variable `p' might be clobbered by `longjmp' or `vfork' zend_hash.c: In function `zend_hash_compare': zend_hash.c:1149: warning: `p2' might be used uninitialized in this function main.c: In function `php_request_startup': main.c:638: warning: variable `retval' might be clobbered by `longjmp' or `vfork' main.c: In function `php_hash_environment': main.c:1053: warning: `dummy_track_vars_array' might be used uninitialized in this function rfc1867.c: In function `php_mime_split': rfc1867.c:105: warning: `c' might be used uninitialized in this function curl.c: In function `curl_write_header': curl.c:398: warning: `length' might be used uninitialized in this function curl.c: In function `zif_curl_setopt': curl.c:615: warning: `error' might be used uninitialized in this function ming.c: In function `destroy_SWFFont_resource': ming.c:1208: warning: implicit declaration of function `destroySWFBlock' ming.c: In function `zif_swfshape_addfill': ming.c:1845: warning: `fill' might be used uninitialized in this function ming.c: In function `zif_swfshape_setleftfill': ming.c:1944: warning: `fill' might be used uninitialized in this function ming.c: In function `zif_swfshape_setrightfill': ming.c:1997: warning: `fill' might be used uninitialized in this function ming.c: In function `zif_swfshape_drawglyph': ming.c:2220: warning: `size' might be used uninitialized in this function In file included from /usr/local/mysql/current/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 openssl.c: In function `php_openssl_csr_from_zval': openssl.c:1253: warning: `filename' might be used uninitialized in this function openssl.c: In function `zif_openssl_csr_sign': openssl.c:1379: warning: `key' might be used uninitialized in this function openssl.c:1379: warning: `priv_key' might be used uninitialized in this function openssl.c: In function `zif_openssl_pkcs7_verify': openssl.c:1931: warning: `store' might be used uninitialized in this function openssl.c: In function `zif_openssl_pkcs7_sign': openssl.c:2150: warning: `outfilename' might be used uninitialized in this function openssl.c: In function `zif_openssl_private_decrypt': openssl.c:2360: warning: `cryptedbuf' might be used uninitialized in this function openssl.c: In function `zif_openssl_public_decrypt': openssl.c:2480: warning: `cryptedbuf' might be used uninitialized in this function php_pcre.c: In function `php_pcre_replace': php_pcre.c:683: warning: `replace_len' might be used uninitialized in this function php_pcre.c:685: warning: `replace' might be used uninitialized in this function php_pcre.c:691: warning: `replace_end' might be used uninitialized in this function posix.c: In function `zif_posix_getpgid': posix.c:449: warning: implicit declaration of function `getpgid' posix.c: In function `zif_posix_getsid': posix.c:478: warning: implicit declaration of function `getsid' mod_files.c: In function `ps_read_files': mod_files.c:268: warning: implicit declaration of function `pread' mod_files.c: In function `ps_write_files': mod_files.c:299: warning: implicit declaration of function `pwrite' sockets.c: In function `zif_socket_select': sockets.c:547: warning: `max_fd' might be used uninitialized in this function sockets.c: In function `zif_socket_bind': sockets.c:1078: warning: `php_sock' might be used uninitialized in this function sockets.c: In function `zif_socket_recvfrom': sockets.c:1417: warning: `php_sock' might be used uninitialized in this function sockets.c: In function `zif_socket_sendto': sockets.c:1511: warning: `php_sock' might be used uninitialized in this function sockets.c: In function `zif_socket_recvmsg': sockets.c:1585: warning: `iov' might be used uninitialized in this function sockets.c:1588: warning: `php_sock' might be used uninitialized in this function sockets.c: In function `zif_socket_sendmsg': sockets.c:1735: warning: `iov' might be used
[PHP-DEV] Bug #13459: ifx_connect: E [SQLSTATE=IX 000 SQLCODE=-439]
From: [EMAIL PROTECTED] Operating system: Linux 2.2 PHP version: 4.0.5 PHP Bug Type: Informix related Bug description: ifx_connect: E [SQLSTATE=IX 000 SQLCODE=-439] It's happenning the error -439 in my site. But I never got the ways it happens because it occurs just sometimes and I never could reproduce it in my tests. -- Edit bug report at: http://bugs.php.net/?id=13459edit=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]
Re: [PHP-DEV] [RFC] Versioning rules for PHP/Zend/PEAR/Extensions
On Wed, 26 Sep 2001, Andi Gutmans wrote: I agree completely. We need a way to check what version each extension is. We have broken BC quite a bit in 4.0.7 so maybe we should add this to 4.0.7 so that we can get this whole external C extension thing going ASAP? If I could vote on this I would say yes. A lot of good and reliable code will appear if something like this is implemented. Joao -- João Prado Maia [EMAIL PROTECTED] http://phpbrasil.com - php com um jeitinho brasileiro -- Precisando de consultoria em desenvolvimento para a Internet ? Impleo.net - http://impleo.net/?lang=br -- 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 #13459 Updated: ifx_connect: E [SQLSTATE=IX 000 SQLCODE=-439]
ID: 13459 Updated by: derick Reported By: [EMAIL PROTECTED] Old Status: Open Status: Analyzed Bug Type: Informix related Operating System: Linux 2.2 PHP Version: 4.0.5 New Comment: Informix throws the error, which is (from http://www.informix.com/answers/english/ierrors.htm): -439 Database server is currently processing an SQL task. You attempted to call an SQL routine or attempted to execute an SQL statement within a signal handling function/routine or a callback function/procedure. Use only the sqldone() and sqlbreak() library functions inside your INFORMIX-ESQL/C callback function. Use only the ECO-SQD and ECO-SQB library routines inside your ESQL/COBOL callback procedure. In addition, if you want to unregister your callback function in INFORMIX-ESQL/C, you can invoke the sqlbreakcallback() callback registration function within your callback procedure. If you want to unregister your callback procedure in ESQL/COBOL, you can invoke the ECO-SQBCB callback registration routine within your callback procedure. Previous Comments: [2001-09-26 14:00:52] [EMAIL PROTECTED] It's happenning the error -439 in my site. But I never got the ways it happens because it occurs just sometimes and I never could reproduce it in my tests. Edit this bug report at http://bugs.php.net/?id=13459edit=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 #13460: buggy ImageTTFText
From: [EMAIL PROTECTED] Operating system: FreeBSD 4.4/Windows PHP version: 4.0.6 PHP Bug Type: GD related Bug description: buggy ImageTTFText line below: ImageTTFText$im,60,0,10,40,$text,../fonts/typouprn.ttf,TEXT); was working under 4.0.4pl1, but in version 4.0.6 looks like this: bWarning/b: Could not find/open font in bd:\moje dokumenty\strony\i98\images\witaj.php/b on line b7/bbr script is working when i downgrade php version to 4.0.4 why ? -- Edit bug report at: http://bugs.php.net/?id=13460edit=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]
Re: [PHP-DEV] [RFC] Versioning rules for PHP/Zend/PEAR/Extensions
On Wed, 26 Sep 2001, Andi Gutmans wrote: I think the key still lies in creating a repository for C extensions where each extension can have its own release cycle. +1 one for this... :-) -\- David Eriksson -/- An expert in a particular computer language is really an expert in the work-arounds necessary to use this language to perform useful work. - Richard B. Johnson -- 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] PostgreSQL / PHP Overrun Error
If I'm reading it correctly it actually means that a block allocated in the PostgreSQL extension is being overrun. It doesn't necessarily mean that it's the fault of the PostgresSQL extension. The efree() in debug mode just checks the block its freeing, it sees that the block was overrun and warns about it. It doesn't meant that the efree() is at fault. How short of a reproducing script can you create? Andi At 01:35 PM 9/26/2001 -0300, Mike Rogers wrote: I have just upgraded to the new PostgreSQL 7.1.3 (from 7.0.3) and have been experiencing a pretty serious problem: On one particular page, in what seems to be completely random instances, I get buffer overruns and either 0-rows or a crashed apache child. Turning on PHP's --enable-debug, I receive the following [in httpd error log]: [Wed Sep 26 06:21:12 2001] Script: '/path/to/script.php' --- pgsql.c(167) : Block 0x086A6DF8 status: Beginning: Overrun (magic=0x, expected=0x7312F8DC) End: Unknown --- Sometimes it will actually crash mid-way (probably overwrote some valuable code): --- pgsql.c(167) : Block 0x08684290 status: Beginning: Overrun (magic=0x111A, expected=0x7312F8DC) [Wed Sep 26 09:22:46 2001] [notice] child pid 8710 exit signal Segmentation fault (11) This problem is of great concern to me and I have been working for days trying to debug it myself and find other reports, with little success. The line it claims to be failing on is PHP's ext/pgsql/pgsql.c on line 167 (by what this claims) which is the following function [the efree(PGG(last_notice)) line]. static void _notice_handler(void *arg, const char *message) { PGLS_FETCH(); if (! PGG(ignore_notices)) { php_log_err((char *) message); if (PGG(last_notice) != NULL) { efree(PGG(last_notice)); } PGG(last_notice) = estrdup(message); } } Can anyone provide further input as to why this is causing problems? The PHP code works sometimes and not others, and it seems to be only that one script, so I do not believe it to be a hardware issue. Any thoughts? I can provide any further system information if needed. I have tried recompiling pgsql, php and apache with different optimizations [including none at all and debug mode on as i have now] with little change in the result. Thanks in advance; -- Mike cc: pgp-db-help; pgp-dev -- 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]
[PHP-DEV] Bug #13461: Problem using PHP3 or PHP4 with Apache 1.3.20
From: [EMAIL PROTECTED] Operating system: AIX 4.2.1.0 PHP version: 4.0.6 PHP Bug Type: Apache related Bug description: Problem using PHP3 or PHP4 with Apache 1.3.20 When I compile php4.0.6 or php3.0.18 as a static module everything is compiling just fine with Apache 1.3.20. When I try to execute via apachectl start or startssl apache just dies before writing to any log files. When I not include php modules php starts just fine. I am lost as to why. Below is what I used to compile php this way. ./configure --with-mysql=/usr/local/mysql --enable-track-vars --with-xml --with-apache=../apache_1.3.20 Next I tried to compile as a DSO which Apache is compiled with the shared support enabled. Apache compiles and runs just fine. When I try to compile php with the following... ./configure --with-mysql=/usr/local/mysql --enable-track-vars --with-xml --with-apxs=/usr/local/apache/bin/apxs --disable-debug php4.0.6 gives me the following error... Making all in . /bin/sh /usr/local/dwo/storage/newstuff/php-4.0.6/libtool --silent --mode=link gcc -I. -I/usr/local/dwo/storage/newstuff/php-4.0.6/ -I/usr/local/dwo/storage/newstuff/php-4.0.6/main -I/usr/local/dwo/storage/newstuff/php-4.0.6 -I/usr/local/apache/include -I/usr/local/dwo/storage/newstuff/php-4.0.6/Zend -I/usr/local/mysql/include/mysql -I/usr/local/dwo/storage/newstuff/php-4.0.6/ext/xml/expat/xmltok -I/usr/local/dwo/storage/newstuff/php-4.0.6/ext/xml/expat/xmlparse -I/usr/local/dwo/storage/newstuff/php-4.0.6/TSRM -DAIX=42 -DAIX_BIND_PROCESSOR -DMOD_SSL=208104 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -DNO_DL_NEEDED -DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -O2 -o libphp4.la -rpath /usr/local/dwo/storage/newstuff/php-4.0.6/libs -avoid-version -L/usr/local/mysql/lib/mysql -R /usr/local/mysql/lib/mysql stub.lo Zend/libZend.la sapi/apache/libsapi.la main/libmain.la regex/libregex.la ext/mysql/libmysql.la ext/pcre/libpcre.la ext/posix/libposix.la ext/session/libsession.la ext/standard/libstandard.la ext/xml/libxml.la TSRM/libtsrm.la -ldl -lmysqlclient -lbind -lm -ldl ld: 0711-711 ERROR: Input file .libs/libphp4.lax/libmain.al/main.lo is empty. The file is being ignored. collect2: ld returned 8 exit status make: The error code from the last command is 1. Stop. - I am at my wits end... please let me know what other information I can give to help me to be able to use PHP with my installation. Thanks in advance!!! --DuWayne -- Edit bug report at: http://bugs.php.net/?id=13461edit=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]
Re: [PHP-DEV] chunk_split seg fault: bt
Hello, I can reproduce this, and am investigating it. Can you make it a bug report? Derick chunk_split in the follow code snip ?php echo chunk_split(str_repeat('x',1024),10); ? produces sometimes a seg. fault. Derick Rethans - PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED] SRM: Site Resource Manager - www.vl-srm.net - JDI Media Solutions - www.jdimedia.nl - [EMAIL PROTECTED] Boulevard Heuvelink 102 - 6828 KT Arnhem - The Netherlands - -- 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] [RFC] Versioning rules for PHP/Zend/PEAR/Extensions
I think the key still lies in creating a repository for C extensions where each extension can have its own release cycle. +1 one for this... :-) Sounds good. I think this would make it easier for the developers of the extensions AND the developers of the 'main' code. The drawback is that it could make it more difficult for someone to determine what he needs to run a certain script. But at the moment, a lot of people compile their own PHP with the extensions they need, so the problem already exists. When using a central repository it should work fine (I think ;) So that's a +1 from me too. Sander. -- 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 #13343 Updated: debian sid installs domxml include files in /usr/include/libxml2/libxml/
ID: 13343 Updated by: chregu Reported By: [EMAIL PROTECTED] Old Status: Open Status: Closed Bug Type: DOM XML related Operating System: linux debian unstable PHP Version: 4.0CVS-2001-09-17 New Comment: fixed in cvs. Previous Comments: [2001-09-17 06:53:54] [EMAIL PROTECTED] debian sid installs domxml include files in /usr/include/libxml2/libxml/ therefore the ./configure script doesn't find it anymore and reports domxml not found... i'm not sure, if it stays there (it's the unstable branch...) but if it's possible it would be a GoodThing to check for that place as well (or do i have to add an addidtional include path in ./configure?) chregu Edit this bug report at http://bugs.php.net/?id=13343edit=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 #13443 Updated: gethostbyname returns the name not the IP addr.
ID: 13443 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Duplicate Bug Type: Unknown/Other Function Operating System: BSDI 4.1 PHP Version: 4.0.6 New Comment: Does PHP require a local bind running? Everything seems to point in that direction. The resolver libs are doing a lookup to the address of 0.0.0.0 vs. the servers as configured in resolv.conf. ;; Querying server (# 1) address = 0.0.0.0 Previous Comments: [2001-09-25 17:16:30] [EMAIL PROTECTED] IMHO this is not the same as #13423, which is why I didn't list it in the original report. Although the data returned is the same (hostname instead of IP address) the reason for the failure is seems very different. [2001-09-25 16:45:51] [EMAIL PROTECTED] duplicate of 13423, among the others listed in the report. gethostbyname() returns the hostname it is passed when the C-level gethostbyname() call fails. [2001-09-25 16:22:34] [EMAIL PROTECTED] This is basically the same report as 8754, 12678, and 8856. The gethostbyname function returns the name instead of the IP address. The host is configured correctly and names can be resolved from the shell using nslookup, dig, etc. This bug first appeared in 4.0.4 (although I didn't know it until now) and is present in 4.0.6 and 4.0.8-dev (php4-200109251335.tar.gz - latest from the snapshots dir as of 9/26/01). I regressed the bug back to my previous version of 3.0.14 and the bug is not present in that version. I have tried both gethostbyname (returns the name) and gethostbynamel (returns 0 items in the array). Edit this bug report at http://bugs.php.net/?id=13443edit=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 #13443 Updated: gethostbyname returns the name not the IP addr.
ID: 13443 Updated by: jimw Reported By: [EMAIL PROTECTED] Status: Duplicate Bug Type: Unknown/Other Function Operating System: BSDI 4.1 PHP Version: 4.0.6 New Comment: php does not require a local dns server to be running unless your system's C library gethostbyname() call does (which seems extraordinarily unlikely). here's a small c program you can use to test your system's gethostbyname(). if it says that no ip address is found, that's the exact same situation in which php's gethostbyname() will return the original hostname. #include stdlib.h #include stdio.h #include netdb.h #include sys/socket.h #include netinet/in.h #include arpa/inet.h int main(int argc, char **argv) { struct hostent *host; struct in_addr in; if (argc != 2) { fprintf(stderr,usage: %s hostname\n, argv[0]); exit(1); } host = gethostbyname(argv[1]); if (host-h_length) { memcpy(in.s_addr, *(host-h_addr_list), sizeof(in.s_addr)); fprintf(stderr,%s\n,inet_ntoa(in)); } else { fprintf(stderr,no ip address found for %s\n, argv[1]); exit(1); } exit(0); } Previous Comments: [2001-09-26 17:33:02] [EMAIL PROTECTED] Does PHP require a local bind running? Everything seems to point in that direction. The resolver libs are doing a lookup to the address of 0.0.0.0 vs. the servers as configured in resolv.conf. ;; Querying server (# 1) address = 0.0.0.0 [2001-09-25 17:16:30] [EMAIL PROTECTED] IMHO this is not the same as #13423, which is why I didn't list it in the original report. Although the data returned is the same (hostname instead of IP address) the reason for the failure is seems very different. [2001-09-25 16:45:51] [EMAIL PROTECTED] duplicate of 13423, among the others listed in the report. gethostbyname() returns the hostname it is passed when the C-level gethostbyname() call fails. [2001-09-25 16:22:34] [EMAIL PROTECTED] This is basically the same report as 8754, 12678, and 8856. The gethostbyname function returns the name instead of the IP address. The host is configured correctly and names can be resolved from the shell using nslookup, dig, etc. This bug first appeared in 4.0.4 (although I didn't know it until now) and is present in 4.0.6 and 4.0.8-dev (php4-200109251335.tar.gz - latest from the snapshots dir as of 9/26/01). I regressed the bug back to my previous version of 3.0.14 and the bug is not present in that version. I have tried both gethostbyname (returns the name) and gethostbynamel (returns 0 items in the array). Edit this bug report at http://bugs.php.net/?id=13443edit=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]
Re: [PHP-DEV] PostgreSQL / PHP Overrun Error
Can you try the latest CVS? It should fix the problem. Zeev At 18:35 26-09-01, Mike Rogers wrote: I have just upgraded to the new PostgreSQL 7.1.3 (from 7.0.3) and have been experiencing a pretty serious problem: On one particular page, in what seems to be completely random instances, I get buffer overruns and either 0-rows or a crashed apache child. Turning on PHP's --enable-debug, I receive the following [in httpd error log]: [Wed Sep 26 06:21:12 2001] Script: '/path/to/script.php' --- pgsql.c(167) : Block 0x086A6DF8 status: Beginning: Overrun (magic=0x, expected=0x7312F8DC) End: Unknown --- Sometimes it will actually crash mid-way (probably overwrote some valuable code): --- pgsql.c(167) : Block 0x08684290 status: Beginning: Overrun (magic=0x111A, expected=0x7312F8DC) [Wed Sep 26 09:22:46 2001] [notice] child pid 8710 exit signal Segmentation fault (11) This problem is of great concern to me and I have been working for days trying to debug it myself and find other reports, with little success. The line it claims to be failing on is PHP's ext/pgsql/pgsql.c on line 167 (by what this claims) which is the following function [the efree(PGG(last_notice)) line]. static void _notice_handler(void *arg, const char *message) { PGLS_FETCH(); if (! PGG(ignore_notices)) { php_log_err((char *) message); if (PGG(last_notice) != NULL) { efree(PGG(last_notice)); } PGG(last_notice) = estrdup(message); } } Can anyone provide further input as to why this is causing problems? The PHP code works sometimes and not others, and it seems to be only that one script, so I do not believe it to be a hardware issue. Any thoughts? I can provide any further system information if needed. I have tried recompiling pgsql, php and apache with different optimizations [including none at all and debug mode on as i have now] with little change in the result. Thanks in advance; -- Mike cc: pgp-db-help; pgp-dev -- 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]
[PHP-DEV] Forking
Hi all, I have written an online MP3 jukebox that streams the currently playing MP3 to winamp / xmms / macamp etc. It would be *very* useful if I could fork PHP processes from within a script - are there any plans to implement a fork() in PHP? BTW, the streaming part of the jukebox is written in PHP, and its this part I think fork() would be insanely useful for ;) Mike -- 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] Forking
On Wed, 26 Sep 2001, mike wrote: Hi all, I have written an online MP3 jukebox that streams the currently playing MP3 to winamp / xmms / macamp etc. It would be *very* useful if I could fork PHP processes from within a script - are there any plans to implement a fork() in PHP? BTW, the streaming part of the jukebox is written in PHP, and its this part I think fork() would be insanely useful for ;) Check pcntl extension available with PHP. -Andrei * We reason deeply, when we forcibly feel. * -- 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] CVS Account Request
Full name: Dimitris Glezos Email: [EMAIL PROTECTED] ID:subbie Purpose: phpdoc for translation -- 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 #13460 Updated: buggy ImageTTFText
ID: 13460 Updated by: mrobinso Reported By: [EMAIL PROTECTED] Old Status: Open Status: Closed Bug Type: GD related Operating System: FreeBSD 4.4/Windows PHP Version: 4.0.6 New Comment: Dupe of 12265,12598,12599,12162,12064,12427, et al. Thanks for the report. This is fixed in CVS. Changing to closed. Previous Comments: [2001-09-26 15:04:38] [EMAIL PROTECTED] line below: ImageTTFText$im,60,0,10,40,$text,../fonts/typouprn.ttf,TEXT); was working under 4.0.4pl1, but in version 4.0.6 looks like this: bWarning/b: Could not find/open font in bd:\moje dokumenty\strony\i98\images\witaj.php/b on line b7/bbr script is working when i downgrade php version to 4.0.4 why ? Edit this bug report at http://bugs.php.net/?id=13460edit=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 #2346 Updated: Using MOD bandwidth sql errors in DML parts
ID: 2346 Updated by: mrobinso Reported By: [EMAIL PROTECTED] Old Status: Open Status: Closed Bug Type: MySQL related Operating System: RedHat Linux 6.0 PHP Version: 3.0.12 New Comment: This is rather dated. I have not been able to reproduce this problem on a box with mod_bandwidth working just fine. While this *could* be a mysql/phpMyAdmin problem, I don't think its related to PHP. If this problem persists with the latest greatest versions of affected software, please reopen. Previous Comments: [1999-09-21 18:28:57] [EMAIL PROTECTED] Config : Apache 1.3.9 MySQL-3_22_25-1_i386.rpm MySQL-client-3_22_25-1_i386.rpm MySQL-devel-3_22_25-1_i386.rpm apache-mod_ssl-1.3.9.2.4.2-0.6.0.i386.rpm apache-mod_ssl-contrib-1_0_7-3_6_0_i386.rpm apache-mod_ssl-devel-1.3.9.2.4.2-0.6.0.i386.rpm openssl-0_9_4-2_i386.rpm PHP 3.0.12 compiled --with-mysql --force-redirect-cgi enabling MOD_BANDWITH causes strange results when creating tables, databases etc with phpMyAdmin I think these are MySql part related, just tryu to create a database and look at the results Edit this bug report at http://bugs.php.net/?id=2346edit=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 #3949 Updated: php with MySQL error
ID: 3949 Updated by: mrobinso Reported By: [EMAIL PROTECTED] Old Status: Open Status: Closed Bug Type: MySQL related Operating System: redhat4.0 PHP Version: Earlier? Upgrade first! New Comment: This is a dated report. Closing. Please reopen if problems persist with newer versions of PHP, and have a look at the install mailing list. Previous Comments: [2000-03-28 15:21:50] [EMAIL PROTECTED] Dear Sr. or Madam; I have installed apache-1.3.6-15cl in my Redhat 4.0, and MySQL-3.22.32-1. Now I am trying to compile the PHP3 to work with MySQL, but when I am trying to follow this steps in the readme I am receiving an error messages. This is the steps in the readme : If you are PHP using RPMS, but it doesn't compile with the database support I need! What's going on here? Due to the way PHP is currently built, it is not easy to build a complete flexible PHP RPM. This issue will be addressed in PHP4. For PHP, we currently suggest you use the mechanism described in the INSTALL.REDHAT file in the PHP distribution. If you insist on using an RPM version of PHP, read on... Currently the RPM packagers are setting up the RPMS to install without database support to simplify installations AND because RPMS use /usr/ instead of the standard /usr/local/ directory for files. You need to tell the RPM spec file which databases to support and the location of the top-level of your database server. This example will explain the process of adding support for the popular MySQL database server, using the mod installation for Apache. Of course all of this information can be adjusted for any database server that PHP supports. I will assume you installed MySQL and Apache completely with RPMS for this example as well. First remove mod_php3 rpm -e mod_php3 Then get the source rpm and INSTALL it, NOT --rebuild rpm -Uvh mod_php3-3.0.5-2.src.rpm Then edit the /usr/src/redhat/SPECS/mod_php3.spec file In the %build section add the database support you want, and the path. For MySQL you would add --with-mysql=/usr \ The %build section will look something like this: ./configure --prefix=/usr \ --with-apxs=/usr/sbin/apxs \ --with-config-file-path=/usr/lib \ --enable-debug=no \ --enable-safe-mode \ --with-exec-dir=/usr/bin \ --with-mysql=/usr \ --with-system-regex Once this modification is made then build the binary rpm as follows: rpm -bb /usr/src/redhat/SPECS/mod_php3.spec and then , this is the error message in the end of compile: . . . checking for MySQL support... no configure: error: Invalid MySQL directory - unable to find mysql.h under /usr/ Bad exit status from /var/tmp/rpm-tmp.3801 (%build) Please , if someone has good knowledge about setup PHP with MySQL, please contact me , because I am trying to compile this products to work together , but in the last times I had I lot of problems. I thank you in advanced for your help. Regards Fabricio C. Greco Edit this bug report at http://bugs.php.net/?id=3949edit=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 #11356 Updated: functions to use mysql-berkely-DBs-functions (commit,rollback)
ID: 11356 Updated by: mrobinso Reported By: [EMAIL PROTECTED] Old Status: Open Status: Closed Bug Type: MySQL related Operating System: Linux RH 7.0 PHP Version: 4.0.4pl1 New Comment: Please ask support questions on the various related php mailing lists. There is currently a list for both general support and db related support. Previous Comments: [2001-06-08 08:42:38] [EMAIL PROTECTED] I have installed Mysql 3.32.38 with berkeley-support for transactional database-tables. it works fine in the command line, but i don't know how i can use the transaction commands (commit, rollback) in php? Can i do a it with the function mysql_query(rollback); mysql_query(commit); or is there another way. I have just tried this functions but my script does not finish befor i don't make a commit in the command line. The rollback-option doesn't work anywere. Thanx a lot Lukas Pirhofer Anybody have just tested it? Edit this bug report at http://bugs.php.net/?id=11356edit=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]
Re: [PHP-DEV] PostgreSQL / PHP Overrun Error
Hi Zeev; Seems to have fixed the problem. What is this expected to be included in a final version 4.0.7 I assume... I try to avoid alpha/beta but I suppose I have little choice at this time. Now I just see enormous amounts of: string.c(1341) : Freeing 0x086AB454 (6 bytes), script=/path/to/scripts I assume that's normal in debug mode for the Zend cleanup engines... So I suppose all is well. Thank you so much. If you have a guestimate on the next release including all of this, that would be amaizing. Thanks for all of your help; -- Mike - Original Message - From: Zeev Suraski [EMAIL PROTECTED] To: Mike Rogers [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, September 26, 2001 6:51 PM Subject: Re: [PHP-DEV] PostgreSQL / PHP Overrun Error Can you try the latest CVS? It should fix the problem. Zeev At 18:35 26-09-01, Mike Rogers wrote: I have just upgraded to the new PostgreSQL 7.1.3 (from 7.0.3) and have been experiencing a pretty serious problem: On one particular page, in what seems to be completely random instances, I get buffer overruns and either 0-rows or a crashed apache child. Turning on PHP's --enable-debug, I receive the following [in httpd error log]: [Wed Sep 26 06:21:12 2001] Script: '/path/to/script.php' --- pgsql.c(167) : Block 0x086A6DF8 status: Beginning: Overrun (magic=0x, expected=0x7312F8DC) End: Unknown --- Sometimes it will actually crash mid-way (probably overwrote some valuable code): --- pgsql.c(167) : Block 0x08684290 status: Beginning: Overrun (magic=0x111A, expected=0x7312F8DC) [Wed Sep 26 09:22:46 2001] [notice] child pid 8710 exit signal Segmentation fault (11) This problem is of great concern to me and I have been working for days trying to debug it myself and find other reports, with little success. The line it claims to be failing on is PHP's ext/pgsql/pgsql.c on line 167 (by what this claims) which is the following function [the efree(PGG(last_notice)) line]. static void _notice_handler(void *arg, const char *message) { PGLS_FETCH(); if (! PGG(ignore_notices)) { php_log_err((char *) message); if (PGG(last_notice) != NULL) { efree(PGG(last_notice)); } PGG(last_notice) = estrdup(message); } } Can anyone provide further input as to why this is causing problems? The PHP code works sometimes and not others, and it seems to be only that one script, so I do not believe it to be a hardware issue. Any thoughts? I can provide any further system information if needed. I have tried recompiling pgsql, php and apache with different optimizations [including none at all and debug mode on as i have now] with little change in the result. Thanks in advance; -- Mike cc: pgp-db-help; pgp-dev -- 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] -- 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] PostgreSQL / PHP Overrun Error
4.0.7 will include this fix. All I can say is that it's supposed to come out 'soon'... About that leak - can you test the latest CVS again? :) At 01:58 27-09-01, Mike Rogers wrote: Hi Zeev; Seems to have fixed the problem. What is this expected to be included in a final version 4.0.7 I assume... I try to avoid alpha/beta but I suppose I have little choice at this time. Now I just see enormous amounts of: string.c(1341) : Freeing 0x086AB454 (6 bytes), script=/path/to/scripts I assume that's normal in debug mode for the Zend cleanup engines... So I suppose all is well. Thank you so much. If you have a guestimate on the next release including all of this, that would be amaizing. Thanks for all of your help; -- Mike - Original Message - From: Zeev Suraski [EMAIL PROTECTED] To: Mike Rogers [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, September 26, 2001 6:51 PM Subject: Re: [PHP-DEV] PostgreSQL / PHP Overrun Error Can you try the latest CVS? It should fix the problem. Zeev At 18:35 26-09-01, Mike Rogers wrote: I have just upgraded to the new PostgreSQL 7.1.3 (from 7.0.3) and have been experiencing a pretty serious problem: On one particular page, in what seems to be completely random instances, I get buffer overruns and either 0-rows or a crashed apache child. Turning on PHP's --enable-debug, I receive the following [in httpd error log]: [Wed Sep 26 06:21:12 2001] Script: '/path/to/script.php' --- pgsql.c(167) : Block 0x086A6DF8 status: Beginning: Overrun (magic=0x, expected=0x7312F8DC) End: Unknown --- Sometimes it will actually crash mid-way (probably overwrote some valuable code): --- pgsql.c(167) : Block 0x08684290 status: Beginning: Overrun (magic=0x111A, expected=0x7312F8DC) [Wed Sep 26 09:22:46 2001] [notice] child pid 8710 exit signal Segmentation fault (11) This problem is of great concern to me and I have been working for days trying to debug it myself and find other reports, with little success. The line it claims to be failing on is PHP's ext/pgsql/pgsql.c on line 167 (by what this claims) which is the following function [the efree(PGG(last_notice)) line]. static void _notice_handler(void *arg, const char *message) { PGLS_FETCH(); if (! PGG(ignore_notices)) { php_log_err((char *) message); if (PGG(last_notice) != NULL) { efree(PGG(last_notice)); } PGG(last_notice) = estrdup(message); } } Can anyone provide further input as to why this is causing problems? The PHP code works sometimes and not others, and it seems to be only that one script, so I do not believe it to be a hardware issue. Any thoughts? I can provide any further system information if needed. I have tried recompiling pgsql, php and apache with different optimizations [including none at all and debug mode on as i have now] with little change in the result. Thanks in advance; -- Mike cc: pgp-db-help; pgp-dev -- 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] -- 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]
[PHP-DEV] Warning sign
string.c in the 4.0.7 branch included a fix which didn't exist in the HEAD branch (RETURN_ instead of RETVAL_ macros in stristr()). If possible, fixes should always go into the HEAD branch, and only afterwards MFH'd back to an RC branch, so that things are kept orderly, and so that we never re-introduce bugs... Zeev -- 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 #13462: Error Logging
From: [EMAIL PROTECTED] Operating system: N/A PHP version: 4.0.6 PHP Bug Type: Feature/Change Request Bug description: Error Logging Two feature requests- both dealing with logging: There should be a way to set log levels [E_ALL for example] different for file logging and for screen [html] logging. This allows serious errors to be printed out and optimization warnings to be written to a file There should be a way to set a different log file for each domain, so that users on multi-user machines may receive their PHP errors. -- Edit bug report at: http://bugs.php.net/?id=13462edit=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] Error Logging on a Per-Domain basis [to apache logs]
I have tried setting as follows in my .htaccess and in my apache server logs: php_value error_log /path/to/log.file php_flag log_errors On And it doesn't seem to do anything. I am already logging to each virtual hosts' error log for http-related logs [such as not found, etc]. Is there any way to put PHP error logs into the same files that Apache logs to as opposed to the master log file? That seems to make an enormous amounts of sense on mutli-user machines (and if there is no error log set for the virtual host, it should use the server log). Is this feature implemented? Could it be? -- Mike -- 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] CVS Account Request
Full name: Sander Steffann Email: [EMAIL PROTECTED] ID:steffann Purpose: I am going to work with CORBA. Can I please get access to /etc/satellite? Thanks. -- 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 #13464: PHP crashes when string not closed in a switch statement
From: [EMAIL PROTECTED] Operating system: Windows 2000 Pro PHP version: 4.0.4pl1 PHP Bug Type: Unknown/Other Function Bug description: PHP crashes when string not closed in a switch statement When a string statement is not closed correctly in a case statement, the php engine crashes and causes a windows error. Example of the bad code: switch ($oRow[imageAlignment]) { case 1: $sOutput = br\n . $sImageOutputbr\n . $mainContentbr\n . break; case 2: $sOutput = br\n . $mainContentbr\n . $sImageOutputbr\n; break; } Fixing the case 1 statement to terminate the string will fix the crashing error. -- Edit bug report at: http://bugs.php.net/?id=13464edit=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]
Re: [PHP-DEV] PostgreSQL / PHP Overrun Error
Solved- Logs seem pretty empty now thanks to the new CVS. Interesting question actually. Any way to put a hard compile-time variable [or php.ini only variable] that will not show the configure line in phpinfo(). That seems very logical to ensure that customers can not reproduce your exact setup with ease. -- Mike - Original Message - From: Zeev Suraski [EMAIL PROTECTED] To: Mike Rogers [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, September 26, 2001 9:21 PM Subject: Re: [PHP-DEV] PostgreSQL / PHP Overrun Error 4.0.7 will include this fix. All I can say is that it's supposed to come out 'soon'... About that leak - can you test the latest CVS again? :) At 01:58 27-09-01, Mike Rogers wrote: Hi Zeev; Seems to have fixed the problem. What is this expected to be included in a final version 4.0.7 I assume... I try to avoid alpha/beta but I suppose I have little choice at this time. Now I just see enormous amounts of: string.c(1341) : Freeing 0x086AB454 (6 bytes), script=/path/to/scripts I assume that's normal in debug mode for the Zend cleanup engines... So I suppose all is well. Thank you so much. If you have a guestimate on the next release including all of this, that would be amaizing. Thanks for all of your help; -- Mike - Original Message - From: Zeev Suraski [EMAIL PROTECTED] To: Mike Rogers [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, September 26, 2001 6:51 PM Subject: Re: [PHP-DEV] PostgreSQL / PHP Overrun Error Can you try the latest CVS? It should fix the problem. Zeev At 18:35 26-09-01, Mike Rogers wrote: I have just upgraded to the new PostgreSQL 7.1.3 (from 7.0.3) and have been experiencing a pretty serious problem: On one particular page, in what seems to be completely random instances, I get buffer overruns and either 0-rows or a crashed apache child. Turning on PHP's --enable-debug, I receive the following [in httpd error log]: [Wed Sep 26 06:21:12 2001] Script: '/path/to/script.php' --- pgsql.c(167) : Block 0x086A6DF8 status: Beginning: Overrun (magic=0x, expected=0x7312F8DC) End: Unknown --- Sometimes it will actually crash mid-way (probably overwrote some valuable code): --- pgsql.c(167) : Block 0x08684290 status: Beginning: Overrun (magic=0x111A, expected=0x7312F8DC) [Wed Sep 26 09:22:46 2001] [notice] child pid 8710 exit signal Segmentation fault (11) This problem is of great concern to me and I have been working for days trying to debug it myself and find other reports, with little success. The line it claims to be failing on is PHP's ext/pgsql/pgsql.c on line 167 (by what this claims) which is the following function [the efree(PGG(last_notice)) line]. static void _notice_handler(void *arg, const char *message) { PGLS_FETCH(); if (! PGG(ignore_notices)) { php_log_err((char *) message); if (PGG(last_notice) != NULL) { efree(PGG(last_notice)); } PGG(last_notice) = estrdup(message); } } Can anyone provide further input as to why this is causing problems? The PHP code works sometimes and not others, and it seems to be only that one script, so I do not believe it to be a hardware issue. Any thoughts? I can provide any further system information if needed. I have tried recompiling pgsql, php and apache with different optimizations [including none at all and debug mode on as i have now] with little change in the result. Thanks in advance; -- Mike cc: pgp-db-help; pgp-dev -- 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] -- 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]
[PHP-DEV] php_smart_str leek
I seem to have found a leak: php_smart_str.h(74) : Freeing 0x08641FF4 (4568 bytes), script=/path/to/file.php Last leak repeated 2 times Latest CVS (9.45pm EST, Wednesday night) -- Mike -- 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] php_smart_str leek
On Wed, 26 Sep 2001, Mike Rogers wrote: I seem to have found a leak: php_smart_str.h(74) : Freeing 0x08641FF4 (4568 bytes), script=/path/to/file.php Last leak repeated 2 times Can you show me the source of file.php (the leak isn't in the smart_str() code, but rather in a library that implements it)? -Sterling -- 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 #13465: imap_fetchstructure problem
From: [EMAIL PROTECTED] Operating system: Red Hat 7.1 (Seawolf) PHP version: 4.0.6 PHP Bug Type: IMAP related Bug description: imap_fetchstructure problem The list of modules I compiled PHP with: ./configure --with-apxs=/usr/local/apache/bin/apxs \ --with-mysql=/usr/local/mysql \ --with-imap=/usr/local/imap \ --with-language=korean \ --with-charset=euc_kr \ --with-zlib \ --enable-track-vars \ --disbale-debug \ --enable-modules=so \ --with-config-file-path=/usr/local/apache/conf \ My server environments: OS - Red Hat 7.1 PHP- 4.0.6 qmail - 1.03 imap - 4.7 apache - 1.3.20 mysql - 3.23.39 If a mail header contains 'Mime-Version: 1.0', imap_fetchstructure works ok. However If not, imap_fetchstructure always returns the type value as text and the subtype value as plain. For example, suppose I receive the following mail. x-sender: [EMAIL PROTECTED] x-receiver: [EMAIL PROTECTED] Received: from myonair.com by gaultier with Microsoft SMTPSVC(5.0.2172.1); Tue, 25 Sep 2001 11:34:08 +0900 Received: (qmail 31008 invoked by uid 99); 25 Sep 2001 11:39:49 +0900(KST) Date: 25 Sep 2001 11:39:49 +0900(KST) Message-ID: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: test From: [EMAIL PROTECTED] Content-Type: text/html; charset=ks_c_5601-1987 Return-Path: [EMAIL PROTECTED] X-OriginalArrivalTime: 25 Sep 2001 02:34:08.0868 (UTC) FILETIME=[8DAA4240:01C1456A] iframe frameborder=0 scrolling=no topmargin=0 leftmargin=0 src=http://mail.myonair.com/letter/mail_to.html?user_no=2; width=620 height=450/iframe The mail content type is text/html, but imap_fetchstructure returns the content type as text/plain because there is not 'Mime-Version: 1.0' in the mail header. If the mail header contains 'Mime-Version: 1.0', imap_fetchstructure works properly. Is this a kind of bug? -- Edit bug report at: http://bugs.php.net/?id=13465edit=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]
Re: [PHP-DEV] php_smart_str leek
There doesn't appear to be anything unusual in the script. There are a few includes pointing almost completely to HTML, and a few MySQL database queries. It is not my code to release, so I am hesitant to do so. Any alternate ways to debug this? I can strace or gdb to a thread and wait for it to come up if that would help. -- Mike - Original Message - From: Sterling Hughes [EMAIL PROTECTED] To: Mike Rogers [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, September 26, 2001 10:57 PM Subject: Re: [PHP-DEV] php_smart_str leek On Wed, 26 Sep 2001, Mike Rogers wrote: I seem to have found a leak: php_smart_str.h(74) : Freeing 0x08641FF4 (4568 bytes), script=/path/to/file.php Last leak repeated 2 times Can you show me the source of file.php (the leak isn't in the smart_str() code, but rather in a library that implements it)? -Sterling -- 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] php_smart_str leek
On Wed, 26 Sep 2001, Mike Rogers wrote: There doesn't appear to be anything unusual in the script. There are a few includes pointing almost completely to HTML, and a few MySQL database queries. It is not my code to release, so I am hesitant to do so. Any alternate ways to debug this? I can strace or gdb to a thread and wait for it to come up if that would help. Sorry, unless I have a reproducable test case I can't fix the leak, it could be in any number of places... -Sterling -- 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] php_smart_str leek
You can try to create a copy of the script, and cut down this copy as much as possible, while checking that it still causes this leak. The final cut-down test case would probably be small enough for you to publish. Zeev At 04:45 27-09-01, Mike Rogers wrote: There doesn't appear to be anything unusual in the script. There are a few includes pointing almost completely to HTML, and a few MySQL database queries. It is not my code to release, so I am hesitant to do so. Any alternate ways to debug this? I can strace or gdb to a thread and wait for it to come up if that would help. -- Mike - Original Message - From: Sterling Hughes [EMAIL PROTECTED] To: Mike Rogers [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, September 26, 2001 10:57 PM Subject: Re: [PHP-DEV] php_smart_str leek On Wed, 26 Sep 2001, Mike Rogers wrote: I seem to have found a leak: php_smart_str.h(74) : Freeing 0x08641FF4 (4568 bytes), script=/path/to/file.php Last leak repeated 2 times Can you show me the source of file.php (the leak isn't in the smart_str() code, but rather in a library that implements it)? -Sterling -- 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] CVS Account Request
On Thursday 27 September 2001 03:33, CVS Account Request wrote: Full name: Sander Steffann Email: [EMAIL PROTECTED] ID:steffann Purpose: I am going to work with CORBA. Can I please get access to /etc/satellite? Thanks. Hello Steffann! As the maintainter of Satellite, I'd like some control over the modifications to this extension, so if you want to contribute to Satellite, you don't need a CVS accout, just send me patches and I'll merge them in... Regards, -\- David Eriksson -/- An expert in a particular computer language is really an expert in the work-arounds necessary to use this language to perform useful work. - Richard B. Johnson -- 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 #13443 Updated: gethostbyname returns the name not the IP addr.
ID: 13443 Updated by: venaas Reported By: [EMAIL PROTECTED] Status: Duplicate Bug Type: Unknown/Other Function Operating System: BSDI 4.1 PHP Version: 4.0.6 New Comment: PHP uses the resolver library(ies) installed on your system, just as the other software installed. It is possible that you have several libraries and nslookup uses something else though. If you have nsswitch.conf or similar you should make sure that is okay, but if for instance ping hostname works (where hostname is not in /etc/hosts or NIS...), it should be okay. Please check that resolv.conf is readable for all. You aren't running PHP in chroot environment, are you? Previous Comments: [2001-09-26 17:43:08] [EMAIL PROTECTED] php does not require a local dns server to be running unless your system's C library gethostbyname() call does (which seems extraordinarily unlikely). here's a small c program you can use to test your system's gethostbyname(). if it says that no ip address is found, that's the exact same situation in which php's gethostbyname() will return the original hostname. #include stdlib.h #include stdio.h #include netdb.h #include sys/socket.h #include netinet/in.h #include arpa/inet.h int main(int argc, char **argv) { struct hostent *host; struct in_addr in; if (argc != 2) { fprintf(stderr,usage: %s hostname\n, argv[0]); exit(1); } host = gethostbyname(argv[1]); if (host-h_length) { memcpy(in.s_addr, *(host-h_addr_list), sizeof(in.s_addr)); fprintf(stderr,%s\n,inet_ntoa(in)); } else { fprintf(stderr,no ip address found for %s\n, argv[1]); exit(1); } exit(0); } [2001-09-26 17:33:02] [EMAIL PROTECTED] Does PHP require a local bind running? Everything seems to point in that direction. The resolver libs are doing a lookup to the address of 0.0.0.0 vs. the servers as configured in resolv.conf. ;; Querying server (# 1) address = 0.0.0.0 [2001-09-25 17:16:30] [EMAIL PROTECTED] IMHO this is not the same as #13423, which is why I didn't list it in the original report. Although the data returned is the same (hostname instead of IP address) the reason for the failure is seems very different. [2001-09-25 16:45:51] [EMAIL PROTECTED] duplicate of 13423, among the others listed in the report. gethostbyname() returns the hostname it is passed when the C-level gethostbyname() call fails. [2001-09-25 16:22:34] [EMAIL PROTECTED] This is basically the same report as 8754, 12678, and 8856. The gethostbyname function returns the name instead of the IP address. The host is configured correctly and names can be resolved from the shell using nslookup, dig, etc. This bug first appeared in 4.0.4 (although I didn't know it until now) and is present in 4.0.6 and 4.0.8-dev (php4-200109251335.tar.gz - latest from the snapshots dir as of 9/26/01). I regressed the bug back to my previous version of 3.0.14 and the bug is not present in that version. I have tried both gethostbyname (returns the name) and gethostbynamel (returns 0 items in the array). Edit this bug report at http://bugs.php.net/?id=13443edit=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]