php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48779 Use of HOST section cause 500 error
Submitted: 2009-07-02 15:28 UTC Modified: 2009-10-28 01:00 UTC
Votes:3
Avg. Score:3.7 ± 0.9
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: keithdavis at pridedallas dot com Assigned: pajoye (profile)
Status: No Feedback Package: PHP options/info functions
PHP Version: 5.3.0 OS: Windows Vista Business x86
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
31 - 19 = ?
Subscribe to this entry?

 
 [2009-07-02 15:28 UTC] keithdavis at pridedallas dot com
Description:
------------
I am running PHP on IIS7 and when I try to use the HOST section, I get a 500 Internal Server error every time. Here is the section implementations that I have tried:



Reproduce code:
---------------
---
From manual page: ini.sections
---
[HOST=intranet.pridedallas.com]
track_errors = Off
html_errors = Off
session.bug_compat_42 = Off

AND

[HOST=intranet]
track_errors = Off
html_errors = Off
session.bug_compat_42 = Off

Actual result:
--------------
HTTP Error 500.0 - Internal Server Error
C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-02 16:26 UTC] sjoerd-php at linuxonly dot nl
Thank you for your bug report.

Is there additional information in the IIS or PHP error log?
 [2009-07-02 16:35 UTC] keithdavis at pridedallas dot com
I am unfamiliar with the error_log. I found it in the php.ini file, but enabling it and setting the file name to php_errors.log, did not seem to do anything. Even when I disable the HOSTS section, still not error_log created. Where is this supposed to reside? 

Nothing in the IIS logs during this crash.
 [2009-07-02 19:37 UTC] keithdavis at pridedallas dot com
Ok, I figured out the error_log thing. I cleared the log. Enable the HOST section, restarted IIS and loaded a page. IIS crashed with the 500 error. Nothing written to the log.
 [2009-07-02 21:53 UTC] jani@php.net
Does it actually _crash_ ? 500 internal error isn't necessarily sign of 
a crash..
 [2009-07-02 21:55 UTC] keithdavis at pridedallas dot com
Ok, well, it's a 500 error and there's nothing in any error log. Call it what you like. :)
 [2009-07-03 07:59 UTC] pajoye@php.net
It does under certain circumstances, for example using [HOST=localhost:8080]. Trying to figure out hwow to debug the .y :)

 	php5_debug.dll!php_ini_parser_cb(_zval_struct * arg1=0x00c2c47c, _zval_struct * arg2=0x00000000, _zval_struct * arg3=0x00000000, int callback_type=2, _hashtable * target_hash=0x105a5680)  Line 279 + 0x8 bytes	C
>	php5_debug.dll!ini_parse()  Line 282 + 0x21 bytes	C
 	php5_debug.dll!zend_parse_ini_file(_zend_file_handle * fh=0x00c2d744, unsigned char unbuffered_errors='', int scanner_mode=0, void (_zval_struct *, _zval_struct *, _zval_struct *, int, void *)* ini_parser_cb=0x102ee580, void * arg=0x105a5680)  Line 206 + 0x5 bytes	C
 	php5_debug.dll!php_init_config()  Line 588 + 0x1a bytes	C
 	php5_debug.dll!php_module_startup(_sapi_module_struct * sf=0x00423008, _zend_module_entry * additional_modules=0x004230a0, unsigned int num_additional_modules=1)  Line 1911 + 0x5 bytes	C
 	php-cgi.exe!php_cgi_startup(_sapi_module_struct * sapi_module=0x00423008)  Line 859 + 0x13 bytes	C
 	php-cgi.exe!main(int argc=1, char * * argv=0x02ec3c10)  Line 1602 + 0xd bytes	C
 	php-cgi.exe!__tmainCRTStartup()  Line 586 + 0x19 bytes	C
 	php-cgi.exe!mainCRTStartup()  Line 403	C


 [2009-07-06 22:15 UTC] keithdavis at pridedallas dot com
It says to use MSVC6, but I am using the VC9 version of PHP, so shouldn't I use Visual C 2008 for this? Will Express work or do I need to do the without compiler method?
 [2009-07-06 22:42 UTC] keithdavis at pridedallas dot com
I apologize, but I am unfamiliar with the backtrace process and I don't understand how to do this. If you can give me more specific instructions. I don't have VC (just VC express) and it doesn't appear that this can be used. I have tried with the Debug Diagnostics method, but either I am not doing it correctly, or this is a crash that is not being detected.
 [2009-07-06 22:55 UTC] pajoye@php.net
I already provided one. But if you can provide one for your case, see http://bugs.php.net/bugs-generating-backtrace-win32.php

Maybe you catched another issue than the one I used.
 [2009-07-06 23:13 UTC] keithdavis at pridedallas dot com
I didn't even see that. I tried to follow those directions. Hopefully, they can figure it out from yours.
 [2009-07-07 01:16 UTC] scottmac@php.net
I tried to reproduce this on OSX and Linux without luck.

The error looks like it's in main/php_ini.c from the backtrace, but I'm not sure whats up with the zval.
 [2009-07-07 09:34 UTC] pajoye@php.net
I was not able to reproduce the HOST issue. The backtrace does not crash in php_ini.c but before.

 [2009-10-06 21:20 UTC] keithdavis at pridedallas dot com
FYI, this happens with the PATH section enabled as well.
 [2009-10-06 21:56 UTC] keithdavis at pridedallas dot com
And it also happens for me on IIS6 (Server 2003.)
 [2009-10-11 20:50 UTC] svn@php.net
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=289546
Log: - #48779, don't loop twice over the path chars
 [2009-10-12 14:40 UTC] svn@php.net
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=289568
Log: - #48779, improve fix, drop usage of _tolower and use zend_strtolower
 [2009-10-12 14:51 UTC] svn@php.net
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=289571
Log: - Merge: #48779
 [2009-10-15 13:09 UTC] svn@php.net
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=289667
Log: - #48779, fix another use case where / usage may differ
 [2009-10-15 13:28 UTC] svn@php.net
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=289668
Log: - Merge: - #48779, fix another use case where / usage may differ
 [2009-10-19 15:43 UTC] pajoye@php.net
Mass closing session of bugs is bad for QA :) > assigned.
 [2009-10-19 15:52 UTC] jani@php.net
We usually have closed fixed bugs..
 [2009-10-20 13:33 UTC] pajoye@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-10-28 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 19:01:30 2024 UTC