problems with PHP and PWS4

Hi there.

I have installed PHP4 on my Windows95 machine which is running PWS4. I have created my first PHP page with a simple echo command but when I try to look at the page the browser attempts to donload instead of executing it. I know it is not an execute problem as I have an ASP page in the same directory which works perfectly.

I think i have done everything that I should do.

1. Have copied the dll files to windows/system directory.

2. Have edited the reg file as indicated.

3. have made the folder execute.

Any suggestions would be much appreciated.

Thanks for the help.

Who is Participating?

Improve company productivity with a Business Account.Sign Up

kookkaiConnect With a Mentor Commented:
i user omnihttpd it work omni2.06 have php very good :D
Personally, I would give up and use Apache instead... download it from and if you want, I'll send you my httpd.conf file for you to get it working.
It's just that I've got a thing against Microsoft servers :)
RICHARDHAuthor Commented:
Thanks Tom,

Maybe you should come back to Hurst for a while and help me install this thing. What do you have against PWS.

And the HTTP config file would be very helpful.

If anyone else out-there can help with the PSW thing I would be most grateful, it bugs me when something does not work that should be working.

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Richard... it only just clicked...

Hope things are well there, and that I didn't ruin your grade average :)

Anyway if you want decent performance and security on your web server, install Linux on it. The Redhat distribution ( gives away their one free to educational institutions in the UK so I'd recommend them.

I don't trust PWS - too many security issues come out with it and it is thus targeted by crackers as soon as it is realised that the server is running it.

Therefore, go to, download apache for windows, and for the httpd.conf use the following (here's hoping it doesn't wrap too badly).

ServerType standalone
ServerRoot "C:/Program Files/Apache Group/Apache"
PidFile logs/
ScoreBoardFile logs/apache_status
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MaxRequestsPerChild 0
ThreadsPerChild 50
Port 80
ServerAdmin you@your.address
DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs"
<Directory />
    Options FollowSymLinks
    AllowOverride None
<Directory "C:/Program Files/Apache Group/Apache/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all

UserDir "C:/Program Files/Apache Group/Apache/users/"
DirectoryIndex index.html
AccessFileName .htaccess
<Files .htaccess>
    Order allow,deny
    Deny from all

UseCanonicalName On
TypesConfig conf/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
    MIMEMagicFile conf/magic

HostnameLookups Off
ErrorLog logs/error.log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog logs/access.log common
ServerSignature On

Alias /icons/ "C:/Program Files/Apache Group/Apache/icons/"
ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache/cgi-bin/"
<Directory "C:/Program Files/Apache Group/Apache/cgi-bin">
    AllowOverride None
    Options None
IndexOptions FancyIndexing

AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

DefaultIcon /icons/unknown.gif

ReadmeName README
HeaderName HEADER

IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

AddEncoding x-compress Z
AddEncoding x-gzip gz tgz

AddLanguage en .en
AddLanguage fr .fr
AddLanguage de .de
AddLanguage da .da
AddLanguage el .el
AddLanguage it .it
LanguagePriority en fr de

AddType application/x-tar .tgz
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0

BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

ScriptAlias /php/ "c:/php4/"
AddType application/x-httpd-php .phtml .html .php .php3
AddType application/x-httpd-php-source .phps
Action application/x-httpd-php "/php/php.exe"

*end of httpd.conf*

Just change the directories where applicable and it should start running nicely.

If you ever want me to come in for an afternoon and get things running, I'll be more than willing to for a pint :)
RICHARDHAuthor Commented:
Thanks Tom,

How is life and are things going well, david often talks about you and tells me about the Atari site.

Still wonder what is wrong with what I have done, but will probably try your idea.

thanks again and take care.
Things are going alright, I suppose...
Music was and always shall be my passion, and so I've started to join a few bands here and there, hopefully to start doing the odd pub thing around the Brighton area.

As far as computing is concerned, I'm still working for Planet Three ( on a part-time basis as a programmer in PHP.
They've been my main computing outlet, considering that I joined them after I left Hurst, juring the summer holiday.

The web site (which, incidentally, I remember asking you for ftp access to so that I could update it :) is taking off. I'm currently getting around 1500-2500 hits/day on it and numerous emails from people @aol who are desperate for someone to talk to... sad, isn't it ?

Other than that, not much.
Allegedly studying for my 'A' levels in Computing, Maths and Music at Lewes... few more months then I start working properly - really can't be bothered for that University lark.

Ahh ! I *hate* making spelling mistaces around people I know... juring ? Bah !
I had a hard time too installing php with PWS but it works fine now...

Have you put the php3.ini in the windows directory?
Have you install the php_iis_reg.inf?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.