SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    May 2004
    Location
    Germany
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Fatal error: Cannot instantiate non-existent class: html_quickform_renderer_default

    Hi,

    I'm trying to get into PEAR by using QuickForm.
    Now on my local WAMP installation so far all is fine. I have a form that validates some data.
    But when I put all on the web server (shared hosting) I get this error: Fatal error: Cannot instantiate non-existent class: html_quickform_renderer_default in /homepages/...myprivatepath.../pear/PEAR/HTML/QuickForm.php on line 1498

    Line 1498 has this statement: $GLOBALS['_HTML_QuickForm_default_renderer'] =& new HTML_QuickForm_Renderer_Default();

    Now I must admit that I have no clue where to search the cause for this error...
    Anyone can help me?
    Thanx in advance!
    Robyn

  2. #2
    SitePoint Zealot manoloweb's Avatar
    Join Date
    Aug 2003
    Location
    Mexico
    Posts
    148
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ask your Hosting provider if they have PEAR installed.

    It seems like they don't, or at least their path to PEAR is not correct in the php configuration.

  3. #3
    SitePoint Member
    Join Date
    May 2004
    Location
    Germany
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi manoloweb,

    my provider hasn't installed PEAR. I "installed" PEAR myself by uploading all necessary files. So far I had no problems, for instance I was able to use the DB functions to access and query a MySQL database.

    Now for the path to PEAR: I determine the absolute path of my htdocs dir and so can construct an absolute path of the PEAR directory. If the path wasn't correct my PHP script wouldn't have been able even to include the necessary QuickForm.php.
    I added the absolute path of the PEAR directory to the include_path variable of PHP with ini_set().
    That the mentioned error happened shows me that at least the QuickForm.php was found and included.

    But now I found the cause by retrieving more error information with error_reporting(E_ALL):
    Warning: Failed opening 'HTML/QuickForm/Renderer/Default.php' for inclusion (include_path='.:/usr/local/lib/php:/homepages/...private.../htdocs/pear/PEAR') in /homepages/...private.../htdocs/tangueria.net/pear/PEAR/HTML/QuickForm.php on line 1497

    So that means Default.php couldn't be included. I checked the file. It is where it should be and it is complete.
    Hmm... is there a way to retrieve more detailed information about the nature of why PHP failed opening Default.php?

  4. #4
    SitePoint Member
    Join Date
    May 2004
    Location
    Germany
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Silly me... :-( I found my mistake. I constructed a wrong absolute path of the PEAR dir.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •