Where is php.ini file
Active Oldest Votes. On the command line execute: php --ini You will get something like: Configuration File php. Improve this answer. KingCrunch KingCrunch k 19 19 gold badges silver badges bronze badges. I used this command and edited the php. I tried using the phpinfo PHP function and it give me the actual correct location of the php. I think this is very important and I hope this helps someone. I have changed the accepted answer to one that highlights creating a. By the way, if you comment on the question then I get notified and I can fix the problem sooner.
I don't use the apache module, but as far as I remember I think there is no way around a phpinfo. Usually you use this two or three times and at the end of the day you know where the files are ; — KingCrunch. I ended up editing the wrong ini file too, wasting an hour. Show 4 more comments. The best way to find this is: Create a PHP. It will show the file which is actually being read! Updates by the OP: The previously accepted answer is likely to be faster and more convenient for you, but it is not always correct.
See comments on that answer. Tejas Tejas 6, 1 1 gold badge 18 18 silver badges 25 25 bronze badges. This should be the accepted answer. If you have CLI installed and have apache running then it may have its own ini file as my system does. Using the accepted answer returns what the CLI is using rather than apache's. Dan Yes, you are right. I am changing the accepted answer to this one because the problem you mention was also encountered somebody in practice who commented on the previously accepted answer.
By the way, if you had commented on the question I would have fixed this problem sooner. This does not work on my installation. Show 3 more comments. This works for me: php -i grep 'php. Therefore, one of the most important files you may come across in the hosting panel is the php. There are many commands in the php.
First, let us discuss where you can actually find the php. Then, we will recommend a few configurations for the php. The best way to find the location of this file is to create a PHP file. You only need to use the. Finally, once the file is saved, open it in the browser. After running the file, you should be able to see the information of php.
The location of php. In normal circumstances, the file will be placed in the first location. Otherwise, if the PHP is installed as a module, it will be in the second location. Creating the. If you have WordPress installed locally on your computer, you can find the file via the program you are using. Although, the location of php. Just rename the filename to php.
Your changes will be saved and should take effect right away. An alternate way to edit your php. You can download the file locally and edit. No, in fact there is no way or need for customers to restart services on the Grid. Any changes you make within your php. Not with a php. You can make changes on a per domain basis via a. When you are finished editing your php. Run the following command:. Plesk This domain-level version of php.
There are two main ways to edit this file. Select the Domains tab. Most common PHP directives are in this page and ready for you to modify. You can select common options from the drop-down menus, or create your own by using the "Custom Variable" option.
Using a script editor or a plain text editor not a word processor create file called phpinfo. If you scroll down the page, and you can find the current version of MySQL. When you run phpinfo. This folder is inaccessible using FTP or the File Manager in the control panel, so you cannot make changes to it if you need to fix errors. To fix this you need to make your own php5.
0コメント