Title: Scriptrunner (Doug Sparling)'s Replies - page 31 | WordPress.org

---

# Scriptrunner (Doug Sparling)

  [  ](https://wordpress.org/support/users/scriptrunner/)

 *   [Profile](https://wordpress.org/support/users/scriptrunner/)
 *   [Topics Started](https://wordpress.org/support/users/scriptrunner/topics/)
 *   [Replies Created](https://wordpress.org/support/users/scriptrunner/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/scriptrunner/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/scriptrunner/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/scriptrunner/engagements/)
 *   [Favorites](https://wordpress.org/support/users/scriptrunner/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 451 through 465 (of 520 total)

[←](https://wordpress.org/support/users/scriptrunner/replies/page/30/?output_format=md)
[1](https://wordpress.org/support/users/scriptrunner/replies/?output_format=md) 
[2](https://wordpress.org/support/users/scriptrunner/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/scriptrunner/replies/page/3/?output_format=md)…
[30](https://wordpress.org/support/users/scriptrunner/replies/page/30/?output_format=md)
31 [32](https://wordpress.org/support/users/scriptrunner/replies/page/32/?output_format=md)
[33](https://wordpress.org/support/users/scriptrunner/replies/page/33/?output_format=md)
[34](https://wordpress.org/support/users/scriptrunner/replies/page/34/?output_format=md)
[35](https://wordpress.org/support/users/scriptrunner/replies/page/35/?output_format=md)
[→](https://wordpress.org/support/users/scriptrunner/replies/page/32/?output_format=md)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Blocking Countries with htaccess](https://wordpress.org/support/topic/blocking-countries-with-htaccess/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/blocking-countries-with-htaccess/#post-4153908)
 * I’ve not done this bfore, but I believe you could do something like this (this
   is supposedly US IPs only, you’ll need to find the others):
 *     ```
       order deny,allow
       deny from all
       allow from IP
       60.254.128.0/18
       103.246.248.0/24
       113.29.0.0/17
       163.60.0.0/16
       192.103.43.0/24
       202.72.96.0/20
       203.144.48.0/20
       203.187.128.0/19
       179.60.192.0/22
       190.103.184.0/22
       200.49.248.0/21
       5.152.184.0/21
       31.170.160.0/21
       37.18.176.0/21
       46.22.64.0/20
       46.231.240.0/21
       88.151.224.0/21
       89.255.192.0/18
       93.183.0.0/18
       93.184.208.0/20
       93.188.128.0/21
       109.70.88.0/21
       141.0.8.0/21
       149.154.0.0/18
       176.67.80.0/21
       212.1.208.0/21
       213.137.64.0/19
       87.76.16.0/20
       87.239.136.0/21
       91.205.100.0/22
       91.209.6.0/24
       91.209.57.0/24
       91.223.191.0/24
       91.225.248.0/22
       130.26.0.0/16
       165.218.0.0/16
       176.120.16.0/21
       193.34.36.0/22
       193.58.216.0/21
       193.105.173.0/24
       193.138.72.0/24
       193.160.33.0/24
       193.164.220.0/23
       193.201.252.0/22
       193.203.8.0/21
       193.254.198.0/23
       194.42.216.0/24
       194.110.160.0/22
       194.153.155.0/25
       195.42.132.0/23
       195.66.102.0/24
       195.66.132.0/23
       195.190.24.0/24
       195.200.84.0/23
       195.216.225.0/24
       195.230.108.0/24
       ```
   
 * Also, you may want to try something like the [iQ Block Country](http://wordpress.org/plugins/iq-block-country/)
   plugin. Once again with the caveat that I haven’t done this myself.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Warning: preg_match(): Compilation failed: nothing to repeat at offset 1..](https://wordpress.org/support/topic/warning-preg_match-compilation-failed-nothing-to-repeat-at-offset-1/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/warning-preg_match-compilation-failed-nothing-to-repeat-at-offset-1/#post-4154312)
 * That sounds like a PHP warning. PHP uses a library called PCRE (Perl Compatible
   Regular Expressions) and this warning usually occurs when PCRE and/or PHP is 
   out of date.
 * To keep the warnings from displaying on your site, add this to wp-config.php:
 *     ```
       error_reporting(0);
       @ini_set('display_errors', 0);
       ```
   
 * As to why this happened, it’s hard to say. I’ve seen a few things break when 
   hosts upgrade their PHP version.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Redirect a link](https://wordpress.org/support/topic/help-425/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/help-425/#post-4154302)
 * I’m not quite sure I understand your question completely, but as I understand
   it, you’ve created pages and you want to change the link and/or page title?
 * If so, you can update both in the page admin:
 * Page->All Pages
 * and then click “Edit” for whichever page you want to update.
 * You can set the title there. By default, WordPress will use the title of the 
   page as the permalink/URL (if you are using permalinks). You can edit that actual
   permalink there as well so it can be different from your page title.
 * Right below the title edit text box, should should see the current permalink 
   and two buttons to the right of that to edit or view the page:
 * Permalink: [http://www.example.com/somepage/](http://www.example.com/somepage/) ‎
   Edit View Page
 * If you haven’t set permalinks or it’s not clear to you, go to:
 * Settings->Permalinks
 * I generally use “Post Name” instead of “Default,” but there are other choices.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Upgrade to 3.6.1 fatal error](https://wordpress.org/support/topic/upgrade-to-361-fatal-error/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/upgrade-to-361-fatal-error/#post-4154292)
 * This means PHP is trying to use more memory than it’s allowed to use (the maximum
   amount of memory a script may consume). You’ll need to increase the amount of
   memory that PHP can use and how you do this will depend a bit on your hosting.
 * From the look of it, you probably have a 32M limit. If you can increase that 
   64M, that should get you going.
 * Here are the things you can try yourself (and only one needs to be done. Which
   one works, if any, will as I said depend on your hosting situation). I generally
   try in this order:
 * In php.ini, update memory_limit to this:
    `memory_limit = 64M;`
 * or
 * Add this line to .htaccess:
    `php_value memory_limit 64M`
 * or
 * Add this line to wp-config.php:
    `define('WP_MEMORY_LIMIT', '64M')`
 * If none of these work, then you’ll need to contact your hosting provider.
 * You may also try disabling all your plugins before doing the upgrade, though 
   32M is pretty low. I’ve found that I generally need at least 64M, and I’ll set
   it to 128M if I can.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Making site private (not public) while building…](https://wordpress.org/support/topic/making-site-private-not-public-while-building/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/making-site-private-not-public-while-building/#post-4153085)
 * My pleasure. Best of luck and happy coding!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WP adding trailing "#!" to links?](https://wordpress.org/support/topic/wp-adding-trailing-to-links/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/wp-adding-trailing-to-links/#post-4153084)
 * Yes, the #! (hashbang) does has something to do with the theme and its AJAX. 
   The hashbang was developed by Google so their spiders could crawl Ajax content,
   and not without some controversy (the article [Breaking the Web with hash-bangs](http://isolani.co.uk/blog/javascript/BreakingTheWebWithHashBangs)
   comes to mind)…or at least some contention. It’s more than likely being generated
   and added in a javascript file in your theme and you’d have to find the source
   and modify that. That said, it’s certainly being used often.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [automatic language change](https://wordpress.org/support/topic/automatic-language-change/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/automatic-language-change/#post-4153032)
 * You might want to look at this article on the WordPress Codex:
 * [Multilingual WordPress](http://codex.wordpress.org/Multilingual_WordPress)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Making site private (not public) while building…](https://wordpress.org/support/topic/making-site-private-not-public-while-building/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/making-site-private-not-public-while-building/#post-4153029)
 * You can set the visibility of pages and posts to private or password protected
   on a per page/post basis. But you’d have to do it individually for every single
   page and post. I’d go the plugin/htpasswd route, since then you’d only have to
   do it once.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Fatal Error on line 1281](https://wordpress.org/support/topic/fatal-error-on-line-1281/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-on-line-1281/#post-4152656)
 * Probably a plugin issue. You might try renaming your plugins directory/folder,
   which will deactivate all your plugins. If that works, you can create a new plugins
   folder and add the plugins back one at a time until it breaks (or it might be
   easier to to the reverse…just change the name of each individual plugin folder
   one at a time until the site starts working). The advantage of the first method
   is you find out right away if it’s actually a plugin (you just don’t know which
   one) that is causing it. It could also be a theme.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Temporarily hiding content from prudes](https://wordpress.org/support/topic/temporarily-hiding-content-from-prudes/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/temporarily-hiding-content-from-prudes/#post-4153017)
 * I’ve not done this but this is something I could use (but don’t have time to 
   try out tonight), so I took a quick look through the WordPress plugin repository.
 * Here are a couple plugins that may be helpful:
 * [WP-ShowHide](http://wordpress.org/plugins/wp-showhide/)
    [NSFW WP Images](http://wordpress.org/plugins/nsfw-wp-images/)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Making site private (not public) while building…](https://wordpress.org/support/topic/making-site-private-not-public-while-building/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/making-site-private-not-public-while-building/#post-4153014)
 * I often use a subdomain or subdirectory and/or simply use htpasswd to give me
   a simple login for the entire site. I haven’t done this lately, but I’d probably
   try a plugin like underConstruction or Closed Beta, which uses WP for the login
   instead of htpasswd.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [403 Forbidden Access is forbidden to the requested page.](https://wordpress.org/support/topic/403-forbidden-access-is-forbidden-to-the-requested-page/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/403-forbidden-access-is-forbidden-to-the-requested-page/#post-4152645)
 * Have you tried setting the permalinks back to what they were before?
 * A lot of times 403 errors on permalinks are due to permission issues with .htaccess(
   to strict) or needing to add
 * `Options +FollowSymLinks`
 * to first line of .htaccess.
 * Check out this older post on the WordPress.org forums:
 * [403 Forbidden when changing permalink settings](http://wordpress.org/support/topic/403-forbidden-when-changing-permalink-settings)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Will caching help decrease CPU load?](https://wordpress.org/support/topic/will-caching-help-decrease-cpu-load/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/will-caching-help-decrease-cpu-load/#post-4152643)
 * Caching is one of the first tools used to scale web sites. Your mileage is definitely
   going to vary depending on your circumstances (shared hosting vs VPS, number 
   of course, amount of RAM, if MySQL is on same or different server, etc), but 
   with caching you’ll eliminate most database calls (after the page is cached the
   first time) and basically be serving static HTML, so PHP won’t have to do any
   processing. In some cases I’ve had better luck caching DB queries (using DB Cache
   Reloaded) than with the normal caching plugins like W3 Total Cache or WP Super
   Cache. I normally don’t cache unless I have to (and with shared hosts, I often
   have to). A default WP theme with no plugins shouldn’t give you to many DB queries,
   but themes and plugins can up the number considerably, especially if the theme
   or plugin is written poorly (I say that because I had a premium theme that did
   100+ writes with every page request due to the theme author using the wrong hook
   in the theme, and the theme reinitialized itself with every page call). It could
   be many things, but slow queries will really cause CPU issues and bog your server
   down (which could be caused by missing indexes in your tables).
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Lots of "/?s=" in log files](https://wordpress.org/support/topic/lots-of-s-in-log-files/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/lots-of-s-in-log-files/#post-4150771)
 * TencentTraveler is actually a legitimate UserAgent (apparently most popular browser
   in China), but more than likely a bot/spider/crawler is spoofing it (as well 
   as other popular UAs). You can use htaccess if you want to block UAs or IP blocks.
   Someone mentioned they just all IPs from China. You may find yourself playing“
   whack-a-mole,” but if it concerns you, you can ban IPs/UAs as you have issues.
 * The important thing is to make sure your site is hardened so actual malicious
   attacks can do no harm. I generally don’t worry much about non-malicious behavior
   unless we’re getting hammered and it effects server performance. We did get hit
   hard a few weeks ago from some bots, but they were attempting every known vulnerability
   under the sun (including many mailicious URLs). No damage done, as our sites 
   are heavily locked down as far as security goes, but we did block the IPs because
   the traffic was excessive.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [editing tell a friend pop up form](https://wordpress.org/support/topic/editing-tell-a-friend-pop-up-form/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/editing-tell-a-friend-pop-up-form/#post-4150766)
 * Change line 226 from:
 * `$html = "<a href='".$open."'>".$TellAFriend_Caption."</a>";`
 * to:
 * `$html = '<div style="text-align: right">' . "<a href='".$open."'>".$TellAFriend_Caption."
   </a>" . '</div>';`
 * With the caveat that any updates to the plugin will require you do add this modification
   again.
 * So you can see it, I’ve added this update to the test page on my dev site.

Viewing 15 replies - 451 through 465 (of 520 total)

[←](https://wordpress.org/support/users/scriptrunner/replies/page/30/?output_format=md)
[1](https://wordpress.org/support/users/scriptrunner/replies/?output_format=md) 
[2](https://wordpress.org/support/users/scriptrunner/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/scriptrunner/replies/page/3/?output_format=md)…
[30](https://wordpress.org/support/users/scriptrunner/replies/page/30/?output_format=md)
31 [32](https://wordpress.org/support/users/scriptrunner/replies/page/32/?output_format=md)
[33](https://wordpress.org/support/users/scriptrunner/replies/page/33/?output_format=md)
[34](https://wordpress.org/support/users/scriptrunner/replies/page/34/?output_format=md)
[35](https://wordpress.org/support/users/scriptrunner/replies/page/35/?output_format=md)
[→](https://wordpress.org/support/users/scriptrunner/replies/page/32/?output_format=md)