Log in

View Full Version : Parse Error I can't fix!



MrRSMan
04-27-2008, 11:49 AM
Okay, this is what I get when I try to include a file into my page:


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

Warning: include(http://www.runevoyage.com/voyagegaming/news_archives/menu.htm) [function.include]: failed to open stream: no suitable wrapper could be found in /home/mrrsman/public_html/newsarchives.php on line 42

Warning: include() [function.include]: Failed opening 'http://www.runevoyage.com/voyagegaming/news_archives/menu.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mrrsman/public_html/newsarchives.php on line 42


Please help me- I'm not expereinced with PHP.

Nile
04-27-2008, 01:10 PM
Ok, make sure that the file your including is a valid file and that you can access it in the browser, also show me line 42 of newsarchives.php please.

thetestingsite
04-27-2008, 02:45 PM
This error explains it all:



URL file-access is disabled in the server configuration in /home/mrrsman/public_html/newsarchives.php on line 42


It means that in the php.ini configuration file, you do not have allow_url_fopen or allow_url_include set to on. In the php.ini file, it should look like this:



;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;

; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On

; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
allow_url_include = On


If you do not have control of the server, then you are basically out of luck unless you can convince your host to change these settings.
Hope this helps.