php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32542 PHP5.0.4 can't work fine as a cgi binary
Submitted: 2005-04-02 12:04 UTC Modified: 2005-04-03 11:11 UTC
From: cpthk at hotmail dot com Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.0.4 OS: Windows XP
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cpthk at hotmail dot com
New email:
PHP Version: OS:

 

 [2005-04-02 12:04 UTC] cpthk at hotmail dot com
Description:
------------
When I set php as a apache module like this:
LoadModule php5_module "c:/php/php5apache2.dll"
Add Type application/x-httpd-php .php
PHPIniDie "c:/php"

It works fine with phpmyadmin both "config" and "http" login mode.

But when I set php as a CGI binary like this:
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"

It still works fine with phpmyadmin in "config" login mode, but not in "http" mode.

Login mode can be set in phpmyadmin config file(config.inc.php).
My php of mysql extension is using the mysqli.dll.
I'm sure every setting of php is fine.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-02 23:49 UTC] tony2001@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 [2005-04-03 11:06 UTC] cpthk at hotmail dot com
I install apache first then unzip php to c:\php. And I unzip mysql to c:\mysql and start the mysqladmin.exe up. And than I change the setting of apache's config file(httpd.conf), I add three more lines:
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"

Then I edit php.ini file:
extension=php_mysqli.dll
extension_dir = "C:/php/ext"

Then I restart apache. And I unzip phpmyadmin to the apache htdocs folder.
I changed the phpmyadmin config file(config.inc.php):
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'http';

Then I open the browser to login the phpmyadmin.
Type the user name and password, and it keep saying the username or password is wrong. I'm sure the username and password is right.

If I change the apache config file(httpd.conf):
LoadModule php5_module "c:/php/php5apache2.dll"
Add Type application/x-httpd-php .php
PHPIniDie "c:/php"

Then restart apache, everything works fine. I can login phpmyadmin normally.

I think there are some bugs in the php-cgi.exe file. It can't get the right username and password information from me. I can only login with phmyadmin setting:
$cfg['Servers'][$i]['auth_type'] = 'config';

But not the http mode.
But if I load php as a apache module, I can login both config and http modes.
 [2005-04-03 11:08 UTC] cpthk at hotmail dot com
My software versions are:
Apache 2.0.53
php 5.0.4
mysql 5.0.3
phpmyadmin 2.6.2 beat1
All of them are the newest.
 [2005-04-03 11:11 UTC] tony2001@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

"The HTTP Authentication hooks in PHP are only available when it is running as an Apache module and is hence not available in the CGI version." (c) http://www.php.net/manual/en/features.http-auth.php
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC