problems with PHP and PWS4

Posted on 2000-03-19
Last Modified: 2008-03-06
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.

Question by:RICHARDH

Expert Comment

ID: 2633847
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 :)

Author Comment

ID: 2633864
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.


Expert Comment

ID: 2633893
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 :)
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.


Author Comment

ID: 2633902
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.

Expert Comment

ID: 2633924
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.


Expert Comment

ID: 2633928
Ahh ! I *hate* making spelling mistaces around people I know... juring ? Bah !

Expert Comment

ID: 2639668
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?

Accepted Solution

kookkai earned 100 total points
ID: 2708975
i user omnihttpd it work omni2.06 have php very good :D

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question