How to configure option --with-libdir with PHP5.5 - php

I'm building PHP5.5 with ldap support.
I've a 64bits system, so my libs are into /usr/lib64
So when I build PHP I add the following option: --with-libdir=/usr/lib64
But When I run the configure tool, I get the following error:
configure: error: Cannot find ldap libraries in /usr//usr/lib64
Anybody know how absolute path works for these options?

If you already have libraries in right dir, and you set the right --with-libdir
Try install -devel version

You can kind of see the issue from the error. It's already looking in /usr, so you just need to put:
--with-libdir=lib64

Related

PHP Memcached with WHM Centos 6.5, PHP 5.5.16 and Apache 2.4

I'm seriously loosing my patience with this one.
I tried to install PHP Pecl Memcached on the server with the above spec using the following approach:
Software > Module Installers > PHP Pecl
search for memcache
Installed first the memcache 3.0.8, which went all fine, but then trying to install memcached 2.2.7 I get error saying:
configure: error: no, sasl.h is not available. Run configure with --disable-memcached-sasl to disable this check
ERROR: `/root/tmp/pear/memcached/configure --with-libmemcached-dir=no' failed
The memcached.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20121212
Tidying /usr/local/lib/php.ini...
No changes
Tidying /usr/local/cpanel/3rdparty/php/54/etc/php.ini...
No changes
Any idea what I need to do to make it work?
Please refer this link, seems to be some problem with the location of memcache.so object file
The Error Message is clear. You need the cyrus-sasl-devel package installed.

can not find SoapClient in php

I got this error saying:
Fatal error: Class 'SoapClient' not found in ....php file. Do I have to install/include the SoapClient manually? Isn't it a builtin php module?
Update:
If I am using wordpress, how can I get soapclient installed?
Thanks.
It depends on how you installed PHP.
If PHP was built from source, you have to rebuild it with the --enable-soap option per http://php.net/manual/en/soap.installation.php.
If you installed a binary package via a package manager in your distro, check if you can find any php5-soapclient-packages or similar and install those.
Tested on Debian wheezy, php5-cli includes SoapClient() by default.
No, it isn't installed by default. You need to install PHP with --enable-soap option.
Read more here http://php.net/manual/en/soap.installation.php

Fatal Error: ezSQL_mysql requires mySQL Lib to be compiled and or linked in to the PHP engine

I'm attempting to get the link shortening PHP scripts YOURLS working on my basic web server running Lubuntu 12.04.
I have a MySQL database created and PHP5 installed. When I attempt to access the administration interface for YOURLS in a browser, I am presented with the following message:
Fatal Error: ezSQL_mysql requires mySQL Lib to be compiled and or linked in to the PHP engine
I'm very new to MySQL and PHP, so I don't know how to approach this problem. Could you point me in the right direction on this?
(For a quick guide to setting up YOURLS, you can see this video to get the general idea.)
You need to ensure that the MySQL extension is loaded into PHP.ini, and has been compiled into PHP as well.
Install mysql-devel and php-mysqli packages
yum install mysql-devel php-mysqli
Names can change a bit as Ernest show's in his answer.
If you have installed your php server and mysql through yum, try to use yum to search for the relevant package.
For example, if you used "yum install php55", try "yum search php55", then look for something like "php55-mysqld". If found, install it "yum install php-mysqld". That will install the required module for PHP to interact with your mysql.
Installing all php packages and its dependencies worked for me.
yum install php-*
finnaly i Found the solution
just change this line > class ezSQL_mysql extends ezSQLcore in ez_sql_mysql.php
to class ezSQL_mysqlx extends ezSQLcore
:)

php configuration cannot find -lmysqlclient

I'm trying to configure a PHP installation (5.4.3) with MYSQL (5.0.91) for use with a PHP web application that relies on the MDB2 mysql module. When I install using PEAR, pear tells me that PHP does not have the required mysql extension.
Some googling around lead me to check the PHP.ini file, in which I found that extension=php_mysql.dll was commented out. I turned this on and restarted php. PHP complains that it can't find php_mysql.dll.
I realized that this might have been because I didn't install php with the --with-sql flag turned on. Reconfiguring leaves me with the following error:
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... /project/mullenl
checking for mysql_close in -lmysqlclient... no
checking for mysql_errno in -lmysqlclient... no
configure: error: Try adding --with-zlib-dir=<DIR>. Please check config.log for more information.
A quick look at the configuration log shows the problem:
/usr/bin/ld: cannot find -lmysqlclient
When I check my lib directory in my mysql installation the following things are present:
libdbug.a
libmysql.imp
libmysqlclient.so*
libmysqlclient.so.15.0.0*
libmysqlclient_r.so*
libmysqlclient_r.so.15.0.0*
libmysys.a
libndbclient.la*
libndbclient.so.2*
libmygcc.a
libmysqlclient.a
libmysqlclient.so.15*
libmysqlclient_r.a
libmysqlclient_r.so.15*
libmystrings.a
libndbclient.a
libndbclient.so*
libndbclient.so.2.0.0*
I'm not too sure what to do next, but really need to configure PHP in this way to support the MDB2:MYSQL module. I suspect (?) that the reason I can't do this is because I don't have the development version of MYSQL installed, but I'm not sure this is the case. Any thoughts, ideas or advise would, as always, be greatly appreciated!
The php_mysql.dll extension is only used on Windows, it looks like you are on Unix/Linux.
If you view your phpinfo(), what are your configure options?
You can build mysql into PHP by adding --with-mysql=mysqlnd to your ./configure options.
If you have a custom version of mysql that is compiled on the system, then specify the path to where it is installed instead of using the mysql native driver (mysqlnd) --with-mysql=/usr/lib

How to add Solr PECL extension into lampp (xampp) stack

Is it possible to add PECL extensions into a lampp stack? If so, how can it be done?
I am specifically interested in http://www.php.net/manual/en/book.solr.php extension.
EDIT: when installing this extension using:
/opt/lampp/bin/pecl install -f solr
everything seams to go as it should except at the end:
checking for cURL support... yes, shared
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/
ERROR: `/tmp/pear/temp/solr/configure --enable-solr=yes --enable-solr-debug=no --with-curl=/opt/lampp/bin --with-libxml-dir=/usr' failed
From what I understand this should mean that it simply needs to find the correct curl location which I specify in the install when it asks as 'opt/lampp/bin'
Does this mean that it can't be done without recompiling php using a different curl package? Is this even possible with a lampp stack or do I have to now build my own?
Any ideas?
see PHP: Installation of PECL extensions.
Also take a look at the requirements of the SOLR extension module: http://docs.php.net/solr.requirements

Categories