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
Moved from Ubuntu Linux 10 to 14.04-Can't log in now
Moderator: General Moderators
-
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
Last edited by cecilchampenois on Tue Nov 18, 2014 10:38 am, edited 1 time in total.
Cecil Champenois
Re: Moved from Ubuntu Linux 10 to 14.04-Can't log in now
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
Yes, both Apache2 and MYSQL are running.
Cecil Champenois
Re: Moved from Ubuntu Linux 10 to 14.04-Can't log in now
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
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.Weirdan wrote:Does MySQL have tables and data in those tables required by your application?
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
Re: Moved from Ubuntu Linux 10 to 14.04-Can't log in now
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.
- 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
Still sounds like you need to narrow down the actual problem.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.
- 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)