We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36549
    • 572 Posts
    Hi,

    I’ve been battling with installing a module (tried txnesletters and easy newsletters) but i get errors with both.
    This must be a server configuration error?
    I’ve followed the wiki about mod security http://wiki.modxcms.com/index.php/What_is_mod_security_and_how_does_it_affect_me#Editing_resource_code, but this didn’t help.
    I have pasted the code from TXNewsletters in line by line and have now found the line of code that generates the error...
      $results = createTable();

    The code above is what seems to cause the permission error and additional 404...anyone have any idea why? and more to the point if i can solve this?

    Thank you for any help

    J
      www.9thwave.co.uk
         WEB | DESIGN | PRINT
      • 26903
      • 1,336 Posts
      Looking at the TxNewsletters code this function is doing what it says on the tin, its trying to create a table in your MODx database, it does this using the line :-
      $results = $modx->db->query($sql);
      .
      So I assume the error is reported back from MYSQL as a permissions error, which would mean you don have create table privilege on the database for your MODx user, without the actual error though this is a guess.
        Use MODx, or the cat gets it!
        • 36549
        • 572 Posts
        Hi,

        Thanks for taking the time to get back to me.
        I’ve attached a screen of the error i’m getting.
        I’ve checked permissions for the mysql user and all privileges are checked.
        I asked the host to check if they think it’s a mod_security issue, but their reply was:
        An internal server error message genrrally means the permissions of the file or directory are incorrect.
        All files should be set to 644 and all directories should be 755, any other settings would cause the internal server error message.


        I have tried pasting the remaining code (after the createTable part but leaving those few lines out) from the TXNewsletters module text and i still get the error.The error does not appears up to the createTable part!!!

        can you offer any suggestions at all?

        Thanks v much.

          www.9thwave.co.uk
             WEB | DESIGN | PRINT
          • 26903
          • 1,336 Posts
          Ok, the error is not a database one, it looks as though you’ve lost your base url somewhere the path in the error /modx/096/manager/index.php almost certainly doesnt exist as it is, it needs abase path e.g /var/www/html etc. Give me a mo and I’ll install Txnewsletters and see what happens.
            Use MODx, or the cat gets it!
            • 26903
            • 1,336 Posts
            Ok the module installed OK on my system and created the tables, which sort of points back to your set-up somewhere, maybe your admins are right, have you checked the perms on the TXNewsletters module directory and files?
              Use MODx, or the cat gets it!
              • 36549
              • 572 Posts
              have you checked the perms on the TXNewsletters module directory and files?

              Thank you so much for helping out...i’m not sure what you mean by the above though?
                www.9thwave.co.uk
                   WEB | DESIGN | PRINT
                • 26903
                • 1,336 Posts
                It relates to this from your admins :-
                All files should be set to 644 and all directories should be 755, any other settings would cause the internal server error message.

                When you uploaded the TXNewsletters zip file and unzipped it into the /assets folder what permissions did you leave on the directory and its files, the admins are saying it should be ’rw-r--r--’ for files and ’rwxr-xr-x’ for directories, you can see this by using the ’ls -al’ command from the command line. Its worth checking this as until you verify this you probably won’t get much joy from the admins with any further questions.
                  Use MODx, or the cat gets it!
                  • 36549
                  • 572 Posts
                  Hi,

                  All files and directories have the correct permissions.i’m stumped??? any ideas???

                  I’ve just tried copying and pasting the TXNewsletter text into a new module and saving it on another Modx site i’ve got running and get a 403:
                  403 Forbidden
                  Access is forbidden to the requested page:
                  IPADDRESS/SITENAME/manager/index.php?a=109 (port 80)


                  So i’m going to try the modx wiki solution to see if that resolves it.
                  Thanks very much for your help...i may post again if i still have difficulties.

                  Cheers
                    www.9thwave.co.uk
                       WEB | DESIGN | PRINT
                    • 26903
                    • 1,336 Posts
                    Ah Ok, the a=109 is the save module action, so its going when you press the save button, this may well indeed be mod_security finding something wrong with the save url. You have mentioned this before, can you turn mod_security off on one of the failing sites and see if it works OK.
                      Use MODx, or the cat gets it!