Apache php 5.3 postgreSQL driver could not be loaded - php

I have set up a XAMPP installation on a windows server 2008 R2 that includes:
Apache 2
PHP 5.3.x
MySQL (not used anyway)
Then I have installed PostGreSQL 9.x. I have uncommented the pgsql pdo dlls in the php.ini file accordingly but when I try to connect to pgsql I get 'driver could not be loaded'. I am stuck as I couldn't come across a fix to that on the internet, I have tried adding the path of the pgsql installation (bin and lib dirs) to the PATH environement system but the problem persists. I have also rebooted the system many times after changing any configuration to ensure it is saved and applied but still same outcome.
I have read in a nonclear conversation that this might be related to the versions but couldn't find anything further.
If you have succeeded in performing the latter I would be greateful if you could provide me with some insight. (I am open to any alternatives except downgrading to older software versions).
Thanks so much for your time

Fixed by manually installing apache2 and php instead of going through xampp (or wampp). It seems those are buggy when it comes to the latest php version and pgsql pdo driver.

Related

Unable to connect sql server database with codeigniter on xampp with windows 7

I have an application where i need to connect my web (PHP based) application with desktop application database so that both desktop and web can communicate with each other.
On ubuntu OS connectivity is working fine but when i comes to windows 7 codeigniter sql server connectivity is not working.
i tried visual c++ redistributional packages as well as other instructions provided on many platforms but fails.
i also added extensions in php\ext and dll files as well as include that extensions like sql_serv55_nts like that but nothing is working.
last error that i am receiving is
application not be run as php5.dll is missing .
can some one help to figure this out as soon as possible and can send me proper tested procedure for this.
As you say you have installed the sql_serv55_nts version of the SQLServer libraries, this is your problem.
Instead install the TS (Thread Safe) version of the SQLServer libraries. XAMPP on windows runs Thread Safe.
The php5.dll is the Non Thread Safe version of php5ts.dll which is supplied with the XAMPP install of PHP.
Once you install the TS version of SQLServer libraries delete the php5.dll it is not required, also you got it from a source that you cannot be sure is safe. A simple rule of thumb If it was required it would have come with the XAMPP install.
NOTE: You should never need to copy anything related to Apache/PHP/MYSQL into the Windows system folders. If you do, when you come to install another version of XAMPP it will still be there and will cause you hours of debugging to find out why you are having odd issues.
ALSO: It is also dangerous adding anything XAMPP or WAMPServer related to the Windows PATH as this will also cause you issues when you come to update XAMPP/WAMPServer as you are bound to forget that this was done.
Try adding your php directory and your php extensions directory to your PATH environment variables.
I resolved issue in following way.
Install xampp with php 5.5
install microsoft re distributional package
download php5.ddl file from php5.dll
if window is 32 bit than just copy downloaded php5.dll into windows/system32
if you have 64bit window than you need to copy it into windows/SysWOW64 too.
best is to restart your PC
All done......

WAMP | Installing PDO drivers into PhP extensions

WAMP is relatively new ground to me. I have currently only done basic installations and vhosts configurations.
Issue
I am trying to get the PDO drivers installed on my WAMP server so I can connect to SQL Server Databases. From a previous question I asked it was determined i do not have the correct drivers.
Attempts
I have downloaded the drivers from here but I am still not sure which drivers I need to be using. My Apache and PhP build are as follows Apache/2.4.9 (Win32) PHP/5.5.12
I have installed the SQLSRV32.EXE downloaded from the Microsoft page and put it into the PHP extensions on WAMP. a lot of pdo options now show up but they have a red warning sign above them. even though i can see these with the red warning sign I continue to get PDO drivers not found error message when I try to connect to the database.
Resources
so you can see my current php_info I have pasted it into my chrome here
It's a common problem, and one I've solved for a few people recently. Make sure you check the following list to ensure you have put them in place:
Ensure both php_pdo_sqlsrv_54_ts.dll and php_sqlsrv_54_ts.dll are in your /ext directory.
Ensure the following lines are present in your php.ini file: extension=php_pdo_sqlsrv_54_ts.dll & extension=php_sqlsrv_54_ts.dll.
Ensure you have installed VC++ redist located here. Make sure you download and install the x86 version regardless of the architecture of your OS otherwise this will not work.
Check these things and come back to me with an answer.

Can't get MongoDB extention for PHP workign with new WAMP 2.5

