LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   apache, php, mysql on linux (https://www.linuxquestions.org/questions/linux-newbie-8/apache-php-mysql-on-linux-463023/)

btmiller 07-16-2006 04:59 PM

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.

MrSako 07-16-2006 05:34 PM

do i install it instead of php and mysql or along with php and mysql?

and where do i get it?

jstephens84 07-16-2006 05:46 PM

Check to make sure in the phpinfo that it shows mysql and look into the php.ini to see if mysql module is loaded.

MrSako 07-16-2006 07:36 PM

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?

btmiller 07-16-2006 11:02 PM

Quote:

Originally Posted by MrSako
do i install it instead of php and mysql or along with php and mysql?

and where do i get it?

It goes along with PHP and MySQL. You can get it with "yum install php-mysql" (no quotes) generally.

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.

MrSako 07-16-2006 11:14 PM

ok thats not an option then. i NEED php5 becasue i wrote my website using php5 and it has php5 specific commands in it

MrSako 07-17-2006 12:25 AM

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

MrSako 07-19-2006 08:44 PM

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)

jstephens84 07-19-2006 11:32 PM

YOu need to make that directory and give that rights to mysql.

MrSako 07-20-2006 12:32 AM

well how come theres no mysqld file anywhere? isnt that what you need to start up mysql?

ade336 07-20-2006 03:55 AM

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...

jstephens84 07-20-2006 11:42 AM

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.

nickk 07-21-2006 07:56 AM

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

jstephens84 07-21-2006 10:54 AM

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.

MrSako 07-21-2006 08:01 PM

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.