I no longer consider myself a Drupal novice, and am a HUGE drush fan. Today I ran into a really interesting issue that I had never come across before.
I was asked to install a new Drupal site on a 1and1 VPS instance. First thing I always do is make sure PHP is installed, find where the websites are to be installed (or are already installed), make sure I can connect to MySql. I then setup my new site directory, install drush if it does not exist yet, download the latest Drupal install, and get started. I am not a fan of the Plesk control panel, so I don't set it up initially (or ever if I can avoid it). On a 1and1 VPS server, sites are installed at /var/www/vhosts/default/htdocs. I also found out that 1and1 VPS mysql login uses admin, rather than root, with the inital root password (unless its already been changed, of course).
I went to /var/www/vhosts/default/htdocs and wget drush, and untarred the package. I tried a 'drush dl' and got the message that the command line version of PHP was too old. Indeed it was, drush needs at least PHP 5.2.x, where as default CentOS yum package only has PHP 5.1.x. I was able to add a new repository that included PHP 5.2.x.
# vi /etc/yum.repos.d/utterramblings.repo
Add the following lines:
[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
Then run:
# yum info php
to make sure PHP 5.2.x is listed in the available packages. If so, run:
# yum update php
After running this, I received a message about PHP being in safe-mode. To solve this I had to edit the /etc/php.ini file and set safe_mode = Off, then restart apache.
After that I was able to download Drupal using drush, create the new database to mysql, and configure my new Drupal installation. However, after creating my /sites/all/modules/contrib file and downloading the contrib modules I wanted, nothing was showing up in the modules list. After searching around Google I came across a old post on drupal.org referring to safe_mode being On causing this issue. Upon further investigation I found that while global safe_mode was indeed set to Off, the local version was set to On. I found that in the vhosts configuration file for the /var/www/vhosts/default directory, safe_mode was specifically set to On. After editing those to off, and again restarting apache the modules then showed up. The file that I edited to fix this was: /etc/httpd/conf.d/zz010_psa_httpd.conf.
Add new comment