Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2006-01-13 09:18:08

vinterstille
Member
From: Denmark
Registered: 2005-01-09
Posts: 17
Website

Re: 500 Internal Error on First try for comments w/ 4.0.2

I just made a clean install, on the same server as above, using nothing but 4.03 and standard settings… the 302 error is still there!


Found
The document has moved here.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

coming from http://klostertorvet.dk/test/article/1/first-post#cpreview

Last edited by vinterstille (2006-01-13 10:14:06)


http://vinterstille.dk

Offline

#32 2006-01-13 09:36:51

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: 500 Internal Error on First try for comments w/ 4.0.2

Alright, let’s try the following change:

Open textpattern/publish/comment.php and find around line 320:

txp_status_header('302 Found');

right below it, add:

$host = preg_replace("/(?<=[a-z])\/.*$/i",'',hu);
$backpage = $host.$backpage;

Let us know if it works now. If not, please link to a page that contains the error. Thanks.

Offline

#33 2006-01-13 12:05:06

vinterstille
Member
From: Denmark
Registered: 2005-01-09
Posts: 17
Website

Re: 500 Internal Error on First try for comments w/ 4.0.2

S,

I’ve edited comment.php as specified, it still shows a 302.. I’ve even tried using the svn version, as I read in some thread that it would be fixed in the next release and already was in svn.. (but actually i think that thread was about an older version). Also tried adding a new article after editing comment.php and posting a comment….. still a 302.

I’ve read all the threads i can find on 302’s and comment errors, tried every possible fix/hack but nothing helps..

The site is running on php 5 with register globals off, hosted at http://b-one.nu – do you want to see a phpinfo or other info?

http://klostertorvet.dk/ny-hjemmeside-til-cafe-klostertorvet

dont worry about the layout looking all banged up… its a work in progress (albeit slow)

Theres also a clean install at http://klostertorvet.dk/test

Ich hoffe das du mir hilfen kannst :) (thats about how good my german is theese days).

_____________
update:

I tried the comment.php edit on the clean install… and all i can get it to do is when you hit submit.. the page seems to re-load, but the comment isn’t added… any idea??

Last edited by vinterstille (2006-01-13 12:12:41)


http://vinterstille.dk

Offline

#34 2006-01-13 13:02:36

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: 500 Internal Error on First try for comments w/ 4.0.2

Which one is the edited version with my above suggested changes?

I only get a parse-error on the main page.

Also, have you double-checked that the modifications you made are correct? Can you post the lines with a bit of context (+/-3 lines before and after).

Offline

#35 2006-01-16 18:41:37

vinterstille
Member
From: Denmark
Registered: 2005-01-09
Posts: 17
Website

Re: 500 Internal Error on First try for comments w/ 4.0.2

S,

Sorry about the late reply.. and you where right.. there was an error in the comment.php file on the main installation on klostertorvet.dk. But I’ve edited the file again with the following:

