partkeepr / PartKeepr

Open Source Inventory Management
http://www.partkeepr.org
GNU General Public License v3.0
1.38k stars 401 forks source link

setup error #1110

Closed ashcoft closed 4 years ago

ashcoft commented 4 years ago

error on setup: Notice: Trying to access array offset on value of type null in /var/www/html/ims_havo_work/src/PartKeepr/SetupBundle/Controller/ExistingUserSetupController.php (which is being imported from "/var/www/html/ims_havo_work/src/PartKeepr/SetupBundle/Resources/config/routing.yml"). 500Internal Server Error -FileLoaderLoadException 1 linked Exception: • ContextErrorException »

[2/2]FileLoaderLoadException:Notice: Trying to access array offset on value of type null in /var/www/html/ims_havo_work/src/PartKeepr/SetupBundle/Controller/ExistingUserSetupController.php (which is being imported from "/var/www/html/ims_havo_work/src/PartKeepr/SetupBundle/Resources/config/routing.yml").
[1/2]ContextErrorException:Notice: Trying to access array offset on value of type null
Logs
Stack Trace (Plain Text)

apache log error:

€‹125.163.31.37 - - [02/Apr/2020:01:43:01 +0700] "POST /setup/tests/check-php-prerequisites.php HTTP/1.1" 200 69 "https://ims.havo.work/setup/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:74.0) Gecko/20100101 Firefox/74.0" [Thu Apr 02 01:43:01.090887 2020] [php7:notice] [pid 59142] [client 125.163.31.37:60797] PHP Notice: A non well formed numeric value encountered in /var/www/html/ims_havo_work/app/PartKeeprRequirements.php on line 126, referer: https://ims.havo.work/setup/ 125.163.31.37 - - [02/Apr/2020:01:43:01 +0700] "POST /setup/tests/check.php HTTP/1.1" 200 164 "https://ims.havo.work/setup/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:74.0) Gecko/20100101 Firefox/74.0" 125.163.31.37 - - [02/Apr/2020:01:43:02 +0700] "POST /setup.php/setup/webserverTest HTTP/1.1" 500 20932 "https://ims.havo.work/setup/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:74.0) Gecko/20100101 Firefox/74.0" [Thu Apr 02 01:43:16.304636 2020] [php7:warn] [pid 59141] [client 125.163.31.37:60804] PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/html/ims_havo_work/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 2636 [Thu Apr 02 01:43:16.304686 2020] [php7:warn] [pid 59141] [client 125.163.31.37:60804] PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/html/ims_havo_work/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 2665 125.163.31.37 - - [02/Apr/2020:01:43:15 +0700] "GET /web/setup/ HTTP/1.1" 500 67 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:74.0) Gecko/20100101 Firefox/74.0"

christianlupus commented 4 years ago

I most probably am sure that you have a PHP version too new. What version are you using? There is an incompatibility of the dependency symfony with any PHP version newer than 7.1. This causes similar errors.

ashcoft commented 4 years ago

Thank you very much for your answer. my php version is 7.4

christianlupus commented 4 years ago

Then this is clearly the issue here. We are working to update the named dependency to a current version. This should render PartKeepr compatible with newer PHP versions. But for the time beeing, we are fixed to PHP 7.1 as maximal version.

What server are you running PK on? Is it a linux machine you have root rights and some spare place?

ashcoft commented 4 years ago

Operating system | CentOS Linux 7.7.1908

Kernel and CPU | Linux 3.10.0-1062.18.1.el7.x86_64 on x86_64

yes, of course, I've root right and SSD 1TB space

christianlupus commented 4 years ago

I was unsure if you are using a hosting platform (aka only PHP and an HTTP server) or a real root server.

In this case, I'd advice you to base your setup upon docker. This way, you can use an older version of PHP with your current setup without downgrading to an outdated major OS version. We are working to get an image generated from this repository directly (#1088). This might take some time until we are ready. If you are willing to go that route, you can reach out anytime. Alternatively, there is the image generated by mhubig ready on docker hub. This one I am running at the moment at home but I've heard rumors that there is somewhere a bug. I cannot tell you much as I got no clear clue on it.

ashcoft commented 4 years ago

Thank in advance, Chrish.

christianlupus commented 4 years ago

I will close this issue now. If there is still some problem open, just comment, I will reopen.

Ichibot200 commented 3 years ago

Facing the same kind of problem here. Also trying to use PHP 7.4. Any news on upgrading to Symfony 5 and PHP 7.4 compatibility?

christianlupus commented 3 years ago

@citizen3942 Your PHP version is too new for PK. Regarding the upgrade, we are not much farther than a few months before. We are missing an experiences symfony developer.

QvixoteRoux commented 1 year ago

or the record, still unable to use PHP 7.4, my bad because as soon I landed hered I remember reading about this a couple of years ago

ScaredyCat commented 1 year ago

Yup still a problem for new installs.

dromer commented 1 year ago

PHP 7.4 is not supported, so of course it won't work.

Until the README explicitly says it is supported (unlikely any time soon) it is of no use to report this issue.

ScaredyCat commented 1 year ago

It makes perfect sense to report it as still being an issue.

dromer commented 1 year ago

You don't have to report well known issues on a closed topic.

ScaredyCat commented 1 year ago

Then it's a dead project.