Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-01-11 14:53:45

pketh
Member
Registered: 2005-05-30
Posts: 24

Raw PHP tags are deprecated error??

hopefully this is simple to fix but i have no clue at all what’s it’s about:

a page from my website

notice at the top it says
Warning: Raw PHP tags are deprecated in /home/pkethf2/public_html/textpattern/publish.php on line 996

I never once changed anything in the file or kno how to code in PHP, it just randomly appeared a few months back. besides that ugly error though there’s no problem with the page at all..

Is there a way to fix this problem (would dling a fresh copy of txp and replacing that one file on the webserver do it?) or at the very least suppress or hide these error messages?


personal site:
www.pketh.com

Offline

#2 2008-01-11 15:23:03

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: Raw PHP tags are deprecated error??

pketh, probably you have some raw php tag in some of your forms (you should use <txp:php> </txp:php> tag instead).
Besides this I think changing txp status to “live” in administration > preferences will make it go away

Last edited by redbot (2008-01-11 15:29:12)

Offline

#3 2008-01-11 15:27:21

pketh
Member
Registered: 2005-05-30
Posts: 24

Re: Raw PHP tags are deprecated error??

I just checked, it is already ‘live’ :(

if it helps, this is what my publish.php says on line 996

trigger_error(gTxt('raw_php_deprecated'), E_USER_WARNING);

the whole function from 991 to 1005 is :

// ——————————————————————————————- function evalString($html) { global $prefs; if (strpos($html, chr(60).’?php’) !== false) { trigger_error(gTxt(‘raw_php_deprecated’), E_USER_WARNING); if (!empty($prefs[‘allow_raw_php_scripting’])) $html = eval(’ ?’.chr(62).$html.chr(60).’?php ‘); else trigger_error(gTxt(‘raw_php_disabled’), E_USER_WARNING); } return $html; }

// ——————————————————————————————-

i don’t really know php but is this the thing that is telling it to display that ugly error on my page? if i comment the whole thing out will the message be hidden?

Last edited by pketh (2008-01-11 15:34:35)


personal site:
www.pketh.com

Offline

#4 2008-01-11 15:32:13

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: Raw PHP tags are deprecated error??

Are you using php in your forms?

Offline

#5 2008-01-11 15:39:51

pketh
Member
Registered: 2005-05-30
Posts: 24

Re: Raw PHP tags are deprecated error??

none I could see on any forms used for that page


personal site:
www.pketh.com

Offline

#6 2008-01-11 15:45:20

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: Raw PHP tags are deprecated error??

if i comment the whole thing out will the message be hidden?

It shouldn’t have nothing to do with publish.php and you shouldn’t modify it.

Offline

#7 2008-01-11 15:57:21

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: Raw PHP tags are deprecated error??

Also I noticed the warning doesn’t appear on the “links” and “contact” pages but only in “about” and “archive” pages.
I’m quite sure there is some php tag in some of the forms used by these pages or in the page template used by these sections.
If it’s not so I give up and hope someone can give a better advice, sorry.

Last edited by redbot (2008-01-11 15:58:11)

Offline

#8 2008-01-11 16:07:57

pketh
Member
Registered: 2005-05-30
Posts: 24

Re: Raw PHP tags are deprecated error??

oh, well I found some php in the page template (i didn’t check there before)

it was some old remnant of that shortstats thing I never ended up using..
it seems to have killed it !

thanks so much!


personal site:
www.pketh.com

Offline

#9 2008-01-11 19:43:58

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: Raw PHP tags are deprecated error??

Ok ;)

Offline

Board footer

Powered by FluxBB