Forum Moderators: coopster

Message Too Old, No Replies

php5 base64 decode problem

php parsing problem

         

nshack31

6:10 pm on May 25, 2009 (gmt 0)

10+ Year Member



i have a php4 page which works fine using something similar to..

<? eval(base64_decode('JGdlbns=')); ?>

but when I run this using php5 rather than output the correct values it outputs the actual code..

"<? eval(base64_decode('JGdlbns=')); ?>"

can anybody help? thanks

coopster

12:18 am on May 26, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



It looks to me like your new server had short open tags turned off. Use the full tag, it's more portable anyway:
<?php

penders

12:23 am on May 26, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It doesn't look as if you have short tags (<?...?>) enabled on your server for PHP5, so your code is not being parsed as PHP and consequently output to the browser. Either enable short_open_tag [uk2.php.net] in php.ini or use the long/regular form of the PHP open tag (<?php...?>).

<edit>*snap* ;)</edit>

nshack31

9:53 am on May 26, 2009 (gmt 0)

10+ Year Member



brilliant! thanks for your help