Weird PHP problem

Post Reply
DumbDumb
Posts: 3
Joined: Fri Dec 13, 2013 9:13 am

Weird PHP problem

Post by DumbDumb »

OK guys I'm new around here so would appreciate a small help. When I add my custom php part in templates it doesn't load the page at all. Last night it worked like a charm and everything was as it should be and when I got up, it's no longer loading the page. For example, a small tag cloud:

Code: Select all

<tag_cloud order=alphabet>
      <a href="/tag/<!--TAG_NAME-->/" target="_parent" style="font-size: <?php if (<!--TAG_RANK--> == 3) { echo 16; } elseif (<!--TAG_RANK--> == 2) { echo 14; } elseif (<!--TAG_RANK--> == 1) { echo 12; } elseif (<!--TAG_RANK--> == 0) { echo 10; } ?>px;"><!--TAG_NAME--></a>
</tag_cloud>
I repeat again, I saw it working last night without any problems.
Help? :)
admin
Site Admin
Posts: 37994
Joined: Wed Sep 10, 2008 11:43 am

Re: Weird PHP problem

Post by admin »

So you tried that part as a separate template and it doesn't work ?

I mean how do you know that this is a problem part ?
Don't forget to run script update
DumbDumb
Posts: 3
Joined: Fri Dec 13, 2013 9:13 am

Re: Weird PHP problem

Post by DumbDumb »

I left only that part of the code in whole document, and still that problem persists.
If I use a simple php code without using <!-- TAG_RANK --> or any other element it works just fine everywhere.

And now, for example, it is working like before on one site, and not working on another.... Same code, same structure, everything.
admin
Site Admin
Posts: 37994
Joined: Wed Sep 10, 2008 11:43 am

Re: Weird PHP problem

Post by admin »

Blank page = php error in template and display_error = off in php.ini

try to output TAG_RANK w\o php code and see where your code breaks.

I think you should try quote tag at least
Don't forget to run script update
Post Reply