Solved

PHP breaks Apache on CentOS 6.5

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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é.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now