I use ubuntu server and installed default LAMP package
I run ldap query with php however I get following error message ;
Fatal error: Uncaught Error: Call to undefined function ldap_connect()
in
I insert extension=php_ldap.so and extension=ldap.so paramater in php.ini file
however, I want to install php ldap package i get following error message;
php7.0-ldap : Depends: php7.0-common (= 7.0.4-7ubuntu1) but
7.0.4-7ubuntu2 is to be installed
so, I can't install this package
How can I enable ldap package for php7.0?
How can I enable ldap extension for php7.0?
I solved this issue, download files php7.0-ldap_7.0.4-7ubuntu2_amd64.deb from https://mirror.umd.edu/ubuntu/pool/main/p/php7.0/ and install manuel via dpkg
Related
My goals is to be able to use the PHP functions for parsing YAML detailed in the PHP docs:
http://php.net/manual/en/ref.yaml.php
To install the PECL yaml extension I've opened Terminal and typed:
brew install libyaml
Then
sudo /usr/local/php5/bin/pecl install pecl_http
Then
sudo /usr/local/php5/bin/pecl install yaml
But I think it fails to install the PECL yaml extension. It says:
3 warnings and 16 errors generated.
make: *** [yaml.lo] Error 1
ERROR: `make' failed
And when I try to use yaml_parse_file() in my program, it says:
Fatal error: Call to undefined function yaml_parse_file()
How do I properly install the PECL yaml extension so I can use the PHP functions for parsing YAML?
I had similar issue and below steps helped me.
First be sure you have installed yaml extension (as I know since brew will not help us for packages so better to use pecl)
Even though some errors (such as failed for mkdir) occurred during installation it was completed.
pecl install yaml
Next open your php.ini file and add this line according to your path to yaml.so file.
extension=/usr/local/Cellar/php70-yaml/2.0.0/yaml.so
Hope it helps..
I want to use PHP's ftp_ssl_connect() on my Mac, but I'm getting an error message that the function is not available:
PHP Fatal error: Call to undefined function ftp_ssl_connect()
I've installed Apache and PHP through MacPorts. I'm using PHP version 5.5.23. I've added FTP and OpenSSL support by running:
port install php55-ftp php55-openssl
I've already tried restarting Apache. In PHPInfo() it does say my install supports both FTP and OpenSSL, but still I'm getting the error message above when trying to use ftp_ssl_connect().
How can I enable this function on my machine?
I want to install php5 on my mac using macports. It throws the following error on terminal:
Attempting to fetch php5-5.3.12_0+apache2.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/php5
Error: org.macports.archivefetch for port php5 returned: Failed to verify signature for archive!
Please see the log file for port php5 for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_php5/php5/main.log
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: Processing of port php5 failed
What should I do?
I try to install Solr PHP extension to my webserver. I already have an XAMPP server and I'm using PECL to install solr
$ cd /opt/lampp/bin
$ sudo ./pecl install solr-1.0.1
But I got the following error:
checking libxml2 install dir... /usr/lib
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.
ERROR: `/tmp/pear/temp/solr/configure --enable-solr=yes --enable-solr-debug=no --with-curl=
/usr --with-libxml-dir=/usr/lib' failed
During the installation it prompts me to input a path:
libxml2 install prefix [/usr] :
I have tried with enter and the /usr/lib
What shall I input there to not get an error? Or how shall I install to not get an error?
Now I have libxml2 installed through yum install libxml2-devel. But I got some wierd errors now. Here are just a few of them, it ends with:
no such parameter
/tmp/pear/temp/solr/solr_types.h:388: error: declaration for parameter 'client_count' but no such parameter
/tmp/pear/temp/solr/solr_types.h:386: error: declaration for parameter 'document_count' but no such parameter
/tmp/pear/temp/solr/solr_types.h:384: error: declaration for parameter 'request_count' but no such parameter
/tmp/pear/temp/solr/php_solr.c:1185: error: expected '{' at end of input
make: *** [php_solr.lo] Error 1 ERROR: `make' failed
If you're using RHEL/Fedora/CentOS/Scientific linux then you need to install libxml2-devel
yum install libxml2-devel
I could easily install PECL Solr via my systems package manager, probably this works for you as well. I found it very easy so probably worth to share (Fedora 14):
$ sudo yum install php-pecl-solr
A little later I got php-pecl-solr-0.9.11-1.fc14.x86_64 installed, the package's fedora homepage is here.
I could locate the libxml2 version with this command:
$ locate libxml2.so
probably this is helpful as well.
Some useful links:
http://projects.mediashelf.us/projects/8/wiki/Setting_up_Fedora_and_Solr_for_use_with_ActiveFedora#Install-Solr
http://oxfordrepo.blogspot.com/2008/01/populating-search-engine-apache-solr.html
I'm trying to connect to my LDAP server via PHP, but I get the following error:
Fatal error: Call to undefined function ldap_connect()
Any help would be very appreciated.
Thanks in advance,
roshan
Make sure the LDAP extension is installed and enabled. This answer assumes you have PHP5, however, things should work similarly for PHP7 as well.
Install LDAP Extension
There should be a package named like php5-ldap:
aptitude show php5-ldap
Paquet : php5-ldap
...
Description : LDAP module for php5
This package provides a module for LDAP functions in PHP scripts.
Thus, the package can usually be installed like:
sudo apt-get install php5-ldap
If you do not use apt-get, use the equivalent command for the package manager you use.
Enable LDAP Extension
To enable the package after installation, you can use this command:
sudo php5enmod ldap
If you get any error message from the above command, it means something went wrong.
Note: After enabling the package, you usually have to restart / reload services so that the newly enabled module is recognized. For apache, you can do this by:
sudo service apache2 restart
If you do not use apache, please use the equivalent command for your server.
sudo apt-get install php5-ldap
And don't afraid to google.