Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
IIS Installation
Hi.
I’m triying to install textpattern on a Windows/IIS server. Everything seems to work ok, but I have a problem in how the comment preview URL is generated.
When I fill the form in, for example, /weblog/index.php?id=4#comment, the form is send to /weblog/id=4#cpreview (the “index.php?” part is lost).
My diagnostic info:
<pre>
Textpattern version: 4.0.2 (r1076)
last_update: 2005-11-04 11:59:18/2005-11-01 14:01:30
Document root:
$path_to_site: C:\servicios\web\weblog
Textpattern path: C:\servicios\web\weblog\textpattern
Permanent link mode: messy
upload_tmp_dir: C:\PHP\uploadtemp
Temp folder: C:\servicios\web\weblog\textpattern\tmp
Site URL: intranet.tao/weblog
PHP version: 5.0.5
Server time: 2005-11-09 12:50:11
MySQL: 3.23.49-nt
Locale: English_United Kingdom.1252
Server: Microsoft-IIS/5.0
Pre-flight check:
————————————
C:\servicios\web\weblog\textpattern\setup\ still exists
————————————
.htaccess file contents:
————————————
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#RewriteBase /relative/web/path/
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]
RewriteRule ^(.*) index.php </IfModule>#php_value register_globals 0
————————————
</pre>
Is there something I can do to execute txp in this configuration?
Offline
Re: IIS Installation
Your problem is (I guess) this code in publish.php (line 212 ff.):
<code>
// some useful vars for taghandlers, plugins
$out[‘request_uri’] = serverSet(‘REQUEST_URI’);
$out[‘qs’] = serverSet(‘QUERY_STRING’);
// IIS – can someone confirm whether or not this works?
if (!$out[‘request_uri’] and $argv = serverSet(‘argv’))
$out[‘request_uri’] = @substr($argv0, strpos($argv0, ‘;’ + 1));
</code>
I’m guessing that this returns a different value for request-uri than it would, if request_uri is properly set in the $_SERVER variables.
Can you add a var_dump($argv);
and view that same page with the comment-form again and tell us what it outputs there.
sidenote: A workaround that might work for you right now, is to add this to config.php define('PARTLY_MESSY',true);
however I would prefer if we can track down and correct the initial problem (if possible).
Offline
Re: IIS Installation
<code>define(‘PARTLY_MESSY’,true);</code> doesn’t work. The url obtained is “/weblog/?id=4#cpreview” which doesn’t work.
When I put <code>var_dump($argv);</code> the following string is printed:
<pre>array(1) { [0]=> string(4) “id=4” }</pre>
I investigated some other forum threads. If I substitute line 115 of comment.php:
<pre>$url = $GLOBALS[‘pretext’][‘request_uri’];</pre>
with the following line:
<pre>$url = $GLOBALS[‘pretext’][‘script_name’];</pre>
With this change I can submit a comment. The only problem now is that after the comment I am redirected to the index of the weblog, not to the commented entry.
Offline
Re: IIS Installation
> The url obtained is ”/weblog/?id=4#cpreview” which doesn’t work.
Why do you mean with “doesn’t work”? For textpattern to work correctly index.php has to be set as the DirecotryIndex. You should see the same whether you access /weblog/ or /weblog/index.php, and hence /weblog/?id=4 should be equivalent to /weblog/index.php?id=4.
I am guessing, that the request-uri workaround is intended to work for clean-urls mainly. Have to think about how best to solve this…
Offline
Re: IIS Installation
> Why do you mean with “doesn’t work”? For textpattern to work correctly index.php has to be set as the
DirecotryIndex. You should see the same whether you access /weblog/ or /weblog/index.php, and hence /weblog/?id=4 should be equivalent to /weblog/index.php?id=4.
You are true. But I obtain a HTTP 405 error.
With the change in comment.php almost everything work, except for the redirection to the index after commenting.
Offline
#6 2005-12-28 20:56:00
- bruno1378
- Member
- Registered: 2005-12-22
- Posts: 22
Re: IIS Installation
Hi jaunjonavarro,
I am having the same issue – please see my thread here:
http://forum.textpattern.com/viewtopic.php?id=13510
Last edited by bruno1378 (2005-12-28 20:56:43)
Offline
Offline
Pages: 1