Jump to content

Recommended Posts

Hey guys

 

Im making a website and i am writing a php script for a register form. The script checks for required fields if a required field is missed out then a error is generated. I think the problem might be on the server site.

 

There errors i am getting are

 

Warning: require_once() [function.require-once]: open_basedir restriction in effect. File(/Connections/userlogin.php) is not within the allowed path(s): (/tmp:/usr/share/pear:/home/fhlinux169/m/maltmandarkblues.co.uk/user) in /home/fhlinux169/m/maltmandarkblues.co.uk/user/htdocs/Register.php on line 2

 

Warning: require_once(/Connections/userlogin.php) [function.require-once]: failed to open stream: Operation not permitted in /home/fhlinux169/m/maltmandarkblues.co.uk/user/htdocs/Register.php on line 2

 

Fatal error: require_once() [function.require]: Failed opening required '/Connections/userlogin.php' (include_path='.:/usr/share/pear-php5') in /home/fhlinux169/m/maltmandarkblues.co.uk/user/htdocs/Register.php on line 2

 

The code is

 

<?php

    require_once('/Connections/userlogin.php'); //Connect to the SQL database

?>

 

Please help I have been stuck on this problem for ages

 

Thanks

 

Skyaxe

Link to comment
https://forums.phpfreaks.com/topic/54111-require_once-errors/
Share on other sites

HI there,

 

I don't know that I have the answer you need, but some suggestions.

 

It seems that "failed to open stream" could be the key. Is your script correct? (ie has userlogins.phpworked before?

 

I also notice that your folder "Connections" starts with a capital (and the otheres do not) - is this correct - if not it would send the script looking for a directory that does not exist.

 

David

Link to comment
https://forums.phpfreaks.com/topic/54111-require_once-errors/#findComment-267507
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.