Laufzeit-Konfiguration

Das Verhalten dieser Funktionen wird durch Einstellungen in der php.ini beeinflusst.

Filesystem and Streams Configuration Options
Name Standard Veränderbar Changelog
phar.readonly "1" PHP_INI_ALL  
phar.require_hash "1" PHP_INI_ALL  
phar.cache_list "" PHP_INI_SYSTEM  

Hier eine kurze Erklärung der Konfigurationsoptionen:

phar.readonly bool

This option disables creation or modification of Phar archives using the phar stream or Phar object's write support. This setting should always be enabled on production machines, as the phar extension's convenient write support could allow straightforward creation of a php-based virus when coupled with other common security vulnerabilities.

Hinweis:

This setting can only be unset in php.ini due to security reasons. If phar.readonly is disabled in php.ini, the user may enable phar.readonly in a script or disable it later. If phar.readonly is enabled in php.ini, a script may harmlessly "re-enable" the INI variable, but may not disable it.

phar.require_hash bool

This option will force all opened Phar archives to contain some kind of signature (currently MD5, SHA1, SHA256, SHA512 and OpenSSL are supported), and will refuse to process any Phar archive that does not contain a signature.

Hinweis:

This setting can only be unset in php.ini. If phar.require_hash is disabled in php.ini, the user may enable phar.require_hash in a script or disable it later. If phar.require_hash is enabled in php.ini, a script may harmlessly "re-enable" the INI variable, but may not disable it.

This setting does not affect reading plain tar files with the PharData class.

Achtung

phar.require_hash does not provide any security per se, it is merely a measure against running accidentially corrupted Phar archives, because anyone who would be able to tamper with the Phar could easily fix the signature afterwards.

phar.cache_list string

Allows mapping phar archives to be pre-parsed at web server startup, providing a performance improvement that brings running files out of a phar archive very close to the speed of running those files from a traditional disk-based installation.

Beispiel #1 phar.cache_list usage example

in php.ini (windows):
phar.cache_list =C:\path\to\phar1.phar;C:\path\to\phar2.phar
in php.ini (unix):
phar.cache_list =/path/to/phar1.phar:/path/to/phar2.phar

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Total Commander 11.00 (final) ist verfügbar!

Total Commander, ein beliebter Datei-Manager, hat kürzlich seine neueste Version, 11.00, veröffentlicht. Mit einer Vielzahl von neuen Funktionen und Korrekturen bietet diese Version den Benutzern ein verbessertes und optimiertes Erlebnis. ...

admin

Autor : admin
Kategorie: Software-Updates

Welche Technologien sollte ein PHP Programmierer beherrschen?

In der heutigen digitalen Welt ist die Rolle eines PHP Programmierers von großer Bedeutung. ...

admin

Autor : admin
Kategorie: Dies und Das

PHPUnit in der Version 10 erschienen

PHPUnit in der Version 10 erschienen

Das beliebte Testframeworks PHPUnit ist in der Version 10 erschienen und steht zum Download bereit ...

TheMax

Autor : TheMax
Kategorie: Software & Web-Development

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

Fragen zu PHP-Syntax

Dankeschön, deine Erklärungen lassen mich Beides schon einmal besser nachvollziehen. Bei 2) hatte ich mittlerweile etwas zu Namensräumen gefund ...

Geschrieben von BrotherJ am 12.09.2023 08:05:17
Forum: PHP Developer Forum
Datei Prüfung - Alles was zwischen /* und */ steht, einfärben.

In deinem Beispiel endet der Kommentar in Zeile 11. Die Zeilen 12 bis 16 sind nicht mehr eingeschlossen, denn Kommentarzeichen kann man so nicht v ...

Geschrieben von reddighamburg am 12.09.2023 00:57:14
Forum: PHP Developer Forum
Fragen zu PHP-Syntax

zu 1) Hier geht es um Typensicherheit. Das : Response sagt nichts anderes, als dass der zurückgegebene Wert in jedem Fall vom Typ Response ist. A ...

Geschrieben von reddighamburg am 12.09.2023 00:31:02
Forum: PHP Developer Forum
Google findet die Seite einfach nicht...

Hey, Es tut mir leid zu hören, dass du Schwierigkeiten mit der Indexierung deines Blogs hast. In solchen Fällen ist es wichtig, verschiedene As ...

Geschrieben von Nikolla am 08.09.2023 12:31:56
Forum: SEO - Suchmaschinen Tricks und Tipps