Re: [PHP-DEV] Using PHP for search and replace
In mail.php.internals, Jean-Michel Dault [EMAIL PROTECTED] wrote: Hello all, Currently, both Mandrake and RedHat use the following trick: perl -pi -e s|^;extension=mysql.so|extension=mysql.so| /etc/php.ini This sucks, because you then need perl to install a PHP extension. We sure could use sed, but this requires a temporary file, and this creates some security risks. Is there a quick and easy way to do this kind of thing in PHP? Or would this be something that we could integrate? I was about to say Ask the RPM makers until I saw who was asking :-) How about: php -q -r '$lines=file(/etc/php.ini); $f=fopen(/etc/php.ini, w); \ foreach ($lines as $line) { fwrite($f, preg_replace(/^;extension=mysql.so/,\ extension=mysql.so, $line)); } fclose($f);' or php-cli -r '..' (as above) ? It'd probably be better to read from the php.ini-dist file or the source in the package and write to php.ini, but the above will work* if it isn't interrupted (which would probably cause other issues with the rpm, so isn't a biggie). * I typed this out without testing it, so it might not work :) I presume perl is no longer a standard package installed with either redhat or mandrake thus the question ? Paul. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] emalloc() troubles
In mail.php.internals, Ari Pollak [EMAIL PROTECTED] wrote: Hi there, I'm trying to hack mail.c to automatically pass a -f argument to qmail with a return address, so that the Return-path of the message is not always root@blah. Anyway, I seem to have been successful in this endeavor, but I have a slight problem - whenever my code gets executed, I get two errors output: Simple fix in PHP code (not source): putenv(QMAILSUSER=username); putenv(QMAILSHOST=mydomain.com); No need to hack up mail.c Paul, aka Qube -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: RC4 + windows
Hi, I cant seem to load RC4 at all (copied all the dlls, and everything) Paul B. Marcus Börger [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, i can no longer load mhash and domxml dll's under windows RC4. marcus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] $_get['variable']
Anyone know how to allow pre 4.0.3 code which was written when you could call get parsed variables as $variable etc tyo work on the new version of php which doesnt allow this ??? Thanks Ben Paul Proactive Innovations LTD www.proactiveinnovations.co.uk -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Fwd: Re: [PHP-DEV] What happened to the notes on php.net?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - -- Forwarded Message -- Subject: RE: [PHP] User Contributed Notes at php.net? Date: Mon, 11 Nov 2002 23:43:18 - From: James Cox [EMAIL PROTECTED] To: Ernest E Vogelsinger [EMAIL PROTECTED], [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] they are missing temporarily as we work on re-enabling some php.net services. apologies for any inconveniences. -- James Cox php.net sysadmin - -- James Cox :: [EMAIL PROTECTED] :: http://james.blogs.at/ Was I helpful? http://www.amazon.co.uk/exec/obidos/wishlist/23IVGHQ61RJGO/ On Monday 11 November 2002 09:28 pm, Matthew Walker wrote: They're not there for me either... Odd. Maxim Maletsky said: For my big surprise there aren't there Did I miss something? -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php - -- ~Paul Nicholson Design Specialist @ WebPower Design The webthe way you want it! [EMAIL PROTECTED] www.webpowerdesign.net It said uses Windows 98 or better, so I loaded Linux! Registered Linux User #183202 using Register Linux System # 81891 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE90G4bDyXNIUN3+UQRAnDLAJ97aVkmvTRO6F8clxS6B8TIuC04OgCeOk4g NH+gpPsiY0wQGBAX9I+zlzg= =7m6I -END PGP SIGNATURE- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ZEND_ADD_STRING patch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 It's the list, I don't think they allow attachmentsdo you have web space you could upload to? On Sunday 10 November 2002 05:16 pm, Derick Rethans wrote: On Sun, 10 Nov 2002, George Schlossnagle wrote: For those who came to Dan my or Derick's talk at the Int. PHP Conference, we both covered the bad inefficiency in the parser that results in strings with variables in them being tokenized on whitespace. This results in a huge number of unnecessary opcodes in strings. Attached (hopefully, as my new MUA seems to be fickle) is a first shot at a fix to the parser to keep this from happening, so that you don't need an optimizer to clear up this issue. I've tested this locally. It still introduces a single unnecessary opcode after variable in certain cases, but it works for me. hmm, your MUA is getting senile :) no attachment... Derick - -- ~Paul Nicholson Design Specialist @ WebPower Design The webthe way you want it! [EMAIL PROTECTED] www.webpowerdesign.net It said uses Windows 98 or better, so I loaded Linux! Registered Linux User #183202 using Register Linux System # 81891 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9zuZNDyXNIUN3+UQRAlYEAJ9PE5IKScOc+7/Kk1a71jJ87o7+EgCfV9z7 u+KZNZj2lZWzXmRiZmYrq4U= =ChWV -END PGP SIGNATURE- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Compile PHP-CODE
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 http://pear.php.net/bcompiler ? ~Paul On Wednesday 06 November 2002 12:30 pm, Maxim Maletsky wrote: oh ... I got it now - you want to compile the PHP code, not C code in which PHP is written. Answer is: NO, you can't. You really should have sent this to the general list, not dev - here we get confused :) - -- ~Paul Nicholson Design Specialist @ WebPower Design The webthe way you want it! [EMAIL PROTECTED] It said uses Windows 98 or better, so I loaded Linux! Registered Linux User #183202 using Register Linux System # 81891 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9yVfzDyXNIUN3+UQRAu5zAJ0c59o3zKDip4/yXIWTWQI7nQLiFgCePGYi Pc709/u1MRQbT/joWfsyAas= =0htS -END PGP SIGNATURE- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Weird problem with version 4.2.3!
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, Your problem has something to do with --enable-mbstr-enc-transyou need to remove it. Check the archives for more info. HTH! ~Paul On Wednesday 06 November 2002 05:00 pm, Daniele Baroncelli wrote: Hi guys, I have a very weird problem. I have installed the PHP version 4.2.3 on the LINUX virtual server of my web project. Previously I had the PHP version 4.0.6. The error I get is very weird. When I insert a record with the phpMyAdmin, the first 4 characters of each field don't get saved. Same thing happened with some data entry interfaces I coded! The only difference I can see in the two installation (provided the php.ini file is in the same location): The old version 4.0.6 was installed by the server provider and my virtual server space I can only see the .so file. The new version 4.2.3 is actually inside my virtual server space. Hence, the path I provided in the php configuration is different (I don't have idea if this can influence something). NEW VERSION (4.2.3) configuration run by me './configure' '--with-apxs=/usr/local/apache/1.3/bin/apxs' '--prefix=/usr/home/rockit/usr/local' '--with-mysql=/usr/home/rockit/usr/local/mysql' '--with-xml' '--enable-xslt' '--with-xslt-sablot=/usr/home/rockit/usr/local' '--with-regex=system' '--with-expat-dir=/usr/home/rockit/usr/local' '--with-iconv=/usr/home/rockit/usr/local' '--enable-inline-optimization' '--disable-debug' '--enable-memory-limit' '--enable-sigchild' '--without-pear' '--enable-mbstring' '--enable-mbstr-enc-trans' '--with-gdbm=/usr/local' '--enable-sockets' '--enable-versioning' '--with-ttf=/usr/local' '--enable-ftp' '--with-gd=/usr/local' '--with-zlib' '--enable-gd-native-ttf' OLD VERSION (4.0.6) configuration run by the server provider './configure' '--enable-inline-optimization' '--with-apxs=/usr/local/apache/1.3/bin/apxs' '--with-config-file-path=/usr/local/lib' '--disable-debug' '--enable-memory-limit' '--enable-sigchild' '--with-gettext' '--without-pear' '--with-regex=system' '--enable-mbstring' '--enable-mbstr-enc-trans' '--with-iconv=/usr/local' '--with-gdbm=/usr/local' '--with-dbm=/usr/local' '--enable-sockets' '--enable-versioning' '--with-freetype-dir=/usr/local' '--with-ttf=/usr/local' '--enable-ftp' '--with-curl=/usr/local/curl' '--with-openssl=/usr/local/openssl' '--with-gd=/usr/local' '--with-freetype-dir=/usr/local' '--with-ttf=/usr/local' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-t1lib=/usr/local' '--with-zlib' '--enable-gd-native-ttf' '--with-imap' '--with-mcrypt=/usr/local' '--with-mhash=/usr/local' '--with-dom=/usr/local' '--with-mysql=/usr/local/mysql' '--with-zlib' '--with-zlib' I must admit that I didn't not include all parameter as the old installation, as I didn't know most options and thought is not needed. In the new installation I instead provided additional XML parameter (after installing the correspond modules, which all seem to work fine). Hints on problem are very well welcome! Daniele - -- ~Paul Nicholson Design Specialist @ WebPower Design The webthe way you want it! [EMAIL PROTECTED] It said uses Windows 98 or better, so I loaded Linux! Registered Linux User #183202 using Register Linux System # 81891 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9yZLlDyXNIUN3+UQRAlxxAJ0ankSCkiAV4YIkJuVXb9wIolMxmgCdEiIo 4yOS7VNz6FbS2wsx5PK+L5s= =bMiB -END PGP SIGNATURE- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Thread Reading
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wednesday 18 September 2002 09:49 pm, Yasuo Ohgaki wrote: Dan Hardiker wrote: Hi all [specifically those monitoring the patches thread], Ive noticed that alot of you seem to be asking questions which were actually answered in the original post of the thread. Can I request that anyone who has an opinion on this matter both read the thread, and (where possible) try out the patch for themselves to see what impact it really has. The underlying effect is minimal, no noticable change. The effect of having the option there is mind blowing for IRC based support staff who are dealing with (for want of a better word), idiots. For those of you who dont have time, or the capability to test it out for yourself, please take the following exampes: http://www.dapond.net/code/backtrace.php http://www.dapond.net/code/backtrace.phps http://www.dapond.net/code/backtrace.phps?HIGHLIGHT_FORMAT=default http://www.dapond.net/code/backtrace.phps?HIGHLIGHT_FORMAT=lineno Sorry guys. I still don't understand why we need to extend phps capability ;) With script level, we can contol output/access as needed. In addtion, it's much easier to maintain compare to phps once you write appropriate script. Most importantly, it always works at script level. I don't see what the problem is.phps will still work as expected without the extra parameter. If you were on irc trying to help someone tell me how you'd explain to them that they need to change a line to something else without having line numbers. Furthermore, you'll have to tell them that they need to create another file just to view the source with line number when if we use the extra parameter we'd just tell them to copy the source to filename.phps. We're not just talking about supporting people that have some knowledge of php but also those that buy/download a module to add to their site(no knowledge or less :) ). Although I forgot details, I suppose we'll breake modulality between Zend and PHP if we try to fix problem of phps. IMHO, it does _not_ worth it. We shouldn't add new features that will not working well. Therefore, phps should be left as it is now. (If someone has feasible solution, I don't against that. of course) Why not just add new parameter to show_source/hilight_file? We don't need to add new feature to phps, but should provide only for functions. It should be good enough. They are getting a new parameter afaik! Why leave it at that?! I'm +1 on the changes. - -- ~Paul Nicholson Design Specialist @ WebPower Design The webthe way you want it! [EMAIL PROTECTED] It said uses Windows 98 or better, so I loaded Linux! Registered Linux User #183202 using Register Linux System # 81891 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9iTIaDyXNIUN3+UQRAkoIAJ9P6ZqvHeq0OhZrLLBIfCY7IjSMEgCgmTAx d2qOoCUdyA0UdW663T96Asg= =24xg -END PGP SIGNATURE- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Default extensions (was: mbstring)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tuesday 03 September 2002 08:31 am, Marcus Börger wrote: At 00:15 03.09.2002, Edin Kadribasic wrote: i still don't see why we shouldn't just disable everything by default and write a 'default configure' script... I don't see why you're so upset that some extensions are enabled by default. The main rule so far was if the extension is stable and if it does not depend on external libraries it was enabled. This was done so people who get PHP through hosted services have the most PHP functionality available to them. This IMHO outweighs the slight inconvenience of adding a few configure options for people who compile PHP themselves. Edin I can only agree to that! I do not see some extra bytes for the binaries being a problem with to days disk and memory sizes. For me it seems VERY important to have a great API/functionality in PHP. I agree 100%. Some hosts will not enable anything more than the defaults and forget about asking them to.takes too much time. - -- ~Paul Nicholson It said uses Windows 98 or better, so I loaded Linux! Registered Linux User #183202 using Register Linux System # 81891 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9dQ+YDyXNIUN3+UQRAsaPAKCeiGdfgJlZM4HosVRmksOndzYBAQCfdPde sLQ7iTJaUnHnvFTf3/G7gmQ= =7oIi -END PGP SIGNATURE- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] mbstring
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Monday 02 September 2002 04:16 pm, Zeev Suraski wrote: At 22:52 02/09/2002, Dan Kalowsky wrote: On Mon, 2 Sep 2002, Yasuo Ohgaki wrote: If we should reduce number of modules built by default, 1st module should be MySQL. Removing MySQL does not cause any technical problems at all. I'll agree to that as well. +1 on removing --with-mysql as a default. Although realize I'm also +1 on removing any default modules that are not essential to PHP's running. -1 - -1!! Are you crazy?! remove --with-mysql as default?! I must be seeing things.mysql is a major reason ppl use php and some(not all!!) dumb sysadmins don't enable anything but the defaults and forget about asking them to enable som'in for you - -- ~Paul Nicholson It said uses Windows 98 or better, so I loaded Linux! Registered Linux User #183202 using Register Linux System # 81891 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9c85KDyXNIUN3+UQRAj6MAJ9Dbu0T4pCN9h/d0vtgsbJp+dIV1gCbB+Z6 Xva9XSblcuCZzGDeLW8D2RQ= =FHIi -END PGP SIGNATURE- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Trying to input a webpage - need help
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Ken, This code chunk should do the trick. - -- php code -- $data =insert=datalocation=here; /* This would be the data that needs to be posted to the site - urlencode it */ /* Headers for http transactionreplace /folder/pages.ext */ $header = POST /folder/pages.ext HTTP/1.1\r\n. Accept-Language: en-us\r\n. /* Additional info for the receiving server.optional */ Content-Length: .strlen($data).\r\n. /* This line is *very* important - length of posted data */ Content-Type: application/x-www-form-urlencoded\r\n. /* Type of content the server can expect from us */ User-Agent: YourCustomUser-Agent (compatible; Linux 2.4; RedHat 7.2;)\r\n. /* optional */ Host: host.com\r\n. /* the host of the site you are sending the posted data to.*/ Cookie: cookie-name=cookie-val\r\n\r\n. /* We can even send cookies optional..remove and add an extra \r\n to the above line */ $data; /* this is where the data is sentno need to change this line. */ $fp = fsockopen (host.com, 80, $errno, $errstr, 30); if (!$fp) { echo $errstr ($errno)br\n; } else { fputs ($fp, $header); while (!feof($fp)) { echo fgets ($fp,128); /* Data returned from server.use as you like */ } fclose ($fp); } - -- End php code -- On Friday 16 August 2002 08:02 pm, Ken Meyer wrote: I am trying to write a script that will read a page from another website. So long at the page is accessed via a GET, this is no problem; I just need to open the page using fopen, readfile or file_get_contents. The problem is that I need to access a page that requires a POST. Any suggestions as to how I could do this? Thanks. Ken - -- ~Paul Nicholson Design Specialist @ WebPower Design The webthe way you want it! [EMAIL PROTECTED] It said uses Windows 98 or better, so I loaded Linux! Registered Linux User #183202 using Register Linux System # 81891 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9XbT7DyXNIUN3+UQRApOmAJ4zYjKW+WzoxuNmx8j2S87StyHT2ACdH+AQ iDOX+hvxCFyFPb19knyBp8s= =TvmX -END PGP SIGNATURE- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] apache virtual hosts, php cgi and safe mode
Dear All, Just a quick question regarding Apache and PHP as a CGI: Is it desired behaviour that under a VirtualHost directive (that specifies user and group directive to invoke suexec), php as a CGI then slips into safe mode? If so, can this be relaxed using a configure time option or is editing of the source required? Many thanks, Paul J -- web: http://myitcv.org.uk/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] beginner question: how to execute unix command in PHP
Hi, I'm just starting to learn PHP. I couldn't find how to exec unix command and read the result. Basically, I just want to execute ls -lrt and read and display the output. This may be very simple question, but for some reason, I couldn't find any info on executing unix command from PHP. Thanks. -Paul -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] CVS Account Request: pgc
To develop and maintain the MDB postgres driver, and MDB in general (/pear/MDB/) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] CVS Account Request: hudzilla
I wish to help maintain the English documentation _without_ bugging the list regularly. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] CVS Account Request: paulr
[16:53] imajes apply for CVS, say I sent you / for qa... then stuff can get added as documents, and then some serious programming will happen -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Bug #15441 Updated: Cookie is set to %00 instead of erased
ID: 15441 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Open -Bug Type: HTTP related +Bug Type: Documentation problem Operating System: Solaris 7 PHP Version: 4.1.1 New Comment: On the documentation page it says: When deleting a cookie you should assure that the expiration date is in the past, to trigger the removal mechanism in your browser. However, since the first delete cookie example doesn't have any value for the expire argument, it is implied that if called with only the variable name, PHP will automatically assure that the expiration date is in the past. The code you provided works, of course. There is definately a difference in the way that PHP 4.1.x handles this than previous versions. I guess this is now a documentation problem. From the setcookie documentation, under setcookie() delete examples, the first listed is: setcookie (TestCookie); Which in PHP 4.1.x just sets the cookie to %00 as the original bug stated. I suggest removing that example. Also the function definition should no longer suggest that setcookie only requires one argument. Previous Comments: [2002-02-08 00:51:59] [EMAIL PROTECTED] From the setcookie page. When deleting a cookie you should assure that the expiration date is in the past, to trigger the removal mechanism in your browser. Try this setcookie($username_cookie, '', time()-3600); -Chris [2002-02-08 00:26:56] [EMAIL PROTECTED] Using PHP 4.1.x, the following code, which is intended to delete a cookie, instead replaces the value with %00 (ascii entity null?) Cookies are set with the following: setcookie($username_cookie,'username'); setcookie($password_cookie,md5('password')); Cookies are deleted with the following: setcookie($username_cookie); setcookie($password_cookie); Yes, the $username_cookie and $password_cookie variables have values. The above is case (a) in the documentation, the simplest case. I've tried this on all the systems I have access to. Affected: Solaris 7, PHP 4.1.0 Red Hat 7.1, PHP 4.1.1 Not Affected: Red Hat 7.1, PHP 4.04pl1 Mac OS X 10.1.2, PHP 4.0.6 Solaris 7, PHP 4.06 One affected system that I've used is on a web host (communitech.net, who just very recently moved to PHP 4.1.0 from 3.0.9, Solaris 7). The other is on the freshly setup intranet server at my employer (Linux 4.1.1). Here's the configuration line (Solaris 7, PHP 4.1.0): './configure' '--with-mysql=/usr/local/mysql' '--with- curl=/root/src/curl/curl-7.9.3' '--with-xml' '--with- apache=/root/src/apache/apache-fp_1.3.3' And the one from Red Hat 7, PHP 4.1.1: './configure' '--prefix=/usr/local' '--with-apache=/usr/ local/src/apache/Apachetoolbox-1.5.50/apache_1.3.22' '-- enable-exif' '--enable-track-vars' '--with-calendar=shared' '--enable-safe-mode' '--enable-magic-quotes' '--enable- trans-sid' '--enable-wddx' '--enable-ftp' '--with-gd=/usr/ local' '--with-zlib' '--enable-gd-native-tt' '--with-t1lib= /usr/local' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '- -with-zlib-dir=/usr' '--with-ttf' '--with-freetype-dir=/ usr' '--with-imap=/usr/local' '--with-openssl=/usr' '-- with-mysql=/usr/local/mysql' '--with-pgsql' '--with-ldap' The same code works in previous versions of PHP to 4.1, as indicated above. I've tried the code in three different browsers so I don't think it is browser dependent. The actual piece of code is part of a larger system. I can give you the code or access to one of the servers if necessary. Thanks in advance. Paul Burney Webmaster Concord Consortium and UCLA GSEIS -- Edit this bug report at http://bugs.php.net/?id=15441edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Bug #15441: Cookie is set to %00 instead of erased
From: [EMAIL PROTECTED] Operating system: Solaris 7 PHP version: 4.1.1 PHP Bug Type: HTTP related Bug description: Cookie is set to %00 instead of erased Using PHP 4.1.x, the following code, which is intended to delete a cookie, instead replaces the value with %00 (ascii entity null?) Cookies are set with the following: setcookie($username_cookie,'username'); setcookie($password_cookie,md5('password')); Cookies are deleted with the following: setcookie($username_cookie); setcookie($password_cookie); Yes, the $username_cookie and $password_cookie variables have values. The above is case (a) in the documentation, the simplest case. I've tried this on all the systems I have access to. Affected: Solaris 7, PHP 4.1.0 Red Hat 7.1, PHP 4.1.1 Not Affected: Red Hat 7.1, PHP 4.04pl1 Mac OS X 10.1.2, PHP 4.0.6 Solaris 7, PHP 4.06 One affected system that I've used is on a web host (communitech.net, who just very recently moved to PHP 4.1.0 from 3.0.9, Solaris 7). The other is on the freshly setup intranet server at my employer (Linux 4.1.1). Here's the configuration line (Solaris 7, PHP 4.1.0): './configure' '--with-mysql=/usr/local/mysql' '--with- curl=/root/src/curl/curl-7.9.3' '--with-xml' '--with- apache=/root/src/apache/apache-fp_1.3.3' And the one from Red Hat 7, PHP 4.1.1: './configure' '--prefix=/usr/local' '--with-apache=/usr/ local/src/apache/Apachetoolbox-1.5.50/apache_1.3.22' '-- enable-exif' '--enable-track-vars' '--with-calendar=shared' '--enable-safe-mode' '--enable-magic-quotes' '--enable- trans-sid' '--enable-wddx' '--enable-ftp' '--with-gd=/usr/ local' '--with-zlib' '--enable-gd-native-tt' '--with-t1lib= /usr/local' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '- -with-zlib-dir=/usr' '--with-ttf' '--with-freetype-dir=/ usr' '--with-imap=/usr/local' '--with-openssl=/usr' '-- with-mysql=/usr/local/mysql' '--with-pgsql' '--with-ldap' The same code works in previous versions of PHP to 4.1, as indicated above. I've tried the code in three different browsers so I don't think it is browser dependent. The actual piece of code is part of a larger system. I can give you the code or access to one of the servers if necessary. Thanks in advance. Paul Burney Webmaster Concord Consortium and UCLA GSEIS -- Edit bug report at http://bugs.php.net/?id=15441edit=1 -- Fixed in CVS:http://bugs.php.net/fix.php?id=15441r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=15441r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=15441r=needtrace Try newer version: http://bugs.php.net/fix.php?id=15441r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=15441r=support Expected behavior: http://bugs.php.net/fix.php?id=15441r=notwrong Not enough info: http://bugs.php.net/fix.php?id=15441r=notenoughinfo -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Bug #15364: Compile Fails as CGI with INFORMIX on SCO
From: [EMAIL PROTECTED] Operating system: SCO Openserver 5.0.4 PHP version: 4.1.1 PHP Bug Type: Compile Failure Bug description: Compile Fails as CGI with INFORMIX on SCO Hi, I can compile PHP 4.1.1 with Apache 1.3.20, Informix 7.2x, zlib, GD, PDFlib. But when trying to compile PHP as just a CGI for non-web use it fails. Using gnu build utils: gcc, gmake etc. configure line used: configure --without-mysql --with-informix I've tried messing about with different combinations of libraries but even if I get it a bit further,sometimes through make, it then fails on make install. I really need to get this to work otherwise I'm **! If any further info is needed please ask. Regards, - Paul - Error output: *** Warning: Linking the shared library libphp4.la against the *** static library /usr/lib/libgen.a is not portable! /bin/ksh /usr/src/php-4.1.1/libtool --silent --mode=link gcc -I. -I/usr/src/php- 4.1.1/ -I/usr/src/php-4.1.1/main -I/usr/src/php-4.1.1 -I/usr/src/php-4.1.1/Zend -I/usr/informix/incl/esql -I/usr/src/php-4.1.1/ext/xml/expat -I/usr/src/php-4.1 .1/TSRM -g -O2 -o php -export-dynamic stub.lo libphp4.la Undefined first referenced symbol in file getspnam/usr/informix/lib/esql/libifos.so php: fatal error: Symbol referencing errors. No output written to php collect2: ld returned 1 exit status gmake[1]: *** [php] Error 1 gmake[1]: Leaving directory `/usr/src/php-4.1.1' gmake: *** [all-recursive] Error 1 -- Edit bug report at http://bugs.php.net/?id=15364edit=1 -- Fixed in CVS:http://bugs.php.net/fix.php?id=15364r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=15364r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=15364r=needtrace Try newer version: http://bugs.php.net/fix.php?id=15364r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=15364r=support Expected behavior: http://bugs.php.net/fix.php?id=15364r=notwrong Not enough info: http://bugs.php.net/fix.php?id=15364r=notenoughinfo -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] CVS Account Request: daniel.paul
Ich wanna help translating the manual to german language. For example the printer functions are not translated yet. With best regards Daniel Paul -- 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 #15155 Updated: Mailparse causes segfault in DSO, apxs2
ID: 15155 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Status: Feedback Status: Open Bug Type: Mailparse related Operating System: RedHat 6.2 PHP Version: 4.1.1 New Comment: configure this time was: --prefix=/a2 --with-apxs2=/a2/bin/apxs --enable-mailparse --enable-debug using snap: php4-200201211500 backtrace: (gdb) bt #0 0x807b36c in zend_register_functions (functions=0x818fc80, function_table=0x0, type=1, tsrm_ls=0x81aab38) at zend_API.c:1033 #1 0x807b550 in zend_register_module (module=0x818fd40) at zend_API.c:1099 #2 0x807b30a in zend_startup_module (module=0x818fd40) at zend_API.c:1010 #3 0x808467e in php_startup_extensions (ptr=0x818fc40, count=9) at main.c:782 #4 0x808d579 in php_startup_internal_extensions () at internal_functions_cli.c:62 #5 0x8084b0d in php_module_startup (sf=0x818c1c0) at main.c:939 #6 0x80618e6 in main (argc=1, argv=0xbd14) at php_cli.c:355 Previous Comments: [2002-01-21 22:32:54] [EMAIL PROTECTED] Please compile with --enable-debug and provide a backtrace. Also try to minimize the options to configure to those which still reproduce your crash. [2002-01-21 20:24:37] [EMAIL PROTECTED] Every time i compile as DSO for Apache2 it segfaults on startup!, also happens on php4-200201211500 snap. configure was: --prefix=/a2 --with-apxs2=/a2/bin/apxs --enable-track-vars --enable-sockets --enable-ftp --enable-magic-quotes --with-mysql --with-zlib --with-gettext --with-imap --with-xml --enable-inline-optimization --with-curl --enable-mailparse Edit this bug report at http://bugs.php.net/?id=15155edit=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 #15155: Mailparse causes segfault in DSO, apxs2
From: [EMAIL PROTECTED] Operating system: RedHat 6.2 PHP version: 4.1.1 PHP Bug Type: Mailparse related Bug description: Mailparse causes segfault in DSO, apxs2 Every time i compile as DSO for Apache2 it segfaults on startup!, also happens on php4-200201211500 snap. configure was: --prefix=/a2 --with-apxs2=/a2/bin/apxs --enable-track-vars --enable-sockets --enable-ftp --enable-magic-quotes --with-mysql --with-zlib --with-gettext --with-imap --with-xml --enable-inline-optimization --with-curl --enable-mailparse -- Edit bug report at: http://bugs.php.net/?id=15155edit=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 #15128: php_java array access
From: [EMAIL PROTECTED] Operating system: Any PHP version: 4.1.1 PHP Bug Type: Feature/Change Request Bug description: php_java array access Hello, Currently under the php_java extension to access array elements you must pull the whole array/hashtable into a php variable before you can access its elements. e.g. r.java ### import java.util.*; public class r { public Hashtable y = new Hashtable(); public void r() { y.put(x,xx); } } ### ?php $je = new Java(r); $je-r(); $ht = $je-y; echo $ht[x]; ? It would be much nicer (and more php'esque) to access the array and hashtable variables directly like so :- ?php $je = new Java(r); $je-r(); echo $je-y[x]; ? As a trial I ported my custom database access class to Java JDBC with connection pooling, which went very smoothly bar this one difference (I have relied heavily on '$je- y[x];' style access in my arrays in my pages). I have had a little stab at figuring out from the source how to implement this, but it is beyond my abilities. Hence my feature request. REGARDS Paul -- Edit bug report at: http://bugs.php.net/?id=15128edit=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: [PEAR-DEV] magic_quotes_gpc Off (was Re: [PEAR-DEV] Pearwebsite and magic quotes)
At 23:34 +0100 1/15/02, Tomas V.V.Cox wrote: Lukas Smith wrote: Actually the default is on and even though I do not like them myself I think this is what most people develop against. So I guess it might make things easier if you keep it on as well. I don't think it makes things easy. See what magic_quotes_gpc means: I don't either. If you're going to check or preprocess your information before inserting it into MySQL (and dumping data received from users straight into MySQL is, er, imprudent), you have to strip the slashes anyway. quote in the MySQL style all the variables that comes from POST, GET or COOKIES. So the default php installation blatanly assumes that: All the vars you get from forms or cookies will be inserted in a MySQL database by a user who doesn't take care on quoting data before inserting (or it will result in duble quoting), does this make any sense? Just for informing people about this: turn off magic_quotes_gpc if you use placeholders (prepare/execute) with PEAR DB!! Tell people that they should take care of quoting data by them selves and tell them that there is nice mysql_escape_string() func for that. At least will be kind if the build process could put this directive to Off if you use --without-mysql and also if more backends are specified. Anyways you can of course make your code aware of this feature and if its on or off (get_magic_quotes() ... iirc) . That is not always posible as many times you are unable to know if a var comes from GPC untouched or not. It's even worse, because people are not able to disable magic_quotes_gpc with ini_set() (for people who doesn't have access to php.ini or .htaccess). Just my wishes to see a change on this. Tomas V.V.Cox -- 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 #6617 Updated: JVM starts only on 3 requests per httpd
ID: 6617 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Status: Feedback Status: Closed Bug Type: Java related Operating System: LinuxPPC 2000 PHP Version: 4.0.4pl1 New Comment: This now works in 4.1.1 Previous Comments: [2002-01-11 16:46:00] [EMAIL PROTECTED] How does this behave under PHP 4.1.1? [2001-01-16 20:47:52] [EMAIL PROTECTED] Hi James, Still failing, but on the 7th request. CHEERS Paul [2001-01-07 11:01:12] [EMAIL PROTECTED] Can you please ugrade and give feedback if it now works/still fails. James [2000-09-07 18:25:58] [EMAIL PROTECTED] As per Bug id # 6122 ./configure --with-mysql=/usr/local \ --with-java=/usr/local/java/j2sdk1.3 \ --with-sybase=/usr/local/freetds \ --with-apxs=/home/internet/www02/bin/apxs \ --enable-shared \ --enable-track-vars Using Blackdown JDK 1.2.2 And a modified JDK 1.3 - modified as the lack of HotSpot caused .so load failures !! From php.ini [java] extension_dir=/usr/local/lib/php/extensions/no-debug-non-zts-2809 extension=libphp_java.so java.class.path=/usr/local/lib/php_java.jar java.library.path=/usr/local/lib:/usr/local/lib/php/extensions/no-debug-non-zts-2809 The jver.php test script html ? $system = new Java(java.lang.System); print Java version=.$system-getProperty(java.version). br\n; print Java vendor=.$system-getProperty(java.vendor). p\n\n; print OS=.$system-getProperty(os.name). . $system-getProperty(os.version). on . $system-getProperty(os.arch). br\n; $formatter = new Java(java.text.SimpleDateFormat, , dd, 'at' h:mm:ss a ); print $formatter-format(new Java(java.util.Date)).\n; ? /html The first 3 runs work correctly then the fourth through (approx) seventh fail and there is 1 more success followed by failure. Apache must then be killed manually. The error text is :- error: Fatal error: Unable to create Java Virtual Machine in ... I noted [EMAIL PROTECTED]'s comment to use Tomcat, I'm off in that direction now, but I would prefer this method. ! ! PHP RULES ! ! Edit this bug report at http://bugs.php.net/?id=6617edit=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 #14394: Problem with line 1457 archive_cmds
From: [EMAIL PROTECTED] Operating system: Mac OSX 10.1 PHP version: 4.0.6 PHP Bug Type: Compile Failure Bug description: Problem with line 1457 archive_cmds When compiling PHP on MacOSX 10.1 you must update line 1457 of the ltconfig file. Trying to compile the source code from php.net as is results in this error: /usr/bin/ld: -undefined error must be used when - twolevel_namespace is in effect make[1]: *** [libphp4.la] Error 1 make: *** [all-recursive] Error 1 Original source line# 1457 of ltconfig downloaded from php.net: archive_cmds='$CC -bundle -undefined suppress -o $lib $libobjs $deplibs $linkopts' What must be used on line 1457 of ltconfig to successfully compile: archive_cmds='$CC -force_flat_namespace -bundle -undefined suppress -o $lib $libobjs $deplibs $linkopts' It took me a long time to find the answer for this problem. There is an article on the Apple developer pages that gave me the change, but they have the wrong line number listed [maybe the source has been updated] Article that told me how to fix it: http://developer.apple.com/internet/macosx/php.html -- Edit bug report at: http://bugs.php.net/?id=14394edit=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 #14394 Updated: Problem with line 1457 archive_cmds
ID: 14394 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Compile Failure Operating System: Mac OSX 10.1 Old PHP Version: 4.0.6 PHP Version: 4.1.0 New Comment: Problem also exists in 4.1 Previous Comments: [2001-12-09 11:33:47] [EMAIL PROTECTED] When compiling PHP on MacOSX 10.1 you must update line 1457 of the ltconfig file. Trying to compile the source code from php.net as is results in this error: /usr/bin/ld: -undefined error must be used when - twolevel_namespace is in effect make[1]: *** [libphp4.la] Error 1 make: *** [all-recursive] Error 1 Original source line# 1457 of ltconfig downloaded from php.net: archive_cmds='$CC -bundle -undefined suppress -o $lib $libobjs $deplibs $linkopts' What must be used on line 1457 of ltconfig to successfully compile: archive_cmds='$CC -force_flat_namespace -bundle -undefined suppress -o $lib $libobjs $deplibs $linkopts' It took me a long time to find the answer for this problem. There is an article on the Apple developer pages that gave me the change, but they have the wrong line number listed [maybe the source has been updated] Article that told me how to fix it: http://developer.apple.com/internet/macosx/php.html Edit this bug report at http://bugs.php.net/?id=14394edit=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] CVS Account Request: spooky
Hello. I want to help translating PHP docs and other things into romanian. -- 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 #13216 Updated: Removal of redundant function call
ID: 13216 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Feature/Change Request Operating System: Debian GNU/Linux PHP Version: 4.0.6 New Comment: Grr web interface: http://www.bubblesworth.com/php4.cvs2.diff Previous Comments: [2001-09-08 22:38:10] [EMAIL PROTECTED] Since the webform saw fit to mangle my patch, it's available at a href=http://www.bubblesworth.com/php4.cvs1.diff;http://www.bubblesworth.com/php4.cvs1.diff/a [2001-09-08 22:31:18] [EMAIL PROTECTED] Since encoded_value is set depending only on whether z_value is NULL(0) or not, surely there's no need to check Z_STRVAL_PP(z_value) before using encoded_value, and it just adds stuff to the normal execution path. At this point, we know either z_value is null, or Z_STRLEN_PP(z_value) is not 0. --- ext/standard/head.c.cvs Sun Sep 9 12:13:27 2001 +++ ext/standard/head.c.new Sun Sep 9 12:32:00 2001 @@ -142,7 +142,7 @@ sprintf(cookie, Set-Cookie: %s=deleted; expires=%s, Z_STRVAL_PP(z_name), dt); efree(dt); } else { - sprintf(cookie, Set-Cookie: %s=%s, Z_STRVAL_PP(z_name), (z_value Z_STRVAL_PP(z_value)) ? encoded_value : ); + sprintf(cookie, Set-Cookie: %s=%s, Z_STRVAL_PP(z_name), z_value ? +encoded_value : ); if (expires 0) { strcat(cookie, ; expires=); dt = php_std_date(expires); -- Paul TBBle Hampson Edit this bug report at http://bugs.php.net/?id=13216edit=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 #13217 Updated: Removal of unneeded code from execution flow.
ID: 13217 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Feature/Change Request Operating System: Debian GNU/Linux PHP Version: 4.0.6 New Comment: Grr web interface: http://www.bubblesworth.com/php4.cvs2.diff Previous Comments: [2001-09-08 22:37:15] [EMAIL PROTECTED] If (z_value ZZ_STRLEN_PP(z_value) == 0) then encoded_value isn't used. So no need to generate it, surely? This patch'll be mangled by the wrapping in the window, so it's available at a href=http://www.bubblesworth.com/php4.cvs2.diff;http://www.bubblesworth.com/php4.cvs2.diff/a --- ext/standard/head.c.cvs Sun Sep 9 12:13:27 2001 +++ ext/standard/head.c.new Sun Sep 9 12:39:47 2001 @@ -118,7 +118,7 @@ if (z_name) { len += Z_STRLEN_PP(z_name); } - if (z_value) { + if (z_value Z_STRLEN_PP(z_value) != 0) { int encoded_value_len; encoded_value = php_url_encode(Z_STRVAL_PP(z_value), Z_STRLEN_PP(z_value), encoded_value_len); Edit this bug report at http://bugs.php.net/?id=13217edit=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 #13216 Updated: Removal of redundant function call
ID: 13216 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Feature/Change Request Operating System: Debian GNU/Linux PHP Version: 4.0.6 New Comment: Grr idiot at keyboard. (That other patch is for #13217) http://www.bubblesworth.com/php4.cvs1.diff Previous Comments: [2001-09-08 22:38:45] [EMAIL PROTECTED] Grr web interface: http://www.bubblesworth.com/php4.cvs2.diff [2001-09-08 22:38:10] [EMAIL PROTECTED] Since the webform saw fit to mangle my patch, it's available at a href=http://www.bubblesworth.com/php4.cvs1.diff;http://www.bubblesworth.com/php4.cvs1.diff/a [2001-09-08 22:31:18] [EMAIL PROTECTED] Since encoded_value is set depending only on whether z_value is NULL(0) or not, surely there's no need to check Z_STRVAL_PP(z_value) before using encoded_value, and it just adds stuff to the normal execution path. At this point, we know either z_value is null, or Z_STRLEN_PP(z_value) is not 0. --- ext/standard/head.c.cvs Sun Sep 9 12:13:27 2001 +++ ext/standard/head.c.new Sun Sep 9 12:32:00 2001 @@ -142,7 +142,7 @@ sprintf(cookie, Set-Cookie: %s=deleted; expires=%s, Z_STRVAL_PP(z_name), dt); efree(dt); } else { - sprintf(cookie, Set-Cookie: %s=%s, Z_STRVAL_PP(z_name), (z_value Z_STRVAL_PP(z_value)) ? encoded_value : ); + sprintf(cookie, Set-Cookie: %s=%s, Z_STRVAL_PP(z_name), z_value ? +encoded_value : ); if (expires 0) { strcat(cookie, ; expires=); dt = php_std_date(expires); -- Paul TBBle Hampson Edit this bug report at http://bugs.php.net/?id=13216edit=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 #12700 Updated: 502 Gateway Error/Failed to Return Headers
ID: 12700 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: IIS related Operating System: Windows 2000 Server PHP Version: 4.0.6 New Comment: Apologies, After further searching though your bug database this appears to be a duplicate of #12562 and possibly #11788/#9852. I would like to stress this is a serious issue for me. Thanks, - Paul. Previous Comments: [2001-08-11 12:40:08] [EMAIL PROTECTED] I have installed and setup 4 different Windows 2000 Server Pro/Advanced machines with IIS, PHP 4.0.6, MSSQL Server 2000 and 7. All systems have variations in hardware configurations and performance, all of the systems have this identical problem. In the last 5 days there have been around 2000 site hits. IIS has logged 24 occurrences of a 504 Gateway error. And returns CGI Failed to return headers. This error is *very* random. Out of the 35 .php documents, the error has occurred on 6. These 6 are also the most frequently requested documents on the server. These documents are otherwise error free. Its not too hard to recreate the error. Several repeated requests of the same document that performs database requests will generate the error. To me, it seems *completely* random. I have setup IIS to point to a document that causes a page refresh on a 502 error. The refresh action re-posts the page and the page will display correctly. This is a critical problem for me. I have modified the IIS 502 error report document reload and resubmit the page that generated the error. The only way I can re-create the crash is by hitting the same page UserDetail.php 10 times in 10 seconds. The 10th request generated a 502 gateway error. NOTE: Crash still happens during normal activity as well. IIS Logs: 200 Mozilla/4.0+(compatible;+MSIE+5.5;+Windows+NT+4.0) 2001-07-11 19:25:17 205.150.207.2 - 205.150.207.20 80 GET /directory/UserDetail.php SID=f2b31876e1822c10425ea4e1d13c01f3FriendStatusChange=1UserToView=5Search=3 200 Mozilla/4.0+(compatible;+MSIE+5.5;+Windows+NT+4.0) 2001-07-11 19:25:18 205.150.207.2 - 205.150.207.20 80 GET /directory/UserDetail.php SID=f2b31876e1822c10425ea4e1d13c01f3FriendStatusChange=1UserToView=5Search=3 200 Mozilla/4.0+(compatible;+MSIE+5.5;+Windows+NT+4.0) 2001-07-11 19:25:18 205.150.207.2 - 205.150.207.20 80 GET /directory/UserDetail.php SID=f2b31876e1822c10425ea4e1d13c01f3FriendStatusChange=1UserToView=5Search=3 200 Mozilla/4.0+(compatible;+MSIE+5.5;+Windows+NT+4.0) 2001-07-11 19:25:18 205.150.207.2 - 205.150.207.20 80 GET /directory/UserDetail.php SID=f2b31876e1822c10425ea4e1d13c01f3FriendStatusChange=1UserToView=5Search=3 502 Mozilla/4.0+(compatible;+MSIE+5.5;+Windows+NT+4.0) ^^ note the 502 Gateway error in the last line of the log. no backtrace, you have no instructions on how to capture this in win32? Thanks for your attention, - Paul Edit this bug report at http://bugs.php.net/?id=12700edit=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 #10800 Updated: File uploads take ~70 times longer than downloading files on Apache/PHP.
ID: 10800 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Status: Feedback Status: Open Bug Type: HTTP related Operating System: NT 2000 PHP Version: 4.0.5 New Comment: I'm sorry it took so long in getting back Andy. Your question: Could you please include the script that accepts the form input and uploads the file (the ACTION param of the form.) Here it is: if (!$tmp_file = get_cfg_var('upload_tmp_dir')) { $tmp_file = dirname(tempnam('', '')); } $tmp_file .= '/' . basename($userfile); // Admin may have trailing slash in php.ini... // Did it upload? */ if (ereg_replace('/+', '/', $tmp_file) == $userfile); copy($userfile, $basedir/$name); echo Success verbage goes here.; } else { echo Some kind of warning goes here.; } Thanks Andy, Paul Previous Comments: [2001-08-07 12:27:00] [EMAIL PROTECTED] status - feedback [2001-07-21 21:46:17] [EMAIL PROTECTED] Could you please include the script that accepts the form input and uploads the file (the ACTION param of the form.) -Andy [2001-05-10 17:51:00] [EMAIL PROTECTED] I logged this prior to PHP 4.0.5 and was told to do it again if it still occurs. Please help: ID: 9294 Updated by: andi Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Closed Bug Type: Performance problem PHP Version: 4.0.2 Assigned To: Comments: Please try PHP 4.0.4pl1 or 4.0.5 which is due out tomorrow and open a new bug report if this still happens. Previous Comments: --- [2001-02-16 03:59:04] [EMAIL PROTECTED] Sorry - I'm also using code like this to do the upload: FORM ENCTYPE=multipart/form-data ACTION=_URL_ METHOD=POST INPUT TYPE=hidden name=MAX_FILE_SIZE value=2 Send this file: INPUT NAME=userfile TYPE=file INPUT TYPE=submit VALUE=Send File /FORM --- [2001-02-16 03:57:16] [EMAIL PROTECTED] When performing a file upload, PHP runs the CPU to 100% and takes 3.5-4 minutes on a Pentium III 850MHz CPU to upload a 10MB file when downloading the same file on Apache/PHP only takes 3 seconds on the same host and client. It appears the file is being parsed when being uploaded. Is there an option to tell PHP to upload the data and nothing else? Otherwise, it is roughly 70 times slower to upload a file than to download one. I'm using Nusphere's CD when installing the software. Edit this bug report at http://bugs.php.net/?id=10800edit=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 #12452: Parsing error in eval function
From: [EMAIL PROTECTED] Operating system: Linux 2.4.3 (Mandrake) PHP version: 4.0.6 PHP Bug Type: Unknown/Other Function Bug description: Parsing error in eval function Using a buffer variable to collect HTML output as the script progresses, at the end of the script using eval to output (and parse) the buffer. However, first line of ouput is as follows: ?xml version=1.0 encoding=UTF-8? This causes a parse error; I would guess this is because PHP is not strict on the text that follows ?, hence the fact that it is xml does not register and it gives (as expected) a parse error. Surely this should not cause a parse error. A similar script to the part I use is included below: ?php $page_output=?xml . ?htmlhead./html; eval(?$page_output); ? -- Edit bug report at: http://bugs.php.net/?id=12452edit=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 #12374: PHP Manual
From: [EMAIL PROTECTED] Operating system: Linux 2.4.3 PHP version: 4.0.6 PHP Bug Type: Feature/Change Request Bug description: PHP Manual The user comments at the bottom of each page are invaluable. Perhaps periodically, you could provide a gzipped mirror of these included in the manual. This would no doubt be very successful. -- Edit bug report at: http://bugs.php.net/?id=12374edit=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: Bug #12374: PHP Manual
[EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED] Operating system: Linux 2.4.3 PHP version: 4.0.6 PHP Bug Type: Feature/Change Request Bug description: PHP Manual The user comments at the bottom of each page are invaluable. Perhaps periodically, you could provide a gzipped mirror of these included in the manual. This would no doubt be very successful. Sorry, Should not have submitted that as a bug really. I have just found these newsgroups!! Paul -- web: http://myitcv.org.uk/ email: [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 Manual
Dear php.dev The user comments at the bottom of each page are invaluable. Perhaps periodically, you could provide a gzipped mirror of these included in the manual. This would no doubt be very successful. Paul -- web: http://myitcv.org.uk/ email: [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Bug #11489 Updated: Sybase query result is gettingdestructed
Joey Smith wrote: Paul: Right. It seems the other situations that caused the bug to appear have closed, but I still intend to apply your patch as soon as I have a spare moment. Thanks. :) Thank you for all your effort. However, I was able to get cvs access and I checked-in the my fix into version 1.52 of sybase_ct/php_sybase_ct.c. Thanks again for all your help. -- Paul Moosman [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] Reworking DOMXML
I prefer style #1 as well -- it preserves backward compatability and is consistent with the libxml2 docs. On Thursday 19 July 2001 07:44, Gavin Sherry wrote: Hi Joey, Good to see some work going on with DOMXML =). On Wed, 18 Jul 2001, Joey Smith wrote: I think it is a good idea to keep both the procedural and object oriented interfaces in the code. This should be kept, at least up until a new major PHP release occurs. Style #1: The dom_document object is always the FIRST parameter to the function, if called as a procedure and NOT as a method on a dom_document object. Pro: This seems cleaner, as the user will ALWAYS know where the object belongs. Con: This might confuse the oop users, as the documentation does not currently clearly distinguish the two interfaces. I am in favour of this style. Two reasons: it is a loose convention in development to have the first argument to a function/procedure be the object/variable the function/procedure is primarily concerned with. The second reason then stems from this: libxml always takes the xml doc pointer as the first argument. A difference between the two of them is bad form and could lead to confusing code. Style #2: The dom_document object is always LAST. Pros: Simplest to implement with code as it currently stands. Seems to be the way many other functions have been written. Cons: User will have to remember all arguments of all functions and pass SOMEthing, even if that means passing NULLs or something. Not necessarily. But in cases when you cannot easily identify which argument is which except by position, this will run against the conventional interfacing style of PHP. Gavin -- Paul Marquis [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] Re: Bug #12153 Updated: Failure to find libraries
At 22:20:28 on Fri, 13 Jul 2001, Bug Database wrote ID: 12153 Updated by: rasmus Reported By: [EMAIL PROTECTED] Old Status: Status: Closed Bug Type: Compile Failure Operating System: SuSE Linux 7.1 PHP Version: 4.0.6 New Comment: [2001-07-13 17:21:21] [EMAIL PROTECTED] I cannot get php to successfully complete the configure script when I attempt to add GD support. [2001-07-13 17:24:47] [EMAIL PROTECTED] --with-gd=/usr as per the example in the INSTALL file [2001-07-13 18:17:07] [EMAIL PROTECTED] I had previously tried that, and also --with-gd=shared. I just tried it again. Same deal. Never put lib nor include as part of a --with flag. ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=12153edit=2 I wanted to say thank you without cluttering up the bug database... Many thanks. That was the answer. All the best, -- Paul Rees -- 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] ext/dom/php_domxml.c patch
Attached is a patch to ext/dom/php_domxml.c that adds the ability to set the context node when running xpath_eval(). xpath_eval() (and xpath_eval_expression()) can now accept and optional second parameter that is the context node. If no argument is specified, it works as before. This patch is against the head of the CVS tree. I also have a patch for the 4.0.6 version of this file for those who need/want it. BTW, has a decision been made about what interface to domxml will be in the next release of PHP? -- Paul Marquis [EMAIL PROTECTED] Index: php_domxml.c === RCS file: /repository/php4/ext/domxml/php_domxml.c,v retrieving revision 1.40 diff -u -r1.40 php_domxml.c --- php_domxml.c8 Jul 2001 00:54:25 - 1.40 +++ php_domxml.c10 Jul 2001 21:34:10 - @@ -2456,19 +2456,37 @@ static void php_xpathptr_eval(INTERNAL_FUNCTION_PARAMETERS, int mode, int expr) { - zval *id, *str, *rv; + zval *id, *str, *contextnode, *rv; xmlXPathContextPtr ctxp; xmlXPathObjectPtr xpathobjp; +xmlNode *contextnodep; int ret; - if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, str) == FAILURE) { - WRONG_PARAM_COUNT; - } +contextnode = NULL; +contextnodep = NULL; +switch (ZEND_NUM_ARGS()) { +case 1: +if (getParameters(ht, 1, str) == FAILURE) { +WRONG_PARAM_COUNT; +} +break; +case 2: +if (getParameters(ht, 2, str, contextnode) == FAILURE) { +WRONG_PARAM_COUNT; +} +break; +default: +WRONG_PARAM_COUNT; +} id = getThis(); ctxp = php_xpath_get_context(id, le_xpathctxp, 0); convert_to_string(str); +if (contextnode) { +contextnodep = php_dom_get_object(contextnode, le_domxmlnodep, 0); +} +ctxp-node = contextnodep; #if defined(LIBXML_XPTR_ENABLED) if(mode == PHP_XPTR) { xpathobjp = xmlXPtrEval(BAD_CAST str-value.str.val, ctxp); @@ -2481,7 +2499,7 @@ #if defined(LIBXML_XPTR_ENABLED) } #endif - +ctxp-node = NULL; if (!xpathobjp) { RETURN_FALSE; } -- 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] ext/dom/php_domxml.c patch
On Wednesday 11 July 2001 00:54, Andi Gutmans wrote: At 07:00 PM 7/10/2001 -0400, Paul Marquis wrote: Attached is a patch to ext/dom/php_domxml.c that adds the ability to set the context node when running xpath_eval(). xpath_eval() (and xpath_eval_expression()) can now accept and optional second parameter that is the context node. If no argument is specified, it works as before. This patch is against the head of the CVS tree. I also have a patch for the 4.0.6 version of this file for those who need/want it. BTW, has a decision been made about what interface to domxml will be in the next release of PHP? This is a good question. For 4.0.6 we rolled back DOM/XML. What do you think should be done for 4.0.7? Will 4.0.6 users be able to upgrade? What is the status of the module today vs. before? Well, the first thing you need to do is commit my patch. :-P The code at the head of the tree is a lot cleaner and fixes many memory leaks from the version in 4.0.6. However, backward compatability is not preserved, though I think it can be added back with a little work while preserving the new API. I have a few nits with the new API, such as not all the DOM objects set the type field making tree traversal semi-problematic, but I like the OO interface much better. FWIW, when we upgraded to PHP 4.0.6, we opted to gut the packaged DOM/XML extension in favor of the version at the head of the tree because there were too many bugs in the packaged version. As we were early in our development cycle, we didn't have much code to convert. I'd be willing to help out in any way I can to bring this module up to snuff. -- Paul Marquis [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 #11737 Updated: File upload generates warning
ID: 11737 User Update by: [EMAIL PROTECTED] Status: Open Bug Type: HTTP related Operating system: Redhat 7.0 PHP Version: 4.0.5 Description: File upload generates warning Unfortunately I do not have time to test PHP 4.0.6. I'm on holiday for the next two weeks so I won't be testing it before august. However let me try to explain the letter a little better. A multipart MIME has a closing boundary. The term closing boundary is defined in RFC 1521. Data after the closing boundary should be ignored. PHP does not test for this closing boundary. This means that it does not detect the end of the multipart MIME but considers the bytes following the closing boundary as a new part of the MIME document. This causes the warning. I used a perl script to generate the problem. The perl script implements the example in the manual page of HTTP::Request::Common where they explain how to upload files. It is based on the perl libwww module. I hope that this clarifies the problem Regards Paul Previous Comments: --- [2001-06-28 11:27:17] [EMAIL PROTECTED] Unfortunately I do not have time to test PHP 4.0.6. I'm on holiday for the next two weeks so I won't be testing it before august. However let me try to explain the letter a little better. A multipart MIME has a closing boundary. The term closing boundary is defined in RFC 1521. Data after the closing boundary should be ignored. PHP does not test for this closing boundary. This means that it does not detect the end of the multipart MIME but considers the bytes following the closing boundary as a new part of the MIME document. This causes the warning. I used a perl script to generate the problem. The perl script implements the example in the manual page of HTTP::Request::Common where they explain how to upload files. It is based on the perl libwww module. I hope that this clarifies the problem Regards Paul --- [2001-06-27 13:38:36] [EMAIL PROTECTED] Please try PHP 4.0.6 first.There were couple of fixes in it which might have fixed this too. And with which browser can this be reproduced? --Jani --- [2001-06-27 10:09:08] [EMAIL PROTECTED] When uploading a file using post, data after a closing boundary (see rfcs 1876 and 1521). This is a boundary with two dashes added to it. If this is the case the remainder of the content can be ignored. If there are more then two bytes after the last boundary in the file PHP will issue a(n unappropriate) warning saying that its MIME headers are garbled. I modified ./main/rfc1876.c as follows: (diff -p output) *** rfc1867.c.good Wed Jun 27 15:50:32 2001 --- rfc1867.c Wed Jun 27 15:50:12 2001 *** static void php_mime_split(char *buf, in *** 142,147 --- 142,152 eolsize = 1; } + if(*(loc+len)=='-' *(loc+len+1)=='-' ) { + Done=1; + break; + } + rem -= (loc - ptr) + len + eolsize; ptr = loc + len + eolsize; } else { Good luck to you Paul --- Full Bug description available at: http://bugs.php.net/?id=11737 -- 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] [PATCH] sybase_ct connection reference count
Bug #11489 Attached is a patch to php_sybase_ct.c version 1.47 that fixes bug #11489 -- Paul Moosman [EMAIL PROTECTED] Index: php_sybase_ct.c === RCS file: /repository/php4/ext/sybase_ct/php_sybase_ct.c,v retrieving revision 1.47 diff -u -r1.47 php_sybase_ct.c --- php_sybase_ct.c 2001/06/26 21:00:13 1.47 +++ php_sybase_ct.c 2001/06/28 19:19:06 @@ -640,6 +640,7 @@ link = (int) index_ptr-ptr; ptr = zend_list_find(link, type); /* check if the link is still there */ if (ptr (type==le_link || type==le_plink)) { + zend_list_addref(link); return_value-value.lval = SybCtG(default_link) = link; return_value-type = IS_RESOURCE; efree(hashed_details); @@ -678,6 +679,7 @@ } efree(hashed_details); SybCtG(default_link)=return_value-value.lval; + zend_list_addref(SybCtG(default_link)); } -- 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] Sybase query result problem - PATCH
There is a bug in the PHP sybase_ct module. Bug #11489 The following script produces the following error the second time getAppName/sybase_fetch_row is called. Error (warning): /users/pmoosman/test_data/test1.php(26) : Warning - 3 is not a valid Sybase result resource Script: ?php function getConnect() { $db = sybase_connect('','yyy','zzz'); return $db; } function getAppName($app_id) { // static $db; $sql = select name from web_apps where application_id=$app_id; $db = getconnect(); $result = sybase_query($sql, $db); $row = sybase_fetch_row($result); return $row[0]; } getAppName(23); getAppName(23); ? Note: If I uncomment the static $db line, the error (warning) goes away. I ran this script through the debugger and it looks like the db resource handle is getting incorrectly cleaned up. I compared php_sybase_ct.c to php_mysql.c and I noticed that php_mysql.c ups the reference count on db resource link and php_sybase_ct.c does not. So, my guess is that that is the problem. However, I'm new to PHP and I'm not very familiar with the Zend code, so I would appreciate someone with some Zend knowledge to look over my proposed fix. In my copy of php_sybase_ct.c version 1.43 I added the following two lines: Line #599: zend_list_addref(link); Line #638: zend_list_addref(SybCtG(default_link)); -- Paul Moosman [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] Sybase query result problem
I think there is a bug in the PHP sybase_ct module. The following script produces the following error the second time getAppName/sybase_fetch_row is called. Error (warning): /users/pmoosman/test_data/test1.php(26) : Warning - 3 is not a valid Sybase result resource Script: ?php function getConnect() { $db = sybase_connect('','yyy','zzz'); return $db; } function getAppName($app_id) { // static $db; $sql = select name from web_apps where application_id=$app_id; $db = getconnect(); $result = sybase_query($sql, $db); $row = sybase_fetch_row($result); return $row[0]; } getAppName(23); getAppName(23); ? Note: If I uncomment the static $db line, the error (warning) goes away. I ran this script through the debugger and it looks like the db resource handle is getting incorrectly cleaned up. I compared php_sybase_ct.c to php_mysql.c and I noticed that php_mysql.c ups the reference count on db resource link and php_sybase_ct.c does not. So, my guess is that that is the problem. However, I'm new to PHP and I'm not very familiar with the Zend code, so I would appreciate someone with some Zend knowledge to look over my proposed fix. In my copy of php_sybase_ct.c version 1.43 I added the following two lines: Line #599: zend_list_addref(link); Line #638: zend_list_addref(SybCtG(default_link)); Any help would be appreciated. -- Paul Moosman [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] RE: Bug #9280 Updated: HTTP/1.1 Expect: header not honoured
ID: 9280 Updated by: sniper Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Feedback Bug Type: Apache related Operating system: PHP Version: 4.0.4pl1 Assigned To: Comments: Do you have any example script that can be used to reproduce this behaviour? (I'm being lazy here.. :) First I created a simple PHP script which does nothing. I've called it null.php and it's in the root of my servers. It contains simply: BODY hello /BODY Now to test, I telnet to the web server port. First I connect to the machine with a stock PHP (4.0.4pl1) on it, and paste in the following: POST /null.php HTTP/1.1 Host: yellow.datatote.co.uk Content-Type: application/x-www-form-urlencoded Content-Length: 3 Accept: */* Expect: 100-continue Now I add an extra blank line after the Expect: header. Nothing happens. Next I connect to the machine with my modified PHP on it, and paste in: POST /null.php HTTP/1.1 Host: etweb_qa.datatote.co.uk Content-Type: application/x-www-form-urlencoded Content-Length: 3 Accept: */* Expect: 100-continue Now I add an extra blank line after the Expect: header. The web server responds with: HTTP/1.1 100 Continue This is as per the HTTP 1.1 spec (RFC 2068, section 8.2). To check that this behaviour is definitely PHP related, I created a dummy perl script (similar to the PHP one above) and return to the http port of the original machine (with unmodified PHP) and paste in: POST /cgi-bin/null.pl HTTP/1.1 Host: yellow.datatote.co.uk Content-Type: application/x-www-form-urlencoded Content-Length: 3 Accept: */* Expect: 100-continue Adding an extra blank line after the Expect: produces the correct HTTP/1.1 100 Continue line. This may not be quite what you wanted, but it should give you all the information you need to see the fault and to see that the fix works. Note that the two servers mentioned above are not publically accessible (sorry - development machines). I can provide public access to a null.php on a box with my patched PHP if that is any help. Also, we originally spotted this bug because someone was trying to use a standard URL fetch method using JRE 1.3 (I'm not a Java programmer so I don't know offhand what the method was). Hoep this helps, Paul. -- 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 #11583: Missing files
From: [EMAIL PROTECTED] Operating system: Windows 98 PHP version: 4.0.5 PHP Bug Type: Compile Problem Bug description: Missing files I have downloads the CVS version of php4.0.5 and i can compile php_pgsql.dll which is the only file i need, this error comes up. Configuration: pgsql - Win32 Debug_TS Compiling... pgsql.c c:\home\web\php4\main\php_network.h(28) : fatal error C1083: Cannot open include file: 'arpa/inet.h': No such file or directory Error executing cl.exe. pgsql.dll - 1 error(s), 0 warning(s) why cant i compile it and is there pre-compiled file? Paul -- Edit Bug report at: http://bugs.php.net/?id=11583edit=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 #10800: File uploads take ~70 times longer than downloading files on Apache/PHP.
From: [EMAIL PROTECTED] Operating system: NT 2000 PHP version: 4.0.5 PHP Bug Type: Apache related Bug description: File uploads take ~70 times longer than downloading files on Apache/PHP. I logged this prior to PHP 4.0.5 and was told to do it again if it still occurs. Please help: ID: 9294 Updated by: andi Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Closed Bug Type: Performance problem PHP Version: 4.0.2 Assigned To: Comments: Please try PHP 4.0.4pl1 or 4.0.5 which is due out tomorrow and open a new bug report if this still happens. Previous Comments: --- [2001-02-16 03:59:04] [EMAIL PROTECTED] Sorry - I'm also using code like this to do the upload: FORM ENCTYPE=multipart/form-data ACTION=_URL_ METHOD=POST INPUT TYPE=hidden name=MAX_FILE_SIZE value=2 Send this file: INPUT NAME=userfile TYPE=file INPUT TYPE=submit VALUE=Send File /FORM --- [2001-02-16 03:57:16] [EMAIL PROTECTED] When performing a file upload, PHP runs the CPU to 100% and takes 3.5-4 minutes on a Pentium III 850MHz CPU to upload a 10MB file when downloading the same file on Apache/PHP only takes 3 seconds on the same host and client. It appears the file is being parsed when being uploaded. Is there an option to tell PHP to upload the data and nothing else? Otherwise, it is roughly 70 times slower to upload a file than to download one. I'm using Nusphere's CD when installing the software. -- Edit Bug report at: http://bugs.php.net/?id=10800edit=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: Bug #10322 Updated: Logical error in fopen-wrappers.c
Jason, I have looked at the URL you supplied below, and yes there are some similarities - I presume because the routine used is a replica of the other "." special case. I take great offense at being accused of copying your code. Further, you will note that your patch also contains the bug in referencing PG(open_basedir) instead of simply basedir - the argument supplied to the function. 4.0.4pl1 references PG(open_basedir) like yours, so your claim below is false. There are two issues here - The logical error in the routine and the additional support for another special case. Your solution attempts to provide a patch to enable php to access any other file in a virtual document root. Further, I can see that your patch will *only* work of in php.ini you use VIRTUAL_DOCUMENT_ROOT as the first entry in open_basedir. So, in conclusion, don't you think it concievable that perhaps someone else wanted to do the same as you, and simply copied the already supplied code special case for "."? I've been a net-contributer to the net for many years, which you can see from my site www.pgregg.com - many people have released software or documents similar to my own - but I've never accused anyone of plagarism and never been accused of it before. Paul Gregg in message [EMAIL PROTECTED], Bug Database [EMAIL PROTECTED] writes: | ID: 10322 | Updated by: jason | Reported By: [EMAIL PROTECTED] | Old-Status: Open | Status: Bogus | Bug Type: PHP options/info functions | PHP Version: 4.0.4pl1 | Assigned To: | Comments: | | This is almost an exact copy of a patch I had submitted in October of 2000.(b |+efore I became a contributor). | http://marc.theaimsgroup.com/?l=php-devm=97145490702792w=2 | This idea (and many others) was on hold to a cleaner redesign of safe_mode. | | There is NO logical error, basedir is used, check the patch that YOU *suppose |+dly* submited, it uses basedir. | Please don't try and claim other peoples code as your own. | | Marked as Bogus | | -Jason | | | Previous Comments: | --- | | [2001-04-14 08:20:55] [EMAIL PROTECTED] | Thanks for the response, however, can you confirm that there is a logical cod |+ing error here? | | The DOCUMENT_ROOT patch is secondary and would be nice - but is the bug going |+ to be fixed in 4.0.5 ? | | Regards, | | Paul. | | --- | | [2001-04-14 05:34:04] [EMAIL PROTECTED] | This will not make it into 4.0.5 as this was branched a while back but it mig |+ht well make it into 4.0.6. Ill get a developer to look at this patch. | | - James | | --- | | [2001-04-13 20:57:35] [EMAIL PROTECTED] | I thought, while I'm here, I'd submit a patch to fix this. | | The patch also includes support for an additional special case in php.ini's o |+pen_basedir. | The current "." allows scripts to access files in the same directory as the s |+cript. | "DOCUMENT_ROOT" allows a script to access any other file in the virtualhost's |+ directory tree. DOCUMENT_ROOT is calculated by PATH_TRANSLATED and removing |+ SCRIPT_URI from the end - This conveniently works for both full Apache Virta |+lhosts and mod_aliased Mass virtual hosting (I don't know if this is true for |+ the newer mod_vhost - just check what PATH_TRANSLATED and SCRIPT_URI is set |+to in phpinfo() - if removing the latter from the former is the sites docroot |+ then you are away). | | Anyway, the patch: code shamelessly copied from the "." segment :) | | *** main/fopen-wrappers.c.orig Fri Apr 13 17:50:02 2001 | --- main/fopen-wrappers.c Sat Apr 14 01:46:28 2001 | *** | *** 141,151 | char resolved_name[MAXPATHLEN]; | char resolved_basedir[MAXPATHLEN]; | char local_open_basedir[MAXPATHLEN]; | int local_open_basedir_pos; | SLS_FETCH(); | | /* Special case basedir==".": Use script-directory */ | ! if ((strcmp(PG(open_basedir), ".") == 0) | SG(request_info).path_translated | *SG(request_info).path_translated | ) { | --- 141,167 | char resolved_name[MAXPATHLEN]; | char resolved_basedir[MAXPATHLEN]; | char local_open_basedir[MAXPATHLEN]; | + char *local_open_request_uri; | int local_open_basedir_pos; | SLS_FETCH(); | | + /* Special case basedir="DOCUMENT_ROOT": Restrict to directory of the | +* virtualhost itself as calculated by PATH_TRANSLATED - SCRIPT_URI | +* [EMAIL PROTECTED] | +*/ | + if ((strcmp(basedir, "DOCUMENT_ROOT") == 0) | + SG(request_info).path_translated | + *SG(request_info).path
RE: [PHP-DEV] PHP 4.0.5 Release Midgard Problems
As a user of PHP and Midgard, I'd just like to comment that my use of PHP is completely dependent on my perception of it's potential to embrace integrating applications like Midgard. I'd like to see Midgard do for PHP what Zope has done for Python in the way of increasing the level of penetration of the language. This won't happen unless it's easy to install a version of Midgard on top of a standard version of PHP. I love PHP, but generally I find the lack of applications such as Midgard a major disincentive to using it. I won't continue using it for long if this continues to be the case. It's already pretty tempting to drop it in favour of Java or Python. Paul 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]
[PHP-DEV] PHP 4.0 Bug #9861: get_meta_tags does not work if name/content values are single quoted
From: [EMAIL PROTECTED] Operating system: Linux PHP version: 4.0.4pl1 PHP Bug Type: Unknown/Other Function Bug description: get_meta_tags does not work if name/content values are single quoted A user contributed note suggests that get_meta_tags() attempts HTML 4.01 conformity. As the w3 documentation is (to me) a little unclear on this issue so I'm not sure if it's expected behaviour or not. -- Edit Bug report at: http://bugs.php.net/?id=9861edit=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 4.0 Bug #9294 Updated: File uploads take ~70 times longer than downloading files on Apache/PHP.
ID: 9294 User Update by: [EMAIL PROTECTED] Status: Open Bug Type: Performance problem Description: File uploads take ~70 times longer than downloading files on Apache/PHP. Sorry - I'm also using code like this to do the upload: FORM ENCTYPE="multipart/form-data" ACTION="_URL_" METHOD=POST INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="2" Send this file: INPUT NAME="userfile" TYPE="file" INPUT TYPE="submit" VALUE="Send File" /FORM Previous Comments: --- [2001-02-16 03:57:16] [EMAIL PROTECTED] When performing a file upload, PHP runs the CPU to 100% and takes 3.5-4 minutes on a Pentium III 850MHz CPU to upload a 10MB file when downloading the same file on Apache/PHP only takes 3 seconds on the same host and client. It appears the file is being parsed when being uploaded. Is there an option to tell PHP to upload the data and nothing else? Otherwise, it is roughly 70 times slower to upload a file than to download one. I'm using Nusphere's CD when installing the software. --- Full Bug description available at: http://bugs.php.net/?id=9294 -- 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 4.0 Bug #9153: not accessing 404 errorpage
From: [EMAIL PROTECTED] Operating system: solaris PHP version: 4.0.3 PHP Bug Type: *Web Server problem Bug description: not accessing 404 errorpage http://www.thesite.co.uk/bollocks_address.php will give a page not displayed message it possable to get this set to a defined error page?? this would help us a lot, as were using is for error reporting. zeus -- Edit Bug report at: http://bugs.php.net/?id=9153edit=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: PHP 4.0 Bug #9153 Updated: not accessing 404 errorpage
sorry my crap explaining 404 messages are handled by the zeus server, however because we running php in the cgi 'wrapper' mode, it finds php, but php can't find the file and it produces this error. so what i need is for php to redirect the request to out error pages. i belive that i we swapped to ISAPI this would proberly not be a problem, but that's proberly? any help would be gratfully recived. Bug Database wrote: ID: 9153 Updated by: derick Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Bogus Bug Type: *Web Server problem Assigned To: Comments: Not a php bug, add ErrorDocument 404 /path/to/doc.html into your httpd.conf Previous Comments: --- [2001-02-07 11:50:23] [EMAIL PROTECTED] http://www.thesite.co.uk/bollocks_address.php will give a page not displayed message it possable to get this set to a defined error page?? this would help us a lot, as were using is for error reporting. zeus --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9153edit=2 -- Wax New Media Agency The Waxworks Power Road Studios Power Road London W4 5PY T) +44 020 8742 1551 F) +44 020 8742 3774 ISDN) +44 020 8742 8989 Internet communications are not secure and therefore Wax Communications Computing Group and its subsidiary companies do not accept legal responsibility for the contents of this message. Any opinions stated are solely those of the author. -- 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: [PHP] PHP / NSAPI / Web server support
The change from request_translate_uri to rq-vars "path" also fixes the use of PATH_INFO and PHP as a default index. Without this, PHP halts without error on URI's like /app (with /app/index.php) or /script.php/commit. The same problems with PATH_INFO default index occur when running PHP as a CGI. I've made a few changes to cgi_main.c to fix this but havn't tested on anything but NES 362. I've been encountering quite a few bus error seg faults when using the NSAPI plugin (up to 5 a day) - these are usually caught by uxwdog. Anybody else found the same? I noticed also that the latest snapshot now includes the check for ieeefp.h. *** sapi/cgi/cgi_main.c.origSat Jan 20 00:09:12 2001 --- sapi/cgi/cgi_main.c Sat Jan 20 00:08:42 2001 *** *** 168,174 l += strlen(sn); if (pi) l += strlen(pi); ! if (pi sn !strcmp(pi, sn)) { l -= strlen(pi); pi = NULL; } --- 168,174 l += strlen(sn); if (pi) l += strlen(pi); ! if (pi sn !strncmp(pi, sn, strlen(sn))) { l -= strlen(pi); pi = NULL; } *** *** 314,323 --- 314,337 SG(request_info).request_method = getenv("REQUEST_METHOD"); SG(request_info).query_string = getenv("QUERY_STRING"); + /* SG(request_info).request_uri = getenv("PATH_INFO"); if (!SG(request_info).request_uri) { SG(request_info).request_uri = getenv("SCRIPT_NAME"); } + */ + + SG(request_info).request_uri = getenv("SCRIPT_NAME"); + if (SG(request_info).request_uri SG(request_info).argv0 +IS_SLASH(SG(request_info).request_uri[strlen(SG(request_info).request_uri)-1])) { + char *arg_file = strrchr(SG(request_info).argv0,DEFAULT_SLASH); + if (arg_file) { + char *script_name = +emalloc(strlen(SG(request_info).request_uri)+strlen(arg_file)+1); + strcpy(script_name,SG(request_info).request_uri); + strcat(script_name,arg_file+1); + SG(request_info).request_uri = script_name; + } + } + SG(request_info).path_translated = NULL; /* we have to update it later, when we have that information */ SG(request_info).content_type = getenv("CONTENT_TYPE"); SG(request_info).content_length = (content_length?atoi(content_length):0); *** *** 507,518 ap_php_optarg = orig_optarg; } init_request_info(SLS_C); SG(server_context) = (void *) 1; /* avoid server_context==NULL checks */ CG(extended_info) = 0; - SG(request_info).argv0 = argv0; - zend_llist_init(global_vars, sizeof(char *), NULL, 0); if (!cgi) { /* never execute the arguments if you are a CGI */ --- 521,532 ap_php_optarg = orig_optarg; } + SG(request_info).argv0 = argv0; + init_request_info(SLS_C); SG(server_context) = (void *) 1; /* avoid server_context==NULL checks */ CG(extended_info) = 0; zend_llist_init(global_vars, sizeof(char *), NULL, 0); if (!cgi) { /* never execute the arguments if you are a CGI */ *** sapi/nsapi/nsapi.c.orig Sat Jan 20 15:11:01 2001 --- sapi/nsapi/nsapi.c Sat Jan 20 15:31:34 2001 *** *** 101,106 --- 101,107 { "HTTP_ACCEPT_LANGUAGE", "accept-language" }, { "HTTP_AUTHORIZATION", "authorization" }, { "HTTP_COOKIE","cookie" }, + { "HTTP_CLIENT_IP", "client-ip" }, { "HTTP_IF_MODIFIED_SINCE", "if-modified-since" }, { "HTTP_REFERER", "referer" }, { "HTTP_USER_AGENT","user-agent" }, *** *** 445,457 char *query_string = pblock_findval("query", NSG(rq)-reqpb); char *uri = pblock_findval("uri", NSG(rq)-reqpb); char *path_info = pblock_findval("path-info", NSG(rq)-vars); ! char *path_translated = NULL; char *request_method = pblock_findval("method", NSG(rq)-reqpb); char *content_type = pblock_findval("content-type", NSG(rq)-headers); char *content_length = pblock_findval("content-length", NSG(rq)-headers); if (uri != NULL) path_translated = request_translate_uri(uri, NSG(sn)); #if defined(NSAPI_DEBUG) log_error(LOG_INFORM, "nsapi_request_ctor", NSG(sn), NSG(rq), --- 446,460 char *query_string = pblock_findval("query", NSG(rq)-reqpb); char *uri = pblock_findval("uri", NSG(rq)-reqpb); char *path_info = pblock_findval("path-info", NSG(rq)-vars); !