My laravel project start page is not opening - php

I have install Laravel in my pc using composer.
I used gitbash and started xampp control server
First I've changed my directory.
Then I've ran a command composer create-project laravel/laravel project_1. After the command had run, it installed laravel and all necessary file and key was successfully set.
Then I again changed my directory to project_1
Then I ran another command php artisan serve. After running this command Laravel development server started and 127.0.0.1:8000 this ip has genrated.
I copied the id and paste it in my browser url bar.(I copied and pasted it without using keyboard. I only used mouse)
but when I provided the ip the project_1 starting page did not open.
The page was loading and it is still loading.
what can I do? Please help
logs folder

Here is my contribution, I cannot say what is the cause but I have a solution for it; because I have such as a challenge.
run
php -S 127.0.0.1:8000 -t public
Note that the 8000 is your port, and this could be any 4-digit number.
I hope this helps

Every thing you did seems right to me in terms of Laravel requirements, so lets check some other possible issues:
make sure that your internet connection isn't configured to use
proxy, if so make sure you excluded your local address.
if you are using Internet security suite software, make sure it doesn't block your requests, this vary from software to another but you might test this by deactivating the software for a while until you try.
now that's what I have in mind, I hope it help.

First, stop the php artisan serve
After changing directory go to inside your project folder, you can run php artisan serve. Then a localhost URL will be generated for you where you can see your project in the browser
If you have PHP installed locally and you would like to use PHP's built-in development server will start a development server at http://localhost:8000

Please try to install Laragon and forget about Xampp for now. This is really cool tool and you'll start much quicker. I did try to resolve few issues with Xampp myself and always wasted a lot of time. You can google tutorials later for it as well. Plenty of info out there.
As well it comes with in house installer for Laravel ;) and more :).

Make sure that you are not coping the url from Git Bash through command, it will stop running the project

Make sure that you are not using antivirus specially avast antivirus.

Related

How to correctly deploy a Laravel application on XAMPP Apache?

I am pretty new in Laravel and I am finding the following problem.
I have put my application in this folder:
C:\xampp\htdocs\HotelRegistration\
Starting it via the statment:
php artisan serve
it is correctly started here: http://127.0.0.1:8000
For some reason I need to run it with XAMPP Apache server instead the one provided by php artisan serve
So I started Apache from XAMPP but trying to open:
http://127.0.0.1:80/HotelRegistration/
but so the application can't start and I obtain the list of directory and file contained in this folder.
Why? What is wrong? What am I missing? Maybe something related to virtual host? How can I fix this issue?
Tnx
php artisan serve creates a web server that shows the public folder of your app.
As a good practice, you should setup your hosting to show that public folder while hidding the rest of the program from unwanted visitors.
Check this links about it:
https://medium.com/laravel-news/the-simple-guide-to-deploy-laravel-5-application-on-shared-hosting-1a8d0aee923e
https://deployer.org/blog/how-to-deploy-laravel
For development, that isn't too much of a trouble.
You can use the below to run your application. But it can fail to load the basic css file.
http://localhost/HotelRegistration/public/
Hope its help you.
Solved by myself,
I create a virtual host in Apache and using this URL works

php artisan optimize times out only on composer install

I'm running a laravel app on Azure. Things are moving in the right direction, composer install didn't use to work at all. Now however, the "php artisan optimize" command times out:
However, running "php artisan optimize" separately is no problem at all:
What could be the cause of this?
Edit:
Deleting the symfony-folder does not help, it is not present when I run the "Composer install"-command:
Increasing the timeout-limit does not help either, I increased it in both azure and in the composer.json file:
This still gives me a timeout, after installing the symfony-components again:
...
As I deployed a new clean Laravel 5 application to Azure Web apps and tried to reproduce your issue, however, it worked fine on my side either I run the command php artisan optimize or composer install or composer update.
I installed the composer at the Site extensions at the KUDU console site of the application on Azure Web apps, the url should be like: https://<your_site_name>.scm.azurewebsites.net/SiteExtensions/#gallery
There are several solutions of other developers who occur the same issue with you, you can try these solutions:
try to increase the max_execution_time or set the value to 0, refer to https://azure.microsoft.com/en-us/documentation/articles/web-sites-php-configure/#how-to-change-the-built-in-php-configurations to change the PHP build-in configurations on Azure Web Apps. And you can change the process-timeout in Composer.json file :
"config" : {
"process-timeout": 0
}
deleted the entire Symfony folder and try again. As the comments at PHP Artisan Optimize - Timed out? #1050, it seems the symfony dependencies raise the issue.
#Rkey,
According to my experience, I think the issue is more related to the symphony version/configuration. I suggest you can remove/edit the symphony configuration from the composer.lock file (NOTE: please backup this file if you cannot success, you also can recovery your environment). And then you can run this "composer install".
After installed component, You can see an alert window which shows that
your session is timeout, please refresh your browser.
You can see this information because the server is in initialization process.
Any concerns, please feel free to let me know.
I'm also having this problem. Will upgrading the plan help?
According to this upgrading to S3 helps... I haven't tried it though... Let me know if it really works.
#Rkey & #cabs, per my understanding on this question, I wanna point out that Composer is not fully supported on Azure. The issue is that it’s using Taskkill command which is blocked on Azure. We are aware of this and please feel free to submit an idea or suggestion based on the experience with Azure at https://feedback.azure.com/forums/34192--general-feedback.
I have been stuck in this problem as well for a week.
Have tried all solutions on forum but no success.
This morning finally solved after reinstall XAMPP. It was problem on my previous PHP version 5.6.19. While using new XAMPP with PHP version 5.6.28, it worked fine.

