Call to undefined function: mysql_connect()

Pagina: 1
Acties:

  • Servowire
  • Registratie: September 2000
  • Laatst online: 19-09 06:42

Servowire

prutser:~#

Topicstarter
Mmm
Mijn eerste pogingen tot MySQL samen met PHP4 zijn geen success..

Ik heb MySQLd wel draaien, kan handmatig wel connecten maar ik krijg deze error als ik probeer te connecten via PHP4.

In PHP.ini heb ik mysql aanstaan.

Wat doe ik fout?

met papier mache kun je alles maken!!


  • Janoz
  • Registratie: Oktober 2000
  • Laatst online: 21-09 13:51

Janoz

Moderator Devschuur®

!litemod

Weet je zeker dat je mysqlondersteuning wel hebt meegecompileerd?

Ken Thompson's famous line from V6 UNIX is equaly applicable to this post:
'You are not expected to understand this'


  • Servowire
  • Registratie: September 2000
  • Laatst online: 19-09 06:42

Servowire

prutser:~#

Topicstarter
Yepz
../configure' '--prefix=/usr' '--with-apxs=/usr/bin/apxs' '--with-regex=system' '--with-config-file-path=/etc/php4/apache' '--disable-rpath' '--disable-debug' '--enable-memory-limit' '--enable-calendar' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-trans-sid' '--enable-bcmath' '--with-bz2' '--enable-ctype' '--with-db2' '--with-ndbm' '--enable-exif' '--enable-filepro' '--enable-ftp' '--with-gettext' '--enable-mbstring' '--enable-mbstr-enc-trans' '--with-pcre-regex=/usr' '--enable-shmop' '--enable-sockets' '--enable-wddx' '--with-xml=/usr' '--with-expat-dir=/usr' '--enable-yp' '--with-zlib' '--without-pgsql' '--disable-static' '--with-layout=GNU' '--with-curl=shared,/usr' '--with-dom=shared,/usr' '--with-zlib-dir=/usr' '--with-gd=shared,/usr' '--with-jpeg-dir=shared,/usr' '--with-xpm-dir=shared,/usr/X11R6' '--with-png-dir=shared,/usr' '--with-freetype-dir=shared,/usr' '--with-imap=shared,/usr' '--with-ldap=shared,/usr' '--with-mcal=shared,/usr' '--with-mhash=shared,/usr' '--with-mm' '--with-mysql=shared,/usr' '--with-sablot=shared,/usr' '--with-snmp=shared' '--with-sybase-ct=shared,/usr' '--with-ttf=shared,/usr' '--with-t1lib=shared,/usr'
---------------------------------
Klopt toch?

met papier mache kun je alles maken!!


  • violator_
  • Registratie: Juni 2000
  • Laatst online: 19-01 01:18
Op de 1 of andere manier draait je php toch echt zonder MySQL support als je die foutmelding krijgt.

Zwei Dinge sind unendlich, das Universum und die menschliche Dummheit, aber beim Universum bin ich mir nicht ganz sicher. -Albert Einstein


  • Janoz
  • Registratie: Oktober 2000
  • Laatst online: 21-09 13:51

Janoz

Moderator Devschuur®

!litemod

hmm .. ik zie nergens '--with mysql' oid staan hoor....

Ken Thompson's famous line from V6 UNIX is equaly applicable to this post:
'You are not expected to understand this'


  • Markuzi
  • Registratie: November 2000
  • Laatst online: 25-02-2025
Op maandag 24 september 2001 20:36 schreef Servowire het volgende:
Yepz
'../configure' '--prefix=/usr' '--with-apxs=/usr/bin/apxs' '--with-regex=system' '--with-config-file-path=/etc/php4/apache' '--disable-rpath' '--disable-debug' '--enable-memory-limit' '--enable-calendar' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-trans-sid' '--enable-bcmath' '--with-bz2' '--enable-ctype' '--with-db2' '--with-ndbm' '--enable-exif' '--enable-filepro' '--enable-ftp' '--with-gettext' '--enable-mbstring' '--enable-mbstr-enc-trans' '--with-pcre-regex=/usr' '--enable-shmop' '--enable-sockets' '--enable-wddx' '--with-xml=/usr' '--with-expat-dir=/usr' '--enable-yp' '--with-zlib' '--without-pgsql' '--disable-static' '--with-layout=GNU' '--with-curl=shared,/usr' '--with-dom=shared,/usr' '--with-zlib-dir=/usr' '--with-gd=shared,/usr' '--with-jpeg-dir=shared,/usr' '--with-xpm-dir=shared,/usr/X11R6' '--with-png-dir=shared,/usr' '--with-freetype-dir=shared,/usr' '--with-imap=shared,/usr' '--with-ldap=shared,/usr' '--with-mcal=shared,/usr' '--with-mhash=shared,/usr' '--with-mm' '--with-mysql=shared,/usr' '--with-sablot=shared,/usr' '--with-snmp=shared' '--with-sybase-ct=shared,/usr' '--with-ttf=shared,/usr' '--with-t1lib=shared,/usr'
Ik wel :)

  • Servowire
  • Registratie: September 2000
  • Laatst online: 19-09 06:42

Servowire

prutser:~#

Topicstarter
Nu opeens werkt het wel :?
Nouja, mooi :)
Maaar nu
code:
1
: Access denied for user: 'mysql@localhost' (Using password: YES) in /var/www/sql.php on line 3

Ik geef toch echt het juiste password mee!
PHP:
1
2
3
4
5
<?
$conn = mysql_connect("localhost", "mysql", "secret")
  or die("It doesn't connect!");
mysql_select_db("flip", $conn) or die(mysql_errno() . ": " . mysql_error() . "<br>");
?>

met papier mache kun je alles maken!!


  • Markuzi
  • Registratie: November 2000
  • Laatst online: 25-02-2025
Probeer eens, user: "root" en dan geen password invullen. Da werkt meestal wel...

  • Servowire
  • Registratie: September 2000
  • Laatst online: 19-09 06:42

Servowire

prutser:~#

Topicstarter
Op maandag 24 september 2001 21:08 schreef Markuzi het volgende:
Probeer eens, user: "root" en dan geen password invullen. Da werkt meestal wel...
is dit niet een beetje onveilig?

met papier mache kun je alles maken!!


  • Markuzi
  • Registratie: November 2000
  • Laatst online: 25-02-2025
Op maandag 24 september 2001 21:12 schreef Servowire het volgende:

[..]

is dit niet een beetje onveilig?
Je zit toch gewoon op je localhost, dan is het geen probleem hoor.
Pagina: 1