1

I would like to ask you for your help with:

Because of forum CMS phpBB is not currently supporting >= php7.0 I had to switch to php5.6 on my Ubuntu16.04 LTS server. So installed php5.6 files from ppa:ondrej/php and by :

sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart
sudo ln -sfn /usr/bin/php5.6 /etc/alternatives/php

... I switched to php5.6.

Unfortunately, this caused my MediaWiki's VisualEditor stop working. I made the MediaWiki plug-in talk to parsoid server before switching php and everything was working as expected. Also, when I switched back to php7.0 using:

sudo a2dismod php5.6 ; sudo a2enmod php7.0 ; sudo service apache2 restart sudo ln -sfn /usr/bin/php7.0 /etc/alternatives/php

... wiki is working fine once again, however posts with phpBB functionalities like phpBBCodes and tags are failing to be submitted. Well php7.0 version is unsupported so I cannot complain, so I am trying to make Parsoid work with php5.6 (which should be supported).

Error displayed when:

Other error (posible) simptoms:

  • I got above mentioned errors when configuring VisualEditor with Parsoind on my server for the first time. I solved them by installing and cofiguring Extension:NetworkAuth on MediaWiki. When getting 500 back then (on php7.0) before I get it work I was getting this warning message on parsoid log:

[warning] [{MY_PARSOID_CONF_PREFIX}/Hlavná_stránka] non-200 response: 401 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>401 Unauthorized</title> </head><body> <h1>Unauthorized</h1> <p>This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.</p> <hr> <address>Apache/2.4.18 (Ubuntu) Server at beta.abs4data.com Port 443</address> </body></html>

... however, now I dont get any warnings in the log! Even when performing "sudo service parsoid status" it shows "/bin/sh -c /usr/bin/nodejs /usr/lib/parsoid/src/bin/server.js -c /etc/mediawiki/parsoid/server.js -c /etc/mediawiki/parsoid/settings.js >> /var/log/parsoid/parsoid.log 2>&1" which as I hope means it is outputing error measseages to the log.

I tried:

  • parsoid service restart -> went OK, no errors or warnings
  • apache2 service restart -> went OK, no errors or warnings
  • ubuntu server reboot -> didn't help
  • retriving parsoid server dashboard by: "curl -L {address of my vebsite}:8142" -> it is retriving correct file -> parsoid is running
  • retriving MediaWiki API php file: "curl -L {address of my vebsite}.api.php" -> it isretriving right file -> MediaWiki API is accesible by server
  • as described on MediaWiki Parsoid/Troubleshooting I tried to suply mediawiki text to Parsoid manually with "curl -L" and get HTML. It was working as expected and I got HTML code.

Possible Cause:

  • I think VisualEditor is not comunicating with Parsoid server app on my server. Both seems to be running well and also configured well. However, after changing php version they stopped cominicating. So, I think Parsoid or/and VisualEditor is somehow bind to use php7.0 that is now disabled and creating sym link by ln -sfn didn't properly tell VisualEditor/Parsoid to use php5.6.

What do you think? Any suggestion how to solve or further test this problem?

P.S. Sorry for badly formated code in question, but it somehow broke ... seems I am the problem after all :-D

1 Answers1

1

It seems I found the solution:

By installing addition php5.6 packages the problem was resolved:

sudo apt-get install libxmlrpc-epi0 php5.6-curl php5.6-gd php5.6-mcrypt php5.6-xmlrpc

I would say that problem was in missing php5.6-curl package. I think when I tested functionality of Parsoid by executing curl -L http://my.website.com:8142 and curl -L http://my.website.com/wiki/api.php I was in fact using php7.0's or other curl that was not available for Parsoid server app (now running with php5.6) so it cannot retrieved files it needed to perform the task.

Comments on the problem are still appreciated.