Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Plugins & Atahualpa (http://forum.bytesforall.com/forumdisplay.php?f=16)
-   -   [SOLVED] Exec-Php not working (http://forum.bytesforall.com/showthread.php?t=6232)

joan Mar 10, 2010 08:18 AM

[SOLVED] Exec-Php not working
 
Hi Juggledad
My site ibooktravel.com.au is new with all the latest versions of wp 2.9.2 & Atahualpa 3.4.6, as well as EXEC-php plugin but a simple `< ?php echo "Hello World"; ?>` displays as text and is not executed. I found a fix at : http://wordpress.org/support/topic/281992?replies=7 but although this is ok for the "hello world" code it makes a complete mess of `< ?php include ('http://ibooktravel.com.au/wp-content/plugins/front-slider/front-slider.php');?> ` leaving a page of error messages.
I looked for other solutions but couldn't find anything... I would greatly appreciate any valued suggestions you might have.

juggledad Mar 10, 2010 10:29 AM

there is no space between the '<' and '?php' so
HTML Code:

< ?php echo "Hello World"; ?>
should be
HTML Code:

<?php echo "Hello World"; ?>

joan Mar 10, 2010 06:19 PM

OMG - sorry for being soo stupid! Thank you a million times over Juggledad!

joan Mar 11, 2010 12:13 AM

Oh dear Juggledad,
Seems it's not as simple as my being stupid. Something is putting an extra space in the code every time I save the post. Seems to be one of Wordpress' native functions called force_balance_tags ... Somehow exec-php is being executed in the wrong order. I have deleted & re-installed exec-php but still the problem. If you can offer any suggestion again, I'd be eternally grateful. Regards, Joan

juggledad Mar 11, 2010 03:43 AM

are you using the HTML editor? I just installed exec php and put
HTML Code:

<?php echo 'hello juggledad!'; ?>
into a post and it works fine, no problem, I get 'hello juggledad'

IF however I use the visual editor, it gets transformed into
HTML Code:

&lt;?php echo 'hello juggledad!'; ?&gt;
which will then display as '<?php echo ‘hello juggledad!’; ?>' since it is no longer PHP even if it LOOKS like PHP code

joan Mar 12, 2010 01:26 AM

Yes I am typing into the HTML editor, not the Visual editor. I am getting an extra space inserted into the code upon clicking the Publish- Update button. Something very weird is happening.

juggledad Mar 12, 2010 03:23 AM

try disabling all your plugins but the exec-php to see if it is one of them.

joan Mar 16, 2010 11:07 PM

Thanks Juggledad,
I had already disabled all plugins when you suggest it. Also changed themes to the default, then I re-install the entire wordpress package, but still no luck. Finally I found it was a wordpress
"Writing Settings" setting:

[] WordPress should correct invalidly nested XHTML automatically

which I have changed to OFF, and the code no longer gets and extra space inserted in between `<?php` and the problem is fixed (the setting must be stored in the database, which was about the only thing I didn't reset). Can you make this post "Solved" ? :)Thanks for your time, again.


All times are GMT -6. The time now is 08:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.