PHP Genius Required

Discussion in 'PHP' started by gooseandluba, Jan 24, 2009.

  1. #1
    I am trying to add RSS feeds to my site. I found a place that will create the proper php code. I have put that code into a file and uploaded it to my server. So far so good. Here is my problem, the final step is to add this line of code <!--#include virtual="/rssfeeds.php" --> to the web page that I want the feed to appear on. I have added that line but the web page comes up blank. Anyone have any ideas??? Many thanks to the person(s) who can help me.
     
    gooseandluba, Jan 24, 2009 IP
  2. ryandanielt

    ryandanielt Well-Known Member

    Messages:
    1,797
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    185
    #2
    Can you provide a link to the page and I can have a look into it for you?
     
    ryandanielt, Jan 24, 2009 IP
  3. NinjaWork

    NinjaWork Guest

    Messages:
    132
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi gooseandluba,

    I did a quick search on the include and found this page: http://rssfeedreader.com/php.html

    Did you create the .htaccess file and put in the same directory? Some web servers aren't automatically configured to parse php.
     
    NinjaWork, Jan 24, 2009 IP
  4. yoavmatchulsky

    yoavmatchulsky Member

    Messages:
    57
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    48
    #4
    the <!--#include --> directive is for apache webservers only and it requires a module called mod_include to be installed.

    why not use <?php include '/rss.php'; ?> in your php code..?
     
    yoavmatchulsky, Jan 24, 2009 IP
  5. gooseandluba

    gooseandluba Peon

    Messages:
    202
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    gooseandluba, Jan 24, 2009 IP
  6. ryandanielt

    ryandanielt Well-Known Member

    Messages:
    1,797
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    185
    #6
    Try adding

     <? require("rss.php"); ?> 
    PHP:
    That should do the trick. Do Not Use <!--#include virtual="/rssfeeds.php" -->
     
    ryandanielt, Jan 24, 2009 IP
  7. gooseandluba

    gooseandluba Peon

    Messages:
    202
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    yoavmatchulsky and ryananielt, I have inserted both codes you have suggested directly into the web page that I want the feeds to appear but it still comes up blank. Is it possible I'm missing something at the server level? My host tells me that SSI is enabled.
     
    gooseandluba, Jan 24, 2009 IP
  8. NinjaWork

    NinjaWork Guest

    Messages:
    132
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    hi gooseandluba, did you "view source" of the webpage? if you see <? require("rss.php"); ?> in the source, it probably means you need an .htaccess file to enable php parsing.
     
    NinjaWork, Jan 24, 2009 IP
  9. gooseandluba

    gooseandluba Peon

    Messages:
    202
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Hi Ninja,

    That code you see is the one that ryananeit had suggested. I just didn't remove it. The original code was <!--#include virtual="/rssfeeds.php" --> but not sure that this one works on a Windows IIS server.
     
    gooseandluba, Jan 24, 2009 IP
  10. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #10
    ok your site is asp. options are switch to an asp based feed script or check if the server has php available. How to test for php would be to create a new file : test.php with <?php phpinfo(); ?> . upload it etc.
    the include virtual could work but it has to be active on the webserver. Active and configured IIRC. Anyway, start there and see if it helps.
     
    shallowink, Jan 24, 2009 IP
  11. gooseandluba

    gooseandluba Peon

    Messages:
    202
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Shallow, thanks for your reply. May be a little over my head though. How do I check to see if the include virtual is active on the webserver? What is Active and configured IIRC?
     
    gooseandluba, Jan 24, 2009 IP
  12. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #12
    that's ok, its why I stopped typing. :) IIRC is if I remember correctly. Active means it is installed (for a webserver it means it has the files it needs to run php or Server Side Includes which is what the include virtual is) and configured would mean it has been turned on. Specifically on your webhost. Since it is a windows webhost, there's not a 100% guarantee it has PHP available. SSI (the server side includes) should be present. If its turned on, you would have to check several things but a fast way would be to upload a test.shtml file. but I'm not sure if that's the part were it loses us.
     
    shallowink, Jan 24, 2009 IP
  13. gooseandluba

    gooseandluba Peon

    Messages:
    202
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #13
    gooseandluba, Jan 25, 2009 IP
  14. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #14
    that's good. So here's the problem, the page you are trying to put the rss feed onto is an ASP page. I would look for an ASP based rss feed script. And use the ASP include statement
    
    <!--#include file="time.inc"-->
    
    Code (markup):
     
    shallowink, Jan 25, 2009 IP
  15. gooseandluba

    gooseandluba Peon

    Messages:
    202
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #15
    So close... Yet, so far away! Seems you are on to something there shallow.

    I have downloaded and installed an ASP script. (RSS2HTML.asp script). I have uploaded the file to my server and it works fine see here

    Now when I insert the call back code directly into my web page, all I get is this

    Any ideas???
     
    gooseandluba, Jan 25, 2009 IP
  16. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #16
    replace the include with the following :
    <!--#include file="RSS2HTML.asp" -->

    It won't work if the the file rss2html.asp isn't in the same directory as the calling page .
     
    shallowink, Jan 25, 2009 IP
  17. gooseandluba

    gooseandluba Peon

    Messages:
    202
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Still nothin'. I'm pretty sure the rss2html.asp file is in the same directory as the calling page.

    Got anything else? It seems we're so close.
     
    gooseandluba, Jan 25, 2009 IP
  18. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #18
    back to basics, lowercase the rss2html.asp part. If that doesnt work, then we have to verify where the file is located. What method did you use to upload the file? FTP?
     
    shallowink, Jan 25, 2009 IP
  19. gooseandluba

    gooseandluba Peon

    Messages:
    202
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #19
    Lower cased the rss2html.asp part. Good angle but didn't work. I uploaded the file directly from my cpanel. This rss2html.asp file is lumped in with all other files in my site.
     
    gooseandluba, Jan 25, 2009 IP
  20. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #20
    I'm still seeing this when I view source. are you sure you edited the right file?

    <hr>
    <!--#include virtual= RSS2HTML.asp -->
     
    shallowink, Jan 25, 2009 IP