-> Apache not Php'ing <-

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
St8ic
Forum Newbie
Posts: 16
Joined: Thu Dec 09, 2004 10:40 pm

-> Apache not Php'ing <-

Post by St8ic »

I installed OpenBSD 3.6, for use as a web server. I got apache up and running, and then I did a "pkg_add php-core-4.3.8.tgz". That worked fine, so I loaded the recommended php.ini settings and added "AddType application/x-httpd-php .php" and "LoadModule php4_module /usr/lib/apache/modules/libphp4.so" to httpd.conf.

Strangely, when I load up an index.php file onto the web server, it's blank. It works with a .html file, though. So why does my server not like PHP? Thanks.
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

its just blank? not even the source code of index.php is being output?
St8ic
Forum Newbie
Posts: 16
Joined: Thu Dec 09, 2004 10:40 pm

Post by St8ic »

It's completely blank. But when I go to "view source", it says:

<html><body></body></html>

When it should say:

<?php system("uptime");
system("uname -a"); <BR>
system("free -m"); <BR>
system("df -h"); <BR>
system("cat /proc/cpuinfo | grep \"model name\\|processor\""); ?>

I've also tried it one line at a time and without the <BR>'s. Thanks for the reply.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

have a look at error.log ...

my bet is on the fact that you are not allowed to use system function (safe mode)
St8ic
Forum Newbie
Posts: 16
Joined: Thu Dec 09, 2004 10:40 pm

Post by St8ic »

Safe mode is off, the log file shows "favicon.ico" doesn't exist over and over, and phpinfo(); works perfectly. Strange!
Post Reply