$backpage = substr($backpage, 0, $prefs[‘max_url_len’]);
$backpage = preg_replace(“/[\x0a\x0d#].*$/s”,’‘,$backpage);
$backpage .= ((strstr($backpage,’?’)) ? ‘&’ : ‘?’) . ‘commented=’.(($visible==VISIBLE) ? ‘1’ : ‘0’);
txp_status_header(‘302 Found’);
$host = preg_replace(“/(?<=[a-z])\/.*$/i”,’‘,hu);
$backpage = $host.$backpage;
if($comments_moderate){
header(‘Location: ‘.$backpage.’#txpCommentInputForm’);
}else{
header(‘Location: ‘.$backpage.’#c’.sprintf(“%06s”,$rs));
}

Still a 302 error.

(and they are both updated with your changes)

Last edited by vinterstille (2006-01-16 18:42:45)


http://vinterstille.dk

Offline

#36 2006-01-25 10:54:52

vinterstille
Member
From: Denmark
Registered: 2005-01-09
Posts: 17
Website

Re: 500 Internal Error on First try for comments w/ 4.0.2

WORKAROUND:

I’ve tried and tried and tried to get 4.03 to work, but no good.. SO – If you run into the same error you CAN install 4.01 instead and follow the instructions here: http://forum.textpattern.com/viewtopic.php?pid=75416#p75416

I would love to hear from someone who has fixed (or hacked) the comment 302 object moved error in 4.03 :)


http://vinterstille.dk

Offline

#37 2006-01-25 11:48:37

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: 500 Internal Error on First try for comments w/ 4.0.2

> the comment 302 object moved error in 4.03 :)

I think the problem is not so much fixing it, but being able to reproduce the error. Once that can be done, it shouldn’t be too difficult to fix it.

Offline

#38 2006-02-01 13:10:31

vinterstille
Member
From: Denmark
Registered: 2005-01-09
Posts: 17
Website

Re: 500 Internal Error on First try for comments w/ 4.0.2

S,
I would be more than happy to hand over control of my webserver to you, so you can see for your self.. I can easily reproduce the error on my host: b-one webservers. All I have to do is make a clean install of the 4.03.

Clean install: 403 WITH 302 error.

Diagnostics:
Textpattern version: 4.0.3 (r1188)
last_update: 2006-02-01 13:32:39/2006-02-01 13:23:38
Document root: /customers/klostertorvet.dk/klostertorvet.dk/httpd.www
$path_to_site: /customers/klostertorvet.dk/klostertorvet.dk/httpd.www/403
Textpattern path: /customers/klostertorvet.dk/klostertorvet.dk/httpd.www/403/textpattern
Permanent link mode: section_id_title
Temp folder: /customers/klostertorvet.dk/klostertorvet.dk/httpd.www/403/textpattern/tmp
Site URL: klostertorvet.dk/403
PHP version: 5.1.1
server_time: 2006-02-01 14:40:15
MySQL: 4.0.24_Debian-10sarge1-log
Locale: en_GB.UTF-8
Server: Apache
php_sapi_mode: cgi-fcgi
os_version: Linux 2.6.12.6-vs2.0

.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

————————————

Charset (default/config): latin1/latin1
character_set: latin1
character_sets: latin1 big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1_de latin2 latin5 sjis swe7 tis620 ujis usa7 win1250 win1251ukr win1251
18 Tables: OK

PHP extensions: libxml, xsl/0.1, xmlrpc/0.51, xmlreader/0.1, xml, wddx, standard/5.1.1, SimpleXML, soap, SPL, session, PDO, pdo_mysql/1.0, mysql/1.0, imap, iconv, gettext, gd, dom/20031129, date/5.1.1, ctype, calendar, bcmath, zlib/1.1, pcre, openssl
/include/txp_category.php: r1154 (dffd7979531373149c74e3eedfbb50e2)
/include/txp_plugin.php: r1167 (c2c7d7fc1e4918c79cd3658c62e4fbda)
/include/txp_auth.php: r1166 (3e2eaca7b151e14561125ab68e722203)
/include/txp_form.php: r947 (c0e4393328985742bd81cda61d10d5ed)
/include/txp_section.php: r1154 (d85c1ce405fccd9dac364c8ef4eb72eb)
/include/txp_tag.php: r1134 (3e2dfbd6fdccf0693c147ba22a9705e7)
/include/txp_list.php: r1042 (e85d2de1c63b41f0e5bdcf268e3c487b)
/include/txp_page.php: r876 (e22dc37b465b87757722732a225b25f3)
/include/txp_discuss.php: r1170 (1e56e08cc95c255783410076db12529f)
/include/txp_prefs.php: r1170 (c806be1b1f238e75a5ff6b7cf8432d17)
/include/txp_log.php: r906 (68c4f32b70ce41a349f197b6bba6c200)
/include/txp_preview.php: r628 (a16f84b6610fc66db0bce51e25b7af34)
/include/txp_image.php: r1168 (e8ec79ff9b3a21c356ee23da7973b1f0)
/include/txp_article.php: r1170 (88689d7469d16c13d51bd4adff03ebd7)
/include/txp_css.php: r922 (0c596d9968052b89581d1ca65a77c5de)
/include/txp_admin.php: r1074 (7e87ff0e29101593fb170b1a2de9fd59)
/include/txp_link.php: r1154 (7c0c55ff6580793dff0626f169e64ad6)
/include/txp_diag.php: r1154 (5d66b90f7e7720dd0e3526ca1b24cf89)
/lib/admin_config.php: r877 (9aea12193cc76eea1964eb0383ec6513)
/lib/txplib_misc.php: r1170 (7000a1b27aa40c90978211e6cff358ec)
/lib/taglib.php: r628 (493878f922262157601c26a999a1c478)
/lib/txplib_head.php: r1183 (fb85b66b4e379476935233f844844bef)
/lib/classTextile.php: r1141 (b066c2bfa94a26ae3d70b245dcf81369)
/lib/txplib_html.php: r1166 (bd11de6e6daa3391eab75a46db55ae36)
/lib/txplib_db.php: r1170 (5a2c3a1e328cd343a067cbb8fd25cd79)
/lib/IXRClass.php: r765 (2efb0fb05b55c634072b0bae9af38bdd)
/lib/txplib_forms.php: r950 (74da2c67abe4786c353ea416c13656eb)
/publish/taghandlers.php: r1188 (4e8eaeb0543d8fde09d6e423af4253b9)
/publish/atom.php: r1117 (14c1aa23c708898d7723b3d6b9c89050)
/publish/log.php: r864 (c3d16d3dfe375819a19fcd62398e4b86)
/publish/comment.php: r1187 (d55dde574418d2eaf6a394d703056d9a)
/publish/search.php: r884 (80f942f1dc301857c2fa9dcb16aa1246)
/publish/rss.php: r1099 (ce0d82b9435d8f1de01c8e2b6c585f93)
/publish.php: r1186 (d5c20bf2298e87969575f9e622bf2797)
/index.php: r1172 (52f753ebb51c1f7d5312485d9dbad7e4)
/css.php: r944 (df1c754417bdfb4e97a2c83ae5b454ee)

Last edited by vinterstille (2006-02-01 13:42:22)


http://vinterstille.dk

Offline

#39 2006-03-12 12:42:24

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: 500 Internal Error on First try for comments w/ 4.0.2

V, any chance you can reproduce this with PHP 5.1.2?

I think we’ve identified a PHP bug, but they’ll only accept a report for 5.1.2 or 4.4.2.


Alex

Offline

#40 2006-03-15 22:26:54

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: 500 Internal Error on First try for comments w/ 4.0.2

It looks like we might have a fix. Those affected, please test.


Alex

Offline

#41 2006-03-16 09:00:08

vinterstille
Member
From: Denmark
Registered: 2005-01-09
Posts: 17
Website

Re: 500 Internal Error on First try for comments w/ 4.0.2

im sorry – i cannot reproduce it with 5.1.2 – php is pre-installed..

Ill try the fix asap.

.klaus


http://vinterstille.dk

Offline

#42 2006-04-02 19:35:37

vinterstille
Member
From: Denmark
Registered: 2005-01-09
Posts: 17
Website

Re: 500 Internal Error on First try for comments w/ 4.0.2

zem wrote:

It looks like we might have a fix. Those affected, please test.

I downloaded the latest revision from svn – it works right out of the repository… :) thanks!

.klaus


http://vinterstille.dk

Offline

Board footer

Powered by FluxBB