SQLite problem with Falko's howto: Installing a Lamp Sys. w/FC6

Discussion in 'HOWTO-Related Questions' started by cmawhorter, Feb 2, 2008.

  1. cmawhorter

    cmawhorter New Member

    I basically followed http://www.howtoforge.com/installing_a_lamp_system_with_fedora_core_6 to setup my system and I am having problems using SQLite. I am getting the error:

    Code:
    PHP Fatal error:  Class 'SQLiteDatabase' not found in /path/to/a.php on line 3, referer: http://www.example.com/
    
    phpinfo shows that pdo and sqlite are both installed but I cannot use SQLite. Anyone have any clues?

    Google turns up next to nothing for the error.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What's in /path/to/a.php?
     
  3. cmawhorter

    cmawhorter New Member

    First of all I'd like to thank you for your howto. It was very helpful and I learned a lot.

    The path/to/a.php is just a test php file I setup. The code is below.

    PHP:
    <?php
    echo 'start<BR>';

    try {
    $s = new SQLiteDatabase('site/test.sqlite');
    }catch(
    Exception $ex) {
            
    print_r($ex);
            echo 
    'error';
    }

    echo 
    'here';
    ?>

    I've verified that PHP can create files with touch and I've even given apache ownership of the test.sqlite file but it doesn't seem to be a permissions thing. The strange part is I can't catch the error. After failing it just dies.
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Is there a php-sqlite module for FC6, and if so, is it installed?
    Please search for PHP modules like this:
    Code:
    yum search php
     
  5. cmawhorter

    cmawhorter New Member

    There is not a php-sqlite module. yum search (php-sqlite,php,sqlite) turns up nothing about php and sqlite together.
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Can you create the follwing PHP file and call it in a browser?
    PHP:
    <?php
    phpinfo
    ();
    ?>
    IS SQLite mentioned somewhere in the output?
     
  7. cmawhorter

    cmawhorter New Member

    Here are the relavant parts:

    I can PM any interested parties a link to the phpinfo file.
     
  8. falko

    falko Super Moderator Howtoforge Staff

    That's strange... :confused:
     
  9. cmawhorter

    cmawhorter New Member

    I used your tutorial to setup both a production and test server and this is happening on both. Have you experienced the same problems with servers you've setup?

    Do you know if its possible to ./configure php with sqlite support compiled in from a yum install? I guess my only alternative would be build it myself from source?

    Thanks
     
  10. falko

    falko Super Moderator Howtoforge Staff

    I usually don'T work with SQLite, so I can't tell...

    In chapter 5 on http://www.howtoforge.com/virtual-users-and-domains-postfix-courier-mysql-fedora8 there's a description how to build a Postfix rpm from a source rpm. I think you can adjust it to PHP.
     

Share This Page