We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    You can also see which version of PHP you have in the Manager; go to Reports -> System Info, then click the phpinfo() view link (third line). The Server API section (fourth item) in the resulting display will specify how your PHP is running. For example, my local MAMP server says
    Apache 2.0 Handler

    while my live VPS in the UK says
    CGI
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
      • 26435
      • 1,193 Posts
      Quote from: sottwell at Sep 12, 2007, 01:10 AM

      You can also see which version of PHP you have in the Manager; go to Reports -> System Info, then click the phpinfo() view link (third line). The Server API section (fourth item) in the resulting display will specify how your PHP is running. For example, my local MAMP server says
      Apache 2.0 Handler

      while my live VPS in the UK says
      CGI

      Nice Susan!
      I did not know that!

      -sD-
      Dr. Scotty Delicious, Scientist DFPA.
        Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
        All of the above... in no specific order.


        I send pointless little messages
        • 33982 ☆ A M B ☆
        • 476 Posts
        Hey Susan,

        Thanks for the advice. After doing what you suggested, here’s what I got:


        Server API...Apache 2.0 Handler

        Now what? smiley
          Precision Web Development ... SmashStack.com
          • 27708 MODX Staff
          • 2,502 Posts
          Well your php should accept items with the php_flag keyword from an .htaccess file BUT you need to make sure that there is not already an .htaccess file in your root directory. Having two may cause the other to be overwritten and not work and could cause the 500 Internal Server Error.

          In the php_info() file that Susan mentioned you should look down the page for Apache’s Installed Modules and look to see if mod_rewrite is enabled. I have googled on ".htaccess godaddy shared" and it is unclear as to how their servers are set up because I have read on some forums that you will need a php.ini or (if you are using php5) php5.ini as well as adjustments to the root .htaccess file on the server.

          It is common for hosts to already have an .htaccess file on your server and there is a possibility that the sever may have Apache’s AllowOverride set to NONE in which case you may have to call to ask how to turn register_globals off. In fact this may be the way to go. A five minute call or email could save you a whole lot of wasted guessing.

          All the best,

          Jay
            Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
            • 3749
            • 24,544 Posts
            Quote from: smashingred at Sep 12, 2007, 02:03 PM

            It is common for hosts to already have an .htaccess file on your server and there is a possibility that the sever may have Apache’s AllowOverride set to NONE in which case you may have to call to ask how to turn register_globals off. In fact this may be the way to go. A five minute call or email could save you a whole lot of wasted guessing.

            Note also that many hosting services have a forum that you could search for register_globals and find an answer.

            Bob
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 33982 ☆ A M B ☆
              • 476 Posts
              After speaking with Godaddy hosting tech support today (which rushed me off the phone with little help), I was instructed to simply upload my own php.ini file with Global settings to off in the directory containing MODx. I am an extreme Newbie (never have coded 1 line of PHP in my life) so this advice Godaddy gave me wasn’t much of a help either.

              So I guess where I’m at now in this process is do I simply download a generic php.ini file (and if so, where would I get that?), set The Register Globals to off (theregister_globals = Off), and then upload the file into the directory containing MODx?

              Thanks!
                Precision Web Development ... SmashStack.com
                • 3749
                • 24,544 Posts
                Quote from: flinx at Sep 21, 2007, 11:11 AM

                After speaking with Godaddy hosting tech support today (which rushed me off the phone with little help), I was instructed to simply upload my own php.ini file with Global settings to off.  I am an extreme Newbie (never have coded 1 line of PHP in my life) so this advice Godaddy gave me wasn’t much of a help either.

                So I guess where I’m at now in this process is do I simply download a generic php.ini file (and if so, where would I get that?), set The Register Globals to off (theregister_globals = Off), and then upload the file into the directory containing MODx?

                Thanks!

                It’s even easier than that. If you don’t already have a php.ini file, just copy the following line into a new text file, save it as php.ini (or php5.ini if they’re using PHP5) and upload it:

                register_globals off

                That will probably take care of your problem but if it doesn’t you might want to create a page containing the following PHP code.  Going to that page will list all the php-related info. It will tell you where it’s looking for the php.ini file. Yours should be in that location.

                <?php
                phpinfo();
                ?>

                Bob


                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 33982 ☆ A M B ☆
                  • 476 Posts
                  Hello Bob,

                  Thank you for your advice. I uploaded a page with the php coding you suggested:


                  <?php
                  phpinfo();
                  ?>

                  If you look here, you can see the information:

                  http://rent2ownhomesonline.com/info.php

                  Here’s the file path which it shows where the php.ini file should reside:


                  /web/conf/php.ini

                  I uploaded a file named php.ini with the register_globals = OFF into both the top directory with MODx and into the directory /web/conf/php.ini...neither of which did anything. And by the way, the only text I only had to put was "register_globals = OFF" in the php.ini file, right?

                  Any advice would be greatly appreciated. Thanks again for your help thus far.
                    Precision Web Development ... SmashStack.com
                    • 33372
                    • 1,611 Posts
                    The syntax for doing this in a php.ini file is different from when you do it in an .htaccess file. All you want in your php.ini file is the following:
                    register_globals off
                    

                    No equals sign, and of course no quotes.

                    I’ve done this on GoDaddy before and it’s worked fine, although I believe they offer many different types of servers.
                      "Things are not what they appear to be; nor are they otherwise." - Buddha

                      "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

                      Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                      • 33982 ☆ A M B ☆
                      • 476 Posts
                      Hello Zap,

                      Thank you for your suggestion. I changed the php.ini settings to register_globals off and still it’s not working. Also, as I stated earlier, I’ve never worked with php files, so the php.ini file should only have 1 line of coding, register_globals off, correct? In other words, if you open the file with a text editor, there will be absolutely no other text, correct? Sorry for such newbie questions, but...

                      Thanks again for any suggestions you would have to offer.
                        Precision Web Development ... SmashStack.com