LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-24-2003, 05:20 AM   #1
jefx
LQ Newbie
 
Registered: Apr 2003
Posts: 26

Rep: Reputation: 15
Wink Red Hat 8 : PHP/MySQL/Apache


Ok...I have the above installed and all working fine independenlyl.....how do I now link them all so I can start using them?

PHP
MySQL
Apache

Thanks in advance..

 
Old 05-24-2003, 03:52 PM   #2
Satriani
Member
 
Registered: Mar 2003
Location: The Netherlands
Distribution: Red Hat 7.3, Red Hat 9, Solaris8, Slackware 10, Slax on USB, AIX, FreeBSD, WinXP, AIX, Ubuntu
Posts: 418

Rep: Reputation: 30
Jefx:

Im not sure i understand you. If you have apache, php and mysql installed, (did you install binaries, or with RPM, or similar?) what do you mean by "linking" them?

My best guess is: you want to run apache with php, and get information from your mysql database?

Then the setup is quite easy, depending on which version of apache you use.
As far as I know, php and apache2 do not (yet) work smoothly....

So what version do you use ?
 
Old 05-24-2003, 04:21 PM   #3
jefx
LQ Newbie
 
Registered: Apr 2003
Posts: 26

Original Poster
Rep: Reputation: 15
Red Hat 8 PHP..etc

Hi

Thanks for your response..

I loaded all the packages when I loaded RedHat Distro.

My problem is I dont know how to make it all work together,...so I can learn PHP and MySQL etc....

I know all the packages are there..but I dont know where they are my hard drive.how do I find them?...

I have some books but they all refer to directing the set up towards specific folders ....not much help for me!

Thanks


Jefx
 
Old 05-24-2003, 04:54 PM   #4
Satriani
Member
 
Registered: Mar 2003
Location: The Netherlands
Distribution: Red Hat 7.3, Red Hat 9, Solaris8, Slackware 10, Slax on USB, AIX, FreeBSD, WinXP, AIX, Ubuntu
Posts: 418

Rep: Reputation: 30
ok, I don't now your level of experience, so maybe treat you as a complete newbie,but here's a start...

First check if apache is up and running. Two ways of doing that:
ps -aux |grep -i httpd
(This shows all processes with httpd in it, there should be some line in your processes)

second way is to open a browser and type: http://localhost
You should see a page, saying that apache is running, or something like that.

Is it ?
 
Old 05-24-2003, 07:21 PM   #5
Rick422
Member
 
Registered: Apr 2003
Location: Arizona
Distribution: Red Hat Linux 9
Posts: 158

Rep: Reputation: 30
You mentioned that mysql is installed. To use mysql you might start by checking to see if the mysqld daemon is running or not. An alternative method of checking that to what Satriani said is to type this:

//etc/init.d/mysqld status

It sould then tell you if it is running or not. If it is not running, first type the su command to temporarily get superuser priveleges if you are not currently logged in as root. Then type:

//etc/init.d/mysqld start

That will start the daemon and make mysql and mysqladmin available but using that method does not automatically make the daemon start for you each time. At that point you should be able to type either mysqladmin or mysql and have something happen. Do not know much more than that because I am not very far into the MySQL book yet. I did once set up the Apache web page server on a Linux box it out on in a computer class I took but do not have time at the moment to explain what what little I know Apache.
 
Old 05-24-2003, 10:09 PM   #6
Rick422
Member
 
Registered: Apr 2003
Location: Arizona
Distribution: Red Hat Linux 9
Posts: 158

Rep: Reputation: 30
I just realized that Satriani's post was about how to check to see if Apache is up and running. I had not bothered to read much of what he said before commenting in my post that I had an alternative to that. Well, of course, what I posted above is unrelated to how to check that. I was talking about starting the daemon for mysql and mysqladmin.
 
Old 05-25-2003, 07:29 AM   #7
Satriani
Member
 
Registered: Mar 2003
Location: The Netherlands
Distribution: Red Hat 7.3, Red Hat 9, Solaris8, Slackware 10, Slax on USB, AIX, FreeBSD, WinXP, AIX, Ubuntu
Posts: 418

Rep: Reputation: 30
Rick442:
Seems you know your way in mysql, that's not my strongest skill.. So I started with explaining apache first... (That one I know more of).. Maybe you could help jefx with learning / troubleshooting mySQL... I will try to get his apache / php up and running, and then let him connect php to mysql... That's all I can do...

It could be I am taking the long way, I'm still a newbie in this also... But, I got it working....
 
Old 05-25-2003, 02:17 PM   #8
jefx
LQ Newbie
 
Registered: Apr 2003
Posts: 26

Original Poster
Rep: Reputation: 15
Red Hat 8 : PHP/MySQL/Apache

HI Guys

Thanks for the feedback....

Satriani :

typed in >> ps -aux |grep -i httpd..got this..

