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

Sunday, July 17, 2022

[FIXED] How to hide php warning in yii2?

 July 17, 2022     php, warnings, yii2     No comments   

Issue

My yii2 web application is hosted on shared server.

it is showing php warning - " PHP Core Warning – yii\base\ErrorException PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/imagick.so' - libMagickWand.so.2:

cannot open shared object file: No such file or directory" now i want to disable php warning in my yii2 application how to achive that?


Solution

This can be achieved by changing two parameters in index.php file.

1) Setting YII_DEBUG to false

defined('YII_DEBUG') or define('YII_DEBUG', false);

2) Setting YII_ENV to prod from dev

defined('YII_ENV') or define('YII_ENV', 'prod');


Answered By - Ninja Turtle
Answer Checked By - Mary Flores (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

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