Git Product home page Git Product logo

php-info's Introduction

Using the phpinfo Function

When you're coding PHP, debugging can be difficult. By default when a PHP error occues your browser will likely display a This pags isn't working message. This message is not too helpful.

PHP Default Error

There are a handful of methods to have PHP display a much more descriptive error.

PHP Helpful Error

MAMP/WAMP

If you are using a local server you will need to chagne your php.ini file. First you need to locate this file. Place the provided phpinfo.php file in your server root and test. It will list all of your PHP settings.

PHP Info

Locate the Loaded Configuration File setting note where the php.ini files is located. Mine is located in the /Applications/MAMP/bin/php/php7.3.9/conf/php.ini folder. Open this file, find the line that says display_errors = Off and change it to display_errors = On.

Save and restart your server.

PHP Hosting

If you are using hosting to test your PHP files you can change the same setting using your hosting control panel. Log in to your hosting control panel and look for a group of PHP related options. With Infinity Free hosting it's called Alter PHP config.

Control Panel

Once you are in the PHP settings look for an option related to displaying PHP errors, turn it on, and refresh your page.


Repo Resources

php-info's People

Contributors

codeadamca avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.