Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste ÜberarbeitungBeide Seiten der Revision
content:apache_phpfpm [2022/11/23 09:01] – [About PHP- Modules] Danielcontent:apache_phpfpm [2022/11/23 10:50] Daniel
Zeile 59: Zeile 59:
  
 In OpenSuSE MariaDB is available and working out of the Box. Check with: In OpenSuSE MariaDB is available and working out of the Box. Check with:
- 
 <code> <code>
 +
 sudo zypper install mariadb sudo zypper install mariadb
  
Zeile 96: Zeile 96:
  
 To setup passwords, run /usr/bin/mysql_secure_installation as root on the system. To setup passwords, run /usr/bin/mysql_secure_installation as root on the system.
- 
  
 ==== Install Apache ==== ==== Install Apache ====
Zeile 150: Zeile 149:
  
 </code> </code>
 +
 If thats fine, please stop apache once again to configure php-fpm first. If thats fine, please stop apache once again to configure php-fpm first.
  
Zeile 230: Zeile 230:
 ==== About PHP- Modules ==== ==== About PHP- Modules ====
  
-many modules for PHP are offered in the Distrubution. I **would not recommend using those** - as all php-modules need to be compiled against your php. If you update PHP and your modules are not copiled to that version, they may brake your PHP!+many modules for PHP are offered in the Distrubution. I **would not recommend using those**  - as all php-modules need to be compiled against your php. If you update PHP and your modules are not copiled to that version, they may brake your PHP!
  
 Better use pearl / pecl and install modules with it! Here, i have found no other way, than to search for php-pear and php-pecl in the distribution and use them. Better use pearl / pecl and install modules with it! Here, i have found no other way, than to search for php-pear and php-pecl in the distribution and use them.
Zeile 249: Zeile 249:
  
 Restart php-fpm for the changes and check the log of php-fpm (usually in /var/log/php-fpm.log) for errors when loading modules. Restart php-fpm for the changes and check the log of php-fpm (usually in /var/log/php-fpm.log) for errors when loading modules.
- 
  
 ==== Tell Apache to use php-fpm ==== ==== Tell Apache to use php-fpm ====
Zeile 258: Zeile 257:
  
   * To enable this and all its dependencies, use   * To enable this and all its dependencies, use
 +
 <code> <code>
- 
 sudo a2enmod setenvif sudo a2enmod setenvif
 sudo a2enmod rewrite sudo a2enmod rewrite
Zeile 338: Zeile 337:
  
 Well: You are done. Now its up to you to fill Apache with content. Have fun! Well: You are done. Now its up to you to fill Apache with content. Have fun!
- 
  
 ==== Manage Database with phpMyAdmin ==== ==== Manage Database with phpMyAdmin ====
Zeile 347: Zeile 345:
  
 Hint: phpMyAdmin in Opensuse seems to be reduced in functionality. For example generating config.inc.php with [[http://localhost/phpMyAdmin/setup/|http://localhost/phpMyAdmin/setup/]] will not work. I would recommend to delete contents of /usr/share/phpMyAdmin/ and download a full version here: [[https://www.phpmyadmin.net/downloads/|https://www.phpmyadmin.net/downloads/]] Hint: phpMyAdmin in Opensuse seems to be reduced in functionality. For example generating config.inc.php with [[http://localhost/phpMyAdmin/setup/|http://localhost/phpMyAdmin/setup/]] will not work. I would recommend to delete contents of /usr/share/phpMyAdmin/ and download a full version here: [[https://www.phpmyadmin.net/downloads/|https://www.phpmyadmin.net/downloads/]]
- 
  
 ==== About security of your WEB- Page (Scripts) ==== ==== About security of your WEB- Page (Scripts) ====
Zeile 400: Zeile 397:
 As Database you can create a new user (e.g. named ep3) with corresponid database and fill the configuration to fit. As Database you can create a new user (e.g. named ep3) with corresponid database and fill the configuration to fit.
  
-After that, your testinstallation should work already.+==== Using Eclipse to work on that Project ==== 
 + 
 +In Eclipse now add a project and use GIT smart import from that directory location - it should configure git and eclipse + php the right way and you should be ready to go programming! 
 + 
 +==== Setup Debugging of PHP ==== 
 + 
 +To setup Debugging of codeinstall xdebug for php via pecl: 
 +<code> 
 + 
 +pecl install xdebug 
 + 
 +</code> 
 + 
 +Now, also add 
 + 
 +<file> 
 +xdebug.mode=debug 
 + 
 +</file> 
 + 
 +Now restart php-fpm and check the php_info() if xdebug is enabled and if Step debugging is active. Otherwise check logs. 
 + 
 +Adjusting timeouts in apache fcgi: Add Timeouts to /etc/apache2/conf.d/mod_proxy_fcgi.conf of apache: 
 + 
 +<code> 
 +... 
 + Timeout 600 
 + ProxyTimeout 600 
 +... 
 + 
 +</code> 
 + 
 +And of course restart apache2. 
 + 
 +==== Setup of Eclipse ==== 
 + 
 +You need to add the PHP- Environement and the Debugger in Eclipse. 
 + 
 +{{.:apache_phpfpm_20221123-104346.png}} 
 + 
 +and 
 + 
 +{{.:apache_phpfpm_20221123-104629.png}} 
 + 
 +Mind to use the Port phpinfo tells you. Thats it start debugging with e.g. index.php of the project: 
 + 
 +{{.:apache_phpfpm_20221123-105037.png}} 
 + 
 +That should fire up the Browser, connect php in debugging to eclipse and break at the first line. 
 + 
 +You can walk through the code with F5 (dive into), F6 (step over) or just let the work go on with F8. 
 + 
 +You are done setting up webserver, php-fpm, mariadb and eclipse plus your new git- repositoryhafe fun!
  
  
  • content/apache_phpfpm.txt
  • Zuletzt geändert: 2023/10/01 10:24
  • von Daniel