Do you have the php-mysql RPM installed? That's all I've ever had to do to get PHP and MySQL working together on CentOS.
|
do i install it instead of php and mysql or along with php and mysql?
and where do i get it? |
Check to make sure in the phpinfo that it shows mysql and look into the php.ini to see if mysql module is loaded.
|
you mean this in the php.ini? extension=mysql.so
Configure Command './configure' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-pear=/usr/share/pear' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/etc/httpd/conf/magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' i noticed in this huge block it mentions "without mysql" i think thats related to the problem how do i make it say with? |
Quote:
Edit: This will give you the PHP4 that comes with CentOS. If you really want PHP5 you'll need to follow some of the directions given by others and compile it yourself. |
ok thats not an option then. i NEED php5 becasue i wrote my website using php5 and it has php5 specific commands in it
|
ok whats happening now is im having the tech guy where i rented my VPS from whipe off my whole VPS and only put in CentOS and webmin and the minimum dependancies for webmin. im going to install everything else by hand.
whatever installed everything when i first got it seemed to just put files everywhere i think there could of just been too many problems |
my VPS was reset and apache is installed
before manually doing php and mysql i wanted to try it with YUM just one more time i enabled the centosplus repo (so php5 could be installed) and i did yum install php-mysql it all installed succesfully. i checked my phpinfo() and it looked good. but the problem is mysql wont start. theres not even a file on the system named mysqld im about to uninstall everything that YUM installed and do it by hand but im hoping by some chance there was just a mistake the error i get now when trying to do the mysql connect command now is Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) (btw /var/lib/mysql doesnt even exist) |
YOu need to make that directory and give that rights to mysql.
|
well how come theres no mysqld file anywhere? isnt that what you need to start up mysql?
|
hi all...i've found this problem before and then i finnaly managed to install without prob
1) install mysql using rpm (download from mysql)..look for error which is all about mandatory dependencies.. 2) install php using binary 3) compile it with php and apache(stop the apache) php directory: ./configure --prefix=/usr/local/php --with-mysql --with-apxs2=(apache directory) --with-enable-sigchild do nesessary edit on php.ini and httpd.conf edit this line on /etc/init.d/boot.local /etc/init.d/mysql start reboot pc.... have a nice try... |
Check the bin directory under you mysql directory. So if you placed the binary installation under /usr/local/mysql it will be under there. just make a sym link from /usr/bin to mysqld_safe.
ln -s /usr/local/mysql/bin/mysqld_safe /usr/bin/mysqld_safe that should add it there. |
Just wanted to post that I had the exact same problem. What I couldint do for approx 2 weeks in Red Hat enterprise, took me about 2 hours using Ubuntu. For anyone who wants to learn Linux and is having problems installing, configuring, etc. I suggest you use Ubuntu, GREAT distribution
|
I could not agree more with Nickk. There have been distributions that have given me hell trying to get this installed. I am currently using Ubuntu server edition on my IBM Netfinity 5000 at my house. Runs great for an old machine.
|
ok heres where i stand now. i have gotten mysql 5 installed and running and tested it works YAY. apache2 is installed, works, yay!
php i can't get to configure this is what happens when i try to ./configure http://mrsako.pastebin.ca/95132 the last line of what it returns is talking abuot zlib or something. i dont understand. i can't do make it still gives this error > make make: *** No targets specified and no makefile found. Stop. so somehow i gotta fix up this configure command |
All times are GMT -5. The time now is 01:58 PM. |