Symfony http: TLS handshake error from [::1] - php

Using symfony 3.4 and PHP 7.1, while running the project it forcing to run at https localhost, but not displaying content with https. and how can I run with normal http.
not running at https as well. after install local ca
symfony server:ca:install
not running after enabling http.
symfony local:server:start --allow-http

type symfony server:ca:uninstall to get ride of your tls errors. That's how I solved mine.

a - you should first stop running the server
b - run the command above
c - and then restart the server

for me i only , instead of
"symfony serve"
i run
"symfony serve -no-tls"
Then i have no error and i could view the result on "http://127.0.0.1:8000" instead of "https://127.0.0.1:8000"

Related

Laravel php artisan serve page not found

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?

Laravel Dusk: cannot find Chrome binary

I'm following the instructions on how to run browser tests from here https://laravel.com/docs/8.x/dusk on a fresh install of Laravel using Homestead running on a VirtualBox vm.
When I try to run artisan dusk however, it fails and tells me it can't find the Chrome binary.
1) Tests\Browser\ExampleTest::testBasicExample
Facebook\WebDriver\Exception\UnknownErrorException: unknown error: cannot find Chrome binary`
Googling tells me to install the Chrome Binary (of course) but that appears to have been done already. Scrolling up the CLI, I see the following from when I ran dusk install.
Downloading ChromeDriver binaries...
ChromeDriver binaries successfully installed for version 86.0.4240.22.
So is there something else I need to install, or do I need to tell dusk where to look for the binary, or is it something else entirely?
As you already have ChromeDrive you maybe just need to start it
./vendor/laravel/dusk/bin/chromedriver-linux
In order to run laravel dusk you need to have google chrome installed.
That being said if you are using Homestead simply enable the webdriver feature in your Homestead.yaml configuration:
features:
- webdriver: true
Remember that after enabling the webdriver feature, you need to reboot/provison your homestead to load the config change.
vagrant reload --provision
Sources:
https://laravel.com/docs/8.x/homestead#laravel-dusk
https://laravel.com/docs/9.x/homestead#laravel-dusk
You simply need to have chrome installed. That's it. Not chrome dev or canary or any of those alternave versions, you need to have the real chrome browser installed. I had chrome dev installed and I kept getting this error until I downloaded the actual chrome.

Why is my Symfony 5 local server showing the HTTP request as text instead of a rendered page?

I just wanted to try out Symfony 5 for my own education, so I followed the instructions here.
symfony check:requirements shows that I have the requirements needed to run the application (I'm running Windows 10 with php 7.3.4 running via php-cgi.exe)
I created the project by running symfony new my_project_name then, as per the instructions, cd into the project directory and run symfony server:start
The command line output says
[OK] Web server listening
The Web server is using PHP CGI 7.3.4
https://127.0.0.1:8000
But when I open the local IP address at port 8000 in my browser, I see an HTTP request as raw text, not the expected welcome page or even a 404 page.
Can anyone advise as to why the standard Symfony 5 startup instructions would not be producing the expected output and whether there's something more I need to configure to get the expected output?
I had the same problem as you, but after running those commands the problem was solved:
$ symfony composer req profiler --dev
$ symfony composer req logger
and
$ symfony composer req debug --dev
I think it's just a composer issue.
You should create the application like this: symfony new my_project_name --full
Like the documentation page you linked says, symfony new my_project_name is for microservices, console applications and APIs. It does not have the packages required to be interpreted from plain text to a web page.

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

Categories