I am new to Laravel. After installing the composer this problem occurs. I change the port number to 1000 but nothing changed. So don't know what to do.
PS C:\xampp\htdocs\WebDev>php artisan view: clear //view clear Compiled views cleared!
PS C:\xampp\htdocs\WebDev>php artisan serve
Starting Laravel development server: http://127.0.0.1:8000
[Mon Oct 12 22:21:43 2020] PHP 7.4.10 Development Server (http://127.0.0.1:8000) started
[Mon Oct 12 22:22:05 2020] 127.0.0.1:50516 Accepted
[Mon Oct 12 22:22:05 2020] 127.0.0.1:50517 Accepted
[Mon Oct 12 22:22:05 2020] 127.0.0.1:50516 Closing
[Mon Oct 12 22:22:05 2020] 127.0.0.1:50517 [200]: GET /favicon.ico
[Mon Oct 12 22:22:05 2020] 127.0.0.1:50517 Closing
laravel custom port serve,
for example, you want on the localhost:1000
php artisan serve --host=localhost --port=1000
sometimes you got an error, already port uses, for that you should kill process
you can kill php artisan of process
kilall php
that command make kill all PHP process
also, you have other preference
find a process which uses the port, and kill it
for find process for which one port uses
sudo fuser -v -n tcp 8000
you can kill process as such
kill -9 <process-id>
and again call command php artisan serve --port=1000
shortly
php artisan serve --host=localhost --port=1000
I had the same issue and I think it's related to the port 8000. Maybe it's already in use or something like this because when I changed the port to 9000 (ie: php artisan server --port=9000) it solved the issue and works just fine now.
Disable smadav auto block, you can find it on the smadav icon, bottom right conner of your screen
Related
I am trying to get this website online, mainly for my own intellectual curiosity (CS student) but also for functional use. The site is built on SilverStripe 4 and developed on a LAMP stack environment.
I have the final SilverStripe site working on my local machine (docker environment using the brettt89/silverstripe-web:7.4-apache image), with another container running MySQL for the database.
I'm using AWS EC2 and followed the tutorial on setting up a LAMP stack which included selecting the Amazon Linux 2 Image. I have a single EC2 and RDS running within a VPC that is configured correctly (a test PHP script was able to connect to the db server, query and insert data). In the spirit of incrementally getting things to work, I installed Composer on the EC2 and the PHP extensions listed on SilverStripe's documentation as required. I then ran a composer create-project silverstripe/installer my-project and created an ENV file that is the same as my docker environment (still in dev mode) but with the specified endpoint for the db given by the RDS management console.
I also changed the web root of the Apache server to the public subfolder of my site which is: /var/www/html/my-project/public
Note: I also ran the website before changing the webroot and the result was the same.
The site unfortunately returns a server error (HTTP error 500) and the error logs give me some cryptic looking messages that I have been unable to fix. My own suspicion is that there are some file or directory permissions that have been set wrong, so I will share a screenshot.
File permissions of web directory
Not sure if this helps, but from /etc/httpd/logs/error_log:
[Sun Sep 18 03:10:01.441647 2022] [ssl:warn] [pid 13852:tid 139677397750336] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Sep 18 03:10:01.441731 2022] [lbmethod_heartbeat:notice] [pid 13852:tid 139677397750336] AH02282: No slotmem from mod_heartmonitor
[Sun Sep 18 03:10:01.443062 2022] [mpm_event:notice] [pid 13852:tid 139677397750336] AH00489: Apache/2.4.54 () OpenSSL/1.0.2k-fips configured -- resuming normal operations
[Sun Sep 18 03:10:01.443080 2022] [core:notice] [pid 13852:tid 139677397750336] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
I often find myself open up so many ports when running php artisan serve
Laravel development server started: <http://127.0.0.1:8000>
[Thu Dec 2 19:56:23 2021] Failed to listen on 127.0.0.1:8000 (reason: Address already in use)
Laravel development server started: <http://127.0.0.1:8001>
[Thu Dec 2 19:56:23 2021] Failed to listen on 127.0.0.1:8001 (reason: Address already in use)
Laravel development server started: <http://127.0.0.1:8002>
[Thu Dec 2 19:56:23 2021] Failed to listen on 127.0.0.1:8002 (reason: Address already in use)
Laravel development server started: <http://127.0.0.1:8003>
Is there away to kill http://127.0.0.1:8000 before starting a new one ?
so my application will be at http://127.0.0.1:8000...
Any hint for on how to do that ?
I think you can close the terminal, and then the port automatically gets killed.
But if that does not work, you can kill the process manually by running this command :
kill $(lsof -t -i:8000)
Whenever I started php artisan serve it deleted serever.php file. Now I have uninstalled avast antivirus but still it gives this error and does not open the site properly.
PS C:\xampp\htdocs\ecom_proj> php artisan serve
Laravel development server started: http://127.0.0.1:8000
**[Fri Dec 11 12:52:23 2020] PHP 7.4.5 Development Server (http://127.0.0.1:8000) started
[Fri Dec 11 12:52:45 2020] 127.0.0.1:54908 Accepted
[Fri Dec 11 12:52:45 2020] 127.0.0.1:54909 Accepted
[Fri Dec 11 12:52:51 2020] 127.0.0.1:54908 Closing**
First, the example shown only shows communication with a browser. Closing the connection is normal behavior. (Note the port. Your server is running on port 8000).
You should check the antivirus logs what has been removed. It doesn't necessarily have to be just server.php. For example: Eset deleted the file where it found:
//<script src="http://link-to-site-detected-as-abusive">
Have you restored the server.php file in the correct version of Laravel?
Maybe you have a bug in your code.
I am running XAMPP and have rebuilt my PHP server from the ground up, renamed the server from ServerV1 to ServerV2, and now attempting a basic POST request from Android volley, returns the error found within the Apache logs:
[Sat Dec 19 19:24:57.528601 2015] [core:notice] [pid 7956:tid 260] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sat Dec 19 19:24:57.531601 2015] [mpm_winnt:notice] [pid 7956:tid 260] AH00418: Parent: Created child process 5784
[Sat Dec 19 19:24:58.047631 2015] [ssl:warn] [pid 5784:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Dec 19 19:24:58.290645 2015] [ssl:warn] [pid 5784:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Dec 19 19:24:58.325647 2015] [mpm_winnt:notice] [pid 5784:tid 272] AH00354: Child: Starting 150 worker threads.
I am not listening on any used ports:
I have research others simply running as an administrator in sources like: https://teamtreehouse.com/community/solved-xampp-apache-error and
XAMPP - Apache Error
Upon attempting that, it still does not work, where the only return from any POST is a 0.
NOTE: I have tested every action with google chromes POSTMAN and know my routes do work and return the proper JSON objects.
https://chrome.google.com/webstore/detail/postman-rest-client-short/mkhojklkhkdaghjjfdnphfphiaiohkef?hl=en
What steps can I take to alleviate this issue?
Try just by commenting Listen 443 (like #Listen 443)in httpd-ssl.conf file. it will Work 100%. Mine site it has work 100%.
Try this:
Open httpd-ssl.conf here:
C:\xampp\apache\conf\extra
Comment out the line and change it to localhost
#ServerName www.example.com:443
ServerName localhost
And of course restart your Apache
i know this is late but i've found the answer... Apparently you have to right click on the xampp-control.exe file and run it as administrator, and then probably it works perfectly now! that worked for me.
just shutdown that application which is using 443 port & retry. mine vmware workstation was using 443 port i just kill process tree of vmware & retried it works for me.
I faced this issue after copying my xampp folder from windows 7 to another installation of windows 10.
Have tried the solutions listed here, but none worked for me. I had no time to try other solutions so I just made a new installation from scratch
installing new xampp (7.3.16) works for me
This is possible due to DocumentRoot path have not set correctly.
I had the same issue, and I solved it. The reason for me was because port 8080 was in use. I found it by running "netstat -ab" in the command prompt in administrator mode. Then I changed the port (From both xampp config and httpd.conf) for something else and it worked.
I am using Ubuntu 14.04 and I am trying to install Laravel framework. In this purpose I have run this code in terminal:
php artisan serve
After waiting for 4-5 minutes I got this response:
Laravel development server started on http://localhost:8000/
[Tue May 26 13:19:40 2015] 127.0.0.1:44800 [200]: /favicon.ico
[Tue May 26 13:19:40 2015] 127.0.0.1:44801 [200]: /favicon.ico
After waiting for more than 10 minutes I got no more response although terminal is working.
Does it really take that much time? Or what's wrong?
then, what can I do? although port 8000 has been started,
localhost:8000 shows that, Sorry, the page you are looking for could
not be found.
You need to stop the server and run this command which specifies the public directory php -S localhost:8000 -t public/ as the root document root
or
you can also cd into your laravelProject/public then php -S localhost:8000