I just updated from WAMP 2.2e (Apache 2.2.22, PHP 5.3.13, MySQL 5.5.24) to WAMP 2.5 (Apache 2.4.9, PHP 5.5.12, MySQL 5.6.17). I was using the mongo driver 1.5.0RC2 with WAMP2.2e, with no problem.
With the update, I went to grab the latest Mongo driver, grabbing 1.5.4. The problem is no matter which of the 4 drivers for PHP 5.5 I put into my ext folder, none of them work. They all give me a small warning icon in the WAMP PHP extension menu and won't turn on, and if I add it to php.ini and restart Apache, it doesn't show up in phpinfo().
I have no idea why its not working or how to diagnose what's wrong.
EDIT: Previously, I was getting the drivers from https://s3.amazonaws.com/drivers.mongodb.org/php/index.html. I just went to http://pecl.php.net/package/mongo/1.5.4/windows and downloaded the driver from there; this time, WAMP doesn't give me a warning icon, but PHPinfo still doesn't show me Mongo.
I was also facing the same problem. In my case, i just set mongodb bin"C:\Program Files\MongoDB 2.6 Standard\bin" path in environment variable then restart the wamp and now everything is working fine with 1.5.5
So I found out the issue was the latest driver. I was trying to use 1.5.4, kept saying 'The specified module could not be found'. I went down to 1.5.1 and it worked. I found posts suggesting older versions that did work for people, so I figured I can try downgrading. I had already tried 1.5.3 with no avail, so I kept going. 1.5.2 also failed, but 1.5.1 ended up working.

how to get mssql_connect to work on windows 7

I have mssql_* functions working on my Ubuntu installation and want to duplicate this on my windows 7 box. I have installed wamp on the win7 box, but I cannot get it to see the mssql_* functions. I have read many posts about nothing is working. I have the ext directory properly set. I have extension=php_mssql.dll do not see the mssql section in phpinfo, but I do see sqlsrv section. I would like my prod and test environment to match.
Thanks in advance for any assistance
Dean-O
I just checked my local wampserver 2.1 installation, and although there's an option to enable the php_mssql extension, it's missing from the extensions directory.
You can try the FreeTDS extension, which supposedly works fine under both *nix and Windows.
The Moodle wiki specifies that the Microsoft SQL Server driver has "known problems":
WARNING: This driver has known problems and is therefore not suitable
for any Moodle production servers.
and recommends the use of FreeTDS instead (by installing the php_dblib extension). Moodle is a known user of MSSQL, and a respected project, but they don't really specify what they mean by "known problems", so you can take this with a grain of salt...
http://docs.moodle.org/24/en/Installing_MSSQL_for_PHP
If FreeTDS doesn't work for you, you can try installing the official Microsoft drivers:
http://www.microsoft.com/en-us/download/details.aspx?id=20098

Cannot find php_sqlsrv extension - 5.3, threadsafe

I've followed the answer to this question to the letter:
Connection between MSSQL and PHP 5.3.5 on IIS is not working
I'm using XAMPP with threadsafe 5.3. I've copied the files to the extension directory (while leaving them in the /php folder) and I've added the extension lines:
extension=php_sqlsrv_53_ts.dll
extension=php_pdo_sqlsrv_53_ts.dll
When I do this, Apache fails to start, giving me errors in eventvwr like:
Application popup: Warning : PHP Startup: Unable to load dynamic library
'C:\xampp\php\ext\php_sqlsrv_53_ts.dll'
- The specified module could not be found.
Except, obviously, that that file DOES exist in that spot, and php.ini is pointed at that extension directory.
What's the problem?
Windows reports this when a shared lib dependency of what you're loading is missing. Use depends.exe to view the dependencies of php_sqlsrv_53_ts.dll and make sure it's either previously loaded or in the shared library search path.
http://www.dependencywalker.com/
See below url
php_sqlsrv.dll: gives error when checking PHP version but extension works
Read it:-
Since PHP 5.3, Microsoft has a new driver for windows :
http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx
Maybe you can try this version, which seems quite recent (06/2011)
Hope that helps !
Sadly, none of the answers addressed the issue or were avenues I had already explored.
I have decided to use the ODBC drivers with a SQL Server connection string, which seems to work fine, minus the fact I can't use MSSQL and SQLSRV native functions.
I have written a page that might help when installing the SQLSRV driver:
http://robsphp.blogspot.co.uk/2012/09/how-to-install-microsofts-sql-server.html
Unfortunately the instructions got complicated when MSFT removed the download for the old XP/2003 driver (version 2.0), so read the whole page before starting.
Wrong technology, but I was having problems getting WAMP to connect to MSSQL, with the same types of errors.
I fixed the problem by installing the 32-bit version of WAMP (instead of 64, even though we were on a 64-bit system).
Even if that's not applicable to the OP, I hope someone finds this helpful!
I was getting the same error messages when I started the Drupal 7 stack after installation. I am using VM Ware with Win 7 x64 and acquia-drupal-win-7.31.36-6159.54300.
I went to the PHP site http://php.net/manual/en/sqlsrv.requirements.php and installed the x64 Package.
steps
1) Stop Drupal Stack
2) run the file: sqlncli.msi
3) restart Drupal, and no error messages.

Categories