Include_once( ) strange error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amanjsingh
    New Member
    • Mar 2007
    • 48

    Include_once( ) strange error

    I have multiple applications on my website. So, there is a master config file and then there are multiple local config files for individual apps. There is a strange problem though,

    In 3 applications I am doing include_once of the master_config.p hp. If I run the local config file which has master_config.p hp, I can see the variable dumps I have to import. But when I use the local config.php in my application (say index.php), the variable dump is just NULL and nothing works.

    Anyone knows why this happens?

    Thanks
    AJ
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    Originally posted by amanjsingh
    I have multiple applications on my website. So, there is a master config file and then there are multiple local config files for individual apps. There is a strange problem though,

    In 3 applications I am doing include_once of the master_config.p hp. If I run the local config file which has master_config.p hp, I can see the variable dumps I have to import. But when I use the local config.php in my application (say index.php), the variable dump is just NULL and nothing works.

    Anyone knows why this happens?

    Thanks
    AJ
    Do you have error reporting turned on?
    it could be theres an include error (missed spelled include file name?) and the variables are not set, and you wont out put anything.

    have you used var_dump()?

    Let me know.

    Comment

    • amanjsingh
      New Member
      • Mar 2007
      • 48

      #3
      Originally posted by dlite922
      Do you have error reporting turned on?
      it could be theres an include error (missed spelled include file name?) and the variables are not set, and you wont out put anything.

      have you used var_dump()?

      Let me know.
      I do not have reporting on. I use var_dump(). No the spellings are ok too. This happens only to a few files. Rest of the includes are working well.

      Comment

      • dlite922
        Recognized Expert Top Contributor
        • Dec 2007
        • 1586

        #4
        Originally posted by amanjsingh
        I do not have reporting on. I use var_dump(). No the spellings are ok too. This happens only to a few files. Rest of the includes are working well.
        we can't help you if you don't have error_reporting one. The first sticky in this forum tells you to do just that before posting.

        read it, do it, then post any error messages back here.

        If this was a spelling or trivial issue, then please post back to help other members with the same problem.

        Comment

        • amanjsingh
          New Member
          • Mar 2007
          • 48

          #5
          Yes, I am sorry. After a long and tedious inspection I figured out that the original file had variables set before the classes. I think that is a problem.

          Comment

          Working...