PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, February 14, 2022

[FIXED] Logs symfony in Mamp

 February 14, 2022     mamp, php, phpstorm, symfony     No comments   

Issue

I use Mamp to work with Symfony, but I I can not see the logs

For Example

public function indexAction () {

    $user = news User();
    $form = $this->createForm(new UserType(), $user);

    return array(
        'formUser' => $form->createView()
    );
}

In this example I misspelled the new User() with news User(), but I have a blank page in my browser. If I do tail in log file I can see the error. Instead of Mamp, If i Use the symfony server php app/console server:run, I can see the error in my Browser, but I can't use xdebug in PhpStorm (8.0.2)


Solution

If you see a blank page it means that error repoting is turned off. You can enable it either in php.ini or in your code with the following statement

error_reporting(E_ALL);
ini_set("display_errors", 1);


Answered By - Markus Müller
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing