i developed web site with symfony 3 and upload it on a server but when i try to access to config.php file i have this error
Fatal error: require(): Failed opening required '/homepages/26/d729697492/htdocs/Media/vendor/composer/../symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php' (include_path='.:/usr/lib/php7.0') in /homepages/26/d729697492/htdocs/Media/vendor/composer/autoload_real.php on line 66
and don't understand i search everywhere no good answer .
i just delete all my files on server and after re-upload all my files without vendor directory and after i install all my dependencies via composer install it works. thank
Related
I am using Ubuntu 19.10 and have installed pear/Request2 using sudo pear install http_request2. I am trying to use it inside my PHP file while sending a request to Azure Face API but it is giving me the following error.
Warning: require_once(HTTP/Request2.php): failed to open stream: No such file or directory in /opt/lampp/htdocs/php_to_flutter/create_face_list.php on line 3
Fatal error: require_once(): Failed opening required 'HTTP/Request2.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/php_to_flutter/create_face_list.php on line 3
I have verified that the required files are available at
/usr/share/php/HTTP
but it isn't picking them. How am I supposed to resolve it?
Thanks
I have resolved the issue. It might not be an efficient solution but it worked for me. Here are the steps
copied Net folder to HTTP folder
copied HTTP folder from /usr/share/php to my htdocs where my .php files were saved.
Boom!!! It worked perfectly fine.
If anyone has any other solution, please share it. I'll try that too. Thanks
As official PEAR manual states, before requiring the packages files you should check if the directory where pear stores all its extensions added to "include_path" .ini php settings, and if it's not you should add it manually.
Official documentation
But you better switch from pear to composer as pear already dead package manager that is not updating for long term
My friend, who just started a company, sent me this website (https://github.com/lexaugustin/bamboufacile) that someone built for him out of a PHP template, so I can host it for him on "hostgator.com". When I run the public folder with XAMPP, I only see the template website, and when I try to run the server.php that is in the root directory, I get these two errors:
1) "Warning: require(/opt/lampp/htdocs/public/../vendor/autoload.php): failed to open stream: No such file or directory in /opt/lampp/htdocs/public/index.php on line 24
2) Fatal error: require(): Failed opening required '/opt/lampp/htdocs/public/../vendor/autoload.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/public/index.php on line 24.
Can someone help me run this file and tell me how to host PHP website on hostgator, please? The tutorials on hostgator haven't worked for me.
The project link you have mentioned is a laravel project. The error shows it has missing dependencies. So first thing you will need to install composer to install its dependencies.
Once you are done with the installation open command line and cd to your project directory in xampp htdocs. Run this below command to install the dependencies. Also you will need minimum php 7.1.3 in your xampp and hostgator to run this project.
composer install
A friend send me a project but it is give me an error when i try run.
I go to project location and execute php artisan serve but i have this error:
Fatal error: require(): Failed opening required '/project1/bootstrap/../vendor/autoload.php' (include_path='.:') in /project1/bootstrap/autoload.php on line 17
When i run composer install i have this error:
[ErrorException]
file_put_contents(/project1/rev2/bootstrap/cache/ser
vices.php): failed to open stream: No such file or directory
What is the problem?
Thank you
Do you compose installed ? if not you can install it form here.
https://getcomposer.org/
Once composer is installed then you can run php artisan serve or you can place the project in the wamp/xampp project directory and run like this.
http://localhost/projectname/public
Make sure you have /project1/rev2/bootstrap/cache directory in your project location if not, you have to manually create it.
I am new in Laravel and I have the following problem.
I developed a Laravel 5 project on an old computer, and I put the code on a GIT repository. I retrieved my source code on my new laptop from the repository.
But I am facing problems while running the Laravel project on Apache and I am obtaining this error message on my Laravel website instead:
Warning: require(C:\xampp\htdocs\HotelRegistration\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\HotelRegistration\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\HotelRegistration\bootstrap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\HotelRegistration\bootstrap\autoload.php on line 17
The C:\xampp\htdocs\HotelRegistration\bootstrap\autoload.php is present in my project
Why am I facing this issue? What is the problem? What am I missing? How can I fix this issue? How can I try to solve this issue?
You need to run
composer install
command to install packages. By default vendor directory is ignored when committing to GIT (this is good) so if you pull data from repository you need to install all packages running above command.
I have successfully installed Yii2 using composer on windows 8.1. I am using Xampp server but I am not able to run my project successfully.
I am getting this error:
Warning: require(C:\xampp\htdocs\application\web/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\application\web\index.php on line 7
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\application\web/../vendor/autoload.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\application\web\index.php on line 7
I have also given proper permissions and set the cookie validation key but nothing is working.
Thanks for help.
Error is self explainable. There is no autoload.php file in vendor folder. It's generated after all vendor packages will be installed.
Use composer install command to install all packages.