Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

101,580 Posts in 17,914 Topics- by 8,087 Members - Latest Member: nopCommerce

November 20, 2008, 01:09:22 PM
CrystalTech ForumsProgramming/DesignPHP ForumWordpress - Permalinks... tried everything
Pages: [1]   Go Down
Print
Author Topic: Wordpress - Permalinks... tried everything  (Read 2215 times)
mrs_italait
Newbie
*

Karma: +25/-0
Offline Offline

Posts: 25


OS:
Windows Vista
Browser:
Microsoft Internet Explorer 7.0


WWW
« on: April 18, 2008, 05:50:39 AM »

Permalinks aren't working on my new setup on Crystaltech with Wordpress.

Things I've tried:

*  Using PATHINFO permalinks. (/index.php/%year%/%monthnum%/%day%/%postname%)
*  Putting up a php.ini into /blog/ with the following in them, as per Wordpress.org
    cgi.fix_pathinfo = 1
    cgi.force_redirect = 0

*  Creating a 404 page solution as per this site (Note: custom error pages don't seem to work at all on my site, because when I added blog/wp-404-handler.php as my error page and then tried to go to a bogus page, it gave me the standard 404 error.)
*  I've also followed the instructions on this post and edited my wp-db page to comment out line 204 (in the newest version of WP, it's no longer line 163 that contains error_log($error_str, 0))

You can see the blog at:

http://www.bannedfromusa.com/blog/

Any help would be appreciated!

[EDIT] The error message I get when following the permalinks is:  "CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers."[/EDIT]
« Last Edit: April 18, 2008, 07:09:39 AM by mrs_italait » Logged

--India

My code doesn't have bugs, it has unexpected features.
ak732
Happily Verbose
Hero Member
*****

Karma: +207/-39
Online Online

Posts: 1,201

OS:
Windows Vista
Browser:
Firefox 2.0.0.14


WWW
« Reply #1 on: April 18, 2008, 06:33:53 AM »

Check out this thread: http://forums.crystaltech.com/index.php/topic,27575.0.html

It's not entirely clear the fix(es) there will help, but at least it seemed to work for one person.
« Last Edit: April 18, 2008, 06:36:18 AM by ak732 » Logged

Andy
mrs_italait
Newbie
*

Karma: +25/-0
Offline Offline

Posts: 25


OS:
Windows Vista
Browser:
Microsoft Internet Explorer 7.0


WWW
« Reply #2 on: April 18, 2008, 07:01:28 AM »

Thanks... but this thread just lists the things I've already tried. Sad

I did update my problem because I realised I wasn't too clear... it seems that some CGI error is the root of the error, or at least my first hurdle.

Thanks for the reply though!  Kiss
« Last Edit: April 18, 2008, 07:24:51 AM by mrs_italait » Logged

--India

My code doesn't have bugs, it has unexpected features.
mrs_italait
Newbie
*

Karma: +25/-0
Offline Offline

Posts: 25


OS:
Windows Vista
Browser:
Microsoft Internet Explorer 7.0


WWW
« Reply #3 on: April 18, 2008, 08:29:30 AM »

Just letting everyone who might be coming later with this same problem...

I got a note from support suggesting that I try the method in the other thread which suggested reinstalling the blog in a /blog/1/ directory.  Well that was the ONE thing listed that I hadn't tried because I thought it was too screwy for belief.

Anyway, guess what.. tried it and it worked.  No idea why, but sometimes you just go with it, yeah?  The nice lil supporty guy copied my blog directory over for me, and I just had to reset the database.

Yay supporty guy! (William Grove woohoo!)
Logged

--India

My code doesn't have bugs, it has unexpected features.
mrs_italait
Newbie
*

Karma: +25/-0
Offline Offline

Posts: 25


OS:
Windows Vista
Browser:
Microsoft Internet Explorer 7.0


WWW
« Reply #4 on: April 21, 2008, 06:01:37 AM »

One last follow-up!  I am just doing this because I hate it when someone asks a question on a forum, then gets the answer somewhere else, but doesn't bother to post the solution!

I ended up, as I said, going through Support about this, and eventually we were able to get rid of the ugly /blog/1/ solution with a workaround.  So now the blog is located at http://www.bannedfromusa.com/blog (without the ONE) which looks MUCH tidier!

Wm Grove wrote saying this:
Quote
The issue is the permalinks not working with the new php version
php-cgi.exe. I have configured your site to use the phpisapi.dll which fixes
the issue. Keep in mind this is only a temporary fix

My understanding, therefore is that this is a problem that began in WordPress 2.3, however because I'm using Wordpress 2.5, the latest version that came out only two weeks ago, the usual workaround (a manual edit of the wpdb page) doesn't work because the code in 2.5 is substantially different.

Cheers all!  I'll post again if I find out more!
« Last Edit: April 21, 2008, 06:05:16 AM by mrs_italait » Logged

--India

My code doesn't have bugs, it has unexpected features.
roml
Jr. Member
**

Karma: +16/-1
Offline Offline

Posts: 219


OS:
Mac OS X
Browser:
Firefox 2.0.0.14


WWW
« Reply #5 on: April 21, 2008, 09:56:51 AM »

1 Karma point for coming back and posting the solution
.5 karma point again when it lets me, based on your enthusiasm
.5 karma point again when it lets me, for coining supporty guy



Logged

wmalex59
Newbie
*

Karma: +1/-0
Offline Offline

Posts: 60

OS:
Windows XP
Browser:
Firefox 2.0.0.16


« Reply #6 on: August 05, 2008, 02:12:50 PM »

Here's what I did to get Permalinks working for WordPress v2.5.1 and 2.6

STEP 1:
Create a page called wp-404-handler.php with the following code:

<?php
$qs = $_SERVER['QUERY_STRING'];
$_SERVER['REQUEST_URI'] = substr($qs, strpos($qs, ':80')+3);
$_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'];
include('index.php');
?>

Place wp-404-handler.php in the root of your blog folder

STEP 2:
Login to Control Panel > IIS > Custom Errors
Edit 404 to URL with: blogfoldername/wp-404-handler.php

STEP 3:
Login to blog. Change Settings > Permalinks

Set Custom Structure to /%year%/%monthnum%/%postname%/

STEP 4:
Save settings and test blog.

Worked for me...so far. Cheesy
Logged
elhome
Newbie
*

Karma: +2/-0
Offline Offline

Posts: 7

OS:
Windows XP
Browser:
Microsoft Internet Explorer 7.0


« Reply #7 on: August 11, 2008, 02:09:27 PM »

My understanding is that a lot of this is due to a bug in 2.6 that will be fixed in 2.6.1.  In the meantime, here's how I fixed it.  The solution is at
http://amindbesideitself.com/index.php/2008/wordpress/wordpress-26-iis-permalink-bug/

On the Permalinks page, specify /index.php/%postname%/ as the custom structure.  /index.php must be included, as that's the cause of the problem.

(I also added /category and /tag to the base specifications, respectively; don't know if it helps, but it doesn't seem to hurt.)

You also need the php.ini file in your root directory.  The solution at the link above doesn't mention that:

[PHP]
cgi.fix_pathinfo = 1
cgi.force_redirect = 0

Regarding using the custom 404 page solution I've seen, you should avoid that if you want your blog to be indexed by the search engines.  While you can redirect a page using custom 404 pages, 404 still registers as an error.  The redirection will be ignored.  You can end up having no pages indexed.
Logged
wmalex59
Newbie
*

Karma: +1/-0
Offline Offline

Posts: 60

OS:
Windows XP
Browser:
Firefox 3.0.1


« Reply #8 on: August 26, 2008, 12:47:26 PM »

I've got the latest Wordpress version installed on one of my sites (Version 2.6.1) and but how do you handle the permalinks problem for pages?
Works ok for posts but if you select anything other than default settings, index.php shows up in the string ahead of the page name and results in a CGI error.
Logged
mannaggia
Newbie
*

Karma: +1/-0
Offline Offline

Posts: 48

OS:
Windows XP
Browser:
Microsoft Internet Explorer 7.0


« Reply #9 on: August 26, 2008, 03:45:09 PM »

I was reading through this thread... I am not using Wordpress, but I am using another PHP application called Moodle, which is educational software.

We are having problems trying to access files uploaded to Moodle, getting CGI errors about incomplete headers.

I just discovered Moodle has a "slasharguments" config option that was enabled, which creates URLs like file.php/course/filename.doc instead of file.php?file=/course/filename.doc.

This config option had been turned on for at least a year and worked with no problems.  The CGI error just started happening a few weeks ago.

Turning the option off has fixed the problem for us, but I contend that something changed at CT in the recent weeks that is causing this.
Logged
wmalex59
Newbie
*

Karma: +1/-0
Offline Offline

Posts: 60

OS:
Windows XP
Browser:
Firefox 2.0.0.16


« Reply #10 on: August 26, 2008, 08:18:21 PM »

According to my post at the WordPress support forum, there is no fix for IIS hosting users and the 2.6.1 permalinks page display problem.

I guess that boils down to using the default (non-friendly URL's) settings, permalinks without the use of WordPress pages or hosting WordPress on a non-Windows server. Nice. Huh
Logged
elhome
Newbie
*

Karma: +2/-0
Offline Offline

Posts: 7

OS:
Windows XP
Browser:
Microsoft Internet Explorer 7.0


« Reply #11 on: August 29, 2008, 01:55:59 PM »

I guess that boils down to using the default (non-friendly URL's) settings, permalinks without the use of WordPress pages or hosting WordPress on a non-Windows server. Nice. Huh


I know it's frustrating, and the links aren't as pretty with /index.php/ in them, but it shouldn't affect search engine friendliness.  The title tags are more important, and you still can rename the "file" in the URL so it's keyword rich.

I did find this post which talks about a wp-rewriting-url.dll
http://www.deanlee.cn/wordpress/url-rewriting-for-wordpress-under-iis/
I don't understand enough about how these things work to comment on it otherwise, though.
Logged
Pages: [1]   Go Up
Print
Jump to: