Fatal error require failed opening required config php

PHP Fatal error: require_once(): Failed opening required

UPDATE thank you that solved the problem , but now I get this error «A connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because connected host has failed to respond. » I turned off the firewall and I don’t have any antiviruse software I’m following this tutorial to connect android app to the database http://www.androidhive.info/2012/05/how-to-connect-android-with-php-mysql/ I’m hosting my php file in WAMPSERVER PHP Version 5.4.3 I get these two errors I’ve been trying to fix this error for hours but no luck could you please help me fix it » Warning: require_once(C:\wamp\wwwC:\wamp\www\db_connect.php): failed to open stream: Invalid argument in C:\wamp\www\get_property_details.php on line 12″ and this error «Fatal error: require_once(): Failed opening required ‘C:\wamp\wwwC:\wamp\www\db_connect.php’ (include_path=’.;C:\php\pear’) in C:\wamp\www\get_property_details.php on line 12» these are my files db_config.php

define('DB_USER', "student"); define('DB_PASSWORD', "student2"); define('DB_DATABASE', "test"); define('DB_SERVER', "student.database.university.ac.uk"); ?> 
connect(); > function __destruct() < $this->close(); > function connect() < require_once __DIR__ . "C:\\wamp\\www\\db_config.php"; $con = mysql_connect(DB_SERVER, DB_USER, DB_PASSWORD) or die(mysql_error()); $db = mysql_select_db(DB_DATABASE) or die(mysql_error()) or die(mysql_error()); return $con; >function close() < mysql_close(); >> ?> 

Quick note, you should move away from mysql and use mysqli as mysql is deprecated and will be removed

Читайте также:  Python iter object attributes

Источник

General help

This is my first Moodle install (Moodle 2) and I had it up and running just fine. The client just notified me that they can’t access the site and I see it’s just a blank white page. I checked the error logs and, just starting today, I see a fatal error:

PHP Fatal error: require_once(): Failed opening required ‘config.php’ (include_path=’.:’) in /var/www/vhosts/mysite/moodle/index.php on line 31

The warning before this says:

PHP Warning: require_once(/var/www/vhosts/mysite.com/workshops/config.php): failed to open stream: Permission denied in /var/www/vhosts/mysite.com/moodle/index.php on line 31

Anyone know what this would be about? The file exists and is on the server. any help would be very much appreciated!

Re: php fatal error: failed opening required ‘config.php’

‘Permission denied’ is a permissions issue. Files/folders of the Moodle application at webroot of the remotely hosted site do not have correct permissions to enable apache to read them. Thus, can’t serve out.
Since it is a remotely hosted system (obviously not mysite.com) couldn’t tell you exactly what those permissions should be … owner/group, however, on a typical stand alone (not virtual nor remotely hosted) server the moodle folder and all files/folders contained therein are owned by user apache and readable by the apache group as well as all others.

Check with hosting provider for that information. If it had been working and this is a new development, again, check with hosting provider helpdesk and inquire (unless customer themselves changed permissions on files).

Re: php fatal error: failed opening required ‘config.php’

I appreciate the help. The site is hosted on a Media Temple VPS — and the moodle install is in a subfolder of the main site on the server. Do you know what the permissions should be on the config.php file? I looked back at the install instructions and, unless I missed something (or am forgetting) I don’t see anything about setting specific instructions for it.

But maybe this will provide more clues: the config.php file was set to 640 when I checked it. And, just to see what would happen, I changed it to 755. When I do that, I get this message on the white page:

«Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.»

I’ve been looking around and I see lots of different responses to this error. I’m also confused as to how this just started happening. Does this ring any bells for you?

Re: php fatal error: failed opening required ‘config.php’

It is usually best to have the config.php file set to 440.

You might want to take a look at this post:

Re: php fatal error: failed opening required ‘config.php’

Thanks, Guillermo! Unfortunately, that didn’t change anything for me (although it’s good to know what the config file should be set to) — still get the white screen. Based on my previous post, I’m starting to wondering if the /moodledata/ folder is the problem.

Re: php fatal error: failed opening required ‘config.php’

I guess my checklist would be something like this:

* The value of the $CFG->dataroot parameter really corresponds to the physical location of the moodledata directory? There could be a misspelling error at some point in the path.

* The file & folder permissions are set as shown in the referenced post?

moodledata directory = 755.
All directories under moodledata = 777.
All files in each directory = 666.

* Open the php.ini file and see that the safe_mode parameter is set to Off .

* About the blank page, maybe some erroneous html code (a tag or a character is missing) was added to the front page?

