Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Senior Member toadeny's Avatar
    Join Date
    May 2003
    Location
    Wellington, New Zealand
    Posts
    188
    Member #
    1426
    just after i get flippin the l.a.m.p sorted it does this.

    why is it that if i include a plain file with plain html that it works fine but if i include the db connection script i have made it dosent want to know.

    i get this error, yes. the file is uploaded. is there a place to change were the default like include goes to?

    im stumped on this one.

    heres the error, yes the file db.php is uploaded to my server...

    Warning: Failed opening 'shop/db.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/index2.php on line 1

    thanks .

    btw the index2.php code
    Code:
    <?php include("shop/db.php"); ?>
    have tried changing the path in the index2.php to "./shop/db.php" and "/shop/db.php" as advised but without any luck.

    Thanks.

  2.  

  3. #2
    Senior Member nsr81's Avatar
    Join Date
    Oct 2002
    Posts
    1,132
    Member #
    250
    Liked
    15 times
    use an absolute path.

    PHP Code:
    <?php include("/var/www/html/shop/db.php"); ?>
    There and Back Again :Ogre:

  4. #3
    Senior Member toadeny's Avatar
    Join Date
    May 2003
    Location
    Wellington, New Zealand
    Posts
    188
    Member #
    1426
    Thats all very well. I tried that, but no success. The problem as i described actually is that some includes are working others are not. this include does not work in the many ways i have tried, but others simply work with "includes/blah.php"
    this is real weird.

  5. #4
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,657
    Member #
    1234
    Liked
    139 times
    Try ./ or ../ before that line, i.e.
    "./shop/db.php"
    "../shop/db.php"
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  6. #5
    Senior Member nsr81's Avatar
    Join Date
    Oct 2002
    Posts
    1,132
    Member #
    250
    Liked
    15 times
    Can't really say what might be the problem. Try checking that the files that are being included have the php code surrounded by <? and ?> or <?php and ?>
    There and Back Again :Ogre:

  7. #6
    Senior Member toadeny's Avatar
    Join Date
    May 2003
    Location
    Wellington, New Zealand
    Posts
    188
    Member #
    1426
    lol. here is my code. can you see anything wrong with it ?
    the catsel.php is included fine.

    Code:
     
    
    <?php 
    include ("shop/db.php");
    include ("includes/catsel.php");
    ?>

  8. #7
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    There's one obvious thing with that code that suggests a possible cause.

    Have you tried moving db.php into the includes folder and changing the include path to
    Code:
     <? include ("includes/db.php"); ?>
    If you've tried everything else that might be it. Could be server configuration.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:01 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com