Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung Nächste ÜberarbeitungBeide Seiten der Revision | ||
content:apache_phpfpm [2022/11/22 22:01] – [Manage Database with phpMyAdmin] Daniel | content: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: | ||
- | |||
< | < | ||
+ | |||
sudo zypper install mariadb | sudo zypper install mariadb | ||
Zeile 96: | Zeile 96: | ||
To setup passwords, run / | To setup passwords, run / | ||
- | |||
==== Install Apache ==== | ==== Install Apache ==== | ||
Zeile 150: | Zeile 149: | ||
</ | </ | ||
+ | |||
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** | + | many modules for PHP are offered in the Distrubution. I **would not recommend using those** |
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 238: | Zeile 238: | ||
Which can be found in the Repo: [[https:// | Which can be found in the Repo: [[https:// | ||
- | After that, modules can be installed by e.g. "pecl install imagick" | + | After that, modules can be installed by e.g. "pecl install imagick" |
+ | |||
+ | To make pecl/paer alter the ini automagically, | ||
+ | < | ||
+ | |||
+ | pear config-set php_ini / | ||
+ | pecl config-set php_ini / | ||
+ | |||
+ | </ | ||
Restart php-fpm for the changes and check the log of php-fpm (usually in / | Restart php-fpm for the changes and check the log of php-fpm (usually in / | ||
Zeile 249: | Zeile 257: | ||
* To enable this and all its dependencies, | * To enable this and all its dependencies, | ||
- | < | ||
+ | < | ||
sudo a2enmod setenvif | sudo a2enmod setenvif | ||
sudo a2enmod rewrite | sudo a2enmod rewrite | ||
Zeile 329: | 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 338: | Zeile 345: | ||
Hint: phpMyAdmin in Opensuse seems to be reduced in functionality. For example generating config.inc.php with [[http:// | Hint: phpMyAdmin in Opensuse seems to be reduced in functionality. For example generating config.inc.php with [[http:// | ||
- | |||
==== About security of your WEB- Page (Scripts) ==== | ==== About security of your WEB- Page (Scripts) ==== | ||
Zeile 391: | 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 | + | ==== 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 code, install xdebug for php via pecl: | ||
+ | < | ||
+ | |||
+ | pecl install xdebug | ||
+ | |||
+ | </ | ||
+ | |||
+ | Now, also add | ||
+ | |||
+ | < | ||
+ | xdebug.mode=debug | ||
+ | |||
+ | </ | ||
+ | |||
+ | 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 / | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | | ||
+ | | ||
+ | ... | ||
+ | |||
+ | </ | ||
+ | |||
+ | And of course restart apache2. | ||
+ | |||
+ | ==== Setup of Eclipse ==== | ||
+ | |||
+ | You need to add the PHP- Environement and the Debugger in Eclipse. | ||
+ | |||
+ | {{.: | ||
+ | |||
+ | and | ||
+ | |||
+ | {{.: | ||
+ | |||
+ | Mind to use the Port phpinfo tells you. Thats it start debugging with e.g. index.php of the project: | ||
+ | |||
+ | {{.: | ||
+ | |||
+ | That should | ||
+ | |||
+ | 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- repository. hafe fun! | ||