PHP Code doesn't work?!

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Rahner
Posts: 82
Joined: Sat 15. Jul 2006, 18:16

PHP Code doesn't work?!

Post by Rahner »

Nice error, when I put in my include code into an article.

Code: Select all

Parse error: parse error, unexpected '&' in /srv/www/htdocs/web4/html/portal/include/inc_front/front.func.inc.php(2601) : eval()'d code on line 1
How can i fix this?
PS: I turned on "allow_cntPHP_rt"!
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

How about showing the syntax you used! Was it a just "including" something like this:

Code: Select all

'http://www.yourdomain.com/filename.php?foo=1&bar=2'
I presume you wrapped this in [PHP][/PHP] tags. Did you try it as a straight <?php -snippet- ?>
Rahner
Posts: 82
Joined: Sat 15. Jul 2006, 18:16

Post by Rahner »

I include with
<?php include( '/srv/www/htdocs/web4/html/x/include_this/x.php'); ?>
And only this code appears...
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Post by juergen »

Hi Rahner,

give it a try:

Code: Select all

[PHP]
include( '/srv/www/htdocs/web4/html/x/include_this/x.php');
[/PHP]
Not shure if other errors will appear, depends on what is included in your file.. for small job this might work

Jürgen
Rahner
Posts: 82
Joined: Sat 15. Jul 2006, 18:16

Post by Rahner »

Then:

Code: Select all

Error in query:SELECT * FROM phpwcms_fonts ORDER BY font_name
...
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Post by juergen »

I forgot :

{PHP:x.php} and put x.php in frontend render ....

In case you are working with phpwcms in x.php this has to be included like modul or like contentpart.

Diificult ;)
Rahner
Posts: 82
Joined: Sat 15. Jul 2006, 18:16

Post by Rahner »

Nice, its working, but on the wrong place...my news script is on top of the page and not where I put in the article...
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

Instead of putting it in frontend render... How about trying:

Code: Select all

{PHP:/srv/www/htdocs/web4/html/x/include_this/x.php}
-OR-

Code: Select all

{URL:http://www.yourdomain.de/path/to/include_this/x.php}
Rahner
Posts: 82
Joined: Sat 15. Jul 2006, 18:16

Post by Rahner »

Its the same: It works, too, but over my page and not in the article...
I want it to appear in the article, where i have written the code...
Rahner
Posts: 82
Joined: Sat 15. Jul 2006, 18:16

Post by Rahner »

It's working on the right place now, but the script is making dumb actions :?
Post Reply