Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-06-19 21:02:29

castanet
Member
From: Oxford
Registered: 2005-03-19
Posts: 97

500 Internal Server Error

I have created a site in a sub domain new.mydomain.com and then redirected the main domain to it www.mydomain.com. I altered the site path in admin to www.mydomain.com. All seemed well for about two weeks but then I got a 500 server error and clean urls failed.
I changed the site path back to new.mydomain.com but to no avail. The site is still unviewable.

Any help appreciated. Here is the diagnostic info:

Textpattern version: 4.0.6 (r2805)
Last Update: 2008-02-05 21:07:47/2008-02-05 21:07:47
Document root: /home//www/new.mydomain.net (/home/www/new.mydomain.net)
$path_to_site: /home/www/new.mydomain.net
Textpattern path: /home/www/new.mydomain.net/textpattern
Permanent link mode: section_title
Temporary directory path: /home/www/new.mydomain.net/textpattern/tmp
Site URL: new.mydomain.net
PHP version: 4.4.8
Register globals: 1
GD Image Library: bundled (2.0.28 compatible); supported formats: GIF, JPG, PNG.
Server Local Time: 2008-06-19 23:52:40
MySQL: 5.0.32-Debian_7etch3~bpo31+1-log
Locale: en_GB.UTF-8
Server: Apache/2.0.54 (Debian GNU/Linux) mod_auth_pgsql/2.0.2b1 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_ph3/0.0.1
PHP Server API: cgi
RFC 2616 headers:
Server OS: Linux 2.6.25.2-1-AM
Active plugins: glx_hl_current-0.3, zem_contact_lang-4.0.3.6, zem_contact_reborn-4.0.3.20, pap_contact_cleaner-0.1, smd_slimbox-0.3, smd_lib-0.32, upm_image-0.6.1, upm_img_popper-1.3.7

Pre-flight check:
————————————
Clean URL test failed.
————————————

.htaccess file contents:
————————————
#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes

<IfModule mod_rewrite.c> RewriteEngine On #RewriteBase /relative/web/path/

RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteRule ^(.*) index.php

