Subsonic registration engine

A little external engine to register users in Subsonic

Moderator: moderators

Re: Subsonic registration engine

Postby SparkyRih » Mon Aug 06, 2012 6:42 pm

The password reset feature in 4.7 beta3 would drop the requirement of the MySQL database, but only if you don't use the approval feature, that one still requires a "temporary database"...
VMWare ESXi 5.5 > Ubuntu 16.04 > Subsonic 6.0 (Modded with PHP based registration feature)

Image
User avatar
SparkyRih
 
Posts: 216
Joined: Wed May 11, 2011 1:52 pm
Location: The Netherlands

Re: Subsonic registration engine

Postby dr3van » Mon Aug 06, 2012 7:36 pm

Also after looking into it, I am a little confused on how your password reset function works? Why do the emails link to "http://api.schattorie.nl/gbuser/changepass.php?id="? Should it be linked to you or should it have been changed to something on my end?
Subsonic Server: https://dr3van.com

build
Ubuntu Server 12.10 64 bit LAMP
Subsonic 4.7 custom
dr3van
 
Posts: 48
Joined: Wed Feb 22, 2012 8:43 pm

Re: Subsonic registration engine

Postby SparkyRih » Mon Aug 06, 2012 11:54 pm

dr3van wrote:Also after looking into it, I am a little confused on how your password reset function works? Why do the emails link to "http://api.schattorie.nl/gbuser/changepass.php?id="? Should it be linked to you or should it have been changed to something on my end?


You're refering to the *.txt files in the mail directory?
that url in the passresetmail.txt should point to your webserver, maybe I need to add a function to automate that...
VMWare ESXi 5.5 > Ubuntu 16.04 > Subsonic 6.0 (Modded with PHP based registration feature)

Image
User avatar
SparkyRih
 
Posts: 216
Joined: Wed May 11, 2011 1:52 pm
Location: The Netherlands

Re: Subsonic registration engine

Postby dr3van » Thu Aug 09, 2012 2:09 pm

Any idea why my registration seems to take forever? After filling out the registration page it seems to take about 3-5 minutes before it goes to the next page. Same happens when clicking the approve on the admin page. I have looked at the user tables in mySQL while registering a test user and it is almost instantaneous. I have also set the php memory up substantially but saw no performance increase. Any ideas where to look to speed it up a bit?
Subsonic Server: https://dr3van.com

build
Ubuntu Server 12.10 64 bit LAMP
Subsonic 4.7 custom
dr3van
 
Posts: 48
Joined: Wed Feb 22, 2012 8:43 pm

Re: Subsonic registration engine

Postby gurutech » Thu Aug 09, 2012 3:52 pm

dr3van wrote:Any idea why my registration seems to take forever? After filling out the registration page it seems to take about 3-5 minutes before it goes to the next page. Same happens when clicking the approve on the admin page. I have looked at the user tables in mySQL while registering a test user and it is almost instantaneous. I have also set the php memory up substantially but saw no performance increase. Any ideas where to look to speed it up a bit?



For me, it's because I don't have the "sendmail" component configured on my system. It still goes through the motions of scripting the email and "sending" it, but since there is nothing in place to actually send it, it can take a couple minutes to go to the next page.
Image
gurutech
 
Posts: 492
Joined: Sun Jan 15, 2012 9:56 pm

Re: Subsonic registration engine

Postby dr3van » Thu Aug 09, 2012 6:57 pm

gurutech wrote:For me, it's because I don't have the "sendmail" component configured on my system. It still goes through the motions of scripting the email and "sending" it, but since there is nothing in place to actually send it, it can take a couple minutes to go to the next page.



My sendmail is configured and sending mails...
Subsonic Server: https://dr3van.com

build
Ubuntu Server 12.10 64 bit LAMP
Subsonic 4.7 custom
dr3van
 
Posts: 48
Joined: Wed Feb 22, 2012 8:43 pm

Re: Subsonic registration engine

Postby SparkyRih » Fri Aug 10, 2012 10:33 am

Your server is very slow, it was faster before... But it's not the script, by default, a script can only take 30 seconds to run...

Is your php.ini setup correctly:
Code: Select all
sendmail_path = /usr/sbin/sendmail -t -i -r noreply@yourdomaon.com


Make sure you don't get the CLI version of the php.ini...
VMWare ESXi 5.5 > Ubuntu 16.04 > Subsonic 6.0 (Modded with PHP based registration feature)

Image
User avatar
SparkyRih
 
Posts: 216
Joined: Wed May 11, 2011 1:52 pm
Location: The Netherlands

Re: Subsonic registration engine

Postby dr3van » Fri Aug 10, 2012 1:48 pm

SparkyRih wrote:Is your php.ini setup correctly:
Code: Select all
sendmail_path = /usr/sbin/sendmail -t -i -r noreply@yourdomaon.com


Yes, it is set correctly. Any ideas on how to test/diagnose what is causing this?

I can look and when I click register they go into MySQL quickly

I can also say curl seems to work quickly because the testing script I made works well and it seems to have registered the user before it redirects me to the page saying that they where successfully approved.

That only leaves sendmail I believe.
Code: Select all
echo 'this is a test'| mail -s test_email user@somedomain

Seems to send off an email rather quickly though
Subsonic Server: https://dr3van.com

build
Ubuntu Server 12.10 64 bit LAMP
Subsonic 4.7 custom
dr3van
 
Posts: 48
Joined: Wed Feb 22, 2012 8:43 pm

Re: Subsonic registration engine

Postby SparkyRih » Sat Aug 11, 2012 11:26 am

Have you tried rebooting the server?
VMWare ESXi 5.5 > Ubuntu 16.04 > Subsonic 6.0 (Modded with PHP based registration feature)

Image
User avatar
SparkyRih
 
Posts: 216
Joined: Wed May 11, 2011 1:52 pm
Location: The Netherlands

Re: Subsonic registration engine

Postby dr3van » Sat Aug 11, 2012 6:07 pm

SparkyRih wrote:Have you tried rebooting the server?


Yes, It has been restarted a couple times.
Subsonic Server: https://dr3van.com

build
Ubuntu Server 12.10 64 bit LAMP
Subsonic 4.7 custom
dr3van
 
Posts: 48
Joined: Wed Feb 22, 2012 8:43 pm

Re: Subsonic registration engine

Postby SparkyRih » Mon Aug 13, 2012 11:20 am

I think you need to review all your server settings than...

My servers and all the test servers run the new script, neither of them runs slow...
And if the mail is send quickly, that means that the script already finished, because that's the last thing it does...

You can try to add exit(); on line 54 in the approve.php, but I dont'think that will change anything...

Code: Select all
echo "</center>\n";
exit();
}elseif($_POST['delete']) {
VMWare ESXi 5.5 > Ubuntu 16.04 > Subsonic 6.0 (Modded with PHP based registration feature)

Image
User avatar
SparkyRih
 
Posts: 216
Joined: Wed May 11, 2011 1:52 pm
Location: The Netherlands

Re: Subsonic registration engine

Postby dr3van » Tue Aug 14, 2012 4:16 pm

SparkyRih wrote:I think you need to review all your server settings than...

My servers and all the test servers run the new script, neither of them runs slow...
And if the mail is send quickly, that means that the script already finished, because that's the last thing it does...

You can try to add exit(); on line 54 in the approve.php, but I dont'think that will change anything...

Code: Select all
echo "</center>\n";
exit();
}elseif($_POST['delete']) {



It is not sending the emails from the registration script fast. It seems to send fast if I use the terminal command:
Code: Select all
echo 'this is a test'| mail -s test_email user@somedomain.com


But in the registration script it seems to send slow and it seems to be where it hangs... I'm not sure what would be different between running it this way versus the way the registration script runs it?
Subsonic Server: https://dr3van.com

build
Ubuntu Server 12.10 64 bit LAMP
Subsonic 4.7 custom
dr3van
 
Posts: 48
Joined: Wed Feb 22, 2012 8:43 pm

Re: Subsonic registration engine

Postby willieb » Fri Aug 17, 2012 4:03 pm

Ok I decided to install. So far so good, followed the directions but I'm getting a mysql error. I know how to admin mysql via phpmyadmin.

I went into phpmyadmin and created user "secular1", and created a db and added all privileges. I added tables in query's.

I went into ./lib/config.php and changed db connect settings to:

$dbhost = "localhost";
$dbuser = "secular1";
$dbpass = "password";
$dbname = "secular1";

I know the username and password is correct. I get the subsonic registration login with capcha and all that good stuff, fill it out and get error message below.

I am running Windows XP Pro with XAMPP (Apache, MYSQL, PHP/w cURL, and GD, etc). I'm not sure what's up, maybe something to do with mysql permissions with XAMPP? Maybe I should try the root username? Any other ideas? Thanks in advance, great mod!

Mozilla Firefox_2012-08-17_11-48-20.jpg
willieb
 
Posts: 54
Joined: Fri Jul 27, 2012 3:03 pm

Re: Subsonic registration engine

Postby willieb » Sat Aug 18, 2012 5:14 am

Ok I changed the mysql user to root and was able to get the registration part working, but no email yet. Stay tuned, still working on it as time permits. Thanks for these great mods!
willieb
 
Posts: 54
Joined: Fri Jul 27, 2012 3:03 pm

Re: Subsonic registration engine

Postby dr3van » Mon Aug 20, 2012 2:01 pm

willieb wrote:Ok I changed the mysql user to root and was able to get the registration part working, but no email yet. Stay tuned, still working on it as time permits. Thanks for these great mods!



I had a problem with my isp not letting me run my own mail server, I had to set up sendmail to use a smtp server I have access to already and bounce everything through the ISPs smtp server.
Subsonic Server: https://dr3van.com

build
Ubuntu Server 12.10 64 bit LAMP
Subsonic 4.7 custom
dr3van
 
Posts: 48
Joined: Wed Feb 22, 2012 8:43 pm

PreviousNext

Return to Subsonic Registration Engine

Who is online

Users browsing this forum: No registered users and 0 guests