Silly n00b Setup question

Discussion in 'Co-op Advertising Network' started by The Webmaster, May 16, 2006.

  1. #1
    I have decided to use DP COOP. but the only problem I am facing is, I am not a php guy so I am not even able to setup ad codes on one of my PHP site.

    the site is using templates. the structure is -
    all the main pages are under WWW dir.
    templates are under www/templates/ dir.

    to use the ads sitewide I placed ad codes on main_temp.php file, which is the main template used by all the pages.(its under www/templates/ folder)

    I placed ad_network_257.php and ad_network_ads_257.txt files under the www folder.
    now when I run the index.php noting is happening.
    I changed -
    <?php ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    							include ('ad_network_257.php');
    							echo $ad_network; ?>
    Code (markup):
    to
    <?php ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    							include ('../ad_network_257.php');
    							echo $ad_network; ?>
    Code (markup):
    but its not working either, what else should I do?
    Please guide. thanks.
     
    The Webmaster, May 16, 2006 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    What's the site URL? Does your template system allow you insert PHP?
     
    digitalpoint, May 16, 2006 IP
  3. The Webmaster

    The Webmaster IdeasOfOne

    Messages:
    9,516
    Likes Received:
    718
    Best Answers:
    0
    Trophy Points:
    360
    #3
    the URL is http://www.superhitjokes.com

    yeah it does allow PHP codes insertion.

    If I put all the files (i.e.- ad_network_257.php and ad_network_ads.txt) in the templates directory, the code(Inserted in the template file) say the ad_network_ads.txt should be writable by the webserver, although i have changed the permission and set it be writable.
    but its not happening.
     
    The Webmaster, May 16, 2006 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    If it says it's not writeable, then it's either not writeable, or it can't find the file. Try using the full file path for the .txt file...
     
    digitalpoint, May 16, 2006 IP
  5. The Webmaster

    The Webmaster IdeasOfOne

    Messages:
    9,516
    Likes Received:
    718
    Best Answers:
    0
    Trophy Points:
    360
    #5
    Err thats what I am asking, how to do that, Sorry it sounds very dumb but I am not a PHP guy:eek: I tried it with " ../ " but its not working.:eek:
     
    The Webmaster, May 16, 2006 IP
  6. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #6
    It's going to depend on your server and how it structures sites in it's file system. For example, it could be something like:

    /home/sites/www.yoursite.com/web

    Or it could be something else...
     
    digitalpoint, May 16, 2006 IP
  7. The Webmaster

    The Webmaster IdeasOfOne

    Messages:
    9,516
    Likes Received:
    718
    Best Answers:
    0
    Trophy Points:
    360
    #7
    Okay thanks shawn, I'll try that.
     
    The Webmaster, May 16, 2006 IP
  8. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #8
    Actually if you echo out the $_SERVER['SCRIPT_FILENAME'] variable, you should be able to see the full file path for it, which will be helpful.
     
    digitalpoint, May 16, 2006 IP
  9. The Webmaster

    The Webmaster IdeasOfOne

    Messages:
    9,516
    Likes Received:
    718
    Best Answers:
    0
    Trophy Points:
    360
    #9
    Great!!
    Thanks again, It is indeed very helpful. :)
     
    The Webmaster, May 16, 2006 IP