Jump to content

Little Help?


eli312

Recommended Posts

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: :confused:

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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']);

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.