Announcement

Collapse
No announcement yet.

php or ssi includes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    php or ssi includes

    Had a client move his store to MivaSaaS. There are some pages that are external and currently use php includes to load common html sections.

    These sections aren't loading right now. I haven't been able to figure out the problem. I have used absolute path. But, the file attempting to load is in the same folder as the calling html file. (This was a requirement on the other hosts server which is a pain because there are multiple folders the same file needs to reside -- defeats the purposes). There will be a mivascript/MM module solution in the future, but these pages should be working now regardless.

    Here's the line not executing:

    <?php include('global-header.html'); ?>

    I'm not getting error messages.

    When I try an ssi method there is not joy either. The file called has .shtml extension for this scenario. Any ideas what I need to do?

    In the control panel ssi and php includes are enabled.

    What am I missing?

    Thanks,

    Scott
    Need to offer Shipping Insurance?
    Interactive Design Solutions https://www.myids.net
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    Competitive Rates, Custom Modules and Integrations, Store Integration
    AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
    My T-shirt Collection is mostly MivaCon T-shirts!!

    #2
    Re: php or ssi includes

    First thing I'd try is use require_once() instead of include() as it will fail if it can't find the file. include() just gives a warning message that could be suppressed. Assuming it does fail, it'll give you a better error message about whats wrong.

    Another thing to consider is how that is being called. If you just still php code in a Miva file, it will not run (or at least it never has in my experience). When apache/IIS tries to render an .mvc file, it will bypass all other engines. Files are processed by extension and a file wont have both .mvc AND .php as the extension.

    Instead you need to put an MvCALL in the MivaScript to run the .php file which in turn will include/require your .html.

    Or you could just MvCALL the .html file directly; just CALL and EVAL everything.

    My 2 bits

    Comment


      #3
      Re: php or ssi includes

      Spoken like a true MivaScripter <g>...although i agree. Using MvCall as the include gives you a lot more control over what happens. The downside is that you'd need the server to process .html through empressa possibly incurring a little more processing load on the server verses ssi or php rendering.
      Bruce Golub
      Phosphor Media - "Your Success is our Business"

      Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
      phosphormedia.com

      Comment


        #4
        Re: php or ssi includes

        Thanks Scott. I'll try the require command. These are static pages right now, so mvcall method will be a consideration later.

        Scott
        Need to offer Shipping Insurance?
        Interactive Design Solutions https://www.myids.net
        MivaMerchant Business Partner | Certified MivaMerchant Web Developer
        Competitive Rates, Custom Modules and Integrations, Store Integration
        AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
        My T-shirt Collection is mostly MivaCon T-shirts!!

        Comment

        Working...
        X