moonlightcheese Posted August 23, 2007 Share Posted August 23, 2007 aright so a lot has changed since i last compiled a LAMP server from source and since Ubuntu 7 has screwed up the PHP5 package, this is my only option. i've never had this much trouble compiling PHP before. nowadays apparently PHP is no longer allowed to package a client library in the installation, and i cannot seem to get the config script to recognize the library i have installed. checking for MySQL UNIX socket location... /tmp/mysql.sock configure: error: Cannot find MySQL header files under yes. Note that the MySQL client library is not bundled anymore! why is it looking under 'yes'? the library does exist in /usr/lib but the configure script just doesn't see it. here's a print of my ld.so.conf file: include /etc/ld.so.conf.d/*.conf /usr/lib the first line was placed there by Ubuntu. after running ldconfig, and apachectl restart, nothing changed. i've tried adding the /usr/lib line to the /etc/ld.so.conf.d/i486-gnu-linux file as well: # Multiarch support /lib/i486-linux-gnu /usr/lib/i486-linux-gnu /usr/lib nothing is working! why couldn't they just add the option to the configure script? a --with-mysql-lib='/path/to/lib' would have been nice. how do i solve this? Quote Link to comment https://forums.phpfreaks.com/topic/66350-solved-mysql_connect-errors-linux-install-help/ Share on other sites More sharing options...
trq Posted August 23, 2007 Share Posted August 23, 2007 why couldn't they just add the option to the configure script? I'm quite certain that option does exist. Not at my machines to test, but I'm sure Ive seen it or something similar. Quote Link to comment https://forums.phpfreaks.com/topic/66350-solved-mysql_connect-errors-linux-install-help/#findComment-331941 Share on other sites More sharing options...
moonlightcheese Posted August 23, 2007 Author Share Posted August 23, 2007 user@host:~/php-5.2.3$ ./configure --help | grep sql --with-fbsql[=DIR] Include FrontBase support. DIR is the FrontBase base directory --with-msql[=DIR] Include mSQL support. DIR is the mSQL base --with-mssql[=DIR] Include MSSQL-DB support. DIR is the FreeTDS home --with-mysql[=DIR] Include MySQL support. DIR is the MySQL base directory --with-mysql-sock[=DIR] MySQL: Location of the MySQL unix socket pointer. --with-mysqli[=FILE] Include MySQLi support. FILE is the optional pathname to mysql_config --enable-embedded-mysqli MYSQLi: Enable embedded support install directory, defaults to /home/db2inst1/sqllib --with-pdo-mysql[=DIR] PDO: MySQL support. DIR is the MySQL base directory --with-pdo-pgsql[=DIR] PDO: PostgreSQL support. DIR is the PostgreSQL base --without-pdo-sqlite[=DIR] PDO: sqlite support. DIR is the sqlite base directory, the bundled sqlite is used by default --with-pgsql[=DIR] Include PostgreSQL support. DIR is the PostgreSQL --without-sqlite Do not include sqlite support. Use --with-sqlite=DIR to specify DIR where --enable-sqlite-utf8 SQLite: Enable UTF-8 support for SQLite i'm trying to avoid installing mysqli extension but i don't see a way around it and it may not work either... Quote Link to comment https://forums.phpfreaks.com/topic/66350-solved-mysql_connect-errors-linux-install-help/#findComment-331955 Share on other sites More sharing options...
trq Posted August 23, 2007 Share Posted August 23, 2007 Sorry... you did install mysql from source as well? Everyone always seesm to have alot of trouble compiling on Ubuntu, Ive never used it myself, but it would seem to me that things don't get put where they should be. I was sure I'de seen something about mysql-lib within the ./configure options. Id'e like to help more, but untill I'm at home with my debian and gentoo machines I'm a bit stuck for information. Quote Link to comment https://forums.phpfreaks.com/topic/66350-solved-mysql_connect-errors-linux-install-help/#findComment-331969 Share on other sites More sharing options...
moonlightcheese Posted August 23, 2007 Author Share Posted August 23, 2007 it's cool. thanks for the quick responses. i really think the best option is just to install FreeBSD on another system since i'm more familiar with server setups in BSD environments... i was considering Gentoo... Quote Link to comment https://forums.phpfreaks.com/topic/66350-solved-mysql_connect-errors-linux-install-help/#findComment-332067 Share on other sites More sharing options...
trq Posted August 23, 2007 Share Posted August 23, 2007 Gentoo is a brilliant Linux, though it can be quite a bit of upkeep. Ive used it for a number of years and have always enjoyed it. Installing LAMP is as easy as.... sudo emerge --sync sudo emerge -pv dev-lang/php edit /etc/portage/package.use accordingly, then... sudo emerge dev-lang/php Quote Link to comment https://forums.phpfreaks.com/topic/66350-solved-mysql_connect-errors-linux-install-help/#findComment-332092 Share on other sites More sharing options...
Hypnos Posted August 25, 2007 Share Posted August 25, 2007 Set the mysql and mysql socket directory with the switches on configure. Sounds like it was made with --with-mysql=yes, when it should be a path. If you want it to "just work" for the time being, just set the host on any mysql_connect to 127.0.0.1. Then it will use TCP/IP instead of the socket. What was wrong with Ubuntu's PHP build? Most distros now have a very bare bone PHP5 installation, then you have to install all the extension packages. Even FreeBSD is that way now. Quote Link to comment https://forums.phpfreaks.com/topic/66350-solved-mysql_connect-errors-linux-install-help/#findComment-334042 Share on other sites More sharing options...
moonlightcheese Posted August 28, 2007 Author Share Posted August 28, 2007 got it working on FreeBSD just fine (although with some slight database issues not related to PHPNuke). your first distro is like an old friend... i'm just more familiar with placement on FreeBSD and i don't feel lost. everything was compiled from source except mysql41 which was taken from pkg_add. thanks for the help guys. Quote Link to comment https://forums.phpfreaks.com/topic/66350-solved-mysql_connect-errors-linux-install-help/#findComment-336217 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.