Problem With External PHP Application

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Maccsta
Regular
Posts: 77
Joined: Mon Feb 19, 2007 6:07 am
Location: Leeds, England

Problem With External PHP Application

Post by Maccsta »

Hi!

I'm trying to call this url into the external php application:

http://www.mydomain01.com/lo/site_templ ... e_34_8.php

However I get this error on the front of the page:

Warning: serendipity_plugin_externalphp::include() [function.include]: Failed opening '' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/maccsta/public_html/mysite01/bundled-libs/:/home/maccsta/public_html/teenfucksuck/bundled-libs/Smarty/libs/:/home/maccsta/public_html/mysite01/:') in /home/maccsta/public_html/mysite01/plugins/serendipity_plugin_externalphp/serendipity_plugin_externalphp.php on line 76


What do I need to sort this? I'm calling a list of links stored on one server to a different server.

Hope you can help.........

Thanks in advance :)
Check out this blog today!
Buy Eye Secrets strips.
Best devices reviewed at http://www.penisstretchers.org/.
Order Capsiplex slimming pills today.
Buy Meratol diet pills online.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

In version 1.3 of the plugin, that line is a case statement, so we're obviously looking at different versions. You might want to consider upgrading.

The error message makes it sound like the field marked "file to include" on the plugin configuration page is empty. It's trying to include '', the empty string.

However, in examining the code, I see that we use the realpath() method on your input. I think that'll fail if you're trying to access anything that isn't in the local filesystem.

I recommend writing a quick wrapper. This will work if URL_fopen_wrappers is set in your PHP configuration:

Code: Select all

# foreign.php: PHP wrapper file to read data from a foreign server
@include 'http://foreign-server/path/to/script.php
Then point your plugin at the wrapper. All should work.
Judebert
---
Website | Wishlist | PayPal
Maccsta
Regular
Posts: 77
Joined: Mon Feb 19, 2007 6:07 am
Location: Leeds, England

Post by Maccsta »

Thanks for the reply judebert

So You are saying I just need to add that include code to the serendipity_plugin_externalphp.php file?
Check out this blog today!
Buy Eye Secrets strips.
Best devices reviewed at http://www.penisstretchers.org/.
Order Capsiplex slimming pills today.
Buy Meratol diet pills online.
Maccsta
Regular
Posts: 77
Joined: Mon Feb 19, 2007 6:07 am
Location: Leeds, England

Post by Maccsta »

Actually I have figured it out thanks. Created a .php file and uploaded to the root directory of the domain containing this code:


<?php
include 'http://www.mydomain.com/lo/site_templates/site_33_7.php
?>

Pointed the external php plugin at that file like you said.

Thanks :)
Check out this blog today!
Buy Eye Secrets strips.
Best devices reviewed at http://www.penisstretchers.org/.
Order Capsiplex slimming pills today.
Buy Meratol diet pills online.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Yes, that's exactly what I was looking for. Sorry I forgot the <?php ?> tags.
Judebert
---
Website | Wishlist | PayPal
Post Reply