salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.27k stars 2.03k forks source link

8.5.1 php 8.1.27 Massive amount of log spam due to php issues #10360

Closed antonical closed 4 months ago

antonical commented 4 months ago

Before you open an issue, please check if a similar issue already exists or has been closed before.

I cannot see this issue.

Provide a more detailed introduction to the issue itself, and why you consider it to be a bug

The lines of the log provided below should be evidence of this.

Expected Behavior The product should work without error for basic functions. I have no idea what the implications of this error are on the integrity of the overall installation. We are unable to upload images to products or change the site logo for instance.

Actual Behavior The php Error log is spammed with these 4 repeating log lines on using the product. We expect to be able to upload images to products or change the site logo etc. We are still testing but this looks like a PHP incompatibility issue.

Also please check relevant logs (suitecrm.log, php error.log etc.) suitecrm.log shows nothing while these issues are happening

Possible Fix

I am not a php developer so would have no idea.

Steps to Reproduce

Clean install on a Ubuntu 22.04 Virtualmin Server. php 8.1.27 enabled for the virtual server. All compatibility matrix conditions met. Normal operations of the platform results in a massive amount of php error log spam as below. The 4 log lines are repeated 000's of times and continually.

php error log excerpt

[15-Feb-2024 09:26:03 UTC] PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mydomain.com/public_html/crm/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php on line 134
[15-Feb-2024 09:26:03 UTC] PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mydomain.com/public_html/crm/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php on line 144
[15-Feb-2024 09:26:03 UTC] PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Session::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mydomain.com/public_html/crm/vendor/symfony/http-foundation/Session/Session.php on line 131
[15-Feb-2024 09:26:03 UTC] PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Session::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mydomain.com/public_html/crm/vendor/symfony/http-foundation/Session/Session.php on line 141

Same 4 lines are repeated 1000’s of times.

Seems to be clear this is a php bug in the various .php files in the log.

Context

We cannot do basic things like add an image to a product or change the site logo. We are still testing but I suspect this bug(s) are impacting the use of the platform in unexpected ways. We would consider this high priority as the product does not function on php 8.1 or above.

Your Environment

See all software versions: Apache version 2.4.52 PHP versions 7.4.33, 8.1.27, 8.3.2 MariaDB version 10.6.16

johnM2401 commented 4 months ago

Hey @antonical !

Thank you for getting in touch!

Just to let you know, I have transferred your previous issue to the SuiteCRM-Core repo, as this issue is specific to SuiteCRM8

This can be found here: https://github.com/salesagility/SuiteCRM-Core/issues/436

I'm going to close this specific ticket, (10360), as this is a duplicate of https://github.com/salesagility/SuiteCRM-Core/issues/436 and the issue doesn't apply to SuiteCRM7 versions.


In regards to your issues with uploading images, I don't believe this should be related to the Deprecated errors you are seeing. I've given this a brief check and I appear to be able to upload a new System Logo on my local environment: image

I would recommend checking your site_url and RewriteBase values, to ensure these are correct, as these can cause all sorts of issues across the CRM, if not set.

These can be found in:

site_url - [crm]/public/legacy/config.php RewriteBase - [crm]/public/legacy/.htaccess

The correct values may differ depending on your hosting/environment, but it should be something alike what is described on this Forum post: https://community.suitecrm.com/t/suitecrm-8-beta-install-questions/79383/5


However, if you are still having issues with these then please get in touch and we can investigate further.

Thank you again!

antonical commented 4 months ago

John,

Thank you for coming back to me. I apologise for posting in the wrong place. I did go and edit the post to include more info from the environment etc.

I checked the two variables you mentioned the only one that gave me pause was the second one.

site_url - [crm]/public/legacy/config.php RewriteBase - [crm]/public/legacy/.htaccess

The site is now working apart from being unable to upload images in products or change the site logo. Whenever I try to add an image to a product or change the site logo I get a popup saying undefined and no changes are uploaded.

I can select the image etc. But I just get an undefined error.

The one images I can upload are to the user records. They work fine.

We cannot start using the platform if the basics don't work and I have no idea how to resolve the above.

I have checked the permissions and run the fix permissions commands. I have even set the entire installation to 777 to see if it was a 'quiet' permissions problem.

Nothing seems to work.

We have now installed from scratch a few times. Downgraded the PHP to 8.1.27 Clean folders, clean db, checked all user permissions etc. etc.

Any help would be appreciated.

Cheers Tony

From: "John Moran" @.> To: "salesagility/SuiteCRM" @.> Cc: "antonical" @.>, "Mention" @.> Sent: Thursday, 15 February, 2024 14:24:38 Subject: Re: [salesagility/SuiteCRM] 8.5.1 php 8.1.27 Massive amount of log spam due to php issues (Issue #10360)

Hey [ https://github.com/antonical | @antonical ] !

Thank you for getting in touch!

Just to let you know, I have transferred your previous issue to the SuiteCRM-Core repo, as this issue is specific to SuiteCRM8

This can be found here: [ https://github.com/salesagility/SuiteCRM-Core/issues/436 | salesagility/SuiteCRM-Core#436 ]

I'm going to close this specific ticket, (10360), as this is a duplicate of [ https://github.com/salesagility/SuiteCRM-Core/issues/436 | salesagility/SuiteCRM-Core#436 ] and the issue doesn't apply to SuiteCRM7 versions.

In regards to your issues with uploading images, I don't believe this should be related to the Deprecated errors you are seeing. I've given this a brief check and I appear to be able to upload a new System Logo on my local environment: [ https://github.com/salesagility/SuiteCRM/assets/13675281/3983add8-7413-478f-b2a4-977c6cb8933b | image.png (view on web) ]

I would recommend checking your site_url and RewriteBase values, to ensure these are correct, as these can cause all sorts of issues across the CRM, if not set.

These can be found in:

site_url - [crm]/public/legacy/config.php RewriteBase - [crm]/public/legacy/.htaccess

The correct values may differ depending on your hosting/environment, but it should be something alike what is described on this Forum post: [ https://community.suitecrm.com/t/suitecrm-8-beta-install-questions/79383/5 | https://community.suitecrm.com/t/suitecrm-8-beta-install-questions/79383/5 ]

However, if you are still having issues with these then please get in touch and we can investigate further.

Thank you again!

— Reply to this email directly, [ https://github.com/salesagility/SuiteCRM/issues/10360#issuecomment-1946199814 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ADG33A2AOCTJZL6EZDBKFGDYTYLCNAVCNFSM6AAAAABDKHEWEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBWGE4TSOBRGQ | unsubscribe ] . You are receiving this because you were mentioned. Message ID: <salesagility/SuiteCRM/issues/10360/1946199814 @ github . com>