Fatal error: Cannot redeclare Aws\constantly() (previously declared in vendor/aws/aws-sdk-php/src/functions.php:19) in phar://aws-3.138.7.phar/Aws/functions.php on line 23

    lawmaina78
    Hi
    It appears your server could not be read the aws file that giving this error.
    Can you edit fields in first post and submit a temp super user login, as fatal error is also due to low PHP limits on your server.

      Ninja

      You want me to give you super admin credentials? Let me know so I can arrange. Hope this won't be visible to general public.

        lawmaina78
        Hi
        Username and password do not match or you do not have an account yet.
        Please check.

          Ninja

          Just copy paste the credentials, I have tested them they are working.

            I have changed the credentials again, please check.

              lawmaina78
              Hi
              Thanks for correct details, this error is not in JomSocial area as in the error path you have extension fabric that showing this error, disable the extension working fine.
              Please report the issue to extension provider for its compatibility with JomSocial and Joomla.

                Ninja
                Please take your time to study the problem before responding.
                I was working well with Fabrik component until I recently installed Jomsocial. The issue is that Fabrik is already loading external library Aws\constantly() which Jomsocial seems to attempt to load too and causing collission, so how can I stop Jomsocial from loading that external library which is already loaded by Fabrik.

                  lawmaina78
                  Hi
                  JomSocial has to load the AWS as its feature in the JomSocial to load it for remote storage.
                  Did you tested disable the fabrik and checked is there issue? Please check the path of the error is from the fabric.
                  The suggestion has been shared after testing on your site as well.

                    Ninja

                    If the library is already loaded by Fabrik, there is no need to load it againa, you should use include_once()
                    Fabrik has been working well before I installed Jomsocial, so I don't want to hack into its code.

                    The error say path for Jmsocial is in phar://aws-3.138.7.phar/Aws/functions.php on line 23
                    But I can't seem to locate thet path.

                    I sorted the problem by commenting out line 13 of the file /components/com_community/libraries/storage/s3.php
                    That's where the AWS was being loaded from by Jomsocial.
                    Please consider planning your component external dependencies libraries, a simple check if the library has been loaded by any other application.
                    Luckily am a developer I knew how to search, but if someone else purchased your component, they would get stuck and end up spending more money to sort out such issues.

                      lawmaina78
                      Hi
                      JomSocial is independent extension and can not depend on 3rd party extension. Even same for any other extension to use own library. you need to keep this file for next update as well.

                        Ninja

                        That's why I said you're answering without even making attempt to understand what the problem was.

                        The problem is that Jomsocial is depending on "AWS SDK for PHP" to use AWS services, same as Fabrik too, now since I had Fabrik running earlier, Jomsocial redclaring that library caused a problem. So I edited Jomsocial core file to stop redclaring that library, and all is working well.
                        Have this communicated to your developers to have a check if library available before declaring it, now I will have to remember to edit that file everytime I make an update, which is cumbersome and prone to errors.

                          lawmaina78
                          Hi
                          i am afraid its not something i can promised here, as it simple that each extension can not depend on other extension. I will share the feedback to development team on this if there is something to change, dev member will update here.

                            Ninja
                            Thanks, just do share with them, it's very important they read this thread. I've explained the issue here.

                              Write a Reply...
                              You need to Login to view replies.