How to install PHP locally to explore? PHP-fpm or PHP?

Which version of PHP to install locally for learning PHP ? PHP-fpm or PHP and how do they differ ?
March 23rd 20 at 19:34
3 answers
March 23rd 20 at 19:36
To study the difference. To explore fit the classic bundle LAMP
March 23rd 20 at 19:38
Do not put nginx or apache for a start.
PHP has a built-in webserver for development.
And then with experience you can look towards fpm and nginx.
apache for php has been dead for ten years.
In addition to any cms with Hitachi - Cade68 commented on March 23rd 20 at 19:41
@Cade68, php-fpm works fine with Apache. - Antwon commented on March 23rd 20 at 19:44
@Antwon, never seen. Give a link? - Cade68 commented on March 23rd 20 at 19:47
@Cade68, I even Ansible scripts can give. Write in chat https://cloud-controller.ru/ - Antwon commented on March 23rd 20 at 19:50
@Antwon, long is able? I just Apache twice in my life put)) - Cade68 commented on March 23rd 20 at 19:53
@Cade68, always was. - Antwon commented on March 23rd 20 at 19:56
@Cade68,
spoiler
<VirtualHost 127.0.0.1:8080>
 ServerName {{ username }}.loc
 ServerAlias {{ domains }}
 # ServerAlias example.*.xip.io

 DocumentRoot /home/{{ username }}/www/{{ document_root }}

 <Directory /home/{{ username }}/www/{{ document_root }}>
 Options-Indexes +FollowSymLinks +MultiViews
 AllowOverride All
 Require all granted
</Directory>

 <FilesMatch \.php$>
 # 2.4.10+ can proxy to unix socket
 SetHandler "proxy:unix:/var/run/php/php{{ php }}-fpm-{{ username }}.sock|fcgi://localhost/"

 # Else, we can just use a tcp socket:
 # SetHandler "proxy:fcgi://127.0.0.1:9000"
</FilesMatch>

 ErrorLog ${APACHE_LOG_DIR}/{{ username }}-error.log

 # Possible values include: debug, info, notice, warn, error, crit,
 # alert, emerg.
 LogLevel warn

 # CustomLog ${APACHE_LOG_DIR}/example.com-access.log combined

</VirtualHost>

- Antwon commented on March 23rd 20 at 19:59
@Antwon, strange, then, why so nginx has evolved. Max I saw that fcgi - Cade68 commented on March 23rd 20 at 20:02
@Antwon, # 2.4.10+ - Cade68 commented on March 23rd 20 at 20:05
@Cade68,
the usual hype, in the same Docker. What Nginx without Apache that Docker or LXC are only suitable for personal use. Hosters will not lie. - Antwon commented on March 23rd 20 at 20:08
@Antwon, I understand Apache changed his mind and added support for udp - Cade68 commented on March 23rd 20 at 20:11
@Cade68, Apache has long been all right. To dissuade newcomers from Apache, silly idea. Instead of the normal CMS operation which is likely already configured .htaccess they will suffer with configs Nginx. - Antwon commented on March 23rd 20 at 20:14
no, just the author of the opus is not mastered Apache) - Armando_Durgan commented on March 23rd 20 at 20:17
@Armando_Durganwhy to master Apache, when nginx is )) - Cade68 commented on March 23rd 20 at 20:20
@Cade68for a wardrobe. - Armando_Durgan commented on March 23rd 20 at 20:23
March 23rd 20 at 19:40
PHP-FPM will allow to flexibly configure each host and teach good manners, to run each pool from the individual user.
Classic examples on the Internet, it's Apache + mod_php don't even look.
If people need to learn PHP syntax, and you pull it in sysadmin. Possible, but why? (photo of a trolley bus of a loaf of bread) - lucious commented on March 23rd 20 at 19:43
@lucious, that every second programmer then climbs to configure the environment and makes it through the ass. They're above such vulgarity as the control panel. - Antwon commented on March 23rd 20 at 19:46
@Antwon, imagine the author of the question. Maybe it's the designer who just realized what is CSS, and now want to understand what is PHP. He would helloword to write, only he doesn't know what interpreter to take, and you give him virtual hosts for each project under their rights. (though I did not want to offend anyone) - lucious commented on March 23rd 20 at 19:49
@lucious, you offer to suffer with permissions to mode, Apache mpm-prefork + mod_php? - Antwon commented on March 23rd 20 at 19:52
@Antwon, I have php-fpm and several projects under one user (on localhost).
What's next? - Stanton.Marquardt commented on March 23rd 20 at 19:55
@Antwon, I don't think he will have to suffer. - lucious commented on March 23rd 20 at 19:58
@lucious,
Hello World can be written in windowa OpenServer. - Antwon commented on March 23rd 20 at 20:01
@Stanton.Marquardt,

I have php-fpm and several projects under one user.
What's next?

Well done. - Antwon commented on March 23rd 20 at 20:04
@Antwon, Here is the answer. I gave the Most Common option, which is 100,500 tutorials. - lucious commented on March 23rd 20 at 20:07
@lucious,
For Venda do not care what he is there mode choose. If given such a question, it is logical to assume that this refers to Linux. In the Linux it and suffered with mod_php. - Antwon commented on March 23rd 20 at 20:10

Find more questions by tags PHP