Problem including files in PHP

Discussion in 'PHP' started by NoamBarz, Jun 13, 2007.

  1. #1
    I just upgraded my PHP version to 5.2.3.
    It took me a while to figure out how to make it work with mysql, but that problem is solved.
    I now see that it doesn't support includes. The line:

    include 'Config.php';

    doesn't work. However, if I paste the code in the config file directly into the page, it works just fine. I realize that I'll have to modify the php.ini file. I'm just not sure what to do. Can someone please help?
     
    NoamBarz, Jun 13, 2007 IP
  2. NoamBarz

    NoamBarz Active Member

    Messages:
    242
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #2
    I solved the problem by replacing the libmysql.dll file with the libmysql.dll file from php 5.2.1. I have no idea why it gave me such problems.
     
    NoamBarz, Jun 13, 2007 IP
  3. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Well, you didn't say what version PHP you upgraded from, or how exactly you did the upgrade, but there are two things to note about this:

    1) PHP5 doesn't do MySQL support by default. This could have been the problem.
    2) It couldn't have been the include that failed... I would say that the real failure was the actual MySQL DB connection that was no longer supported because of PHP5. Having said that, though, you should have got an error message, unless you switched the error messages off. Those messages are there for a reason, I guess :)
     
    TwistMyArm, Jun 13, 2007 IP