Xampp: Unterschied zwischen den Versionen
| Zeile 77: | Zeile 77: | ||
=== Bessere installation auf Mac === | === Bessere installation auf Mac === | ||
in XAMPP > xamppfiles > htdocs Symlink auf allgemeinen www Ordner setzen (z.B. unterste Ebene Festplatte oder in Benutzerordner. | in XAMPP > xamppfiles > htdocs Symlink auf allgemeinen www Ordner setzen (z.B. unterste Ebene Festplatte oder in Benutzerordner. | ||
| + | |||
| + | == Mehrere PHP Versionen über CGI Mode == | ||
| + | https://community.apachefriends.org/f/viewtopic.php?f=4&t=67753 | ||
| + | |||
| + | PHP 5.3 TS VC9 x86 .zip Version herunterladen | ||
| + | PHP Version ins Verzeichnis C:\xampp\php53\ entpacken | ||
| + | C:\xampp\php53\php.ini-development umbenennen zu php.ini | ||
| + | Die neue php.ini Datei nach den eigenen Wünschen anpassen - vorallem error_log, include_path und extension_dir, upload_tmp_dir und benötigte PHP Module sollten korrekt gesetzt werden (du kannst zum Beispiel die aktuelle C:\xampp\php\php.ini als Vorlage nehmen, beachte aber dass sich Direktiven von Version zu Version stark verändern können. Hierfür solltest du dir auf jeden Fall etwas Zeit einplanen) | ||
| + | C:\xampp\apache\conf\extra\httpd-xampp.conf öffnen und folgenden Absatz einfügen | ||
| + | |||
| + | Code: Select all | ||
| + | ScriptAlias /php53-cgi/ "C:/xampp/php53/" | ||
| + | <Directory "C:/xampp/php53"> | ||
| + | SetEnv PHPRC "C:/xampp/php53" | ||
| + | AllowOverride None | ||
| + | Options None | ||
| + | Require all denied | ||
| + | <Files "php-cgi.exe"> | ||
| + | Require all granted | ||
| + | </Files> | ||
| + | </Directory> | ||
| + | |||
| + | .htaccess Datei im Verzeichnis deiner Wahl mit folgendem Inhalt erstellen | ||
| + | |||
| + | Code: Select all | ||
| + | <FilesMatch "\.php$"> | ||
| + | SetHandler application/x-httpd-php-cgi | ||
| + | </FilesMatch> | ||
| + | |||
| + | <IfModule actions_module> | ||
| + | Action application/x-httpd-php-cgi "/php53-cgi/php-cgi.exe" | ||
| + | </IfModule> | ||
| + | |||
| + | Eine phpinfo.php Datei in demselben Ordner erstellen mit dem Inhalt | ||
| + | |||
| + | Code: Select all | ||
| + | <?php phpinfo(); | ||
| + | |||
| + | Apache starten und die erstellte phpinfo.php Datei ausführen um zu prüfen ob die Änderung gezogen hat | ||
Version vom 23. Januar 2018, 12:21 Uhr
Virtueller Host in XAMPP under OSX
http://www.mactopics.de/2015/03/03/einen-virtuellen-host-in-xampp-os-x-anlegen/
XAMPP Username und Usergroup in OSX
Definiert in
/Applications/XAMPP/xamppfiles/etc/httpd.conf
Und kann dort angepasst werden.
Default:
User daemon Group daemon
Einfach ändern z.B.
User YourName Group YourGroup
Mailkonfiguration für XAMPP
Standardmäßig speichert XAMPP Mails die z.B. über PHP generiert werden im Verzeichnis: mailoutput. Dort kann man sie als txt Dateien lesen.
Man kann XAMPP aber auch so konfigurieren, dass er über einen Mail Account Mails versenden kann. Damit kann man z.B. php Mailskripte testen, und bekommt auch die entsprechende Rückmeldung bzw. Spamassasin etc. In Mac kann man das eingebaute Postfix nutzen (siehe Postfix auf Mac OS) in Windows nutzt man die XAMPP Konfiguration.
Beispiel Konfiguration für Gmail Dateien:
C:\xampp\php\php.ini C:\xampp\sendmail\sendmail.ini
php.ini [mail function]
SMTP=smtp.gmail.com smtp_port=587 sendmail_from = my-gmail-id@gmail.com sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
sendmail.ini. Replace all the existing code in sendmail.ini with following code
[sendmail] smtp_server=smtp.gmail.com smtp_port=587 error_logfile=error.log debug_logfile=debug.log auth_username=my-gmail-id@gmail.com auth_password=my-gmail-password force_sender=my-gmail-id@gmail.com
replace my-gmail-id and my-gmail-password restart the server using the XAMMP control panel so the changes take effect.
XAMPP Probleme lösen
Zuweilen hat xampp veraltete libs an Bord. Auch wenn auf dem Rechner die neueren Libs sind benutzt xampp die eigenen alten.
ImageMagick und GraphicsMagick funktionieren nicht
Fehlermeldung im error_log
dyld: Library not loaded: /usr/local/lib/libfreetype.6.dylib Referenced from: /usr/local/bin/gm Reason: Incompatible library version: gm requires version 18.0.0 or later, but libfreetype.6.dylib provides version 15.0.0
GraphicsMagick wurde über Homebrew installiert.
Die Pfadangabe für libfreetype.6.dylib stimmt nicht. Eigentlich nutzt XAMPP die in seinem eigenen lib Verzeichnis. Man kann diese jedoch einfach mit der aus der /usr/local/lib/ ersetzen, dann funktioniert es wieder.
xampp update
Quelle: http://www.jurkos.com/?p=854 11/2014
1. Stop services or process under XAMPP control panel and EXIT 2. Rename installation folder C:\XAMPP\… with C:\XAMPP_old\ 3. Create new folder with the same name C:\XAMPP\… 4. Install there new version of XAMPP (in security options you have to write the same passwords and usernames you had before) 5. Ctrl+c or ctrl+x just website folders under C:\XAMPP\htdocs\*… (don’t copy xampp folder and others who came with installation) 6. Create databases (with same name as before), this will create just new folder under C:\XAMPP\mysql\data\* with file inside db.opt + copy ibdata1 file under folder C:\XAMPP\mysql\ 7. Copy content of older C:\XAMPP_old\mysql\data\*\ to C:\XAMPP\mysql\data\*\ and skip the file db.opt 8. If you did changes in previous xampp of file httpd-vhosts.conf under C:\XAMPP\apache\conf\extra\ don’t forget to copy it right and create folder C:\XAMPP\log 9. Start XAMPP control panel, start apache and mysql 10. DONE
Bessere installation auf Mac
in XAMPP > xamppfiles > htdocs Symlink auf allgemeinen www Ordner setzen (z.B. unterste Ebene Festplatte oder in Benutzerordner.
Mehrere PHP Versionen über CGI Mode
https://community.apachefriends.org/f/viewtopic.php?f=4&t=67753
PHP 5.3 TS VC9 x86 .zip Version herunterladen PHP Version ins Verzeichnis C:\xampp\php53\ entpacken C:\xampp\php53\php.ini-development umbenennen zu php.ini Die neue php.ini Datei nach den eigenen Wünschen anpassen - vorallem error_log, include_path und extension_dir, upload_tmp_dir und benötigte PHP Module sollten korrekt gesetzt werden (du kannst zum Beispiel die aktuelle C:\xampp\php\php.ini als Vorlage nehmen, beachte aber dass sich Direktiven von Version zu Version stark verändern können. Hierfür solltest du dir auf jeden Fall etwas Zeit einplanen) C:\xampp\apache\conf\extra\httpd-xampp.conf öffnen und folgenden Absatz einfügen
Code: Select all
ScriptAlias /php53-cgi/ "C:/xampp/php53/"
<Directory "C:/xampp/php53">
SetEnv PHPRC "C:/xampp/php53"
AllowOverride None
Options None
Require all denied
<Files "php-cgi.exe">
Require all granted
</Files>
</Directory>
.htaccess Datei im Verzeichnis deiner Wahl mit folgendem Inhalt erstellen
Code: Select all
<FilesMatch "\.php$">
SetHandler application/x-httpd-php-cgi
</FilesMatch>
<IfModule actions_module>
Action application/x-httpd-php-cgi "/php53-cgi/php-cgi.exe"
</IfModule>
Eine phpinfo.php Datei in demselben Ordner erstellen mit dem Inhalt
Code: Select all
<?php phpinfo();
Apache starten und die erstellte phpinfo.php Datei ausführen um zu prüfen ob die Änderung gezogen hat