Page 1 of 1

need help with PHP after IDP upgrade to 5.3

Posted: Wed 19 Feb 2014 12:12 pm
by hills
--oops the title should read after ISP upgrade--

is there a PHP 5.3 expert who can help me with this one please? :oops:

I need to get a php file to echo the following

<slideshow>
<side>

and some other text with in "<" and ">"

Prior to my IPS upgrading to PHP5.3 just echo "<slide>" used to work but now it doesn't

I've tried escaping it: echo "\<slide\>"
Ive tried using hex codes: echo "\x3Cslide\x3E"
I've tried

echo<<< EOT
<slideshow>
\x3Cslide\x3E
EOT

but so far nothing works. the last option works if there is a space between the "<" and "slideshow" but I need there to be no spaces.

Help... please :)

Cheers

Phil

Re: need help with PHP after IDP upgrade to 5.3

Posted: Wed 19 Feb 2014 1:32 pm
by beteljuice
Get back to your ISP - It should work.

Using echo you are outputing html ?

Try "<slideshow>"

Also try using single quote '<slideshow>'

PHP does different evaluations with the two different styles of quotes.

Re: need help with PHP after IDP upgrade to 5.3

Posted: Thu 20 Feb 2014 9:16 am
by hills
Excellent thanks for that. I'm outputting lines that are fed into swf slideshow. It creates a list of images to display for the replay last 24 hours option. The &lt and &gt seem to work, but swf is still not recognising it. It has given me something to continue with so I'm sure I'll be able to nut it out.

Thanks again! :clap:

Re: need help with PHP after IDP upgrade to 5.3

Posted: Thu 20 Feb 2014 3:25 pm
by Welly
I have php version 5.4.7 and the following code works on my site:

<?php
echo "<slideshow>\n";
echo "<side>\n";
?>

I have to look at the page source to see the results but it outputs:

<slideshow>
<side>

Perhaps you can post the entire line of code I'll try it on my server?

Edit.
Thinking on, I had this once when trying to add php into a page with a .html file extension. There is a setting the ISP needs to apply before embedded php will work in a html page.

You could try changing your test page to have a .php extension to see if it makes any difference.

Re: need help with PHP after IDP upgrade to 5.3

Posted: Thu 20 Feb 2014 3:34 pm
by mcrossley
Welly wrote:Thinking on, I had this once when trying to add php into a page with a .html file extension.
Yep, I recall that by default PHP will not print HTML tags into a HTML document - though it does on my server and I did not have to reconfigure anything. :roll:

Re: need help with PHP after IDP upgrade to 5.3

Posted: Thu 20 Feb 2014 8:37 pm
by hills
Thanks very much for that! My original script is working again now so I suspect my ISP has made another change since the upgrade.

Thanks again for for your help it is very much appreciated!