View Full Version : php error when trying too login
alexnz
23rd June 2006, 04:50
Fatal error: Call to undefined function: mysql_connect() in /var/www/lib/classes/db_mysql.inc.php on line 75
i have double checked all my settings but i cant seem too get rid of this error, can anyone help?
geek.de.nz
23rd June 2006, 07:06
If the function is not defined, this means that Apache/PHP cannot find the function in the libraries.
Are you sure you installed the php mysql module and enabled it in php.ini? If you got a Debian based Linux try:
apt-cache search php mysql
You should find something like 'php4-mysql' or similar. Then you can install it with
apt-get install php4-mysql
Oh, and add this to your php.ini (at the end):
extension=mysql.so
That's what I usually forget ;-).
If you have php5 you install the corresponding module of course. ;-)
Always mention your distro when you submit questions!
alexnz
23rd June 2006, 08:17
hi thanks for the reply
im using debian sarge
i have followed falko's perfect setup guide for debian 3.1,
ive added extension=mysql.so too my php.ini file in apache2.conf and restarted apache2
still getting the same error =/
dns:/var/www# apt-get install mysql-server
Reading Package Lists... Done
Building Dependency Tree... Done
mysql-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
dns:/var/www# mysql -u mydns -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 14 to server version: 4.0.24_Debian-10sarge2-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
hmmmmmmmmm im thinking of formatting agian and starting from scratch, but i cant seem too find where i screwed up? ive basicly gone through the setups guides twice but yet she doesnt want too work =/
thanks for all the help, any more suggestions greatly appriacted :)
alexnz
23rd June 2006, 08:24
found this in apache2.logfile:
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/20020429/msql.so' - /usr/lib/php4/20020429/ms
[Fri Jun 23 17:18:12 2006] [notice] Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-16 mod_ssl/2.0.54 OpenSSL/0.9.7e mod
hmm the file is definatly there:
dns:/usr/lib/php4/20020429# ls
curl.so domxml.so gd.so imap.so ldap.so mcal.so mhash.so mysql.so odbc.so xslt.so
geek.de.nz
23rd June 2006, 08:38
I would try removing the mysql module first and reinstalling that instead of doing a total reformat.
falko
23rd June 2006, 18:47
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/20020429/msql.so' - /usr/lib/php4/20020429/msMake sure you didn't make a typo in php.ini. It must be
extension=mysql.so, not extension=msql.so...
alexnz
26th June 2006, 02:50
woops ok i fixed that up
now its coming up with the error:
DB::query(SELECT * FROM mb_sites WHERE name = '')
mysql_query
Table 'mydns.mb_sites' doesn't exist
Warning: Cannot modify header information - headers already sent in /var/www/web/login/index.php on line 56
i cant even see anywhere in the setup/installation guide where i even add mb_sites --- where have i gone wrong?
geek.de.nz
26th June 2006, 05:32
Warning: Cannot modify header information - headers already sent in /var/www/web/login/index.php on line 56
What is login/index.php? Did you write that yourself??
What is line 56?
MyDNS doesn't have that table (mb_sites), at least not in version 1.1.0, so it's no wonder it doesn't work.
donjoaoresort
21st April 2009, 08:35
I too have the same problem.
John
www.donjoaoresortgoa.com (www.donjoaoresortgoa.com)
falko
22nd April 2009, 15:18
Which MyDNSConfig version did you install? On which distribution?
albertjr
30th April 2009, 16:48
try to reformat it again..^_^
__________________________________________
Career Tips and Guide (http://www.ichatcareers.com/)
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.