Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-11-03 20:50:50
- sylverwillow
- New Member
- Registered: 2007-11-03
- Posts: 6
Problem in txp code
I tried to use php code in pages using the txp:php tag, but I kept getting an error message syaing there was something wrong with the code in the /textpattern directory. Can anybody help me fix this? I’m not that great with php and I don’t want to risk mesing up the entire code.
Offline
Offline
#3 2007-11-03 21:47:07
- sylverwillow
- New Member
- Registered: 2007-11-03
- Posts: 6
Re: Problem in txp code
This is the error message:
Parse error: syntax error, unexpected ‘<’ in /home/melaniem.nl/www/txp/textpattern/publish/taghandlers.php(2738) : eval()’d code on line 1
Offline
Re: Problem in txp code
You should post your code, sylverwillow. The error is in the code.
Offline
Re: Problem in txp code
May be including php prohibited by options?
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: Problem in txp code
syntax error usually means you’re typing in something wrong. are you trying to type in html within your php or something?
Offline
Re: Problem in txp code
Yep, there is syntax error in your code. Because the error is mark <, it could be <?php-tag or something other tag, that should not be used inside your code. <txp:php> is for php, not html. If you try output something use echo.
In other words you should definetly post your script here that we could help you.
Cheers!
Offline
#8 2007-11-03 22:31:44
- sylverwillow
- New Member
- Registered: 2007-11-03
- Posts: 6
Re: Problem in txp code
The problem isn’t with the php I put in the txp:php tags, it’s in the code that handles the tags. `
I could stick the code here, only it’s about 2000 lines and I don’t know where the error is.
Would it help to give the error message?
Offline
Offline
Re: Problem in txp code
The problem isn’t with the php I put in the txp:php tags, it’s in the code that handles the tags.
What are you meaning? The problem is in your code, it ain’t with the TXP. Where are you using the script? Does textile exclude it?
I could stick the code here, only it’s about 2000 lines and I don’t know where the error is.
If the code is so big, it should be turned into a plugin. For security, and a established working.
Would it help to give the error message?
What error message? Where, which and caused by what? Ain’t this the only one Parse error: syntax error, unexpected ‘<’ in /home/melaniem.nl/www/txp/textpattern/publish/taghandlers.php(2738) : eval()‘d code on line 1?
Cheers!
Offline
Re: Problem in txp code
Have you modified any core files? Please post either a tag trace or the relevant template code (both TXP and PHP). Additionally, check your syntax of your PHP code as a standalone script.
Last edited by jm (2007-11-03 23:42:01)
Offline
#12 2007-11-04 14:30:04
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Problem in txp code
…eval()‘d code…
The problem is in the PHP code you are using with a txp:php tag.
Related FAQs:
Offline