[lug] mod_php not interpreting <?php print ("hello, world\n"); ?>

PC Drew drewpc at colorado.edu
Tue Mar 14 10:22:23 MST 2000


the only way mod_php even get's files to process is because apache
sees the filename extension "php3" (or whatever you've set it to).
Once Apache gives the file to mod_php, then you'll see "hello, world".
 How does Apache know to give mod_php this file?  Easy: there's a line
 (there's always a line) in the httpd.conf file that looks like:

AddType application/x-httpd-php3 .php3

Make sure that's uncommented, then type "apachectl restart" to restart
the server.

BTW: PHP has _great_ online documentation
http://www.php.net/manual/

--
PC Drew


Thus spake Bob Collins on Sunday, March 12, 2000, 8:38:37 PM:

BC> I have SuSE 6.3.  I have installed Apache and PHP using yast.  The SuSE
BC> setup is slightly different from what I read in "MySQL" by Paul DeBois
BC> and in some of the README files, but conforms to README.SuSE for
BC> Apache.  I did not setup the Apache SSL Server.

BC> I have entered the following in a file:
BC> - - - - - - - - - - - - - - - - - - - - 
BC> <HTML>
BC> <BODY>

BC> <?php print ("hello, world\n"); ?>

BC> </BODY>
BC> </HTML>
BC> - - - - - - - - - - - - - - - - - - - -

BC> I do not see "hello, world" when I view the file with Netscape or lynx. 
BC> I have tried several different file names and extensions, .php, .php3,
BC> .html and .phtml.  

BC> The attachment file is the result of ps ax > ps.txt. It looks to me like
BC> PHP is running. I don't have a clear understanding of how apache works
BC> with the file or how to verify if PHP is running, other than running ps. 

BC> Any help would be appreciated, I feel like I am drowning in
BC> documentation, but must be missing something.






More information about the LUG mailing list