PHP4 didn't work

If none of the more specific forums is the right place to ask

PHP4 didn't work

Postby Martin67 » 2005-01-22 19:05

I have a very simple question ... i hope :)

I have have installed PHP4 with the next command line:

# apt-get install php4 php4-mysql php4-imap php4-gd mysql-client mysql-server

And when i try to check if it works with a file (info.html):

<html>
<head>
<title>PHP info</title>
</head>
<body>
<h1>Informatie over PHP</h1>
<?php
phpinfo();
?>
</body>
</html>

Then it returns only the header.

What have I made wrong?
Martin67
 
Posts: 1
Joined: 2005-01-22 18:53

Postby peschmae » 2005-01-23 15:17

I think you need libapache-mod-php4 or libapache2-mod-php4 (if you don't want to run php as cgi, don't know how that works though...)

Per default php only works on files with .php filename extension (to prevent just every file being delivered by apache from being processed) - if you want it to work on .html files too you may have to tweak your apache config file.

Peschmä
-- Anyone who quotes me in their sig is an idiot. -- Rusty Russell
User avatar
peschmae
 
Posts: 77
Joined: 2004-09-16 18:02

Postby Xero » 2005-03-09 14:26

This problem is so simple it is alsmo ridiculous.

Unless you have a handler added to parse .html files as php (You don't, trust me), then your file NEEDS to be saved as .php.

That's it.
Xero
 
Posts: 5
Joined: 2005-03-09 14:24

Postby neo » 2005-09-03 08:15

hi Martin,
Did you get it working, I am facing a similar problem. My Apache2 cannot parse php files. I have installed php4 as a cgi and dont know how to configure Apache to parse those files.
Please let me know if you solve your problem. TIA :)
neo
 
Posts: 8
Joined: 2005-09-03 04:11


Return to General Questions

Who is online

Users browsing this forum: No registered users and 12 guests

fashionable