Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Clean install of 4.0.5 to TXD accelerator - 503 and config errors
Hi there.
I’ve been installing TXP for as long as I can recall, and I’ve rarely had a problem. Today I ran a fresh install of 4.0.5 on my TextDrive Accelerator and it’s going nowhere fast. I created a clean, empty db with an appropriate db user, uploaded the files and ran the setup via the webgui. I entered the correct details for the db and it showed my config.php, which I c&p’d to the file on the server in the /textpattern folder, as I always do. The setup completed OK, but now I’m in a loop as it won’t recognise my config.php, despite it being there and valid.
I’m getting a 503 error when I access /index.php in the root. It shows the “config.php is missing or corrupt. To install Textpattern, visit textpattern/setup/” message, yet the config.php is there and 777’d (until I get it working). When I access the config.php directly, I get a 200 status in the logs, so it’s all cool as school.
The sanitised config.php:
<?php
$txpcfg[‘db’] = ‘dbname’;
$txpcfg[‘user’] = ‘user’;
$txpcfg[‘pass’] = ‘password’;
$txpcfg[‘host’] = ‘localhost’;
$txpcfg[‘table_prefix’] = ‘’;
$txpcfg[‘txpath’] = ‘/home/pragboxen.info/web/public/textpattern’;
$txpcfg[‘dbcharset’] = ‘utf8’;
?>
In addition, the error log is giving me this:
PHP Warning: include() [<a href=‘function.include’>function.include</a>]: Failed opening ‘./textpattern/config.php’ for inclusion (include_path=’.:/opt/csw/php5/lib/php’) in /home/pragboxen.info/web/public/index.php on line 21phpinfo output: http://www.pragboxen.info/textpattern/phpinfo.php
Tried the same thing on a clean 4.0.4 install, same thing – no difference. As an aside, I’m running other php/sql apps on the same server without any known issues, so I’m a bit stuck :( It’s a php issue, obviously – but what’s broken?
Any advice gratefully received. Thanks in advance.
Pete
(edited to fix link and add error log message)
Last edited by gaekwad (2007-08-26 14:49:52)
Offline
Re: Clean install of 4.0.5 to TXD accelerator - 503 and config errors
Hmm… so it can’t include ./textpattern/config.php, but has no problem including ‘./textpattern/lib/constants.php’?
In that case, make sure the permissions and ownership of config.php and lib/constants.php are identical. Same for the directories ./textpattern and ./textpattern/lib
Offline
Re: Clean install of 4.0.5 to TXD accelerator - 503 and config errors
Hey ruud -thanks for your reply, good to know I’m not doing something dumb :)
Directory listings and permissions:
/textpattern drwxr-xr-x pete adm
/textpattern/lib drwxr-xr-x pete adm
^^ identical
/textpattern/config.php -rwxrwxrwx pete adm
/textpattern/lib/constants.php -rw-r—r— pete adm
So config.php is 777. I tried changing it to match constants.php (644) and the problem still persists – /index.php complains of missing or corrupt config.php, yet starting the setup routine again via the interface fails because config.php already exists :)
Yours confused;
Pete
(Edit: PS – the file definitely exists in the right place, obviously viewing it in a browser will do nothing but if you click this, it shows the file does exist: http://www.pragboxen.info/textpattern/config.phpzz
Last edited by gaekwad (2007-08-26 17:16:30)
Offline
Re: Clean install of 4.0.5 to TXD accelerator - 503 and config errors
In your website root dir, create a test.php file containing:
<?php
include './textpattern/lib/constants.php';
include './textpattern/config.php';
echo var_dump($txpcfg);
?>
Open that with your browser, what does it show? If you get warnings, try the same but now remove the ./ part from both paths.
Offline
Re: Clean install of 4.0.5 to TXD accelerator - 503 and config errors
Hi ruud -thanks again for your reply.
I’ve created the above file per your example, the output is simply:
NULLView source shows the same, the following was dumped to the error log (sanitised to remove IP etc):
PHP Warning: include(./textpattern/lib/constants.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory in /home/pragboxen.info/web/public/txp.php on line 2
PHP Warning: include() [<a href=‘function.include’>function.include</a>]: Failed opening ‘./textpattern/lib/constants.php’ for inclusion (include_path=’.:/opt/csw/php5/lib/php’) in /home/pragboxen.info/web/public/txp.php on line 2
PHP Warning: include(./textpattern/config.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory in /home/pragboxen.info/web/public/txp.php on line 3
PHP Warning: include() [<a href=‘function.include’>function.include</a>]: Failed opening ‘./textpattern/config.php’ for inclusion (include_path=’.:/opt/csw/php5/lib/php’) in /home/pragboxen.info/web/public/txp.php on line 3
PHP Notice: Undefined variable: txpcfg in /home/pragboxen.info/web/public/txp.php on line 4
Removing the ./ gives the following output (sanitised for user/pass):
array(7) { [“db”]=> string(18) “pragboxen_info_txp” [“user”]=> string(16) “user” [“pass”]=> string(15) “password” [“host”]=> string(9) “localhost” [“table_prefix”]=> string(0) “” [“txpath”]=> string(43) “/home/pragboxen.info/web/public/textpattern” [“dbcharset”]=> string(4) “utf8” }
Editing line 21 of /index.php to remove the ./ of the include statement for config.php does now show the basic index page, minus the stylesheet – navigating to /textpattern still starts the install routine.
Hope this is of some use – I appreciate your time on this.
Pete
Offline
Re: Clean install of 4.0.5 to TXD accelerator - 503 and config errors
See these two PHP bug reports: first, second
According to those, this can be caused by having too few permissions one or more of the parent directories. Check the permissions of the following directories (give them both read and execute permissions for the user that will be executing the PHP script):
/home
/home/pragboxen.info
/home/pragboxen.info/web
/home/pragboxen.info/web/public
Offline
Re: Clean install of 4.0.5 to TXD accelerator - 503 and config errors
Perfect – the one that solved it was setting public to read, as it was just execute.
Thank you, ruud – you have my greatest thanks.
Offline