LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 01-23-2009, 05:06 PM   #1
NorCalAl
LQ Newbie
 
Registered: Jan 2009
Location: In the hills of Northern California
Distribution: Suse 10 & 11
Posts: 2

Rep: Reputation: 0
LAMP issues - how to check if it's working!?


I recently installed PHP5, Apache and MySql using Yast2. Since it handles all the install process, I never configured an admin user for MySql and I don't think PHP is working.
I've put a phpinfo() call in several files, including a HTML one where I did get back the html - but not the php info.
So how can I easily check to see if each of the three installs were succemssful?? I'm a relative newbie to Suse, although I've had it installed for close to a year on a server. I just don't use it that much directly. I want to do some web dev and be able to show folks on my laptop what the site will look like.
I've actually done quite a bit of searching to figure out the answers first, but it seems like a lot of the folks answering expect me to know more than I do. Can I check from a command line to see if each is working?
I'm pretty sure apache is running, I'm sure mysql is not (I tried to start mysqladmin and got errors) but it's php that I'm most concerned about right now. I have a small site done, but can't get anything to work because php doesn't seem to be running.
Sorry for the book, but I could really use some help!!!
 
Old 01-23-2009, 07:57 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,501

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Here's a how to using YaST. It's pretty dated (Suse 9.1) but a lot of the information is useful. Worth checking out anyway. I used it w/Opensuse 10.3.

http://www.novell.com/coolsolutions/feature/595.html

You aid you were pretty sure apache worked, did you get the IT WORKS message from the index.html file?

Do you have the info.php file containing
Quote:
<?php
phpinfo();?>
in /srv/www/htdocs?

I think it would help if we knew what you have done to get things running?
 
Old 01-23-2009, 10:30 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
go to this address
http://127.0.0.1
-- or --
localhost
 
Old 01-26-2009, 05:14 AM   #4
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by NorCalAl View Post
Can I check from a command line to see if each is working?
I'm pretty sure apache is running, I'm sure mysql is not (I tried to start mysqladmin and got errors) but it's php that I'm most concerned about right now. I have a small site done, but can't get anything to work because php doesn't seem to be running.
Sorry for the book, but I could really use some help!!!
Hmm how did you check if apache is working? Surfed to 127.0.0.1 ?

From the commandline, you can check for apache using

Code:
ps -A | grep httpd
if you see something like this

Code:
[rylan@development ~]$ ps -A | grep httpd
 1975 ?        00:00:00 httpd
 1977 ?        00:00:19 httpd
 1978 ?        00:00:09 httpd
 1979 ?        00:00:21 httpd
 1980 ?        00:00:22 httpd
 1981 ?        00:00:14 httpd
 2287 ?        00:00:20 httpd
 2292 ?        00:00:18 httpd
26877 ?        00:00:13 httpd
26878 ?        00:00:05 httpd
26879 ?        00:00:13 httpd
[rylan@development ~]$
it means Apache is definitely working.

From the commandline, to check for MySQL do:

Code:
ps -A | grep mysql
if you see something like this

Code:
[rylan@development ~]$ ps -A | grep mysql
 1953 ?        00:00:00 mysqld_safe
 1974 ?        00:00:00 mysqld
 1982 ?        00:00:00 mysqld
 1983 ?        00:00:00 mysqld
 1984 ?        00:00:00 mysqld
 1985 ?        00:00:00 mysqld
 1986 ?        00:00:00 mysqld
 1998 ?        00:00:00 mysqld
 1999 ?        00:00:00 mysqld
 2000 ?        00:00:00 mysqld
 2001 ?        00:00:00 mysqld
27704 ?        00:00:02 mysqlcc
27705 ?        00:00:00 mysqld
[rylan@development ~]$
that means that MySQL is working.

What I'd really recommend to you is that you download, compile, and install all three these packages yourself. I've installed some other distros a few times (old RedHat 6.0, 9.0, FC3 and FC6) and in each of them so far the "stock" or package-supplied (i. e. "yasted") LAMP setups were totally broken, or installed obscurely and hard to configure. I do exactly what you do (e.g. host a machine that serves PHP pages for in-house PHP and dynamic website development) and I found that I had much more control (ok - it was the only way I could get ANYTHING to work too!) if I downloaded and compiled / installed the packages myself.
 
Old 01-26-2009, 10:47 AM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
the rpm's for fedora (apache,php,mysql) will set up a working "default" system . but with files scattered through out the system ( a pain to configure) . i like to build and install everything in a "www" folder
/opt/www/apache
/opt/www/apache/http/( my CMS -- Geeklog)
/opt/www/php
/opt/www/phpMyAdmin
/opt/www/mysql


this way everything is in one place .Also building and installing by hand you WILL learn the inner workings of the software .
THEN after you get a good working knowledge of the insides of apache and mysql ,then take the easy way and install the rpm's, .deb ,... files
 
Old 01-27-2009, 07:49 AM   #6
NorCalAl
LQ Newbie
 
Registered: Jan 2009
Location: In the hills of Northern California
Distribution: Suse 10 & 11
Posts: 2

Original Poster
Rep: Reputation: 0
Sigh - and this is why I know I'm still a noob. Forgot to start the apache service. I agree that doing it all myself is much more informative and I'd learn more. In order to accomplish the task at hand, however, it pays to speed things up (and not completely hose my suse install). I have installed php, apache and mysql on another box where it all worked right off the bat and I could not figure out why it was different.

Cause I forgot to start the dang apache service.

Thanks for all the suggestions!
 
Old 01-27-2009, 12:45 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Quote:
Cause I forgot to start the dang apache service.
well you had a " I should have had a V8" moment , as you hit your forehead .This happens all the time , even to the MOST experienced people .
 
  


Reply



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
Dell m1210 Linux issues (having issues getting network working under Ubuntu) thebert Linux - Newbie 4 03-14-2008 03:47 PM
Getting LAMP working with Slackware 11 duryodhan Slackware 8 02-11-2007 04:18 PM
RHE LAMP Issues xaphalanx Red Hat 2 05-06-2006 10:06 AM
LAMP with networking issues. xviddivxoggmp3 Linux - Networking 7 04-28-2006 10:09 PM
Setting Up LAMP: Getting Linux, Apache, MySQL, and PHP Working Together rhythmking Slackware 2 06-08-2005 04:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:08 AM.

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
Open Source Consulting | Domain Registration