Menu

#62 Installation Error

1.2.1-ST
open
Tim Gall
None
1
2014-01-18
2014-01-17
Anonymous
No

Tim, unzipped the files to the osTicket (v1.7.0) directory and am throwing an error running the osFAQ (v1.2.1-ST) installer (see attached).

Thanks for your help!
mayibefrank@gmail.com

1 Attachments

Discussion

  • Anonymous

    Anonymous - 2014-01-17

    Appears to be a mysqli issue even after I've enabled the extension in php.ini. I'm on OSX (10.6 Snow Leopard) server.

     
  • Tim Gall

    Tim Gall - 2014-01-17

    Hi,
    It appears to be due to the relative path in the "require_once" I think. EG: "../../"
    The problem should only affect the installer; after that the mysqli helper file is loaded directly by osTicket (its an osTicket file).

    I'll try and put something together to get around it. If youre in a hurry, you could try making a copy of the upgrade/install SQL for you're type of upgrade/install (the SQL files are clearly labelled and located in faq/setup/inc/).
    For instance a clean install uses "osfaq-121ST.sql".
    Then do a search and replace on the SQL file, replacing:
    TABLE_PREFIX
    with your osTicket table prefix (if you didnt change anything when installing osTicket it will be "ost_").
    Then install the SQL using PhpMyAdmin or similar and perform the integration steps manually using the instructions on the osFaq website http://osfaq.oz-devworx.com.au/documentation/install-guide/osfaq-v1-2-rc-install-guide/

    Regards,
    Tim

    PS: You could also try hardcoding the absolute file path for the offending require_once in the file faq/setup/intro.php (line 167). EG: replace ROOT_PATH with the absolute file path (the files located in the osTicket file structure in the include folder; thats 2 directories up from the faq/setup/intro.php file.). Im not sure how it will go but its pretty quick to try.

     

    Last edit: Tim Gall 2014-01-17
  • Tim Gall

    Tim Gall - 2014-01-17

    The error is being thrown due to security settings your PHP engine is running. To get around it, you can add:

    __DIR__.
    

    (thats 2 underscores before and after the DIR.)
    to the require_once instances that are causing the problem.

    EG: require_once(__ DIR__ . ROOT_PATH . 'include/mysqli.php');
    

    There 3 instances of it in the installer:
    faq/setup/intro.php (line 167)
    and for fresh installs:
    faq/setup/inc/schema.php (line27)
    or for upgrades:
    faq/setup/inc/schema_up.php (line27)

    Hope that helps. I will release it as a patch later today and work the changes into the next release.

    Regards,
    Tim

     

    Last edit: Tim Gall 2014-01-18
  • Tim Gall

    Tim Gall - 2014-01-18

    Additional notes:

    For versions of PHP >= 5.3.0 use:

    require_once( __DIR__ . ROOT_PATH . 'include/mysqli.php' );
    

    For versions of PHP < 5.3.0 use:

    require_once( dirname(__FILE__) . ROOT_PATH . 'include/mysqli.php' );
    

    mysqli or mysql:
    Your choice of using mysql or mysqli wont affect the installer but generally mysqli is quite superior to mysql. Just make sure you edit the mysql.php require's instead if you dont have the mysqli extension enabled.

    PS: the "i" in mysqli stands for improved.

     

    Last edit: Tim Gall 2014-01-18
  • Tim Gall

    Tim Gall - 2014-01-18

    I was on the right track but the fix is a little more comprehensive than my first ideas. I ended up fixing it in the installers setting file so its a global fix for all paths that would have caused the same error.

    The attachment contains a folder called upload and a readme file with instructions. Just upload the contents of the upload folder to your osTicket install location like you did for the original osFaq install/upgrade and you should be good to run the installer/upgrader.
    Please let me know how it goes.

    Regards,
    Tim

     

Anonymous
Anonymous

Add attachments
Cancel