Re: This line does not execute...
| From: | Todd Cary | Date: | Tue, 03 Jun 2003 18:05:52 +0000 |
| Subject: | Re: This line does not execute... | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-150039@lists.php.net to get a copy of this message | ||
Alex -
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" <todd@aristesoftware.com> To: "Alex Ciurea" <alex@netonwave.com> Cc: "php mailing" <php-general@lists.php.net> 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><imgsrc='./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><fontcolor='#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><fontcolor='#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" <todd@aristesoftware.com> To: <php-general@lists.php.net> 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 --