Bill Weye
Member
Posted 9 months ago #
Your plugin appears to be busted with version 3.4.1 of WP. I'm getting two errors (before and after the php code is output (the tag cloud I wanted was output correctly, despite the php errors).
The errors were:
Parse error: syntax error, unexpected $end in /home/weye5/public_html/wp-content/plugins/allow-php-in-posts-and-pages/allowphp.php(110) : eval()'d code on line 3
and
Parse error: syntax error, unexpected T_ENDIF in /home/weye5/public_html/wp-content/plugins/allow-php-in-posts-and-pages/allowphp.php(110) : eval()'d code on line 1
http://wordpress.org/extend/plugins/allow-php-in-posts-and-pages/
Hit Reach
Member
Plugin Author
Posted 8 months ago #
Hi Bill,
It could be the code you are using is not using the correct syntax,
The error is in the evaluating of your code which is the most likely possibility, are you sure the code is correct? :)
Thanks!
jimsander
Member
Posted 5 months ago #
I am seeing the same since upgrading, but can't say which upgrade (to wp 3.4.2 or upgrading the plugin)
Code
[php]
if ( 1 == 1 ) {
[/php]
this is one
[php]
} else {
[/php]
this is two
[php]
}
[/php]
Output
Parse error: syntax error, unexpected $end in /mnt/target07/350037/589494/www.rapidresultspersonaltraining.net/web/content/wp-content/plugins/allow-php-in-posts-and-pages/allowphp.php(373) : eval()'d code on line 3
this is one
Parse error: syntax error, unexpected '}' in /mnt/target07/350037/589494/www.rapidresultspersonaltraining.net/web/content/wp-content/plugins/allow-php-in-posts-and-pages/allowphp.php(373) : eval()'d code on line 2
this is two
Parse error: syntax error, unexpected '}' in /mnt/target07/350037/589494/www.rapidresultspersonaltraining.net/web/content/wp-content/plugins/allow-php-in-posts-and-pages/allowphp.php(373) : eval()'d code on line 2
Hit Reach
Member
Plugin Author
Posted 4 months ago #
Hi Jimsander,
Way to hijack!
if you are not using the advanced filter then you cannot break apart your code like that as its being evaluated individually, its the equivalent of creating a new php file with only the contents:
<?php
if ( 1 == 1 ){
which would cause an error anyway.
Thanks
Hit Reach
sazanetti
Member
Posted 2 months ago #
getting this error message:
Parse error: syntax error, unexpected '<' in /home/content/97/8218197/html/wp-content/plugins/allow-php-in-posts-and-pages/allowphp.php(191) : eval()'d code on line 1
from this [allowphp function=1]
<?php
if ( is_user_logged_in() ) {
echo 'Welcome, registered user!';
} else {
echo 'Welcome, visitor!';
}
?>
@sazanetti
all snippets automatically start with <?php
Try it with that removed.
xehyundai3s
Member
Posted 1 month ago #
I used this code:
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('home_sidebar_products') ) : ?><?php endif; ?>
I converted this to [php]code[/php]
but it display same error abow. Please help me to fix this?