0
Welcome Guest! Login
0 items Join Now

php errors

    • Dionysus's Avatar

    php errors

    Posted 17 years 8 months ago
    • I know this is not apart of a template discussion, but i am having a trouble with a couple of issues, and wanted to know if someone here can answer my question:


      I am getting these errors, and wanted to know how i fix it.

      I have 2 errors:

      Notice: Undefined property: params in /home/xxxxxx/public_html/modules/mod_rd_section_blog.php on line 229

      This is what is on line 229
      $content_params =& new mosParameters( $r->params );



      Notice: Undefined property: state in /home/xxxxxx/public_html/mambots/content/bot_joomblog.php on line 36
      this is what is on line 36
      if (!$row->state) {return;}

      What do i need to do to the lines to stop the errors

      Cheers!
    • Donna Norris's Avatar

    Re: php errors

    Posted 17 years 8 months ago
    • This is a guess, but it sounds like your server's PHP configuration is set with Register Globals as on. This will generate those sort of notices. (Its not really an error, its more of a "safe-mode" for coders to catch sloppy coding. It's good for development but for a live site you'll typically want it turned off.) I'm going to guess your site is working correctly, its just spiting out notices like that. Here's a nice Wikipedia writeup on what it does if you really want to know what and why.

      That being said, you typically want Register Globals turned off for a live web site. I believe having it on leaves you open to some nasty security issues as well (cross scripting attacks and whatnot) (Someone correct me on this if I'm wrong)

      What will probably work is forcing Register Globals to be turned off in your .htaccess file that's in your root folder. (By the looks of what you posted, it should be in /home/xxxxxx/public_html/) At the end of that file, stick this line in:
      php_flag register_globals off

      Most of the times this will take care of it. If for whatever reason your hosting provider does not allow overrides of this sort (it's possible..) you will need to get in touch with them and have them set it for you. (It depends on how their server is set up.. they may not allow that sort of directive to be used)

      Once Register Globals is turned off, your page should render correctly.

      Edit: Here's a way to see if it's actually turned on or not. Make a little text file, call it info.php. Insert this code:
      <?php
      phpinfo();
      phpinfo(INFO_MODULES);
      ?>

      Send that to your server then load it up in a browser. Look for the Register Globals variable.
    • Last Edit: 17 years 8 months ago by .
    • Dionysus's Avatar

    Re: php errors

    Posted 17 years 8 months ago
    • Hi Donna,

      I actually have global register set to OFF.

      It's happened with it on and Off.
    • Donna Norris's Avatar

    Re: php errors

    Posted 17 years 8 months ago
    • Ah.. sounds like a bug in the code itself then. I'd get back with the original coders of the modules.

      That aside, aside from the notices, is it working correctly?

      Here's a different approach then. Assuming it's actually working, lets turn off warnings and notices, but not errors. Add this to htaccess instead.
      php_value error_reporting "E_ALL &~ (E_WARNING | E_NOTICE)"

      Same caveat about your host allowing overrides.

      This isn't fixing anything, it's just hiding the notices and warnings. (Chances are, the notices are not something critical anyway and it's functioning properly, but I'd check with the coders to be sure)
    • Last Edit: 17 years 8 months ago by .
    • Dionysus's Avatar

    Re: php errors

    Posted 17 years 8 months ago
    • The module is working properly,

      I only get the error when i have the debug set to maxium.

      I just wanted to tidy up the codes,
    • Donna Norris's Avatar

    Re: php errors

    Posted 17 years 8 months ago
    • Ahhhh I misunderstood, you're working on the code itself, I was thinking more "end user".

      PHP kicks that notice out when you're trying to read a variable that hasn't been set with any data.

      Personally, this should be sent to the coders of these two modules, but I'm a sucker for bug-fixing, and here's a guess.

      Line 36 of bot_joomblog.php -- change it to read as follows:
      &nbsp; if (isset($row->state))
      &nbsp; { if (!$row->state) {return;} }

      Line 229 of mod_rd_section_blog.php -- change it to read as follows:
      &nbsp; if (isset($r->params))
      &nbsp; {$content_params =& new mosParameters( $r->params );}

      This is a best guess.. it could very well break your code. Make sure you can revert to a copy just in case..basically all I'm doing is checking to see if there's actually data there before executing that bit of code.

      I'd give this a whirl, if it does the trick, great, but if not, you're really should be chatting to the guys who coded this.
    • Dionysus's Avatar

    Re: php errors

    Posted 17 years 8 months ago
    • Thanks,

      but that didn't work, i started getting more errors
    • Donna Norris's Avatar

    Re: php errors

    Posted 17 years 8 months ago
    • Ya your best bet then is to hit the authors of the various components generating the errors if you want to get it 100% debugged.

      Not positive on the RD_Section_Blog component, but I think it originates here , but it's in German. There's a "remake" here , and that one's in English.

      The other one I found more information.. including someone with the exact same error as you and an attachment that may fix it. You can read it here .
    • Dionysus's Avatar

    Re: php errors

    Posted 17 years 8 months ago
    • Thanks for your Awesome help Donna ;)
    • John Gholson's Avatar

    Re: php errors

    Posted 17 years 7 months ago
    • I cannot figure out how to turn register globals off i have tried using a php.ini file is that all I should do?

      do I need to change the code in globals.php

      or should I also change the .htacess file?

      do I have to put the php.ini file inside every joomla folder?

Time to create page: 0.048 seconds