Click to See Complete Forum and Search --> : PHP newb


roccoman
12-11-2002, 04:02 PM
Hey, I just installed Apache and PHP4 and I'm having a problem.. With Text Editor(gnome), I write this php page:

<?php
print ("Hello Web!");
?>

And save it as test.php, when I open it in the browser all I see is the code, it doesnt print Hello Web!.... I already added the following lines to the httpd.conf file

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

and still no worko :) Can someone please help me, thanks

goon12
12-11-2002, 04:28 PM
Did you do this..

cp php.ini-dist /usr/local/lib/php.ini


then make sure you restart apache, for me it's "/usr/local/apache/bin/apachectl restart"

-goon12

roccoman
12-11-2002, 04:42 PM
All the apache and PHP files are screwy.... Can someone please tell me how to uninstall both so I may start fresh with two new installations of both (from rpm) THanks

goon12
12-11-2002, 05:08 PM
If you installed them from rpm, then as root do rpm -e apache and then for the php to rpm -e php

If you installed from source, you can go into the apachex.x.x dir and do "make clean" and do the same in the phpx.x.x dir.

To install them again, get the rpm's from the cd or the sites and do rpm -ivh apacherpmfilename.rpm and again rpm -ivh phprpmfilename.rpm

I have never installed them as rpms though I usually get the tgz's and install them. Like this cd apache.x.x.x
- ./configure --enable-module=so
- make
- make install
cd ../php.x.x.x
- ./configure --with-apxs=/usr/local/apache/bin/apxs
- make
- make install
- cp php.ini-dist /usr/local/lib/php.ini