Laravel - how to serve a new laravel project to browser

This is the first time I've used a PHP framework.
I've been following the Laravel documentation to install Composer and Laravel, and everything seems to have gone smoothly.
But now I've finished the installation/configure instructions, and I have created a project, I can't see any instructions on how to serve my application so it's viewable via a browser?
I have used Ruby on Rails before, which came with an easy way to get an instance of the application running via a built-in web server.
Is there something similar with Laravel, or do I need to somehow configure my standard Apache instance to serve the application?
I'm guessing there is something I've overlooked or misunderstood in the documentation.
yes, you can do it by using following in your terminal.
open your terminal, and navigate to directory where you have your project abc
and fire following command
php artisan serve
Now you can access it in browser by going to http://localhost:8000
hope you get it
I just want to add to the answer of Mubin Khalid . You can choose your own port number like
php artisan serve --port=8080
This is helpful when running two or more project.
You can also serve with you ip address
php artisan serve --host=ip_of_computer_running_laravel --port=8080
works to access server with in same network.
if you are accessing from same laptop you can just browse to ip_of_computer_running_laravel:8080 but if you are browsing from other computer in the network ip_of_computer_running_laravel:8080

Run Laravel on existing Apache server

I have a DigitalOcean server running Ubuntu 14.04. I'm using this as a host for my web-development projects.
Now I want to start using Laravel for a project of mine, but I have a question about this.
In the /var/www/html folder of Ubuntu I created a folder, let's say, "project". In this folder I installed Laravel using this tutorial. Now everything is setup I want to run Laravel so I can test it and start developing on it.
When I run the command php artisan serve from within the "project"-folder it says "running on http://localhost:8000". So it's working.
But how do I access it? When I go to http://example.com/project it just shows me the files in that folder.
So it's running on the localhost on my server. Does that mean that it is external-accesible (the url above) or how does this work? (I guess the port is also different, 8000 instead of the default 80 for Apache)
I hope the question is clear and someone can help me out.
I have a Laravel project up and running on Digital Ocean with the Ubuntu 14.04 x64 vmlinuz-3.13.0-24-generic (1221) kernal.
I don't think you should be using php artisan serve for this purpose, as that is more for your local computer if you would like to preview your webpage if you don't want to use Apache.
To get set up, I used the excellent below instructions that were incredibly helpful. As you can see, there are many steps that you should carefully follow to get things up and running.
https://github.com/susanBuck/dwa15-fall2016-notes/blob/master/01_Servers_and_Git/07_Deploy_to_Digital_Ocean.md
Let me know if that helps you, and feel free to follow up with more questions if you get stuck on a step.

Magento - using "mage" command line tool locally

I currently have Magento set up on a development server (remote, SSH access) and production server (Cloud instance, SSH access). The current set up is a subversion export to update the development/production servers. This works swell.
If I SSH into the dev server, I can navigate to the Mage root directory and run the following command:
./mage install community Namespace_Module
This works well on the dev server. However, when I navigate to my local path (on my machine, where I've svn co'd Magento), running the mage tool always chokes when a channel is involved. As an example, I tried:
./mage download community Namespace_Module
And received the following response:
Error:
download: Uri doesn't contain host part
I don't understand why this error occurs. I have looked into the mage tool's code and found that the error occurs when the channel URL is malformed. (The mage tool is basically a PHP script, and it uses parse_url to separate the channel URL into the appropriate parts for processing.) However, I am absolutely certain that the setup is identical locally, as it's all in svn, and I have tried many iterations of channels in an attempt to make it work locally.
The ultimate goal of all of this is to be able to run the ./mage tool to install modules on the local system, and commit them to svn from there. Ideally, running an svn status command should show me all the files that would be added/modified during the installation of the module.
Anyone have any ideas as to why this might be happening and how to make it run locally? Thanks!
UPDATE
For anyone wondering, the way I handled this was using the old pear command line tool, then running svn status to extract the downloaded package pieces into the way our systems are organized. It's definitely not ideal and I am still eagerly hoping to get an answer to my original question, but it's the ugly and painful workaround I'm using in the interim.
You should check whether you have all necessary php extentions installed localy.
Missing php5-curl might be the problem.
As you have gotten the code from another server, you might need to reinit things using:
./mage mage-setup
You could also try:
./mage channel-add http://connect20.magentocommerce.com/community

Categories