Hi i am trying to connect postgres server with PHP onm windows with xaampp. I have enabled the extension php_pgsql.dll in php.ini. I have also give the libpq.dll path to httpd.conf.
But still i am getting error Fatal error: Call to undefined function pg_pconnect() Any solution
I used postgres9.2 bin folder and load the libpq.dll in httpd.conf It solved my problem. I think there is some version compatibility first i was using 9.4 postgre bin files which was not working.
I added this line to Loadfile "C:\Program Files\PostgreSQL\9.2\bin\libpq.dll" httpd.conf
And remove ; from extension=php_pgsql.dll
After restarted the sever solved my problem.
Related
I use laravel5.1 and it works fine on php cli.
But i publish my porject to apache(version == 2.4), the problem happened.
FatalErrorException in Encrypter.php line 67:
Call to undefined function openssl_encrypt()
First make sure you installed the openssl extension (spotted by deceze), then:
Go to your php.ini file
Remove the semicolon before extension=php_openssl.dll
Restart your Apache
I'm expecting this to be the problem.
I solved same issue by copying libeay32.dll and ssleay32.dll from PHP root folder to Apache/bin folder and then restarted Apache.
If you using the Wamp server then it's happens. In Xampp server there is no need to uncomment php_openssl.dll.
To solve this Remove the semicolon before
extension = php_openssl.dll
in php.ini
as most point out, you need to uncomment openssl extension in php.ini.
I was struggling with the same too and i realized php is looking for extensions in "c:\php", but mine was a xampp installation.
Pointing extension_dir in php.ini to correct php extension path; in my case "c:\xampp\php.7\ext" solved the issue.
Hope that helps somebody.
Follow the below steps:
In PHP 7.4.3 duplicate "php.ini-development" file and rename it
to "php.ini"
Then, remove the semi-colons in front of "extension=openssl",
"extension=mbstring", and "extension_dir = ext" inside the "php.ini" file.
This worked for me and I hope it helps someone else.
I am using wampserver and i had the same problem. Openssl was enabled in php.ini but there is another ini called phpForApache which has a line to enable openssl too. It worked for me.
I'm using nginx, and my nginx installation contained a PHP folder, something like below:
C:\Users\myusername\Downloads\nginx\php\php.ini
I moved the nginx above to the root directory of C:\ and it solved the problem.
Just run the composer update command from Laravel installation directory And 02. make sure extension=php_openssl.dll is enabled in php.ini
Restart Apache Server
On Windows
Open php.ini and change path where are locate php ext
extension_dir = "C:\php\ext"
I know there's tons of topics about my problem, but I can't find a solution.
I'm using wamp and I've changed my version of PHP from 5.5.12 to 5.6.16, then when I go to localhost/phpmyadmin i have this error displayed :
Fatal error: Call to undefined function mb_detect_encoding() in
C:\wamp\apps\phpmyadmin4.1.14\libraries\php-gettext\gettext.inc on
line 177
So I update phpMyAdmin from 4.1.14 to 4.5.2.
And I have this **** error:
phpMyAdmin - Error The mbstring extension is missing. Please check
your PHP configuration.
My php.ini, phpForApache.ini is configured, I have un-commented the extension, set extension_dir to C:\wamp\bin\php\php5.6.16\ext, I stumbled on many topics/forum but none of the solution works.
Do you have any idea?
Please check #36254548
Copying the php.ini file to "wamp64\bin\apache\apache2.4.17\bin" has solved my problem.
Sometimes the extensions directory is well pointed to, the dll files have been uncommented but it still doesn't work.
The next solution to use, that is if your extensions directory is correct and dll files for the mbstring has been uncommented, then copy the php.ini file and paste it into the windows directory (i.e. C:\Windows).
You then restart your wamp/xampp and it will work.
check your php.ini file. In the extensions part of the configuration you should find:
;extension=php_mbstring.dll
remove the leading ';' to uncomment and enable the extension so it looks like this:
extension=php_mbstring.dll
restart your apache and it should work.
I faced the same issue when I start wamp, suddenly my project was not working and when I check the phpmyadmin, it gives the same above error.
My debugging process found php.ini file is missing. However I already installed two PHP versions, 5.6.19 and 7.0.4. I changed the version to 7.0.4 and then re-changed to 5.6.19. It started work.
What I guess, while changing the version, all the configuration files getting re-installed in wamp folder.
I have followed this tutorial for installation of php, mysql, apache and phpmyadmin :http://www.youtube.com/watch?v=kZ2zbO6PABk
and towards the end when he tried to access phpmyadmin he got the following error but resolved it :
Fatal error: Call to undefined function mb_detect_encoding() in
C:\Apache24\htdocs\phpMyAdmin\libraries\php-gettext\gettext.inc on
line 177
I am now still having issue. Like this question:
Fatal error: Call to undefined function mb_detect_encoding()
I have also made sure ive uncommented out and unblocked the following extensions:
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_exif.dll
extension=php_mysql.dll
extension=php_mysqli.dll
What else am I missing?
added PHPINIDir "C:\php" in http.conf and it now works
I faced this problem too. The problem is that settings in PHP.INI is no incorrect. Mysql is not longer enabled by default. you got to enable the dll in the PHP.INI among other dlls.
http://www.hirokoymj.com/Install_phpMyAdmin.php
These are some of the dlls that you have to uncomment in php.ini
curl, gd2, mysql, mqsqli, mbstring, pdo_mysql, phar, soap, zip
It works like a charm after having changed the settings!
On my install I found that the 4 instructions lines above the 'extension_dir="C:/..." entry in the php.ini file were not properly commented out. So nothing after that in the config file seemed to work. Including the set path to the extension_dir. So the mbstring.dll wasn't loading. I added semi-colons to comment them out, restarted Apache, and Viola! The hirokoymj.com page listed above was a big help!
(I'm running Apache 2.2 and PHP 5.4.14)
I'm having problems enabling cURL with PHP. I uncommented the extension=php_curl.dll line in php.ini and made sure that the dependencies libeay32.dll and ssleay32.dll exist in the path. I also restarted Apache. However, when I run phpinfo() I do not see a cURL header and trying to call a cURL function results in the following error:
Fatal error: Call to undefined function curl_init() in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\boxproject\php\lib\Box_Rest_Client.php on line 114
Does anyone see any problems with this process? Are there more ways to troubleshoot the problem? Thanks a lot for the help.
Step1: Uncomment the php_curl.dll from php.ini
Step2: Copy the following three files from php installed directory to the bin directory of Apache
libeay32.dll, libssh2.dll, ssleay32.dll
Step3: Restart apache.
I downloaded and installed PostgreSQL 9.2.3, which came with Stackbuilder.
I used the PostgreSQL Stackbuilder to install Apache (2.2.22) & PHP (5.4.5).
Now I'm trying to connect to a database with PDO, but I'm getting a driver not found error.
I've un-commented the extension=php_pgsql.dll & extension=php_pdo_pgsql.dll in my php.ini file.
My phpinfo(); function shows that they're enabled.
The main thing I'm noticing is that within my php\ directory there's no ext\ directory with these files. I would have assumed that these files would have been automatically installed to a php\ subdirectory.
Where could these extensions be stored; do I need to designate an absolute path for php to find them?
UPDATE:
So I went into php.ini and turned on Startup Errors. When I launch the commandline php.exe I get errors stating that php_pgsql.dll & php_pdo_pgsql.dll can't be found.
It looks like they're trying to reference them on a D: drive, which I don't have. I installed everything to the same directory on the E: drive. I can't find the extensions anywhere (and neither can php).
In Wamp (windows)...
copy C:\wamp\bin\php\php5.x.xx\libpq.dll
paste in C:\Windows\System32\
on Wamp, there are 2 php.ini files, you will have to check if the Postgresql extension is on both!
The extension line is
extension=php_pdo_pgsql.dll
So check on
C:\wamp\bin\apache\apache2.4.9\bin\php.ini
Also check on
C:\wamp\apache\apache2.4.9\bin\php.ini
After adding the extension line, restart Apache and it will work.