hello friends,
I am working with stored procedure in my sql.I m traying to call SP in php but i fail to do that.
I have already configer mysqli.dll file in php. but still i m gating error :Fatal error: Call to undefined function mysqli_connect() in C:\Employees\Ajay\SP\test.php on line 4

can any one tell me why i m gating this error.

Recommended Answers

All 6 Replies

i will try to configure that on my server to see if i get the same error. then if i am successful i will tell you how i did it.

nevermind, i did a little research on that and it is only for php 5. i have php 4 right now.

ok I m sanding code also so you can reffer that cone also and can tell me where i m wrong

<?php
ini_set("display_errors", 1); 
/* Connect to a MySQL server */
$link = mysqli_connect('192.168.1.4','ajay','the@123');

if (!$link) {
printf("Can't connect to MySQL Server. Errorcode: %s\n", mysqli_connect_error());
exit;
}


/* Send a query to the server */
if ($result = mysqli_query($link, "p3('crm')")) {


/* Fetch the results of the query */
while( $row = mysqli_fetch_array($result) ){

echo ($row[0]. "--------- SR. " . $row[1] . "<br>");

}

/* Destroy the result set and free the memory used for it */
mysqli_free_result($result);
}

/* Close the connection */
mysqli_close($link);
?>

In above code p3() is my S.P. to which I want to call.

i will try to configure that on my server to see if i get the same error. then if i am successful i will tell you how i did it.

yes you r right this is for php5 & mysql 5(or upper version)

nevermind, i did a little research on that and it is only for php 5. i have php 4 right now.

there is nothing wrong with the code from what i can tell. the only thing i can think of is the configuration of php. its giving you this fatal error because the function mysqli_connect is nonexistent. you must not of configured the dll correctly

yes kkeith you are right.after configering again my come is working fine
thanks for u r support.

there is nothing wrong with the code from what i can tell. the only thing i can think of is the configuration of php. its giving you this fatal error because the function mysqli_connect is nonexistent. you must not of configured the dll correctly

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.