Print, echo, redirect problems
Posted by: jrexx (---.144.nat.nycboe.org)
Date: December 15, 2006 04:08PM

I teach HS students PHP and Mysql. In the past I have run the same script in either Wampserver mode or full install mode (On different machines). Obviously, I suggest the students run Wampserver. I was recently giving a lesson on Forms and PHP/HTML embedding. The below statement will work correctly on Full Install mode but not on the latest Wampserver:

<P>The result of the calculation is: <? echo "$result"; ?></p>

With Wamp, all I get is.. The result of the calculation is:

I suspect that it may run it on an older version of Wampserver, since I didn’t encounter this problem last year. I am trying to locate such. It is not a browser problem, since I have tried it on IE7, IE6 and Firefox.

Also, intermittently, header: location redirection will not run.

I am certain it is something trivial.. a php.ini setting, any help you can give me will be greatly appreciated.



Best regards,
Joseph R. Connell

Options: ReplyQuote
Re: Print, echo, redirect problems
Posted by: yfastud (---.cable.mindspring.com)
Date: December 15, 2006 05:29PM

use full tag <?php instead short <?

Options: ReplyQuote
Re: Print, echo, redirect problems
Posted by: jrexx (---.144.nat.nycboe.org)
Date: December 15, 2006 05:36PM

Well, I feel like a real idiot, resolving my own post!

I was bouncing through some threads and noticed a similar post that was fixed, simply but using the full tag <?PHP as opposed to <?.

Now I wonder if there is a PHP.INI setting I could change or perhaps the powers at Wampserver would allow for shortcuts in future releases.



Best regards,
Joseph R. Connell

Options: ReplyQuote
Re: Print, echo, redirect problems
Posted by: Mark Jones (---.buckeyecom.net)
Date: December 16, 2006 12:09AM

Hi Joseph, there is an INI setting, in your PHP.INI file change "short_open_tag = off" to on. Have fun.

Options: ReplyQuote


Sorry, only registered users may post in this forum.