Am trying to setup laravel application, but it is displaying only laravel default page. not able to run the application.
i have followed below steps.
1)dump the code in xamp\htdocs\sample(application folder name) and updated db details
in command prompt
2) composer update
3)php artisan up
4)php artisan serve
after serve command it is displaying as "Laravel development server started on http://localhost:8000/
[Tue Jan 30 14:58:23 2018] ::1:51377 [200]: /favicon.ico
[Tue Jan 30 14:58:26 2018] ::1:51380 [200]: /favicon.ico
[Tue Jan 30 14:59:51 2018] ::1:51384 [200]: /favicon.ico
in browser http://localhost:8000/ displaying laravel defaule page.
please let me know how to setup the application and if i miss anything in above steps.
thanks in advance.
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'
My objective**: Rendering 3D model (dwg file) in chrome web browser using autodesk WebGL-
based viewer using javascript library
What I've done: explored a step by step tutorial of forge.autodesk.com as below
https://learnforge.autodesk.io/#/environment/setup/php
https://learnforge.autodesk.io/#/oauth/2legged/php
3) https://learnforge.autodesk.io/#/datamanagement/oss/php
https://learnforge.autodesk.io/#/modelderivative/translate/php
https://learnforge.autodesk.io/#/viewer/2legged/php
https://learnforge.autodesk.io/#/viewer/2legged/ui
https://learnforge.autodesk.io/#/environment/rundebug/php
when I said "serve project" in php server command pallette, it has thrown below error
[Fri Aug 12 17:32:58 2022] PHP 7.4.30 Development Server (http://localhost:3000) started
[Fri Aug 12 17:32:58 2022] [::1]:54723 Accepted
[Fri Aug 12 12:02:58 2022] [404] / - No such file or directory
[Fri Aug 12 17:32:59 2022] [::1]:54723 [404]: GET /
[Fri Aug 12 17:32:59 2022] [::1]:54723 Closing
Appreciate guidance
I am trying to run a laravel project in my local machine. It starts normally on http://127.0.0.1:8000 but when I try to open the url in the browser the port changes to 8001 and the new url is http://127.0.0.1:8001. When I try to open this in the browser, again the port changes to 8002.
Image showing the issue
composer.json
My PHP version is 7.4.1. If anyone else faced this issue earlier or knows how to fix this issue, please help in fixing this issue.
Thank you.
Update 1:
Noticed something. Whenever database related code is executed, this issue is popping up. For example, when I try to execute the following code shown in the image, it runs smoothly and I can see the output in the browser. Case when the code runs smoothly
But when I change the code to the following, the issue shows up.
Case when the issue shows up. This is not any database heavy query but why this issue? Any leads would be very helpful.
Update 2:
Found nothing in laravel logs but found the following in the apache error log which is given below:
[Thu Jun 09 21:37:24.988703 2022] [mpm_winnt:crit] [pid 2660:tid 704] AH02538: Child: Parent process exited abruptly. Child process is ending
[Thu Jun 09 21:37:27.399609 2022] [core:warn] [pid 8084:tid 576] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Jun 09 21:37:27.446479 2022] [mpm_winnt:notice] [pid 8084:tid 576] AH00455: Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.4.1 configured -- resuming normal operations
[Thu Jun 09 21:37:27.446479 2022] [mpm_winnt:notice] [pid 8084:tid 576] AH00456: Apache Lounge VC15 Server built: Aug 11 2019 12:20:04
[Thu Jun 09 21:37:27.446479 2022] [core:notice] [pid 8084:tid 576] AH00094: Command line: 'c:\xampp\apache\bin\httpd.exe -d C:/xampp/apache'
[Thu Jun 09 21:37:27.446479 2022] [mpm_winnt:notice] [pid 8084:tid 576] AH00418: Parent: Created child process 10064
[Thu Jun 09 21:37:28.196453 2022] [mpm_winnt:notice] [pid 10064:tid 664] AH00354: Child: Starting 150 worker threads.
Try this parameter I think help you
php artisan serve --port=8080
This highly, might be a problem to the code, you've write-ed, not a Laravel problem. I've faced issues like this before for a long time ago, so you might check :
The code is processing in blade or controller.
Or it might be a memory issues related to PC (might not be, related to this issue, but i had a lots of memory issues back then when i had low-end PC and all these issues was happening.)
As I said, my first guess is the code, so you might need to share the code find out, what is happening.
Also conflicts in reserved ports will be avoided anyway, for example if you set your local environment server to something else(8080), same issue will happen again.
And sometime if you close your terminal without closing local environment, new php artisan serve will run the local environment anyway, for example, my terminal/IDE was closed but application was serving, and doing php artisan serve not forced me to close and run a new local environment like yours, it was trying to serve again, but old one was doing conflicts.
So as I said again, it might be a code issue.
Double check your code or share it to find the issue.
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
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