pH7Software / pH7-Social-Dating-CMS

😻 pH7Builder (formerly pH7CMS) is a Professional & Open Source Social Dating CMS written in PHP 8 🚀 This Social Dating Script aims to be low resource-intensive, powerful and secure. pH7Builder includes over 40 modules. It is the first Professional, Free & Open Source Social Dating Site Builder Software and the first choice for enterprise level Da
https://pH7Builder.com
MIT License
965 stars 579 forks source link

pH7CMS version 16.1.0 not working on PHP 5.6 and 7.0 #873

Closed prbt2016 closed 3 years ago

prbt2016 commented 3 years ago

Describe the bug

I was in the process of manual installation of pH7CMS on Centos 6.9 Final with PHP 5.6.40, MYSQL 5.5.62, Apache 2.2.34 downloaded from : https://sourceforge.net/projects/ph7socialdating/files/16.1/pH7Builder-16.1.0.zip/download

However I encountered with an issue i.e :

After a successful installation when I visit the URL :

http://example.com/testdir/ph71610/ or http://example.com/testdir/ph71610/admin123/main/login

There is no output on the pages. So to debug the issue I changed

environment = development

in /_protected/app/configs/config.ini

The following warning and error is thrown on PHP 5.6 i.e:

Warning: Unsupported declare 'strict_types' in /{{PATH}}/{{TO}}/{{pH7CMS}}/_protected/vendor/geoip2/geoip2/src/Database/Reader.php on line 3

Parse error: syntax error, unexpected ':', expecting ';' or '{' in /{{PATH}}/{{TO}}/{{pH7CMS}}/_protected/vendor/geoip2/geoip2/src/Database/Reader.php on line 71

Also I checked manual installation with PHP 7.0. However the following error is thrown on PHP 7.0 i.e :

Parse error: syntax error, unexpected '=' in /{{PATH}}/{{TO}}/{{pH7CMS}}//ph71610/_protected/vendor/maxmind-db/reader/src/MaxMind/Db/Reader.php on line 99

ph7CMS works fine with PHP 7.1

To Reproduce

Steps to reproduce the behavior:

  1. Install ph7CMS
  2. Visit the frontend or backend URL
  3. Error shall be thrown

Expected Behavior

After clicking URL's the frontend and backend should be loaded properly post successful installation.

Screenshots / Screencasts

Error on PHP 5.6 :

5 6

Error on PHP 7.0 :

7 0

Are the script's PHP requirements changed to PHP 7.1? .

Minimum PHP Requirement mentioned on the official site is PHP 5.6 :

https://ph7cms.com/doc/en/requirements

Could you please try and replicate the issues on PHP 5.6 and PHP 7.0 ?. Also please do let me know if PHP requirements are changed?.

pH-7 commented 3 years ago

Thanks very much for raising this issue Prashant!

You’re right! pH7CMS supports PHP 5.6. It seems that the Maxmind library introduces the hinting type and typed properties in its minor version too... I will downgrade this package to fix this issue and release a v16.1.1 version (very soon) fixing this problem. I will update this thread once it’s fixed 🙂

Thanks again for your great report! 😊 I really appreciate it!

prbt2016 commented 3 years ago

Hello @pH-7 ,

Thanks for your prompt response and checking into the issue. Really appreciate it. Kindly update me once you post the fix for the same.

Regards.

pH-7 commented 3 years ago
pH-7 commented 3 years ago

Hello @pH-7 ,

Thanks for your prompt response and checking into the issue. Really appreciate it.

Kindly update me once you post the fix for the same.

Regards.

You're very welcome! Sure thing Prashant 🙂

pH-7 commented 3 years ago

@prbt2016 This issue has been fixed in v16.1.1 🎉

prbt2016 commented 3 years ago

Hi,

It seems that the issue still needs a fix in 16.1.1 version as well.

It is throwing following error after filling database details and clicking "next" button on PHP 5.6

Fatal error: Cannot use PH7\Framework\Mvc\Model\Engine\Db as Db because the name is already in use in [[Path_to_ph7cms]]/_protected/app/system/core/models/UserCoreModel.php on line 18

Also I tried installing on PHP 7.0 and the installation went well. However the CSS is not loading properly. (refer the image) ph7cms

prbt2016 commented 3 years ago

Hi,

Any update fro the same ? Is this resolved ?

From where can I get the updated package ?

pH-7 commented 3 years ago

Really sorry for the late reply @prbt2016

I couldn't reproduce your second error you mentioned about the css/js not loading. Could you see the PHP log on your side to see if it is caused by an internal PHP error?

PHP logs would be located at _protected/data/log/pH7log/

pH-7 commented 3 years ago

And concerning your first issue about the same Db class name declaration error, it has been fixed, however, I wanted to fix your second issue before to release a new build.

pH-7 commented 3 years ago

@prbt2016?

pH-7 commented 3 years ago

I did again several tests, and I'm not facing any issues. Perhaps, could it be related to your prod environment...?

github-actions[bot] commented 2 years ago

Hi there, I locked the thread since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Thank you, Pierre-Henry Soria 🤖