Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#2 2007-11-03 20:56:15

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Problem in txp code

First, what was the exact error message?

Cheers!

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

#4 2007-11-03 21:51:33

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Problem in txp code

You should post your code, sylverwillow. The error is in the code.

Offline

#5 2007-11-03 21:54:52

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

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

#6 2007-11-03 21:56:07

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

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

#7 2007-11-03 22:09:21

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

#9 2007-11-03 22:41:21

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: Problem in txp code

are you leaving textile on?

Offline

#10 2007-11-03 23:14:24

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

#11 2007-11-03 23:41:44

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

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

Board footer

Powered by FluxBB