Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello all. I've finally got my photo gallery up and running. I've verified that it does in fact work, but today I noticed a bunch of errors in my system event log. They all say the same thing which is:
"The description for Event ID ( 2 ) in Source ( PHP-5.1.2 ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: php[3032], PHP Warning: Invalid argument supplied for foreach() in E:\baseball\gallery\photos.php on line 50."I have no idea about the first half of that message, but the last part about the error on line 50 is worrying me. I know very little about PHP, but I do know the script works, so I don't get how there can be an error there. Anyhow, the code from line 49-53 is:
"
// in case register global is off
foreach($HTTP_GET_VARS as $key => $val) {
$$key = $val;
global $$key;
}
"And the rest of the file can be viewed at http://rtadams89.dyndns.org:9555/web.zip
Can someone tell me what the problem is?
-Ryan Adams
http://members.cox.net/rtadams89/

A quick google check brought up several posts suggesting that you have to make sure that "Reigster globals = On" in the php.ini file.
Michael J

It seams that the "foreach()" function was dealing with an $HTTP_GET_VARS. The new variable which has replaced it in the latest version of PHP is just $_GET. By replacing the $HTTP_GET_VARS with the new $_GET, the problem was solved.
-Ryan Adams
http://members.cox.net/rtadams89/

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |