If Not True Then False

Install Apache/PHP 7.1.0 on Fedora 25/24, CentOS/RHEL 7.3/6.8 - Comment Page: 5

This guide shows howto install Apache HTTP Server (httpd) with PHP 7.1.0 and following modules on Fedora 25/24/23, CentOS 7.3/6.8 and Red Hat (RHEL) 7.3/6.8 systems. OPcache (php-opcache) – The Zend OPcache provides faster PHP execution through opcode caching and optimization. APCu (php-pecl-apcu) – APCu userland caching CLI (php-cli) – Command-line interface for PHP PEAR...
Categories:

258 Comments

Leave a Comment

Your email address will not be published. Required fields are marked *

Input your comment.
help

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Input your name.

Priyabrata

Dear JR
I followed the steps but got the error

[root@localhost conf.d]# service httpd restart
Restarting httpd (via systemctl): Job failed. See system logs and ‘systemctl status’ for details.
[FAILED]

[root@localhost conf.d]# systemctl status httpd.service
httpd.service – LSB: start and stop Apache HTTP Server
Loaded: loaded (/etc/rc.d/init.d/httpd)
Active: failed since Thu, 31 Jan 2013 20:04:28 +0530; 52s ago
Process: 22198 ExecStart=/etc/rc.d/init.d/httpd start (code=exited, status=1/FAILURE)
Main PID: 30487 (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/httpd.service

[root@localhost conf.d]# httpd -t
Syntax OK

[root@localhost conf.d]# cat /var/log/messages | grep httpd
Jan 31 20:03:43 localhost systemd[1]: httpd.service: control process exited, code=exited status=1
Jan 31 20:03:43 localhost systemd[1]: Unit httpd.service entered failed state.
Jan 31 20:04:28 localhost systemd[1]: httpd.service: control process exited, code=exited status=1
Jan 31 20:04:28 localhost systemd[1]: Unit httpd.service entered failed state.
Jan 31 20:05:44 localhost systemd[1]: httpd.service: control process exited, code=exited status=1
Jan 31 20:05:44 localhost systemd[1]: Unit httpd.service entered failed state.

Please help

reply Reply
JR

Hi Priyabrata,

Could you also post output of following commands:


cat /var/log/httpd/error_log

lsb_release -a

uname -a
reply Reply
Priyabrata

[root@localhost Test30Jan2013]# ll /var/log/httpd/
total 20
-rw-r–r–. 1 root root 0 Dec 11 2011 access_log
-rw-r–r–. 1 root root 1749 Dec 6 2011 access_log-20111211
-rw-r–r–. 1 root root 0 Jan 26 03:16 error_log
-rw-r–r–. 1 root root 1723 Dec 11 2011 error_log-20111211
-rw-r–r–. 1 root root 958 Jan 31 19:08 error_log-20130126
-rw-r–r–. 1 root root 0 Dec 6 2011 ssl_access_log
-rw-r–r–. 1 root root 0 Jan 26 03:16 ssl_error_log
-rw-r–r–. 1 root root 258 Dec 6 2011 ssl_error_log-20111211
-rw-r–r–. 1 root root 258 Jan 25 17:21 ssl_error_log-20130126
-rw-r–r–. 1 root root 0 Dec 6 2011 ssl_request_log

###############
cat /var/log/httpd/error_log: Empty file, nothing is written

################
[root@localhost Test30Jan2013]# lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch
Distributor ID: Fedora
Description: Fedora release 15 (Lovelock)
Release: 15
Codename: Lovelock

##################
[root@localhost Test30Jan2013]# uname -a
Linux localhost.localdomain 2.6.43.8-1.fc15.x86_64 #1 SMP Mon Jun 4 20:33:44 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

reply Reply
JR

Thanks, then use following to get older log entries:


cat /var/log/httpd/error_log*

And check also syntax errors:


httpd -t
reply Reply
Priyabrata

[root@localhost Test30Jan2013]# httpd -t
Syntax OK

########## Sorry for lengthy output ###########

[root@localhost Test30Jan2013]# cat /var/log/httpd/error_log*
[Tue Dec 06 14:48:39 2011] [notice] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Tue Dec 06 14:48:39 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Dec 06 14:48:39 2011] [notice] SSL FIPS mode disabled
[Tue Dec 06 14:48:39 2011] [notice] Digest: generating secret for digest authentication …
[Tue Dec 06 14:48:39 2011] [notice] Digest: done
[Tue Dec 06 14:48:39 2011] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Tue Dec 06 14:48:39 2011] [notice] mod_python: using mutex_directory /tmp
[Tue Dec 06 14:48:40 2011] [notice] SSL FIPS mode disabled
[Tue Dec 06 14:48:40 2011] [notice] Apache/2.2.21 (Unix) DAV/2 PHP/5.3.8 mod_python/3.3.1 Python/2.7.1 mod_ssl/2.2.21 OpenSSL/1.0.0e-fips mod_perl/2.0.4 Perl/v5.12.4 configured — resuming normal operations
[Tue Dec 06 14:48:53 2011] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/
[Tue Dec 06 14:48:53 2011] [error] [client ::1] File does not exist: /var/www/html/favicon.ico
[Tue Dec 06 14:48:53 2011] [error] [client ::1] File does not exist: /var/www/html/favicon.ico
[Tue Dec 06 14:51:49 2011] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/
[Tue Dec 06 14:52:29 2011] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/
[Tue Dec 06 14:52:36 2011] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/
[Sun Dec 11 03:38:03 2011] [notice] SIGHUP received. Attempting to restart
(98)Address already in use: make_sock: could not bind to address 172.16.49.47:80
no listening sockets available, shutting down
Unable to open logs
[Fri Jan 25 17:21:17 2013] [notice] SELinux policy enabled; httpd running as context unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[Fri Jan 25 17:21:17 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Jan 25 17:21:17 2013] [notice] SSL FIPS mode disabled
[Fri Jan 25 17:21:17 2013] [notice] Digest: generating secret for digest authentication …
[Fri Jan 25 17:21:17 2013] [notice] Digest: done
[Fri Jan 25 17:21:17 2013] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Fri Jan 25 17:21:17 2013] [notice] mod_python: using mutex_directory /tmp
[Fri Jan 25 17:21:17 2013] [notice] SSL FIPS mode disabled
[Fri Jan 25 17:21:18 2013] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.3.13 mod_python/3.3.1 Python/2.7.1 mod_ssl/2.2.22 OpenSSL/1.0.0j-fips mod_perl/2.0.4 Perl/v5.12.4 configured — resuming normal operations
[Thu Jan 31 19:08:55 2013] [notice] caught SIGTERM, shutting down

reply Reply
JR

Thanks Priyabrata,

First thing what I noticed is:
(98)Address already in use: make_sock: could not bind to address 172.16.49.47:80

Do you have some other server/service running on port 80?

reply Reply
Priyabrata

Dear JR

The problem was sorted out. Actually I had installed Apache latest version with –prefix option and where I have configured for 172.16.49.47:80. This new installation was conflicting with the default httpd conf file at /etc/httpd/conf/http.conf.

I deleted the newly installed apache, restarted the server. It worked fine now.

Dear JR, Thanks for your nice blog, time and ur patience. Really thanks :)

Now my next task is to configure mysql and php. In this regard if I may face any problem then reply u.

reply Reply
JR

Hi again Priyabrata,

Excellent to hear that you got it working! :)

And thanks for the compliments! You are very welcome! :)

Did you get mysql and php up and running?

reply Reply
Bruno Badiali

I installed apache on fedora 18 x86_64, but when I started the service I had some error on config files:


[root@localhost conf.d]# service httpd start
Redirecting to /bin/systemctl start httpd.service
Job for httpd.service failed. See ‘systemctl status httpd.service’ and ‘journalctl -xn’ for details.

[root@localhost conf.d]# systemctl status httpd.service
httpd.service – The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
Active: failed (Result: exit-code) since mer 2013-02-06 14:39:48 CET; 1min 55s ago
Process: 14515 ExecStop=/usr/sbin/httpd $OPTIONS -k graceful-stop (code=exited, status=1/FAILURE)
Process: 14513 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Status: “Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec”

