Page 1 of 1

-> Apache not Php'ing <-

Posted: Thu Dec 09, 2004 10:47 pm
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.

Posted: Fri Dec 10, 2004 5:07 pm
by rehfeld
its just blank? not even the source code of index.php is being output?

Posted: Fri Dec 10, 2004 5:30 pm
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.

Posted: Fri Dec 10, 2004 6:41 pm
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)

Posted: Fri Dec 10, 2004 7:26 pm
by St8ic
Safe mode is off, the log file shows "favicon.ico" doesn't exist over and over, and phpinfo(); works perfectly. Strange!