Page 1 of 1

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

Posted: Tue Nov 18, 2014 8:32 am
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

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

Posted: Tue Nov 18, 2014 8:37 am
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?

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

Posted: Tue Nov 18, 2014 10:41 am
by cecilchampenois
Yes, both Apache2 and MYSQL are running.

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

Posted: Wed Nov 19, 2014 8:34 am
by Weirdan
Does MySQL have tables and data in those tables required by your application?

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

Posted: Fri Dec 12, 2014 7:23 am
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.

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

Posted: Fri Dec 12, 2014 7:30 am
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.

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

Posted: Fri Dec 12, 2014 3:39 pm
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.