sarapis / orservices

ORServices is an open source, smartphone-friendly directory application that enables you to collect, verify, organize and share information about social services in your community with your stakeholders, beneficiaries, partner organizations and more.
https://sarapis.org/human-services/orservices/
22 stars 16 forks source link

Installing with PHP 8.x #122

Closed royappa closed 6 months ago

royappa commented 6 months ago

Hello, I have spun up a fresh VPS and installed the latest PHP, 8.1.1 (Ubuntu 23.4 running Apache2) and request help in completing its installation. Here's where I am:

I updated the composer.json with

"require": {
    "php": "^7.2.5|^8.0",
    ...
}

After doing this I was left with these two errors from composer:

 Problem 1
    - Root composer.json requires arcanedev/log-viewer ^7.0 -> satisfiable by arcanedev/log-viewer[7.0.0, 7.1.0, v7.x-dev].
    - arcanedev/log-viewer[7.0.0, ..., v7.x-dev] require php ^7.2.5 -> your php version (8.1.12) does not satisfy that requirement.
  Problem 2
    - dompdf/dompdf[v0.8.5, ..., v0.8.6] require php ^7.1 -> your php version (8.1.12) does not satisfy that requirement.
    - Root composer.json requires dompdf/dompdf ^0.8.5 -> satisfiable by dompdf/dompdf[v0.8.5, v0.8.6].

I then went down a bit of a rabbit hole upgrading these versions to their latest but each iteration only seemed to come up with more composer dependency issues. I then tried installing PHP 7.2 on this machine (it's a clean VPS so I can do anything on it), and unfortunately it looks like PHP 7.2 is too old to work with some of the other packages on this machine.

Would the dev group have any tips on getting this to work on the latest PHP, or a branch I can check out? Thank you!

d9it commented 6 months ago

Hello @royappa ,

First thank you for your comment. FYI, the Current ORS Project is based on Laravel 7 and it supports php 7.4, Can you please try to use PHP 7.4 and see if it works for you or not?

To use the latest PHP, we have to upgrade our whole code to the latest Laravel.

Kindly try using PHP 7.4 from your end. We will keep you posted once our code is ready with the latest Laravel and latest PHP.

royappa commented 6 months ago

Thank you for the reply, it was enormously helpful. I restarted with PHP 7.4 and with "composer -W update" it worked great. I also used the tip in issue https://github.com/sarapis/orservices/issues/82 to first load the 09112021.sql and then run the artisan migrate.

I completely understand that upping to 8.1 will take time.

One small point, I now need to hack my own installation to find the admin control panel and default password. If you could possibly tell me that path I'd appreciate it, as I've looked a little bit and done some file searches in the code, but will keep looking. The "/backend/documentation" URL was a cruel false hope :-)

Again, thank you very much and thanks also to @devinbalkind for prompting me to open an issue.

royappa commented 6 months ago

To the devs, please cancel the above request. I found an admin user being inserted in one of the database/dump files and updated its password, so now I can access. Many thanks.

d9it commented 6 months ago

@royappa

Great to hear that you are able to start the project. Please let me know if you found any issue in future, i will love to help you in all your need. Thanks !!

royappa commented 6 months ago

It turns out I had forgot the final step, "php artisan db:seed" which loads a lot of useful data into the final MySQL including an admin user with admin password! So I didn't need to insert my own admin user. I am going to close this issue, thanks for addressing everything. I will post new items as new issues.