Sabayon : Update (PHP vs Drupal)

Discussions Regarding Software

Moderator: Moderators

Sabayon : Update (PHP vs Drupal)

Postby B3rtm3n » Wed Oct 24, 2012 4:59

Last night there was an update of php. After I installed the update I was unable to boot Drupal.

I go to http://localhost/drupal7/ I get the following message:

    <?php

    /**
    * @file
    * The PHP page that serves all page requests on a Drupal installation.
    *
    * The routines here dispatch control to the appropriate handler, which then
    * prints the appropriate page.
    *
    * All Drupal code is released under the GNU General Public License.
    * See COPYRIGHT.txt and LICENSE.txt.
    */

    /**
    * Root directory of Drupal installation.
    */
    define('DRUPAL_ROOT', getcwd());

    require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
    drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
    menu_execute_active_handler();

Does anyone know how I can solve this?

ps. just discovered that the login to phpmyadmin (http://localhost/phpmyadmin/) does not work too.
Last edited by B3rtm3n on Sun Oct 28, 2012 4:29, edited 1 time in total.
B3rtm3n
Growing Hen
 
Posts: 140
Joined: Fri Apr 13, 2012 2:53

Re: Drupal 7: Update PHP

Postby cichys » Wed Oct 24, 2012 7:59

Chehck your Apache configuration in /etc/conf.d/apache2 if you have -D PHP5 in APACHE2_OPTS

APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST-D SUEXEC -D LANGUAGE -D PHP5"

The update overwrites your custom settings.
User avatar
cichys
Young Hen
 
Posts: 21
Joined: Tue Sep 04, 2012 12:42
Location: Italy

Re: Drupal 7: Update PHP

Postby B3rtm3n » Wed Oct 24, 2012 12:44

Thanks for you help!!

Indeed this line went missing after the update, however when trying to stop apache or restart I get following message:

    /etc/init.d/../conf.d/apache2: line 76: unexpected EOF while looking for matching `"'
    /etc/init.d/../conf.d/apache2: line 77: syntax error: unexpected end of file

Do you know what this could mean?
B3rtm3n
Growing Hen
 
Posts: 140
Joined: Fri Apr 13, 2012 2:53

Re: Drupal 7: Update PHP

Postby cichys » Wed Oct 24, 2012 13:37

Syntax error on that line
Rewrite the quotation marks ", don't do copy and paste

Anyway is strange you don't have APACHE2_OPTS
The default value should be
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST-D SUEXEC -D LANGUAGE"
User avatar
cichys
Young Hen
 
Posts: 21
Joined: Tue Sep 04, 2012 12:42
Location: Italy

APACHE

Postby B3rtm3n » Thu Oct 25, 2012 5:28

I solved the error it kept giving. ( als so used this guide)

I copied your line but it contains an error SSL_DEFAULT_VHOST-D SUEXEC should read SSL_DEFAULT_VHOST -D SUEXEC (an additonal space is required between VHOST -D)

About the quotation marks, this is how it was shown in terminal.

I removed Apache completely and did a fresh install:

Code: Select all
equo install apache


followed by

Code: Select all
nano /etc/conf.d/apache2


and I added:

    APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D SUEXEC -D LANGUAGE -D USERDIR -D PHP5"

If you want to allow users to have their own webpages ( -D USERDIR has to be added in the line above):

Code: Select all
echo "www-servers/apache userdir" >> /etc/portage/package.use emerge apache


then

Code: Select all
nano /etc/apache2/modules.d/00_mod_userdir.conf


and added

    UserDir public_htmlUserDir disabledUserDir enabled user1 user2 root

and did

Code: Select all
rc-update add apache2 default


followed by

Code: Select all
/etc/init.d/apache2 start


now it gives following message:

    Starting apache2 ...
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

I hope this is the correct procedure on Gentoo/Sabayon, I did:

Code: Select all
nano /etc/apache2/httpd.conf


and added the words: ServerName localhost

to solve this issue and Apache starts with no error

When trying to log on to Drupal I still get the message mentioned in my first post:

I will try to do a new install of php and see what it will give.
Last edited by B3rtm3n on Sun Oct 28, 2012 4:47, edited 2 times in total.
B3rtm3n
Growing Hen
 
Posts: 140
Joined: Fri Apr 13, 2012 2:53

PHP

Postby B3rtm3n » Sun Oct 28, 2012 4:27

Ok, to my shame I just noticed that PHP was NOT installed???

I do not know what happened but apparently the 'update' removed PHP so I had to install PHP again.

Code: Select all
equo install php


The config file is located at: /etc/apache2/modules.d/70_mod_php5.conf

After editing this file you have to do

Code: Select all
/etc/init.d/php-fpm restart


followed by

Code: Select all
/etc/init.d/apache2 restart


Apparently some settings are not correct as http://localhost/drupal7/ gives the webpages but not the login to drupal it self.

I doubt this is because of the settings of PHP.
B3rtm3n
Growing Hen
 
Posts: 140
Joined: Fri Apr 13, 2012 2:53

PHPMYADMIN

Postby B3rtm3n » Sun Oct 28, 2012 5:08

Ok, phpMyAdmin is still installed and working but has some errors in the settings.

When doing http://localhost/phpmyadmin/ I can login in.

Now I just have to figure out why I can connect but not login to drupal...
Last edited by B3rtm3n on Sun Nov 04, 2012 17:57, edited 1 time in total.
B3rtm3n
Growing Hen
 
Posts: 140
Joined: Fri Apr 13, 2012 2:53

MYSQL

Postby B3rtm3n » Sun Nov 04, 2012 17:54

I re-installed my System and Drupal is still not functioning

Did a re-install of MySQL (do not know exactly what I am doing)

Code: Select all
equo install dev-db/mysql


Code: Select all
/usr/bin/mysql_install_db --basedir=/usr


Code: Select all
/etc/init.d/mysql start


Code: Select all
 emerge --config mysql


'password' = your password

Code: Select all
mysqladmin -u root password ‘password’


Code: Select all
/etc/init.d/mysql start && rc-update add mysql default


Code: Select all
mysql_secure_installation


Code: Select all
rc-update add mysql default


Code: Select all
rc-update show | grep mysql


next stop phpMyAdmin
B3rtm3n
Growing Hen
 
Posts: 140
Joined: Fri Apr 13, 2012 2:53


Return to Software in General

Who is online

Users browsing this forum: No registered users and 2 guests

cron