KDawg08 Posted February 19, 2009 Share Posted February 19, 2009 I have an error on my site... If this is in the wrong section I'm sorry, It is a mysql/php error... Error: [1] [Fatal Error] Call to undefined function mysqli_real_escape_string() Line: [200] /home/chithead/public_html/tube/common/classes/adodb/drivers/adodb-mysqli.inc.php Here are the lines... 198 if (!$magic_quotes) { 199 if (PHP_VERSION >= 5) 200 return "'" . mysqli_real_escape_string($this->_connectionID, $s) . "'"; 201 202 if ($this->replaceQuote[0] == '\\') Context Variables: array ( 'matches' => array ( 0 => 'Fatal error: Call to undefined function mysqli_real_escape_string() in /home/chithead/public_html/tube/common/classes/adodb/drivers/adodb-mysqli.inc.php on line 200', 1 => 'Fatal error', 2 => 'Call to undefined function mysqli_real_escape_string()', 3 => '/home/chithead/public_html/tube/common/classes/adodb/drivers/adodb-mysqli.inc.php', 4 => '200', ), 'val' => '200', 'key' => 4, ) I have MYSQL version 5.0.67 and for mysqli it says requires 5.0.7 or higher... if i upgrade MYSQL versions while hosting 24 websites, will it screw the other sites up that use MYSQL? IF SO, is there a way around this error? i tried changing mysqli to mysql but it just added more errors. Quote Link to comment Share on other sites More sharing options...
Mchl Posted February 19, 2009 Share Posted February 19, 2009 Upgrading should have no effect on those sites, provided that you take care, that the configuration options stay the same. Oh, and check if you have mysqli extension enabled at all in your php.ini Quote Link to comment Share on other sites More sharing options...
KDawg08 Posted February 19, 2009 Author Share Posted February 19, 2009 Upgrading should have no effect on those sites, provided that you take care, that the configuration options stay the same. Oh, and check if you have mysqli extension enabled at all in your php.ini Any suggestions or advice on upgrading? I have cpanel/whm/ftp/ssh access, trying to find the easiest way without screwing up anything... I just wanna upgrade it as easy as possible without any downtime if possible. Quote Link to comment Share on other sites More sharing options...
Mchl Posted February 19, 2009 Share Posted February 19, 2009 If your site is on hosted server, you should ask your host to do the upgrade. It's high time anyway. There is no possibility to do it without any downtime. You have to shut down the server to do it. Quote Link to comment Share on other sites More sharing options...
KDawg08 Posted February 19, 2009 Author Share Posted February 19, 2009 actually it's a server hosted by ThePlanet.com but it's my server... i have to do this myself they won't do it. so i'm trying to figure out how to do it... any suggestions or ideas or know anyone that might be willing to take a few minutes to explain it to me via msn or something? Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted February 19, 2009 Share Posted February 19, 2009 The php mysqli extension works with mysql 4.1 or higher - The mysqli extension allows you to access the functionality provided by MySQL 4.1 and above. Where did you find the information that stated you need mysql 5.0.7, because that is not correct. You do need php5 to get the mysqli extension and that extension must be enabled. The error means that the mysqli extension is not enabled in php. It also means that your code did not attempt to create a mysqli connection, because you would have gotten a similar error message about the mysqli_connect function being undefined. Quote Link to comment Share on other sites More sharing options...
Mchl Posted February 19, 2009 Share Posted February 19, 2009 http://www.php.net/manual/en/mysqli.requirements.php Although 5.0.67 IS indeed higher than 5.0.7 Quote Link to comment Share on other sites More sharing options...
KDawg08 Posted February 19, 2009 Author Share Posted February 19, 2009 I was told that 5.0.67 was lower... my issue is that i was told mysqli isn't supported with that version of mysql... my php version is PHP version 5.2.8 Any suggestions how to get my server to support mysqli ? (Sorry if this sounds repetitive) Quote Link to comment Share on other sites More sharing options...
Mchl Posted February 19, 2009 Share Posted February 19, 2009 67 is higher than 7 so 5.0.67 is newer than 5.0.7 5.0.7 was released on June 10th 2005 link 5.0.67 was released on August 4th 2008 link phpinfo search for mysqli Do you have ability to edit your php.ini file? Oh... and I'am almost sure 5.0.67 supports mysqli, as I was using 5.0.51 which did. Quote Link to comment Share on other sites More sharing options...
KDawg08 Posted February 19, 2009 Author Share Posted February 19, 2009 Yes I have 100% access to my phpini file. Quote Link to comment Share on other sites More sharing options...
Mchl Posted February 19, 2009 Share Posted February 19, 2009 Then search for mysqli in the extensions section in the php.ini and uncomment it if necessary. Quote Link to comment Share on other sites More sharing options...
KDawg08 Posted February 19, 2009 Author Share Posted February 19, 2009 Then search for mysqli in the extensions section in the php.ini and uncomment it if necessary. i did a search in the FULL php.ini for mysqli and found nothing. Quote Link to comment Share on other sites More sharing options...
Mchl Posted February 19, 2009 Share Posted February 19, 2009 Well... that's pretty strong indication that it is disabled. What do you see if you search for mysql ? Quote Link to comment Share on other sites More sharing options...
KDawg08 Posted February 19, 2009 Author Share Posted February 19, 2009 This is what i find while searching for mysql i even double checked it. [MySQL] ; Allow or prevent persistent links. mysql.allow_persistent = On ; Maximum number of persistent links. -1 means no limit. mysql.max_persistent = -1 ; Maximum number of links (persistent + non-persistent). -1 means no limit. mysql.max_links = -1 ; Default port number for mysql_connect(). If unset, mysql_connect() will use ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the ; compile-time value defined MYSQL_PORT (in that order). Win32 will only look ; at MYSQL_PORT. mysql.default_port = ; Default socket name for local MySQL connects. If empty, uses the built-in ; MySQL defaults. mysql.default_socket = ; Default host for mysql_connect() (doesn't apply in safe mode). mysql.default_host = ; Default user for mysql_connect() (doesn't apply in safe mode). mysql.default_user = ; Default password for mysql_connect() (doesn't apply in safe mode). ; Note that this is generally a *bad* idea to store passwords in this file. ; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password") ; and reveal this password! And of course, any users with read access to this ; file will be able to reveal the password as well. mysql.default_password = ; Maximum time (in seconds) for connect timeout. -1 means no limit mysql.connect_timeout = 60 ; Trace mode. When trace_mode is active (=On), warnings for table/index scans and ; SQL-Errors will be displayed. mysql.trace_mode = Off [mSQL] ; Allow or prevent persistent links. Quote Link to comment Share on other sites More sharing options...
Mchl Posted February 19, 2009 Share Posted February 19, 2009 Hmm... nothing about extensions? You might need to ask your hosting company to enable mysqli for you. And do tell them them, that both PHP 5.2.8 and MySQL 5.0.67 support mysqli. Quote Link to comment Share on other sites More sharing options...
KDawg08 Posted February 19, 2009 Author Share Posted February 19, 2009 I run a Cent OS server if that makes any difference... my php.ini is in usr/local/bin unless FC7 etc. Hosted by The Planet My best bet is have them enable it for me then? Quote Link to comment Share on other sites More sharing options...
KDawg08 Posted February 19, 2009 Author Share Posted February 19, 2009 I run a Cent OS server if that makes any difference... my php.ini is in usr/local/bin unless FC7 etc. Hosted by The Planet My best bet is have them enable it for me then? i have DYNAMIC Extensions section but that's for WINDOWS and CentOS is linux... Quote Link to comment Share on other sites More sharing options...
angelcool Posted February 19, 2009 Share Posted February 19, 2009 PHP must to be compiled with mysqli support if you wish to use it. configure --with-mysqli Do a phpinfo() and check the parameters used when PHP was compiled. If you do not see it, it means you have to recompile PHP. Angel Quote Link to comment Share on other sites More sharing options...
KDawg08 Posted February 19, 2009 Author Share Posted February 19, 2009 how do i check that screenshot u just posted? I have whm to view also i had that screen up but forgot how to get there. Quote Link to comment Share on other sites More sharing options...
Mchl Posted February 19, 2009 Share Posted February 19, 2009 phpinfo Quote Link to comment Share on other sites More sharing options...
KDawg08 Posted February 19, 2009 Author Share Posted February 19, 2009 yeah didn't help me much, i'm not smart with those commands... Quote Link to comment Share on other sites More sharing options...
Mchl Posted February 19, 2009 Share Posted February 19, 2009 just make a simple script <?php phpinfo(); ?> and run it in your browser Quote Link to comment Share on other sites More sharing options...
KDawg08 Posted February 19, 2009 Author Share Posted February 19, 2009 Build Date Dec 22 2008 10:57:54 Configure Command './configure' '--disable-pdo' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-sockets' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-curl=/opt/curlssl/' '--with-curlwrappers' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-png-dir=/usr' '--with-ttf' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr' i don't see it in there. Quote Link to comment Share on other sites More sharing options...
Mchl Posted February 19, 2009 Share Posted February 19, 2009 So it is not enabled. You have to ask your host to enable it. Quote Link to comment Share on other sites More sharing options...
KDawg08 Posted February 19, 2009 Author Share Posted February 19, 2009 Well i asked them to upgrade it for me, posted a link to this thread and this is what i got back... Michael C. - Thursday February 19th, 2009; 4:56 AM CST Dear Customer, While the information provided to you may be correct, as you are the servers administrator you'll need to upgrade php and mysql. You'll need to use "/scripts/mysqlup --force" from ssh and it should update you to that latest version supported by cpanel. Thank you for choosing The Planet. MichaelC Technical Support www.ThePlanet.com Any suggestions now? I am told I have to upgrade it and i'm not sure how to do any of this, and i don't wanna screw up my server. Quote Link to comment 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.