PHP - Apache Configuration

From: junt_tuko (boy_pagong_at_yahoo.com)
Date: 11/29/03


Date: 28 Nov 2003 20:18:00 -0800

Hello there!
I need some help from you guys. I'm a newbie on PHP and Apache. I just
installed them in my machine following the instructions supplied by
php.net. According to php.net and actually suggested by other php
enthusiasts websites, test PHP if it got installed properly by
creating a test.php file. The information in the file is as follows:

<?php
phpinfo();
?>

They said that when I put it in my browser's url that it will show
some php information. I did that but all it shows were just the text
inside the file itself i.e. same as I wrote above. (i typed
//localhost/test.php on the url). I tried another sample file that was
suggested by others using hello.php.

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo "<p>Hello World</p>"; ?>
</body>
</html>

But again, all of the texts were shown when I run it in my browser
(//localhost/hello.php). I am stuck. I don't know what's going on. I
followed the instructions step by step but I could not make these
tests to run the way it should. According to some websites, to test
Apache, type //localhost or //127.0.0.1 on the url of the browser and
I should see a page telling me that it is installed correctly. I did
see that page. So I guess my problem is with PHP config. Here are the
details:

1)Linux - Suse 8.2
2)Downloaded Apache from their site, file: httpd-2.0.48.tar.gz
3)Downloaded PHP from their site (snaps.php.net), file:
php4-stable-200311230630.tar.gz.
**Note: Original installation was php-4.3.4 but gave error on not
finding "libphp4.so" after editing httpd.conf. It was suggested to get
the latest version from snap to fix this.
4)configured and installed as directed.
5)php.ini: doc_root="/usr/local/apache2/htdocs/" also
file_uploads=Off.
6)httpd.conf: I have ..
LoadModule php4_module libexec/libphp4.so
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
DirectoryIndex index.html index.html.var index.php

Any suggestions? Thanks a lot!

jun_tuko



Relevant Pages

  • Re: Installing PHP on MacOS X
    ... I've installed php a few times on OSX Macs, ... php runs under the Apache web server, so you need to have Apache ... part of OSX, but it is switched off by default for security reasons. ... The test.php file referred to in the Entropy installation ...
    (alt.php)
  • Re: Apache2 & php5 Problem
    ... The file contains a test message between header tags and below ... message from the php script line. ... This gives you all the information about your PHP installation. ... You might need to add an AddHandler directive to your Apache config file if there isn't one already and a ScriptAlias ...
    (Debian-User)
  • Re: Need help configuring php 4.3.10 with Apache 2.0.53
    ... Due to the difficulties with SuSE's setup of Apache, I was unable to get SSL to work with the distro's installation of Apache so uninstalled, reinstalling 2.0.53 from Apache's site. ... I restarted Apache over and over without php working. ...
    (alt.php)
  • Re: Unable to load dynamic link library php_mysql.dll - Apache 2.2.6/PHP 5.2.6
    ... I am attempting to perform a PHP installation on an Apache 2.2.6 web ... Apache instance that requires PHP 5.2.6 loaded with MySql support. ... extension I recieve the following error message: ...
    (comp.lang.php)
  • Re: Unable to load dynamic link library php_mysql.dll - Apache 2.2.6/PHP 5.2.6
    ... I am attempting to perform a PHP installation on an Apache 2.2.6 web server instance that is loaded on a Windows 2003 server operating system. ...
    (comp.lang.php)