genzedu777 Posted September 22, 2010 Share Posted September 22, 2010 Hi, Can someone help me? I have tried to upload my index.php file into my web hosting, but it turns out to give me this error. Fatal error: Call to undefined function mysqli_connect() in D:\inetpub\vhosts\champion.com\httpdocs\index.php on line 40 I have checked my database connection, nothing wrong with it, I have entered the correct username, localhost, password and database name. So what could actually happen? Please kindly advice. Thank you Regards, Wilson Quote Link to comment https://forums.phpfreaks.com/topic/214085-fatal-error-call-to-undefined-function-mysqli_connect/ Share on other sites More sharing options...
trq Posted September 22, 2010 Share Posted September 22, 2010 Your hosting does not have the mysqli extension enabled. What version of php are you using? Quote Link to comment https://forums.phpfreaks.com/topic/214085-fatal-error-call-to-undefined-function-mysqli_connect/#findComment-1114013 Share on other sites More sharing options...
genzedu777 Posted September 22, 2010 Author Share Posted September 22, 2010 Hi thorpe, I am using php 5, I'm not too sure about my web host version though. mysqli_connect is applicable in PHP 5 right? Darn, what am I going to do now? So how should I programme then? Is there any other coding beside 'mysqli_connect' that I can use, which might be suitable for my current web host? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/214085-fatal-error-call-to-undefined-function-mysqli_connect/#findComment-1114018 Share on other sites More sharing options...
genzedu777 Posted September 22, 2010 Author Share Posted September 22, 2010 Hi Thorpe, I have tried using 'mysql_connect', it seems to work, but I am prompted an error for this, do you know what is it about? Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in D:\inetpub\vhosts\championtutor.com\httpdocs\report.php on line 31 Error querying database Quote Link to comment https://forums.phpfreaks.com/topic/214085-fatal-error-call-to-undefined-function-mysqli_connect/#findComment-1114021 Share on other sites More sharing options...
trq Posted September 22, 2010 Share Posted September 22, 2010 That simply means your query is failing and you haven't caught the error. Post your code in php help. Quote Link to comment https://forums.phpfreaks.com/topic/214085-fatal-error-call-to-undefined-function-mysqli_connect/#findComment-1114064 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.