Hi, I'm trying to get basic php functionality working on my Apache web
server to start playing around with interfacing with mysql. I created a
"hello.php4" file containing the simplest php code, with an html structure
and this:
<?
echo("Hello, World!\n");
?>
in the body. I put it in /var/www (which DocumentRoot points to in
httpd.conf), but when I visit http://localhost/hello.php4 in any browser
I've tried so far (opera, IE, lynx and galeon (mozilla)), it doesn't spew
out the html code with output from php, but instead offers to download or
open the file, indicating it doesn't recognize it. Multiple php tutorials
start out by making sure you're able to do this before going onward.
I have the following relevant debian packages installed:
ii apache 1.3.26-0woody1 Versatile, high-performance HTTP server
ii apache-common 1.3.26-0woody1 Support files for all Apache webservers
ii apache-dev 1.3.26-0woody1 Apache webserver development kit
ii apache-doc 1.3.26-0woody1 Apache webserver docs
ii apache-ssl 1.3.26.1+1.48- Versatile, high-performance HTTP server with
ii libapache-mod- 3.2-1 Apache module for MySQL authentication
ii libapache-mod- 0.9.12-2 Apache module for PostgreSQL authentication
ii libapache-mod- 2.2-2 An Apache module that interfaces with Lisp e
ii php-elisp 1.0.2-1 Emacs support for php files.
ii php4 4.1.2-5 A server-side, HTML-embedded scripting langu
ii php4-cgi 4.1.2-5 A server-side, HTML-embedded scripting langu
ii php4-dbase 4.1-1 dBase module for php4
ii php4-dev 4.1.2-5 Files for PHP4 module development
ii php4-mysql 4.1.2-5 MySQL module for php4
ii php4-pear 4.1.2-5 PEAR - PHP Extension and Application Reposit
ii php4-pgsql 4.1.2-4 PostgreSQL module for php4
ii phpdoc 20020310-1 Documentation for PHP4 and PHP3
ii phpsysinfo 2.0-3 PHP Based Host Information
I'm running Debian Linux with kernel 2.4.18 on a p3 450 with 250 MB ram. My
/etc/php4/apache/php.ini and /etc/php4/cgi/php.ini are both left to default.
Perhaps I need to RTFM of some sort, but there seems to be a gap of getting
this step to work in all docs I've read so far (apache and php manuals, as
well as several tutorials), so I'd appreciate someone pointing me to the
correct source. So do I need to change something in php config,
apache config, maybe put the php file somewhere else, or something else?
Thanks.
--
-Stephan
For PGP Public Key, visit:
http://www.sauerburger.org
Attachment:
pgp2v8WXhHNLv.pgp
Description: PGP signature