Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-05-19 01:13:07
- sonoramark
- New Member
- Registered: 2006-05-19
- Posts: 9
Mysql_connect error
I’m setting up Textpattern for the first time (just on my laptop to tinker with before trying it out on my website).
I get as far as “textpattern/setup/index.php” where I’m filling in the form that provides info about my mysql database, user name, password, server path, etc. From here, when I click on “next” in the form, I get the following error:
Fatal error: Call to undefined function mysql_connect() in “/var/www/textpattern/textpattern/setup/index.php on line 188”
This appears to be similar to the following error, which is marked as resolved:
http://forum.textpattern.com/viewtopic.php?id=14604
If I understand the stated resolution there, the presumed problem is a lack of support for MySQL in the PHP installation. That can’t be the problem in my case, however. I’m using phpmyadmin to administer MySQL, which wouldn’t be possible if PHP didn’t have MySQL support built in.
My system is Ubuntu 5.10, by the way. PHP5 and MySQL 4.0.24 were both installed via Ubuntu deb packages, and I’ve been following the Textpattern installation instructions at http://textpattern.com/download.
Any advice would be greatly appreciated. I think that Textpattern might really be the CMS solution I’m looking for, but I need to give it a thorough try first.
-Mark Stone
Offline
#2 2006-05-19 02:19:47
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Mysql_connect error
All we can tell you is what PHP (not Textpattern) is telling you: as far as it is concerned, MySQL support is not available, there is no function matching mysql_connect()
. This could be for any number of reasons (such as a bug with your version of PHP’s MySQL extension).
Take the following code, paste it into a new text file and save it as phpinfo.php:
<?php phpinfo(); ?>
Place it in your root folder and open it up in your browser. Look for the section “MySQL”. Does it appear?
Offline
Re: Mysql_connect error
Fatal error: Call to undefined function mysql_connect() in
This means that you do not have mysql-support for PHP installed. Or maybe you have the wrong php-mysql package installled (for the wrong PHP version). You should ask in Ubuntu-Forums how to set up php with mysql correctly.
If you are able to use phpmyadmin, this could mean that ou may have different versions of PHP installed. Or possibly that phpmyadmin is using the newer mysqli-interface (rather than the more widely available mysql-interface). Or several other things. THe error message is pretty clear: If the function is undefined (that’s an error by the PHP-Interpreter), then it’s a problem with your PHP-installation.
Offline
#4 2006-05-19 16:56:58
- sonoramark
- New Member
- Registered: 2006-05-19
- Posts: 9
Re: Mysql_connect error
OK, problem solved. And thanks for your help and patience on this. For anyone encountering this in the future, here’s the fix:
Ubuntu 5.10 apparently has a glitch in how it installs the php-mysql package. See, for example, this thread: http://www.ubuntuforums.org/showthread.php?t=57880
In my case, I ran “sudo dpkg-reconfigure php5-mysql” and that fixed everything.
I now have a working instance of Textpattern on my laptop, and I’m looking forward to taking it out for a test drive.
-Mark Stone
Offline
Re: Mysql_connect error
Thanks for getting back with the solution, Mark. Have fun with your testdrive.
Offline
Pages: 1