Posted on: 03/18/04 08:39pm
By: Limynali
I'm experiencing some problems using php in staticpages. I'm using the latest version (1.3.9). It works fine on my windows xp machine. But when I try the same thing on my redhat 9 w/ apache webserver I get this lovely error:
Parse error: parse error in /var/www/sweetgeek/plugins/staticpages/functions.inc(475) : eval()'d code on line 1
I get this error in any of my staticpages when I enable php whether or not they even have any php code actually in them. So I'm a bit confused as to why the same steps on one setup work fine but not for the other.
Thanks!
php in staticpages causes errors
Posted on: 03/18/04 08:50pm
By: geKow
Have you also the same static pages php settings on both machines?
(execute PHP, execute PHP with return)
geKow
php in staticpages causes errors
Posted on: 03/18/04 09:04pm
By: Limynali
yes, I've tried it with both return and execute on both machines. Again, it works fine on the one, and spits back that error on the other.
php in staticpages causes errors
Posted on: 03/19/04 02:01am
By: Dirk
It really sounds like a syntax error or something similar in your PHP code.
Try it with some trivially simple code, like
return "Hello, world";
Activating PHP when the page doesn't contain any PHP code doesn't make sense and will surely lead to a parse error.
bye, Dirk
php in staticpages causes errors
Posted on: 03/19/04 09:08am
By: Limynali
Ok, thanks Dirk! I found out that a) you get lovely errors when no php code is there and b) I was a bit careless copying my static page content and lost the opening ?>.
php in staticpages causes errors
Posted on: 04/09/04 11:24pm
By: Anonymous (Vadertech)
I am getting the same error. echo hello world works.
My simple php code.
<?php
include ('http://www.isdp.net/files/frontbanner.htm');
?>
If i put this same code into test.php, it works fine.
php in staticpages causes errors
Posted on: 04/09/04 11:30pm
By: Peter_Apockotos
Remove the php tag, it is not needed.
php in staticpages causes errors
Posted on: 04/09/04 11:46pm
By: Anonymous (vadertech)
[QUOTE BY= Peter_Apockotos] Remove the php tag, it is not needed.[/QUOTE]
nice, thanks. I wonder why the mouseovers don't work through staticpages. Doe's staticpages restrict this?
php in staticpages causes errors
Posted on: 04/10/04 12:21pm
By: Peter_Apockotos
I am not sure, do you have a page to look at?
php in staticpages causes errors
Posted on: 07/04/04 04:22pm
By: tmarquez
Note sure if this will help anyone, but I was having the same problem when I upgraded to 1.3.9sr1 with my php static pages.
I took out and everything started working fine.
php in staticpages causes errors
Posted on: 07/29/04 09:50am
By: Anonymous (MrB)
I followed the instructions for enabling php as I wanted to be able to call the Mr Rat Amazon script into a static page (available from www.absolute-freebies.com).
I went into groups and enabled the staticpages php as included in the documentation. I included the code as is (following the instructions in the Mr Rat manual) to test it before customising:
include_once("http://www.XXXXnet/cgi-bin/apf_feed.cgi? mode=videogames&node=471280");
I set execute (return).
I clicked on the page - and I received an error message telling me that my MySQL database wasn't there. I checked in through cpanel and found that all my databases (6 in all) were not there, and I could not log in to phpmyadmin .
Not sure if this is a geeklog, APF or hosting issue - fortunately my host was understanding and has reinstated my databases from backup , but I thought I would raise this in case it is a bug in the static page plug-in.
Kind regards
Mr B
Re: php in staticpages causes errors
Posted on: 01/19/10 10:24am
By: tgc
I want to php include a bit of code in my staticpages but I don't get it too work. I always get
Text Formatted Code
Parse error: parse error, unexpected '<' in /home/x/xxx.com/gl/plugins/staticpages/functions.inc(762) : eval()'d code on line 4
I used the
Text Formatted Code
return "Hello, world";
Dirk gave here a while ago.
I activated execute PHP for staticpages and I tried with execute PHP (returen) and execute PHP.
I am using GL 1.4.1.
Thanks for any ideas.
Re: php in staticpages causes errors
Posted on: 01/19/10 10:38am
By: ::Ben
Hello,
Did you try a simple
Text Formatted Code
echo "Hello, world";
::Ben
Re: php in staticpages causes errors
Posted on: 01/19/10 11:26am
By: tgc
I get the same error message.
Re: php in staticpages causes errors
Posted on: 01/19/10 12:11pm
By: ::Ben
Do you have <?PHP ... ?> surrounding your PHP code? Because it isn't needed.
::Ben
Re: php in staticpages causes errors
Posted on: 01/19/10 12:15pm
By: tgc
I put it in just how I pasted it in the code box. No PHP tags.
Re: php in staticpages causes errors
Posted on: 01/19/10 12:31pm
By: ::Ben
Very strange because if you removed the PHP tags, there wouldn't be any '<' sign left to complain about...
Could it be a browser cache issue?
::Ben