简体   繁体   English

更改PHP工作目录,PostgreSQL在Windows上不工作

[英]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. 我不使用Microsoft dump-everything-folder,因为我喜欢整理自己的资料。 My PHP and corresponding php.ini file are located here... 我的PHP和相应的php.ini文件位于此处...

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

PHP does not see PostgreSQL which I've verified via phpinfo . PHP没有看到我已经通过phpinfo验证的PostgreSQL。 The Apache error log showed the following error... Apache错误日志显示以下错误...

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? 所以我的问题是更改默认PHP目录的设置在哪里? This should get PostgreSQL to work with PHP. 这应该使PostgreSQL与PHP一起使用。

You have to change the default php extension directory by editing the php.ini : 您必须通过编辑php.ini来更改默认的php扩展目录:

extension_dir="FULL_MODIFIED_EXTENSTION_PATH"

Something like: 就像是:

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

Source 资源

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM