Getting a fatal error, please help ;-)!?

Discussion in 'PHP' started by mathias, Jul 16, 2009.

  1. #1
    Hello,

    I've just bought a script and installed it on http://twipload.com/ but when uploading a file it's giving me an error...

    Call to undefined function sqlite_open()
    Code (markup):
    Could you check it out and maybe tell me how to solve this problem?

    Regards!
     
    mathias, Jul 16, 2009 IP
  2. DemCage

    DemCage Peon

    Messages:
    77
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The function sqlite_open needs PHP5.

    Check if your hoster is supporting it.
     
    DemCage, Jul 16, 2009 IP
  3. mathias

    mathias Active Member

    Messages:
    691
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #3
    Hi DemCage, I googled for a while and also found that it needs PHP5, the thing is, my host is running PHP 5 so that can't be the problem :D ! That's why I posted over here, I always make sure I check every possible solution on the web before asking questions :D ! Any other ideas?

    Regards.
     
    mathias, Jul 16, 2009 IP
  4. DemCage

    DemCage Peon

    Messages:
    77
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hey :),
    can you find something about SQLite in phpinfo?

    <?PHP
    phpinfo ();
    ?>
    PHP:
     
    DemCage, Jul 16, 2009 IP
  5. mathias

    mathias Active Member

    Messages:
    691
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #5
    Yeah, the following things show up...

    [​IMG]

    Thank you for taking a look at this :) !
     
    mathias, Jul 16, 2009 IP
  6. DemCage

    DemCage Peon

    Messages:
    77
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Can you edit the php.ini?

    extension=php_pdo.dll
    extension=php_sqlite.dll
    Code (markup):
    That's all I could find...
    I hope you can solve the problem. :)
     
    DemCage, Jul 16, 2009 IP
  7. mathias

    mathias Active Member

    Messages:
    691
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #7
    I've just contacted my host, they gave me a default php.ini file which I've uploaded to the correct folder. I've added the lines you've just given me and it is still not working, I'll play around with it for a while, thanks for your help ;) !
     
    mathias, Jul 16, 2009 IP
  8. vpdesigns

    vpdesigns Peon

    Messages:
    353
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Hi mathias, Try do the following then we can narrow it down.

    <?php
    ini_set('display_errors', 1);
    error_reporting(E_ALL);
    
    $conn = mysql_connect("localhost", "USERNAME", "PASSWORD");
    if($conn == false)
    {
       echo "Connection failed: " . mysql_error();
    }
    else
    {
       echo "Connection OK";
    }
    ?> 
    PHP:
    Try connect to the same user as the script. If this doesnt work then you need to contact your host to basically rebuild php with the rite stuff. If it does work then its just the sqllite bit.

    Have you got any other scripts that use sqllite so you can test?
     
    vpdesigns, Jul 17, 2009 IP
  9. iHolyElement

    iHolyElement Guest

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Hey mathias, Sometimes hosts make your default PHP version to 4 or something besides PHP 5, Open up your .htaccess and put in...
    This might be differnt for your host, Try it out though.
     
    iHolyElement, Jul 17, 2009 IP
  10. ks.alam28

    ks.alam28 Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    for uploading files.... i can help u. pm me... @

     
    ks.alam28, Jul 17, 2009 IP
  11. mathias

    mathias Active Member

    Messages:
    691
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #11
    Hello,

    @vpdesigns: Mysql works like a charm, it's just the sqlite thing. And I don't have any other scripts. Is it normal that the sqlite file is totally empty and that I don't have to fill in a username/password?

    @iHolyElement: tried it, still the same error.

    @ks.alam27: eh :D ?
     
    mathias, Jul 18, 2009 IP
  12. ThePHPMaster

    ThePHPMaster Well-Known Member

    Messages:
    737
    Likes Received:
    52
    Best Answers:
    33
    Trophy Points:
    150
    #12
    The lines are suppose to be there, just remove the ";" before them. It would be easier to check the problem if you can post your php.ini file.
     
    ThePHPMaster, Jul 18, 2009 IP
  13. mathias

    mathias Active Member

    Messages:
    691
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #13
    mathias, Jul 18, 2009 IP
  14. vpdesigns

    vpdesigns Peon

    Messages:
    353
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Well you need to get your host to install it. Thats the problem lol. And if they say it is installed ask them why the module isnt loaded in PHP.
     
    vpdesigns, Jul 18, 2009 IP
  15. ThePHPMaster

    ThePHPMaster Well-Known Member

    Messages:
    737
    Likes Received:
    52
    Best Answers:
    33
    Trophy Points:
    150
    #15
    This file seems like a PHP 4.x version of php.ini. In the latest PHP 5.x version, you will find "extension=php_sqlite.dll" pre-entered and loaded by default.
     
    ThePHPMaster, Jul 18, 2009 IP
  16. DemCage

    DemCage Peon

    Messages:
    77
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #16
    You can also try this:

    Create a ".htaccess" ([dot]htaccess) file with the following lines and upload it in your root directory.

    AddHandler x-httpd-php5 .php
    AddType application/x-httpd-php5 .php
    Code (markup):
    I really hope that works :D
     
    DemCage, Jul 18, 2009 IP