php7 compatibility with external authentication

php7 compatibility with external authentication

by Ripa Desai -
Number of replies: 7
Hello,

I upgraded ubuntu 14.04 t0 16.04 version.
apache2 2.4.7 to 2.4.18
php 5.5.9 to 7.0.18
mysql 5.5.55 to 5.7.18

I upgraded ubuntu 14.04 to 16.04. Now I can see login page. However, when I try to login. I am redirecting to blank page. Does this related to compatibility of php7 with external authentication?


My apache2,php7,mysql is working fine..

Thankspage


Average of ratings: -
In reply to Ripa Desai

Re: php7 compatibility with external authentication

by Matt T -
Providing us an error log extract to Pastebin would help. Turn debugging on if necessary


I would see if using PHP 5.6 causes the problem to go away.

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php5.6

Also add the relevant PHP extensions: http://docs.moodle.org/31/en/PHP#PHP_Extensions_and_libraries

Then change from PHP 7 to 5.6 (reverse commands 1 and 2 to revert later)

sudo a2dismod php7
sudo a2enmod php5.6
sudo service apache2 restart

In reply to Ripa Desai

Re: php7 compatibility with external authentication

by Matt T -

Also, I vaguely remember you wanting to create a replica of your production environment.

If you are doing this to plan for a prod 14.04 > 16.04 upgrade, be warned that there is a period during this upgrade where Apache could be executed without PHP mod enabled, meaning entire webroot directory is visible to the world (including config.php). If you don't want that public, move config.php out of the directory or even better, disconnect server from internet or clean install 16.04

In reply to Ripa Desai

Re: php7 compatibility with external authentication

by Marina Glancy -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Check for errors in the error.log of your apache web server

It is usually located at /var/log/apache2/error.log

The easiest way to do it is to open a terminal and type

tail -f /var/log/apache2/error.log

Leave this terminal window open and try to login to your moodle site. New errors will appear in your terminal window

In reply to Ripa Desai

Re: php7 compatibility with external authentication

by Rahul Rai -

Hi

1) You need to go to the Moodle directory server/moodle/admin/ and open index.php file.

2) Comment this line at line no: 694 "redirect("index.php?sessionstarted=1&lang=$CFG->lang");"

3) Save the file and close.

In reply to Rahul Rai

Re: php7 compatibility with external authentication

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Don't do this...

It's really bad advice recommending making changes to core Moodle code. I can't see any reason to do this sad

In reply to Ripa Desai

Re: php7 compatibility with external authentication

by Rahul Rai -

Hi

After working fine than you can uncomment this line. 

In reply to Rahul Rai

Re: php7 compatibility with external authentication

by Matt T -

I really can't see why this would fix the issue, and tinkering with core code should, as mentioned above, be avoided.

Average of ratings: Useful (1)