eli312 Posted January 15, 2010 Share Posted January 15, 2010 Hi, So i am making a website using PHP and such. Now i am using a mac running Apache with PHP and MySql installed. When running it on my mac everything, i have set up a login system and that all works fine reads from the database and everything running off my mac. So i thought i was ready to upload to the web so i changed all the database things and sorted everything out. But i keep getting this error: Warning: require_once() [function.require-once]: URL file-access is disabled in the server configuration in XXXXXXXXXXXXXXXXXXXXXX on line 8 Warning: require_once(http://XXXXXXXXXXXXXXXXXXXXXX) [function.require-once]: failed to open stream: no suitable wrapper could be found in XXXXXXXXXXXXXXXXXXXXXX on line 8 Fatal error: require_once() [function.require]: Failed opening required 'http://XXXXXXXXXXXXXXXXXXXXXX' (include_path='.:/usr/lib/php:/usr/local/lib/php') in XXXXXXXXXXXXXXXXXXXXXX on line 8 So i read in to this and people are saying that you need to have "allow_url_fopen = ON" and "allow_url_include = On" So i checked what was running on my side and i had allow_url_fopen = ON and allow_url_include = OFF then check the website side. and it was the same.. so im quite confused as to what is really going wrong with my site... if anyone can help please do. thanks. :confused: Quote Link to comment Share on other sites More sharing options...
trq Posted January 15, 2010 Share Posted January 15, 2010 You should be using filesystem paths to include files, not urls. Quote Link to comment Share on other sites More sharing options...
eli312 Posted January 15, 2010 Author Share Posted January 15, 2010 You should be using filesystem paths to include files, not urls. ok, so i removed the http:// bit and just left it as checkthisot.hotoi.com now this solved one problem but i still have Fatal error: require_once() [function.require]: Failed opening required 'checkthisot.hotoi.com/includes/config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a29896/public_html/includes/initalize.php on line 8 Warning: require_once(checkthisot.hotoi.com/includes/config.php) [function.require-once]: failed to open stream: No such file or directory in /home/a29896/public_html/includes/initalize.php on line 8 So now is the problem it can not find the files? and the code in initalize.php: <?php defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR); defined('SITE_ROOT') ? null : define('SITE_ROOT', 'checkthisot.hotoi.com'); defined('LIB_PATH') ? null : define('LIB_PATH', SITE_ROOT.DS.'includes'); require_once(LIB_PATH.DS."config.php"); require_once(LIB_PATH.DS."functions.php"); require_once(LIB_PATH.DS."session.php"); require_once(LIB_PATH.DS."database.php"); require_once(LIB_PATH.DS."member.php"); ?> Sorry if im being very noobiesh. Quote Link to comment Share on other sites More sharing options...
trq Posted January 15, 2010 Share Posted January 15, 2010 ok, so i removed the http:// bit and just left it as checkthisot.hotoi.com That is not a filesystem path and would make no sense at all to the require or include constructs. This line.... defined('SITE_ROOT') ? null : define('SITE_ROOT', 'checkthisot.hotoi.com'); should be.... defined('SITE_ROOT') ? null : define('SITE_ROOT', $_SERVER['DOCUMENT_ROOT']); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.