Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-09-28 19:25:53

progre55
Member
Registered: 2006-05-02
Posts: 668

Warning: Raw PHP tags are deprecated

I am using an old version of TXP on one of my sites. 4.04. I needed to implement a weather widget which is causing the following message: Warning: Raw PHP tags are deprecated in … – Although the message appears, the widget does work.

Under publish, in the Admin Advanced Area I have checked “Yes” to allow RAW PHP … this did not make the message disappear … I have also looked at http://textpattern.com/faq/212/warning-raw-php-tags-are-deprecated

Is there something I am missing to make the message dissappear …

I should also add the site is in “Live” Mode ….

Last edited by progre55 (2009-09-28 19:26:36)

Offline

#2 2009-09-28 19:58:40

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Warning: Raw PHP tags are deprecated

The first paragraph in that FAQ you’re referring to tells you how to solve it.

Offline

#3 2009-09-28 20:06:50

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: Warning: Raw PHP tags are deprecated

Rudd:

Sorry, I should have been a bit clearer. If I make modificatios as outlined in the first paragraph – the widget stops functioning. I know it says in the first paragraph “Textpattern will always display a warning message when in Testing or Debug mode” but can’t I turn it off somehow ….

This is the message I am getting: Warning: Raw PHP tags are deprecated in /home/………./www/textpattern/publish.php on line 997

Thanks.

Last edited by progre55 (2009-09-28 20:24:23)

Offline

#4 2009-09-28 20:30:39

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Warning: Raw PHP tags are deprecated

Not related to this problem, but please upgrade your TXP install to fix some security issues.
To fix the warning, you’ll have to avoid using raw PHP tags and fix the widget to make it work.

Offline

#5 2009-09-28 21:05:06

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: Warning: Raw PHP tags are deprecated

Rudd:

Understand. Let me ask you one thing, and I am sure it is because it is an old version, but it states the message will be displayed in Testing and Debug Mode, but I am in live mode. Is there a way (at least in the short term) for me to correct this (ie hard code it for live mode) to make the error go away …

Thanks.

Offline

#6 2009-09-28 22:39:47

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Warning: Raw PHP tags are deprecated

In /textpattern/publish.php search for restore_error_handler(); and move it two lines down.
Upgrading to the latest TXP version will have the same effect and is recommended. Doesn’t take a lot of time either.

Offline

#7 2009-09-29 12:10:28

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: Warning: Raw PHP tags are deprecated

Rudd:

Thanks. I know updating is the way to go and I have done thiis for most of my sites. The problem is that for this site I sued Gerhard’s custom field hack. (because at that time the plug in was only a twinkle in the eye) I have shot an email to Gerhard to see how and what steps are necessary to take so not to screw up the site but to be able to updgrade and possible convert the hack to the plug in.

Thanks again for the assistance.

Offline

#8 2009-09-29 12:50:54

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Warning: Raw PHP tags are deprecated

Gerhard just released a new version of his custom fields plugin which should be compatible with the latest TXP version (4.2.0) and as I understand it, it no longer requires hacking TXP code to make it work.

Last edited by ruud (2009-09-29 12:51:45)

Offline

#9 2009-09-29 12:57:44

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: Warning: Raw PHP tags are deprecated

Rudd:

You are correct. :) I have actually used all of Gerhard’s previous Custom Field Plug Ins (they are excellent) and in fact worked with him on converting the hack into the first plug in. I say worked with him loosley since a project I was working on pushed him “over the edge” to create the plug in. :). My problem is that I need to speak with Gerhard to see what the easiest way is to handle a site like the oner I have where the hack was used and to not lose any of the data.

Offline

Board footer

Powered by FluxBB