Turn on register_globals in your php.ini file. On Fri, 6 Sep 2002, Mike Carter wrote:
> Hello. > I've installed 4.2.3 on Apache 1.3.26 running on an Sun Ultra 1 with Solaris > 9. > > I have a script I wrote a while back that has worked fine on PHP 4.0.5 on my > current server. The script displays images on a web page. I build a pop-up > list of all the images in the current directory and have a "show" button > which sends a url thusly: > > http://vortac.aviate.org/53sf/show.php?thePhoto=photo1.jpg > > The script starts by checking whether the argument exists, then passes the > name of the photo for processing: > > if( $thePhoto ) { > LoadImageData(); > DisplayPhoto( "$thePhoto" ); > } else { > LoadImageData(); > > if( count($photos) > 0 ) { > DisplayPhoto( "$photos[0]" ); > } else { > PrintError( "Viewer error! can't load photos." ); > } > } > > This works fine on 4.0.5, but is broken on 4.2.3! I can't seem to figure out > what is going on. I threw phpinfo in the script to make sure that the arg is > being passed to php, and it shows that it is, yet the script never gets past > the test: if( $thePhoto). > > I put a call to phpinfo() before the LoadImageData() function just to see if > the script even gets that far: > > if( $thePhoto ) { > phpinfo(); > LoadImageData(); > DisplayPhoto( "$thePhoto" ); > } else { > LoadImageData(); > > if( count($photos) > 0 ) { > DisplayPhoto( "$photos[0]" ); > } else { > PrintError( "Viewer error! can't load photos." ); > } > } > > I never see the phpinfo dump. To test this I entered > "show.php?thePhoto=test.jpg" in a browser (with the correct url preceeding > the script name). So, it appears PHP is never parsing the argv, or something > major has changed between 4.05 and 4.23 where my test has to be re-written. > > I'd appreciate some input. > > Thanks. > > -- > Mike Carter > Pilot/Programmer > [EMAIL PROTECTED] > > > > -- > PHP Install Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Install Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php