LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-23-2014, 04:35 AM   #1
praneethdamera
LQ Newbie
 
Registered: Dec 2013
Posts: 15

Rep: Reputation: Disabled
Smile HTTPD & PHP & MySQL Installation


hi,

I have installed in my fedora 19 httpd, mysql(mariadb)and it worked nicely but when i have installed php from yum, after that my httpd server is not starting but when i remove this package(php) again i can use my httpd very well what might be the problem

below error im getting when i start httpd after installation.
Redirecting to /bin/systemctl start httpd.service
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
 
Old 01-23-2014, 05:14 AM   #2
lpwevers
Member
 
Registered: Apr 2005
Location: The Netherlands
Distribution: SuSE, CentOS
Posts: 170

Rep: Reputation: 20
Hi Praneeth

Can you please also post the output of the suggested commands:
Code:
systemctl status httpd.service
and
Code:
journalctl -xn
Louis
 
Old 01-23-2014, 06:01 AM   #3
praneethdamera
LQ Newbie
 
Registered: Dec 2013
Posts: 15

Original Poster
Rep: Reputation: Disabled
---

Last edited by praneethdamera; 01-23-2014 at 06:04 AM.
 
Old 01-23-2014, 06:03 AM   #4
praneethdamera
LQ Newbie
 
Registered: Dec 2013
Posts: 15

Original Poster
Rep: Reputation: Disabled
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 Thu 2014-01-23 17:32:23 IST; 15s ago
Process: 1591 ExecStop=/usr/sbin/httpd $OPTIONS -k graceful-stop (code=exited, status=1/FAILURE)
Process: 1589 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"

Jan 23 17:32:23 localhost.localdomain httpd[1589]: httpd: Syntax error on line 56 of /etc/httpd/...nce
Jan 23 17:32:23 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exite...URE
Jan 23 17:32:23 localhost.localdomain httpd[1591]: httpd: Syntax error on line 56 of /etc/httpd/...nce
Jan 23 17:32:23 localhost.localdomain systemd[1]: httpd.service: control process exited, code=ex...s=1
Jan 23 17:32:23 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
Jan 23 17:32:23 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.




--------------------------------------------------------------------------------------------
journalctl -xn




-- Logs begin at Wed 2007-02-21 20:14:53 IST, end at Thu 2014-01-23 17:32:23 IST. --
Jan 23 17:32:23 localhost.localdomain systemd[1]: httpd.service stopping timed out. Killing.
Jan 23 17:32:23 localhost.localdomain systemd[1]: httpd.service: main process exited, code=killed, sta
Jan 23 17:32:23 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
Jan 23 17:32:23 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman.../systemd-devel
--
-- Unit httpd.service has begun starting up.
Jan 23 17:32:23 localhost.localdomain httpd[1589]: httpd: Syntax error on line 56 of /etc/httpd/conf/h
Jan 23 17:32:23 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, sta
Jan 23 17:32:23 localhost.localdomain httpd[1591]: httpd: Syntax error on line 56 of /etc/httpd/conf/h
Jan 23 17:32:23 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited s
Jan 23 17:32:23 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman.../systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Soft...28ba40df7e9d02
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Jan 23 17:32:23 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
 
Old 01-23-2014, 06:34 AM   #5
lpwevers
Member
 
Registered: Apr 2005
Location: The Netherlands
Distribution: SuSE, CentOS
Posts: 170

Rep: Reputation: 20
Well, there you go:
Code:
Jan 23 17:32:23 localhost.localdomain httpd[1589]: httpd: Syntax error on line 56 of /etc/httpd/...nce
In your httpd.conf (most likely /etc/httpd/conf/httpd.conf) there's a syntax error on line 56. Can you please check in there? Post line 56 (and the surrounding ones) if you don't see what's wrong.

Louis
 
Old 01-23-2014, 07:05 AM   #6
praneethdamera
LQ Newbie
 
Registered: Dec 2013
Posts: 15

Original Poster
Rep: Reputation: Disabled
56 line :

Include conf.modules.d/*.conf

-------------

I have tried manual installation also in that when i update this file server stops ..

i used the steps from.

http://www.thegeekstuff.com/2008/07/...urce-on-linux/

Last edited by praneethdamera; 01-23-2014 at 07:08 AM.
 
Old 01-23-2014, 07:38 AM   #7
lpwevers
Member
 
Registered: Apr 2005
Location: The Netherlands
Distribution: SuSE, CentOS
Posts: 170

Rep: Reputation: 20
Well, the line Include conf.modules.d/*.conf should be OK, assuming that conf.modules.d exists. So maybe it's an error from one of the included files. Can you post the error log from your http server? Hopefully it has more details.

Louis
 
Old 01-23-2014, 09:32 AM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187
Hmmm... the answer is staring you in the face. Do you really need to petition "the Internet at-large" to figure this problem out for you? If you're stumped, seek help from one of your colleagues and/or your supervisor. But is it really so hard to make an educated guess as to where the problem might be, and what it might be? Try a little harder . . . You need the practice.
 
Old 01-25-2014, 04:40 AM   #9
praneethdamera
LQ Newbie
 
Registered: Dec 2013
Posts: 15

Original Poster
Rep: Reputation: Disabled
dude im new to linux and not able to figure out what the file system in this is and where i can fingure or where i shouldnot touch thats why im not able to check each and every files in this and waiting searching for solutions.

can u tell me what these folders are meant to ie what data will/&should be there and how it is done etc wheteher i can fingure in that folder or not.


boot etc lib media opt root sbin sys usr www
bin dev home lost+found mnt proc run srv tmp var

and i want to clear you all that im not having any experienced collegue or supervisor as im only single person trying to learn linux and trying to make websites, as im intrested in web designing in it.

presently im working in an enterprise where i use windows mostly and trying to convert to linux me and my college two of us just trying to shift to this platform.
 
Old 01-25-2014, 05:13 AM   #10
lpwevers
Member
 
Registered: Apr 2005
Location: The Netherlands
Distribution: SuSE, CentOS
Posts: 170

Rep: Reputation: 20
Hi,

Well, I asked, for line 56 and the surrounding lines. That may help a lot more. The error can be at another line, but it may just be reported there. And since it's your include for conf.d, just post whatever is in there as well. (That is the contents of the files there)

Louis
 
Old 01-25-2014, 09:28 PM   #11
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
Try using IncludeOptional. In apache 2.4 Include will give an error if there are no matching wildcard files in the given include path.
 
Old 01-26-2014, 10:13 PM   #12
praneethdamera
LQ Newbie
 
Registered: Dec 2013
Posts: 15

Original Poster
Rep: Reputation: Disabled
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
# with ServerRoot set to '/www' will be interpreted by the
# server as '/www/log/access_log', where as '/log/access_log' will be
# interpreted as '/log/access_log'.

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path. If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used. If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
ServerRoot "/etc/httpd"

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
Include conf.modules.d/*.conf

#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User apache
Group apache

# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. admin@your-domain.com
#
ServerAdmin root@localhost

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80

#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
AllowOverride none
Require all denied
</Directory>

#
# 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.
#

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"

#
# Relax access to content within /var/www.
#
<Directory "/var/www">
AllowOverride None
# Allow open access:
Require all granted
</Directory>

# Further relax access to the default document root:
<Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None

#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ".ht*">
Require all denied
</Files>

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog "logs/error_log"

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common

<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>

#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
#CustomLog "logs/access_log" common

#
# If you prefer a logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
CustomLog "logs/access_log" combined
</IfModule>

<IfModule alias_module>
#
# Redirect: Allows you to tell clients about documents that used to
# exist in your server's namespace, but do not anymore. The client
# will make a new request for the document at its new location.
# Example:
# Redirect permanent /foo http://www.example.com/bar

#
# Alias: Maps web paths into filesystem paths and is used to
# access content that does not live under the DocumentRoot.
# Example:
# Alias /webpath /full/filesystem/path
#
# If you include a trailing / on /webpath then the server will
# require it to be present in the URL. You will also likely
# need to provide a <Directory> section to allow access to
# the filesystem path.

#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the target directory are treated as applications and
# run by the server when requested rather than as documents sent to the
# client. The same rules about trailing "/" apply to ScriptAlias
# directives as to Alias.
#
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

</IfModule>

#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>

<IfModule mime_module>
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig /etc/mime.types

#
# AddType allows you to add to or override the MIME configuration
# file specified in TypesConfig for specific file types.
#
#AddType application/x-gzip .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi

# For type maps (negotiated resources):
#AddHandler type-map var

#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>

#
# Specify a default charset for all content served; this enables
# interpretation of all content as UTF-8 by default. To use the
# default browser choice (ISO-8859-1), or to allow the META tags
# in HTML content to override this choice, comment out this
# directive:
#
AddDefaultCharset UTF-8

<IfModule mime_magic_module>
#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type. The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
MIMEMagicFile conf/magic
</IfModule>

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall may be used to deliver
# files. This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
# Defaults if commented: EnableMMAP On, EnableSendfile Off
#
#EnableMMAP off
EnableSendfile on

# Supplemental configuration
#
# Load config files in the "/etc/httpd/conf.d" directory, if any.
IncludeOptional conf.d/*.conf

##################################################


can any one tell me when i search for any installation all say it might me in /etc/.. or /usr/..

etc..

why they are installing in different locations when i use same yum to install a s/w.

 
Old 01-26-2014, 10:29 PM   #13
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
Quote:
Include conf.modules.d/*.conf
There isn't any error in syntax here but the error could be because the conf files that line is referring too aren't at that location, check again for dir being present.
NOTE: i cant see you followed the link you posted in one of your above comments.
 
Old 01-27-2014, 09:34 PM   #14
praneethdamera
LQ Newbie
 
Registered: Dec 2013
Posts: 15

Original Poster
Rep: Reputation: Disabled
can you tell me how can i check include path for conf whether all files are there or not as it is given * that means all files & here i have

00-base.conf 00-dav.conf 00-lua.conf 00-mpm.conf 00-proxy.conf 00-systemd.conf 01-cgi.conf


files can you tell me if any other files also must be there in this list.

Can any one tell me the installation steps clearly for installing
1. Httpd Server (i hve done it and working nice till php install)
2. PHP
3. MySQL (this is also done but this shows it is maria DB does it make any difference as when i executed my sql file in this it says check the manual, i have cleared that error by rewriting the code in Caps and removing varchar2 to varchar)


and if any web developer is available can you suggest me any PHP API to use for connecting to Excel Sheet (ie to Read Write Append).

Last edited by praneethdamera; 01-27-2014 at 09:38 PM. Reason: updating some info
 
Old 01-28-2014, 02:07 AM   #15
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
in that case can you give me the full error shown in logs:

Quote:
Jan 23 17:32:23 localhost.localdomain httpd[1589]: httpd: Syntax error on line 56 of /etc/httpd/conf/h
Jan 23 17:32:23 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, sta
Jan 23 17:32:23 localhost.localdomain httpd[1591]: httpd: Syntax error on line 56 of /etc/httpd/conf/h
that has whats missing in.

EDIT:
with some search i found thi could be because of OS upgrades..and openssl package..
Can you try running

Code:
yum update openssl
and then restart your machine.

Last edited by SAbhi; 01-28-2014 at 02:11 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
httpd,php & mysql paruhang Linux - Newbie 17 10-20-2011 05:50 PM
PHP 5.1.6 & MySQL 5.0.34 connectivity test, php-mysql & libmysqlclient_15 kapshure Linux - Newbie 1 08-05-2010 07:11 PM
Slackware guide for AMP Apache MySQL & PHP xushi Slackware 35 05-11-2006 11:18 AM
mysql 4.1.12 installation & PHP 5 tuxrules Slackware 2 06-23-2005 10:58 PM
From RedHat9 to FreeBSD (Apache 2 & Mysql & PHP 4) guardian653 *BSD 5 12-11-2003 05:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration