Localhost not working with fresh installation of Symfony - php

I know there is a thread on it ("Symfony fresh installation is not working on my localhost") but the solution didnt helped me.
I'm new to Symfony and I tried to create my first project. I installed a fresh copy of Symfony and then tried to start the server but I can't access localhost:8000, its loading forever and nothing happens.
My folder :
Screen installation
I ran this command :
php bin/console server:run
It says everything is okay and I can now access it.
Command Result
..but when I try to access it, the tab is loading forever.
Tab loading forever
Server status
I already tried to start the server on another port php bin/console server:start *:8080 for example, but same problem happen. Am I doing something wrong ? Thanks for helping and sorry for my bad english.

Quick Reply,
Thanks to people answering this thread.
I found the solution. I removed my antivirus protection and now its working perfectly. I recently installed Avast and I tried to removed it and seems to be the problem. Sorry for bothering.

Related

My laravel project start page is not opening

I have install Laravel in my pc using composer.
I used gitbash and started xampp control server
First I've changed my directory.
Then I've ran a command composer create-project laravel/laravel project_1. After the command had run, it installed laravel and all necessary file and key was successfully set.
Then I again changed my directory to project_1
Then I ran another command php artisan serve. After running this command Laravel development server started and 127.0.0.1:8000 this ip has genrated.
I copied the id and paste it in my browser url bar.(I copied and pasted it without using keyboard. I only used mouse)
but when I provided the ip the project_1 starting page did not open.
The page was loading and it is still loading.
what can I do? Please help
logs folder
Here is my contribution, I cannot say what is the cause but I have a solution for it; because I have such as a challenge.
run
php -S 127.0.0.1:8000 -t public
Note that the 8000 is your port, and this could be any 4-digit number.
I hope this helps
Every thing you did seems right to me in terms of Laravel requirements, so lets check some other possible issues:
make sure that your internet connection isn't configured to use
proxy, if so make sure you excluded your local address.
if you are using Internet security suite software, make sure it doesn't block your requests, this vary from software to another but you might test this by deactivating the software for a while until you try.
now that's what I have in mind, I hope it help.
First, stop the php artisan serve
After changing directory go to inside your project folder, you can run php artisan serve. Then a localhost URL will be generated for you where you can see your project in the browser
If you have PHP installed locally and you would like to use PHP's built-in development server will start a development server at http://localhost:8000
Please try to install Laragon and forget about Xampp for now. This is really cool tool and you'll start much quicker. I did try to resolve few issues with Xampp myself and always wasted a lot of time. You can google tutorials later for it as well. Plenty of info out there.
As well it comes with in house installer for Laravel ;) and more :).
Make sure that you are not coping the url from Git Bash through command, it will stop running the project
Make sure that you are not using antivirus specially avast antivirus.

webprofiler not working on clean symfony4 project

I've got a strange problem going on with Symfony. Today I made brand new project using composer create-project symfony/website-skeleton gall command and right after installation, before doing anything in code I go to the website and the only thing that is said on webprofiler toolbar is "An error occurred while loading the web debug toolbar." I don't even get to see what kind of error is this.
The server I'm running is PHP v. 7.2.3, program is Xampp for Windows.
I thought maybe this default starting page is bugged, so I made some test controller and the error is exactly the same. Have you encountered such problem with latest symfony?
I would never figure it out myself, but adding index.php to browser address resolved the issue.
Much better solution is to use command
composer require symfony/apache-pack
As the .htaccess file is not included in the website-skeleton by default :)
Thanks for pointing me in the right direction guys!

Laravel: TokenMismatchException

I know about this exception but I can't fix this issue.
Things that you need to know:
I'm using PHP 5.6 FPM, Nginx, MariaDB;
I'm using Laravel 5.1.44;
My app is working on server and have no issues;
I'm in a new pc with docker. I lost my previous env and it was not installed using docker;
I'm trying to use docker. I tested a lot of containers for a Lemp stack and none of them is working(for this project);
Tested in home and at work(both using docker). Not working;
Now I'm using https://github.com/LaraDock/laradock;
I downloaded a login test project from github and it works.
I don't know, but it looks like a session issue cause when I disable csrf middleware, I try to login and the browser sends me back but it doesn't render an alert that uses session;
But if I use "Session::put('test', 'bla')" and "Session::all()", 'test' is there.
I got this error in all forms;
I have csrf field in all forms;
I tried to change "session.save_path" in "php.ini" and it also does not work.
And I don't know what to do. It's an issue that I can't fix :/
Any help? Something that I could try? Thank you!
EDIT #1
Right now I installed Nginx and PHP FPM using the same version that is in my docker containers and it's working. I installed them in my host machine without docker.
It's not something that I like to do but it works and I can continue to dev my project.
This issue is not fixed yet cause I still can not run my project in a docker container :/
EDIT #2
Before post this question here I tested redis and it also was not working.
Today, I read your replies and I tried with database and it works.
Then I changed to file and it also works now(I did a chmod 777 in storage folder). But yesterday I did this(chmod storage) too, it's weird. And something strange that I notice is that when I reboot my pc, I always have to do a chmod in storage folder to my app works.
But now, I have this "Redirecting to zzzzz.com/aaa" when I have a redirect. Could be a space before a PHP open tag but is something that is not happening in my host machine(as I said in EDIT #1).
I'll try to fix this. Thank you guys!

php artisan optimize times out only on composer install

I'm running a laravel app on Azure. Things are moving in the right direction, composer install didn't use to work at all. Now however, the "php artisan optimize" command times out:
However, running "php artisan optimize" separately is no problem at all:
What could be the cause of this?
Edit:
Deleting the symfony-folder does not help, it is not present when I run the "Composer install"-command:
Increasing the timeout-limit does not help either, I increased it in both azure and in the composer.json file:
This still gives me a timeout, after installing the symfony-components again:
...
As I deployed a new clean Laravel 5 application to Azure Web apps and tried to reproduce your issue, however, it worked fine on my side either I run the command php artisan optimize or composer install or composer update.
I installed the composer at the Site extensions at the KUDU console site of the application on Azure Web apps, the url should be like: https://<your_site_name>.scm.azurewebsites.net/SiteExtensions/#gallery
There are several solutions of other developers who occur the same issue with you, you can try these solutions:
try to increase the max_execution_time or set the value to 0, refer to https://azure.microsoft.com/en-us/documentation/articles/web-sites-php-configure/#how-to-change-the-built-in-php-configurations to change the PHP build-in configurations on Azure Web Apps. And you can change the process-timeout in Composer.json file :
"config" : {
"process-timeout": 0
}
deleted the entire Symfony folder and try again. As the comments at PHP Artisan Optimize - Timed out? #1050, it seems the symfony dependencies raise the issue.
#Rkey,
According to my experience, I think the issue is more related to the symphony version/configuration. I suggest you can remove/edit the symphony configuration from the composer.lock file (NOTE: please backup this file if you cannot success, you also can recovery your environment). And then you can run this "composer install".
After installed component, You can see an alert window which shows that
your session is timeout, please refresh your browser.
You can see this information because the server is in initialization process.
Any concerns, please feel free to let me know.
I'm also having this problem. Will upgrading the plan help?
According to this upgrading to S3 helps... I haven't tried it though... Let me know if it really works.
#Rkey & #cabs, per my understanding on this question, I wanna point out that Composer is not fully supported on Azure. The issue is that it’s using Taskkill command which is blocked on Azure. We are aware of this and please feel free to submit an idea or suggestion based on the experience with Azure at https://feedback.azure.com/forums/34192--general-feedback.
I have been stuck in this problem as well for a week.
Have tried all solutions on forum but no success.
This morning finally solved after reinstall XAMPP. It was problem on my previous PHP version 5.6.19. While using new XAMPP with PHP version 5.6.28, it worked fine.

Composer/Laravel Installation: My command line no longer understands the PATHs

running mac Yosemite 10.10.5
A couple of days ago I installed Laravel for the first time. That part went pretty smooth! Once it was time to install composer I was able to find some help here! This command on bash Profile made it work for me: PATH="$PATH:~/.composer/vendor/bin"
Fast-Forward to today when I am attempting to install XAMPP and Bitnami.. The Apache server and all that. So I think I am ready to roll and as I tried to create a project I was told that I did not have the mcrypt file? So down THAT rabbit hole I went. That was a tough one but I managed to get it to work.
Now forgive me but I don't remember what happened next that led me to re-install composer and that turned out to be an other huge issue as it wouldn't allow me to do so.. I would get this message
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The detect_unicode setting must be disabled.
Add the following to the end of your `php.ini`:
detect_unicode = Off
After doing some research I was able to download Composer again by running this command..
curl -s getcomposer.org/installer | php -d detect_unicode=Off
I thought I was on my way.. 2 hours have gone by! Boy was I wrong! :(
What once used to work.. composer commands in my terminal.. all of the sudden are not recognized..
Commands like this worked before.. composer create-project laravel/laravel=5.0 TestApp
but now it returns this.. ??+?abelista /Applications/XAMPP/htdocs Question Marks along my machines name..
Nothing with composer runs.. I have tried changing my PATH in my Bash Profile too..
PATH="$PATH:$HOME/.composer/vendor/bin"
PATH="~/.composer/vendor/bin/laravel:$PATH"
and remember this one below used to work..
PATH="$PATH:~/.composer/vendor/bin"
From my understanding.. If I can recall correctly.. I think the problem began when I ran homebrew to install mcrypt.. I could be wrong. Does anyone here have the slightest idea what could be my issue?
BTW, according to my command line.. composer is installed..
All settings correct for using Composer
Downloading...
Composer successfully installed to: /Applications/XAMPP/xamppfiles/htdocs/composer.phar
Use it: php composer.phar
Thanks for reading and trying to help me out.
I think you've messed up with PHP installing XAMPP or other tools...
Nothing to do with composer. If you want something to work, try using Homestead, everything is setup for you in there.
In general, I would recommend you to not install stuff directly on your development machine. Try using virtual machines instead, that way you can do all the mess you want and reset everything easily.

Categories