PHP version 4.3.2 is buggy. Do not upgrade

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri May 30, 2003 2:52 am    Post subject: PHP version 4.3.2 is buggy. Do not upgrade Reply with quote

Do not upgrade to this new version of PHP. It has a major bug when run in CGI mode. It displays the error "No input file specified".
We've inspected the source code and it seems that a portion in the PHP CGI wrapper file was removed with no apparent reason. That removal is the cause of that bug.
An older (and stable) version of PHP is available from our web site http://www.aprelium.com/data/php-4.3.0-installer.exe .
_________________
Support Team
Aprelium - http://www.aprelium.com


Last edited by aprelium on Tue Jul 29, 2003 4:08 pm; edited 1 time in total
Back to top View user's profile Send private message Send e-mail
Motionmaster
-


Joined: 21 Mar 2003
Posts: 5

PostPosted: Fri May 30, 2003 1:34 pm    Post subject: Reply with quote

Is PHP gonna upgrade the version which will fix the bug. Or is it just a compatibility problem between PHP 4.3.2 and Abyss WS?
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sat May 31, 2003 12:16 am    Post subject: Reply with quote

We've contacted the authors of the CGI wrapper of PHP to inform them about the problem and we're waiting for an anwser. If you're interested in the explanation, here is the mail we sent:

Quote:
...

Yesterday, after the official release of PHP 4.3.2, our support team was
flooded with emails saying that the new PHP is displaying "No input file
specified." instead of executing the scripts. Reverting to an old version of
PHP (4.3.1) makes things work fine again.

We downloaded the new source code of 4.3.2 and compared it with 4.3.1. I
found that a few lines in cgi_main.c in the new release were removed without
any explanation. Please compare:

PHP 4.3.2, sapi/cgi/cgi_main.c, Line 1417:
Code:
  if (retval == FAILURE && file_handle.handle.fp == NULL) {
   SG(sapi_headers).http_response_code = 404;
   PUTS("No input file specified.\n");
   php_request_shutdown((void *) 0);
   php_module_shutdown(TSRMLS_C);
   return FAILURE;
  }


PHP 4.3.1, sapi/cgi/cgi_main.c, line 1398:
Code:
  if (cgi && (retval == FAILURE)) {
   if(!argv0 || !(file_handle.handle.fp = VCWD_FOPEN(argv0, "rb"))) {
    PUTS("No input file specified.\n");
    php_request_shutdown((void *) 0);
    php_module_shutdown(TSRMLS_C);
    return FAILURE;
   }
   file_handle.filename = argv0;
   file_handle.opened_path = expand_filepath(argv0, NULL TSRMLS_CC);
  }

In the old version, the algorithm relies on the command line parameter agrv0
and so PHP can be run as Perl and other CGI interpreters without using the
PATH_TRANSLATED and PATH_INFO in a way inconsistent with what the CGI spec
says.

So why that way of doing things has been mysteriously removed in 4.3.2? Is
it a mistake or is it how PHP CGI will be from now on?

Best regards,


If the PHP team won't answer, we'll release our own patch since it is not normal that they does not retain backward compatibility with their wrapper.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
mille^
-


Joined: 31 May 2003
Posts: 1

PostPosted: Sat May 31, 2003 9:57 pm    Post subject: Reply with quote

