Configuring PHP for PostgreSQL and IIS - windows

I have PHP v7.2.7 and PostgreSQL v10 with IIS.
I am trying to get this to work following any advice I have been able to find on the web, but with no success. My configuration so far is as below.
PHP.ini extension list includes both php_pdo_pgsql.dll and php_pgsql.dll.
Both these dlls are located in the correct extensions directory according to phpinfo.
According to phpinfo the Configuration File Path is "C:\Windows" and the Loaded Configuration File is "C:\Program Files\PHP\v7.2\php.ini". I have the same php.ini file at both locations.
I have copied the version of libpq.dll from the lib folder of the postgresql installation to the root folder of the PHP installation.
I have added the bin folder of the postgresql installation to the Windows system search path.
Phpinfo shows that pdo_pgsql extension is loaded but not pgsql.
Can anyone please shed any light on what more I need to do?

Related

Where is the openerp-server.conf file located on a mac?

I installed Odoo 9 community ver. locally on a Mac.
Had many errors while installing it, but finally its up & running. Now I can't find the configuration file to set the port as well as database information.
The openerp-server.conf file is located in /etc/odoo/ directory on linux. I couldn't find the directory where its saved on mac.
Usually that file is located under debian folder. If you wanna use that configuration file you should do something like
./odoo.py --addons-path=<ADDONSPATH> -c debian/openerp-server.conf
Or you can change the location of the configuration file

xhprof not working wamp 2.2

I have downloaded the dll file from http://windows.php.net/downloads/pecl/releases/xhprof/0.10.6/ and kept the first 32 bit file at C:\wamp\bin\php\php5.3.13\ext and also include it in my php.ini file (as extension=php_xhprof.dll). But when I call phpinfo() xhprof is now showing. I am not getting any errors in my log.
There are 2 php.ini file and you may have edited the wrong one.
To make sure you edit the correct php.ini file i.e. the one used by Apache use the wampmanager menus like so:
left click wampmanager -> PHP -> php.ini
Check this has the new extension and if not add it to this file.
The php.ini file in \wamp\bin\php\php{version}\php.ini is only used when you are running PHP CLI i.e. running PHP from the Command Line
Also make sure you downloaded the Thread Safe version of xhprof that will be the ones with -ts- in the zip file name.
Also the vc9 or vc11 should match the compiler used to compile your Apache and PHP. If you are using PHP5.3 (very old) then you had better hope it is VC9 but it is quite possible that your Apache/PHP may have been compiled with VC6 which means this extension will not run with your version of Apache/PHP.

libsybcs.dll error when installing composer

Running a windows install I keep getting error listed below.
"The program can't start because libsybcs.dll is missing from your computer.
Try reinstalling the program to fix this problem."
Not sure what this means.
This isn't a Composer issue, but an PHP or server stack configuration issue.
You enabled the Sybase Extension in your php.ini: php_sybase_ct.dll.
This DLL requires another DLL to support Sybase, the libsybcs.dll.
But this file is missing on your system.
When you want to work with Sybase, install it correctly, then the DLL is present. Set the folder where the Sybase DLL resides to the ENV path or drop the DLLs into PHPs ext folder.
When you don't need Sybase, disable the PHP extension php_sybase_ct.
Then restart PHP and retry the Composer installation.

Installation on Windows with xampp

I am trying to install Yii2 on Windows with no success. I tried several ways.
First tried to install basic and advanced application templates following official installation instructions.
Then I tried with Github. I downloaded archive, unzipped it, placed folder content in htdocs of xampp. When I opened this page http://localhost/my_yii/requirements, it showed "Object not found!" error.
I tried with composer also but failed.
My htdocs path is "D:\php\htdocs" and my php.exe path is "D:\php\php". I think composer installed in this path: "D:\php\php".

PHP.ini Settings Are Ignored By PHP5.3.5 Running With Windows 7 And Apache 2.2.15

I did an install of PHP5.3.5 on Windows 7 Home Premium using the MSI installer download. I got it to overwrite a previous version of PHP5 in C:\php5\
When first testing it, the server failed to start. I fixed this by adding the path to PHP in the Apache2.2 httpd file where the installer had inserted 2 lines of coded pointing to the ini file directory and the PHP DLL but had left out the directory path. After doing this, the server starts ok and I can run phpinfo to view the PHP settings in my web browser on local host.
In the phpinfo it states that the loaded configuration file is C:\php5\php.ini as expected. But if I make any changes to the settings, and reboot the server, none of the changes are reflected in phpinfo. Yes, I do refresh the browser window.
If I rename the php.ini to something else to make it invisible phpinfo then correctly identifies that there is no php.ini file loaded.
So the settings in php.ini are being ignored and some default settings are being used (but I have no idea where these are derived from). As far as I can tell, there are no other php.ini files on my computer.
In phpinfo it states that the Configuration File (php.ini) Path is C:\Windows but this is the same as on a Windows XP computer that I work on. And in the windows folder I don't see any php.ini file.
In the windows registry, there is no mention of PHP5, and the PATH environment variable starts with C:\php5\;
So hopefully someone can suggest how I can get PHP5 to take notice of the C:\php5\php.ini settings. :)
You may have more than one php.ini file. If you do, and you don't realize that you do, you will be slowly driven insane [I speak from experience].
So, have you upgraded from a previous version of php to your current version? If so, delete all previous version php.ini files. Check your environment and system variable paths. Eliminate any references to previous versions.
You say youp're running Apache, but is MSII also running, or did you turn it off?
You may have to go into registry ( I no longer use MS OS so I don't know what or how VISTA or Sys7 implement Registry. I used XP when I had this problem and I had to manually eliminate Registry entries for previous versions of PHP.
Lots a luck!

Resources