This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

error message Fatal error: Call to undefined function cmtx_db_num_rows() in /home/con
#1

After installing / trying to integrate I get this error message:


Fatal error: Call to undefined function cmtx_db_num_rows() in /home/confortu/public_html/comm/includes/db/connect.php on line 66
(after this error the whole page is blank and the php code is not displaying the page ... see here: www.confortul.ro/curs_contabil.php)

After a google search I suspect that has something to do with my php installation ... unfortunately i have the site hosted by a hosting provider and can not access the php install folder.
If this is the case ... can someone help me with some sort of workaround or with what should I ask my hosting provider for?
My php programming level is quite low ... so be patient with this one please Smile)

Thanks in advance!
Reply
#2

Hi,

This is a script error so isn't related to your hosting. You're going to need FTP access to the script to resolve it. Check that the file /upload/includes/db/functions.php exists and that the function cmtx_db_num_rows() is inside it. It might be worth re-uploading that file just in case it was corrupted during the initial transfer.

Have you completed the interview?
Reply
#3

the function is called here (in connect php) like this:

Code:
if (cmtx_db_num_rows(cmtx_db_query("SHOW TABLES LIKE '" . $cmtx_mysql_table_prefix . "comments'")) == 0) {
    if (defined('CMTX_IN_ADMIN')) {
        cmtx_db_error_table();
        $cmtx_db_ok = false;
        return;
    } else if (defined('CMTX_IN_INSTALLER')) {
    } else {
        cmtx_db_error_general();
        $cmtx_db_ok = false;
        return;
    }
}

and it is defined in functions php like this:

Code:
function cmtx_db_num_rows($resource) {

    $result = mysqli_num_rows($resource);
    
    return $result;

} //end of db-num-rows function


... any ideas ???
Reply
#4

In /upload/includes/db/connect.php, replace this line of code:

PHP Code:
<?php 
require_once 'functions.php'; //load database functions

With the code from /upload/includes/db/functions.php.

Have you completed the interview?
Reply
#5

WOW !!! It worked !!! THANKS !!! Any idea why the require_once was not working in the code for me ??
Reply
#6

I'm not sure to be honest. It must have found the file, otherwise it would have shown a different error, but for some reason it didn't include the code from it.

Have you completed the interview?
Reply
#7

ok than. once again thank you for the solution. problem solved this thread can be closed!
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by MattyP
11-Apr-2020, 08:08 PM
Last Post by CommiC
13-Aug-2012, 09:16 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)