i moved my website from a subdomain which was made in opencart to a domain by moving the files and exporting and importing the database, and changing the config.php file but i got this errors:
Warning: require_once(/home/inti/public_html/system/startup.php): failed to open stream: Permission denied in /home/smartmobile/public_html/index.php on line 17
Fatal error: require_once(): Failed opening required '/home/inti/public_html/system/startup.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/smartmobile/public_html/index.php on line 17
This is most of times folder permission issue or the path set in config files is not valid.
You can get the path by
echo getcwd();
And use this path in config files.
Permissions can be checked and changed via many methods depending upon your access to server.
Related
I’m working on a web site that is hosted on a shared server that uses Plesk.
I want to put the database users config files outside of the public folder (httpdocs) and access them with include_once.
The problem is that the pages that use “include_once” don’t open in a browser, giving an error 500. Looking at the error log I found that the problem is caused by permission issues:
PHP Warning: require_once(PATH TO DB CONFIG): failed to open stream: Permission denied in PATH TO/httpdocs/index.php on line 2
PHP Fatal error: require_once(): Failed opening required 'PATH TO DB CONFIG' (include_path='.:') in PATH TO/httpdocs/index.php on line 2
The folders have a permission of 755, but I think the problem is happening because Plesk doesn’t allow access to folders outside the public folder.
Is there any way to allow access to those files?
Thanks!
You need to set open_basedir for the user, you can do this in Plesk under hosting settings, or via Apache config directly.
just moved laravel over to my live site and hit errors straight away.
The errors are:
Warning: require(/var/sites/b/beta.buildsanctuary.com/public_html/local/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/sites/b/beta.buildsanctuary.com/public_html/local/bootstrap/autoload.php on line 17
Fatal error: require(): Failed opening required '/var/sites/b/beta.buildsanctuary.com/public_html/local/bootstrap/../vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/sites/b/beta.buildsanctuary.com/public_html/local/bootstrap/autoload.php on line 17
Im not sure whats causing the issues, is it that its looking in the public_html folder for the files? when it should be just looking in the subdomains / the subdomain itself?
If that is the case... then how can i go about fixing this? if i change line 17 it changes the require location but not where its looking for the file (No such file or director in bla..)
The line 17 in question is:
require __DIR__.'/../vendor/autoload.php';
I just upgraded Plesk to the latest version and it has caused many of my sites to go down.
The websites all rely on a file which is located on another domain on my server so they all host an index file which contains an include like this:
include('/var/www/vhosts/assets-domain.co.uk/httpdocs/websites/index.php');
I am getting the following error when viewing the website:
Warning: include(/var/www/vhosts/assets-domain.co.uk/httpdocs/websites/index.php): failed to open stream: Permission denied in /var/www/vhosts/this-domain.co.uk/httpdocs/index.php on line 3 Warning: include(): Failed opening '/var/www/vhosts/assets-domain.co.uk/httpdocs/websites/index.php' for inclusion (include_path='.:') in /var/www/vhosts/this-domain.co.uk/httpdocs/index.php on line 3
So there is obviously a permissions problem of some sort but I have no idea where to start.
In SSH I have tried changing the ownership of the folder '/var/www/vhosts/assets-domain.co.uk/httpdocs/websites/' with no luck. I have noticed that all my domains have different ownership usernames now - would this affect it? EG.mydomain.com has the user of mydomain, cooldomain.com has the user of cooldomain - would this be why they can't access each others files?
Please help as I have 15+ websites down :-(
Fixed this - Plesk decided to change the permissions so simply changing the domain name folder to 755 solved this
I had recently installed Apache, PHP and MySQL in Ubuntu. And copied the files I created to the var/www directory. But when I open http://localhost it is showing
Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
Fatal error: Unknown: Failed opening required '/var/www/index.php'
(include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0
How can I run my project normally? It was working fine in windows.
According to this article, you need to give read/execute permissions to Owner, Group, and Everyone.
Set permissions on the problem file to 777. Note, you should avoid doing this on a server that's accessible from the internet.
http://webomania.wordpress.com/2007/03/12/permission-denied-in-unknown-on-line-0/
To fix this problem, look at the line in your ErrorLog, to find out which folder it is trying to access.
If a block already exists for that folder, make sure it is set to allow access as necessary. If not, add a block to your Apache configuration file, allowing access as required. See the example below for folder /usr/local/awstats/htdocs.
Order allow,deny
Allow from all
for a complete reference, check the apache wiki
Hi I have been struggle with a wierd problem. I am using IIS and moved one of my web site folder to desktop of my server and then put it back now I see
Warning: include_once(./lib/config.inc.php) [function.include-once]: failed to open stream: No such file or directory in C:\inetpub\vhosts\politikacim.net\httpdocs\index.php on line 12
Warning: include_once() [function.include]: Failed opening './lib/config.inc.php' for inclusion (include_path='.;./includes;./pear') in C:\inetpub\vhosts\politikacim.net\httpdocs\index.php on line 12
this kind of error. I looked at my root folder and see it's permission is system and administrator full access , how can I make it work ? Please help me.
Given the error messages, you'd need to have your config.inc.php file in one of the following locations:
C:\inetpub\vhosts\politikacim.net\httpdocs\lib\config.inc.php
C:\inetpub\vhosts\politikacim.net\httpdocs\includes\config.inc.php
C:\inetpub\vhosts\politikacim.net\httpdocs\pear\config.inc.php
system/admin permissions are irrelevant if your webserver is running under some other user account. You must grant permissions based on your webserver's userid, not your own personal one, or some other account.