Announcement

Collapse
No announcement yet.

IIS to Apache Conversion --> Modrewrite issues

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

  • IIS to Apache Conversion --> Modrewrite issues

    Hello Everyone,

    I'm in the middle of converting from IIS over to Apache and pulling my hair out on mod rewrite.

    modrewrite is enabled and confirmed as operating
    RewriteBase is set to /board/ (path to forum is /var/www/html/board/
    Running SSL

    Only real logs are pointing toward an Ajax issue

    [Tue Dec 28 06:12:42.043477 2021] [authz_core:debug] [pid 5885] mod_authz_core.c(817): [client 192.168.2.14:55250] AH01626: authorization result of Require all granted: granted, referer: https://www.r3vlimited.com/board/
    [Tue Dec 28 06:12:42.043499 2021] [authz_core:debug] [pid 5885] mod_authz_core.c(817): [client 192.168.2.14:55250] AH01626: authorization result of <RequireAny>: granted, referer: https://www.r3vlimited.com/board/
    [Tue Dec 28 06:12:42.043588 2021] [core:info] [pid 5885] [client 192.168.2.14:55250] AH00128: File does not exist: /var/www/html/board/ajax/loaddata, referer: https://www.r3vlimited.com/board/
    [Tue Dec 28 06:12:42.043651 2021] [headers:debug] [pid 5885] mod_headers.c(899): AH01503: headers: ap_headers_error_filter()
    [Tue Dec 28 06:12:42.112677 2021] [ssl:debug] [pid 5885] ssl_engine_kernel.c(415): [client 192.168.2.14:55250] AH02034: Subsequent (No.9) HTTPS request received for child 3 (server r3vlimited.com:443),

    Site loads fine, but all the CSS is messed up as mod_rewrite isn't working.

  • #2

    Originally posted by Wayne Luke View Post
    Frequent Installation Issues

    After installing vBulletin 5, my site is unformatted
    This means that URL Rewriting is not working on your site. Possible causes include:
    • htaccess.txt has not been renamed to .htaccess (the leading period is important)
    • mod_rewrite is not installed for Apache 2.4
    • URL Rewrite is not installed for IIS 8.5+
    • The server configuration for NGINX has not been updated. See the file for your version of PHP within the do_not_upload folder.
    • AllowOverride is not allowed in the Apache configuration file.
    Your hosting provider can help you get URL Rewrites working on your site.
    By default Apache has the ability to use .htaccess files turned off. Even if you have mod_rewrite enabled. .htaccess files are often seen as a performance issue and some people may see them as a minor security issue since you're putting server configuration in a publicly accessibly directory albeit hidden in that directory. In fact, some PHP Exploits in the past have taken advantage of .htaccess files in HTML directories.

    You must make sure that your Apache configuration files (httpd.conf, virtual host files, and .htaccess in the directory tree above vBulletin, all have "AllowOverride All" somewhere in the heirarchy. The easiest place is in the httpd.conf file. A quick search in the file will show this is disabled. However, check your virtual host files as well because it can be turned on and off there as well. When this directive is disabled, Apache won't even read the .htaccess file.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment


    • #3
      Sheesh, you nailed in the head here, "The easiest place is in the httpd.conf file. A quick search in the file will show this is disabled." I had it enabled in Virtual hosts but not in the main config. Do'h. Thanks!

      Comment


      • #4
        Hi Wayne,

        New issue I'm tracking now. Do you have recommended PHP configurations for 5.X running on Apache? The site begins to slow down and fails to load after about 24 hours, DB access is low during this time. Per the apache error log I'm getting blasted by this

        [Wed Dec 29 18:46:41.521878 2021] [php7:notice] [pid 1707] [client 51.222.253.12:58074] PHP Notice: unserialize(): Error at offset 0 of 1 bytes in phar:///var/www/html/board/core/vb/vb.phar/library/user.php on line 537

        [Wed Dec 29 18:46:41.521981 2021] [php7:notice] [pid 1707] [client 51.222.253.12:58074] PHP Notice: unserialize(): Error at offset 0 of 9 bytes in phar:///var/www/html/board/core/vb/vb.phar/library/user.php on line 537

        [Wed Dec 29 18:46:41.643350 2021] [php7:notice] [pid 1972] [client 207.46.13.12:2048] PHP Notice: unserialize(): Error at offset 0 of 1 bytes in phar:///var/www/html/board/core/vb/vb.phar/library/user.php on line 537

        [Wed Dec 29 18:46:41.643479 2021] [php7:notice] [pid 1972] [client 207.46.13.12:2048] PHP Notice: unserialize(): Error at offset 0 of 9 bytes in phar:///var/www/html/board/core/vb/vb.phar/library/user.php on line 537

        [Wed Dec 29 18:46:44.210116 2021] [php7:notice] [pid 2094] [client 51.222.253.18:45190] PHP Notice: unserialize(): Error at offset 0 of 1 bytes in phar:///var/www/html/board/core/vb/vb.phar/library/user.php on line 537

        [Wed Dec 29 18:46:44.210993 2021] [php7:notice] [pid 2094] [client 51.222.253.18:45190] PHP Notice: unserialize(): Error at offset 0 of 9 bytes in phar:///var/www/html/board/core/vb/vb.phar/library/user.php on line 537

        [Wed Dec 29 18:46:46.222730 2021] [php7:notice] [pid 1952] [client 114.119.147.42:65198] PHP Notice: unserialize(): Error at offset 0 of 1 bytes in phar:///var/www/html/board/core/vb/vb.phar/library/user.php on line 537

        [Wed Dec 29 18:46:46.222835 2021] [php7:notice] [pid 1952] [client 114.119.147.42:65198] PHP Notice: unserialize(): Error at offset 0 of 9 bytes in phar:///var/www/html/board/core/vb/vb.phar/library/user.php on line 537

        [Wed Dec 29 18:46:46.223473 2021] [php7:notice] [pid 1952] [client 114.119.147.42:65198] PHP Notice: unserialize(): Error at offset 0 of 1 bytes in phar:///var/www/html/board/core/vb/vb.phar/library/user.php on line 537

        [Wed Dec 29 18:46:46.223570 2021] [php7:notice] [pid 1952] [client 114.119.147.42:65198] PHP Notice: unserialize(): Error at offset 0 of 9 bytes in phar:///var/www/html/board/core/vb/vb.phar/library/user.php on line 537

        [Wed Dec 29 18:46:46.412957 2021] [php7:notice] [pid 1952] [client 114.119.147.42:65198] PHP Notice: unserialize(): Error at offset 0 of 1 bytes in phar:///var/www/html/board/core/vb/vb.phar/library/user.php on line 537

        [Wed Dec 29 18:46:46.413074 2021] [php7:notice] [pid 1952] [client 114.119.147.42:65198] PHP Notice: unserialize(): Error at offset 0 of 9 bytes in phar:///var/www/html/board/core/vb/vb.phar/library/user.php on line 537

        [Wed Dec 29 18:46:46.980580 2021] [php7:notice] [pid 1952] [client 51.222.253.13:41650] PHP Notice: unserialize(): Error at offset 0 of 1 bytes in phar:///var/www/html/board/core/vb/vb.phar/library/user.php on line 537

        [Wed Dec 29 18:46:46.980788 2021] [php7:notice] [pid 1952] [client 51.222.253.13:41650] PHP Notice: unserialize(): Error at offset 0 of 9 bytes in phar:///var/www/html/board/core/vb/vb.phar/library/user.php on line 537

        Comment


        • #5
          System requirements are here: https://forum.vbulletin.com/forum/vb...m-requirements

          Really the only change that is required is that PHP memory is set to 128 MB at the minimum.

          What is the specific version of vBulletin and PHP that you are using?

          What are the results of this query: SELECT * FROM datastore WHERE title LIKE '%profilefield%';

          If you have a table prefix defines in your /core/includes/config.php file then you will need to prepend that to 'datastore'.

          In addition to this, make sure that you are using INNODB tables. Not MyISAM or ARIA (mariadb only).
          Translations provided by Google.

          Wayne Luke
          The Rabid Badger - a vBulletin Cloud demonstration site.
          vBulletin 5 API

          Comment


          • #6
            Hi Wayne,

            Here is the result of that query, Not seeing anything special? I did verify I'm set to 128M Memory on PHP

            Yep, we are on INNODB (you helped me with that awhile ago)

            a:3:{s:6:"hidden";s:28:", '' AS field6, '' AS field7";s:8:"required";a:1:{s:6:"field5";s:1:"5";}s:3:"all";a:7:{i:0;a:21:{s:22:"profilefi eldcategoryid";s:1:"0";s:8:"location";N;s:14:"profilefieldid";s:1:"1";s:8:"required";s:1:" 0";s:6:"hidden";s:1:"0";s:9:"maxlength";s:5:"16384";s:4:"size";s:2:"50";s:12:"displayorder ";s:1:"1";s:8:"editable";s:1:"1";s:4:"type";s:8:"textarea";s:4:"data";s:0:"";s:6:"height"; s:1:"0";s:3:"def";s:1:"0";s:8:"optional";s:1:"0";s:10:"searchable";s:1:"0";s:10:"memberlis t";s:1:"0";s:5:"regex";s:0:"";s:4:"form";s:1:"0";s:4:"html";s:1:"0";s:7:"perline";s:1:"0"; s:10:"showonpost";s:1:"0";}i:1;a:21:{s:22:"profilefieldcategoryid";s:1:"0";s:8:"location"; N;s:14:"profilefieldid";s:1:"2";s:8:"required";s:1:"1";s:6:"hidden";s:1:"0";s:9:"maxlength ";s:3:"100";s:4:"size";s:2:"25";s:12:"displayorder";s:1:"2";s:8:"editable";s:1:"1";s:4:"ty pe";s:5:"input";s:4:"data";s:0:"";s:6:"height";s:1:"0";s:3:"def";s:1:"0";s:8:"optional";s: 1:"0";s:10:"searchable";s:1:"1";s:10:"memberlist";s:1:"1";s:5:"regex";s:0:"";s:4:"form";s: 1:"0";s:4:"html";s:1:"0";s:7:"perline";s:1:"0";s:10:"showonpost";s:1:"0";}i:2;a:21:{s:22:" profilefieldcategoryid";s:1:"0";s:8:"location";N;s:14:"profilefieldid";s:1:"3";s:8:"requir ed";s:1:"0";s:6:"hidden";s:1:"0";s:9:"maxlength";s:3:"100";s:4:"size";s:2:"25";s:12:"displ ayorder";s:1:"3";s:8:"editable";s:1:"1";s:4:"type";s:5:"input";s:4:"data";s:0:"";s:6:"heig ht";s:1:"0";s:3:"def";s:1:"0";s:8:"optional";s:1:"0";s:10:"searchable";s:1:"0";s:10:"membe rlist";s:1:"0";s:5:"regex";s:0:"";s:4:"form";s:1:"0";s:4:"html";s:1:"0";s:7:"perline";s:1: "0";s:10:"showonpost";s:1:"0";}i:3;a:21:{s:22:"profilefieldcategoryid";s:1:"0";s:8:"locati on";N;s:14:"profilefieldid";s:1:"4";s:8:"required";s:1:"0";s:6:"hidden";s:1:"0";s:9:"maxle ngth";s:3:"100";s:4:"size";s:2:"25";s:12:"displayorder";s:1:"4";s:8:"editable";s:1:"1";s:4 :"type";s:5:"input";s:4:"data";s:0:"";s:6:"height";s:1:"0";s:3:"def";s:1:"0";s:8:"optional ";s:1:"0";s:10:"searchable";s:1:"0";s:10:"memberlist";s:1:"0";s:5:"regex";s:0:"";s:4:"form ";s:1:"0";s:4:"html";s:1:"0";s:7:"perline";s:1:"0";s:10:"showonpost";s:1:"0";}i:4;a:21:{s: 22:"profilefieldcategoryid";s:1:"0";s:8:"location";N;s:14:"profilefieldid";s:1:"5";s:8:"re quired";s:1:"3";s:6:"hidden";s:1:"0";s:9:"maxlength";s:3:"100";s:4:"size";s:2:"25";s:12:"d isplayorder";s:1:"5";s:8:"editable";s:1:"1";s:4:"type";s:5:"input";s:4:"data";s:0:"";s:6:" height";s:1:"0";s:3:"def";s:1:"0";s:8:"optional";s:1:"0";s:10:"searchable";s:1:"1";s:10:"m emberlist";s:1:"1";s:5:"regex";s:0:"";s:4:"form";s:1:"0";s:4:"html";s:1:"0";s:7:"perline"; s:1:"0";s:10:"showonpost";s:1:"0";}i:5;a:21:{s:22:"profilefieldcategoryid";s:1:"0";s:8:"lo cation";N;s:14:"profilefieldid";s:1:"6";s:8:"required";s:1:"2";s:6:"hidden";s:1:"1";s:9:"m axlength";s:3:"100";s:4:"size";s:2:"25";s:12:"displayorder";s:1:"6";s:8:"editable";s:1:"2" ;s:4:"type";s:5:"input";s:4:"data";s:1:"5";s:6:"height";s:1:"0";s:3:"def";s:1:"0";s:8:"opt ional";s:1:"0";s:10:"searchable";s:1:"0";s:10:"memberlist";s:1:"0";s:5:"regex";s:5:"^[4]$";s:4:"form";s:1:"0";s:4:"html";s:1:"0";s:7:"perline";s:1:"0";s:10:"showonpost";s:1:"0";} i:6;a:21:{s:22:"profilefieldcategoryid";s:1:"0";s:8:"location";N;s:14:"profilefieldid";s:1 :"7";s:8:"required";s:1:"1";s:6:"hidden";s:1:"1";s:9:"maxlength";s:3:"100";s:4:"size";s:2: "25";s:12:"displayorder";s:1:"7";s:8:"editable";s:1:"2";s:4:"type";s:5:"input";s:4:"data"; s:9:"Mercedes?";s:6:"height";s:1:"0";s:3:"def";s:1:"0";s:8:"optional";s:1:"0";s:10:"search able";s:1:"0";s:10:"memberlist";s:1:"0";s:5:"regex";s:3:"BMW";s:4:"form";s:1:"0";s:4:"html ";s:1:"0";s:7:"perline";s:1:"0";s:10:"showonpost";s:1:"0";}}}

            Next issue I'm running into (which I've had before) is the darn CacheEvent causing a runaway query to prevent the site from loading. Everything will slow to a crawl until I kill the query. See attached screenshot

            Running 5.6.5, PHP 7.4 on Apache2 / Ubuntu 20.04 LTS and MySQL 8.0.19

            Comment


            • #7
              I do see something weird in the definition of the first first.

              How many custom profile fields do you have? What happens if you go into the AdminCP, edit a custom profile field and then save it again?

              For the cacheevent table, truncate it and the cache table or use Maintenance -> Clear System Cache.
              Translations provided by Google.

              Wayne Luke
              The Rabid Badger - a vBulletin Cloud demonstration site.
              vBulletin 5 API

              Comment


              • #8
                Hi Wayne,

                I did clear the System Cache before (sorry forgot to mention), but that error was still cropping up it seems

                Regarding the Custom Profile Fields, we have 7 of them, all save fine if I open/edit/save.

                Comment


                • #9
                  Hi Wayne,

                  Even with System Cache clears I still get this multiple times a month (and sometimes a week). I need to kill the query every time

                  Database error in vBulletin 5.6.5:

                  Invalid SQL:
                  /** saveDbCache */ DELETE FROM cacheevent WHERE (cacheid = 'getSearchResults_fa36c53662ca45cffe2f4b53fd43c23f' AND event = 'nodeChg_384003') OR
                  (cacheid = 'getSearchResults_fa36c53662ca45cffe2f4b53fd43c23f' AND event = 'perms_changed') OR
                  (cacheid = 'getSearchResults_fa36c53662ca45cffe2f4b53fd43c23f' AND event = 'vB_ChannelStructure_chg') OR
                  (cacheid = 'getSearchResults_fa36c53662ca45cffe2f4b53fd43c23f' AND event = 'vB_SearchResults_chg_0');

                  MySQL Error : Lock wait timeout exceeded; try restarting transaction
                  Error Number : 1205
                  Request Date : Monday, February 28th 2022 @ 07:31:45 PM
                  Error Date : Monday, February 28th 2022 @ 07:33:47 PM
                  Script : https://www.r3vlimited.com/board/for...nifold-on-325i
                  Referrer : https://www.google.com/
                  IP Address : 199.126.253.87
                  Username : Guest
                  Classname : vB_Database_MySQLi
                  MySQL Version :


                  Stack Trace:
                  #0 vB_Database->getErrorData() called in phar://[path]/vb/vb.phar/database.php on line 1215
                  #1 vB_Database->halt() called in phar://[path]/vb/vb.phar/database/mysqli.php on line 248
                  #2 vB_Database_MySQLi->execute_query() called in phar://[path]/vb/vb.phar/database.php on line 569
                  #3 vB_Database->query_write() called in phar://[path]/vb/vb.phar/db/mysql/querydefs.php on line 7314
                  #4 vB_dB_MYSQL_QueryDefs->saveDbCache() called in phar://[path]/vb/vb.phar/db/query/method.php on line 67
                  #5 vB_dB_Query_Method->execSQL() called in phar://[path]/vb/vb.phar/db/assertor.php on line 293
                  #6 vB_dB_Assertor->assertQuery() called in phar://[path]/vb/vb.phar/cache/db.php on line 379
                  #7 vB_Cache_Db->shutdown() called in phar://[path]/vb/vb.phar/shutdown.php on line 92
                  #8 vB_Shutdown->shutdown() called in [path]/vb/vb.php on line 479
                  #9 vB::shutdown() called in on line

                  Comment


                  • #10
                    HI Wayne, this is still an issue and I'm running out of ideas. Any input?

                    Comment


                    • #11
                      Restart your MySQL server. Clear your cache in the AdminCP under maintenance → clear system cache. Clear your cache periodically.

                      I don't know what causes the issue and have we have never been able to reproduce it.
                      Translations provided by Google.

                      Wayne Luke
                      The Rabid Badger - a vBulletin Cloud demonstration site.
                      vBulletin 5 API

                      Comment

                      Related Topics

                      Collapse

                      Working...
                      X