46 users online (0 members and 46 guests)  


  Results 1 to 4 of 4

Related

  1. Replies: 0
  2. php5 doesn't compile with mysql 4.1.14    Forum: PHP Forum
    Replies: 0
  1. #1
    paul9038's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2004
    Posts
    8

    Question Code not working in PHP5

    Can anyone see any errors. This code worked fine in PHP 4.3 but will only run the first and second echo statement when I install PHP5. No error messages just a blank page after the 2nd statement. It must be something to do with the require() method calls or a setting in php.ini file that affects how they work.
    ************************************
    <? php
    session_start();
    echo"Just outside guard<br>"; //1st
    if(session_is_registered('name')){
    echo"Just inside guard<br>"; //2nd
    require'ConnectDBfile1.php';
    require'ConnectDBfile2.php';
    echo"Connect to DB's<br>"; //3rd
    *************************************
    Any ideas would be appreciated.

    Thanks,
    Paul

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Only thing that springs to the eye is that lack if spaces
    Code:
    require'ConnectDBfile2.php';
    might just be the forum, but worth checking.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    paul9038's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2004
    Posts
    8

    Smile Another Update

    Stupid of me but the problem was being hidden within the require files. I had the @ infront of the mysql_connect method which stopped me from seeing the fatal error on this call. The problem is that mysql is not default active in PHP5 and is easily sorted with a file copy and a php.ini change.

    Sorted!!!

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Brilliant. Thanks for sharing the solution.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread