Fatal error: could not find driver in Lite.php on line 883

Discussion in 'Troubleshooting' started by doyo, Oct 17, 2014.

  1. doyo

    doyo New Member

    Joined:
    Aug 16, 2012
    Messages:
    23
    I need to parse my html website as php so that members will see the correct content. I tried this with xampp "localhost" first and it worked there, however, when I set up a test folder at my website, I received the error below and I do not know how to resolve it.

    Server information:
    My website uses php 5.4.x fastcgi
    It is a shared server at dreamhost which was recently upgraded to use Ubuntu 12.04 Precise
    The test folder, and only the test folder, has in its htaccess:
    AddHandler application/x-httpd-php .html .htm
    (I tried other AddHandler's to no effect)
    I tried these and they did not help
    addhandler x-httpd-php-cgi .php4
    addhandler x-httpd-php5-cgi .php
    addhandler x-httpd-php5-cgi .php5​

    ----------------
    The code in the webpage:

    Code:
    <?php require_once '/home/user/siteurl.org/dymem/library/Am/Lite.php';?>
    <!DOCTYPE html>
    <html lang="en">
    <head> ......
    ---------------------
    The error:

    Fatal error
    : could not find driver in /home/user/siteurl.org/dymem/library/Am/Lite.php on line 883

    I cannot move forward until I resolve the error, but I don't know what it means. Can anyone shed some light on this?
  2. thehpmc

    thehpmc aMember Pro Customer

    Joined:
    Aug 24, 2006
    Messages:
    901
    You need to check the correct php path for includes to see if the above is fully correct but would normally follow the format /home/actual_hosting_username/directory etc.

    Go into your aMember admin panel and select 'system info' left hand menu. Now in all the right hand listing look for heading 'PHP Variables'.

    In that block look for 'SERVER["DOCUMENT_ROOT"]' entry and this is what should form the first part of the path to Am/Lite.php

    Remember you must do this on the actual server site is hosted on.
  3. doyo

    doyo New Member

    Joined:
    Aug 16, 2012
    Messages:
    23
    Thank you for your detailed instructions and, by following your instructions, I found the 'SERVER["DOCUMENT_ROOT"]' entry and indeed /home/.../ is the correct path.

    Even though it was the same path, I pasted it into the page, uploaded it, and the error continued.

    I really want this it work.

    After posting here, something that I had read a few days ago came back to haunt me. It was written by Alexander at
    Help please with basic code for sign in/sign out menu link
    He wrote .
    Despite reading this, I had tried using am/Lite on the localhost on my computer where I had installed amember for testing purposes. In the htaccess, I set the html pages to be parsed as php and it worked! I was hoping that it would also work at my actual server where I currently have amember installed.

    I would very much like to keep the ".htm" for obvious reasons.

    I'm going to have to study on this and see if I can find a solution to keep the "htm" and use am/Lite.
  4. thehpmc

    thehpmc aMember Pro Customer

    Joined:
    Aug 24, 2006
    Messages:
    901
    Sorry but can you explain that please?
  5. doyo

    doyo New Member

    Joined:
    Aug 16, 2012
    Messages:
    23
    Of course, my website has been around for 16 years and it's been linked quite a bit over the years. If I drop the htm from the url, then all of those links would become broken.

    If I really can't use am/Lite in html even when it is parsed as php, I will need to find a solution. I've been reading up on htaccess, mod_rewrite, and such. I might also ask aMember for help except I am uncertain whether this is an issue with my server configuration or if I am just missing something.
  6. thehpmc

    thehpmc aMember Pro Customer

    Joined:
    Aug 24, 2006
    Messages:
    901
    At the moment you may have more than one issue so personally, to start with, I would change the extension to php and get site working as you want.

    Then start to tackle the problem of using the '.htm extension. That way you would only have to be concerned with one issue at a time.

    One possibility when using the'.htm' extension could be to have an independent file to handle the AM/lite processes and call this from your '.htm' page. Sort of have an iFrame the contents of which might be in PHP.
  7. doyo

    doyo New Member

    Joined:
    Aug 16, 2012
    Messages:
    23
    You are right. I need to just bite the bullet and do it.

    Thank you for your help. =)
  8. thehpmc

    thehpmc aMember Pro Customer

    Joined:
    Aug 24, 2006
    Messages:
    901
    The main thing is get it working and then concentrate on file extensions. Eliminate one problem at a time.
  9. doyo

    doyo New Member

    Joined:
    Aug 16, 2012
    Messages:
    23
    My son found a solution in dreamhost's wiki. I will post it in case anyone else has this same problem of using AM/Lite in html files with the .htm extension at dreamhost, or to be more descriptive, when running php as FastCGI and the typical x-httpd-php addhandler is not working.

    In the htaccess-

    instead of
    AddHandler application/x-httpd-php .html .htm

    use
    AddHandler fcgid-script .htm
    FCGIWrapper "/dh/cgi-system/php54.cgi" .htm

    (if you are running php 5.4.*)
    Note: If using .html extension, then change the .htm to .html.

    Reference:
    http://wiki.dreamhost.com/PHP#Forcing_PHP_for_HTML_files

Share This Page