Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP - Problem mit mysql_connect

Empfohlene Antworten

Hi,

also folgendes Problem, ich will mit einem PHP Skript einfach nur ne Datenbankabfrage machen. Leider bringt er mir beim Ausführen des Skriptes folgenden Fehler:

Fatal error: Call to undefined function: mysql_connect() in...

Das komische an der Sache ist aber, dass phpmyadmin unter dem selben User und im selben Ordner installiert is und der läuft einwandfrei. Korrigiert mich, wenn ich mich täusche, aber des phpmyadmin muss doch eigentlich auch mysql_connects machen oder ;) ?

Also warum geht das bei dem myadmin, aber bei meinem Skript nicht... hat einer eine Idee?

PS: mysql_pconnect funzt auch nicht, selber Fehler und an der PHP.ini kanns meiner Meinung nach auch nicht liegen, weil ich die mal durch eine ersetzt habe, die auf einer anderen Maschine läuft und dort auch mysql_connect versteht.

hier noch der Code des Skripts:

<?php

$link = mysql_connect("localhost", "meinuser", "meinpw");

if (!$link) {

die('Could not connect: ' . mysql_error());

}

echo 'Connected successfully';

mysql_close($link);

?>

Benutzt du PHP5? Soweit ich weiss ist dort die MySQL Unterstützung standardmäßig abgeschaltet, vieleicht ist das das Problem?

Problem gelöst.

Ich musst einfach nur in der php.ini

extension=mysql.so

eintragen, dann gings... phpmyadmin lädt das ding andscheinend dynamisch :confused:

naja nevermind :OD

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.