Setting PHP extension_dir path in php.ini not working as i expected

Discussion in 'Server Operation' started by hermestrismegistus, Apr 12, 2021.

  1. When i set the extension_dir in php.ini and use the full path like this, it works
    But if i do:
    or
    Then it doesn't. For my program, i can't use full paths since the software can be placed in other directorys. So how to set the right path php.ini without using full path?
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    You probably can't. The extension_dir pertains to the entire php installation, which you appear to be putting in a per-user location, so just set the extension_dir accordingly, and put any needed extensions under that directory. Or create/specify a different php.ini which specifies a different extension_dir if you really have such a use case.
     
  3. Hmmm this is what i was afraid of. I already noticed that it somehow pertains to the building directory. Even if it build on a different system and in a different directory, it keeps looking for the directorys from where it originally was build. Guess i need to write a install script...

    Thanx for you help!
     

Share This Page