13

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?

1 Answers1

26

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.

Svish
  • 152,914
  • 173
  • 462
  • 620