How do I edit the php.ini file?
What if you try to copy php.ini file to your Desktop, make changes, save it, and replace back?
Edit php.ini file
The wampmanager icon, which sits in the system tray has a menu system.
Use that to edit your php.ini file that is used with Apache.
So its
(left click ) wampmanager icon -> PHP -> php.ini
It could not be simpler.
EDIT/UPDATE:
And now in WAMPServer 3 it has become even easier to change some of the more obvious PHP Settings.
(left click) wampmanager icon -> PHP -> PHP Settings
and you should see a new menu where you can amend some setting from the menu system as below.
If there is a Green Tick by an On/Off option then that parameter is set to On.
If there is a green arrow symbol to the left of an option, that will either open a selectable list OR a dialog where you can enter a value manually to suit yor needs.
How to change a 'php.ini' setting in a PHP file
The reason why error_reporting did work not is you set its value to the following string. 'E_WARNING ^ E_NOTICE ^ E_DEPRECATED'
. But it should not be a string. E_* values are PHP constants and should be used outside quotes like:
ini_set('error_reporting', E_WARNING ^ E_NOTICE ^ E_DEPRECATED);
Also you are using binary XOR (^) between these constants, which is unusual. The suggested value for a production environments is to use E_ALL
alone, for debugging. If you want all errors except E_DEPRECATED
, you can use E_ALL & ~E_DEPRECATED
.
Some PHP settings cannot be changed with ini_set
. You can check the PHP documentation for which variables allow setting on the file level. For example, max_file_uploads
is only changeable from the php.ini file (documentation).
Related Topics
Pg_Query Result Contains Strings Instead of Integer, Numeric
Get Nearest Places on Google Maps, Using MySQL Spatial Data
Detect Clients with Proxy Servers via PHP
Create an Encrypted Zip Archive with PHP
Php: Static and Non Static Functions and Objects
How to Replace a Function in PHP (Such as Mail) and Make It Do Something Else
Php:Convert a Blob into an Image File
Retrieve the Id of an Inserted Record: PHP & Ms SQL Server
Simple PHP Contact Form with Firebase Hosting
How to Send Email with Attachment Using PHP
Get Next and Previous Day with PHP
PHP Function for Get All Mondays Within Date Range
PHP Preg_Match to Find Whole Words