Upgraded to php 4.2.1, broke a script

Patrick Fleming EA plug-discuss@lists.plug.phoenix.az.us
Thu, 16 May 2002 09:19:39 -0700 (MST)


On Thu, 16 May 2002, Kevin Brown wrote:

> > Question:
> > 
> > Are the following two statements really equivalent?
> > 
> > 1) echo "select binary_junk, filetype from images where img_id = '92'"
> > 
> > 2) $get_image = "select binary_junk, filetype from images where img_id =
> > '$imgid'";
> 
> I would have thought them equivalent since img_id is passed into the
> script from the url (e.g. show_image.php?img_id=92).  I think this
> right here is my problem.  For some reason php is no longer accepting
> those values.  Guess I'll have to go through the php.ini file and find
> out why it no longer does.  PHP 4.1.2 did accept the passing of
> parameters.

Try a phpinfo script to see if globals are set, also didn't the newer 
versions of php include cross site scripting changes? I don't know if your 
script is on multiple site, but this could be a side effect of coding for 
more security.

> 
> > In particular, you might try doing an echo "$get_image" and see what shows up.
> 
> I could try that.  The echo was me at a command prompt of the linux machine just
> sending input into the mysql command-line program and sending the output to
> another file to at least see that it is finding the record.
> 

-- 
Patrick Fleming, EA
http://myhdvest.com/patrickfleming
Licensed to represent taxpayers
before Exam, Appeals, and Conference 
divisions of the IRS