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/)

jstephens84 07-11-2006 08:05 PM

Sorry didn't check for that. Your php.ini file looks fine. Have you tried adding that mysql.so file to the include path and then restarting apache?

MrSako 07-12-2006 01:25 AM

i just tried copying that so file into the include directory that the ini points to
i still get

[client 24.163.113.48] PHP Fatal error: Call to undefined function mysql_connect() in /var/www/html/phpinfo.php on line 8


i also restarted apache

jstephens84 07-12-2006 08:44 AM

try changing extension to = php_mysql.so

Edit = Sorry just remebered that is for windows.

jstephens84 07-12-2006 08:54 AM

OK, Lets get back to basics. First was php with your system or did you install yourself? Second if you did complie the program yourself how did you do it? What version are you using?

MrSako 07-12-2006 11:56 PM

i used yum to install both mysql and php, apache came pre installed when i ordered the VPS

php vesion 5

mysql version4 (would like it ot be 5 but yum doesnt have mysql 5)

im thinking abuot deleting apache php and mysql and installing it all by hand from a manual

is there a good place that would explain the how to for a complete beginner like myself? (i mean like almost line by line commands of every step)

jstephens84 07-13-2006 08:42 AM

To install Apache and PHP download apache2.0.53 and php5

Install for Apache
Code:

tar -zxvf httpd2.versionNumber
./configure --prefix=/usr/local \ --enable-mods-shared=most \ --enable-modules=all
make
make install

Install for php
Code:

./configure --with-mysql \ --with-apxs=/usr/local/apache2/bin/apxs
make
make install

edit the apache's conf file and make the following edits. Make sure that under LoadModule you have the following LoadModule php5_module libexec/libphp5.so. Also If you are being prompted to download you php scripts make sure the following is in apache. Under ClearModule list the following should be there AddModule mod_php5.c

Also add the following
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

edit the DirectoryIndex
DirectoryIndex index.php index.htm index.html default.php

check /usr/bin for apache2ctl if not there then issue the following command
Code:

ln -s /usr/local/apache2/bin/apache2ctl /usr/bin/apache2ctl
Tonight I will put the install instructions for mysql.

I really think you should compile them for your self. That way you will have a tighter control on where things are and how they are.

MrSako 07-13-2006 08:39 PM

hey thanks i got apache and php installed now, just waiting for your next post :}

jstephens84 07-14-2006 09:26 AM

First did your installation go off with out any problems? Also can you post the information from the phpinfo().

jstephens84 07-14-2006 09:46 AM

Just go here and download from the nearest mirror.

tar -zxvf mysql-version.tar.gz
Then just do the following.
Code:

./configure --prefix=/usr/local
make
make install

then su to root
Code:

mysql_install_db --user=mysql

MrSako 07-14-2006 05:35 PM

i would prefer to use mysql 5 becasue on my development machine i use mysql 5

http://dev.mysql.com/downloads/mysql/5.0.html

but i dont know which download i need

jstephens84 07-14-2006 06:12 PM

http://dev.mysql.com/get/Downloads/M...r.gz/from/pick

Choose that one. Then use the same install instructions from other post. If it is a binary install then let me know.

MrSako 07-14-2006 07:25 PM

i feel dumb becasue i did the apache and php without much of any problem

everytime i use the configure command it says not found but i did ls and i see configure right there

btw this is all in /home/mysql should i of done this in /usr/local?

jstephens84 07-14-2006 09:04 PM

Doesn't matter. are you doing ./configure

MrSako 07-14-2006 09:30 PM

yes, the file is extracted

i type

cd /home/mysql
./configure

jstephens84 07-14-2006 09:58 PM

does it say anything about being a binary installation.


All times are GMT -5. The time now is 09:29 AM.