Composer Output => PHP-Variable
Composer Output an PHP-Variable:
<?php
$output = shell_exec( "composer update --dry-run 2>&1" );
echo $output;
Composer Output an PHP-Variable:
<?php
$output = shell_exec( "composer update --dry-run 2>&1" );
echo $output;
Error: Maximum function nesting level of '256' reached, aborting! in html_entity_decode() (line 386 of /home/512/web/core/lib/Drupal/Component/Utility/Html.php)
xdebug.max_nesting_level = 1024
Lösung:
apt install php-gd
apt install php5.6-gd
apt install php7.4-gd
Manchmal lässt Webmin PHP Dateien herunterladen statt sie auszuführen.
Lösung : Webmin >> Servers >> Apache Webserver >> [Your VirtualServer] >> PHP "engine off " entfernen.
Example
<?php
echo print_r(debug_backtrace( DEBUG_BACKTRACE_PROVIDE_OBJECT, 1);
So kann man Variable permanent (Laufzeit) speichern.
<?php
myvars( ["city" => "bonn" ] );
myvars( ["alter" => "33" ] );
myvars( ["auto" => "bmw" ] );
echo " Stadt: " . myvars("city");
echo " Alter: " . myvars("alter");
echo " Auto: " . myvars("auto");
function myvars( $arr ){
static $vars;
if( is_array($arr) ){
$key = key( $arr );
$vars[ $key ] = $arr[ $key];
} else {
return $vars[ $arr];
}
}
?>
Neue Konfigurationsdatei (.ini) erstellen: \etc\php\7.0\cgi\conf.d\meine_eigene.ini
memory_limit = 2G
upload_max_size = 2G
post_max_size = 2G
upload_max_filesize = 2G
max_execution_time = 300
max_input_time = 3600
max_file_uploads = 1000xdebug.max_nesting_level = 512
session.gc_maxlifetime = 86400
# service apache2 reload
<?php $imagick = new Imagick(); $imagick->setResolution(150, 150); $imagick->readImage('beispiel.pdf'); $imagick->writeImages('converted.jpg', false); ?>
Damit Empfänger Umlaute vernünftig lesen kann, muss man E-Mail mit Headers (MIME, Content-type, charset) schicken.
<?php