Laravel php artisan serve page not found - php

Hello guys i'm trying to build\start a PHP existing web app made with Laravel. I made this:
1.Installed XAMPP for PHP version 7.4, also configure Apache Server and tested with localhost and that is working
2.Installed composer and connected with PHP version 7.4
3.Intalled Node.js
4.npm install in the project
5.composer install in the project add the missing packages
In VS Code terminal I add command php artisan serve on adress http://127.0.0.1:8000/ to run the application. But I get :
This page isn’t working127.0.0.1 sent an invalid response.
ERR_INVALID_REDIRECT
Any suggestion?

Related

Cannot create a user in Voyager (laravel 6.x)

I've installed the admin package Voyager (without dummy data) on my Laravel project and when I want to create a user to access the admin panel with the following command: php artisan voyager:admin admin#admin.com --create, I get the following error:
After a little bit of searching, I found this link: https://github.com/the-control-group/voyager/issues/5082 => saying that this command does not work with PHP 7.4 and to make it work, I should either upgrade to PHP 7.4.1 or downgrade to PHP 7.3.
I'm using Wamp Server and decided to downgrade to PHP 7.3.12 since this version exists by default in C:\wamp64\bin\php
I have also edited composer.lock and composer.json in my project and then ran the command composer dump-autoload. But it still doesn't work. Am I missing something?
Had the same issue, upgraded to php 7.4.27 and it worked.

Install Symfony on distant server

I try to instal symfony on a distant ubuntu server (I'm connecting to it by ssh) so I install PHP7.2, LAMP, composer and symfony.
Next I launch symfony server using: php bin/console server:run and it says
[OK] Server listening on http://127.0.0.1:8000
Where http://xx.xxx.xxx.xx/ is the adress of the server :
When I go to the adress : http://xx.xxx.xxx.xx/phpmyadmin/index.php I get the phpmyadmin page
When i go to the adress : http://xx.xxx.xxx.xx : I get my apache page.
But how do I go to my symfony page?
I try http://xx.xxx.xxx.xx:8000 but it's not working
I try to follow the information on this page: https://symfony.com/doc/current/setup/built_in_web_server.html
but when I do it I get the error :
php bin/console server:start 34.254.242.93:8080
And I still get the same error.
There are some resources available to deploy correctly your application:
Basic software installation
Configuring Web Server
Deploy Symfony Application

Twig_Error_Runtime ; the "core" extension is not enabled ; symfony

I've inherited a Symfony/PHP web app codebase with zero documentation. I'm a nodejs dev so you can image the fun...! Anyway I'm getting there, my focus atm is to be able to run the project locally.
Here's the Symfony version:
Symfony version 2.7.16 - app/dev/debug
I've installed packages via composer install.
I can start the web app locally via CLI:
php app/console server:run
Server running on http://127.0.0.1:8000
Quit the server with CONTROL-C.
However when I try to access this URL I'm seeing the following error in browser. Have google'd around but couldn't work it out so am hoping someone here can point me in the right direction.
I think this is due to trying to run a new version of twig on an old version of Symfony
as you can see here: https://github.com/symfony/symfony/issues/20284
They mention something similar, perhaps try to include an older version of twig in composer?
composer require twig/twig 1.23

How Can I install OctoberCMS with PHP Version 5.x?

I have Windows 10, Xampp installed with PHP Version 5.x and I want to install OctoberCMS with Installation wizard https://octobercms.com/docs/setup/installation but I noticed that OctoberCMS requires PHP 7.0 or higher to achieve this and I have version 5.x.
So How can I install OctoberCMS with PHP Version 5.x ?
OK Guys, Eventually I have come up with the solution to install OctoberCMS with PHP Version 5.x.
Remember, these steps can be varied based on your operating system and the things which you have installed in your system.
First go to OctoberCMS Change log -
https://octobercms.com/changelog and find Build 419 has the php
version 5.x support.
Then go to OctoberCMS release list - https://github.com/octobercms/october/releases and click on the version you need to install which is v1.0.419. Install the zip to the root of xampp/htdocs and extract the folder.
Then inside the same folder which extracted, run this composer install.
After this, run php artisan october:env .. You can run C:\xampp\php\php.exe artisan october:env if you are having an error php is not recognized as an internal or external command.
After php artisan october:env, .env file is created. There you need to modify your database settings like database name, port (put 3306 for localhost etc) by opening this file which will be in same folder.
Then run php artisan october:up or C:\xampp\php\php.exe artisan october:up. It will create database tables and your admin user will be created with User: admin, Password: admin (You can change this after logging IN). And backend url will be something like http://example.com/backend.
Once its done, you can cut paste all your extracted folder files to root .. like from C:\xampp\htdocs\youproject\version419 to C:\xampp\htdocs\youproject\.
Hope this helps.

localhost not working after installing laravel on OSX

This problem only happens on OSX
I installed composer using the curl -sS "https://getcomposer.org/installer" | php command in Terminal and made the composer global then I created the laravel app using composer.phar create-project laravel/laravel cld command and i restarted localhost and went to localhost/cld/public and I get the following error
localhost is currently unable to handle this request.
I did the same thing in windows 10 and everything works fine.
UPDATE
I started to use Laravel Valet and it's amazing some useful resources
1. https://laravel.com/docs/5.4/valet
2. https://www.youtube.com/watch?v=IBxIfN-GnnY&t=102s
Just use laravel valet it's a life saver credit goes to Ru Chern Chong

Categories