[NTLUG:Discuss] Odd Apache/PHP Mandrake 8.2? problem
Paul Ingendorf
pauldy at wantek.net
Mon May 13 18:42:40 CDT 2002
I've already posted this to the mandrake expert forum but so far the only response I got suggested I enclose the code snippet in the appropriate brackets.
When I bootup a Mandrake 8.2 machine and apache starts via it init script the following code pulled via a http request results in no output.
http://localhost/test.php
<?php
$previous->test = "This is a test.";
echo $previous->test;
?>
When I run /etc/init.d/httpd restart the code above produces the appropriate output of This is a test.
I've tried removing the apache startup script and starting it after the machine has started and everything works as expected. I then moved apache to start as the last item in rc scripts and it did not work properly. This is one of the oddest problems I've run into. Calling the object previous1 allows the script to run as expected regardless of when apache is started. Like the following.
http://localhost/test.php
<?php
$previous1->test = "This is a test.";
echo $previous1->test;
?>
This works perfectly when apache is started at boot via initscripts. This is my patch for now but I would like to be able to get to the bottom of it in case I run into it again in the future.
The following is a list of the apache and php rpms installed and they should be standard from Mandrake 8.2 or possibly updated via Mandrake update.
#rpm -qa | grep apache
apache-common-1.3.23-4mdk
apache-1.3.23-4mdk
apache-conf-1.3.23-4mdk
apache-modules-1.3.23-4mdk
apache-suexec-1.3.23-3mdk
#rpm -qa | grep php
php-4.1.2-1mdk
php-imap-4.1.2-1mdk
mod_php-4.1.2-1mdk
php-gd-4.1.2-1mdk
php-ldap-4.1.2-1mdk
php-readline-4.1.2-1mdk
php-xml-4.1.2-1mdk
php-common-4.1.2-1mdk
php-devel-4.1.2-1mdk
php-mysql-4.1.2-2mdk
More information about the Discuss
mailing list