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
Related
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!
I have just installed a fresh copy of Yii2 advanced and am having trouble getting the style sheets to load. The error seems to be that Yii (or webserver) cannot create path /var/www/frontend/web/assets/1ecfb338/css despite doing so in the same http request that it errors. Even after reinforcing file permissions of 777 from without and outside the VM, Yii doesn't seem to make further attempts to write the stylesheet.
If I just refresh the page loads without error but the stylesheet bootstrap.css has not been created in the directory.
This is most frustrating. Does anyone have any ideas?
If it matters I am running Yii in a Vagrant VM with Virtualbox. Debian is the VM OS and Ubuntu is the host.
This is quite strange at not experienced this before. I was able to correct this by changing the mode to 777 as the super user from outside the virtual machine. From doing the same thing inside the virtual machine made no difference.
I have worked on many projects before with this kind of setup but not had this before. Software that I'm using that may be responsible is:
Host machine:
Ubuntu 14.04
Vagrant 1.7.4
Virtualbox 4.3.30
Virtual machine:
Debian Jessie
Nginx 1.6.2
PHP 5.6.14
Edit: I found that I had defined the sync folder incorrectly. I had to change to rule this this:
config.vm.synced_folder "./", "/var/www", id: "vagrant-root", :group=>'www-data', :mount_options=>['dmode=775,fmode=775']
You just give permission for particular directory like:
sudo chmod -R 777 /var/www/frontend/web/assets
The solution for me was adding
sed -i 's/www-data/vagrant/g' /etc/apache2/envvars
to the Vagrantfile like written here
Vagrant file_put_contents permission denied
I am trying to install Laravel for first time. I installed it on my desktop with the following composer command
composer create-project laravel/laravel laravel-app
The command completed successfully without any error but with some messages like
symfony/var-dumper suggests installing ext-symfony_debug ()
symfony/translation suggests installing symfony/config ()
I now did chmod -R 777 larvel-app to make whole folder writable by everyone. I now started php server with following command
cd laravel-app
php artisan serve
and it gave following message
Laravel development server started on http://localhost:8000
When viewed from web browser in address http://localhost:8000, there is nothing, only blank page. When I browse this address, the server seems to quit.
I have following environment:
OSX Mavericks;
MAMP with php 5.4.10 and apache2;
following extensions in php.ini file
extension=imap.so
extension=yaz.so
extension=mcrypt.so
extension=gettext.so
extension=pgsql.so
extension=pdo_pgsql.so
extension=pdo_mysql.so
;;;;;Following are added by me ;;;;no error when starting server
extension=openssl.so
extension=mbstring.so
When I run which php from command line, I get following.
/Applications/MAMP/bin/php/php5.4.10/bin/php
When I tried to run this in mamp ie localhost:8888, it gave 500 internal server error.
Please suggest me, where I might have made mistake.
As a OSX user i strongly recommend you to use Laravel Homestead to develop your applications.
http://laravel.com/docs/5.0/homestead
You only need to install:
Virtualbox
Vagrant
I have my projects in ~/code folder, so everytime i create a new project, i just:
Add project test domain to my local host file (my-project.app pointing to localhost 127.0.0.1)
ssh into the homestead virtualmachine (homestead ssh)
run built in serve command (serve my-project.app /path/to/project/public)
VoilĂ
The most common reason for this is that the web server process does not have write access to the storage folder and its subfolders.
Set the permissions on the storage folder so that the web server can create files.
You don't have to use php serve, mamp does that for you. Make sure you point your directory to public folder. You can also use custom domain for each of your projects.
Also for Mac there is laravel valet. Easy to get started with many php projects.
I think you should move your Laravel Application to
/Applications/MAMP/htdocs/
and then you can access it on
http://localhost:8888/laravel-app
I know that this is a very common question to find asked, but I'm having serious difficulty with this on my AWS Ubuntu 12.04 instance.
I installed PHPMyAdmin using apt-get with the command sudo apt-get install phpmyadmin and it installed just fine. I can use PHPMyAdmin as it is on the instance.
I'm trying to generate a config file using the setup wizard, and I followed the steps as documented on the PHPMyAdmin website to set that up. I created the config directory in /usr/share/phpmyadmin and gave it world write access using sudo chmod 777 config. Despite all of this, PHPMyAdmin still tells me that my config directory is not writable.
I then tried to create a config directory in /etc/phpmyadmin which also had world write access and I'm still not having any luck!
Can anyone please tell me if I'm missing something here? I don't know what else I can try to get this working.
I found it!
My config directory is actually /var/lib/phpmyadmin.
I found this from the index.lib.php file in /usr/share/phpmyadmin/setup/lib. There's a function in there called check_config_rw() which checks the Config directory based on the currently used config.inc.php file. Changing the permissions on this folder and its contents to make it www-data writable solved my problem!
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.