FAQ  •  Register  •  Login

LAMP - Important

<<

phillw_admin

User avatar

Site Owner

Posts: 216

Joined: Fri Jan 08, 2010 9:11 pm

Location: UK - North West

Post Sun Jan 17, 2010 4:28 pm

LAMP - Important

Please hold on this one, it is still all valid but a new one has been written !! It's called LAMP Class in this section. I keep this thread as it has a discussion on LAMP



Phill

A quick word on LAMP,

Do not do it the long way round - it causes much grief and takes me ages to fix it for you all. If you have decided to do it the long way & it's broken, head over to --> http://ubuntuforums.org/showthread.php?t=1349863 Do not expect sympathy off me !! :twisted: To be honest, for the time it took to sort that one out (look at the date & time stamps) it would have been quicker to a fresh installation from scratch - But, I did get it working. If you have already goofed it up drop a note here & I'll go through it with you.
<<

phillw_admin

User avatar

Site Owner

Posts: 216

Joined: Fri Jan 08, 2010 9:11 pm

Location: UK - North West

Post Tue Mar 09, 2010 10:44 pm

magic quotes

Bad things.

They were there in the very early days to try do good things. That was a long time ago & the people who created them now say it was a bad idea.

Magic Quotes where an attempt to get PHP to try and look after MySQL. As they are 2 very different systems, this was never going to be a happy relationship.

Magic Quotes are going to be gone.

Don't believe me ? http://php.net/manual/en/security.magicquotes.php

So, when you are setting up a server, or are using an external server - make sure that they have magic-quotes turned 'off'
(I have * [drat, caught by my own language-bot ;-) == complained] to Ubuntu to have them turned off by default, but they are currently ON).

Else poor Mr O'Reily can quickly become Mr 0/////////////////////////////////'Reily as strip slash and mysql_real_escape_string do not get on

As I was also a real nOOb, and wanted to know about setting up queries etc, and protecting from MySQL injections, I started this thread --> http://ubuntuforums.org/showthread.php?t=1258982

It is well worth a read.

Phill.
<<

phillw_admin

User avatar

Site Owner

Posts: 216

Joined: Fri Jan 08, 2010 9:11 pm

Location: UK - North West

Post Tue Mar 30, 2010 9:23 pm

Re: LAMP - Important

A few changes with 10.04 LAMP

Just to save others scratching their heads. With the new system install there are a few changes that are quite important.

MagicQuotes are now OFF :-)

Error reporting is now disabled. This is important as error reporting can give hints to hackers about your system.

To allow those like me, who need error reporting on for development work, they now ship some further information on it.

  Code:
/etc/php5/apache2/php.ini
has the current file (production) for configuring up the php security and has comments as to what is turned on and off between 'production' and 'development'.

As they're real nice people, they have made things even easier and ship both the production and development versions over at
  Code:
/usr/share/doc/php5-common/examples


Simply copy over the one you need from there over to
  Code:
/etc/php5/apache2/php.ini


To switch TO development security
  Code:
sudo cp /usr/share/doc/php5-common/examples/php.ini-development /etc/php5/apache2/php.ini

To switch BACK to production security
  Code:
sudo cp /usr/share/doc/php5-common/examples/php.ini-production /etc/php5/apache2/php.ini


In each case, you need to restart the apache server
  Code:
sudo /etc/init.d/apache2 restart


Regards,

Phill.
<<

Abera

Posts: 19

Joined: Fri May 21, 2010 12:51 am

Location: USA

Post Fri May 21, 2010 1:11 am

Re: LAMP - Important

I currently run a phpbb live site. I also just set a box up with the Ubuntu 10 Desktop. Running Win 7 on another system with Wamp, so I can modify and see my live site local. Now the question. Can I run LAMP with the Ubuntu Desktop, or would I have to set another system up just for LAMP?
Thanks
<<

phillw_admin

User avatar

Site Owner

Posts: 216

Joined: Fri Jan 08, 2010 9:11 pm

Location: UK - North West

Post Sat May 22, 2010 7:49 pm

Re: LAMP - Important

Hi Abera,

using tasksel will put LAMP onto your desktop - it was for doing that I posted this 'How-To'.

Regards,

Phill.
<<

Abera

Posts: 19

Joined: Fri May 21, 2010 12:51 am

Location: USA

Post Sat May 22, 2010 9:38 pm

Re: LAMP - Important

I got it all set up the way you said to and all is running fine. ;) The only thing is I can't move anything into the WWW Dir. It says the owner of the WWW is root No permissions. I thought I'd be the owner. How do I change that? I just started with Ubuntu last week and it's a new frontier for me.
Thanks
<<

phillw_admin

User avatar

Site Owner

Posts: 216

Joined: Fri Jan 08, 2010 9:11 pm

Location: UK - North West

Post Mon May 24, 2010 5:04 pm

Re: LAMP - Important

Abera wrote:I got it all set up the way you said to and all is running fine. ;) The only thing is I can't move anything into the WWW Dir. It says the owner of the WWW is root No permissions. I thought I'd be the owner. How do I change that? I just started with Ubuntu last week and it's a new frontier for me.
Thanks


The /var/www directory should show as below...
  Code:
cd /var
ls -l
drwxr-xr-x 15 root root  4096 2010-05-13 11:26 www

if you move into that directory
  Code:
cd www
ls -l
Those files should show owner and group as yourself, for example on my system it shows
  Code:
-rw-r--r--  1 phillw phillw      47 2010-05-12 12:47 index.html
Meaning that you have write privileges and everyone else has read only privileges.

Regards,

Phill.
<<

Abera

Posts: 19

Joined: Fri May 21, 2010 12:51 am

Location: USA

Post Tue May 25, 2010 1:52 am

Re: LAMP - Important

All I get with the ls -1 command is the listing of the dir. No Chmod info at all. I guess I need Linux for dummies. I need to chomd the files and different dirs different. I'll keep looking for how to set the dirs and files. I set the whole www to 777 with the -R. I know that is wrong,b but it was the only way I could bring my test site up.
Thanks
<<

phillw_admin

User avatar

Site Owner

Posts: 216

Joined: Fri Jan 08, 2010 9:11 pm

Location: UK - North West

Post Wed May 26, 2010 10:47 am

Re: LAMP - Important

*** Important EDIT ***

The instructions above should have worked, I'll hope to work out what the problem is later.

Phill.


Hi, as you have not put anything into the /var/www directory, you will not find anything :D
The below will reset the directory permissions and put in the default file called index.html
  Code:
chmod 755 /var/www
cd /var/www
echo '<html><body><h1>In var www!</h1></body></html>'>index.html

note that h1 is h 'one' and not h 'L' (1's and l's look pretty similar, don't get caught out)
If you then type localhost into your browser it should say
In var www!


Regards,

Phill.
P.S. you should now be able to post directly without it sitting in the Moderation Queue, so do remember to pop back once I've had chance to answer the posting :)
P.P.S. I've amended the installation instructions to put the file in there in future!
<<

Abera

Posts: 19

Joined: Fri May 21, 2010 12:51 am

Location: USA

Post Wed May 26, 2010 1:16 pm

Re: LAMP - Important

I finally got the chmod values to come up. I guess a typo on my end. As far as setting the permissions, I used gFTP to reset them. The site came up just fine. My test site is a phpbb site. I got them set to where they are to be, but now trying to figure out gFTP and uploading files to the localhost. I can manually copy the files, or directories, but no localhost connection. I will figure it out. Now off to find out how to do it. ;)
Thanks
Next

Return to MySQL and PHP

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.