Menu

#2691 Errors from CAS after upgrades

None
closed
nobody
None
1
2023-06-09
2023-02-07
No

Hi there,
I am running MBRS in a Windows server 2019 environment.
I have just updated to MRBS 1.11 and PHP V8.2.2 and since then I am getting the following errors in the attached file.
If I switch PHP back to V8 all works fine.

Not sure which permissions are being referred to, and how to fix?

Regards,
Robert

1 Attachments

Discussion

  • Campbell Morrison

    You mean if you switch back to PHP 8.0, but keeping MRBS 1.11.0 everything works OK? Or are you switching back to an earlier version of MRBS as well?

     
  • Campbell Morrison

    I've done some testing. I get the same problem as you with both PHP 8.2 and PHP 8.0. However giving write permission on phpCAS.log to the appropriate user/group solves the problem.

     
    • Campbell Morrison

      PS Initially I had a problem a couple of lines earlier and touch() was failing to create a file because it didn't have the right permissions. But having solved that I came across the problem you report.

       
      • Anonymous

        Anonymous - 2023-02-08

        Hi Campbell,

        Thanks for the prompt reply.
        And thanks for confirming my issue.
        I only have to swap PHP versions for it to work and I leave the MBRS at 1.11.
        What location should the phpCAS.log be located?

        Regards,
        Robert De Caprio, Network Support Officer

         

        Last edit: Campbell Morrison 2023-02-08
        • Campbell Morrison

          Have you now solved the CAS log problem? The phpCAS.log file will be in your MRBS folder, at the same level as config.inc.php.

           
      • Anonymous

        Anonymous - 2023-02-08

        Morning Campbell,
        I have reverted to PHP 8.0.27 to see if a small upgrade would work, but still getting errors.
        I was also able to get log output, and I receive the following error:

        Uncaught exception 'Error' in C:\inetpub\wwwroot\Bookings\lib\MRBS\DBFactory.php at line 28
        Undefined constant PDO::MYSQL_ATTR_FOUND_ROWS
        #0 C:\inetpub\wwwroot\Bookings\dbsys.inc(63): MRBS\DBFactory::create()
        #1 C:\inetpub\wwwroot\Bookings\upgrade.inc(15): MRBS\db()
        #2 C:\inetpub\wwwroot\Bookings\defaultincludes.inc(35): require_once('...')
        #3 C:\inetpub\wwwroot\Bookings\index.php(8): require('...')
        #4 {main}
        
        MRBS GET: Array
        (
        )
        MRBS POST: Array
        (
        )
        MRBS SESSION: Array
        (
            [phpCAS] => Array
                (
                )
        
        )
        
        #0 MRBS\generate_backtrace() called at [C:\inetpub\wwwroot\Bookings\functions_error.inc:221]
        #1 MRBS\output_error() called at [C:\inetpub\wwwroot\Bookings\functions_error.inc:264]
        #2 MRBS\output_exception_error(object) called at [C:\inetpub\wwwroot\Bookings\functions_error.inc:272]
        #3 MRBS\exception_handler(object)
        

        Regards,
        Robert De Caprio, Network Support Officer

         

        Last edit: Campbell Morrison 2023-02-08
        • Campbell Morrison

          What happens if you comment out line 27 of lib/MRBS/DB_mysql.php?

                // PDO::MYSQL_ATTR_FOUND_ROWS => true  // Return the number of found (matched) rows, not the number of changed rows.
          
           
          • Anonymous

            Anonymous - 2023-02-09

            Hi Campbell,

            Thanks for the reply, I will try that on Monday and let you know, when I am next back at College.

             

            Last edit: Campbell Morrison 2023-02-09
            • Campbell Morrison

              I should have said that that change isn't a potential solution but just a test to get more information.

               
          • Anonymous

            Anonymous - 2023-02-13

            Morning Campbell,

            When I make the changes you suggested I get the following errors:

            E_USER_WARNING in C:\inetpub\wwwroot\Bookings\lib\MRBS\DB.php at line 113
            could not find driver
            
             

            Last edit: Campbell Morrison 2023-02-13
  • Campbell Morrison

    Ah, OK. It looks like there's a problem with your PHP configuration. Edit your php.ini file and make sure the line

    extension=php_pdo_mysql.dll
    

    is uncommented. Remember also to remove the comment in MRBS that you applied earlier.

     
    • Anonymous

      Anonymous - 2023-02-13

      Hi Campbell,

      Looking in all the php.ini files I don't seem to have the entry you have mentioned (see attached example).
      Do I need to add "extension=php_pdo_mysql.dll" into the ini file, if so what section?

      Thanks for the heads up reg: password.

       

      Last edit: Campbell Morrison 2023-02-13
  • Campbell Morrison

    OK, on your system it is line 948:

    ;extension=pdo_mysql
    

    Remove the semicolon.

     
    • Anonymous

      Anonymous - 2023-02-14

      Morning Campbell,

      I added "extension=php_pdo_mysql.dll" and updated PHP to 8.2.2 and all is working fine.

      Thanks for your help resolving this.

      Regards,
      Robert

       

      Last edit: Campbell Morrison 2023-02-14
    • Anonymous

      Anonymous - 2023-06-06

      Hi Cambell,
      Hope you are well?
      And sorry to keep pestering you.

      I am having similar issue when I try and upgrade to PHP V8.2.6, except this time there is no mention of ";extension=pdo_mysql" in the php.ini file.
      The file itself seems structured differently too?

      Regards,
      Robert De Caprio, Network Support Officer

       

      Last edit: Campbell Morrison 2023-06-06
      • Campbell Morrison

        Can you post your php.ini file?

         
        • Anonymous

          Anonymous - 2023-06-07

          Hi Camell,

          Attached is the PHP v8.2.6 file as requested.

          Regards,
          ROBERTO DE CAPRIO

           

          Last edit: Campbell Morrison 2023-06-08
          • Campbell Morrison

            Try uncommenting line 955:

            extension=pdo_mysql
            
             
            • Anonymous

              Anonymous - 2023-06-09

              Hi Cambell,

              Thanks for the response.
              That worked thanks.

              Sorry I missed that, I was looking for it.
              My excuse is that I am off sick with Covid and wasn't that focused.

              My network security team keeps flagging the PHP vulnerabilities, is there a version of this software that wont suffer like this?

              Regards,
              ROBERTO DE CAPRIO

               

              Last edit: Campbell Morrison 2023-06-09
              • Campbell Morrison

                MRBS works with the latest version of PHP. When upgrading PHP I think you should be able to keep the same php.ini file, at least between minor versions.

                 
  • Campbell Morrison

    I've now made the error message more helpful for the future in 569e819.

     
  • Campbell Morrison

    • status: open --> closed
    • Group: -->