pkp / ots

PKP XML Parsing Service
GNU General Public License v3.0
32 stars 19 forks source link

Issues running on php7-fpm #71

Closed axfelix closed 8 years ago

axfelix commented 8 years ago

Web frontend throws permissions errors when trying to verify registration email link or upload any documents on php7-fpm. This is a bit of a pain moving forward because many distros are trying to aggressively deprecate php5 (I ran across this when testing on Ubuntu 16.04) but can probably be worked around for now. Haven't tried php7-cgi as that seems like a halfway solution. No errors in apache log.

axfelix commented 8 years ago

Same issues with php7-cgi.

axfelix commented 8 years ago

I'm getting a bit concerned about how picky our stack appears to be about PHP versioning -- the deployment script working on 14.04 was only with a specific PPA build, and I'm having a very hard time getting it working otherwise, with nothing in logs.

@kaschioudi I'm afraid this might be a priority over the OJS work for now. It should be possible to test without initializing most of the vendor modules -- these php version-based failures are triggered on responding to verification emails.

kaschioudi commented 8 years ago

Okay, I will start looking into this.

axfelix commented 8 years ago

OK, verified this works fine with php5.5 from ondrej PPA on trusty, so we don't have immediate issues with our setup being deprecated.

We now have a vagrant configuration working on Trusty: https://github.com/axfelix/xmlps-vagrant

Biggest issue with going to Xenial is that Xenial's mysql won't let us run as root, but we could work around that fairly easily (and probably should), it's just a pain to get proper SQL permissions in what should be a testing VM configuration. php7 still has compatibility issues but php5.5 should be available indefinitely for Xenial.

kaschioudi commented 8 years ago

I suggest granting full permission to a xmlps user identified by xmlps

mysql -u root -e "create database xmlps; GRANT ALL PRIVILEGES ON xmlps.* TO xmlps@localhost IDENTIFIED BY 'xmlps'"
cp config/autoload/local.php.dist config/autoload/local.php
sed "s/'user' => '',/'user' => 'xmlps',/g" -i config/autoload/local.php
sed "s/'password' => '',/'user' => 'xmlps',/g" -i config/autoload/local.php
kaschioudi commented 8 years ago

the error triggered on email verification page is due to the fact that activationKey was being set to null (https://github.com/pkp/xmlps/blob/0984e12f066209423bbd482391526aeb2fb7f83c/module/User/src/User/Entity/User.php#L265) whilst the column is defined as not null

CREATE TABLEuser(...activationKeyvarchar(40) COLLATE utf8_unicode_ci NOT NULL,...)`