Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Private messaging does not work?
1 2
Southdistrict
Posted on 22 Jul 2008, 23:16:10

Access: Member
Total Posts: 6
Joined: 2008-07-22

Hi ya'll,

When i try to PM another user, i get a strange array fault:

Quote:
Fatal error: [] operator not supported for strings in /mounted-storage/home45c/sub002/sc33250-FSII/testcase/members/modules/private.mod on line 143

This is a section between line 142 till 144 from the private.mod file:

Code:
foreach($sendtox as $d){
$sendto[] = strtolower(trim($d)); }

Can anyone tell me what's going on here? :ermm: And am i the only one with this Private messaging problem? If so, could somebody please send me a working private.mod or maybe paste the code here?
#289
Last edited by Southdistrict at 2008-07-23 07:46:48 Reason:
Southdistrict
Posted on 23 Jul 2008, 07:42:49

Access: Member
Total Posts: 6
Joined: 2008-07-22

Anyone? :sad:

#291
Southdistrict
Posted on 24 Jul 2008, 10:25:25

Access: Member
Total Posts: 6
Joined: 2008-07-22

This forum is quit dead right? Where is the admin.. Chris?
#295
Last edited by Southdistrict at 2008-07-28 09:07:06 Reason:
Chris
Posted on 07 Aug 2008, 11:35:46

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Hi Southdistrict,

I apologize for not replying sooner, I've had quite a lot going on and have in all honestly been ignoring the site up until now.

The private message error you're having I've been unable to replicate. From what I can tell it could possible be due to aA PHP problem, perhaps you're using an older version?
#316
Planetgroove
Posted on 21 Aug 2008, 22:55:13

Access: Member
Total Posts: 19
Joined: 2008-08-21

Same problem here ...
#353
Slinkysam
Posted on 21 Aug 2008, 23:59:22

Access: Member
Total Posts: 12
Joined: 2008-08-21

For reference, I don't have any problems with the PM as it is working OK on my end. Here is the condition I am running under:

Apache version 1.3.39 (Unix)
PHP version 5.2.5
MySQL version 5.0.51a-community-log
Architecture i686
Operating system Linux

Hope that is useful in some way for troubleshooting
-Sam
#358
Chris
Posted on 22 Aug 2008, 02:25:01

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

This was a tricky one as the code was working on both the machines I tested and developed it on. I've made a slight change to the private message module (modules/private.mod)

Edit it, around line 144~ you'll see this code

Code:
foreach($sendtox as $d){
$sendto[] = strtolower(trim($d));
}

Change it to the following.

Code:
$i = 0;
foreach($sendtox as $d){
$sendto[$i] = strtolower(trim($d));
$i++;
}

Save the changes then try sending a private message. This should fix the problem.
#359
Last edited by Chris at 2008-08-22 02:25:31 Reason:
Planetgroove
Posted on 22 Aug 2008, 08:56:24

Access: Member
Total Posts: 19
Joined: 2008-08-21

That gives the following error:


Warning: array_flip() [function.array-flip]: The argument should be an array in /xxx/x/x/test/news/modules/private.mod on line 145

Warning: array_keys() [function.array-keys]: The first argument should be an array in /xxx/x/x/test/news/modules/private.mod on line 145

Warning: Invalid argument supplied for foreach() in /xxx/x/x/test/news/modules/private.mod on line 148
Message sent to the following users.
#376
Planetgroove
Posted on 22 Aug 2008, 09:10:54

Access: Member
Total Posts: 19
Joined: 2008-08-21

If it helps, figuring out the problem: sometimes there occurs this message when trying to access the private messages:


Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 10 in /x/x/x/test/news/config.php on line 80

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 11 in /x/x/x/test/news/config.php on line 83

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 12 in /x/x/x/test/news/config.php on line 88
Private Messages
You can't edit this section. Contact the administrator.



Sometimes only the last term "You can't edit ..." pops up. Even if the special section is not deactivated. That takes place even for some sections in admin-accounts, where everything should be accessible.

I have not found out how to reproduce that - takes place almost randomly ...
Could have something to do with logging between two different accounts and not updating the relevant user-rights accordingly/just in time by the script?
:new_huh:

Maybe it is of some help for you, to get into that.
:arrow:
#377
Last edited by Planetgroove at 2008-08-22 09:12:37 Reason:
Chris
Posted on 22 Aug 2008, 09:25:35

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Planetgroove,

thanks for helping me try solve this, the code you edited before

Code:
$i = 0;
foreach($sendtox as $d){
$sendto[$i] = strtolower(trim($d));
$i++;
}

if you can try adding this line above that so it should now be

Code:
$sendto = array();
$i = 0;
foreach($sendtox as $d){
$sendto[$i] = strtolower(trim($d));
$i++;
}

then try send a private message to see if it works.

As for the error randomly appearing I can't see any reason for this happening, can you create a new file on your server called phpinfo.php and inside it put this code

Code:
<?php
phpinfo
();
?>


upload it to your server and link me to it, I want to take a look at the configuration to see if there is anything I can find that could possibly be causing this.
#378
1 2
Network-13.com © 2013