phpinfo – Internetblog.org.uk https://www.internetblog.org.uk Web hosting, Domain names, Dedicated servers Fri, 29 Jan 2016 11:05:52 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.5 https://www.internetblog.org.uk/files/2016/01/cropped-favico-32x32.png phpinfo – Internetblog.org.uk https://www.internetblog.org.uk 32 32 Configuring PHP: php.ini and phpinfo https://www.internetblog.org.uk/post/1515/configuring-php-phpini-and-phpinfo/ Fri, 09 Jul 2010 15:28:40 +0000 http://www.internetblog.org.uk/post/1515/configuring-php-phpini-and-phpinfo/ php logoWith your own dedicated server, many of the configuration tasks fall squarely on your shoulders. PHP is no exception. Most of the PHP configuration settings are found in the php.ini file, which is often located in /etc/php.ini on Linux servers. You must edit the file as root, and any configuration changes will only take effect after you restart your web server.

For example, a common setting that system administrators might want to change is the memory limit, which is generally too low for many web applications. Edit php.ini and find:

memory_limit = 16M

You can then change it to something like:

memory_limit = 64M

Save the file and then restart Apache:

service httpd restart

To see if changes have come into effect and to look at any other configuration settings you might want to change, you can create a phpinfo.php file in a regular document root of one your websites. Edit the file and add the following code:

<?php

phpinfo();

?>

Save it and then load that file from your web browser. It will print out a list of all PHP configuration settings.

]]>
How to Setup PHPInfo on Your Website https://www.internetblog.org.uk/post/491/how-to-setup-phpinfo-on-your-website/ Tue, 15 Sep 2009 17:22:40 +0000 http://www.internetblog.org.uk/post/491/how-to-setup-phpinfo-on-your-website/ PHP Info
When it works perfectly, PHP is the best thing since sliced bread. When something goes wrong, however, PHP can be real pain. Many of PHP’s settings may not be apparent to you, especially if you only have a shared hosting account and did not install and configure it. PHPInfo is an actual function built into PHP that displays a comprehensive list of PHP features and settings on your server. Here is how you can quickly setup and execute it.

1. Start your favorite text editor. Notepad is sufficient if you are using Windows.
2. Enter the following code into the text file:

< ?php
phpinfo ();
?>

3. Save the file as phpinfo.php.
4. Upload the file to your server in the directory of your choice.
5. Open your browser and point it to the address where you uploaded the file.

That is it. You now have a quick and simple script that will always give you information about the PHP installation on your server.

]]>