Projects got affected while installing laravel - php

While installing laravel through terminal command, my other projects in MAMP htdocs folder got affected and they are not working.
I followed this process for installing laravel

Those directions have you symlink the "htdocs" directory to your laravel install, effectively making your htdocs directly useful only for Laravel.
You should avoid this, perhaps by creating a symlink from your laravel build to a directory within htdocs. For example, linking to a directory in htdocs called "mylaravelapp": ln -s /path/to/laravel-master /path/to/htdocs/mylaravelapp.
Lastly, consider using Vagrant or another virtual machine provider instead of MAMP for a server. You'll have to get through a learning curve (potentially), but you'll end up better for it. This creates a virtual server for you, which won't interact with any other parts of your Mac (YOu can make a server per project!).
Here is a guide to get started with Laravel 4 and Vagrant.

Related

Uploading a Symfony 3.3 project

I finished my symfony project, and bought a hosting and domain. Previously I have uplaoded sites to web, but it was just put everything in public_html folder, and the site is running. I tryed this with the project, but it wasn's the case. I'm a bit confused, because at the my storage I had a lot of folders on default. This is how it looks:
Where should I upload my folders?
Uploading symfony is a little tricky thing , symfony is not a normal website it's a big framework
First you need hosting with ssh access ( without it you'll have a lot more problems )
create folder symfony on the same level that is public_html
copy all your project data , without vendor directory and composer.lock file
login via ssh and
cd symfony
composer install
You shoud always use composer - because it 'll check all dependencies with you php version on server (different libs and extensions may require different php version and diffent modules) , and let you know if something will be not right.
rm public_html folder, and create symlink to symfony/web
ln -s public_html ~/symfony/web
upload sql to database

Git Clone Laravel Website just displays files and directories

I'm still really new to Git version control and Laravel. But I have gotten so far, and I'm not sure now where I am going wrong.
I set up VirtualBox and Vagrant on my local windows machine and installed homestead successfully. I have managed to get my Laravel website (it's only one page at the moment as I learn things) working correctly, it displays the header and the footer and the images load and everything. So that's all good.
So now, I have my Laravel website set up within my virtual vagrant server. On this server, the directory for my website is:
/home/vagrant/Code/sites/public_html
No when I cd to that directory, I ran the following:
git init
get remote add origin https://user#repo/user/publichtml.git
git add *
git commit -m "Initial Commit"
git push -u origin master
(I've substituted user#repo instead of the real URL)
All went through successfully. Great. So now on my live server I ran the following:
cd /home/sites/public_html
git init
git clone https://user#repo/user/publichtml.git
Which again, worked fine. It downloaded all the files into the public_html directory which is great. So then I go to visit the website and this is what I get:
The only explanation for this happening is maybe I need to install something on the server before I clone these files to it. I guess the files in the Laravel folder won't run by themselves? Do I need to install composer and laravel on the server or something? If so, how do I do that, and why don't they run on their own?
I cannot see a .htaccess or index.php in the root directory so I am not sure how it runs anyway.
You should install Laravel using composer instead.
composer create-project laravel/laravel mysite
You should also point the document root on your web server to laravels "/public" folder, making the framework code reside outside of the document root. That's good for security (no one can access any framework code, like your configs etc directly).
You will then find the .htaccess-file in the /public folder.
Please read the Laravel documentation about the different but recommended ways to install Laravel.
Btw, doesn't homestead use Nginx instead of Apache? In that case, .htaccess isn't even used. Please refer to the Laravel documentation again regarding homestead.
You need to redirect traffic to public/index.php instructions for this are webserver dependent.

Following services are not running: proxy # AWS -- after Laravel re-config

I have Laravel application which I learned to run both with php artisan serve and with local Apache.
Now I wish to run the same on Amazon Beanstalk.
I have created Beanstalk instance for PHP7. Then I went to Amazon Linux console and installed composer there. I think this was unneeded step.
Next I acrhived all my Laravel project with ZIP and uploaded it to AWS with web console. First I got Forbidden error
as said here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/php-laravel-tutorial.html
Then I fixed document root to public/ as said below and now I have health state severe saying
Impaired services on all instances.
Following services are not running: proxy.
When I am opening site with browser, I see blank page.
How to see any logs in AWS to understand what is happening?
What cen be a reason? Project is self-contained, it uses SQLite database inside the codebase. When I was enabling this project on local machine, I was to enable multiple things in Apache and PHP.
It was the problem with ZIP file structure: it contained extra top directory inside. So, on AWS it was /var/app/current/myappname while should be just /var/app/current.
Did you install mbstring after creating the instance?
sudo yum install php70w-mbstring
If this isn't the problem, you can view Laravel log in storage/log/laravel.log and tell us what is there to help you.
I was getting this error due to Elastic Beanstalk config settings being incorrect, specifically, the Document root was incorrect and was seeing the Following services are not running: proxy. error in the event log.
When generating the ZIP archive, be sure to generate it within the project folder. So when you open the zip file, you have the app folder, not another folder with the project name.

Getting white page after uploading my Laravel 5.2 application to server

I've already installed composer on the production application. I've set permissions on the storage folder (775, 777). The web server is configured to look for index.php. That's the first time I try to deploy a Laravel application. Something that messed me up was that after I used the push command to upload my Laravel application using git I looked inside the Laravel storage folder in the server and I realized that the storage folder had basically only the directory structure of the storage folder of my local Laravel application, many files were missing like laravel.log among others. I assumed that it was because I didn't ran composer install on the server. After running composer install things continued the same.

Installing existant laravel project on wamp for pre-production

I have a existing laravel project that I have been working on for a while now.
I have to put it in a test environnement to show it to my employer.
My problem is that I have no clue how to use my git repo of the project to put it on a fresh installation of wamp server.
1 - I have tried to install it as a whole but failed.
2- Then, I tried creating a fresh copy of Laravel base architecture (that worked) and after, replacing the files I modified on my existing project over on the fresh Laravel project. Turns out, it can not find my login.php page and I am stuck at that point.
So I want to find the easiest way to clone a git repo with an existing Laravel project directly on a wamp server and make it work.
I have been trying for several weeks, please help me.
Thanks
Okay, here are some simple steps to create a copy of your Laravel5 project on another server:
Setup the server (Databases, PHP and so on) and install Composer. If you are local, composer should already be installed
Clone the repository and copy the content to the htdocs or var/www folder, depending on your server system
Now execute composer update to load all dependencies
Last but not least, setup your .env file. Use the .env.example from Laravel5, add your credentials, generate a key with php artisan key:generate
That's it. Now your Laravel5 project should run.

Categories