Page 1 of 2

Linking php and mysql

Posted: Sun Mar 26, 2006 4:59 pm
by Cheeseboy
Hi, I have phpbb installed and ready to go but i dont know how to get php and mysql linked? I have the extensions i was missing. :D

Posted: Sun Mar 26, 2006 5:03 pm
by feyd
I thought you were using Linux. :?

Posted: Sun Mar 26, 2006 5:09 pm
by Cheeseboy
i am i read that i just need to go now a php version and everything will be fine. Ill try it now.

Posted: Sun Mar 26, 2006 5:20 pm
by Cheeseboy
yep now i have the php_mysql.dll

Posted: Sun Mar 26, 2006 6:43 pm
by a94060
if phpbb is installed,should the php and mysql be linked already? :?

Posted: Sun Mar 26, 2006 7:01 pm
by jrd
a94060 wrote:if phpbb is installed,should the php and mysql be linked already? :?
it should be unless the server isn't running...

Posted: Sun Mar 26, 2006 7:18 pm
by a94060
thats what i thought,why does it even matter if the two are linked?

Posted: Sun Mar 26, 2006 7:44 pm
by Cheeseboy
how would i start the server? I deleted everything that had to do with mysql and reinstalled it.

Posted: Sun Mar 26, 2006 7:51 pm
by Cheeseboy
The only reason i asked how to link them is best i get this error on phpbb:
The PHP configuration on your server doesn't support the database type that you chose
and people tell me that there not linked properly. How can i fix this error its driving me crazy! 8O is there some kind of file like php.ini and httpd for mysql?

Posted: Sun Mar 26, 2006 7:55 pm
by s.dot
if you have two instances of mysql installed, then i doubt either of them are running

try a simple query,
like

Code: Select all

mysql_connect('localhost','user','pass') or die(mysql_error())

Posted: Sun Mar 26, 2006 7:59 pm
by Cheeseboy
I still dont know how to start the server. I want to know if i have it installed right. Because when i did that php code i got:
Fatal error: Call to undefined function: mysql_connect() in /var/www/Esgames4uweb/phpinfo.php on line 2
but i think and I know its becasue its not running.

Posted: Sun Mar 26, 2006 8:02 pm
by s.dot
you don't have the mysql extensions installed/enabled.

Posted: Sun Mar 26, 2006 8:06 pm
by josh
what distro is this? there may be ways to set this up without compiling php but it differs by distro

Posted: Sun Mar 26, 2006 8:08 pm
by Cheeseboy
slackware :D and i have the php_mysql.dll if thats the extension yuor talkign about

Posted: Sun Mar 26, 2006 8:10 pm
by josh
DLL implies windows, linux uses an so file. The file is called mysql.so and goes into the php extensions directory. I know in fedora I do yum install php-mysql, hopefully someone knows the slackware equiv. to that.



Edit, oh yeah you could also do it manually, just gotta obtain the file and load it in php.ini then do service httpd restart