|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi all, I'm running Windows XP, and here is a piece of my apache (2.2.8)
conf : --- httpd.conf --- .... ... ... Listen 81 Listen 80 Listen 8080 LoadModule php5_module "e:/php/php5apache2_2.dll" LoadModule fastcgi_module modules/mod_fastcgi.dll AddType application/x-httpd-php .php .... ... ... --- vhosts.conf ---- NameVirtualHost 127.0.0.1:81 <VirtualHost 127.0.0.1:81> ServerName myserver DocumentRoot e:/www ScriptAlias /php/ "e:/php53/" Action php5-fastcgi "/php/php-cgi.exe" AddHandler php5-fastcgi .php </VirtualHost> That's a configuration to be able to run both PHP 5.2 (as apache module), and PHP 5.3 (throught fast-cgi) on the same apache2 instance. There are no apache rewrite rules in my stuff. All works right, the only problem is that in both cases, $_SERVER["SERVER_PORT"] returns 80, even when I'm connected throught port 81. Is it a fastcgi / Apache bug or does it come from PHP or even me :-) ? Cheers Julien.P |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
{Top posting}
What shows your phpinfo() on both ports? Is it really running your 5.3 in :81? Regards, Thiago -----Mensagem original----- De: Julien Pauli [mailto:doctorrock83@gmail.com] Enviada em: sexta-feira, 11 de abril de 2008 09:28 Para: PHP General list Assunto: [php] SERVER_PORT always at 80 ? Hi all, I'm running Windows XP, and here is a piece of my apache (2.2.8) conf : --- httpd.conf --- .... ... ... Listen 81 Listen 80 Listen 8080 LoadModule php5_module "e:/php/php5apache2_2.dll" LoadModule fastcgi_module modules/mod_fastcgi.dll AddType application/x-httpd-php .php ... ... ... --- vhosts.conf ---- NameVirtualHost 127.0.0.1:81 <VirtualHost 127.0.0.1:81> ServerName myserver DocumentRoot e:/www ScriptAlias /php/ "e:/php53/" Action php5-fastcgi "/php/php-cgi.exe" AddHandler php5-fastcgi .php </VirtualHost> That's a configuration to be able to run both PHP 5.2 (as apache module), and PHP 5.3 (throught fast-cgi) on the same apache2 instance. There are no apache rewrite rules in my stuff. All works right, the only problem is that in both cases, $_SERVER["SERVER_PORT"] returns 80, even when I'm connected throught port 81. Is it a fastcgi / Apache bug or does it come from PHP or even me :-) ? Cheers Julien.P |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Yes it runs on 5.3 on 81 and 5.2 on 80, both phpinfo() show port 80....
Regards, Julien.P 2008/4/11 Thiago Pojda <thiago.pojda@softpartech.com.br>: > {Top posting} > > What shows your phpinfo() on both ports? > > Is it really running your 5.3 in :81? > > > Regards, > Thiago > > -----Mensagem original----- > De: Julien Pauli [mailto:doctorrock83@gmail.com] > Enviada em: sexta-feira, 11 de abril de 2008 09:28 > Para: PHP General list > Assunto: [php] SERVER_PORT always at 80 ? > > Hi all, I'm running Windows XP, and here is a piece of my > apache (2.2.8) conf : > > --- httpd.conf --- > ... ... ... > Listen 81 > Listen 80 > Listen 8080 > LoadModule php5_module "e:/php/php5apache2_2.dll" > LoadModule fastcgi_module modules/mod_fastcgi.dll AddType > application/x-httpd-php .php ... ... ... > > --- vhosts.conf ---- > > NameVirtualHost 127.0.0.1:81 > > <VirtualHost 127.0.0.1:81> > ServerName myserver > DocumentRoot e:/www > ScriptAlias /php/ "e:/php53/" > Action php5-fastcgi "/php/php-cgi.exe" > AddHandler php5-fastcgi .php > </VirtualHost> > > That's a configuration to be able to run both PHP 5.2 (as > apache module), and PHP 5.3 (throught fast-cgi) on the same > apache2 instance. > There are no apache rewrite rules in my stuff. > > All works right, the only problem is that in both cases, > $_SERVER["SERVER_PORT"] returns 80, even when I'm connected > throught port 81. > > Is it a fastcgi / Apache bug or does it come from PHP or even me :-) ? > > > Cheers > Julien.P > > > |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
I would think PHP is just passing through what it receives from
Apache. I assume it's just passing through environment variables it gets from the server. Can you disable all the other ports and only have :81 running to ensure there is no confusion? On 4/14/08, Julien Pauli <doctorrock83@gmail.com> wrote: > Yes it runs on 5.3 on 81 and 5.2 on 80, both phpinfo() show port 80.... > > Regards, Julien.P |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
Ok I did that, but it's the same.
HTTP_HOST says myhost:81 , but SERVER_PORT still says 80.... Cheers Julien.P 2008/4/14 mike <mike503@gmail.com>: > I would think PHP is just passing through what it receives from > Apache. I assume it's just passing through environment variables it > gets from the server. > > Can you disable all the other ports and only have :81 running to > ensure there is no confusion? > > On 4/14/08, Julien Pauli <doctorrock83@gmail.com> wrote: > > Yes it runs on 5.3 on 81 and 5.2 on 80, both phpinfo() show port 80.... > > > > Regards, Julien.P > |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
you should try Perl or another language. See if you can isolate it to Apache.
.. Or, you could try to track it down inside of the PHP source and see if for some reason it is hardcoded or incorrectly set. (However, I still think it's from Apache) On 4/14/08, Julien Pauli <doctorrock83@gmail.com> wrote: > Ok I did that, but it's the same. > HTTP_HOST says myhost:81 , but SERVER_PORT still says 80.... > > Cheers > Julien.P > > 2008/4/14 mike <mike503@gmail.com>: > > > I would think PHP is just passing through what it receives from > > Apache. I assume it's just passing through environment variables it > > gets from the server. > > > > Can you disable all the other ports and only have :81 running to > > ensure there is no confusion? > > > > > > > > > > On 4/14/08, Julien Pauli <doctorrock83@gmail.com> wrote: > > > Yes it runs on 5.3 on 81 and 5.2 on 80, both phpinfo() show port 80.... > > > > > > Regards, Julien.P > > > > |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
I read the source yes, but my C skills are not good enought to say.
I think about an Apache problem as well, I dont see why it would have been hardcoded into PHP source (and I cant find it hardcoded anyway ...). I will try another language, or even another server, to see .... thx ![]() Julien.P 2008/4/14 mike <mike503@gmail.com>: > you should try Perl or another language. See if you can isolate it to > Apache. > . > Or, you could try to track it down inside of the PHP source and see if > for some reason it is hardcoded or incorrectly set. (However, I still > think it's from Apache) > > On 4/14/08, Julien Pauli <doctorrock83@gmail.com> wrote: > > Ok I did that, but it's the same. > > HTTP_HOST says myhost:81 , but SERVER_PORT still says 80.... > > > > Cheers > > Julien.P > > > > 2008/4/14 mike <mike503@gmail.com>: > > > > > I would think PHP is just passing through what it receives from > > > Apache. I assume it's just passing through environment variables it > > > gets from the server. > > > > > > Can you disable all the other ports and only have :81 running to > > > ensure there is no confusion? > > > > > > > > > > > > > > > On 4/14/08, Julien Pauli <doctorrock83@gmail.com> wrote: > > > > Yes it runs on 5.3 on 81 and 5.2 on 80, both phpinfo() show port > 80.... > > > > > > > > Regards, Julien.P > > > > > > > > |
|
![]() |
| Outils de la discussion | |
|
|