LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-12-2011, 05:52 AM   #1
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
WordPress requires that your web server is running PHP error ..


WordPress
Error: PHP is not running

WordPress requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.

I Had installed php by
PHP
#cd /opt/apps/apache/src
#gzip -d /opt/apps/softwares/php-5.2.13.tar.gz
#tar -xvf /opt/apps/softwares/php-5.2.13.tar
#./configure --with-apxs2=/usr/sbin/apxs --with-config-file-
path=/etc/httpd/conf/php.conf --with-zlib --with-
mysqli=/usr/bin/mysql_config
#make
#make install
[root@localhost ~]# ps uax | grep php
root 16177 0.0 0.0 3920 696 pts/5 S+ 16:15 0:00 grep php
php is listening but still im getting the following eror


im configuring wordpress


#yum install mysql-server httpd nano php php-mysql
# chkconfig httpd on
# chkconfig mysqld on
# service mysqld start
# service httpd start
Create the Database

# mysqladmin create wordpress
# mysql
mysql> GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY 'please+use+a+strong+password';
mysql> FLUSH PRIVILEGES;
mysql> quit
Download and Install WordPress

# cd /var/www/
# mkdir wordpress
# cd wordpress
# curl -O http://wordpress.org/latest.tar.gz
# tar xvfz latest.tar.gz
# rm latest.tar.gz
# mv wordpress/ public
# mkdir logs public/wp-content/uploads public/wp-content/cache
# chown apache:apache logs public/wp-content/uploads public/wp-content/cache
# cd public/
Configure WordPress

Create the WordPress config file outside web root:

# mv wp-config-sample.php ../wp-config.php
# curl https://api.wordpress.org/secret-key/1.1/salt/

Copy the output to your clipboard before editing wp-config.php.

# nano ../wp-config.php

define('DB_NAME', 'wordpress');
define('DB_USER', 'wordpress');
define('DB_PASSWORD', 'enter+the+strong+password+you+defined');
define('DB_HOST', 'localhost');



define('AUTH_KEY', 'pasted from clipboard');
define('SECURE_AUTH_KEY', 'pasted from clipboard');
define('LOGGED_IN_KEY', 'pasted from clipboard');
define('NONCE_KEY', 'pasted from clipboard');
define('AUTH_SALT', 'pasted from clipboard');
define('SECURE_AUTH_SALT', 'pasted from clipboard');
define('LOGGED_IN_SALT', 'pasted from clipboard');
define('NONCE_SALT', 'pasted from clipboard');

Configure Apache

# nano /etc/httpd/conf.d/wordpress.conf

NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/wordpress/public
ServerName dummy-host.example.com
ErrorLog /var/www/wordpress/logs/error_log
CustomLog /var/www/wordpress/logs/access_log common
<Directory /var/www/wordpress/public/wp-content>
Options FollowSymLinks # for pretty permalink support
RemoveHandler .php
RemoveType text/html .php
</Directory>
</VirtualHost>

Last edited by jsaravana87; 08-12-2011 at 08:05 AM.
 
Old 08-12-2011, 06:03 AM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
If you don't need any additional parameters, have you tried installing php from centos repositories?

Additionally, you might want to make sure php is enabled in httpd:

Uncomment the following line from the apache config file
Code:
Include /etc/httpd/mod_php.conf
and add 'index.php' to the following line in the apache config file.

Code:
DirectoryIndex index.html
so that it looks as follows:

Code:
DirectoryIndex index.html index.php
Btw, there are lots of tutorials on setting up LAMP on CentOS.
 
Old 08-12-2011, 09:19 AM   #3
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Also, in your web directory create a small file info.php and put in it:
Code:
<?php
phpinfo();
?>
and then open http://your.domain.blah/info.php and see what happens, you should get a rather nice display of information about your PHP installation. If you don't then it's not installed properly.

Also check your httpd config, the "RemoveHandler .php" could be causing apache to NOT handle .php files correctly.

Last edited by TenTenths; 08-12-2011 at 09:20 AM.
 
Old 08-12-2011, 09:52 PM   #4
albie17
Member
 
Registered: Jul 2010
Location: District 9
Distribution: OpenSuse, Fedora, CentOS, Ubuntu, RHEL
Posts: 31

Rep: Reputation: 0
Try reinstalling everything or try the guide below.

http://www.howtoforge.com/perfect-se...64-ispconfig-3

Cheers!
 
Old 08-13-2011, 07:36 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
It sounds as if the php and the other webserver components don't know where to find each other.

I know that when I set up a LAMPP server manually, the installation command for php had to include arguments to tell the php how to communicate with the other components. Of course, I found this out the hard way.

Here's an example:

http://www.web-tech-india.com/articl...ng_php_apache/
 
  


Reply



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
Site error: the file /var/www/hotel/index.php requires the ionCube PHP Loader ioncube muba Linux - Software 1 06-03-2010 10:38 AM
wordpress not starting properly, install.php error cormack Linux - Server 4 01-24-2010 01:54 PM
WordPress Blogging Server running Slow for what reason? helptonewbie Linux - Server 5 05-28-2009 10:17 AM
Running PHP with PCNTL on a Web Server apfritts Linux - Server 0 07-16-2007 09:06 AM
Website CMS without running Web Server, mySQL, PHP etc. derddera Linux - Software 1 08-15-2004 01:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:24 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