whenever I initiate my localhost webpage, it returns me
Call to undefined function pg_connect()
And i found out the am missing the php-psql on it. Now, how can i install it on windows as all the threads regarding that are on a Ubuntu environment.
I too had the same issue where pdo_pgsql and pgsql were not loading in PHP 7.1.8 even though I had the latest PostgreSQL 9.4.6 and Apache 2.4.26 on Windows Server 2016. The solution was pointing Apache's httpd.conf to the correct libpg.dll in PostgreSQL/bin folder. Then the modules loaded correctly in PHP 7.
See pgsql extension is not loading
Related
I followed a few steps from http://caseymorford.com to install the OCI8 extension. The only issue was that the install-path on success was different. So i copied the oci8.so file to the right folder.
After restarting Apache and running some php, i still get the message:
Call to undefined function oci_connect()
Is there some other way to download a complete > PHP5.4 version with a build in oci extension?
I have a Drupal site running on fresh MAMP PRO 3.0.3 install with the PHP version 5.3.28 on OS X Mavericks 10.9.2.
I installed memcache with pecl install memcache and added the extension=memcache.so line in php.iniunder the extensions section, but still Drupal shows multiple You must enable the PECL memcached or memcache extension to use memcache.inc. errors on top of the page.
phpinfo() on the Drupal root directory tells me that the configuration file loaded is at:
/Library/Application Support/appsolute/MAMP PRO/conf/php5.3.28.ini
and the extension dir is:
/Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/
$ cat "/Library/Application Support/appsolute/MAMP PRO/conf/php5.3.28.ini" | grep memcache
extension=memcache.so
$ ls /Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/ | grep memcache
-rwxrwxr-x 1 user admin 65K Mar 28 14:00 memcache.so*
What am I doing wrong or is this problem related to MAMP PRO 3? I've installed the memcached binaries with homebrew and the process is running.
I'm also using the Individual PHP versions for every host setting in MAMP.
When starting Apache, there is an error in the logs:
PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/memcache.so' - dlopen(/Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/memcache.so, 9): Symbol not found: _zend_new_interned_string
Referenced from: /Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/memcache.so
Expected in: flat namespace
in /Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/memcache.so in Unknown on line 0
What does this mean.
Thanks for your help!
I did not get the memcache extension provided by pecl to work at all. I even installed PHP 5.3.14 but encountered the same problem. Then I cloned the php-memcached-mamp repository from github and used the memcached extension from there and it worked ok.
Add intl extension to your configuration.
I just found this problem and another post that helped me fix it. macports installed php-config53 (not php-config) and I had a vagrant php-config from an old php 5.4 install. Removed /usr/bin/php-config and symlinked php=config53 -> php-config, re-rean pecl install memcache-beta and it worked.
I am working on a Windows 7(x64) with Apache 2.4 x86, Php54 x86
and MySql 5.6 x64.
PHP is working well on my Apache Web Server.
When i run PHP from CommandLine : php dbTest.php it runs without problems
but when i try to load my page, i get the error Fatal error: Call to undefined function mysqli_connect() in <path to dbtest.php> on line 3
tried installing PHP 55 but nothin...
Tried putting libmysql.dll in (php dir, win/system32, apache bin)
installed VC71 runtimes (because i saw it in a troubleshooting guide)
Edit:
- also tried installing all x64 (Apache and PHP)
- tried to install Apache v2.2 and PHP v5.3,
Nothing works...
how come running the command-line works but through Apache, it isn't working?
i see mysqlnd listed, but not mysql/mysqli, as if mysqlnd was the module...
Thank you for your time.
and for saving me the last few hair i have!
PHP 5.4 comes with mysqlnd installed by default so you shouldn't need libmysqli.dll
Does phpinfo() list a mysqli block?
You need this file in ext directory php_mysqli.dll
I have been trying to install memcached on an ubuntu server and I followed a lot of tutorials over the internet. I am using 32-bit ubuntu 12.04, php version 5.4.7, xampp server 1.8.1 which are all 32-bit versions. In the end, I followed the tutorial in the below link and I installed all the things listed with no error.
http://stevelove.org/2009/09/30/how-to-install-php-memcached-on-an-ubuntu-server/
The only problem I have is that when I installed memcached using "sudo pecl install memcached" command, the extension couldn't be added to php.ini file. Then I used phpinfo() to learn which php.ini file I am using and added extension=memcached.so to the ini file. When I restarted xampp server, php.ini file doesn't work and it tries to download the pages. In the php error log, I get this error.
[30-May-2013 16:42:48 UTC] PHP Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/memcache.so' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
Since I couldn't enable the extension, even though memcached is listed as installed with php -m command, I get Class memcached not found error when I try to execute my php code.
Can someone please help me with this issue?
Maybe because you installed the server but not the extension, try
sudo apt-get install php5-memcached
ps: memcache != memcached
Firstly, thank you for your answer Mohammad. I know that memcache is not memcached and as I said, when I list modules, memcached seems installed (not memcache) but when I use phpinfo(), memcached is not listed.
It turns out that even though I installed memcached, problem was xampp installation. I removed lampp and php5 installed in ubuntu and purged everything I installed. Then I installed xampp with development packages and re-installed libmemcached etc. It works fine now.
If there is anybody having similar problem, I can explain in detail.
I need the MongoDB PHP driver on my CentOS 5.4 machine. My PHP version is 5.1.6. I downloaded the RPM and installed it. That created several files in /usr/bin directory. I copied
/usr/bin/mongo
to
/usr/lib/php/modules
which was what extension_dir showed on doing phpinfo();.
I also added
extension=mongo.so
in /etc/php.ini.
However on executing my PHP script, i still get
Mongo class not found.
What's going wrong here ?
Also, my phpinfo() shows PHP version 5.1.6 whereas running PHP from command line shows 5.3.3. Could anything be wrong with that ?
Thanks in advance.
You're saying your webserver and command line PHP report different versions. These are going to be installed in different locations, and their extensions are API incompatible with each other.
When you installed the php_mongo extension, it may have used the command line php to determine the directory to install the extension to.
Make sure you have the correct php_mongo for the php version of your webserver, and it is in the correct extensions directory. (get the directory from the php.ini returned by phpinfo())
I hope you realise PHP 5.1 is also many years out of date. Unless you have a specific reason to use a version that old, you should also look at upgrading to a more recent version.
Edit:
Just read your comment "I must also mention that /usr/bin/mongo is a binary executable file but its not having a .so extension. Im copying it as is to /usr/lib/php/modules"
No no no! :)
This is the mongo command line client. This is not the PHP extension!
You can run a find /* -name "mongo.so" to see where the installer put the file, this will probably also give you an indication of which version of PHP it was installed for.
It looks as though you are confusing the RPM-packages for the MongoDB server with the requirements to install the MongoDB PHP driver. The PHP driver provides access to the server from your PHP applications, and does not install any command line tools.
restart httpd !
yum service httpd restart