We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24397
    • 17 Posts
    Hello,

    statement
    include_once $this->apiFile; in the class file "smf.sync.class.inc.php"

    includes the file "smf_api_1.1.php", I confirmed the same by running :

    echo "<pre>";print_r(get_included_files());echo "</pre>";exit;

    and it shows the included file (please not the last element of the array):
    Array
    (
        [0] => /home/ilng/public_html/mtgcss/manager/index.php
        [1] => /home/ilng/public_html/mtgcss/manager/includes/protect.inc.php
        [2] => /home/ilng/public_html/mtgcss/manager/includes/quotes_stripper.inc.php
        [3] => /home/ilng/public_html/mtgcss/manager/includes/config.inc.php
        [4] => /home/ilng/public_html/mtgcss/manager/includes/document.parser.class.inc.php
        [5] => /home/ilng/public_html/mtgcss/manager/includes/extenders/dbapi.mysql.class.inc.php
        [6] => /home/ilng/public_html/mtgcss/manager/includes/extenders/manager.api.class.inc.php
        [7] => /home/ilng/public_html/mtgcss/assets/cache/siteCache.idx.php
        [8] => /home/ilng/public_html/mtgcss/manager/includes/settings.inc.php
        [9] => /home/ilng/public_html/mtgcss/manager/includes/version.inc.php
        [10] => /home/ilng/public_html/mtgcss/manager/includes/accesscontrol.inc.php
        [11] => /home/ilng/public_html/mtgcss/manager/includes/user_settings.inc.php
        [12] => /home/ilng/public_html/mtgcss/manager/includes/lang/english.inc.php
        [13] => /home/ilng/public_html/mtgcss/manager/media/style/MODxLight/style.php
        [14] => /home/ilng/public_html/mtgcss/manager/includes/error.class.inc.php
        [15] => /home/ilng/public_html/mtgcss/manager/processors/execute_module.processor.php
        [16] => /home/ilng/public_html/mtgcss/assets/modules/smforum/smf.base.class.inc.php
        [17] => /home/ilng/public_html/mtgcss/assets/modules/smforum/smf.sync.class.inc.php
        [18] => /home/ilng/public_html/mtgcss/forum//Settings.php
        [19] => /home/ilng/public_html/mtgcss/forum/Settings.php
        [20] => /home/ilng/public_html/mtgcss/assets/modules/smforum/smf_api_1.1.php
    )


    and I ran file_exists($this->apiFile;); also to confirm that file exists.

    But a call to any of the functions in this included file "smf_api_1.1.php" gives me error:
    Fatal error: Call to undefined function smf_registermember()


    This works fine on my local machine, a windows XP SP2 with XAMPP, but the problem occurs on Linux Server (Hosting servers). I tried running it on two different servers from two different Hosting Companies.

    Please help, I failed to understand why an included file’s functions are not recognized?

    I installed MODx - SMF bridge, this occurs in this particular module.

    Regards
    Rajeev
      • 26903
      • 1,336 Posts
      Shot in the dark but I take it you have done a ’dos2unix’ on these files before installing them on linux, otherwise the file will not be interpreted correctly. If you’ve FTP’d these it may be done for you, just something to check.
        Use MODx, or the cat gets it!
        • 24397
        • 17 Posts
        Thanks shamblett for the reply,

        I downloaded these files from the modxcms and SMF websites on my local system, unzipped them and FTP to the hosting server, there I installed them, I did not upload my local working version.

        Regards,
        Rajeev

          • 26903
          • 1,336 Posts
          I downloaded these files from the modxcms and SMF websites on my local system, unzipped them and FTP to the hosting server, there I installed them, I did not upload my local working version
          Isn’t this the same thing? Try loading them to the linux server and unzipping them, then install them from there.
            Use MODx, or the cat gets it!
            • 24397
            • 17 Posts
            Thanks shamblett, It worked.

            I’m so thankful to you.

            Thanks again.

            Regards,
            Rajeev