www/includes/class_db_handle.php on line 20

Discussion in 'General PHP' started by fleskesidol, Sep 18, 2015.

  1. fleskesidol

    fleskesidol Member

    Joined:
    Nov 7, 2011
    Messages:
    43
    Likes Received:
    0
    Hi everybody,

    I try to install the version 1.1.2P2 but finaly, after entering all parameters for the DB and
    after clicking to proceed, I open the admin page and I receive this error message:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in www/includes/class_db_handle.php on line 20

    All what's include in this line is effectively "{" and I delete it for another error on line 3
    I take a look on the line 3and I find the php declaration like this :
    <!--
    <?php
    -->​
    After correction, I receive another error message and I resent the original file *class_db_handel.php* into the folder "includes"

    I have made an install with only one script on the server and I don't keep the DBprefix

    Thank's for your help.
     
  2. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    hi fleskesidol, when you say you open the admin page, how do you get to the admin page? Does webid install ok, database is filled in with tables and data?
    Line 20 in includes/class_db_handle.php should be: private $pdo;
     
  3. fleskesidol

    fleskesidol Member

    Joined:
    Nov 7, 2011
    Messages:
    43
    Likes Received:
    0
    Hi Pani,
    it's not realy the admin page, I want to open the step 2 to create it.
    The first page after install when we open the navigator.
    Thanks for your help
     
  4. fleskesidol

    fleskesidol Member

    Joined:
    Nov 7, 2011
    Messages:
    43
    Likes Received:
    0
     
  5. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    Have you tried replacing the file includes/class_db_handle.php with a fresh copy just incase it did not download correctly?
    I have been working on the installation script but it is for the github version which is with pdo. I don't know how it will work on the 1.1.2P2 version.
    I can try it tonight and see if it works. If it does works, I can send you an installation script to try, PM me an email I can send it to.
     
  6. fleskesidol

    fleskesidol Member

    Joined:
    Nov 7, 2011
    Messages:
    43
    Likes Received:
    0
    Thanks Pani,
    I have tried a new file, but from the same download.
    Now, I will unzip a fresh download to try a new file from this and I come for the feedback.
     
  7. fleskesidol

    fleskesidol Member

    Joined:
    Nov 7, 2011
    Messages:
    43
    Likes Received:
    0
    Hello Pani,

    In a first time I tryed only a new file */includes/class_db_handle.php* but it don't works.

    After this, I deleted all datas and tables on the server and I recharge a full new version 1.1.2P2 version

    After proceed the same error came back.

    If you can send me another file */includes/class_db_handle.php* it will be welcome and I send you a PM to do.

    Thank's a lot,
     
  8. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    I have just been looking at the installation script for 1.1.2P2 and there is no class_db_handle.php involved in the actual installation.
    It looks like you actually get through the installation, delete the install folder and then it starts failing as soon as you go to access the admin or access the website? (Accessing the admin for the first time after the installation would ask you to create an admin account) Am I correct in this?
    Does your database get populated with webid data?
     
  9. fleskesidol

    fleskesidol Member

    Joined:
    Nov 7, 2011
    Messages:
    43
    Likes Received:
    0
    Hi Pani,

    You'r all right, it's the page to create the admin account

    All dats are in the DB, beginning with *accesshistoric* and ending with *winners*

    When I delete the install folder, there's no change. Webid don't start and resend my the same error
     
  10. renlok

    renlok Administrator Staff Member

    Joined:
    Oct 20, 2008
    Messages:
    2,858
    Likes Received:
    330
    try replacing
    PHP:
    private     $pdo;
        private        
    $DBPrefix;
        private        
    $CHARSET;
        private        
    $lastquery;
        private        
    $fetchquery;
        private        
    $error;
        private        
    $error_supress false;
    with
    PHP:
    var     $pdo;
        var    
    $DBPrefix;
        var    
    $CHARSET;
        var    
    $lastquery;
        var    
    $fetchquery;
        var    
    $error;
        var    
    $error_supress false;
    then remove public and private from in front of every function
     
  11. fleskesidol

    fleskesidol Member

    Joined:
    Nov 7, 2011
    Messages:
    43
    Likes Received:
    0
    Hello Renlock
    I have done, but next result is:
    *Parse error: syntax error, unexpected '{' in www/includes/class_db_handle.php on line 32*
    Thanks for your assistance
     
  12. renlok

    renlok Administrator Staff Member

    Joined:
    Oct 20, 2008
    Messages:
    2,858
    Likes Received:
    330
    OK from the sounds of it your using a really outdated version of PHP. Maybe PHP4? Might be worth updating it, if you cant then remove every instance of try and each of the
    PHP:
    catch(PDOException $e) {
    // something
    }
    and hopefully it works
     
  13. fleskesidol

    fleskesidol Member

    Joined:
    Nov 7, 2011
    Messages:
    43
    Likes Received:
    0
    Sorry, but on the server is running well with *MySql v5.5*
    Are you sure I must to proceed like you said ?
     
  14. renlok

    renlok Administrator Staff Member

    Joined:
    Oct 20, 2008
    Messages:
    2,858
    Likes Received:
    330
    Your MySQL version has nothing to do with your PHP version, and yeah if my first change fixed your first error I would guess my second one would fix the next one as public, private, try & catch where only added in PHP5.

    I might be wrong but its worth trying
     
  15. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    What is the Mysql version your database is using?
    @renlok. I am finalizing an improved installation script for the github version of webid. Are there any minimum requirements for webid to work? I have added a mysql version check and a php version check but will need some sort of minimum versions to add them in.
     
    Last edited: Sep 21, 2015
  16. redrider

    redrider Donor Donor

    Joined:
    Oct 3, 2012
    Messages:
    82
    Likes Received:
    11
    I gave up on v1.1.2P2 after having fiddled for days trying to get it to work. It needed PDO, which I tried to enable in php.ini but that was a no go. I tried upgrading PHP only to be told I had missing DLL files. Found a site with those, which installed dozens of unwanted crap bars and utils. Had to restore to an earlier point to get rid of that lot. Then gave up in disgust and went back to 1.1.2 which is where I'll be staying.
     
  17. renlok

    renlok Administrator Staff Member

    Joined:
    Oct 20, 2008
    Messages:
    2,858
    Likes Received:
    330
    Yeah
    • PHP 5.2 or higher
    • BC Math Support
    • PDO Support
    • GD Support (This is not needed to run WeBid but galleries and thumbnails will not work without it)
    • MySQL 3.23 or higher

    I think thats correct
    http://webidsupport.com/requirements.php
     
  18. fleskesidol

    fleskesidol Member

    Joined:
    Nov 7, 2011
    Messages:
    43
    Likes Received:
    0
    Hi Renlok,
    sorry for the delay, but it was not verry simple.
    It was on a (too) old server by ovh.com and between your tests, the file ovh.config, another modif in the htaccess and the info.php (4.4), finaly I have to close this server for a new one.
    Now info.php respond 5.4.38 and all it's running for the best !
    Thank you for everything and a thousand apologies for inconvenience.
    all the best
     
  19. fleskesidol

    fleskesidol Member

    Joined:
    Nov 7, 2011
    Messages:
    43
    Likes Received:
    0
    Hi Pani,
    I don't forget you, but I don't have seen.
    All is running quiet fine, thank you too for the help.
    Have a nice day
     

Share This Page