+ Reply to Thread
Results 1 to 2 of 2

Thread: Whois Script wont work

  1. Join Date
    Feb 2010
    Posts
    1

    Whois Script wont work

    Hello
    Been running version 2.11 for a while now with no problems.
    Purchased the latest version last weekend and have tried both the upgrade route
    and the fresh install route and keep getting the following error :-

    Parse error: syntax error, unexpected '{' in /home/users/uks44611/html/auctionscribe.com/whois/whois.php on line 23

    Here is that portion of the script is it correct?

    // +------------------------------
    // initialize script and navigate
    // +------------------------------
    try
    {
    $EP_Dev_Whois = new EP_Dev_Whois();
    $EP_Dev_Whois->navigate($_REQUEST['page']);
    }
    catch(Exception $e)
    {
    // prefer to catch exceptions yourself?-- Uncomment the line below:
    // throw $e;
    }


    Any suggestions would be appreciated.

    Regards
    Colin

  2. Join Date
    Aug 2004
    Posts
    778

    The latest version uses PHP 5, which has been out for several years now. However, you are probably still using PHP 4.

    You can either upgrade to PHP 5 (or move to a host that supports PHP 5) or you can disable the support for PHP5 exceptions (see below).

    To disable exceptions, you will need to modify two files.
    In whois.php, replace:
    PHP Code:
    try 

        
    $EP_Dev_Whois = new EP_Dev_Whois(); 
        
    $EP_Dev_Whois->navigate($_REQUEST['page']); 

    catch(
    Exception $e

        
    // prefer to catch exceptions yourself?-- Uncomment the line below: 
        // throw $e; 

    With
    PHP Code:
    $EP_Dev_Whois = new EP_Dev_Whois(); 
    $EP_Dev_Whois->navigate($_REQUEST['page']); 

    In global.php, replace:
    PHP Code:
    throw new Exception($error); 
    With:
    PHP Code:
    die($error); 
    Instead of throwing an exception that can be caught and handled by the script, the PHP execution will simply die with the error (this is how it worked in versions prior to 2.3x). However, PHP 5 has been out for a while now and you may be better served by upgrading PHP if you host yourself or ask your host / move to a host that supports PHP 5.

+ Reply to Thread

Posting Permissions

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