Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP.ini Default Dir Extensions

Tags:

php

apache

I have my php.ini as follows:

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
extension_dir = "C:\Program Files (x86)\PHP\ext"

I will distribuite my php application but I was wondering that not all users have their Windows OS on the default C:\, suppose they use another letter like Y:.

How could I change "automatically" to the correct path. Like:

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
extension_dir = "Y:\Program Files (x86)\PHP\ext"

I can't go to every computer and change the default settings. So is there a way to do this by not changing it directly?

like image 579
Alfonso José Cabrera López Avatar asked Jul 28 '16 17:07

Alfonso José Cabrera López


People also ask

What is the extension directory in PHP?

It is also known as extension_dir . The picture below is the screen shoot of the php info display and the portion explaining the extension directory is shown. The php.ini file located inside windows folder ( or inside php folder ) can be edited to change the extension directory location.

What is the default configuration file path for PHP?

As mentioned, the Configuration file path is the default one of the PHP.ini files. The Loaded Configuration File section applies when your PHP installation is used as a module. In GoDaddy servers, the PHP.ini file is usually located in /web/config/php.ini. The .ini extension might be followed by the PHP version.

What is the loaded configuration file in PHP?

The Loaded Configuration File section applies when your PHP installation is used as a module. In GoDaddy servers, the PHP.ini file is usually located in /web/config/php.ini. The .ini extension might be followed by the PHP version.

What is the default PHP file modification check value?

; Enables or disables PHP file modification checking. Should be "1" ; for enabling or "0" for disabling. You should set it to "1" if you want ; to recompile PHP files after modification. Default value is "1". ; Determine which PHP files must be cached.


1 Answers

This seems to use ext relative to the PHP directory itself:

extension_dir = "ext"

I.e. it should be irrelevant what drive or path PHP is installed on, as long as the extensions are in the ext directory.

like image 185
Svish Avatar answered Nov 05 '22 07:11

Svish