# Different php.ini path outputs

**URL:** <https://www.phphelp.com/t/different-php-ini-path-outputs/26915>\
**Category:** PHP Installation and Configuration\
**Created:** [August 14, 2018, 3:21pm UTC](https://www.phphelp.com/t/different-php-ini-path-outputs/26915 "2018-08-14T15:21:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ocellata](https://www.phphelp.com/letter_avatar_proxy/v4/letter/o/bc79bd/32.png) [@Ocellata](https://www.phphelp.com/u/Ocellata)\
**Post date:** [August 14, 2018, 3:21pm UTC](https://www.phphelp.com/t/different-php-ini-path-outputs/26915/1 "2018-08-14T15:21:54Z")

</div>

Hi,

When I write this into bash:  
php --ini

it gives me:  
Configuration file (php.ini) Path: /usr/local/lib  
Loaded Configuration file: (none)  
Scan for additional .ini files in: (none)  
Additional .ini files parsed: (none)

But then in browser phpinfo() gives me:

Configuration File (php.ini) Path /etc/php5/apache2  
Loaded Configuration File /etc/php5/apache2/php.ini  
Scan this dir for additional .ini files /etc/php5/apache2/conf.d  
Additional .ini files parsed /etc/php5/apache2/conf.d/05-opcache.ini,  
/etc/php5/apache2/conf.d/10-pdo.ini,  
/etc/php5/apache2/conf.d/20-json.ini,  
/etc/php5/apache2/conf.d/20-readline.ini

Why the outputs are so different?

---

<div class="post-metadata">

**Author:** ![ErnieAlex](https://www.phphelp.com/letter_avatar_proxy/v4/letter/e/bc8723/32.png) [@ErnieAlex](https://www.phphelp.com/u/ErnieAlex)\
**Post date:** [August 14, 2018, 8:18pm UTC](https://www.phphelp.com/t/different-php-ini-path-outputs/26915/2 "2018-08-14T20:18:26Z")

</div>

Hmmm, did we not answer this in another recent post?

The PHP gives you the PHP folders. The Apache gives your the server’s folders.  
A command in PHP is not the same as a live website that you go to in a browser. Two different results as they should be. One is from a server’s viewpoint with a local command entered, the other from a websites folder results. Are you having an issue with them?

Locally on a hard drive, you would have a folder you store items in. A website for example might be under your public\_html or your WWW folder. When viewing that folder in some PHP code on a website that is stored inside of those folders, it does not normally show the folders outside of those. A website’s ROOT folder is the WWW/website-name usually. Does this help or confuse you? Ask further questions if you are still not clear on it.

---

<div class="post-metadata">

**Author:** ![Ocellata](https://www.phphelp.com/letter_avatar_proxy/v4/letter/o/bc79bd/32.png) [@Ocellata](https://www.phphelp.com/u/Ocellata)\
**Post date:** [August 21, 2018, 7:09am UTC](https://www.phphelp.com/t/different-php-ini-path-outputs/26915/3 "2018-08-21T07:09:14Z")

</div>

Thanks for answer! This made it little bit clearer for me.
