cancel
Showing results for 
Search instead for 
Did you mean: 

php_include to mysql faq not working ?

Negger
Dabbler
Posts: 20
Registered: ‎04-08-2010

php_include to mysql faq not working ?

I've got FAQEngine (a php/mysql FAQ section) up and running on my website, and can view it directly in the browser by following the url :
http://ccgi.username.plus.com/faqengine/faq.php
The actual page I want to link to as a start point is at:
http://ccgi.username.plus.com/~username/faqengine/faq.php?list=all&prog=GM1&lang=en&onlynewfaq=0&lay...
N.B. See the additional "/~username" slipped in !
However, I can't get a "php include" to access either FAQEngine page so that it opens in the FAQ tab on my webpage ? Do I have to amend the url ?
When i navigate via a phpinclude I get the following 3 error messages:
Warning: include() [function.include]: URL file-access is disabled in the server configuration in /share/storage/02/gr/username/faqs.php on line 24
Warning: include(http://ccgi.username.plus.com/~username/faqengine/faq.php/ ) [function.include]: failed to open stream: no suitable wrapper could be found in /share/storage/02/gr/username/faqs.php on line 24
Warning: include() [function.include]: Failed opening 'http://ccgi.username.plus.com/~username/faqengine/faq.php/ ' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /share/storage/02/gr/username/faqs.php on line 24
Line 24 is the phpinclude in my FAQ page html. All my other phpincludes are working fine as is the database, or I wouldn't be able to view it via the browser ?
Can anyone please tell me where I am going wrong, and being a Newbie, please don't exclude the obvious ! ?
Many Thanks
4 REPLIES 4
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: php_include to mysql faq not working ?

Instead of trying to include a URL, which as the first error message says is a disabled access method (for security reasons), specify the path directly within the file system.
David
Negger
Dabbler
Posts: 20
Registered: ‎04-08-2010

Re: php_include to mysql faq not working ?

HI Spraxyt, Many thanks for your reply. I've been trying every permutation of file path that I can think of, including with/without leading /, with with/without leading ..
If i take the http://username/ away from the url, presumably that should give me the correct filepath ?
I note that in my browser the url shows as:  http://ccgi.username.plus.com/faqengine/faq.php whereas if I copy the url from my ftp client, Filezilla, it shows as ftp://username@cshell.plus.net/faqengine/faq.php.
Is that significant ?
Any other advice/suggestions much appreciated
Reagrds
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: php_include to mysql faq not working ?

Quote from: Negger
Warning: include() [function.include]: URL file-access is disabled in the server configuration in /share/storage/02/gr/username/faqs.php on line 24

The path you need is like that shown in your error message, which I've highlighted. For your included file you need to change faqs.php (which is the current file) to faqengine/faq.php I assume.
The HTTP and FTP URLs basically say same the same thing, but in different ways to suit the access protocols.
David
Negger
Dabbler
Posts: 20
Registered: ‎04-08-2010

Re: php_include to mysql faq not working ?

Thanks again Spraxyt.
I've removed my FAQ's page and changed the FAQ link in my navbar direct to the pathway to the database, and at least it now works. Not exactly what I wanted, but it works. I may go back to trying to load the database into the main div of my faqs webpage at a later date.
Seems that there is an issue with using a php_include to load this.
Regards