Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-09-08 16:16:47

johnkeane
New Member
Registered: 2009-09-08
Posts: 4

Fails to connect to db when installing 4.2.0 (solved: htaccess issue)

This turned out to be an issue with the commands in my htaccess, NOT textpattern. See update near the bottom.

Hi,

Hope someone can help me. I’m installing a new txp site on my (hosted) server, using 4.2.0. I’m installing the new site to a server and mysql db that has previously had txp successfully installed (and indeed there are a couple of txp installs still successfully running). I’m using the same mysql db config (host, db, user) as on those other installations, but I’m not being successful this time – I’m wondering if something has changed between my previous installs (version 4.0.6) and version 4.2.0. Anyway, here’s what happens:

  • I load the textpattern files onto my server
  • I navigate to www.pjkeane.com/textpattern
  • It points me to www.pjkeane.com/textpattern/setup
  • I’m prompted for language
  • I’m asked to enter mysql connection details; I enter them
  • I’m prompted to create the config.php in www.pjkeane.com/textpattern
  • I create config.php in www.pjkeane.com/textpattern with the suggested content
  • I click “I did it”
  • I’m asked to create a login user
  • I do that
  • I click “Next”

I get this series of errors:

Warning: Wrong parameter count for mysql_connect() in /home/web/SERVERS/www.pjkeane.com/docs/textpattern/setup/txpsql.php on line 15
Warning: Access denied for user: 'httpd@localhost' (Using password: NO) in /home/web/SERVERS/www.pjkeane.com/docs/textpattern/setup/txpsql.php on line 16
Warning: MySQL Connection Failed: Access denied for user: 'httpd@localhost' (Using password: NO) in /home/web/SERVERS/www.pjkeane.com/docs/textpattern/setup/txpsql.php on line 16
Warning: MySQL: A link to the server could not be established in /home/web/SERVERS/www.pjkeane.com/docs/textpattern/setup/txpsql.php on line 16
Warning: Access denied for user: 'httpd@localhost' (Using password: NO) in /home/web/SERVERS/www.pjkeane.com/docs/textpattern/setup/txpsql.php on line 18
Warning: MySQL Connection Failed: Access denied for user: 'httpd@localhost' (Using password: NO) in /home/web/SERVERS/www.pjkeane.com/docs/textpattern/setup/txpsql.php on line 18
Warning: MySQL: A link to the server could not be established in /home/web/SERVERS/www.pjkeane.com/docs/textpattern/setup/txpsql.php on line 18
Warning: Access denied for user: 'httpd@localhost' (Using password: NO) in /home/web/SERVERS/www.pjkeane.com/docs/textpattern/setup/txpsql.php on line 22
Warning: MySQL Connection Failed: Access denied for user: 'httpd@localhost' (Using password: NO) in /home/web/SERVERS/www.pjkeane.com/docs/textpattern/setup/txpsql.php on line 22
Warning: MySQL: A link to the server could not be established in /home/web/SERVERS/www.pjkeane.com/docs/textpattern/setup/txpsql.php on line 22@
Fatal error: Call to undefined function: mysql_real_escape_string() in /home/web/SERVERS/www.pjkeane.com/docs/textpattern/lib/txplib_misc.php on line 11@

Which makes me think that it’s failing to find the correct db/user/pass parameters in config.php, assuming it’s trying to pass a default (httpd@localhost and no password) (though my mysql and php knowledge is effectively zero).

I don’t want to go to my host’s technical support yet (because I know that previous/existing txp installs are working), hence why I’m asking here.

Last edited by johnkeane (2009-09-09 13:12:13)

Offline

#2 2009-09-08 16:25:55

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

Re: Fails to connect to db when installing 4.2.0 (solved: htaccess issue)

Did you compare the config.php of an existing install with the one for the new install? Are there any noticeable differences? (like prefixes, host name)

Offline

#3 2009-09-08 16:27:38

johnkeane
New Member
Registered: 2009-09-08
Posts: 4

Re: Fails to connect to db when installing 4.2.0 (solved: htaccess issue)

config.php is identical to a previous (working) install with the exception of table_prefix and txpath (which are different as expected).

Offline

#4 2009-09-08 17:06:51

johnkeane
New Member
Registered: 2009-09-08
Posts: 4

Re: Fails to connect to db when installing 4.2.0 (solved: htaccess issue)

Actually, I’ve just noticed a couple of issues with some other (unrelated to txp) items on the server, and wonder if my htaccess or php install is the issue. I’ll investigate that with my host, but I’m still interested if anyone sees something obvious with what I’ve reported so far.

Offline

#5 2009-09-08 18:14:19

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

Re: Fails to connect to db when installing 4.2.0 (solved: htaccess issue)

I suspect there’s a PHP version installed that’s older than PHP 4.3.0.
Since PHP 4.3.0 there’s an extra parameter ‘client_flags’ for the mysql_connect() function and that parameter is used since… 4.0.8 or 4.2.0 to allow for the use of TXP on SSL websites.

Solution: upgrade your PHP version… or given the fact that it hasn’t been upgraded already: don’t walk, but run like hell and find a webhost that does keep servers up-to-date.

Offline

#6 2009-09-09 13:09:47

johnkeane
New Member
Registered: 2009-09-08
Posts: 4

Re: Fails to connect to db when installing 4.2.0 (solved: htaccess issue)

I’m running PHP 5.2.8.

Turns out it was the order of commands in my .htaccess. For my host, I needed the command Options +ExecCGI at the top of my .htaccess file, but I had it buried further down. Moving it to the top fixed my problems.

Offline

Board footer

Powered by FluxBB