Forum Moderators: coopster

Message Too Old, No Replies

PHP Error

         

Saboi

10:46 am on Oct 6, 2008 (gmt 0)

10+ Year Member



Hello guys,

I am getting the following error.

Where do you think i am getting it wrong?

Please advice

Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/marketin/public_html/index.php on line 3

Warning: include(http://www.examplea.com/header.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/marketin/public_html/index.php on line 3

Regards,

Saboi

[edited by: eelixduppy at 1:53 pm (utc) on Oct. 6, 2008]
[edit reason] exemplified [/edit]

PHP_Chimp

11:23 am on Oct 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



URL file-access is disabled in the server configuration
Access to urls can be disabled, with allow_url_fopen [uk.php.net], so that scripts from other servers cant be used.

If the url you want is actually on the same server then dont call it with http://www.example.com/page.php, just call it as path/to/script.php.
If the script is actually on another site then you will need to copy it over as a local script so that you can use it.

Saboi

11:40 am on Oct 6, 2008 (gmt 0)

10+ Year Member



Thanks.

Actually, all scripts are on the same server(i dont manage it)...

But i get your point, and it has worked, that i just indicate the file name, e.g, include("file.php"); without the http:// bla bla bla.....

Is that correct?

PHP_Chimp

7:49 am on Oct 7, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Should work fine.
As that way php will be looking through the file system for the file, so not trying to use an internet url to access the info. So you avoid allow_url_fopen.

Saboi

8:16 am on Oct 7, 2008 (gmt 0)

10+ Year Member



Hello PHP_Chimp,

Thanks, its working now...

You are right, just had to exclude htt://...

Thanks