Solved

PHP breaks Apache on CentOS 6.5

Posted on 2014-02-16
2
1,100 Views
Last Modified: 2014-02-17
I have finished configuring a fresh Joomla installation on a CentOS 6.5 server.
I then proceeded to upgrade Joomla to the latest version from the admin panel.
The upgrade produced an error about not being able to copy robots.txt.dist and stopped.
As I could no longer access the web admin interface I proceeded with restarting the httpd service.
After I had done this, upon trying to access Joomla I got a blank page.
I then deleted all the Joomla files and made a fresh copy from the downloaded archive from the Joomla webpage, but upon trying to access the web configuration I got a blank page again.
I then removed Joomla completely and reinstalled php and php-mysql with yum.
That didn't help so i removed both php packages completely.
After doing that I got the default apache webpage loading again.
I then installed php and php-mysql again, after which I immediately get a blank page when trying to access the homepage or a test script index.php.

How could I remove all traces of php config and do a fresh install or should I do something else?
0
Comment
Question by:proteus-IV
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
YoavZ earned 500 total points
ID: 39863499
More information is needed, mostly log files.

Please attach a copy of Apache access logs / error logs - most probably located at /var/lib/httpd

Provide us with the output of `httpd -M`.

If re-installing the server is a quick possibility (in case of cloud server) I suggest installing the server and running the following:

yum -y update
yum install httpd mysql mysql-server php php-mysql
chkconfig httpd on
chkconfig mysqld on
/usr/bin/mysql_secure_installation
service httpd restart
service mysqld restart

The following commands will get you up and running in 5 minutes of setup on a clean CentOS 6 installation.

Although I know that common CMS systems have RPM packages available, I strongly suggest against using them.
Installing Wordpress is as easy as:
cd /var/www/html
wget http://wordpress.org/latest.tar.gz
tar xzvf latest.tar.gz

And you are done!
0
 

Author Closing Comment

by:proteus-IV
ID: 39864117
I checked the apache error_log and found out that it is mentioning "open_basedir" and stating that it cannot access it.
I then proceeded to edit php.ini and I commented out "open_basedir = /tmp".
After that I restarted httpd and php scripts started displaying in the browser.

Thanks for your help.
0

Featured Post

Database Solutions Engineer FAQs

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller single-server environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will giveā€¦
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
The viewer will learn how to dynamically set the form action using jQuery.

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question