Error after install - php

After creating a fresh installation of laravel 4, installing all the composer dependancies and going to the url where the installation is located I get this error:
ErrorException: Warning: file_put_contents(/var/www/mysite/app/config/../storage/meta/services.json): failed to open stream: Permission denied in /var/www/mysite/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php line 77
Any idea's why or what this error is, and how I can fix it?

Solved by running chmod -R 775 on the storage directory.

Related

Composer not working with laravel after Windows update 1903

Yesterday I updated my windows from version 1803 to 1903. Today I tried to continue work on my laravel application and tried to run PHP artisan serve for development.
What I got was an error message:
PHP Warning: require(C:\Users\MY_USERNAME\MY_PROJECT/vendor/autoload.php): failed to open stream: No such file or directory in artisan on line 18
Warning: require(C:\Users\MY_USERNAME\MY_PROJECT/vendor/autoload.php): failed to open stream: No such file or directory in artisan on line 18
PHP Fatal error: require(): Failed opening required 'C:\Users\MY_USERNAME\MY_PROJECT/vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in artisan on line 18
Fatal error: require(): Failed opening required 'C:\Users\MY_USERNAME\MY_PROJECT/vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in artisan on line 18
But those files exist. I did not change anything after updating to windows 1903.
Its because you haven't installed Composer dependencies so
Cd To your project and run composer install in your terminal
I had this same problem because of the Windows update and I couldn't do composer install in my original project because it didnt find the composer.json, so... I pushed it on Github, downloaded and then made composer install on the new project and it works. Maybe it's not the best solution... but worked for me

Laravel - Can't run project

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.

Windows 10 WSL ZipArchive::extractTo(): Permission denied Laravel

I'm trying to install Laravel on WSL. I have everything install so far but when I run the laravel command, I get a Permission Denied from ZipArchive. Is there a way around this?
Things I've tried:
Directory is 777 -r
Owner of directory errored with my user and www-data
Making the file 777
PHP Warning: file_put_contents(/var/www/laravel_*.zip): failed to open stream: Permission denied in /home/jeff/.composer/vendor/laravel/installer/src/NewCommand.php on line 132
PHP Warning: ZipArchive::extractTo(): Permission denied in /home/jeff/.composer/vendor/laravel/installer/src/NewCommand.php on line 150
PHP Warning: ZipArchive::close(): Invalid or uninitialized Zip object in /home/jeff/.composer/vendor/laravel/installer/src/NewCommand.php on line 152
Composer could not find a composer.json file in /var/www
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Application ready! Build something amazing.
Try to run the bash as Admin. And use composer create-project --prefer-dist laravel/laravel to create laravel project than using the global laravel installer.
Do try Laragon if you want to develop in windows.

Getting error while running Yii2 project on windows 8.1

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.

fresh laravel framework installation on ubuntu 14.04 xamp server

I am in the /opt/lamp/htdocs/lara folder that was empty and cloned the master of Laravel from Github Download and do
sudo composer install
Then I was able to access localhost/lara but it brings down the lara directory. When I go ahead on to localhost/lara/public it brings up the error
Warning: require(/opt/lampp/htdocs/lara/bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in /opt/lampp/htdocs/lara/
bootstrap/autoload.php on line 17
Fatal error: require(): Failed opening required '/opt/lampp/htdocs/lara/bootstrap/../
vendor/autoload.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/lara/
bootstrap/autoload.php on line 17
How could I fix that?
After running the composer install the error changed to
Whoops, looks like something went wrong.
and browse says internal server error

Categories