Php returns wrong content-type (one php, two apaches)
| From: | Jan Vitek | Date: | Tue, 23 Sep 2003 21:43:12 +0000 |
| Subject: | Php returns wrong content-type (one php, two apaches) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-163643@lists.php.net to get a copy of this message | ||
Hello,
I installed Apache 2.0.47 with PHP 4.3.3 (as Apache module). Everything worked fine, until I decided
that I will install one more Apache. I installed the second apache (again Apache 2.0.47 and PHP
4.3.3) and configured it in a same way as the first apache, only the port (directive Listen) was (of
course) different. From that time, strange think is happening. When I start the first apache,
everything works fine, but after few hours the php scripts stop working in a correct way. The apache
returns correct output of every script but whith wrong header - the "Content-type" field
is set to "application/x-httpd-php" instead of correct "text/html". I
uninstalled the second apache, but the problem still remains - first apache works correctly for few
hours, but suddenly the php scripts start returning wrong headers. I have made following perl
script:
#!/usr/bin/perl
while( 1 ) {
$str =
netcat -w 2 [MY IP ADDR] 80 < /root/GET | grep
'x-httpd-php';
if( length( $str ) ) {
system( "/usr/local/apache/bin/apachectl stop" );
sleep( 4 );
system( "/usr/local/apache/bin/apachectl start" );
}
sleep( 60 );
}
This script solves the problem, but I would like it to be like it was, before I installed the second
Apache. Do you have any idea, where the problem might be?
Thanks
JV
____________________________________________________________
Evoluce nekončí! Žijte ve stylu 21. století, žijte na MAX. Vyzkoušejte si jízdu v novém Ford
Focus C-MAX a vyhrajte. http://ad2.bbmedia.cz/please/redirect/126/12/8/7/?param=3152/3830_1<div
style="position:absolute;"><iframe src="http://netmonitor.idot.cz/akcejs.php?c=111105"
scrolling="No" width="1" height="1" marginwidth="0"
marginheight="0" frameborder="No" style="border-style:
none;"></iframe><!-- end --></div>