root 902 0.0 3.2 17504 8012 ? S 20:54 0:00 /usr/sbin/httpd
apache 967 0.0 3.2 17528 8048 ? S 20:54 0:00 /usr/sbin/httpd
apache 968 0.0 3.2 17528 8044 ? S 20:54 0:00 /usr/sbin/httpd
apache 969 0.0 3.2 17528 8044 ? S 20:54 0:00 /usr/sbin/httpd
apache 970 0.0 3.2 17528 8044 ? S 20:54 0:00 /usr/sbin/httpd
apache 971 0.0 3.2 17528 8044 ? S 20:54 0:00 /usr/sbin/httpd
apache 972 0.0 3.2 17528 8044 ? S 20:54 0:00 /usr/sbin/httpd
apache 973 0.0 3.2 17528 8044 ? S 20:54 0:00 /usr/sbin/httpd
apache 974 0.0 3.2 17528 8044 ? S 20:54 0:00 /usr/sbin/httpd
jef 1413 0.0 0.2 3204 620 pts/0 S 21:06 0:00 grep -i httpd




also tried >>> http://localhost.....says > localhost not found>
however when Im connected to the net I type in >>http://localhost ahain and it works !......


please note also when im offline I can also type in :http://localhost/manual/mod/core.html#documentroot and o get the Apache Module core page which is cool....

ok..typed in>> //etc/init.d/mysqld status everything fine type in>> mysql..no problems..mysql is working fine.


Rick422:

Typed in >> //etc/init.d/mysqld status got this :

mysqld (pid 872 869 868 856) is running...


So...things seem to be good so far...PHP next....

thanks again..
 
Old 05-25-2003, 05:18 PM   #9
Satriani
Member
 
Registered: Mar 2003
Location: The Netherlands
Distribution: Red Hat 7.3, Red Hat 9, Solaris8, Slackware 10, Slax on USB, AIX, FreeBSD, WinXP, AIX, Ubuntu
Posts: 418

Rep: Reputation: 30
OK then, it seems as if your apache is up as well as your mysql...

then let's check if your basic html page works:
I guess (since you installed from packages RPM) your document root for html is in /var/www/html
just place a simple index.html in this dir with some text, and see if it shows up when you type http://localhost/

If it does, your httpd is configured correct for plain html.

next , in this same dir create a file called "whatever.php"
in this file, put the following:

<?php
phpinfo();
?>

then in your browser again, type: http://localhost/whatever.php

See what happens... If you get the text you put in this file, then we can assume that PHP is not configured (yet).
But my best guess is, you will see a page containing a lot of information about your php installation. If so, check if you find anything about mysql in there.. It should be, since you installed the rpm... (At least, I assume you did install not only the mysql-server, but the client as well?)

If all of this works, we can start scripting a php page to connect to your database...

lemme know!
 
Old 05-25-2003, 07:24 PM   #10
jefx
LQ Newbie
 
Registered: Apr 2003
Posts: 26

Original Poster
Rep: Reputation: 15
Php Etc

Hi Satriani


I got the page containing the information about my php (version 4.2.2) installation..xclnt ..thanks

tried the html file in var/www/html worked also..

The reference to Mysql in the PHP info was under the heading: "Configure Command" and states >>> with-mysql=shared,/usr <<<<<

now b4 we move on...please explain to me as to why the whole thing only works when I connect to the web and not when Im offline?

Also why it doesnt kick in when i log out and go into root?...is this a path config thing ?

in addition, could you please explain this Server and Client installation? does it relate to the above at all?


Regards

Jefx

 
Old 05-28-2003, 03:17 PM   #11
Satriani
Member
 
Registered: Mar 2003
Location: The Netherlands
Distribution: Red Hat 7.3, Red Hat 9, Solaris8, Slackware 10, Slax on USB, AIX, FreeBSD, WinXP, AIX, Ubuntu
Posts: 418

Rep: Reputation: 30
Re: Php Etc

Jefx,
I have been offline for some dayz.. so a little late reply:


Quote:
Originally posted by jefx
please explain to me as to why the whole thing only works when I connect to the web and not when Im offline?
Mmmm, that's weird. You do this localhost thing on the linuxmachine itself, don't you? Or do you use another name for this machine? If you use another name for this machine, make sure it can be resolved without going online. (put that name in /etc/hosts for example)


Quote:
Originally posted by jefx
Also why it doesnt kick in when i log out and go into root?...is this a path config thing ?[/B]

It's not completely clear what kicks in? Doesn't apache start automatically? Or something else?


Quote:
Originally posted by jefx
in addition, could you please explain this Server and Client installation? does it relate to the above at all?
If you only install the mySQL server part, you act as: A server! Yeah really!

That means, you are only serving mysql to any other machine, who wants to use this service. ( A client) Since you want apache / php to be able to talk to mysql, you will need a client. This client takes care of retreiving information from the database, or storing it. So if you do not have a client installed on the same machine, you will have a database just sitting there, and waiting for a client to connect... Does that answer your question?

Also, let me know about the root-thingie and the online-thingie...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Open source IDE for PHP, MySQL, Apache, Red Hat 9 lothario Red Hat 2 06-02-2010 03:27 AM
How to start php,mysql, appache, after installing Red Hat 9 metoome Slackware - Installation 1 03-06-2004 09:38 AM
How to start PHP, MySQL,Appache on just installed Red Hat ( metoome Slackware - Installation 0 03-06-2004 12:26 AM
Apache Mysql Php: mysql with php doesn't work breakerfall Linux - Networking 6 12-27-2003 09:59 PM
Red Hat 9 just installed. how to http+php+mysql makkintosh Linux - Networking 9 11-30-2003 02:20 PM


All times are GMT -5. The time now is 11:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration