httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Fleming" <niallflem...@hotmail.com>
Subject Re: PHP 4.2 and Apache 2.0.35 for Csaba and others
Date Mon, 06 May 2002 22:04:13 GMT
you need to add these lines to httpd.conf

AddType application/x-httpd-php .php .php3
AddType application/x-httpd-php-source .phps


----Original Message Follows----
From: "Alex" <cam516@bellsouth.net>
Reply-To: users@httpd.apache.org
To: "Users" <users@httpd.apache.org>
Subject: PHP 4.2 and Apache 2.0.35 for Csaba and others
Date: Mon, 6 May 2002 17:55:47 -0500



My Apache works . I am able to display my web page at local host. The
problem is PHP .  I was following the instructions posted at DevShed.com
"website database basics with php and mysql" it says to create a document
"helloworld' and save it as a text file with the name "helloworld.php" and
then with your web browser to open it up and it says it would display
"HelloWorld". Well when I open it, it shows the code I wrote using note pad.

<HTML>
<BODY>

<?php
print "Hello World"
?>

</body>
</html>

Follows the configuration:
=============================================

<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>

ServerRoot "C:/Program Files/Apache Group/Apache"

<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild  0
</IfModule>

Listen 80

  LoadModule php4_module "C:\Program Files\Apache
Group\Apache\php-4.2.0-Win32\experimental\apache2filter.dll"

  ServerAdmin root@localhost

  ServerName 127.0.0.1:80

UseCanonicalName Off

  DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs"


<Directory />
     Options FollowSymLinks
     AllowOverride None
</Directory>

<Directory "C:/Program Files/Apache Group/Apache/htdocs">

</Directory>

UserDir "My Documents/My Website"

DirectoryIndex index.html index.html.var

DefaultType text/plain

Alias /icons/ "C:/Program Files/Apache Group/Apache/icons/"

<Directory "C:/Program Files/Apache Group/Apache/icons">
     Options Indexes MultiViews
     AllowOverride None
     Order allow,deny
     Allow from all
</Directory>

Alias /manual "C:/Program Files/Apache Group/Apache/manual"

<Directory "C:/Program Files/Apache Group/Apache/manual">
     Options Indexes FollowSymLinks MultiViews
     AllowOverride None
     Order allow,deny
     Allow from all
</Directory>

<Directory "C:/Program Files/Apache Group/Apache/cgi-bin">
     AllowOverride None
     Options None
     Order allow,deny
     Allow from all
</Directory>

   AddOutputFilter INCLUDES .shtml .php .phtml

ScriptAlias /php/ "c:/php/"


I noticed I have output filter twice .Would that do it?



C.Alex Morales BBA,MBA
Senior Consultant Peoplesoft/Siebel
305-264-0138
http://personal.atl.bellsouth.net/mia/c/a/cam516/~cam516/


-----Original Message-----
From: Csaba Gabor [mailto:csaba2000@yahoo.com]
Sent: Monday, May 06, 2002 3:55 PM
To: cam516@bellsouth.net
Subject: RE: Getting Apache 2 to work with PHP

I use apache as a service and am not familiar with the -t option.
My suspicion is that you have some problem in Apache's httpd.conf file
I presume that Apache serves up an example .htm file OK (I guess it
must since you're able to see the source code of your .php file).

If it's still not working, how about post the following parts of
your httpd.conf file (I don't want to wade through the whole thing).
Post them in the order listed in the file, not the order that
I list below:

Any line that has php in it (and its container (<>), if relevant).
DirectoryIndex lines
ServerRoot line
ServerName line
DocumentRoot line
<Directory /> section

        Csaba

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com






--
Niall Fleming

When the world's falling apart around you,
feel good inside, knowing your friends are
all around you.

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message