RewriteCond %{HTTP:Authorization} !^$ RewriteRule .* – [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>

#php_value register_globals 0

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

Charset (default/config): latin1/utf8
character_set_client: utf8
character_set_connection: utf8
character_set_database: latin1
character_set_filesystem: binary
character_set_results: utf8
character_set_server: latin1
character_set_system: utf8
character_sets_dir: /usr/share/mysql/charsets/
17 Tables: OK

PHP extensions: xslt, xml, tokenizer/0.1, standard/4.4.8, session, posix, pgsql, overload, mysql, mhash, mcrypt, mbstring, imap, iconv, gettext, gd, ftp, exif/1.4 $Id: exif.c,v 1.118.2.37.2.8 2007/12/31 07:22:46 sebastian Exp $, domxml/20020815, curl, ctype, calendar, bcmath, zlib/1.1, pcre, openssl, ionCube Loader, Zend Optimizer

/../index.php: r2774 (66519e6f500fa0e59fa27567e97d3675)
/css.php: r2772 (4807cbc15661213f2b4d0fd26c7179ff)
/include/txp_admin.php: r2729 (0c2b3cf59ff433c943bcc293a526651a)
/include/txp_article.php: r2680 (49a7155d831f843bcf3e8de306dfe7f1)
/include/txp_auth.php: r2728 (c472bfbe49a71fd35e89000c8a18de08)
/include/txp_category.php: r2243 (0ed99b6f44b5d221bdf35674240141ab)
/include/txp_css.php: r2730 (7974aa87728b39d3afaba5a3b18cf6b5)
/include/txp_diag.php: r2791 (aeb96445180b68c31821e237b6150332)
/include/txp_discuss.php: r2774 (852a8a4d4307358e161e0501124b7247)
/include/txp_file.php: r2530 (9f34fdbf98b9b649d65e2ced4c9ca763)
/include/txp_form.php: r1913 (780340d28f384113c72924843194b43e)
/include/txp_image.php: r2668 (11269b464db6cfa3affff47674533a50)
/include/txp_import.php: r1238 (86f0e64d2c9362066e6c48b9cd486e37)
/include/txp_link.php: r2463 (2379d25f83b37ec6c8d5f3edb1122ce8)
/include/txp_list.php: r2725 (1ed6c6f729eaeb7f8a582b27cd5b9e78)
/include/txp_log.php: r2796 (f249e0962a996f05041b899fea91ccae)
/include/txp_page.php: r2717 (807ff04b4a649b54b3d710c1ab0a428f)
/include/txp_plugin.php: r2774 (e9fdc47a3ed9bdd13197d929161c6a13)
/include/txp_prefs.php: r2528 (50bd3be8c22e17d5ca2855ccea081bac)
/include/txp_preview.php: r1238 (c45992b3273ac8019477e2f959d63120)
/include/txp_section.php: r2759 (9208297e0bd7b3d41bd0e6f9fc9ab120)
/include/txp_tag.php: r2774 (f371b400e8d7318e2ac48e032fe6c274)
/index.php: r2805 (ee8ab2e3c4bc9abd77aa7384ecba5268)
/lib/IXRClass.php: r765 (0120eb4713c9b6446a0eebe8b1039d1c)
/lib/admin_config.php: r1747 (b972529744cb37a7695fe00316dada41)
/lib/class.thumb.php: r2329 (c7f66a32531f32d6dfcbe5c7d26c7852)
/lib/classTextile.php: r2779 (b6d5b9cecbc5bc6475b5d1ee6a5231ea)
/lib/constants.php: r2361 (5338211ece1b2592804acdd204c9df33)
/lib/taglib.php: r2612 (727737ebd08127c632b9822bae87fee0)
/lib/txplib_admin.php: r2726 (c4f65bac2ddef62867f5bfee97ad7dfe)
/lib/txplib_db.php: r2748 (3feb369b1c34f251815cd6085a216d62)
/lib/txplib_forms.php: r2759 (a2d3de62110e582fab2a3a20224661f4)
/lib/txplib_head.php: r2783 (74ced647523a94da307af9853d7ed596)
/lib/txplib_html.php: r2696 (57985ebd2501bc303d2e97ae7538db1f)
/lib/txplib_misc.php: r2788 (7ecfaa5d4fabefbf411d01615dea9485)
/lib/txplib_update.php: r1239 (e3bd2d0c2b491d4028a656b8301a0086)
/lib/txplib_wrapper.php: r2800 (4ad38ee67f3ee8d9e7b51544a4f0f58b)
/publish.php: r2777 (0ce3da212329e7d34de07e53e109d182)
/publish/atom.php: r2774 (50aa384a2edf7cc07effee9020e0893b)
/publish/comment.php: r2776 (0e1ea64316087edcd75f394494b42100)
/publish/log.php: r1637 (f69237dc2ff39bd7a691c8ca1bc87808)
/publish/rss.php: r2793 (022caa22c756c64f2255aae6625686d8)
/publish/search.php: r1748 (ea84e04b2c688b0bb8b5a9ecf395749a)
/publish/taghandlers.php: r2774 (59dc36e6dabc619e23c43f722fe7b8f1)
/update/_to_1.0.0.php: r711 (0f49fca8fbd8e6fca0fc48b0f69f0461)
/update/_to_4.0.2.php: r711 (e77c0e0d972868f19eaee4565bd0b4c4)
/update/_to_4.0.3.php: r711 (f5506cfd0fbc3ad4bd9a9b2299468775)
/update/_to_4.0.4.php: r711 (4d867b42ee87a7f11d2bff3a8e91bed0)
/update/_to_4.0.5.php: r2464 (dbe80cd4a775d3a43a203c3c4a2d0e3f)
/update/_to_4.0.6.php: r2464 (7e5ae73eb64c24438918697089a1f321)
/update/_update.php: r2792 (6ff7b4dedb2c7735a01e76b13b3f1fb1)

Offline

#2 2008-06-19 23:42:27

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: 500 Internal Server Error

Does it work when you switch to messy URLs (and delete/rename .htaccess)? See also FAQ.

Offline

#3 2008-06-20 05:59:17

castanet
Member
From: Oxford
Registered: 2005-03-19
Posts: 97

Re: 500 Internal Server Error

Thanks Els but I’m still in a mess.
Overnight my hosting support told me: “The problem was in your .htaccess file. There were some wrong “rewrite rules” that led to this “500 internal server error”
They commented out the lines <IfModule mod_rewrite.c> , </IfModule> and RewriteEngine On.
It got me to the front page but clean urls now fail and my navigation is screwed.
If I uncomment RewriteEngine On I get the server error.
As I say, this only happened a few days ago. Clean urls have always worked on these servers.
Please tell me I don’t have to switch to messy urls and redo my site nav!
Here’s the low diagnostics:

Textpattern version: 4.0.6 (r2805)
Last Update: 2008-02-05 21:07:47/2008-02-05 21:07:47
Document root: /home//www/new.academiasoller.net/ (/home/www/new.academiasoller.net)
$path_to_site: /home/www/new.academiasoller.net
Textpattern path: /home/www/new.academiasoller.net/textpattern
Permanent link mode: section_title
Temporary directory path: /home/www/new.academiasoller.net/textpattern/tmp
Site URL: www.academiasoller.net
PHP version: 4.4.8
Register globals: 1
GD Image Library: bundled (2.0.28 compatible); supported formats: GIF, JPG, PNG.
Server Local Time: 2008-06-20 08:54:30
MySQL: 5.0.32-Debian_7etch3~bpo31+1-log
Locale: en_GB.UTF-8
Server: Apache/2.0.54 (Debian GNU/Linux) mod_auth_pgsql/2.0.2b1 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_ph3/0.0.1
PHP Server API: cgi
RFC 2616 headers:
Server OS: Linux 2.6.25.2-1-AM
Active plugins: glx_hl_current-0.3, zem_contact_lang-4.0.3.6, zem_contact_reborn-4.0.3.20, pap_contact_cleaner-0.1, smd_slimbox-0.3, smd_lib-0.32, upm_image-0.6.1, upm_img_popper-1.3.7

Pre-flight check:
————————————
Clean URL test failed.
————————————

.htaccess file contents:
————————————
#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes

<IfModule mod_rewrite.c>
# RewriteEngine On #RewriteBase /relative/web/path/

RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteCond %{HTTP:Authorization} !^$ RewriteRule .* – [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>

#php_value register_globals 0

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

Last edited by castanet (2008-06-20 06:03:22)

Offline

#4 2008-06-20 08:39:46

castanet
Member
From: Oxford
Registered: 2005-03-19
Posts: 97

Re: 500 Internal Server Error

Just got this from the hosting support:

After extensive investigation it appears that the problem is caused by the coding of your web site.
More specific it is the code of the index.php file.

The following coding is not correct and this is what it is causing the error500 message :

“ Make sure we display all errors that occur during initialization
error_reporting(E_ALL);
@ini_set(“display_errors”,“1”);

if (@ini_get(‘register_globals’))
foreach ( $_REQUEST as $name => $value )
unset($$name);
define(“txpinterface”, “public”);

…And after I questioned the response…..

The coding of the index.php file is the reason for this problem.
The code you are using there is setting rules that must be defined via php.ini and .htaccess file .
The best solution in this case will be to remove this code from the index page and to set the rules via the necessary files.

Is there any answer to this, other than change hosting?

Offline

#5 2008-06-20 10:34:42

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: 500 Internal Server Error

http://nl.php.net/manual/en/ini.php#ini.list => scroll down to “display_errors” setting that is permitted anywhere by PHP, not just in php.ini
http://nl.php.net/manual/en/function.error-reporting.php => there’s a function for this purpose. Would be strange if you can’t use it.

Try commenting out the ini_set line and see if that works.
Same with the error_reporting line.

The foreach loop is certainly valid and serves only to make sure register_globals has no effect if it is set (and it shouldn’t be set in the first place, really).

The define at the end has nothing to do with php.ini and should work just fine.

Offline

#6 2008-06-20 11:53:38

castanet
Member
From: Oxford
Registered: 2005-03-19
Posts: 97

Re: 500 Internal Server Error

Thanks Ruud, but commenting out those lines didn’t make any difference. I reinstalled the Textpattern files, in case something had corrupted, and now above diagnostics I have the message ‘Some Textpattern files have been modified:/update/_update.php’

I am a bit out of my depth but I can’t help thinking this is somehow due to redirecting mydomain.net to the sub domain folder new.mydomain.net where the site is installed.

In diagnostics it shows: Document root: /home//www/new.mydomain.net/ . In Preferences I have www.mydomain.net and in config.php I have mydomain.net.
Changing config.php back didn’t make any difference.
Any more ideas greatly received.

Offline

#7 2008-06-20 12:29:26

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: 500 Internal Server Error

modified = modified. Re-uploading that file should normally fix that error.

If commenting out those lines didn’t help, then the error isn’t caused by those lines, so the advice of your webhost was incorrect.

Offline

Board footer

Powered by FluxBB