You are here:  » searchExternal.php stopped working

Support Forum



searchExternal.php stopped working

Submitted by babrees on Sun, 2008-11-02 16:24 in

This was working perfectly the other day. As far as I can remember/know, the only thing that has changed is that mysqli has been enabled on my server.

To call it I have...

<?php
$common_path 
"/home/papillon/public_html/pricetap/";
$common_baseHREF "http://www.papillonnet.com/pricetap/";
$_GET["q"] = "{LINKPRODUCT}";
require(
$common_path."searchExternal.php");
?>

Submitted by support on Mon, 2008-11-03 10:18

Hi Jill,

I take it the main Price Tapestry site itself is still working? In which case, mysqli shouldn't be getting in the way of anything. What actually happens in place of where you would expect the search results to be displayed - are there any error messages etc.?

Cheers,
David.

Submitted by babrees on Mon, 2008-11-03 10:58

Yes, the main PT is still working. Sorry, Should have thought to include the error message!!!!!

An error occoured at http://www.idealchristmasgift.co.uk/link.php?rewritten=1&action=detail&id=109&categorypath=top-gifts-for-2008/for-children&linktitle=star-wars-clone-trooper-voice-changer-helmet on 2008-11-03 10:25:03. Please relay this data to support. Error #2: 'require(/home/papillon/public_html/pricetap/searchExternal.php) [function.require]: failed to open stream: Permission denied' in /home/idealchr/public_html/includes/commonfuncs.php(888) : eval()'d code on line 126.
Fatal error: require() [function.require]: Failed opening required '/home/papillon/public_html/pricetap/searchExternal.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/idealchr/public_html/includes/commonfuncs.php(888) : eval()'d code on line 126

I just wondered if it was after uploading various files that you had sent me. Got a still got the error message
---------
Jill

Submitted by support on Mon, 2008-11-03 13:03

Hello Jill,

The error message is indicating the PHP has not been able to require() the external code because
of a permission denied error; so something has changed regarding the permissions on the directories
on your server; however it is strange for PHP not to be able to open a file within the same hierarchy.

Are both the site where you are including the file, and the Price Tapestry installation under the same
user account (i.e. would you use the same FTP details to access both places), or has that changed?

Cheers,
David.

Submitted by babrees on Mon, 2008-11-03 16:22

The only thing that has changed (apart from new files you sent me, and I reinstalled the original setup) is that my host set up mysqli

No, Price Tapestry is my main user account and the site I am calling it to is on another account, both are on the same server though. But details of that has not changed since it stopped working.

---------
Jill

Submitted by support on Tue, 2008-11-04 06:20

Hello Jill,

Could you perhaps try a test script that has nothing more than the searchExternal.php calling code in it, which will eliminate your CMS and phpexec() as causing the problem, e.g.:

test.php

<?php
$common_path 
"/home/papillon/public_html/pricetap/";
$common_baseHREF "http://www.papillonnet.com/pricetap/";
$_GET["q"] = "Test Search";
require(
$common_path."searchExternal.php");
?>

Cheers,
David.

Submitted by babrees on Tue, 2008-11-04 07:49

Tried that - still got the error :-(

---------
Jill

Submitted by support on Tue, 2008-11-04 10:22

Hi Jill,

It would be worth copying the error message to your host as they should be able to tell why PHP no longer has permission to access the file from the other location. Let them know which folder you are running the script in, and confirm in your email the location of the other folder and they should be able to tell you if they have made any permission changes that would be affecting things...

I'll let you know if anything else springs to mind in the mean-time...

Cheers,
David.

Submitted by babrees on Tue, 2008-11-04 21:03

OK, Contacted my host. After doing something they told me to try again but it still didn't work.

Now I receive an email from them saying "It appears your php sapi was seto to suphp instead of DSO." I don't understand sapi and dso but do know that I have had suphp for a while. They have now "switched it dso" aaarrrggghhh - does that mean I no longer have suphp? This will effect my other script and surely mess up all the permissions for that! [sigh] I am now awaiting them to tell me. I had huge problems setting up the suphp as they messed that up, then messed up all the permissions. Damn good job I always have backups!

---------
Jill

Submitted by support on Wed, 2008-11-05 11:15

Hi Jill,

Is it now working after their second email?

Cheers,
David.