Scriptrunner (Doug Sparling)
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Blocking Countries with htaccessI’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/24Also, you may want to try something like the iQ Block Country plugin. Once again with the caveat that I haven’t done this myself.
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
In reply to: Redirect a linkI’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/ 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
In reply to: Upgrade to 3.6.1 fatal errorThis 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 64Mor
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
In reply to: Making site private (not public) while building…My pleasure. Best of luck and happy coding!
Forum: Fixing WordPress
In reply to: WP adding trailing "#!" to links?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 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
In reply to: automatic language changeYou might want to look at this article on the WordPress Codex:
Forum: Fixing WordPress
In reply to: Making site private (not public) while building…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
In reply to: Fatal Error on line 1281Probably 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
In reply to: Temporarily hiding content from prudesI’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:
Forum: Fixing WordPress
In reply to: Making site private (not public) while building…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
In reply to: 403 Forbidden Access is forbidden to the requested page.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 +FollowSymLinksto first line of .htaccess.
Check out this older post on the WordPress.org forums:
Forum: Fixing WordPress
In reply to: Will caching help decrease CPU load?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
In reply to: Lots of "/?s=" in log filesTencentTraveler 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
In reply to: editing tell a friend pop up formChange 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.