* I would enable the Moodle debugging system (http://docs.moodle.org/22/en/Debugging) and double check both, Moodle and server error logs.

Anyway, if the installation was originally running fine, someone must have changed something to cause this situation. Could it be that the site was cracked?

I would also try and rename the config.php file to rerun the installation process, or even to reinstall the whole Moodle code (rename the original moodle directory, unzip the Moodle package and run the installation process).

Do you have a full backup (moodle, moodledata and database)from the time the installation still was running fine?

Re: php fatal error: failed opening required ‘config.php’

Does Media Temple VPS have an FAQ/Forum for their customers?

Is your system on Media Temple VPS a shared system . other customers use the same system . or is it dedicated . you and your entity the only ones allow to access the back-ended stuff?

Reason I ask, it does change approaches to trouble shooting and configuration.

Re: php fatal error: failed opening required ‘config.php’

It is not shared — just this one client’s sites are in this location. I can contact MT about it, but I want to see if I can find out as much as I can about the situation first.

Re: php fatal error: failed opening required ‘config.php’

Well, if it’s not shared but dedicated to this one customer, and you have total access, one should be able to do whatever is needed. That should include ssh (command line access to the server) and total access to the primary php.ini for the system, shouldn’t it?

As far as ownership/permissons on files that depends upon operating system . *example* CentOS uses the user apache group apache to run the apache server. Ubuntu Server LTS, however, uses www-data for both.

But, in your first post, you mentioned a path:

That indicates that the server is setup to use Apache virtual domains (the vhost). Each vhost could be configured differently. Obviously, the mysite.com isn’t real. But have you checked the apache vhost config for the site that has issues to see that apache is configured appropriately to serve out PHP and Moodle for that vhost?

And just a note: tried Googling for MT FAQ’s or Forums and found:

«The above list is provided as a courtesy. The listed applications are not the only applications that can be installed and successfully executed on the Grid. As with any third-party software, check your application’s System Requirements before any installation.»

Which means customers know what versions of php they have available to them . and how to configure their systems to use. While some could possibly discover that on their own, does MT offer an alternative to the PHP version to which you have access? Eventually, anyone running a supported/updated version of Moodle will have to be running 2.1+ — which does require a higher version of PHP. One of two things has to happen . either provider provides that or customers shop elsewhere.

In a listing of apps that have been tested:

Moodle 1.9.3 is listed . but not version 2.

Am not making any comments here attempting to shed doubt on the quality of MT, but have found some blogs out there that weren’t too happy. 😐 Guess it depends upon how dependent/independent one is when it comes to remotely hosted dedicated systems . and how much information the provider gives the customer as well as customers helping customers.

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: require(): Failed opening required ‘../vendor/codeigniter4/framework/system/bootstrap.php’ #3021

Fatal error: require(): Failed opening required ‘../vendor/codeigniter4/framework/system/bootstrap.php’ #3021

Comments

my error is
PHP Warning: require(D:\xampp\htdocs\myCIapp\app\Config/../../vendor/codeignite
r4/framework/system/bootstrap.php): failed to open stream: No such file or direc
tory in D:\xampp\htdocs\myCIapp\spark on line 44

Warning: require(D:\xampp\htdocs\myCIapp\app\Config/../../vendor/codeigniter4/fr
amework/system/bootstrap.php): failed to open stream: No such file or directory
in D:\xampp\htdocs\myCIapp\spark on line 44
PHP Fatal error: require(): Failed opening required ‘D:\xampp\htdocs\myCIapp\ap
p\Config/../../vendor/codeigniter4/framework/system/bootstrap.php’ (include_path
=’D:\xampp\php\PEAR’) in D:\xampp\htdocs\myCIapp\spark on line 44

Fatal error: require(): Failed opening required ‘D:\xampp\htdocs\myCIapp\app\Con
fig/../../vendor/codeigniter4/framework/system/bootstrap.php’ (include_path=’D:
xampp\php\PEAR’) in D:\xampp\htdocs\myCIapp\spark on line 44

The text was updated successfully, but these errors were encountered:

i have another problem :
Your requirements could not be resolved to an installable set of packages.

Problem 1
— codeigniter4/framework v4.0.3 requires ext-intl * -> the requested PHP extension intl is missing from your system.
— codeigniter4/framework v4.0.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
— codeigniter4/framework v4.0.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
— codeigniter4/framework 4.0.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
— Installation request for codeigniter4/framework ^4 -> satisfiable by codeigniter4/framework[4.0.0, v4.0.1, v4.0.2, v4.0.3].

To enable extensions, verify that they are enabled in your .ini files:
— C:\xampp\php\php.ini
You can also run php —ini inside terminal to see which files are used by PHP in CLI mode.

Try composer commands;
composer update —ignore-platform-reqs

You need to enable the intl extension in your php.ini, it’s part of server requirements for Codeigniter 4, they state that in the readme page. https://github.com/codeigniter4/CodeIgniter4#server-requirements

Please, use the forum for the support questions.

Источник

Оцените статью