Hi,
I recently installed Apache/2.0.42 with PHP/4.2.3 over Red Hat Linux/2.4.7-10.
I added
AddType application/x-httpd-php .php
LoadModule php4_module modules/libphp4.so
in httpd.conf.
Problem #1) with "DirectoryIndex /index.php" in httpd.conf , index.php is NOT parsed (unless I specify /index.php in the URL), while changing name such as in "DirectoryIndex /primo.php" in httpd.conf , primo.php is parsed (even if I don't specify it in the URL)
[this is a minor problem for me, and it appears to be an Apache server problem; the next one is a wery big problem because I have a web site written in php no longer working]
Problem #2)
Entire sets of variables are not made available to php run time environment, especially those regarding file uploading. I tried the following test code but the only available variables where $POST["MAX_FILE_SIZE"], $SERVER[""] and $_ENV[""].
The result is the same even if I turn "register_globals on".
Thanks in advance for any help.
------------------------ test code --------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Test Document </TITLE>
</HEAD>
<BODY>
<form enctype="multipart/form-data"
action="<?$SERVER["PHP_SELF"]?>"
method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="10000000">
<input type="submit" value="Send this file:">
<input name="userfile" type="file">
</form>
<HR>
<?php
echo "userfile=".$userfile.'<hr>';
echo '<HR>';
echo $HTTP_POST_FILES['userfile']['name'].'<BR>';
echo $HTTP_POST_FILES['userfile']['type'].'<BR>';
echo $HTTP_POST_FILES['userfile']['size'].'<BR>';
echo $HTTP_POST_FILES['userfile']['tmp_name'].'<BR>';
echo $HTTP_POST_FILES['userfile']['error'].'<BR>';
print_r($HTTP_POST_FILES);
echo '<HR>';
echo $FILES['userfile']['name'].'<BR>';
echo $FILES['userfile']['type'].'<BR>';
echo $FILES['userfile']['size'].'<BR>';
echo $FILES['userfile']['tmp_name'].'<BR>';
echo $FILES['userfile']['error'].'<BR>';
print_r($FILES);
echo '<HR><HR>';
print_r($POST);
echo '<HR><HR>';
phpinfo();
?>
</BODY>
</HTML>