ubc / iPeer

Peer Evaluation System
http://ipeer.ctlt.ubc.ca
Other
17 stars 18 forks source link

iPeer and PHP #610

Open PhilCotton opened 5 years ago

PhilCotton commented 5 years ago

Have an existing iPeer 3.1.9 installation on windows with PHP 5.6.36 - it appears that PHP 5.6 went EOL and our campus is requesting us to upgrade it. I duplicated that system to a new system to start updating PHP to 7.2.15 but am getting a fatal error: cannot use 'Object' as class name as it is reserved in c:\xampp\htdocs\cake\libs\object.php on line 33.

Is there a solution to this by upgrading the site to a newer version of iPeer and then upgrading apache/PHP or some way to make it where I can setup a newer apache/php/mysql and migrate the 3.1.9 iPeer installation to the newer system.

Any documentation or resources would be most appreciated.

xcompass commented 5 years ago

Our code base is based on PHP5 and is not compatible with PHP7. We just started migrate our code to PHP7. We will release a new version once it's ready.

kitsook commented 5 years ago

@PhilCotton iPeer 3.4 should work fine with PHP 7.2. Please give it a try.

After upgrading the PHP version, deploy the new iPeer version as usual. Login iPeer as administrator and upgrade the database part. If you have encrypted iPeer system parameters (e.g. Canvas developer keys), you also need to go to the system parameter page and update them too. The encryption key handling is changed with the new PHP version.

PhilCotton commented 5 years ago

Have a sandbox of my existing setup - updated to PHP 7.2.18 downloaded and replaced all files in the www folder with both update-ver-340.zip as well as ipeer-master.zip from this site. on launching the ipeer site i get a http 500 error under maintenace or programming error. This is the way I have updated the site in the past (windows based apache) Any ideas on what I have done wrong or how to correct?

Fatal error: Uncaught Error: Class 'DATABASE_CONFIG' not found in C:\wamp\www\app\config\bootstrap.php on line 97

Error: Class 'DATABASE_CONFIG' not found in C:\wamp\www\app\config\bootstrap.php on line 97

PhilCotton commented 5 years ago

Found the error above needed had to change from mysql to mysqli and was able to get past the database errors. imported my existing database as I had dropped it earlier to see if the database itself was part of the problem, usually ipeer will install with a generic database but that did not seem to work. still not getting to the login prompt to be able to upgrade the database or do anything else. attached is what I am seeing

ipeererror

PhilCotton commented 5 years ago

leaving the 3.1.9 ipeer database I was still getting a 500 error. I dropped the database and created a blank one to treat it like a new install and was able to get past the 500 error. Then got an error about www\app\plugins\guard - copied the guard folder from my existing 3.1.9 folder and it allowed me to go through a new install / setup database phpmyadmin shows data in the database so it looks like it was created. still no login prompt - but new error before it displays login box.

objecterror

PhilCotton commented 5 years ago

figured it out - downloaded https://github.com/xcompass/CakePHP-Guard-Plugin version 1.0.5, deleted the guard file, created a guard folder and copied the contents of guard-plugin v105 into the folder.

xcompass commented 5 years ago

Sorry for the late reply. Glad you figure it out. Did you run php compose.phar install? It should update Guard plugin automatically.

PhilCotton commented 5 years ago

I did not - I installed much as I have in the past by downloading a zip of the files and placing them in the web folder and upgrading the database. will the php compose.phar work on windows. I have not seen the compose.phar documented anywhere.