PHP/JSON error

Currently reading:
PHP/JSON error

mehstg

GPS Multijet 1.9 Orange
Joined
Aug 26, 2008
Messages
1,665
Points
288
Location
North London
Hey guys

Was wondering if there are any PHP guru's on this site. I am writing a PHP widget to include on my charity website but am running into trouble with it. It seems to work perfectly as a standalone PHP file, as shown here. However, as soon as I put the PHP file within include tags on a page on my site, it throws the following errors (stating that the JSON feed cannot be found). The JSON is the incoming feed from JustGiving, feeding the data to my script.

Warning: include(/lejogblog_widget/widget.php) [function.include]: failed to open stream: No such file or directory in /home/content/d/a/n/****/****/other_sites_hosted_here/****/****/execphp.php(37) : eval()'d code on line 1

Warning: include() [function.include]: Failed opening '/lejogblog_widget/widget.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/d/a/n/****/****/other_sites_hosted_here/****/****/execphp.php(37) : eval()'d code on line 1
 
Also could be permissions what web server you running it in?.

Apache on linux methinks. Permissions are set right. I think 30111987 is probably right though. Forgot includes use the file structure not a URL structure!

Will have a look in a bit and report back!

P
 
hehe :p.

At least your using the right Web server :) (y)

Of course. IIS is teh ghey!

D'oh! That wasn't the error I meant to post up! - The error i am actually having is

Warning: fopen(cache/jsonCache.cache) [function.fopen]: failed to open stream: No such file or directory in /home/content/d/a/n/*******/html/other_sites_hosted_here/****/****/wp-content/plugins/php-code-widget/lejogblog_widget/widget.php on line 91
That error I posted was indeed a page not found error caused by me cocking around with my code!
 
Right, seem to have narrowed the errors down to wordpress permalinks. Should hopefully have it sorted later today!
 
Back
Top