Thursday, February 22, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 3467  / 2 Years ago, fri, march 11, 2022, 2:01:40

Am followoing this amazingly simple LAMP tutorial

http://ubuntuserverguide.com/2014/06/how-to-install-lamp-in-ubuntu-server-14-04-lts.html




  • Installing Apache

  • Installing MySQL

  • Installing PHP



The PROBLEM is:




  • When I check on my brower localhost/phpmysql.php

  • I just see BLANK PAGE

  • If the php had been runned i should see either CONGRATULATIONS or
    ERROR message back.




 <?php
$con = mysql_connect("localhost","root","passwordxxxxxx");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
else
{
echo "Congrats! connection established successfully";
}
mysql_close($con);
?>



Is there any error on this PHP code maybe?
For example: if the password is wrong setup on the PHPMYSQL.PHP file I should get back and ERROR MESSAGE couse i have a ECHO.



Why am getting a blank response? any idea of some workaround?
Thanks


More From » 14.04

 Answers
0

You could find a solution for your problem by searching here based on the error in the logs.



You were missing the php's Mysqli class. Installing MyPHPAdmin (PHPMyAdmin rather) installed mysqli as a side effect, i'm guessing.


[#22696] Sunday, March 13, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nalystcul

Total Points: 390
Total Questions: 106
Total Answers: 115

Location: Tokelau
Member since Sun, May 7, 2023
10 Months ago
nalystcul questions
Sun, May 1, 22, 17:05, 2 Years ago
Mon, Sep 6, 21, 08:12, 3 Years ago
Fri, Mar 18, 22, 20:06, 2 Years ago
;