We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44529
    • 2 Posts
    I've successfully deployed Modx on plenty of LAMP setups before, using an include inside a snippet works on the windows box and the other systems but this transferred over set of PHP files just want to be 'viewed' rather than executed when I include them.

    Is there any peculuarities I've missed when I've moved over these files? The httpd (apache daemon) user group on the lamp box can and does execute php fine from what I can see but when I include something it's misbehaving.

    I'm transferring a 0.9.5 evo build from a php 5.1.1 windows apache system to a 5.3.3 lamp setup. Once I get it working I'll be upgrading for sure but this old instance seriously needs repaired before I can move on.

    Many thanks!

    J
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      How are you including them? Just making sure you're doing an include or require and not file_get_contents() or cURL or something. You're using full file-paths and such for the includes, right? You're not trying to route includes through a URL of some sort?

      Also, are you running any other webserver processes (e.g. NGINX) on the box? You can run into trouble if Apache is set to handle PHP requests and instead NGINX "picks up the phone" and returns the content instead of executes it.

      Are you perchance using the dreaded short tags? (i.e. "<?" instead of the full "<?php") -- those should be disabled.

      Barring those ideas, I'd guess that lands you with an Apache configuration thing somewhere. Are simple standalone php files executing? Check your httpd.conf file to ensure that PHP is installed and set up as a module and that .php files are mapped to that processor. An apache forum might be better for this type of thing...
        • 44529
        • 2 Posts
        Ah! Those dreaded short tags!! That was it exactly it!

        I so appreciate you taking the time to reply with such a helpful list of possibilities.

        Forever in your debt for this one!

        Best regards

        J