I`m on your mail list...pleace let us now what happens
Back to top View user's profile Send private message
os17fan
-


Joined: 21 Mar 2003
Posts: 531
Location: USA

PostPosted: Sat May 31, 2003 10:28 pm    Post subject: Reply with quote

I have version PHP 4.3.1 , is that a bug also , i hope not , i hate installing PHP :?:
_________________
This web server is the best !
Back to top View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sun Jun 01, 2003 2:22 pm    Post subject: Reply with quote

For those who want to run PHP 4.3.2 with Abyss Web Server, download http://www.aprelium.com/data/phpwrap.zip .
It is a wrapper that emulates the wrong CGI PHP conventions used in the new version. Instructions are available inside the package.

Please give us your feedback about it.

Note: This wrapper is a temporary workaround until the situation becomes clearer. Until now, we haven't received any answer from the PHP guys.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Deledar
-


Joined: 26 Feb 2003
Posts: 94

PostPosted: Tue Jun 10, 2003 7:34 pm    Post subject: Reply with quote

Ins't the team of PHP the same as for Apache?
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Jun 11, 2003 3:41 am    Post subject: Reply with quote

Deledar wrote:
Ins't the team of PHP the same as for Apache?

Not really, PHP is an 'Apache project'. That means that they belong to the same foundation 'The Apache group', but the development team is not the same.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
TheLinker
-


Joined: 05 Apr 2002
Posts: 165
Location: Oslo, Norway

PostPosted: Thu Jun 12, 2003 9:18 pm    Post subject: Re: PHP version 4.3.2 is buggy. Do not upgrade Reply with quote

Any words from the PHP Team regarding this issue ?
Anyway, I had a closer look in the php-4.3.2-Win32.zip archive and found a new variable in the php.ini-dist file.

Setting cgi.fix_pathinfo = 1 in php.ini seems to fix the error with Abyss.
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Thu Jun 12, 2003 11:17 pm    Post subject: Re: PHP version 4.3.2 is buggy. Do not upgrade Reply with quote

TheLinker wrote:
Any words from the PHP Team regarding this issue ?
Anyway, I had a closer look in the php-4.3.2-Win32.zip archive and found a new variable in the php.ini-dist file.

Setting cgi.fix_pathinfo = 1 in php.ini seems to fix the error with Abyss.

Not yet, may be they are too busy to answer us!!!
Anyway, the wrapper code will be included in the new version of Abyss so the handling of the way PHP works will be automatic (It's a pity to support people playing with standards...)
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
TheLinker
-


Joined: 05 Apr 2002
Posts: 165
Location: Oslo, Norway

PostPosted: Thu Jun 12, 2003 11:32 pm    Post subject: Re: PHP version 4.3.2 is buggy. Do not upgrade Reply with quote

This explains what cgi.fix_pathinfo do:
Code:
; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.  PHP's
; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
; what PATH_INFO is.  For more information on PATH_INFO, see the cgi specs.  Setting
; this to 1 will cause PHP CGI to fix it's paths to conform to the spec.  A setting
; of zero causes PHP to behave as before.  Default is zero.  You should fix your scripts
; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.

cgi.fix_pathinfo = 1

Hmm... I don't know, but I think I'll set this parameter in php.ini rather than running an additional wrapper. Makes it less complicated for me... 8)
They explain that "You should fix your scripts to use SCRIPT_FILENAME rather than PATH_TRANSLATED"... has this something to do with how Abyss passes information to the interpreter ?
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sat Jun 14, 2003 11:11 pm    Post subject: Re: PHP version 4.3.2 is buggy. Do not upgrade Reply with quote

Check the new beta that supports the new PHP version without any wrapper. See http://www.aprelium.com/news/abws116b1.html .
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
whackaxe
-


Joined: 28 Jun 2003
Posts: 90

PostPosted: Sat Jun 28, 2003 1:03 am    Post subject: Reply with quote

good grief. i just spent half an hour ripping out the entrails of abyss and PHP from differnt versions to get this to work. got it working at last:p new version of PHP, but still no socket_read() fix ive been witing for :( nice job on the update, but is it a feasable long term fix?
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sat Jun 28, 2003 11:52 pm    Post subject: Reply with quote

whackaxe wrote:
good grief. i just spent half an hour ripping out the entrails of abyss and PHP from differnt versions to get this to work. got it working at last:p new version of PHP, but still no socket_read() fix ive been witing for :( nice job on the update, but is it a feasable long term fix?

The new version 1.1.6 that will be released in the near future (and which is currently in beta stage) includes that fix. This will be also the case of all the next versions.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group