Welcome to dbFreaks.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

PHP-MYSQL-Apache MYSQLi_CONNECT questions

 
   Database Help (Home) -> PHP SQL RSS
Next:  sql and increment  
Author Message
Allenx

External


Since: Aug 15, 2008
Posts: 2



(Msg. 1) Posted: Fri Aug 15, 2008 12:17 pm
Post subject: PHP-MYSQL-Apache MYSQLi_CONNECT questions
Archived from groups: alt>php>sql (more info?)

My 'mysqlconnect.php' simple connection test script returns a browser
message

"PHP Fatal Error: Class 'Mysqli_connect" not found in c:\\program
files\apache group\ .....\mysqlconnect.php"

I've been fighting this well-known problem for three days. I got the
application code and simple test script from a book "Teach Yourself PHP,
MySQL and Apache". I am not an expert but tried to rigorously follow the
installation directions. I have tried almost every combination / permutation
suggested by internet posters to no avail. Here are some basic questions;

- In which .dll is the function "Mysqli_connect" located? I think the
choices are
libmysql.dll (as installed in the c:/php folder) or php_mysqli.dll in
the c:/php/ext folder

- Is there a difference in version5 between enabling a php.ini extension for
MySQL and MySQLi ?

- Does the order of the PATH statement make a difference to MySQL when
trying to locate the .dll containing the Mysqli_connect function?

- Should there ever be more than one libmysql.dll in a working installation?

FYI, there are no apache error messages when the script runs. Also a script
using phpinfo() does run and records Mysqli settings.

Other info....

MYSQL 5.0.20
Apache 2.0.58
PHP 5.1.4
Windows Home XP SP-2

Thank you for your help

 >> Stay informed about: PHP-MYSQL-Apache MYSQLi_CONNECT questions 
Back to top
Login to vote
NC

External


Since: Nov 20, 2007
Posts: 102



(Msg. 2) Posted: Fri Aug 15, 2008 12:17 pm
Post subject: Re: PHP-MYSQL-Apache MYSQLi_CONNECT questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Aug 15, 9:17 am, "Allenx" <br1n....DeleteThis@gmail.com> wrote:
>
> My 'mysqlconnect.php' simple connection test script returns a browser
> message
>
> "PHP Fatal Error: Class 'Mysqli_connect" not found in c:\\program
> files\apache group\ .....\mysqlconnect.php"

Any chance this is because this class isn't defined anywhere? The
mysqli extension defines four classes:

MySQLi
MySQLi_ STMT
MySQLi_ Result
MySQLi_ Driver

and Mysqli_connect is not one of them...

It seems to me you are confusing the MySQLi class with the
mysqli_connect method...

Cheers,
NC

 >> Stay informed about: PHP-MYSQL-Apache MYSQLi_CONNECT questions 
Back to top
Login to vote
Allenx

External


Since: Aug 15, 2008
Posts: 2



(Msg. 3) Posted: Mon Aug 18, 2008 8:20 pm
Post subject: Re: PHP-MYSQL-Apache MYSQLi_CONNECT questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

MY simple PHP script (named mysqlconnect.php) first two lines are

<?php
$mysqli = new mysqli ("localhost", "me", "mypassword", "db1");
...........etc

The script bombs out immediately with the error message
"PHP Fatal Error: Class 'Mysqli_connect" not found in c:\\program
> files\apache group\ .....\mysqlconnect.php"

This seems like a library routine has not been located in the PATH
described.

I don't know what the "Class" refers to or how to fix it. Any insight would
be appreciated.

Thank ou


"NC" <nc.DeleteThis@iname.com> wrote in message
news:3cb751ae-4aeb-40eb-9069-87543a42c670@z11g2000prl.googlegroups.com...
On Aug 15, 9:17 am, "Allenx" <br1n....DeleteThis@gmail.com> wrote:
>
> My 'mysqlconnect.php' simple connection test script returns a browser
> message
>
> "PHP Fatal Error: Class 'Mysqli_connect" not found in c:\\program
> files\apache group\ .....\mysqlconnect.php"

Any chance this is because this class isn't defined anywhere? The
mysqli extension defines four classes:

MySQLi
MySQLi_ STMT
MySQLi_ Result
MySQLi_ Driver

and Mysqli_connect is not one of them...

It seems to me you are confusing the MySQLi class with the
mysqli_connect method...

Cheers,
NC
 >> Stay informed about: PHP-MYSQL-Apache MYSQLi_CONNECT questions 
Back to top
Login to vote
Ian Pawson

External


Since: Jul 17, 2008
Posts: 4



(Msg. 4) Posted: Tue Aug 19, 2008 8:10 am
Post subject: Re: PHP-MYSQL-Apache MYSQLi_CONNECT questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Allenx wrote:
> My 'mysqlconnect.php' simple connection test script returns a browser
> message
>
> "PHP Fatal Error: Class 'Mysqli_connect" not found in c:\\program
> files\apache group\ .....\mysqlconnect.php"
>
> I've been fighting this well-known problem for three days. I got the
> application code and simple test script from a book "Teach Yourself PHP,
> MySQL and Apache". I am not an expert but tried to rigorously follow the
> installation directions. I have tried almost every combination / permutation
> suggested by internet posters to no avail. Here are some basic questions;
>
> - In which .dll is the function "Mysqli_connect" located? I think the
> choices are
> libmysql.dll (as installed in the c:/php folder) or php_mysqli.dll in
> the c:/php/ext folder
>
> - Is there a difference in version5 between enabling a php.ini extension for
> MySQL and MySQLi ?
>
> - Does the order of the PATH statement make a difference to MySQL when
> trying to locate the .dll containing the Mysqli_connect function?
>
> - Should there ever be more than one libmysql.dll in a working installation?
>
> FYI, there are no apache error messages when the script runs. Also a script
> using phpinfo() does run and records Mysqli settings.
>
> Other info....
>
> MYSQL 5.0.20
> Apache 2.0.58
> PHP 5.1.4
> Windows Home XP SP-2
>
> Thank you for your help
>
>
try calling the phpinfo() funtion and look at the output to see if you
have the misqli module installed ie
<?
phpinfo();
?>
 >> Stay informed about: PHP-MYSQL-Apache MYSQLi_CONNECT questions 
Back to top
Login to vote
Display posts from previous:   
   Database Help (Home) -> PHP SQL All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]