Problem with include virtual

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MPGdevil
    Confirmed User
    • Nov 2005
    • 1210

    #1

    Problem with include virtual

    I have a problem with tradescript not counting hits and toplists not being shown on index page.

    In my index.shtml file I have this in the <head>:

    <!--#include virtual="/tradex/in.php?${QUERY_STRING}"-->
    My .htaccess looks like this:

    Options +Includes
    AddType text/html .shtml
    AddHandler server-parsed .shtml

    Options +Indexes
    DirectoryIndex index.shtml index.php index.htm index.html
    This is what I use to show toplist:

    <!--#include virtual="trades/toplist.html" -->

    Still include virtual won't work.
    Any suggestions what else to do? Something that needs to be enabled on server? I am not managing it myself.
  • freecartoonporn
    Confirmed User
    • Jan 2012
    • 7683

    #2
    back in days, i had same issue, i dont recall the solution.,

    but try one of these.

    1) try full path in include
    2) try require or require_once instead of include
    3) try accessing /tradex/in.php?${QUERY_STRING} using web browser, if you can access it , i mean if you dont get any permission error, then i dont see any other issue.

    good luck
    SSD Cloud Server, VPS Server, Simple Cloud Hosting | DigitalOcean

    Comment

    • Barry-xlovecam
      It's 42
      • Jun 2010
      • 18083

      #3
      This is what I use to show toplist:

      Quote:
      <!--#include virtual="trades/top list.html" -->

      Still include virtual won't work.

      try:

      <!--#include virtual="/trades/toplist.html" -->

      / needs to be in the path


      The state of AllowOverides
      top
      AllowOverride Directive
      Description: Types of directives that are allowed in .htaccess files
      Syntax: AllowOverride All|None|directive-type [directive-type] ...
      Default: AllowOverride None (2.3.9 and later), AllowOverride All (2.3.8 and earlier)
      Context: directory
      Status: Core
      Module: core

      When the server finds an .htaccess file (as specified by AccessFileName), it needs to know which directives declared in that file can override earlier configuration directives.
      https://httpd.apache.org/docs/2.4/mod/core.html


      ===
      You may need (probably do) to edit the root files in the Apache server for that domain's account configuration for SSI to work.

      This works for CGI but with PHP I *don't* think its necessary
      In /etc/apache2/sites-enabled


      <Directory /home/xxxx/xxx/www/xxxx/public_html/>
      Options Includes ExecCGI
      </Directory>

      <Location /cgi-bin>
      Options +ExecCGI
      </Location>
      AddHandler server-parsed .shtml
      ######
      #then make symbolic link
      a2ensite www.domain.tld
      /etc/init.d/apache2 reload
      ######

      The state of AllowOveride

      Comment

      • MPGdevil
        Confirmed User
        • Nov 2005
        • 1210

        #4
        Thanks for the suggestions

        Ended up with a respons from server admin: "I ran a ' a2enmod include ' via ssh. Linux mod_include appeared to be disabled."

        Things work now, thanks again

        Comment

        • Barry-xlovecam
          It's 42
          • Jun 2010
          • 18083

          #5
          https://httpd.apache.org/docs/curren...d_include.html

          I like SSI but it is old school ...
          Very fast and native to the server.
          That is mod has been enabled with the every default build I have worked with.

          My newest server Apache2 install had that mod off too -- but I did a custom compile and overlooked it ...

          Code:
          [email protected]:~# a2enmod include
          Considering dependency mime for include:
          Module mime already enabled
          Enabling module include.
          To activate the new configuration, you need to run:
            service apache2 restart
          [email protected]:~#: service apache2 restart
          Thanks for the response -- saved me a lot of grief.

          Comment

          Working...