Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-05-10 01:20:43
- jesper
- Member
- From: Melbourne, Oz
- Registered: 2004-03-05
- Posts: 18
Warning: raw_php_disabled in textpattern/publish.php line 937
Hi,
I have just upgraded my textapttern install from 4.0.2 to the latest version from SVN. After doing so I am getting two errors at the top of all my pages:
<code>
Warning: raw_php_deprecated in /textpattern/publish.php on line 933
Warning: raw_php_disabled in /textpattern/publish.php on line 937
</code>
In advanced preferences I have Textpattern set to accept PHP in both pages and articles.
In the top of everyone of my pages I call a seperate PHP script to get the current time in two time zones. I include the script and then call the function that works out the current time:
<code>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml” xml:lang=“en” lang=“en”>
<?php include(“timezone.php”); ?>
<head>
</code>
And I then call the GetTime function at two points.
<code>
<?echo GetTime(30); ?>
</code>
This is no longer working. It was working fine in version 4.0.2.
What is wrong?
How do I accomplish this?
Offline
#2 2006-05-10 01:29:15
- KurtRaschke
- Plugin Author
- Registered: 2004-05-16
- Posts: 275
Re: Warning: raw_php_disabled in textpattern/publish.php line 937
FAQ: http://textpattern.com/faq/34/how-do-i-use-php-code
-Kurt
Last edited by KurtRaschke (2006-05-10 01:29:42)
kurt@kurtraschke.com
Offline
#3 2006-05-10 01:48:33
- jesper
- Member
- From: Melbourne, Oz
- Registered: 2004-03-05
- Posts: 18
Re: Warning: raw_php_disabled in textpattern/publish.php line 937
Thank you Kurt.
I tried to search for any prior mention of the errors I was getting but found no links anywhere. I did not quite know what to look for in the FAQ beyond the actuall errors I was getting. Thanks for your help. It now makes sense that I have to change the tags to <code><txp:php> include(“timezone.php”); </txp:php> </code> and update my script to use global variables to pass the return of the function.
All back and working. Thanks very much!
/Jesper
Last edited by jesper (2006-05-10 01:49:02)
Offline