简体   繁体   中英

can't seem to access php.ini

I'm using shell to login to an ubuntu server. I want to enable curl in php.ini

I used the command whereis php.ini which shows /usr/bin/php as the location for php.ini.

However everytime I try to CD into php it says 'php is not a directory' How can I edit my php.ini?

Or do I need to create one somewhere else?

/usr/bin/php is the executable interpreter for PHP.

You need to locate your existing php.ini file:

$ find / -name php.ini

You would expect to find it somewhere in /etc, so you might find this is quicker:

$ find /etc -name php.ini

PHP will tell you where it loaded the configuration file from or where it expects it by running:

php --ini

Or:

php -i | grep -i php.ini

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM