php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73894 Mysqli Connection not working as per example
Submitted: 2017-01-09 04:37 UTC Modified: 2017-01-09 04:48 UTC
From: sunilpandya at hotmail dot com Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.6.29 OS: linux
Private report: No CVE-ID: None
 [2017-01-09 04:37 UTC] sunilpandya at hotmail dot com
Description:
------------
$mysqli = new mysqli("localhost","sunil_pandya", "Sunbirth@1961", "jomapop");
if (mysqli_connect_error()) {
    die('Connect Error (' . mysqli_connect_errno() . ') '
            . mysqli_connect_error());
}

Expected result:
----------------
Connection to Mysql

Actual result:
--------------
Undefind function new mysqli, I have web hosting space with in.godaddy.com, which is shared hosting shows they are using 5.6.25 version of php.

When I put above code with my username,password,databse details, log file of  public_html shows undefined function new mysqli, while netbean ide shows 
Unwanted string '' after, so what exactly is the code. 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-09 04:48 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2017-01-09 04:48 UTC] requinix@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

You do not have the mysqli extension installed. Look for help resources about GoDaddy or contact support.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 20:01:32 2024 UTC