Solved

PHP breaks Apache on CentOS 6.5

Posted on 2014-02-16
2
1,085 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

738 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