Each operating system has it's own issues. I ran into one recently when installing Laravel on my Ubuntu System. Before I begin, this is what I did to get it initialized.
- I installed LAMP
- In terminal run php -v
- If it comes back as 5.6 you'll have to change the version to the latest version, i.e. 7.1
- To do that, open your terminal and enter the following
- $ sudo a2dismod php5.6
- $ sudo a2enmod php7.1
- $ sudo service apache2 restart
- Verify that it's the new version: php -v
- Next, get composer.
- Go to https://getcomposer.org/download/ and follow the instructions.
- cd into your LAMP root directory
- Run the following command to create a Laravel project:
- sudo composer create-project laravel/laravel your-project-name --prefer-dist
- Wait until it's complete and navigate to your newly created directory/public folder in your browser
- http://localhost/your-project-name/public
At this point I received an error and it stated:
The stream or file "/home/dino/www/your-project-name/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied.
We'll have to modify the permissions slightly to get rid of this message.
- cd into your-project-name folder. How do you know you're there?
- If you type in ls you should see the .env file
- Type the following commands and you're done
- $ sudo chown -R yourusername:www-data storage
- For me this was, sudo chown -R dino:www-data storage
- $ sudo chmod -R ug+w
- $ php artisan cache:clear
- $ php artisan dump-autoload
- You might get an error. Just keep going.
- composer dump-autoload
- And you're done. Refresh the page in your browser and you'll see that it now works.
As an additional note. If you're planning on pushing the files to a production server, the easiest way is to install FileZilla and connect to your server.
- Modify the database file if you're using the database online
- Upload the entire folder's contents
- If you're just getting a 500 error, and you have access to cPanel, continue on.
- Go to http://example.com/cpanel
- After logging into your account, navigate to Software -> MultiPHP Manager
- Select your domain by clicking on the checkbox next to it.
- Select ea-php70 from the PHP Version drop-down and click Apply.
- Refresh the page and you'll see that it all works now.
I hope you would be doing well. Dear admin your site is really easy to understand and one of the best in the town. I had gone through your site and I can confidently say that your site is free of bugs. Therefore, everyone should use this website. However, we also provide website development tools. Here is the link of our site jsononline
ReplyDelete