laravel port changing automatically after i started my server the server is restarted each time i refresh the page or move to another page the port is changing
(http://127.0.0.1:8000 => http://127.0.0.1:8001 =>...........)
even when i used the option --port the server stopped from running
i am running
Laravel Framework 8.11.2
PHP 7.4.9
#vue/cli 4.5.9
Ubuntu machine
Related
So, ran into something very weird. Pretty new to Laravel.
Created a Laravel project and did some coding before running anything. I had previously created just a blank Laravel app and it was running just fine using all defaults. This was a second new project.
In the new project I can get Laravel running fine using php artisan serve --port=81 (non-default) but if I use just "php artisan serve" or "php artisan serve --port=8000" I get no response. Netstat shows no other processes using 8000, I've explicitly punched holes in Windows Firewall for that port and for php just in case. Nothing odd in hosts file. Not seeing anything that should be causing it.
There aren't any errors thrown when running php artisan serve, it comes up normally telling me it has started on port 8000. But whenever I try to access anything on that port it just doesn't respond. There's no "Whoops" message, it (Chrome or Postman) just sits there waiting for a response. Change it to port 81, 82, whatever, works as expected.
I have XAMPP installed though I'm not using it for Apache just now so Apache is turned off. Just for giggles I changed apache config to point at the public folder of that project on port 8000 and started it ... Worked fine; got the expected result from public/index.php.
Working with PHPStorm version 2017.2. I do have XDebug installed. Configured for port 9000. Not debugging via PHPStorm, just running artisan server.
PHP 7.1, Laravel 5.4, Windows 10
Any suggestions? I'm at a bit of a loss as I'm not seeing any errors anywhere and being rather new not sure where else to look/how to debug.
Holy poopies.
Got it figured out.
As it turns out, when I added XDebug for PHP I fat fingered the default port for that to 8000 rather than 9000 in PHP.ini. It was then intercepting all the http requests on that port and swallowing them up it seems.
Everything pointed to some sort of configuration setting but when looking at settings in PHPStorm it still showed XDebug as set for port 9000. Since that's what I thought I entered in PHP.ini I assumed it was pulling it from there so I never looked at the ini file directly.
I am in the process of moving from PHP 5.6 to PHP 7.
I have a virtual machine running PHP 5.6 (PHP5) with MySQL running on it. The code is mounted from my host.
I have a second virtual machine running PHP 7 (PHP7). The code is also mounted from my host. All of my projects are configured with "localhost" as the database host.
As the first step, I want to have the MySQL "localhost" on PHP7 go directly to the PHP5 MySQL instance.
I have setup an ssh tunnel such that port 3306 on PHP7 goes directly to 3306 on PHP5, but this doesn't seem to help (EDIT: although if I change the config in a project to have a 127.0.0.1:3306 host it does work, but the host change is what I'm wondering whether I can avoid :) ).
Is there a way to setup the forwarding so that the projects will just work (or not), or do I need to go through each project and update it to cope with both servers?
I'm trying to run a simple Laravel project inside a Vagrant (VirtualBox) VM. The guest is Ubuntu 14.04 x64, and the host is Windows 7 x64. I've set up port forwarding (8000 on host to 8000 on guest), but when I run php artisan serve, though I get a message stating that the server is running on port 8000, when I visit localhost:8000 on my host machine, Chrome tells me 'this webpage is not available'. There are two complications:
First, if I use curl from inside the VM, I receive the correct page contents - so it appears the server is working fine.
Second, if I run a Python web server using python -m SimpleHTTPServer on the same VM, I can access it fine on my host OS. Visiting localhost:8000, I see the directory contents listed. So it appears the port forwarding is working fine.
I tried deleting the public/.htaccess file in the Laravel project, to no avail. I'm no PHP expert, and this problem is hard to Google! Any pointers would be appreciated.
After reading this question I tried
php artisan serve --host 0.0.0.0
And it works fine now.
I have set up a DMZ to run a web site. Most of the code is on an application server running Debian Release 7.0 (wheezy) 64-bit. I also have a web server running CentOS 6.5. It acts as a proxy for the application server. I have set up LAMP on both and my web pages are written in PHP. A PHP script on the web server calls a PHP script on the application server. The application server script calls a long running (> 1 minute) executable (that had been developed in C++). After 60 seconds (timed by my watch), the script fails with the following message.
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request POST /appServer/scriptName.php.
Reason: Error reading from remote server
Apache/2.2.15 (CentOS) Server at sitename.com Port 80
I commented out code in the application server PHP script and narrowed the problem down to the long-running C++ executable. I also ran the executable in the shell without any problems. So there is clearly a time-out issue and it seems to be associated with the web server. I have only recently replaced an old version of Ubuntu, with Centos 6.5, on the web server and I did not have this problem before I did that. Also, the PHP code is the same as before I made the switch and it did not give me this problem prior to that. So I am convinced that the problem lies with something on the web server and one of the setting I have, with php or apache, on the new system.
I edited /etc/php.ini, on the web server, and changed all of the uncommented-out 60 second time limits (max_input_time, default_socket_timeout, mysql.connect_timeout) from 60 seconds to 600 seconds. I still get the above proxy error after 60 seconds.
Solution.
On the (CentOS) web server, edit /etc/httpd/conf/httpd.conf
Include the line
ProxyPass /appServer/ http://[private IP address]/ timeout=600 Keepalive=On
Specifically add the
timeout=600 Keepalive=On
part.
I also restarted apache to be on the safe side.
I'm having a machine running on Windows 7. First I installed WAMP server on my local machine. It was working fine. Then I installed Microsoft Visual Studio 2008. From that time the WAMP server is not working at all. Means the "W" symbol of WAMP server gets Green but nothing is working like if I print http://localhost/abc or http://localhost/phpmyadmin. The page loader keeps on revolving and revolving and ultimately after long time error message comes. I gone into the details of this issue. Then I found Apache server is not running. Also I checked port 80 status. But nothing is worked for me till now. Does anyone know how to resolve this issue?
change your apache listen port
open this file c:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf
find that line Listen 80 in this file and change to other number example Listen 8080 after that changed restart all wamp service and open your browser and test it again with http://loacalhost:8080/