简体   繁体   中英

Change PHP working directory, PostgreSQL not working on Windows

I don't use the Microsoft dump-everything-folder because I like to keep my stuff organized. My PHP and corresponding php.ini file are located here...

C:\\MEDIA\\INTERNET\\WAPP\\PHP 5.6.2 x64\\php.ini

PHP does not see PostgreSQL which I've verified via phpinfo . The Apache error log showed the following error...

PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\php_pgsql.dll'
 - The specified module could not be found.\r\n in Unknown on line 0

So my question is where is the setting to change the default PHP directory? This should get PostgreSQL to work with PHP.

You have to change the default php extension directory by editing the php.ini :

extension_dir="FULL_MODIFIED_EXTENSTION_PATH"

Something like:

extension_dir="C:\MEDIA\INTERNET\WAPP\PHP 5.6.2 x64\ext"

Source

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