Moved from Ubuntu Linux 10 to 14.04-Can't log in now

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
cecilchampenois
Forum Commoner
Posts: 47
Joined: Thu Nov 06, 2014 10:29 am
Location: Gilbert, Arizona
Contact:

Moved from Ubuntu Linux 10 to 14.04-Can't log in now

Post by cecilchampenois »

We set up a new Ubuntu Linux Server, just as a Test Web Server. We noticed that with Apache 1 Server, the files were located previously in /var/www/. However, with Apache2 we find that the fields are to be launched from /var/www/html. So, we put the same files that were in /var/www into /var/www/html. No workie!!!

We cannot connect to the MySQL database, nor can we login, of course. What did we do wrong?

Cecil
Last edited by cecilchampenois on Tue Nov 18, 2014 10:38 am, edited 1 time in total.
Cecil Champenois
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Moved from Ubuntu Linux 10 to 14.04-Can't log in now

Post by Celauran »

Sounds like there are a few things going on here. Have you confirmed that both Apache and MySQL server are installed and running? Can you log into MySQL as root?
cecilchampenois
Forum Commoner
Posts: 47
Joined: Thu Nov 06, 2014 10:29 am
Location: Gilbert, Arizona
Contact:

Re: Moved from Ubuntu Linux 10 to 14.04-Can't log in now

Post by cecilchampenois »

Yes, both Apache2 and MYSQL are running.
Cecil Champenois
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Moved from Ubuntu Linux 10 to 14.04-Can't log in now

Post by Weirdan »

Does MySQL have tables and data in those tables required by your application?
cecilchampenois
Forum Commoner
Posts: 47
Joined: Thu Nov 06, 2014 10:29 am
Location: Gilbert, Arizona
Contact:

Re: Moved from Ubuntu Linux 10 to 14.04-Can't log in now

Post by cecilchampenois »

Weirdan wrote:Does MySQL have tables and data in those tables required by your application?
Yes, MySQL does have a database and tables ready to go. The difference between Apache 1 and 2 is that Apache 2 now expects that you will place your PHP files into the HTML foldfer rather directly into the www folder.

Before with Apache 1: /var/www/

Now with Apache 2: /var/www/html/

I also corrected paths for any code that pointed off to former places to the correct places.
Cecil Champenois
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Moved from Ubuntu Linux 10 to 14.04-Can't log in now

Post by Celauran »

Ubuntu 10.04 shipped with Apache 2.2, not 1.x. Regardless, that wouldn't explain why you're unable to login to MySQL. One has nothing to do with the other. So, MySQL notwithstanding, do your PHP and Apache installs appear to be working properly (ie. index.php with phpinfo() in it displays correctly)? Are you able to login to MySQL via the CLI? That would at least narrow down where the problem lies.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Moved from Ubuntu Linux 10 to 14.04-Can't log in now

Post by Christopher »

cecilchampenois wrote:Yes, MySQL does have a database and tables ready to go. The difference between Apache 1 and 2 is that Apache 2 now expects that you will place your PHP files into the HTML foldfer rather directly into the www folder.

Before with Apache 1: /var/www/

Now with Apache 2: /var/www/html/

I also corrected paths for any code that pointed off to former places to the correct places.
Still sounds like you need to narrow down the actual problem.

- It sounds like you can login to MySQL from the command line -- correct?

- In the new database, have you created the user that you PHP application uses to connect to the database? Does it have the correct privileges?

- Can you actually run a PHP script? I can't tell from your responses if PHP actually works?

- From PHP, can you connect to MySQL -- even with a test script? If not it may be the user or privileges mentioned above. Also, sometimes you need to connect to MySQL at 127.0.0.1 vs localhost depending on the server configuration.
(#10850)
Post Reply