Include troubles

Site using include: http://www.sonic-xtra.net/test1.php
Site with the file: http://www.forums.sonic-xtra.net

I’ve been trying to implement my boards stats onto my website and got this simple php file which sits in the same place as the forum and the file itself does work. However, it told me to use this include line “<?php include("http://www.forums.sonic-xtra.net/latest_posts.php");?>” on the page I want to place it and when I do all I get is this:

[b]Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/.fletch/jkwhitaker/sonic-xtra.net/test1.php on line 4

Warning: include(http://www.forums.sonic-xtra.net/latest_posts.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/.fletch/jkwhitaker/sonic-xtra.net/test1.php on line 4

Warning: include() [function.include]: Failed opening ‘http://www.forums.sonic-xtra.net/latest_posts.php’ for inclusion (include_path=’.:/usr/local/php5/lib/php:/usr/local/lib/php’) in /home/.fletch/jkwhitaker/sonic-xtra.net/test1.php on line 4[/b]

Also, an old problem going far back that I thought I’d ask about. I have an include script that does work that is a lot longer and is for displaying my page within a template. However I have 2 problems. 1) it will only allow me to chose 1 perticular file type to look for in the code instead of 2 like I need it too e.g; htm or php and 2) any page I have included into the main template with this script it’s dhtml coding no longer works.

Can anyone help?

This sounds like it’s SERVER Configuration issues. Do you have the ability or permissions to adjust it yourself? If not you will need to contact the server admin to adjust settings to allow theses things.

On the includes issue: PLEASE realize that enabling the inclusion of external pages is a security issue! This is likely the reason it is disabled in your current server setup. If your code is not completely 100% hackerproof (and believe me when I say that PHP code seldomly is), your script may unintentionally include (and execute) malicious code on an external server! This could compromise your entire hosting machine, and perhaps even the network your machine is connected to.

About the other two issues: If you could create a new thread for those with some code of where things go haywire, and possibly some debugging info/error messages/etc. that would be swell.

Sponsor our Newsletter | Privacy Policy | Terms of Service