Welcome, Guest
Please Login or Register.
Lost Password?
VM GPL missing mysql connection in php5... (1 viewing)
Post Reply

TOPIC: VM GPL missing mysql connection in php5...

#13775
jmedia (User)
Posts: 3
graphgraph
VM GPL missing mysql connection in php5... 2008/06/13 02:55  
i get the message "Call to undefined function mysql_connect()" when trying to call the db from php.

mysql is installed and database was imported from sql. user and pw is correct.

have edited /etc/php5/apache2/php.ini to have extension=mysql.so

any ideas?
  The administrator has disabled public write access.
#13776
jmedia (User)
Posts: 3
graphgraph
Re:VM GPL missing mysql connection in php5... 2008/06/13 03:01  
found solution:
apt-get install php5-mysql

beats me why VM GPL did not include this!
  The administrator has disabled public write access.
#14857
beat (User)
Posts: 2
graphgraph
Re:VM GPL missing mysql connection in php5... 2008/07/17 11:55  
That wasn't enough for my setup using Virtualmin Pro that we just purchased.

Problem is that debian installs the .so libs into a sub-folder:

/usr/lib/php5/20060613+lfs

so I spent some hours trying to find why it didn't load MySQL extension in php5 !

I added directive to /etc/php5/apache2/php.ini (using in apache 2 mode):

extension_dir = "/usr/lib/php5"

wrongly supposing that PHP would scan subdirectories as well...

In fact I had to add:

extension_dir = "/usr/lib/php5/20060613+lfs"

As most PHP programs use MySQL, including those in the installer scripts I'm voting to apt-get install the php5-mysql lib during virtualmin pro installation, but more importantly to correctly configure the extension_dir to the right path.

Hope the above will be useful to others and that it was the correct way to do. At least it works.

Feel free to tell a better way :)
Beat 8)
  The administrator has disabled public write access.
Post Reply
get the latest posts directly to your desktop

Talk and Get Help

Support
Forums
Bugs and Issues

Get Virtualmin

OS Support
Buy Online
Download
Copyright 2005-2007 Virtualmin, Inc. All rights reserved.