Solved

PHP breaks Apache on CentOS 6.5

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

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é.
Fine Tune your automatic Updates for Ubuntu / Debian
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

830 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