after login staff

2008-03-07
2013-05-30
  • after login staff user perform this message:

    Fatal error: Call to undefined function: mysql_real_escape_string() in c:\ibserver\www\openbiblio\classes\Query.php on line 223

     
    • Micah Stetson
      Micah Stetson
      2008-03-07

      Did the install work correctly?  What version of PHP are you running?  I'm going to guess that it's earlier than 4.3.0.  The documentation says we only require 4.2.0, but apparently I've broken that by using mysql_real_escape_string() which was added in 4.3.0.  You can work around this particular problem by editing classes/Query.php and changing the calls to mysql_real_escape_string() to use mysql_escape_string().  In 0.6.0, that's only on lines 223 and 226.  You want to change this:

      mysql_real_escape_string($arg, $this->_link)

      to this:

      mysql_escape_string($arg)

      If you'd like to help me make the system work well on pre-4.3.0 versions, then make this change and test the rest of the system to see if there are other weird behaviors.

      Sorry for the trouble,

      Micah

       
    • thanks, you have very nice guide. 

      how to set read_settings.php line 74...

      Warning: Wrong parameter count for setlocale() in ...\shared\read_settings.php on line 74

      Warning: Wrong parameter count for setlocale() in ...\shared\read_settings.php on line 75

      Warning: Cannot send session cache limiter - headers already sent (output started at ...\shared\read_settings.php:74) in ...\shared\common.php on line 65

       
      • Micah Stetson
        Micah Stetson
        2008-03-07

        Aha.  Edit shared/read_settings.php and look for these lines:

          if ($set->getLocale()=="de") {
            setlocale(LC_MONETARY, 'de_DE', 'de_DE@euro', 'de', 'ge', 'deu_deu', 'deu', 'Germany', 'de_DE.ISO8859-1');
            setlocale(LC_NUMERIC, 'de_DE', 'de_DE@euro', 'de', 'ge', 'deu_deu', 'deu', 'Germany', 'de_DE.ISO8859-1');
          } elseif ($set->getLocale()=="en") {
            setlocale(LC_MONETARY,'en_US.iso885915', 'en', 'en_US', 'eng');
            setlocale(LC_NUMERIC,'en_US.iso885915', 'en', 'en_US', 'eng');
          } else {
            setlocale(LC_MONETARY,$set->getLocale());
            setlocale(LC_NUMERIC,$set->getLocale());
          }

        Remove them all and replace them with this:

          setlocale(LC_MONETARY,$set->getLocale());
          setlocale(LC_NUMERIC,$set->getLocale());

        As you find these problems, I'm fixing them in CVS so the next release won't have them.  The fixes I'm putting in CVS are a bit different from the edits I'm sending you, just so people with newer versions of PHP still get the newer functionality.  Thanks for your help with this,

        Micah

         
    • Ok , After edit shared/read_settings.php and set my username and pwd perform this message:

        Invalid signon.

      help me to login the Staff Login. mercy
       

       

       

       
      • Micah Stetson
        Micah Stetson
        2008-03-18

        I'm sorry for the delay in replying.  I'm not sure just what this problem is.  I'll install PHP 4.2, do some testing myself, and get back to you.  In the mean time, what version of MySQL are you using?

        Micah

         
        • Micah Stetson
          Micah Stetson
          2008-04-05

          Well, it took me a bit, but I've installed PHP 4.2.0 and run my standard battery of tests against it.  With the changes we talked about earlier, I'm not seeing any problem, so it looks like the cause is elsewhere.  Again, what version of MySQL are you using?

          Micah

           
    • Invalid signon.

      help me to login the StaffLogin.