Newbie question, I've been working on this for weeks and I'm giving up and asking for help. My PHP scripts don't display anything in a browser. I'm running Debian Potato and have installed Apache and PHP4 using apt-get. After installing both, I copied php.ini to /etc/php4/apache. I also edited /etc/apache/httpd.conf to contain the following lines.
LoadModule php4_module /usr/lib/apache/1.3/libphp4.so
DirectoryIndex index.html index.php index.phtml index.php3
AddType application/x-httpd-php .html
AddType application/x-httpd-php .lib
AddType application/x-httpd-php .php .php3 .phtml .php4
AddType application/x-httpd-php-source .phps
then I modified these lines in /etc/php4/apache/php.ini
doc_root = /home/www-root/zygospore.com
extension_dir = /usr/lib/apache/1.3/
then did apache restart
I've tried many other things I've read on forums and websites that I found using google.
My website is http://zygospore.com
http://zygospore.com/test.php has this code and does return information
<? phpinfo(); ?>
however a simple script at
http://zygospore.com/test-script.php
which contains this code:
<head><title>Today's Date</title></head><body><p>Today's Date (according to this Web server) is<?php
echo( date("l, F dS Y.") );
?></p></body>
and this code returns a blank screen. When I view source I see this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"></HEAD>
<BODY></BODY>
I'm at a loss as to what is going on. Please let me know what I'm doing wrong here.
Best Regards,
o6