Hello everybody,
I am trying to bring PHP 7.0.2 for you. Please help me finish this project here together.
I found two tutorials on how to install PHP from source codes in these 2 locations;
http://www.tecmint.com/install-and-c...-and-debian-8/
https://www.youtube.com/watch?v=t6faNpofYHI
Similar to above video I have the fallowing directories;
/root/Release/
/root/Release/php
/root/Sources
After reaching to 2:18 time level I get the fallowing error
Please see my steps after the error section here;
[root@SERVER ~]# systemctl restart httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root@SERVER ~]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2016-01-06 05:57:08 PST; 23s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 3773 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 3771 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 3771 (code=exited, status=1/FAILURE)
Jan 06 05:57:08 SERVER systemd[1]: Starting The Apache HTTP Server...
Jan 06 05:57:08 SERVER httpd[3771]: httpd: Syntax error on line 355 of /etc/httpd/conf/httpd.conf: Cannot load /usr/lib64/httpd/modules/libphp7.s... directory
Jan 06 05:57:08 SERVER systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jan 06 05:57:08 SERVER kill[3773]: kill: cannot find process ""
Jan 06 05:57:08 SERVER systemd[1]: httpd.service: control process exited, code=exited status=1
Jan 06 05:57:08 SERVER systemd[1]: Failed to start The Apache HTTP Server.
Jan 06 05:57:08 SERVER systemd[1]: Unit httpd.service entered failed state.
Jan 06 05:57:08 SERVER systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
yum update && yum install httpd gcc libxml2-devel pkgconfig openssl-devel bzip2-devel libpng-devel libpng-devel libjpeg-devel libXpm-devel freetype-devel gmp-devel libmcrypt-devel mariadb-devel aspell-devel recode-devel httpd-devel
yum -y install epel-release
yum -y install php-mcrypt
yum install libmcrypt-devel
rpm -ivh
http://dl.fedoraproject.org/pub/epel...6-8.noarch.rpm
rpm -ivh
http://pkgs.repoforge.org/rpmforge-r....rf.x86_64.rpm
https://www.rpmfind.net/linux/RPM/ma...a6.x86_64.html
I tried to rpm -ivh this
[root@SERVER ~]# rpm -ivh
ftp://195.220.108.108/linux/mageia/d...ga6.x86_64.rpm
Retrieving
ftp://195.220.108.108/linux/mageia/d...ga6.x86_64.rpm
warning: /var/tmp/rpm-tmp.9Hutaw: Header V3 RSA/SHA1 Signature, key ID 80420f66: NOKEY
error: Failed dependencies:
lib64php_common7 >= 3:7.0.2 is needed by php-mcrypt-3:7.0.2-2.mga6.x86_64
[root@SERVER ~]#
Then i tried this
https://www.rpmfind.net/linux/rpm2ht...b64php_common7
rpm -ivh
ftp://195.220.108.108/linux/mageia/d...ga6.x86_64.rpm
and it worked
[root@SERVER ~]# rpm -ivh
ftp://195.220.108.108/linux/mageia/d...ga6.x86_64.rpm
Retrieving
ftp://195.220.108.108/linux/mageia/d...ga6.x86_64.rpm
warning: /var/tmp/rpm-tmp.NzTGP9: Header V3 RSA/SHA1 Signature, key ID 80420f66: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1
hp-mcrypt-3:7.0.2-2.mga6 ################################# [100%]
[root@SERVER ~]#
mkdir Release
mkdir Sources
cd Sources/
wget
https://github.com/php/php-src/archi....0.2RC1.tar.gz
tar -xvzf php-7.0.2RC1.tar.gz -C /opt
cd /opt/php-src-php-7.0.2RC1
Here you can go either way;
./buildconf --force if you want to force it through php-7.0.2RC1.tar.gz
or
./configure if you configure from /opt/php-src-php-7.0.2RC1
I choose this;
./configure \
--prefix=$HOME/php7/usr \
--with-config-file-path=$HOME/php7/usr/etc \
--enable-mbstring \
--enable-zip \
--enable-bcmath \
--enable-pcntl \
--enable-ftp \
--enable-exif \
--enable-calendar \
--enable-so \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-wddx \
--with-curl \
--with-mcrypt \
--with-iconv \
--with-gmp \
--with-pspell \
--with-gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib-dir=/usr \
--with-xpm-dir=/usr \
--with-freetype-dir=/usr \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--with-openssl \
--with-pdo-mysql=/usr \
--with-gettext=/usr \
--with-zlib=/usr \
--with-bz2=/usr \
--with-recode=/usr \
--with-mysqli=/usr/bin/mysql_config \
--with-apxs2
ls -l /opt/php-src-php-7.0.2RC1 | grep php.ini
http://www.tecmint.com/wp-content/up...p.ini-File.png
cp /opt/php-src-php-7.0.2RC1/php.ini-development /usr/local/lib
cp /opt/php-src-php-7.0.2RC1/php.ini-production /usr/local/lib
depending on your choice of development or production
(production use not recommended for 7.0.2RC1)
gedit /etc/httpd/conf/httpd.conf
Below Include conf.modules.d/*.conf on httpd.conf
I added
LoadModule php7_module /usr/lib64/httpd/modules/libphp7.so
Was this correct or shall i edit conf.modules.d/*.conf and put it there?
I need your help to guide me through my steps and their order of proceeding each other.
At the end of httpd.conf I added
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
Save and exit gedit
Terminal
systemctl restart httpd
If starting up Apache in CentOS 7 returns an error message saying it cant find the libphp7.so module, simply copy to the indicated path from /opt/php-src-php-7.0.2RC1/.libs/libphp7.so.
Terminal
libtool --finish /opt/php-src-php-7.0.2RC1/libs
Terminal
cp /opt/php-src-php-7.0.2RC1/.libs/libphp7.so /etc/httpd/modules
is copying libphp7.la also necessary?
I need to CHMODE libphp7.so to 755
According to
https://www.maketecheasier.com/file-...mod-777-means/
Read is equivalent to 4.
Write is equivalent to 2.
Execute is equivalent to 1
But In libphp7.so file Properties it has Read Only and Read and Write and None
Owner: root
Group: root (what should it change to from root?)
Other
I am stuck in make and make install section of this video on 2:20
https://www.youtube.com/watch?v=t6faNpofYHI
The rest is easy.
/etc /usr /var are compiled php 7.0.2 and all i need to di is to copy them to my system, ready to use.
Please tell me what i am doing wrong, or perhaps not in order because I keep getting this error while doing;
make install INSTALL_ROOT=/root/Release/php
This error keeps showing;
[root@SERVER php-src-php-7.0.2RC1]# make install INSTALL_ROOT=/root/Release/php
Installing PHP SAPI module: apache2handler
/usr/lib64/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool' libphp7.la /root/Release/php/usr/lib64/httpd/modules
/usr/lib64/apr-1/build/libtool --mode=install install libphp7.la /root/Release/php/usr/lib64/httpd/modules/
libtool: install: install .libs/libphp7.so /root/Release/php/usr/lib64/httpd/modules/libphp7.so
libtool: install: install .libs/libphp7.lai /root/Release/php/usr/lib64/httpd/modules/libphp7.la
libtool: install: warning: remember to run `libtool --finish /opt/php-src-php-7.0.2RC1/libs'
chmod 755 /root/Release/php/usr/lib64/httpd/modules/libphp7.so
apxs:Error: Config file /root/Release/php/etc/httpd/conf/httpd.conf not found.
make: *** [install-sapi] Error 1
Thank you everybody...