I installed XAMPP 1.7.4(VC6) from this link:
http://www.apachefriends.org/download.php?xampp-win32-1.7.4-VC6-installer.exe
The XAMPP 1.7.4 contains:
Apache 2.2.17,
MySQL 5.5.8,
PHP 5.3.5
Then, I installed PostgreSQL 9 (64bit).
It's very simple to enable PHP and PostgreSQL connection - just uncomment extension=php_pgsql.dll and extension=php_pdo_pgsql.dll in the php.ini file.
But, I got an error when starting Apache:
Can anybody help and explain?
May be you can fix it with follow this instructions.
If the above doesn't work, try copying the libpg.dll file from your PostgreSQL installation folder over to your apache/bin folder
I had the same problem. I just copied the lib*.dll files from pgsql/lib/ directory to the apache /bin directory. It worked fine.
Simply navigate to your Postgresql/psqlODBC/0900/bin and copy all contents here to your xampp apache/bin directory, then restart Apache. This worked on my xampp 1.7.4.
Related
I'm installing PHP, Apache and PostgreSQL Manually
PHP and Apache now is connected, but PostgreSQL is not connected to PHP.
i test by using phpinfo();
i also configure in php.ini like this :
extension=php_pgsql.dll
extension=php_pdo_pgsql.dll
But why it's not work.
Thanks
This tutorial worked for me:
The PHP extension will look for libpq.dll which is found of your
PostgreSQL installation. The simple fix is to add the path than
contains that file to your environment PATH.
I had the same issue with PHP7 and Apache 2.4 on Windows 10. For me the solution was to add the following line to httpd.conf;
LoadFile "C:/php7/libpq.dll"
This also means that it's not required to have PostgreSQL installed if you just want to connect a PostgreSQL database that's not running on your machine.
1) Installing PostgreSQL for Windows
2) add to your enviroment variable "PATH" the bin folder of PostgreSQL installation:
C:\Program Files\PostgreSQL\9.2\bin; (for example)
Assuming you have installed PostgreSQL and your WAMP installation is on c:\wamp, you will need to copy
c:\wamp\bin\php\php5.3.9\libpq.dll to c:\wamp\bin\apache\Apache2.2.11\bin
Make sure you also have the following files
C:\wamp\bin\php\php5.3.9\ext\php_pdo_pgsql.dll and
C:\wamp\bin\php\php5.3.9\ext\php_pgsql.dll
Also, make sure you have enabled the above 2 files as extensions, either via the WAMP menu (click on WAMP icon on taskbar, PHP, PHPExtensions, find the above 2 and 'check' them)
Please note that php5.3.9 and Apache2.2.11 refer to my specific PHP and Apache versions.
Adjust those to suit your installation.
That's it!
This worked for me on Windows:
Found php.ini in php folder.
Found this line and removed “;”.
;extension=php_pgsql.dll
in my case there are 2 php.ini, I had to uncomment extension pdo_pgsql in both php.ini
in php folder
in apache folder
both inside in wamp folder
If you are using PHP in IIS, using PHP Manager, enable this extension:
php_pgsql.dll
I'm trying configure XAMPP to use with MSSQL. I'm following this: Example but I still had success.
I copied the files: php_pdo_sqlsrv_54_ts.dll and php_sqlsrv_54_ts.dll to folder c:\xampp\php\ext and configured php.ini in c:\xampp\php\php.ini.
In php.ini I activated the extensions: extension=php_pdo_sqlsrv_54_ts.dll and extension=php_sqlsrv_54_ts.dll and created PDO section. [Pdo_sqlsrv]
pdo_sqlsrv.log_severity=-1.
I am using XAMPP v3.2.1 and PHP 5.6.11
How could I make this works ?
For PHP5.6 vou need download SQLSRV32.EXE, after it put the php_pdo_sqlsrv_56_ts.dll and php_sqlsrv_56_ts.dll on ext folder and finally register those extension on php.ini, like this:
extension=php_sqlsrv_56_ts.dll
extension=php_pdo_sqlsrv_56_ts.dll
Restart apache and try phpinfo()or you could use getAvailableDrivers()
<?php
echo "<pre>";
print_r(PDO::getAvailableDrivers());
After a long time...
I am 3 days with this problem, with me only resolved after adding the correct versions of the PDO driver on this link.
My windows is 64x, but the XAMP is 86x. I only noticed after running phpinfo()
Note that the version you must add to the \ext folder is not the operating system version but rather the xamp installation, just like the image below:
i want to install 'intl PHP extension' on my WAMP. i am running Wamp on windows.
i have looked online but cannot find any guidance on how to do this. does anyone have any ideas.
on wamp icon click on php -> php extensions -> php_intl then restart the server
According the the comment this is the content
In both XAMPP and WAMP, the mbstring extension is working by default.
In XAMPP, intl extension is included but you have to uncomment
extension=php_intl.dll in php.ini and restart the server through the
XAMPP Control Panel.
In WAMP, the intl extension is “activated” by default but not working.
To make it work you have to go to php folder (by default)
C:\wamp\bin\php\php{version}, copy all the files that looks like
icu*.dll and paste them into the apache bin directory
C:\wamp\bin\apache\apache{version}\bin. Then restart all services and
it should be OK.
Hope it helps
Update: Looks like I am not doing anything wrong here. When I execute a thread example, it works fine. I am not sure, then why am I getting those errors when I start Apache.
Any ideas?
I am trying to install pThread on Xampp (Windows 7) as follows:
My PHP version information: 5.4.7 VC9 x86
I have downloaded php_pthreads-0.0.45-5.4-ts-vc9-x86.zip
Then I added pthreadVC2.dll to C:\xampp\php and php_pthreads.dll to C:\xampp\php\ext
In php.ini, I have added extension=php_pthreads.dll
Restarted Apache server and received following error:
Any suggestions on why this is not working?
I do not use Windows, but according to the people commenting in the manual, you must also add:
LoadFile "C:/xampp/php/pthreadVC2.dll"
to your httpd.conf (httpd-xampp.conf the manual mentions)
Here is what I did and works for me:
Check your PHP's compiler version using phpinfo() as you have already done. Mine and your both is VC9
Download and install proper Pthread package that matches your compiler version. I downloaded "php_pthreads-0.0.45-5.4-ts-vc9-x86.zip" file. Make sure your OS version also mathes (32-bit or 64-bit).
Extract Zip file in a temp folder
Copy php_pthreads.dll to the 'bin\php\ext\' folder
Copy pthreadVC2.dll to the 'bin\php\' folder
Copy pthreadVC2.dll to the 'bin\apache\bin' folder
Copy pthreadVC2.dll to the 'C:\windows\system32' folder
Open php\php.ini and add "extension=php_pthreads.dll" without quotes at the end of file
Restart server and you won't get any error message.
Good luck
copy "pthreadVC2.dll" file to "windows/system32" directory.then restart apache. It worked for me.
Update: The problem appears to have been corrupt DLLs somewhere in my PHP installation, or possibly a bug in PHP 5.2.9 on Win2k. I downloaded the windows (binaries-only) distribution of PHP 5.2.10 from php.net and extracted that to my c:\PHP directory. After doing that, everything worked fine.
Update2: I undid everything that I tried earlier (everything from the bulleted list below), except that I left "extension=php_curl.dll" uncommented in my php.ini file. It turns out that is all you should have to do in a proper installation.
I'm trying to get CURL to work on a Windows installation of PHP (version 5.2.9-2), and I am at wit's end. I have found the PHP CURL installation page, this SO question which references this page, and this SO question. I've tried most of the suggestions in all of those pages but I still get an error. Here is my very simple test page:
<?php
$ch = curl_init();
?>
<b>Success!</b>
This gives me:
Fatal error: Call to undefined function curl_init() in C:\ApacheRoot\curltest.php on line 2
In my Apache error log I get this each time the server starts:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\PHP\\ext\\php_curl.dll' - The specified procedure could not be found.\r\n in Unknown on line 0
I have done the following:
Uncommented the following line in php.ini: extension=php_curl.dll
Copied ssleay32.dll and libeay32.dll from C:\PHP to C:\WINNT\System32
Downloaded cURL for Win32 from curl.haxx.se and extracted the .zip file to C:\cURL
Added C:\cURL to my system PATH environment variable.
Verified that:
php.ini includes extension_dir="C:\PHP\ext"
The directory C:\PHP\ext contains php_curl.dll
The only php.ini file on my system is in C:\PHP (i.e. especially that there is no C:\WINNT\php.ini)
The Apache httpd.conf file includes the line PHPIniDir "C:/PHP/"
I have also rebooted the machine (several times, in fact...).
You don't have to reboot the computer, just restart the apache and the php module will read the new ini.
Did you change the correct php.ini? In case of doubt
<?php echo 'php.ini: ', get_cfg_var('cfg_file_path'); ?>
can tell you.
Is there something in the error.log of the apache that indicates that something went wrong while loading php and the php_curl.dll?
Did you start the apache as a win32 service? If you did try to start it as a console application. Error messages will show up on the console then. Or start it as a service and take a look at the error.log file and the windows event log (start, run, eventvwr.msc /s).
edit:
"The specified procedure could not be found"
You need a dll that is compatible with your php version and build. Exactly what did you install and where did you get it from?
Try this:
Stop WAMP completely.
Find your WAMP folder: C:\Path\To\WAMP\bin\Apache\ApacheVersion\bin\
Edit that php.ini and uncomment extension=php_curl.dll
Restart WAMP.
That should hopefully solve it.
*EDIT: Do the same thing # C:\Path\To\WAMP\bin\php\PHPVersion\
This is what worked for me
Answered by Soren from another SO thread - CURL for WAMP
"There seems to be a bug somewhere. If you are experiencing this on Win 7 64 bit then try installing apache addon version 2.2.9 and php addon version 5.3.1 and switching to those in WAMP and then activating the CURL extension. That worked for me."
This fixed it for me:
Go to here:
http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/
Download 'php_curl-5.3.13-VC9-x64.zip'
Stop WAMP Server from Running
Extract the file 'php_curl.dll'.
On your local machine, browse to (or where your WAMP installation is found) c:\wamp\bin\php\php5.3.13\ext
Rename php_curl.dll to php_curl.dll.old (or whatever you choose) and then copy the new file into the above directory.
Restart WAMP Server
All should be working ok now.
I had the same problem with php-5.5.26-Win32-VC11-x64 (on Windows) and I tried everything listed here with no luck. Finally I got it working by adding PHP installation directory to windows Path.
With PHP 5.6.9 on Windows Server Core 2012 x64 cURL was not working, not showing up in phpinfo despite uncommenting php_curl.dll extension in my php.ini and restarting the Apache 2.4 service. Added the php path and the php\ext path to my $evn:path. No joy.
Fix: I didn’t need to download any other php_curl.dll file and couldn’t find one for PHP 5.6 anyway. What finally worked was to copy these three files into the Apache24\bin folder then restart Apache:
libeay32.dll
libssh2.dll
ssleay32.dll
Copying these to System or System32 was not needed.
If the problem persists after you uncomment the module from both php.ini files (that people are already talking about and which are located on apache folder and php folder) and even after you check that you got the php_curl.dll ** at
C:\WAMP\bin\php\php5.3.13\ext
YOU SHOULD TRY TO REPLACE THE ORIGINAL DLL THAT COMES WITH WAMPSERVER with one from this website:
http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/
My problem was there!
Hope it helps.