The problem is/was that I run PHP with register_globals = Off. Knowing that, I thought that I had put in all of the $HTTP_XXX_VARS statments, but I did not. Setting register_globals = On temporarily fixed the problem.
Now the question is what is the "usual" setting for register_globals : on or off. As i stated, my preference is to have it "off".
Sorry for not setting register_globals = On right in the beginning...it would have saved a lot of time :-)!!
Todd
Alex Ciurea wrote:
Ok Tod, this is what I understood so far:
1) image.php should generate for you a barcode;
2) you placed an echo statement inside image.php and nothing happens
Marek have good ideea: try to see the html source code, the code that is interpreted by your browser.
the executable file ./image.php probably don't run. try to see, from your shell (i think you use linux) if u can run a php script. e.g.: ./myscript.php
----- Original Message ----- From: "Todd Cary" <[EMAIL PROTECTED]> To: "Alex Ciurea" <[EMAIL PROTECTED]> Cc: "php mailing" <[EMAIL PROTECTED]> Sent: Tuesday, June 03, 2003 6:22 PM Subject: Re: [PHP] This line does not execute...
Alex -
The code I placed in the messsage is a copy and paste of the code from the sample.php script provided by the author of the barcode class and it agrees with the demo he has on his site.
The "error" is that nothing is happening which I interpret as the file, image.php is not being accessed (I put an Echo statement inside it and it does not execute). Here is the complete block of code:
if ($obj) {
if ($obj->DrawObject($xres)) { echo "<table align='center'><tr><td><img src='./image.php?code=" . $barcode . "&style=" . $style . "&type=" . $type . "&width=" . $width . "&height=" . $height . "&xres=" . $xres . "&font=" . $font . "'></td></tr></table>";
// My debug code - this line executes! echo "<table align='center'><tr><td><font color='#FF0000'>Success: Barcode = " . $barcode . "</font></td></tr></table>"; } else { echo "<table align='center'><tr><td><font color='#FF0000'>" . ($obj->GetError()) . "</font></td></tr></table>";
// My debug code echo "<table align='center'><tr><td><font color='#FF0000'>Problem; Barcode = " . $barcode . "</font></td></tr></table>"; } } else { // My debug code echo "<table align='center'><tr><td><font color='#FF0000'>Obj is false; Barcode = " . $barcode . "</font></td></tr></table>"; }
Alex Ciurea wrote:
did u made copy&paste with your code?--
yes? then why don't you try to use the path='image.php?blahblahmoreblah' ????
no? then please give us more details about the error you're getting...
good luck, Alex
----- Original Message ----- From: "Todd Cary" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 03, 2003 6:03 PM Subject: [PHP] This line does not execute...
.I am trying to get the Sample Barcode to run on my server, however the following line does not execute:
echo "<table align='center'><tr><td><img src='./image.php?code=" . $barcode . "&style=" . $style . "&type=" . $type . "&width=" . $width . "&height=" . $height . "&xres=" . $xres . "&font=" . $font . "'></td></tr></table>";
To see if it is executing, I have an "Echo" statement in the script.
The image.php file is in the same directory as the other script files. What am I missing here?
Todd --
--