Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2005-12-14 00:43:54
- xbhoff
- New Member
- Registered: 2005-12-14
- Posts: 4
textpattern setup fails on localhost with php 5.1.1 + mysql 5.0.16
I’m trying to install textpattern on localhost (mac os x 10.4.3) where I have MySql 5.0.16 and PHP 5.1.1 already built and functioning fine. When doing the inital textpattern setup (my database is ok, everything is in the right place) I get the following error message:
“Fatal error: Call to undefined function mysql_connect() in /Library/WebServer/Documents/xbhoff/blog/textpattern/setup/index.php on line 187”
I’m certain this is due to the manner in which I’ve configured PHP 5.1.1 with regard to MySQL. The relevant configure command line options I’ve used to build PHP are:
—with-mysqli=/usr/local/mysql/bin/mysql_config \
—with-pdo-mysql=/usr/local/mysql
The error message is just telling me that since I don’t have the old MySQL library (it’s no longer bundled with PHP 5.1) the mysql_connect() command fails, isn’t that right?
I can’t compile PHP 5.1.1 with the —with-mysql=[dir] option (./configure fails and aborts), and I really don’t need or want to do that with PHP 5.1.1 — I want to use mysqli and PDO.
How can I get TextPattern to install on localhost with this configuration of PHP and MySQL?
Offline
#2 2005-12-14 01:08:19
- KurtRaschke
- Plugin Author
- Registered: 2004-05-16
- Posts: 275
Re: textpattern setup fails on localhost with php 5.1.1 + mysql 5.0.16
I think you’ve answered your own question—TXP doesn’t use PDO, nor does it use mysqli. You’ll need to get PHP straightened out, unless you want to port TXP to PDO, in which case you’re on your own.
-Kurt
kurt@kurtraschke.com
Offline
#3 2005-12-14 01:08:42
- xbhoff
- New Member
- Registered: 2005-12-14
- Posts: 4
Re: textpattern setup fails on localhost with php 5.1.1 + mysql 5.0.16
ah yes, I just had a look at the src files in /crockery for 4.1, and see that this is being addressed for a future release. no doubt the keyword here is “future”.
in the meantime, am I doing anything illegal or wrong if I hack into the source for textpattern on my localhost install to get it to function with PDO and/or mysqli?
Offline
#4 2005-12-14 01:28:12
- KurtRaschke
- Plugin Author
- Registered: 2004-05-16
- Posts: 275
Re: textpattern setup fails on localhost with php 5.1.1 + mysql 5.0.16
“Illegal or wrong”? Goodness no. But, if you’re going to be reporting bugs, make sure first that they’re reproducible under a “stock” install.
-Kurt
kurt@kurtraschke.com
Offline
#5 2005-12-14 01:48:15
- xbhoff
- New Member
- Registered: 2005-12-14
- Posts: 4
Re: textpattern setup fails on localhost with php 5.1.1 + mysql 5.0.16
yeah, that was a bit of a silly question, poorly phrased, and already answered for me in the license.txt file which I thought to read only after asking the silly question.
I know the “safe” thing to do is to go back to PHP 5.0.5 on localhost, but there are reasons why that is an unattractive option for me. I think I could also (famous last words that will no doubt haunt me) manage to tweak a local copy of the txp source to get it working for me with mysqli_() functionality, and I was thinking out loud with that question. Don’t worry, I’m not planning on reporting bugs of any kind if I start doing something like that — as you said, I’m on my own.
And since there’s probably no sense in asking when 4.1 with PDO (and SQLite) support might eventually see the light of day, I won’t.
Thanks for the confirm and the feedback.
Offline
#6 2005-12-22 21:59:24
- pchristy
- New Member
- Registered: 2005-12-16
- Posts: 8
Re: textpattern setup fails on localhost with php 5.1.1 + mysql 5.0.16
Textpattern is amazing … but now that I’m installing it on my third webserver I’ve run into an install glitch. Any ideas? When I load (domain)/textpattern i just get a blank screen. Here’s my config.php file:
<?php
/** * mysql database */ $txpcfg[‘db’] = ‘itseccms’;
/** * database login name */ $txpcfg[‘user’] = ‘root’;
/** * database password */ $txpcfg[‘pass’] = ‘xxxxxxxx’;
/** * database host */
$txpcfg[‘host’] = ‘localhost’;
/** * table prefix (Use ONLY if you require multiple installs in one db) */
$txpcfg[‘table_prefix’] = ‘’;
/** * full server path to textpattern dir (no slash at end) */
$txpcfg[‘txpath’] = ‘c:\Inetpub\wwwroot\textpattern’;
/** * DB Connetion Charset, only for MySQL4.1 and up. Must be equal to the Table-Charset. */
$txpcfg[‘dbcharset’] = ‘latin1’;
?>
Offline
Re: textpattern setup fails on localhost with php 5.1.1 + mysql 5.0.16
You are not supposed to hand-fill the config file. Run setup and paste/upload the generated config-file (when setup asks you to).
Offline