LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Getting Started with Apache, PHP and MYSQL (https://www.linuxquestions.org/questions/linux-newbie-8/getting-started-with-apache-php-and-mysql-358469/)

jammyjames 08-30-2005 09:47 AM

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

trickykid 08-30-2005 10:20 AM

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? :confused:

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

jammyjames 08-30-2005 11:20 AM

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

tuxrules 08-30-2005 11:34 AM

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,

Fredstar 08-30-2005 11:47 AM

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.

jammyjames 08-30-2005 11:53 AM

Hi can I have your e-mail address so I can e-mail you the conf files?

Thanks

James

jammyjames 08-30-2005 11:55 AM

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

ssfrstlstnm 08-30-2005 12:03 PM

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.

tuxrules 08-30-2005 12:04 PM

open up a terminal...

Code:

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

Tux,

jammyjames 08-30-2005 05:13 PM

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

ssfrstlstnm 08-30-2005 11:30 PM

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.

jammyjames 08-31-2005 10:47 AM

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

ssfrstlstnm 08-31-2005 10:59 AM

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


jammyjames 08-31-2005 11:16 AM

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

ssfrstlstnm 08-31-2005 01:48 PM

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.


All times are GMT -5. The time now is 02:38 AM.