1
rsmike
Re: PHP 5 problem - coders, help!
  • 2006/8/25 5:24

  • rsmike

  • Just popping in

  • Posts: 22

  • Since: 2004/4/22


Thanks. It worked!



2
rsmike
Re: PHP 5 problem - coders, help!
  • 2006/8/24 10:30

  • rsmike

  • Just popping in

  • Posts: 22

  • Since: 2004/4/22


Found errors in logs:

"PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 16 bytes) in (...)kernel/user.php on line 100

PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 58368 bytes) in (....)class/logger_render.php on line 88"

Any ideas? Please! :(

line 100 is "$this->initVar('user_occ', XOBJ_DTYPE_TXTBOX, null, false, 100);"
line 88 is "$ret .= '<table id="xo-logger-blocks" class="outer"><tr><th colspan="2">Blocks</th></tr>';"



3
rsmike
Re: PHP 5 problem - coders, help!
  • 2006/8/23 4:49

  • rsmike

  • Just popping in

  • Posts: 22

  • Since: 2004/4/22


Dave,

yes, I use 2.0.14.

I tried to insert this code. When "getObjects" is called from a system module, for login purpose for example (with "criteria" parameter), everything is ok. But when it is called from news module without any criteria (to list all users) - it hangs. Just a blank page, no debug info at all - even with "debug_print_backtrace".

Do you need more info?

Help, please!



4
rsmike
PHP 5 problem - coders, help!
  • 2006/8/22 7:01

  • rsmike

  • Just popping in

  • Posts: 22

  • Since: 2004/4/22


Hi.

My hosting provider uses php 5.1.4 & MySQL 5.0.22, so i'm trying to run latest XOOPS on this.

The system module works fine, but news 1.44 don't work at all. "submit.php" gives me completely blank page, even in debug mode. I found the place in "kernel/user.php" that seems to be a reason:

function getObjects($criteria null$id_as_key false)
    {
        
$ret = array();
        
$limit $start 0;
        
$sql 'SELECT * FROM '.$this->db->prefix('users');
        if (isset(
$criteria) && is_subclass_of($criteria'criteriaelement')) {
            
$sql .= ' '.$criteria->renderWhere();
            if (
$criteria->getSort() != '') {
                
$sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
            }
            
$limit $criteria->getLimit();
            
$start $criteria->getStart();
        }
        
$result $this->db->query($sql$limit$start);
        if (!
$result) {
            return 
$ret;
        }
        while (
$myrow $this->db->fetchArray($result)) {
            
$user = new XoopsUser();
            
$user->assignVars($myrow);
            if (!
$id_as_key) {
-->
HERE          $ret[] =& $user;
            } else {
-->
HERE      $ret[$myrow['uid']] =& $user;
            }
            unset(
$user);
        }
        return 
$ret;
    }


When the rows marked are commented, page is shown (not properly of course). When uncommented - blank page.

Can anyone make this code work at PHP5?



5
rsmike
Re: Help! Login trouble on 2.2.1
  • 2005/8/15 5:55

  • rsmike

  • Just popping in

  • Posts: 22

  • Since: 2004/4/22


Problem seems to be solved: table 'x_session' was broken.



6
rsmike
Re: Help! Login trouble on 2.2.1
  • 2005/8/13 6:29

  • rsmike

  • Just popping in

  • Posts: 22

  • Since: 2004/4/22


Hmm... uploaded 2.2.1 over my files, nothing changed.

I start to panic.



7
rsmike
Re: Help! Login trouble on 2.2.1
  • 2005/8/13 5:28

  • rsmike

  • Just popping in

  • Posts: 22

  • Since: 2004/4/22


Mithrandir,
still no luck.

I login with recovery.php, try to set PHP debug on, and get a first page with login fields again.



8
rsmike
Re: Help! Login trouble on 2.2.1
  • 2005/8/12 18:13

  • rsmike

  • Just popping in

  • Posts: 22

  • Since: 2004/4/22


jdseymour,
i don't know what AR is, but "gzip_compression" in xoops_config is set to 0. Just in case i tried to set it in 1, but it took no effect.

One more question... how to set debug mode through phpMyAdmin? debug_mode parameter is now set to a:1:{i:0;s:1:"";}, how can i turn it on?

Any suggestions? Or should i try to reupload all the 2.2.1 files once more...



9
rsmike
Help! Login trouble on 2.2.1
  • 2005/8/12 14:04

  • rsmike

  • Just popping in

  • Posts: 22

  • Since: 2004/4/22


Hello everybody.

I use XOOPS 2.2.1, update from 2.0.13 through 2.2 went well. Site worked for about half a day, and then happily stopped to log users in.

I worked with extended profiles administration in the admin area, and when updating the next field, suddenly got an "You have no permission.." error. I tried to log in using login block, XOOPS said "Thank you for logging in, rsmike" and... moved me to index page _with_ login block. So, i (and not a single user) can't login to site anymore.

Moreover, when i try to post a comment as an anonymous user (it is allowed) - i get a "No valid security token found in session" error.

I disabled all little core hacks (autologin, redirect_header, both from GIJOE) made couple hours before and worked without any trouble during this time. This didn't help.

I tried to change "session_expire" in xoops_config table (using phpMyAdmin, of course) from 100000 to 10000, it gave me nothing.

I tried to log in from different computers and browsers -zero effect.

"use_mysession" is set to 0.

Some cookie is set ("PHPSESSID=..."), as i can see in php_info().

What has happened? My fault somewhere, XOOPS bug, provider changed php settings, or what?

Tell me if any additional info is needed. I can give a login/pwd to anyone who would help.

Please, help - the site is down...



10
rsmike
How to hack "Last comments" block
  • 2005/7/6 7:39

  • rsmike

  • Just popping in

  • Posts: 22

  • Since: 2004/4/22


Hi everybody.

I have a little question.

I use "Last comments" block from a system module on my site to show last 20. When there is 20 comments on one single topic, block seems strange, isnt it - 20 similar links but no previous comments.

My idea was to change the SQL query, so that last 20 items commented, not 20 comments, would be shown. What do i have to change in "system_blocks.php"?

P.S. Query should be sth like
SELECT MAX(com_id), com_modidcom_itemidMAX(com_created), COUNT(com_id)
FROM x_xoopscomments
GROUP BY com_modid
com_itemid
ORDER BY 4 DESC
LIMIT 20


In this case, the problem is how to get com_title of last comment, and how to put this in module of course

10x for answers!




TopTop
(1) 2 »



Login

Who's Online

258 user(s) are online (181 user(s) are browsing Support Forums)


Members: 0


Guests: 258


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits