Page 1 of 1

Failed opening required 'PEAR.php'

Posted: Sat 4. Jun 2022, 22:18
by Viktor
Server-Betriebssystem + Version
Debian 11


Eingesetzte Server-Virtualisierung-Technologie
keine


KeyHelp-Version + Build-Nummer
(z.B. 22.0 - Build 2366)


Problembeschreibung / Fehlermeldungen

Failed opening required 'PEAR.php' (include_path='.:/opt/keyhelp/php/7.1/lib/php'

Erwartetes Ergebnis

Das die Datei gefunden würde.

Wo ist das Problem?

Gruß
Viktor

Re: Failed opening required 'PEAR.php'

Posted: Sat 4. Jun 2022, 23:12
by Jolinar
Ist die Datei denn in dem Verzeichnis auch vorhanden?
Was sagt ein

Code: Select all

ls -al /opt/keyhelp/php/7.1/lib/php/

BTW:
Woher genau stammt die Fehlermeldung (Logile, Konsolenausgabe)?
In welcher Situation wird der Fehler ausgeworfen (Script, Programm, Cron, whatever)?

Re: Failed opening required 'PEAR.php'

Posted: Sat 4. Jun 2022, 23:32
by Viktor
Hallo,

ja die Datei ist vorhanden.

Code: Select all

total 152
drwxr-xr-x 15 root root  4096 May 14 22:29 .
drwxr-xr-x  3 root root  4096 May 14 22:29 ..
drwxr-xr-x  2 root root  4096 May 14 22:29 Archive
drwxr-xr-x  2 root root  4096 May 14 22:29 build
drwxr-xr-x  3 root root  4096 May 14 22:29 .channels
drwxr-xr-x  2 root root  4096 May 14 22:29 Console
drwxr-xr-x  3 root root  4096 May 14 22:29 data
-rw-r--r--  1 root root  2470 May 14 22:29 .depdb
-rw-r--r--  1 root root     0 May 14 22:29 .depdblock
drwxr-xr-x  6 root root  4096 May 14 22:29 doc
drwxr-xr-x  3 root root  4096 May 14 22:29 extensions
-rw-r--r--  1 root root  6961 May 14 22:29 .filemap
-rw-r--r--  1 root root     0 May 14 22:29 .lock
drwxr-xr-x  2 root root  4096 May 14 22:29 OS
drwxr-xr-x 11 root root  4096 May 14 22:29 PEAR
-rw-r--r--  1 root root 15048 May 14 22:29 pearcmd.php
-rw-r--r--  1 root root 35467 May 14 22:29 PEAR.php
-rw-r--r--  1 root root  1045 May 14 22:29 peclcmd.php
drwxr-xr-x  5 root root  4096 May 14 22:29 .registry
drwxr-xr-x  3 root root  4096 May 14 22:29 Structures
-rw-r--r--  1 root root 20562 May 14 22:29 System.php
drwxr-xr-x  5 root root  4096 May 14 22:29 test
drwxr-xr-x  2 root root  4096 May 14 22:29 XML
Das ist ein phpBB Forum was jetzt Probleme macht.

In einer PHP-Datei steht das drin:

Code: Select all

if (!class_exists('PEAR')) {
    require_once 'PEAR.php';
}
Warum er immer die Datei haben will weiß ich nicht.

Ich haben schon "open_basedir" /usr/share/php hinzugefügt.

Gruß
Viktor

Re: Failed opening required 'PEAR.php'

Posted: Sat 4. Jun 2022, 23:37
by Jolinar
Unabhängig vom eigentlichen Problem eine kurze Zwischenfrage...Warum wird PHP in Version 7.1 eingesetzt? phpBB läuft durchaus mit neueren PHP-Versionen...

Re: Failed opening required 'PEAR.php'

Posted: Sat 4. Jun 2022, 23:41
by Viktor
Jolinar wrote: Sat 4. Jun 2022, 23:37 Unabhängig vom eigentlichen Problem eine kurze Zwischenfrage...Warum wird PHP in Version 7.1 eingesetzt? phpBB läuft durchaus mit neueren PHP-Versionen...
Hallo,

jo das habe ich mich auch gefragt.

Angeblich ein altes phpBB und er hat viele Arcade Spiele drin und dann soll es nur so gehen.

Gruß
Viktor ;)

Re: Failed opening required 'PEAR.php'

Posted: Sat 4. Jun 2022, 23:49
by Jolinar
Okay, das wäre ein Argument.

Allerdings wirst du dich für eine mögliche Lösung deines PHP Problems noch etwas gedulden müssen, bis einer der Programmierprofis den Thread gesehen hat...Programmierung ist (bis auf die Shell) nicht unbedingt meine Baustelle, meine Stärken liegen eher auf der Systemebene. ;)

Re: Failed opening required 'PEAR.php'  [GELÖST]

Posted: Sun 5. Jun 2022, 00:13
by Viktor
Jolinar wrote: Sat 4. Jun 2022, 23:49 Okay, das wäre ein Argument.

Allerdings wirst du dich für eine mögliche Lösung deines PHP Problems noch etwas gedulden müssen, bis einer der Programmierprofis den Thread gesehen hat...Programmierung ist (bis auf die Shell) nicht unbedingt meine Baustelle, meine Stärken liegen eher auf der Systemebene. ;)
Hallo,

jo Danke für deinen Versuch zu helfen.

Wenn ich den Code oben so ändere das geht es. :?:

Code: Select all

if (!class_exists('PEAR')) {
    require_once '/usr/share/php/PEAR.php';
}
Warum will der die "/opt/keyhelp/php/7.1/lib/php/PEAR.php". :?:

Ist in PHP7.1 vielleicht ein Fehler. :?:

Gruß
Viktor ;)

Re: Failed opening required 'PEAR.php'

Posted: Sun 5. Jun 2022, 05:58
by Tobi
Ich würde meinen das Problem kommt daher weil die Dateien „root“ gehören.
Eigentlich müssten diese User xyz gehören.

Re: Failed opening required 'PEAR.php'

Posted: Sun 5. Jun 2022, 06:05
by Jolinar
Tobi wrote: Sun 5. Jun 2022, 05:58 Ich würde meinen das Problem kommt daher weil die Dateien „root“ gehören.
Eigentlich müssten diese User xyz gehören.
Ich hab jetzt mal eine alternative PHP Version installiert, bei mir gehören die Files in diesem Ordner ebenfalls root:

Code: Select all

[root@host]~>ls -al /opt/keyhelp/php/5.6/lib/php/
total 152
drwxr-xr-x 15 root root  4096 Feb 27 14:39 .
drwxr-xr-x  3 root root  4096 Feb 27 14:39 ..
drwxr-xr-x  3 root root  4096 Feb 27 14:39 .channels
-rw-r--r--  1 root root  2470 Feb 27 14:39 .depdb
-rw-r--r--  1 root root     0 Feb 27 14:39 .depdblock
-rw-r--r--  1 root root  6961 Feb 27 14:39 .filemap
-rw-r--r--  1 root root     0 Feb 27 14:39 .lock
drwxr-xr-x  5 root root  4096 Feb 27 14:39 .registry
drwxr-xr-x  2 root root  4096 Feb 27 14:39 Archive
drwxr-xr-x  2 root root  4096 Feb 27 14:39 Console
drwxr-xr-x  2 root root  4096 Feb 27 14:39 OS
drwxr-xr-x 11 root root  4096 Feb 27 14:39 PEAR
-rw-r--r--  1 root root 35466 Feb 27 14:39 PEAR.php
drwxr-xr-x  3 root root  4096 Feb 27 14:39 Structures
-rw-r--r--  1 root root 20562 Feb 27 14:39 System.php
drwxr-xr-x  2 root root  4096 Feb 27 14:39 XML
drwxr-xr-x  2 root root  4096 Feb 27 14:39 build
drwxr-xr-x  3 root root  4096 Feb 27 14:39 data
drwxr-xr-x  6 root root  4096 Feb 27 14:39 doc
drwxr-xr-x  3 root root  4096 Feb 27 14:39 extensions
-rw-r--r--  1 root root 15196 Feb 27 14:39 pearcmd.php
-rw-r--r--  1 root root  1045 Feb 27 14:39 peclcmd.php
drwxr-xr-x  5 root root  4096 Feb 27 14:39 test
[root@host]~>

Re: Failed opening required 'PEAR.php'

Posted: Sun 5. Jun 2022, 07:31
by Tobi
Ja ich hatte zu schnell gelesen.
Mein Fehler 🤦‍♂️

Re: Failed opening required 'PEAR.php'

Posted: Sun 5. Jun 2022, 08:14
by Jolinar
Tobi wrote: Sun 5. Jun 2022, 07:31 Ja ich hatte zu schnell gelesen.
Mein Fehler 🤦‍♂️
Das kommt davon, wenn man sonntags früh 6 Uhr schon am Rechner sitzt und der Kaffee das Gehirn noch nicht genug in Schwung gebracht hat. ;) :lol:

Re: Failed opening required 'PEAR.php'

Posted: Sun 5. Jun 2022, 13:02
by Tobi
Wie wahr 😂😂😂

Re: Failed opening required 'PEAR.php'

Posted: Tue 7. Jun 2022, 10:16
by Florian
Hallo,

wenn eine Keyhelp PHP Version genutzt wird muss der OpenBasedir entsprechend erweitert werden, z.B um: /opt/keyhelp/php/7.1/lib/php

Dann wird auch die PEAR.php gefunden.

Unter /usr/share/php liegen wenn nur Sachen der System PHP Version.