LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 08-30-2005, 10:47 AM   #1
jammyjames
LQ Newbie
 
Registered: Aug 2005
Location: Norfolk, UK
Posts: 23

Rep: Reputation: 15
Getting Started with Apache, PHP and MYSQL


Hi,

I am desperate for some help!

I am a new Linux user and was wondering if someone could help me?

I am trying to create a LAMP environment and network it to my Windows Computer.

I am stuck on the following:

1) I cannot figure out how to get Apache configured. When I view a test php in my localhost it says access denied.

2) I cannot get Linux to share files with windows.

3) Newly installed programs win't appear in the applications. I dont know how to open them.

I would very much appreciate it if you could help me.

Many thanks

I am using Debain 3.1 (Sarge)

Please bare in mind I am a complete beginner with Linux.

Thanks again

James
 
Old 08-30-2005, 11:20 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Re: Getting Started with Apache, PHP and MYSQL

1) I cannot figure out how to get Apache configured. When I view a test php in my localhost it says access denied.

Most likely a permissions issue. What are the permissions of this file/directory? Do any other pages work? If not, how is Apache configured?


2) I cannot get Linux to share files with windows.

This is not a problem with LAMP but a configuration with Samba. Any errors, posting your config files for Samba always help?


3) Newly installed programs win't appear in the applications. I dont know how to open them.

I dont understand your question here. Installed programs don't appear in applications?

If you install a program, locate the binary executable and run it from a terminal, usualy most will reside in either /usr/bin or /usr/local/bin
 
Old 08-30-2005, 12:20 PM   #3
jammyjames
LQ Newbie
 
Registered: Aug 2005
Location: Norfolk, UK
Posts: 23

Original Poster
Rep: Reputation: 15
...

Hi thanks for replying.

I haven't configured apache I just used the apt-get to install it. I don't know how to configure it.

Where can I get my config files for Samba from?

Quote:
If you install a program, locate the binary executable and run it from a terminal, usualy most will reside in either /usr/bin or /usr/local/bin
How do I run it from a terminal?

Many thanks

James
 
Old 08-30-2005, 12:34 PM   #4
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,144

Rep: Reputation: 56
I don't know where debian put apache config file...

Open up a terminal and

Code:
locate httpd.conf
httpd.conf is the apache config file.

Code:
locate smb.conf
smb.conf is the samba config file.

I am not sure if you want to share files on the same computer or over the network. If you want to share the files on the same computer then you don't need samba. Samba is used to share files over a network (i.e. between two different computers)

Running program from a terminal

$ /usr/bin/name-of-the-program

example:

$ /usr/bin/firefox

or simply

$ name-of-the-program

example:

$ firefox

Tux,
 
Old 08-30-2005, 12:47 PM   #5
Fredstar
Member
 
Registered: Jul 2004
Location: Rochester, NY
Distribution: Fedora9::FreeBSD7.1
Posts: 296

Rep: Reputation: 30
What windows manager are you using? (fluxbox, Gnome, KDE)? I think for the last one you would like to add them to your app menu / (startbar in windows).

if that is what you want to do post what desktop you are using.
 
Old 08-30-2005, 12:53 PM   #6
jammyjames
LQ Newbie
 
Registered: Aug 2005
Location: Norfolk, UK
Posts: 23

Original Poster
Rep: Reputation: 15
Hi can I have your e-mail address so I can e-mail you the conf files?

Thanks

James
 
Old 08-30-2005, 12:55 PM   #7
jammyjames
LQ Newbie
 
Registered: Aug 2005
Location: Norfolk, UK
Posts: 23

Original Poster
Rep: Reputation: 15
GNOME

Hi,

Yes I am using GNOME and I am trying to get them to appear into the programs folder (like on a windows os)

thanks

James
 
Old 08-30-2005, 01:03 PM   #8
ssfrstlstnm
Member
 
Registered: Dec 2004
Location: IN, USA
Distribution: debian etch
Posts: 402

Rep: Reputation: 30
In apache 2 on debian the main config file is /etc/apache2/apache2.conf

httpd.conf is just there to be compatible with earlier versions.
 
Old 08-30-2005, 01:04 PM   #9
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,144

Rep: Reputation: 56
open up a terminal...

Code:
killall gnome-panel
This should refresh the panel and menus with new entries.

Tux,
 
Old 08-30-2005, 06:13 PM   #10
jammyjames
LQ Newbie
 
Registered: Aug 2005
Location: Norfolk, UK
Posts: 23

Original Poster
Rep: Reputation: 15
Hi,

Thanks I got the panel menus working but I still haven't got File sharing working and Apache working. How to I add the config files or I could e-mail them to you.

Thanks for your time

James
 
Old 08-31-2005, 12:30 AM   #11
ssfrstlstnm
Member
 
Registered: Dec 2004
Location: IN, USA
Distribution: debian etch
Posts: 402

Rep: Reputation: 30
For apache do you have permissions for the DocumentRoot directory?

Your config file should be in /etc/apache or /etc/apache2. Look in the config file (httpd.conf for apache1.x or apache2.conf for apache2.0) and find the DocumentRoot directive. That tells you where you should put your html or php files. You can change the DocumentRoot if you want to, but you need to have the proper permissions for that directory and the files in it.
 
Old 08-31-2005, 11:47 AM   #12
jammyjames
LQ Newbie
 
Registered: Aug 2005
Location: Norfolk, UK
Posts: 23

Original Poster
Rep: Reputation: 15
Hi,

Yes for the setting in Apache the root folder is Var/WWW this is where I have added the files but how do you change the permissions?

Thanks

James
 
Old 08-31-2005, 11:59 AM   #13
ssfrstlstnm
Member
 
Registered: Dec 2004
Location: IN, USA
Distribution: debian etch
Posts: 402

Rep: Reputation: 30
Code:
cd /var
chmod -R 755 www
That will change permissions in for www directory and all of the files in it to 755.

Owner has read, write, and execute permission (7)
Group has read and execute permission (5)
Everyone has read and execute permission (5)

like this:

read=4
write=2
execute=1

i.e. read + execute = 4 + 1 = 5

The -R makes it recursive (change www AND EVERYTHING IN www)


To see what the permissions are now do this:

Code:
cd /var/www
ls -la
 
Old 08-31-2005, 12:16 PM   #14
jammyjames
LQ Newbie
 
Registered: Aug 2005
Location: Norfolk, UK
Posts: 23

Original Poster
Rep: Reputation: 15
Hi thanks for this,

This is what is came up with:

Code:
debian:/var/www# ls -la
total 16
drwxr-xr-x   3 root root 4096 2005-08-30 15:20 .
drwxr-xr-x  15 root root 4096 2005-08-29 20:46 ..
lrwxrwxrwx   1 root root   24 2005-08-29 20:18 analog -> /usr/share/analog/images
drwxr-xr-x   2 root root 4096 2005-08-30 19:24 apache2-default
-rwxr-xr-x   1 root root   20 2005-08-30 15:20 info.php
-rwxr-xr-x   1 root root    0 2005-08-30 15:19 info.php~
I don't know what it means.

I tried to open the file again and it asked me to save it because mozilla didn't know how to open it. I guess this means the server isn't right?

Thanks again

James
 
Old 08-31-2005, 02:48 PM   #15
ssfrstlstnm
Member
 
Registered: Dec 2004
Location: IN, USA
Distribution: debian etch
Posts: 402

Rep: Reputation: 30
So it doesn't say access denied anymore? Maybe the permissions thing is fixed now. It looks like you are trying to open the info.php file. What are you typing in the address bar?

Try http://localhost/info.php

If that doesn't work you may need to install php or mod_php or both.

Code:
apt-get install php4
apt-get install libapache-mod-php4
Then restart the server and try again.
 
  


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
Getting Started with Apache, PHP and MYSQL jammyjames Linux - General 1 08-30-2005 11:14 AM
Getting Started with Apache, PHP and MYSQL jammyjames Linux - Software 1 08-30-2005 10:57 AM
Fedora Core 3, MySql Server, mysql started mysql ended OkiTek Fedora 30 01-28-2005 10:15 AM
Apache Mysql Php: mysql with php doesn't work breakerfall Linux - Networking 6 12-27-2003 09:59 PM
php-nuke with apache php mysql c0c0deuz Linux - Software 0 03-30-2003 07:23 AM


All times are GMT -5. The time now is 08:24 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration