Connecting Tech Pros Worldwide Help | Site Map

PHP on Windows missing features

  #1  
Old December 23rd, 2005, 02:15 AM
charles_weaver@post.harvard.edu
Guest
 
Posts: n/a
I have a PHP program on a Windows Server website and the following do
not work:

$HTTP_SERVER_VARS["PHP_SELF"], $_SERVER, $_SESSION

etc. etc.

Can someone explain me why?

Is there something I can tell my web host to set in the php.ini file to
fix this?

All of this has always worked for me on Unix.

  #2  
Old December 23rd, 2005, 02:25 AM
Jerry Stuckle
Guest
 
Posts: n/a

re: PHP on Windows missing features


charles_weaver@post.harvard.edu wrote:[color=blue]
> I have a PHP program on a Windows Server website and the following do
> not work:
>
> $HTTP_SERVER_VARS["PHP_SELF"], $_SERVER, $_SESSION
>
> etc. etc.
>
> Can someone explain me why?
>
> Is there something I can tell my web host to set in the php.ini file to
> fix this?
>
> All of this has always worked for me on Unix.
>[/color]

It's probably because you're using IIS, not Apache. This can't be fixed
in the php.ini file. This information is supplied by Apache.

Solution? Get an Apache server.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  #3  
Old December 23rd, 2005, 03:15 AM
charles_weaver@post.harvard.edu
Guest
 
Posts: n/a

re: PHP on Windows missing features


So you are saying that there are no session variables in Windows IIS
PHP and I have to handle all this in hidden variables or something like
that? Too bad. Fortunately my ultimate target is a Linux server and I
guess I will just have to do my development there. Live and learn.

  #4  
Old December 23rd, 2005, 04:35 AM
Jerry Stuckle
Guest
 
Posts: n/a

re: PHP on Windows missing features


charles_weaver@post.harvard.edu wrote:[color=blue]
> So you are saying that there are no session variables in Windows IIS
> PHP and I have to handle all this in hidden variables or something like
> that? Too bad. Fortunately my ultimate target is a Linux server and I
> guess I will just have to do my development there. Live and learn.
>[/color]

Yes, there are session variables on Windows servers. But you don't have
the same $_SERVER variables Apache does. And even to get those, you
*may* have to have the ISAPI version installed instead of the CGI version.

But if you're going to be running on Linux anyway, why not just load
Apache on Windows and use it? It makes things *much* easier.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  #5  
Old December 23rd, 2005, 06:55 AM
Kimmo Laine
Guest
 
Posts: n/a

re: PHP on Windows missing features


"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:C76dnYI4osBUwDbe4p2dnA@comcast.com...[color=blue]
> charles_weaver@post.harvard.edu wrote:[color=green]
>> I have a PHP program on a Windows Server website and the following do
>> not work:
>>
>> $HTTP_SERVER_VARS["PHP_SELF"], $_SERVER, $_SESSION
>>
>> etc. etc.
>>
>> Can someone explain me why?
>>
>> Is there something I can tell my web host to set in the php.ini file to
>> fix this?
>>
>> All of this has always worked for me on Unix.
>>[/color]
>
> It's probably because you're using IIS, not Apache. This can't be fixed
> in the php.ini file. This information is supplied by Apache.
>[/color]

Bullshit! I work with PHP + IIS server. $_SESSION, $_SERVER and so on, are
all available in php programs. The primary solution is to check the
configuration of the server, and fix that first, and if that fails, then get
the apache. But saying using apache is the only solution is just horse shit.


--
"En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviö
antaatulla.sikanautaa@gmail.com.NOSPAM.invalid


  #6  
Old December 23rd, 2005, 10:15 AM
Erwin Moller
Guest
 
Posts: n/a

re: PHP on Windows missing features


Kimmo Laine wrote:
[color=blue]
> "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
> news:C76dnYI4osBUwDbe4p2dnA@comcast.com...[color=green]
>> charles_weaver@post.harvard.edu wrote:[color=darkred]
>>> I have a PHP program on a Windows Server website and the following do
>>> not work:
>>>
>>> $HTTP_SERVER_VARS["PHP_SELF"], $_SERVER, $_SESSION
>>>
>>> etc. etc.
>>>
>>> Can someone explain me why?
>>>
>>> Is there something I can tell my web host to set in the php.ini file to
>>> fix this?
>>>
>>> All of this has always worked for me on Unix.
>>>[/color]
>>
>> It's probably because you're using IIS, not Apache. This can't be fixed
>> in the php.ini file. This information is supplied by Apache.
>>[/color]
>
> Bullshit! I work with PHP + IIS server. $_SESSION, $_SERVER and so on, are
> all available in php programs. The primary solution is to check the
> configuration of the server, and fix that first, and if that fails, then
> get the apache. But saying using apache is the only solution is just horse
> shit.
>[/color]

True, I have them all under IIS5/PHP-ISAPI on my W2000 machine.
Maybe not all (didn't check them all), but all I need.
I prefer Debian/apache, but hey, life is a bitch, and so am I when I can
make a dime. ;-)

Regards,
Erwin Moller

  #7  
Old December 23rd, 2005, 02:05 PM
Jerry Stuckle
Guest
 
Posts: n/a

re: PHP on Windows missing features


Kimmo Laine wrote:[color=blue]
> "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
> news:C76dnYI4osBUwDbe4p2dnA@comcast.com...
>[color=green]
>>charles_weaver@post.harvard.edu wrote:
>>[color=darkred]
>>>I have a PHP program on a Windows Server website and the following do
>>>not work:
>>>
>>>$HTTP_SERVER_VARS["PHP_SELF"], $_SERVER, $_SESSION
>>>
>>>etc. etc.
>>>
>>>Can someone explain me why?
>>>
>>>Is there something I can tell my web host to set in the php.ini file to
>>>fix this?
>>>
>>>All of this has always worked for me on Unix.
>>>[/color]
>>
>>It's probably because you're using IIS, not Apache. This can't be fixed
>>in the php.ini file. This information is supplied by Apache.
>>[/color]
>
>
> Bullshit! I work with PHP + IIS server. $_SESSION, $_SERVER and so on, are
> all available in php programs. The primary solution is to check the
> configuration of the server, and fix that first, and if that fails, then get
> the apache. But saying using apache is the only solution is just horse shit.
>
>[/color]

I do, too. And no, not everything is available in IIS as it is in Apache.

Additionally, if you have PHP loaded as a CGI, even less is available.

And learn to read. I didn't say to get Apache because it's the only
solution - I said to get it because it's the MOST COMPATIBLE SOLUTION.
His final target is Linux. It only makes sense to develop using the
same server as you're going to be deploying on.

So get off your Microsoft High Horse and learn to read.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  #8  
Old December 23rd, 2005, 03:55 PM
charles_weaver@post.harvard.edu
Guest
 
Posts: n/a

re: PHP on Windows missing features


I don't have any control over this server. I am sure it is an IIS
server. Can someone tell me what to tell my web host to do and what
special I have to do in my program in order to enable $_SESSION
variables if that is possible?

  #9  
Old December 23rd, 2005, 04:45 PM
Sean
Guest
 
Posts: n/a

re: PHP on Windows missing features


To get access to lots of info, including server info check out:
http://ie2.php.net/phpinfo

To learn about sessions goto:
http://ie2.php.net/manual/en/ref.session.php. Basically you need to put
in session_start.

All in the manual.

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 2.2 VirtualHosts not working on Windows Vista josequinonesii answers 6 September 30th, 2009 04:24 PM
ASP.NET and IIS7 on vista business ma answers 6 January 10th, 2008 01:07 PM
No CSS or PHP Includes showing on apache localhost site MaiyaHolliday answers 6 June 5th, 2007 09:36 PM