sir-haver
sir-haver

Reputation: 3602

Cannot locate my php ini file on live server?

I tried different solutions suggested here, but still cannot find the file through cPanel on my live server.

I'm running

phpinfo();

And getting this result:

Configuration File (php.ini) Path   /opt/alt/php56/etc

I cannot find these folders: /opt/alt/php56 But I could find the etc folder, however the file is not there, and I made sure I checked "View hidden files" options

What else could be done?

Upvotes: 1

Views: 3518

Answers (4)

In WHM go to Software >> MultiPHP INI Editor and edit php.in for your PHP version.

OR edit: /usr/local/lib/php.ini

Upvotes: 1

Dev Matee
Dev Matee

Reputation: 5947

Try this command and find the path of PHP

which php

Upvotes: 2

d0niek
d0niek

Reputation: 238

try:

php --ini

it will print all config files locations

Upvotes: 1

alireza71
alireza71

Reputation: 333

enter in your server comand line: php -i to see all of your php's config and also in very first lines of this command output, location of your php.ini if you can't find file like php.ini in your output which may not happen make one with touch command and put your configuration in that file and reload server, depend on what you use (like fpm or ...).

Upvotes: 2

Related Questions