Page 1 of 1

PHP?

Posted: Fri Feb 01, 2008 6:16 am
by VideoRob
What plugin do I need to install so php can work on my index? I have a simple piece of php that I need to put in the sidebar

I've tried using the "External PHP Application" plugin but it didn't seem to work, either that or it wouldn't install properly. I can't see any other php plugin

Re: PHP?

Posted: Fri Feb 01, 2008 11:16 am
by garvinhicking
Hi!

Check http://www.s9y.org/78.html#A4 and http://www.s9y.org/78.html#A5 for how to put it in your index.tpl.

Apart frmo that, the "External PHP ApplicatioN" plugin should work. how did you configure it? What do you mean with "wouldn't install properly"?

Regards,
garvin

Posted: Fri Feb 01, 2008 9:14 pm
by VideoRob
Thanks for your response.

When I try to install the External PHP Application as a sidebar plugin I get this error in the sidebar

Warning: show(/usr/home/rob/domains/mydomain.com/public_html/include/your_php.inc.php) [function.show]: failed to open stream: No such file or directory in /usr/home/rob/domains/mydomain.com/public_html/plugins/serendipity_plugin_externalphp/serendipity_plugin_externalphp.php on line 76

Warning: show(/usr/home/rob/domains/mydomain.com/public_html/include/your_php.inc.php) [function.show]: failed to open stream: No such file or directory in /usr/home/rob/domains/mydomain.com/public_html/plugins/serendipity_plugin_externalphp/serendipity_plugin_externalphp.php on line 76

Warning: show() [function.include]: Failed opening '/usr/home/rob/domains/mydomain.com/public_html/include/your_php.inc.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/home/rob/domains/mydomain.com/public_html/:/usr/home/rob/domains/mydomain.com/public_html/bundled-libs/') in /usr/home/rob/domains/mydomain.com/public_html/plugins/serendipity_plugin_externalphp/serendipity_plugin_externalphp.php on line 76

When I install it as an event plugin, I looks like its installed properly but the php doesn't work.

Posted: Sat Feb 02, 2008 12:04 pm
by garvinhicking
Hi!

This error means, you configured a wrong path inside the plugin. The filename you entered does not exist!

Regards,
Garvin

Posted: Sun Feb 03, 2008 8:14 am
by VideoRob
How do I set External PHP Application up? The file I want to add isn't on the same site and I want the php to work in the sidebar

All I want to do is add this piece of php into the sidebar

<?php
@ini_set('expose_php', 'Off');
@include "http://www.domain2.com/lo/site_templates/site_4_6.php";
?>

Posted: Sun Feb 03, 2008 2:04 pm
by garvinhicking
Hi!

Create a script like "remote.php" inside your s9y directory. Then configure the sidebar plugin to include the file "/path/to/your/s9y/remote.php". The remote.php should contain this code:

Code: Select all

<?php 
ini_set('expose_php', 'Off'); 
include "http://www.domain2.com/lo/site_templates/site_4_6.php"; 
?>
REMBER that not all PHP servers are configured to allow you to include PHP code from foreign servers! Most PHP servers do not allow include calls over HTTP. Remove the "@" to see possible error messages about that.

Regards,
Garvin