Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-01-26 17:59:11

phob
New Member
Registered: 2013-01-26
Posts: 9

config.php is missing or corrupt.

Hello,

Textpattern newbie here. I’ve done a fresh install on my site, but am getting “config.php is missing or corrupt. To install Textpattern, visit setup.” when I try and view index.php in the route directory.

I have saved a config.php with the contents generated during installation in my /textpattern directory. My php database seems to have been populated correctly, and the backend seems to work fine (i can publish posts etc).

Any thoughts? Have I missed something obvious? Will post my config file, and diagnostic info below.

thanks,
Paul

Offline

#2 2013-01-26 18:02:56

phob
New Member
Registered: 2013-01-26
Posts: 9

Re: config.php is missing or corrupt.

config.php:

<?php
$txpcfg['db'] = 'katcandoorguk_348040_db2';
$txpcfg['user'] = 'ukat_348040_0002';
$txpcfg['pass'] = 'notmypassword';
$txpcfg['host'] = 'cust-mysql-123-07';
$txpcfg['table_prefix'] = '';
$txpcfg['txpath'] = '/websites/123reg/LinuxPackage21/ka/tc/an/katcando.org.uk/public_html/textpattern';
$txpcfg['dbcharset'] = 'utf8';
?>

Diagnostic info:

Textpattern version: 4.5.4 (r4919)
Last update: 2013-01-26 17:30:04/2013-01-26 17:25:26
Document root: /websites/123reg/LinuxPackage21/ka/tc/an/katcando.org.uk/public_html
$path_to_site: /websites/123reg/LinuxPackage21/ka/tc/an/katcando.org.uk/public_html
Textpattern path: /websites/123reg/LinuxPackage21/ka/tc/an/katcando.org.uk/public_html/textpattern
Permanent link mode: section_id_title
Temporary directory path: /websites/123reg/LinuxPackage21/ka/tc/an/katcando.org.uk/public_html/textpattern/tmp
Site URL: www.katcando.org.uk
PHP version: 5.2.17
GD Graphics Library: bundled (2.0.34 compatible); supported formats: GIF, JPG, PNG.
Server TZ: UTC
Server local time: 2013-01-26 18:02:28
DST enabled?: 0
Automatically adjust DST setting?: 0
Time zone:  (+0)
MySQL: 5.0.92-50-log
Locale: C
Server: Apache
PHP server API: cgi-fcgi
RFC 2616 headers: 0
Server OS: Linux 2.6.32-279.14.1.el6.x86_64
Admin-side theme: classic 4.5.4

Pre-flight check: 
------------------------
/websites/123reg/LinuxPackage21/ka/tc/an/katcando.org.uk/public_html/textpattern/setup/ still exists
Some Textpattern files are out of date: 
	/websites/123reg/LinuxPackage21/ka/tc/an/katcando.org.uk/public_html/css.php
Clean URL test failed.
------------------------

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

#Options +FollowSymLinks
#Options -Indexes
#ErrorDocument 403 default

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

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

	RewriteCond %{REQUEST_URI} !=/favicon.ico
	RewriteRule ^(.*) index.php

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

#php_value register_globals 0

# SVG
AddType image/svg+xml  svg svgz
AddEncoding gzip       svgz

------------------------

{Edited to add bc.. for better code display. – Uli}

Last edited by uli (2013-01-26 18:12:24)

Offline

#3 2013-01-26 18:17:08

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: config.php is missing or corrupt.

config.php must be situated inside the textpattern folder that came with your installation, not any surrounding folder named by you. It must live side by side with the following folders:
include
lang
lib
publish


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#4 2013-01-26 18:32:09

phob
New Member
Registered: 2013-01-26
Posts: 9

Re: config.php is missing or corrupt.

Uli, thanks for the formatting, I tried and failed to do this!

As far as I can tell, I’ve done everything by the book (it’s in the textpattern folder). See screenshot:
http://www.picamatic.com/view/8982955_kkd/

Offline

#5 2013-01-26 19:01:23

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: config.php is missing or corrupt.

Is the content of the config file correct?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#6 2013-01-26 19:06:44

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: config.php is missing or corrupt.

phob wrote:

See screenshot:

That’s where it belongs.

Another attempt: was the config file created with an inappropriate application? (Sorry, no idea which Win apps are suited for that job.)

I’ll transfer the topic to the Troubleshooting subforum hoping it might be found by the right folks.
In the meantime: have you tried searching the forum for your error using the Google search input? It seems better suited than the forum’s own Advanced Search.

Edit: Yiannis was faster.

Last edited by uli (2013-01-26 19:07:36)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#7 2013-01-26 19:08:20

phob
New Member
Registered: 2013-01-26
Posts: 9

Re: config.php is missing or corrupt.

Thanks for the reply. It is the code generated by the installation programme. Have reinstalled several times, and this keeps happening.

I created the file in notepad (plain text editor, ANSI), and ftp’d it across.

However, the fact that the back-end works would suggest it is correct (does the back-end functionality also use the config file?)

Last edited by phob (2013-01-26 19:08:57)

Offline

#8 2013-01-26 19:09:50

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: config.php is missing or corrupt.

phob wrote:

does the back-end functionality also use the config file?

Yup. Prefs, e.g. are read from the DB.

Last edited by uli (2013-01-26 19:10:16)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#9 2013-01-26 19:47:03

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: config.php is missing or corrupt.

In your diagnostics I see that you have one file, CSS.php, which is out of date. What happens if you replace that one?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#10 2013-01-26 20:07:31

phob
New Member
Registered: 2013-01-26
Posts: 9

Re: config.php is missing or corrupt.

Not really sure why I got that error, maybe the css file got corrupted somehow. Anyway, have replaced it and the warning in the diagnostic page has gone. Still got the config.php error though.

Offline

#11 2013-01-26 23:35:08

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

Re: config.php is missing or corrupt.

Do the Apache (webserver) logs show an error about not being able to include the config.php file, when accessing the root of your domain in your browser?

Offline

#12 2013-01-27 06:47:39

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: config.php is missing or corrupt.

the permissions seem to be wrong there too. shouldn’t php files be -rw-r--r-- and folders drwxr-xr-x?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB