Invision Byte: PM on Group Change - Invision Byte

Jump to content

Welcome to Invision Byte

Welcome to Invision Byte, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information. Take advantage of it immediately, Register Now or Sign In.

  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Purchase one of the products available and quickly receive support for it!
  • View and use the shoutbox to communicate
  • Get your own profile and make new friends
  • Customize your experience here
Guest Message by DevFuse
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

PM on Group Change

#1
User is offline   terabyte 

  • Administrator
  • PipPipPipPipPipPipPipPip
  • Group: Management
  • Posts: 8,907
  • Joined: 30-September 07
  • Location:Italy
  • IP.Board:3.1.x
  • Current Mood: Current Mood: Insomnious
Posted Image
File Name: PM on Group Change
File Submitter: terabyte
File Submitted: 21 Aug 2011
File Updated: 04 Aug 2013
File Category: IP.Board
IP.Board 3.0 Compatible: No
IP.Board 3.1 Compatible: No
IP.Board 3.2 Compatible: Yes
IP.Board 3.3 Compatible: Yes
IP.Board 3.4 Compatible: Yes

This mod adds the ability to send an automatic PM to your members when an admin edits their primary group from the ACP.

Features:
  • No file edits, coded as an hook!
  • Easily enable/disable the hook from the Admin CP
  • Ability to specify always the same account to send the PMs or use the account of the admin that edited the group
  • Ability to exclude certain groups by default from receiving a PM (useful for the banned group)
  • Ability to setup a custom PM subject and message from the ACP with some quick tags (member name and new group name)
  • New options in the ACP near the dropdown of the primary group when editing a member to not send a PM to individual accounts
  • The hook itself makes use of the MemberSync option so every time the group changes a PM is sent


Click here to download this file
Board Rules - Available Products - Products Faqs - Need a Custom Work?


* Don't PM me for support, post in the forum or submit a ticket from the client area! *
1

#2
User is offline   Gorgon 

  • n00b
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 30-December 11
  • IP.Board:3.2.x
  • Current Mood: Current Mood: None Chosen
Hello there,

I currently have issue with Hook, actually the PM is sent but it's in HTML Format. All the recipient gets is this,

Hello User,<br /><br />Your member group has been changed from &quot;<span style='color:#0B6121'>Members</span>&quot; to &quot;<span style='color:#04B431'>Advanced Members</span>&quot;.<br /><br /><br />Regards


PS: Fixed it. Moving it's priority in Hooks page to the top fixed it.

This post has been edited by Gorgon: 24 January 2012 - 07:33 PM

0

#3
User is offline   peaderfi 

  • n00b
  • Pip
  • Group: Premium Members
  • Posts: 4
  • Joined: 12-December 07
  • IP.Board:N/A
  • Current Mood: Current Mood: None Chosen
I've been getting 500 errors when this hook is enabled while editing members.

Premature end of script headers: php-cgi, referer: http://test.modstation.com/admin/index.php?adsess=***&app=members&&module=members&section=members&do=viewmember&member_id=***


It only happens when this hook is enabled. The members group gets edited but then this happens.

If I disable the hook I don't get the error.

Now I realise that 500 errors indicate a server misconfiguration, but I was hoping you would have some idea of where I should start looking?
0

#4
User is offline   terabyte 

  • Administrator
  • PipPipPipPipPipPipPipPip
  • Group: Management
  • Posts: 8,907
  • Joined: 30-September 07
  • Location:Italy
  • IP.Board:3.1.x
  • Current Mood: Current Mood: Insomnious

View Postpeaderfi, on 13 February 2012 - 08:01 PM, said:

I've been getting 500 errors when this hook is enabled while editing members.

Premature end of script headers: php-cgi, referer: http://test.modstation.com/admin/index.php?adsess=***&app=members&&module=members&section=members&do=viewmember&member_id=***


It only happens when this hook is enabled. The members group gets edited but then this happens.

If I disable the hook I don't get the error.

Now I realise that 500 errors indicate a server misconfiguration, but I was hoping you would have some idea of where I should start looking?


I'm not sure.. the code in the modification just calls the messenger and sends the PM so it's all IPB default code. There should be some kind of more specific error logged on the server, can you check with your host if they can provide more details?
Board Rules - Available Products - Products Faqs - Need a Custom Work?


* Don't PM me for support, post in the forum or submit a ticket from the client area! *
0

#5
User is offline   Gary 

  • Linux Within !
  • PipPip
  • Group: Premium Members
  • Posts: 20
  • Joined: 26-October 09
  • Interests:Server Management.
  • IP.Board:3.2.x
  • Current Mood: Current Mood: Goofy
500 Internal server errors are 99.99% caused by incorrect ownership of some files,


Ask your host to make sure your public_html/ is chowned to your user.


Rent a SYS admin

  • MySql Optimization
  • PHP Tuning
  • Configuration & Security
  • WHM / cPanel Management

Send A PM For More Details.


MSN: linuxgary@live.com


0

#6
User is offline   peaderfi 

  • n00b
  • Pip
  • Group: Premium Members
  • Posts: 4
  • Joined: 12-December 07
  • IP.Board:N/A
  • Current Mood: Current Mood: None Chosen

View Postterabyte, on 14 February 2012 - 10:22 PM, said:

I'm not sure.. the code in the modification just calls the messenger and sends the PM so it's all IPB default code. There should be some kind of more specific error logged on the server, can you check with your host if they can provide more details?


That is the more specific logging from the server:

Premature end of script headers: php-cgi, referer: http://test.modstation.com/admin/index.php?adsess=***&app=members&&module=members&section=members&do=viewmember&member_id=***




View PostGary, on 15 February 2012 - 02:53 PM, said:

500 Internal server errors are 99.99% caused by incorrect ownership of some files,

Ask your host to make sure your public_html/ is chowned to your user.


It's a self managed VPS. All of the files are owned by the user under which the site is run (There are a couple of sites on the server each with it's own dedicated user which has no access to any other users files).
0

#7
User is offline   Gary 

  • Linux Within !
  • PipPip
  • Group: Premium Members
  • Posts: 20
  • Joined: 26-October 09
  • Interests:Server Management.
  • IP.Board:3.2.x
  • Current Mood: Current Mood: Goofy
It will not harm in trying though, If you cd to your directory:

cd /home/user/


chown user:user public_html/

That will make sure ALL files are run buy the user of the account.

Increase the values in the php.ini

max_execution_time = 90;
max_input_time = 90;
memory_limit = 128M;


chmod the file to 755 also when you tail the messages.

This post has been edited by Gary: 16 February 2012 - 06:36 PM

Rent a SYS admin

  • MySql Optimization
  • PHP Tuning
  • Configuration & Security
  • WHM / cPanel Management

Send A PM For More Details.


MSN: linuxgary@live.com


0

#8
User is offline   peaderfi 

  • n00b
  • Pip
  • Group: Premium Members
  • Posts: 4
  • Joined: 12-December 07
  • IP.Board:N/A
  • Current Mood: Current Mood: None Chosen

View PostGary, on 16 February 2012 - 06:32 PM, said:

It will not harm in trying though, If you cd to your directory:

cd /home/user/


chown user:user public_html/

That will make sure ALL files are run buy the user of the account.


I've wanted to get a full listing of all of the files and their owners (and modified times anyway) so I used this instead:

ls -l -R public_html > dir.txt


and used this regex on the file:

[^\s]+\s+\d+\s+user\s(?!user)


which turned up no results, so all of the files are owned by the user

View PostGary, on 16 February 2012 - 06:32 PM, said:

But going into it, 500 internal can be caused by a lot of things actually !

Do this in ssh

tail -f /var/log/messages

Then edit the member or what ever you do to cause the issue, it WILL show, Then post back with the error.

what PHP are you running ?

See if it's some sort of CGI like mod_fcgi then the time out could be to low, It could be lots of things, Best bet is to give the error on when the 500 shows then the fix will be simple


This helped a lot. Basically I had the Zend Optimizer extension activated in my php.ini (in addition to the ioncube extension) and a seg_fault was occurring in the Zend Optimizer extension. As I don't have any software that requires Zend encoding on my servers I simply disabled the extension in my php.ini and it solved the issue.

Whether or not it was a mismatch between the Zend extension and my PHP version or whatever it was I'm not too concerned about as I don't intend to use Zend encoded software any time soon.

Thanks for the pointer though!

(I do use the PHP CGI SAPI though as mod_php is incompatible with the mpm module I use to isolate the users)

View PostGary, on 16 February 2012 - 06:32 PM, said:

Increase the values in the php.ini

max_execution_time = 90;
max_input_time = 90;
memory_limit = 128M;


chmod the file to 755 also when you tail the messages.


The memory_limit was already 128M, however the max_execution_time is 30 and max_input_time is 60. But they shouldn't have caused the issue I was seeing as the execution time was far far less than 30 seconds (On the order of 1-2 seconds from click to seeing the 500 error).

This post has been edited by peaderfi: 17 February 2012 - 01:02 PM

0

#9
User is offline   Gary 

  • Linux Within !
  • PipPip
  • Group: Premium Members
  • Posts: 20
  • Joined: 26-October 09
  • Interests:Server Management.
  • IP.Board:3.2.x
  • Current Mood: Current Mood: Goofy
Glad I was some how able to assist you :)
Rent a SYS admin

  • MySql Optimization
  • PHP Tuning
  • Configuration & Security
  • WHM / cPanel Management

Send A PM For More Details.


MSN: linuxgary@live.com


0

#10
User is offline   DJRAJE 

  • n00b
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 15-March 12
  • IP.Board:3.1.x
  • Current Mood: Current Mood: Bashful
i got this error to after install this hook

503 Service Unavailable

0

#11
User is offline   terabyte 

  • Administrator
  • PipPipPipPipPipPipPipPip
  • Group: Management
  • Posts: 8,907
  • Joined: 30-September 07
  • Location:Italy
  • IP.Board:3.1.x
  • Current Mood: Current Mood: Insomnious

View PostDJRAJE, on 30 May 2012 - 12:46 PM, said:

i got this error to after install this hook

503 Service Unavailable



This is a server error, could you ask your host to check the server logs and provide you the "real" error?
Board Rules - Available Products - Products Faqs - Need a Custom Work?


* Don't PM me for support, post in the forum or submit a ticket from the client area! *
0

#12
User is offline   Rog_Enk 

  • n00b
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 29-July 12
  • IP.Board:3.3.x
  • Current Mood: Current Mood: None Chosen
Has anyone else found this is broken with 3.3.4?

Or do I have another issue :(

Fails to send PM silently when group changes, no error appears to be logged.
0

#13
User is offline   terabyte 

  • Administrator
  • PipPipPipPipPipPipPipPip
  • Group: Management
  • Posts: 8,907
  • Joined: 30-September 07
  • Location:Italy
  • IP.Board:3.1.x
  • Current Mood: Current Mood: Insomnious
It was fine until 3.3.3 and nothing has changed in 3.3.4 that could break it afaik. I'll try to have a look though.
Board Rules - Available Products - Products Faqs - Need a Custom Work?


* Don't PM me for support, post in the forum or submit a ticket from the client area! *
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users