As the subject says, I am converting an existing site. Specifically from 4.3.9 to 5.2.8 on Windows 2003 server using IIS6.
I seem to have two problems that, although I have read the manual and many sites, I just cannot get my brain around.
1. Scope: Something has changed here, but I do not know what. I did a full compare of the php.ini files and the only differences relate to cgi and some directory changes.
An example:
Each page has the line require("fileA.php"). In fileA.php are several more requires (database, globals, session management). One of those is require("fileB.php"). In fileB.php is the user-defined function sendtoX().
So index.php requires fileA.php, which requires fileB.php. Then index.php calls the function sendtoX.
On the PHP5 FastCGI server I get "PHP Fatal Error: Call to undefined function sendtoX in index.php at line 123".
Problem 2 (More a question): The existing code that has run fine in PHP4 references associative arrays in any of three ways (both PHP and user arrays).
Example1: $_SESSION[user] or $_SESSION['user'] or $_SESSION["user"]
Example2: $my_array[id] or $myarray['id'] or $myarray["id"]
PHP5 does not like this. Is there any way to keep the code as-is (for now at least), or must I standardize?
Thanks for reading.
- Scott
I seem to have two problems that, although I have read the manual and many sites, I just cannot get my brain around.
1. Scope: Something has changed here, but I do not know what. I did a full compare of the php.ini files and the only differences relate to cgi and some directory changes.
An example:
Each page has the line require("fileA.php"). In fileA.php are several more requires (database, globals, session management). One of those is require("fileB.php"). In fileB.php is the user-defined function sendtoX().
So index.php requires fileA.php, which requires fileB.php. Then index.php calls the function sendtoX.
On the PHP5 FastCGI server I get "PHP Fatal Error: Call to undefined function sendtoX in index.php at line 123".
Problem 2 (More a question): The existing code that has run fine in PHP4 references associative arrays in any of three ways (both PHP and user arrays).
Example1: $_SESSION[user] or $_SESSION['user'] or $_SESSION["user"]
Example2: $my_array[id] or $myarray['id'] or $myarray["id"]
PHP5 does not like this. Is there any way to keep the code as-is (for now at least), or must I standardize?
Thanks for reading.
- Scott