feb 06 14:39:48 localhost.localdomain systemd[1]: Starting The Apache HTTP Server…
feb 06 14:39:48 localhost.localdomain httpd[14513]: httpd: Syntax error on line 351 of /etc/httpd/conf/httpd.conf: Syntax error on line 140 of /etc/httpd/conf.d/system-config-httpd.conf: /etc/httpd/conf.d/system-config-httpd.conf:146: was not closed.\n/etc/httpd/conf.d/system-config-httpd.conf:144: was not closed.\n/etc/httpd/conf.d/system-config-httpd.conf:142: was not closed.\n/etc/httpd/conf.d/system-config-httpd.conf:140: was not closed.
feb 06 14:39:48 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
feb 06 14:39:48 localhost.localdomain httpd[14515]: httpd: Syntax error on line 351 of /etc/httpd/conf/httpd.conf: Syntax error on line 140 of /etc/httpd/conf.d/system-config-httpd.conf: /etc/httpd/conf.d/system-config-httpd.conf:146: was not closed.\n/etc/httpd/conf.d/system-config-httpd.conf:144: was not closed.\n/etc/httpd/conf.d/system-config-httpd.conf:142: was not closed.\n/etc/httpd/conf.d/system-config-httpd.conf:140: was not closed.
feb 06 14:39:48 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
feb 06 14:39:48 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
feb 06 14:39:48 localhost.localdomain systemd[1]: Unit httpd.service entered failed state

Can you help me please?

reply Reply
JR

Hi Bruno,

Check this:

feb 06 14:39:48 localhost.localdomain httpd[14513]: httpd: Syntax error on line 351 of /etc/httpd/conf/httpd.conf: Syntax error on line 140 of /etc/httpd/conf.d/system-config-httpd.conf: /etc/httpd/conf.d/system-config-httpd.conf:146: was not closed.\n/etc/httpd/conf.d/system-config-httpd.conf:144: was not closed.\n/etc/httpd/conf.d/system-config-httpd.conf:142: was not closed.\n/etc/httpd/conf.d/system-config-httpd.conf:140: was not closed.

Looks like you have some syntax error on your httpd.conf file.

Try to run:


httpd -t

And fix error and then try start httpd again.

reply Reply
Bruno Badiali

Hi HR,
I tried, this is the output:


[root@localhost ~]# httpd
httpd: Syntax error on line 351 of /etc/httpd/conf/httpd.conf: Syntax error on line 137 of /etc/httpd/conf.d/system-config-httpd.conf: /etc/httpd/conf.d/system-config-httpd.conf:143: was not closed.\n/etc/httpd/conf.d/system-config-httpd.conf:141: was not closed.\n/etc/httpd/conf.d/system-config-httpd.conf:139: was not closed.\n/etc/httpd/conf.d/system-config-httpd.conf:137: was not closed.
[root@localhost ~]# httpd -t
httpd: Syntax error on line 351 of /etc/httpd/conf/httpd.conf: Syntax error on line 137 of /etc/httpd/conf.d/system-config-httpd.conf: /etc/httpd/conf.d/system-config-httpd.conf:143: was not closed.\n/etc/httpd/conf.d/system-config-httpd.conf:141: was not closed.\n/etc/httpd/conf.d/system-config-httpd.conf:139: was not closed.\n/etc/httpd/conf.d/system-config-httpd.conf:137: was not closed.
[root@localhost ~]# tail -20 /etc/httpd/conf.d/system-config-httpd.conf
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# Note that from this point forward you must specifically allow
# particular features to be enabled – so if something’s not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

Options FollowSymLinksAllowOverride None

Options Indexes Includes FollowSymLinksAllowOverride NoneAllow from allOrder allow,deny

Options Indexes MultiViewsAllowOverride NoneAllow from allOrder allow,deny

Options ExecCGIAllowOverride NoneAllow from allOrder allow,deny

[root@localhost ~]#

I don’t understand what kind of error is was not closed. so I don’t how to fix.
I tried to comment these lines and apache start without errors but doesn’t work.

reply Reply
Bruno Badiali

Sorry, the previous output is no readable becouse the characters < and > are recoded.
The error that I don’t understand is:

<Directory> is not closed.

The error lines are in /etc/httpd/conf.d/system-config-httpd.conf , and the error lines are thease:


<Directory “/”>
Options FollowSymLinksAllowOverride None</Directory>
<Directory “/var/www/html”>
Options Indexes Includes FollowSymLinksAllowOverride NoneAllow from allOrder allow,deny</Directory>
<Directory “/var/www/icons”>
Options Indexes MultiViewsAllowOverride NoneAllow from allOrder allow,deny</Directory>
<Directory “/var/www/cgi-bin”>
Options ExecCGIAllowOverride NoneAllow from allOrder allow,deny</Directory>

reply Reply
JR

Hi Bruno,

This conf looks good, but is there somewhere near this, some <directory> element which is not closed?

Could you paste all of your config files example to http://pastebin.com ?

reply Reply
JR

I checked your config and check following part:


# Virtual host Default Virtual Host
 	ServerSignature emailDirectoryIndex  index.php index.html index.htm index.shtmlLogLevel  warnHostNameLookups off

            
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories). 
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

        Options FollowSymLinksAllowOverride None

        Options Indexes Includes FollowSymLinksAllowOverride NoneAllow from allOrder allow,deny

        Options Indexes MultiViewsAllowOverride NoneAllow from allOrder allow,deny

        Options ExecCGIAllowOverride NoneAllow from allOrder allow,deny

It should look something like:


# Virtual host Default Virtual Host

 	ServerSignature email
 	DirectoryIndex  index.php index.html index.htm index.shtml
 	LogLevel  warn
 	HostNameLookups off


            
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories). 
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

        Options FollowSymLinks
 	AllowOverride None


        Options Indexes Includes FollowSymLinks
 	AllowOverride None
 	Allow from all
 	Order allow,deny


        Options Indexes MultiViews
 	AllowOverride None
 	Allow from all
 	Order allow,deny


        Options ExecCGI
 	AllowOverride None
 	Allow from all
 	Order allow,deny

So you are missing line breaks or have some problem with those.

reply Reply
Bruno Badiali

Thank you for your correction!
Now the service start, but doesn’t work.
The status of service is this:


[root@tron httpd]# service httpd status
Redirecting to /bin/systemctl status httpd.service
httpd.service – The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
Active: active (running) since mar 2013-02-19 10:31:36 CET; 4min 56s ago
Process: 2845 ExecStop=/usr/sbin/httpd $OPTIONS -k graceful-stop (code=exited, status=1/FAILURE)
Main PID: 3070 (httpd)
Status: “Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec”
CGroup: name=systemd:/system/httpd.service
├─3070 /usr/sbin/httpd -DFOREGROUND
├─3072 /usr/sbin/httpd -DFOREGROUND
├─3073 /usr/sbin/httpd -DFOREGROUND
├─3074 /usr/sbin/httpd -DFOREGROUND
├─3075 /usr/sbin/httpd -DFOREGROUND
├─3076 /usr/sbin/httpd -DFOREGROUND
├─3077 /usr/sbin/httpd -DFOREGROUND
├─3078 /usr/sbin/httpd -DFOREGROUND
└─3079 /usr/sbin/httpd -DFOREGROUND

feb 19 10:31:36 tron.domus systemd[1]: Started The Apache HTTP Server.

I found some messages in /var/log/httpd/error_log:


[root@tron httpd]# cat error_log
[Tue Feb 19 10:31:34.079365 2013] [core:notice] [pid 3070] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Tue Feb 19 10:31:34.093751 2013] [suexec:notice] [pid 3070] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Feb 19 10:31:35.024704 2013] [auth_digest:notice] [pid 3070] AH01757: generating secret for digest authentication …
[Tue Feb 19 10:31:36.000844 2013] [lbmethod_heartbeat:notice] [pid 3070] AH02282: No slotmem from mod_heartmonitor
[Tue Feb 19 10:31:36.508975 2013] [mpm_prefork:notice] [pid 3070] AH00163: Apache/2.4.3 (Fedora) PHP/5.4.11 configured — resuming normal operations
[Tue Feb 19 10:31:36.509008 2013] [core:notice] [pid 3070] AH00094: Command line: ‘/usr/sbin/httpd -D FOREGROUND’

What do you think about this?

reply Reply
JR

Try following (as root):


cd /etc/httpd/conf.modules.d

mv 00-proxy.conf 00-proxy.bak

service httpd restart
ToriHino

I had exactly this same problem with Fedora 18. Looks like the default system-config-httpd.conf file has a problem with missing line breaks??

reply Reply
Priyabrata

I have developed a web server using Apache,Php. I am very new to this field. Although I have developed the server but my concern is the secuirity. I am not sure whether I have developed a secured server or not? Kindly suggest me.

What my server does
———————–
I have set of files (about 80,000) stored in /var/www/pdb folder. User will give the name of file and I have written some R-scripts (about 10-15) which will parse that file and generates some output, which I have to give back to the user.

So I had separately kept All database files in /var/www/pdb, all my R-scripts in /var/www/SASMAT. My front-end webpage is /var/www/html/SASMAT.html. Upon input of filename and submit, the action is to call a Php script “upload.php” which fetch user inputs and calls R-script with the input as command line arguments. I have separated the Php script from R-script and kept under /var/www/cgi-bin

### Action of form submission is to call upload.php

### Php script calls R-script by passing $_POST[“pdbid”] as comamdn line args
$url=’/usr/bin/Rscript /var/www/SASMAT/pipeline.r ‘ . $_POST[“pdbid”];
exec($url,$x);

### What R-script does
1) Copies the filename ($_POST[“pdbid”]) from /var/www/pdb to /var/www/upload
2) Set the working directory to /var/www/upload
3) Parse the files and generates many outputs
4) Moves the output files from /var/www/upload back to /var/www/html so that I can give as output.

Summarizing each folder
————————-
1) My source files (appx 80000 files) : /var/www/pdb
2) My all R-scripts (appx 10-15 scripts): /var/www/SASMAT
3) My working directory: /var/www/upload where all parsing stuffs will go
4) My main output directory: /var/www/html

What I want
———–
1) User should not access to SASMAT, upload, cgi-bin, pdb.
2) User only have access to /var/www/html folder.

ll /var/www
drwxr-xr-x. 2 manas manas 4096 Feb 18 19:26 cgi-bin
drwxr-xr-x. 3 manas manas 4096 Oct 31 21:55 error
drwxr-xrwx. 3 manas manas 4096 Feb 19 17:44 html
drwxr-xr-x. 3 manas manas 4096 Feb 13 19:28 icons
drwxrwxrwx 2 apache apache 4096 Feb 19 14:17 pdb
drwxrwxr-x 2 manas manas 4096 Feb 13 19:29 plots
drwxrwxr-x 2 manas manas 4096 Feb 19 15:52 SASMAT
drwxrwxrwx 2 manas manas 4096 Feb 19 17:42 upload

Currently when user types http://www.example.com/cgi-bin/upload.php: It executes the upload.php which I dont want. I want to restrict the user to use the php scripts directly.

I am sorry for this lengthy post but I had to.

reply Reply
JR

Priyabrata,

First you should add to your upload.php some check that this request is post request.

Real thing what you can do is post some unique one time hash, which is generated from user data or something else, like timestamp+salt which is saved database and added to form.

This is just idea:
1. Generate hash and add it to db
2. Add this hash to form
3. Check hash (on upload.php) from $_POST that matches hash in db
4. Remove hash from db

Now when someone use your form, upload.php checks first that request is $_POST and then verify hash before doing anything. I think that this is secure enough for most cases. :)

reply Reply
Priyabrata

Dear JR
Thanks for nice suggestion. Apart from this as I mentioned how can I make the cgi-bin (All php scripts) not access by client.

Lets assume my server is http://myip.com/index.html
upon submit it calls upload.php
“”

When user view the source code of my index.html, he can easily see the form action i.e. “../cgi-bin/upload.php”.

Then by using this knowledge if he types the url http://myip.com/cgi-bin/upload.php, it executes the script.

Actually I have other php scripts in cgi-bin, for example clean.php which cleans all output files. If user types http://myip.com/cgi-bin/clean.php, it will clean my output files.

I want to restrict the direct access. Please give ur suggestion in this respect also.

reply Reply
JR

Hi Priyabrata,

You can restrict direct access using httpd conf file or .htaccess and deny access to cgi-bin or selected files, but then those files are accessible only from localhost or specific IP addresses, like:



    Order Deny,Allow 
    Allow from 127.0.0.1 192.168.0.1
    Deny from all

So then you can example call your scripts from localhost, but not from public Internet.

If you really want restrict the direct access, then your users can’t really use your scripts, even they use your form. So then you need another public script which calls example your upload.php and then situation is same, someone could use this script directly and do same thing. So if you want let your users use your scripts then you need something public anyways. And if you want public and protected scripts then you will need some more sophisticated logic than just restrict direct access.

reply Reply
Frank

When installing php from remi I keep on getting this error

Error: Package: php-gd-5.4.12-1.el6.remi.i686 (remi)
Requires: libt1.so.5

Running a 32bit rhel 6.3

Thanks for any pointers on where to go, want to get phpmyadmin running.

Frank

reply Reply
JR

Hi Frank,

Could you post output of following command:


yum list available |grep t1lib
reply Reply
Frank

Hi JR,

[root@rxxxx ~]# yum list available |grep t1lib
[root@rxxxx ~]#

nothing comes out…
Thanks,
F.

reply Reply
Frank

So I enabled the subscription and after installing every thing, I now get: 403 Forbidden You don’t have permission to access /phpmyadmin/ on this server,
was the install not supposed to also set phpmyadmin to run?
Thanks,
F.

reply Reply
Frank

Hi JR,

Thanks for the help, the issue was in phpMyAdmin.conf, I commented out of

Require local
#Order Deny,Allow
#Deny from All
Allow from 127.0.0.1
Allow from ::1

Frank

reply Reply
Keys2IT

Hello,

I’m getting in trouble when trying to install the following modules :
yum –enablerepo=remi,remi-test install php-pecl-memcached php-mcrypt

I receive message from yum complaining about compatibilities :
–> Finished Dependency Resolution
Error: Package: php-pecl-memcached-1.0.0-1.el6.x86_64 (epel)
Requires: php(api) = 20090626
Installed: php-common-5.4.12-1.el6.remi.x86_64 (@remi)
php(api) = 20100412-x86-64
Available: php-common-5.3.3-3.el6_2.8.x86_64 (base)
php(api) = 20090626
Available: php-common-5.3.3-14.el6_3.x86_64 (updates)
php(api) = 20090626
Available: php-common-5.4.11-1.el6.remi.x86_64 (remi)
php(api) = 20100412-x86-64
Error: Package: php-pecl-memcached-1.0.0-1.el6.x86_64 (epel)
Requires: php(zend-abi) = 20090626
Installed: php-common-5.4.12-1.el6.remi.x86_64 (@remi)
php(zend-abi) = 20100525-x86-64
Available: php-common-5.3.3-3.el6_2.8.x86_64 (base)
php(zend-abi) = 20090626
Available: php-common-5.3.3-14.el6_3.x86_64 (updates)
php(zend-abi) = 20090626
Available: php-common-5.4.11-1.el6.remi.x86_64 (remi)
php(zend-abi) = 20100525-x86-64
Error: Package: php-mcrypt-5.3.3-1.el6.x86_64 (epel)
Requires: php-api = 20090626
Installed: php-common-5.4.12-1.el6.remi.x86_64 (@remi)
php-api = 20100412-x86-64
Available: php-common-5.3.3-3.el6_2.8.x86_64 (base)
php-api = 20090626
Available: php-common-5.3.3-14.el6_3.x86_64 (updates)
php-api = 20090626
Available: php-common-5.4.11-1.el6.remi.x86_64 (remi)
php-api = 20100412-x86-64

Sorry, but despite googling this, no result or ways to resolve this !

Any idea ?

Regards,

Laurent

reply Reply
JR

Try following command instead:


yum --enablerepo=remi,remi-test --disablerepo=epel install php-pecl-memcached php-mcrypt

If it’s not working, could you post error messages then and output of following command:


rpm -qa php\*
reply Reply
JR

Hi Padraic,

You can use of course some other repos too. If you use Fedora 19, then you can use updates repo, but many times Remi repo builds arrives earlier than Fedora 19 builds. Anyway you need some external repo with RHEL / CentOS / < Fedora 19.

reply Reply
Jonathan Coetzee

Installed PHP 5.5 on a CentOS 6.3 box. When I try start httpd with “service httpd start” it fails, however if I call “httpd” directly it starts fine. Any idea what could be causing this?

reply Reply
JR

Hi Jonathan,

Could you check httpd error log, if there is little bit more information why it’s fails?

reply Reply
Nurul Imam

I have IIS & Xampp with different port
IIS :80 & XAMPP :8080
I’m cannot access localhost:8080 rediect to IIS localhost:80

reply Reply
Jennifer

I followed all the steps for installing php but I get a blank test page. I am running Fedora 19. Please let me know what further information you need in order to help. Thanks.

reply Reply
Lautaro

I reloaded my VPS and followed this guide again and it installed php 5.5.6 and there seems to me a problem with it because i will get this in my error log like every 10 seconds and apache would not work:

[error] (12)Cannot allocate memory: fork: Unable to fork new process

is there any way to install php 5.5.5 and not 5.5.6? I have another 2 VPS that i configured using this guide like a week ago when the latest php version was 5.5.5 and they work just fine.

reply Reply
JR

Hi Lautaro,

PHP 5.5.5 is still available on Remi repository, so you can downgrade your PHP, something like:


yum --enablerepo=remi,remi-php55 downgrade php

## OR ##

yum --enablerepo=remi,remi-php55 downgrade php\*

Check more info from Yum Downgrade guide.

Please let me know if you have any problems?

reply Reply
Robert

3.11.7-100 fedora 18
Everything works great but I’m having some trouble at iptables configure
I had to create te file
nano -w /etc/sysconfig/iptables
Add following INPUT rule:
-A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
then

# systemctl restart iptables
Job for iptables.service failed. See 'systemctl status iptables.service' and 'journalctl -xn' for details.

I get this output

# systemctl status iptables
iptables.service - IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled)
Active: failed (Result: exit-code) since mié 2013-11-20 12:19:05 VET; 1min 3s ago
Process: 10636 ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=1/FAILURE)

nov 20 12:19:05 localhost.localdomain systemd[1]: Starting IPv4 firewall with iptables...
nov 20 12:19:05 localhost.localdomain iptables.init[10636]: iptables: Aplicando reglas del cortafuegos:iptables-restore: line 1 failed
nov 20 12:19:05 localhost.localdomain iptables.init[10636]: [8B blob data]
nov 20 12:19:05 localhost.localdomain systemd[1]: iptables.service: main process exited, code=exited, status=1/FAILURE
nov 20 12:19:05 localhost.localdomain systemd[1]: Failed to start IPv4 firewall with iptables.
nov 20 12:19:05 localhost.localdomain systemd[1]: Unit iptables.service entered failed state.

reply Reply
JR

Hi Robert,

Try following instead of adding that row to /etc/sysconfig/iptables:


firewall-cmd --permanent --zone=public --add-service=http

firewall-cmd --permanent --zone=public --add --port=80/tcp
reply Reply
Richardd

It worked like a charm! :D Thank you VERY much!

Now, i will follow your website :)

Bye from
Portugal

reply Reply
Richardd

Hi

I need to install php-devel

I run the command: sudo yum search –disablerepo=* –enablerepo=remi,remi.php55, remi-test php-devel
that found “php-devel.x86_64 : Files needed for building PHP extension”. BUT, when i try to install, i get this error:

sudo yum install php-devel.x86_64
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirror.trueinter.net
* epel: ftp.fau.de
* extras: mirror.trueinter.net
* updates: mirror.trueinter.net
* webtatic: us-east.repo.webtatic.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-devel.x86_64 0:5.3.3-27.el6_5 will be installed
--> Processing Dependency: php(x86-64) = 5.3.3-27.el6_5 for package: php-devel-5.3.3-27.el6_5.x86_64
--> Processing Dependency: automake for package: php-devel-5.3.3-27.el6_5.x86_64
--> Processing Dependency: autoconf for package: php-devel-5.3.3-27.el6_5.x86_64
--> Running transaction check
---> Package autoconf.noarch 0:2.63-5.1.el6 will be installed
---> Package automake.noarch 0:1.11.1-4.el6 will be installed
---> Package php-devel.x86_64 0:5.3.3-27.el6_5 will be installed
--> Processing Dependency: php(x86-64) = 5.3.3-27.el6_5 for package: php-devel-5.3.3-27.el6_5.x86_64
--> Finished Dependency Resolution
Error: Package: php-devel-5.3.3-27.el6_5.x86_64 (updates)
Requires: php(x86-64) = 5.3.3-27.el6_5
Installed: php-5.5.7-1.el6.remi.x86_64 (@remi-php55)
php(x86-64) = 5.5.7-1.el6.remi
Available: php-5.3.3-26.el6.x86_64 (base)
php(x86-64) = 5.3.3-26.el6
Available: php-5.3.3-27.el6_5.x86_64 (updates)
php(x86-64) = 5.3.3-27.el6_5
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

What can i do?

reply Reply
JR

Hi Richardd,

Try simply:


yum --enablerepo=remi,remi-php55 install php-devel
reply Reply