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 + Oracle

Empfohlene Antworten

Veröffentlicht

Hallo!

Ich bin gerade am Ausprobieren, mir Daten mit PHP aus Oracle anzeigen zu lassen. Leider funktioniert das nicht so wie ich will, da ich keine Verbindung zu den Server bekomme.

$conn = Ora_Logon("meinuser@datenbank","meinpass");

Die oracle_dll ist in der php.ini aktiviert. Muss ich irgendwo noch was installierten / aktivieren??

Bin noch PHP - Anfänger und über jede Hilfe dankbar.

Gruss

du musst in der php.ini die oci8.dll aktivieren... wenn nach einem apache neustart dann keine fehlermeldung kommt, hast du alles richtig gemacht. :)

mein connect zu einer oracle db:


<?php
// #######################################
// !!! Database Connection Information !!!
// #######################################
$cms_user = "cmsdata";
$cms_pass = "*******";
$cms_dbname = "db****01";
// #######################################

if( empty( $conn ) )
$conn = ocinlogon($cms_user,$cms_pass,$cms_dbname);
?>
[/php]

das sollte gehen...

ein select statement absetzen:

[php]
<?php
$sql = "select ACD, TEXT, REGION from acds where acd = $acd";
{ $stmt = ociparse( $conn,$sql );
ociexecute( $stmt,OCI_DEFAULT );
while( ocifetch( $stmt ) ) {
$acdtext = ociresult( $stmt, "TEXT" );
$idregion = ociresult( $stmt, "REGION" );
}
}
?>

achte auf die grossschreibung beim ociresult... sonst geht das nicht... ;)

weitere infos: www.php.net/oci8

have fun. :P

Hi!

Also der Apache lässt sich ohne weiteres starten. Jetzt bekomme ich aber eine andere Meldung:

"Der Prozedureinstiegspunkt 'OCILobClose' konnte in der DDL "OCI.dll" nicht gefunden werden."

und dann:

"Undable to load DDL 'php_oci8.dll' Die angegebene Prozedur wurde nicht gefunden"

Fehlt mir da eine DLL im System?? Wenn ja, wo bekomme ich die dann her? Die php_oci8.dll ist vorhanden und liegt auch richtig unter C:\PHP.

:D

ist genau die meldung, die ich erwartet hatte... :P

hier mal ein auszug aus meiner php.ini:


; Directory in which the loadable extensions (modules) reside.

extension_dir = C:\PHP\extensions


extension=php_oci8.dll

so sollte das in jedem fall funktionieren... :)

btw. welchen apache und welche php version nutzt du? das mit den oracle funktionen funktioniert afaik nur mit der sapi module version, also nix cgi. :)

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.