reg_globals

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

    • Jan 2008
    • 21

    reg_globals

    i am trying to make sure my reg_globals are off as im running a Boonex Dolphin community script.I went into ftp and opened htaccess to edit only to find,

    htaccess.txt
    ASCII English text ##
    # @version $Id: htaccess.txt 9975 2008-01-30 17:02:11Z ircmaxell $
    # @package Joomla
    # @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
    # @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
    # Joomla! is Free Software
    ##


    ################################################## ###
    # READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
    #
    # The line just below this section: 'Options +FollowSymLinks' may cause problems
    # with some server configurations. It is required for use of mod_rewrite, but may already
    # be set by your server administrator in a way that dissallows changing it in
    # your .htaccess file. If using it causes your server to error out, comment it out (add # to
    # beginning of line), reload your site in your browser and test your sef url's. If they work,
    # it has been set by your server administrator and you do not need it set here.
    #
    ################################################## ###

    ## Can be commented out if causes errors, see notes above.
    Options +FollowSymLinks

    #
    # mod_rewrite in use

    RewriteEngine On


    # Uncomment following line if your webserver's URL
    # is not directly related to physical file paths.
    # Update Your Joomla! Directory (just / for root)

    # RewriteBase /


    ########## Begin - Joomla! core SEF Section
    #
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/index.php
    RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
    RewriteRule (.*) index.php
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
    #
    ########## End - Joomla! core SEF Section


    ########## Begin - Rewrite rules to block out some common exploits
    ## If you experience problems on your site block out the operations listed below
    ## This attempts to block the most common type of exploit `attempts` to Joomla!
    #
    # Block out any script trying to set a mosConfig value through the URL
    RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
    # Block out any script trying to base64_encode **** to send via URL
    RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
    # Block out any script that includes a <script> tag in URL
    RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
    # Block out any script trying to set a PHP GLOBALS variable via URL
    RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
    # Block out any script trying to modify a _REQUEST variable via URL
    RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
    # Send all blocked request to homepage with 403 Forbidden error!
    RewriteRule ^(.*)$ index.php [F,L]
    #
    ########## End - Rewrite rules to block out some common exploits




    i used to have joomla running but removed it,am i crazy or is my original htaccess file missing?
  • Trivium
    Sergeant

    • Jan 2008
    • 21

    #2
    Re: reg_globals

    also,if im not running joomla anymore,can i delete this htaccess file?

    Comment

    • navaldesign
      General & Forum Moderator

      • Oct 2005
      • 12080

      #3
      Re: reg_globals

      There is NO original hraccess file, or if there is, it is blank. Obviously this is still there from the Joomla time.

      To make sure if register_globals is Off, run phpinfo().

      If it is on, turn it off locally with the following script:

      <?php
      $parm[] = "register_globals = Off";
      // full unix path - location of the default php.ini file at your host
      // you can determine the location of the default file using phpinfo()
      $defaultPath = '/usr/local/lib/php.ini';
      // full unix path - location where you want your custom php.ini file
      //$customPath = "/path/php.ini";
      $customPath = "php.ini";
      // nothing should change below this line.
      if (file_exists($defaultPath)) {
      $contents = file_get_contents($defaultPath);
      $contents .= "\n\n; MODIFIED THE FOLLOWING USER PARAMETERS:\n\n";
      foreach ($parm as $value) $contents .= $value . " \n";
      if (file_put_contents($customPath,$contents)) {
      if (chmod($customPath,0600)) $message = "<b>PHP.INI File modified and copied.</b>";
      else $message = "PROCCESS ERROR - Failed to upadate php.ini.";
      } else {
      $message = "PROCCESS ERROR - Failed to write php.ini file.";
      }
      } else {
      $message = "PROCCESS ERROR - php.ini file not found.";
      }
      echo $message;
      ?>

      Copy the code, paste it in Notepad, ave it as "modify_php_ini.php" using the Save As command.
      Upload it in the root folder of your script, and run it in your browser. It will create a copy of the original php.ini file in your own folder, BUT it will also set the register_globals to Off for the specific folder and subfolders.
      If you place it in public_html, it will set register_globals to Off for the entire site.


      Yes, you can delete the .htaccess file.
      Navaldesign
      Logger Lite: Low Cost, Customizable, multifeatured Login script
      Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
      DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
      Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

      Comment

      • Trivium
        Sergeant

        • Jan 2008
        • 21

        #4
        Re: reg_globals

        ok,in did what you said,after running it in browser, i ran mysite/community/admin/phpinfo.php and it still says its on in local and master

        Comment

        • navaldesign
          General & Forum Moderator

          • Oct 2005
          • 12080

          #5
          Re: reg_globals

          What's your site ?
          Navaldesign
          Logger Lite: Low Cost, Customizable, multifeatured Login script
          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

          Comment

          • Trivium
            Sergeant

            • Jan 2008
            • 21

            #6
            Re: reg_globals

            Comment

            • navaldesign
              General & Forum Moderator

              • Oct 2005
              • 12080

              #7
              Re: reg_globals

              Sorry, but that is a protected folder, so i can't see anything
              Navaldesign
              Logger Lite: Low Cost, Customizable, multifeatured Login script
              Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
              DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
              Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

              Comment

              • Trivium
                Sergeant

                • Jan 2008
                • 21

                #8
                Re: reg_globals

                ok,dolphin just issued a patch for hosts with reg_globals on so i think im ok for now on that.

                However,i do need to enable xsl,here is a post from another member running dolphin,


                This is the answer I got and I sent it to my hostng coming and they applied the suggestion and fixed it.

                here we go
                =========================================
                SergeyZ
                13 days ago 0

                This is an issue of Orca with client-side xslt-transformation in Firefox. To enable server-side transformation you should configure (recompile) your PHP with following options: --enable-xslt --with-xslt-sablot OR --with-dom-xslt (for PHP 4) or --with-xsl (for PHP 5).

                Comment

                • Trivium
                  Sergeant

                  • Jan 2008
                  • 21

                  #9
                  Re: reg_globals

                  ok,here is what i found that i need exactly,



                  Technical Requirements

                  • Linux/Unix (RedHat, Debian, FreeBSD, Mandrake, etc.) or Windows OS
                  • Apache Web Server
                  • PHP 4.4.0/5.1.0 and higher compiled with XML and XSL
                  • MySQL 4.1.0 and higher

                  Server Configuration

                  PHP server configuration for XML and XSL.
                  Run phpinfo() on your server to check PHP settings.
                  • PHP 4 version must have these compiled options to run the script correctly:

                  --with-dom --enable-xslt --with-xslt-sablot

                  Comment

                  • navaldesign
                    General & Forum Moderator

                    • Oct 2005
                    • 12080

                    #10
                    Re: reg_globals

                    As they say, run phpinfo() on your account to see if your settings are ok.
                    Navaldesign
                    Logger Lite: Low Cost, Customizable, multifeatured Login script
                    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                    Comment

                    • Trivium
                      Sergeant

                      • Jan 2008
                      • 21

                      #11
                      Re: reg_globals

                      the question is,how can i get them changed?

                      Comment

                      • Trivium
                        Sergeant

                        • Jan 2008
                        • 21

                        #12
                        Re: reg_globals

                        ive been informed,even after patch for dolphin i still should have reg globals off.i have tried but to no avail.Dolphin sites are being hacked because of this.I love the dolphin script and i also love vodahost,what can we do to rectify this?If you need my cpanel info,im sure you can get it to help me or you can email me at trivium97 Y a h o o .com

                        I believe i have 2 options here,
                        1 have my host help me get it turned off
                        2 find a host that will

                        Comment

                        • navaldesign
                          General & Forum Moderator

                          • Oct 2005
                          • 12080

                          #13
                          Re: reg_globals

                          VodaHost can NOT turn the reg_globals off because this is a shared hosting and other users may need it On.
                          Your best bet is to turn register globals off by using a local php.ini file.

                          My experience with VH servers is that by using the script i have provided, you can turn them Off. If you can't it is quite probably a mistake on your end.

                          If you wish to have someone turn them off for you, you will need to ask (and pay) for it.
                          if you wish contact me through my site contact form.
                          Navaldesign
                          Logger Lite: Low Cost, Customizable, multifeatured Login script
                          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                          Comment

                          • Trivium
                            Sergeant

                            • Jan 2008
                            • 21

                            #14
                            Re: reg_globals

                            hi navel,
                            copied that script and saved in notepad,uploaded it to public html,ran in browser then looked again and both values are still on.Is something wrong with that script,ive done this more than 4 times thinkin im doing it wrong but im not.Again,my reg globals is on.How do i contact voda and talk to a superior,this is very important to me and im paying voda for service,i dont feel i should have to pay more to have a change made on my acct?

                            Comment

                            • Trivium
                              Sergeant

                              • Jan 2008
                              • 21

                              #15
                              Re: reg_globals

                              nvmnd,i just submitted a ticket

                              Comment

                              Working...
                              X