PHP Laravel framework installation in Ubuntu 12.04 - php

I am trying to install laravel php framework. I have followed official laravel documentation and tried both of methods described there.
laravel folder appears in /var/www/ after installation but when I navigate in browser to http://localhost/laravel it just displays me the contents of laravel folder.
I tried to change permissions, even I have tried to change the permissions of /var/www/laravel/ to 777. it did not work.
Where can be the problem?

"localhost/laravel/public" if it's not working
chmod -R 777 /var/www/laravel/app/storage
then it will work.

Related

Laravel 5.5 "UnexpectedValueException" on Mac, installation error

I am a web developer. Previously I used to code in Windows, I'm new to Mac.
I used Laravel previously many times on Windows, never had this problem.
I checked the File Permission on Mac very carefully, both Read/Write permissions are enabled for all along with Enclosed Items.
I Googled it, no luck. CodeIgniter and WordPress are working very well.
Is it possible to fix? I carefully installed Lavael with Composer, the same file are smoothly working on Windows.
I'm using XAMPP.
Follow these steps to change permissions
Open terminal.
sudo chmod -R 777 /opt/lampp/htdocs/laravel/storage
sudo chmod -R 777 /opt/lampp/htdocs/laravel/bootstrap
But for me I prefer to use Vagrant/Homestead, everything is set and ready to go, check this out Homestead/Vagrant

How to run Laravel project without php artisan serve in laravel 5.3

I have updated the PHP version to 5.6.3 and create a project using laravel 5.3.0 . Now i want to run my project without php artisan serve. When i hit localhost , the index page is opened. But when i click one my project name it shows following error.
****The localhost page isn’t working****
Note that i have tried following method to get rid of this issue.
1. copy .htaccess file from public directory to project folder
2. rename the server.php to index.php
But it is not working. Any ideas in this regard?
If you using LAMP and you want to run Laravel project without Artisan, you have to navigate from browser to /laravel/public directory. Follow laravel documentation https://laravel.com/docs/4.2/quick
But if you getting errors like 500 and your page don't work, possibly you have to change permissions of your Laravel project directory.
Try sudo chmod -R 770 /path/to/your/laravel/project
or sudo chmod -R 775 /path/to/your/laravel/project
for more refer with this https://help.ubuntu.com/community/FilePermissions

Laravel homestead is setup and works. But can't find files created

I've just got my new Macbook Pro, and installed Homestead on it. Followed this link: https://laravel.com/docs/master/homestead
I can view the site after installing Laravel on Homestead, but can't find where the files created are on my computer.
Here's homestead.yaml file
My browser
Code Folder
To check for any hidden files I've tried the same on Terminal
When I ssh into the Vagrant instance, I can see the file.
Where could the files be stored? Or am I looking at the wrong place? Thanks
I was able to fix it using the following steps.
I ran vagrant provision from the Homestead directory.
I was able to access the mac Code folder from ssh:
ssh vagrant#192.168.10.10
cd /home/Code
Just had to install Laravel again in this directory.
I think by default it is in your User folder. Mac HD/Users/yourname/Code
Check your command by which you create the project. It looks like:
$composer create-project laravel/laravel --prefer-dist your_project_name
If no error occurs, a directory named your_project_name would be created under your Code path.
Good luck!

Installing Laravel on centos

I have installed Centos 7 and I want to install Laravel 5 on it,
I already installed PHP, MySQL and Apache also I installed composer and created a new Laravel project but when I try to access it's index file that is in public folder of the project I get this error :
Remote server or file not found
You tried to access the address http://localhost/ToDo/public/, which is currently unavailable.
other PHP files in /var/www/html folder work great
finally i solved it:
i disabled SELinux and changed the readonly access to read and write access for my project folder with this command: chmod -R 757 folder

Laravel 4 PHP Not Found

I am trying to setup my first laravel project. I am running XAMPP for Linux (LAMPP) and I installed composer in /opt/lampp/bin/php.
I then cd /opt/lampp/htdocs
I then run: /opt/lampp/bin/php composer.phar create-project laravel/laravel new_proj --prefer-dist
Everything seems to be going great for the install then I get
Script php artisan optimize handling the post-install-cmd event returned with an error
[Runtime Exception]
Error Output: sh: 1: php: not found
I have PHP 5.4.
I think I understand the error but I don't know Laravel well enough to solve this. I have searched for this and can't seem to find an answer.
Also I can't seem to find a good starting point for trying to install this on XAMPP for Linux (LAMPP). Any help here would be greatly appreciated.
Problem was that I did not specify
/opt/lampp/bin
in my Path so it could not find PHP and more specifically it could not find the version of PHP that I was using in LAMPP. So I added
Path=$PATH:/opt/lampp/bin
to my ~/.bashrc file then I was able to successfully install laravel. Next issue that came up after that was setting permissions on the appropriate folders.
Permissions Problem, See Below:
Set permission for your project folder: sudo chmod 755 -R laravel_proj_name
Set permission for your project storage folder:
sudo chmod o+w -R laravel_proj_name/app/storage
Refresh Page, Good to Go!
I think the problem is that the PHP CLI binary is not in your path. Try adding it to your path or putting a symbolic link into /usr/bin or some other appropriate place.

Categories