WordPress.org

Ready to get started?Download WordPress

Forums

ssi include into worpress 2.01 post (12 posts)

  1. eskboy
    Member
    Posted 8 years ago #

    Hi,

    I do i get the following ssi include to show up in a wordpress post

    <!--#include virtual="/cgi-bin/bib/buyitbomb.cgi?keywords=belt&db=17971&mode=all&boundary=word&format=ssi&results=10&start=0&s=1" -->

    Regards
    EK

  2. petit
    Member
    Posted 8 years ago #

    For a serverside include to take effect, the page content must be parsed by the web server, so that the include command is caught and the result of your CGI script be included.
    Normally this means that the (X)HTML file would have the file extension .shtml.

    In this case the page is generated by your php pages and the file type ( extension ) is .php, which means no parsing is made by the server, and the include doesn't take effect.

    Your request is rather special, as I found from a somewhat extensive googleing (?). Common sense seem to have it, that the PHP include statement is enough and replaces the SSI functionality.

    AS seen from your problem, that's not entirely true. I'm sure there is a simple solution, but it doesn't strike me just now.

    Good luck!

  3. Kafkaesqui

    Posted 8 years ago #

    Here's how to do SSI in a PHP script:

    http://www.php.net/function.virtual

    Note that if you *must* do this through a post's content, you'll also need one of the "exec php code in a post" plugins:

    http://codex.wordpress.org/Plugins/Posts_Formatting

  4. petit
    Member
    Posted 8 years ago #

    Kafkaesqui: Wow!

  5. pizzaman
    Member
    Posted 8 years ago #

    You can use this statement in a page template:

    <?php virtual ('/cgi-bin/bib/buyitbomb.cgi?keywords=belt&db=17971&mode=all&boundary=word&format=ssi&results=10&start=0&s=1'); ?>

    No need for a plugin.

  6. Marcomail
    Member
    Posted 8 years ago #

    <?php virtual ('/cgi-bin/bib/buyitbomb.cgi?keywords=belt&db=17971&mode=all&boundary=word&format=ssi&results=10&start=0&s=1'); ?>

    not work, don't work virtual in the template files...help me

  7. Marcomail
    Member
    Posted 8 years ago #

    anyone ? It's possible virtual function is disable from the hosting ?

  8. Marcomail
    Member
    Posted 8 years ago #

    Some ideas ?

  9. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    It's possible virtual function is disable from the hosting ?

    No, that's not possible, however, why are you trying to use the function from somebody else's question? What exactly are *you* trying to do?

  10. Marcomail
    Member
    Posted 8 years ago #

    I run wordpress on dreamhost

    They say run php as CGI and virtual function is not avaible.

    My request is the same of the person. Thanks Otto

  11. techiecoach
    Member
    Posted 8 years ago #

    I'm trying to do something similar, except that I want to include ssi in a sidebar template, not a post.

    The regular ssi call statement is:

    <!--#include virtual="cgi-bin/upevent/upevent_full.cgi?Display_Event=Yes" -->

    So, based on the reco above, I've modified it to:

    <?php virtual ('/cgi-bin/upevent/upevent_full.cgi?Display_Event=Yes'); ?>

    Which gives me the following error:

    Fatal error: Call to undefined function: virtual() in /home/techie/public_html/blog/wp-content/themes/Topfade3Col-TW/sidebarR.php on line 7

    Can anyone tell me how to fix the fatal error? I'd be grateful.

    (Or an alternative way to include an upcoming events list that shows only upcoming events (ie, doesn't include events that have passed)

    Thanks!
    Beth

  12. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    techiecoach: I've since discovered that this function is only available when PHP is being run as an Apache module. So if your host is using PHP as a CGI program, virtual() won't work.

    I use Google Calendar for my events listing on my page, along with a Google Calendar widget I wrote: http://ottodestruct.com/blog/2006/04/18/google-calendar-widget/

Topic Closed

This topic has been closed to new replies.

About this Topic