Roundcube Community Forum

 

Auto User Email Creation

Started by tuney, July 28, 2006, 09:12:11 AM

Previous topic - Next topic

leopard

Somebody have another auto sign up script? i use webmin with virtual servers modul. i dont use cpanel :-\

Vineman

Im having a problem with this. I uploaded everything, did everything correctly and yet when I submit a registration submit.php comes up blank. Anyone know what I need to fix?

After submitting, my error logs are full of this:
[Mon Aug 14 22:26:55 2006] [error] PHP Warning: feof(): supplied argument is not a valid stream resource in /home/freeisd/public_html/mail/emsu/signup.php on line 92
[Mon Aug 14 22:26:55 2006] [error] PHP Warning: fgets(): supplied argument is not a valid stream resource in /home/freeisd/public_html/mail/emsu/signup.php on line 93

tuney

Have you ran the SQL query, ' INSERT INTO `cpanel` VALUES ('cpanel_username', 'cpanel_password', 'cpanel_ip', 'cpanel_port', 0); ' and ensured that you have replace 'cpanel_username' etc with your details ?

tuney

UPDATED RELEASE.....v1.1

There was a small bug in v1.0 where the domain was hard coded in signup.php and was not read from db.inc.php.

Anyone who was having any problems with the previous release download this latest release with the bug fixed.

Sorry about that, my fault for rushing it through.
Many thanks to mbx5nitro for pointing this out on an earlier post :)


Also starting work on an admin section as suggested by Scubes13, thank you.
This will include a master admin account, an option to give admin status to any other account, create/delete accounts, send password/change password/recover password and change quota.


Vineman

Finally got it working. Here's a few errors or things that could be put into the notes:

My error was that in signup.php, you have frontend/x/mail/, however some people (like myself) have frontend/x2/mail/. A note about this in the readme would probably be very helpful.

The confirmation email doesnt send the user/pass, despite having space for it.
$messageprt1 = &quot;,<br /><br />This is an automatically generated email.<br /><br />There is no need to reply to this email.<br /><br />Welcome to your new email account.<br /><br /><b>Username - &quot;;
$messageprt2 = &quot;</b><br /><b>Password - &quot;;

And a feature request: On completion of the registration, either offer a link back to the login page, or automatically redirect after a few seconds.

Overall though very nice job.

tuney

Many thanks for that.

I beleive that the 'x' in the cpanel url is the 'skin' that's used and you are right that not all people are going to be using the same.
I will put this as a variable that can be set in the configuration of db.inc.php in the future release.

As far as I am aware the username and password is sent in a confirmation email to both the new email address created and the alternate email given.
$messageprt1 and $messageprt2 are variables in db.inc.php so that the content of the message can easily be changed if desired. The username and password are appended to these in signup.php

On completion of signup you should be getting a page with a link back to the login page.

Account Creation Successful
Your email account has been created.
Please check your new email address for information about your account

You may now Login



As mentioned before, this release was rushed through somewhat. The script was originaly written as a hard coded version to work on one server for one particular domain with no options for customisation.
It was only after some interest from others that I decided to offer it to all and I am very grateful for everyones support and help in finding the bugs.

The domain it was originally written for is still running the hard coded version but I am starting work on an optional admin interface that will tie the database and mail server together for creating/deleting accounts, changing passwords and quotas etc. and will incorporate the 'x' variable and any other bug fixes.

Now that I have a little time, I will test the latest release version and ensure that all is working as should be! :D


btcentral

Great work, keep it up, i'm looking forward to the admin panel :)
http://www.btcentral.org.uk - Cheap, Top Quality Web-design.

abordley

Im having a problem with this. I uploaded everything, did everything correctly and yet when I submit a registration submit.php comes up blank.

After submitting, my error logs are full of this:
[Wed Aug 16 15:13:51 2006] [error] PHP Warning: feof(): supplied argument is not a valid stream resource in /home/bridgeof/public_html/email/emsu/signup.php on line 183
[Wed Aug 16 15:13:51 2006] [error] PHP Warning: fgets(): supplied argument is not a valid stream resource in /home/bridgeof/public_html/email/emsu/signup.php on line 185

I see someone else had the same problem...but after reading I am still unsure of how to resolve the issue. Could someone please provide instructions to what it is I need to do.
It would be appreicated.

Thanks
Allie

Vineman

First make sure you're running the latest version. Then be sure to check your cpanel info in your mysql database. One of my problems was that I had accidentally put my MySQL user/pass into the fields instead of the cpanel user/pass. Also check and make sure the IP is the IP of your server.

abordley

I have the latest version and I have confirmed that I have the correct cpanel information in the database. I am not sure if this could be a problem, but I am using a shared IP. I do not think that is a problem. I have many other databases running on this server and they all run just fine...

Any other ideas I can check?

Thanks in advance.
Allie

Vineman

I run on a shared server just fine.

abordley

I notice that before it gives me a blank page it hangs.

Again, the information in the cpanel table is correct....it is what I use to login to the cpanel of the domain as well as the port.

is there any other way of testing?

Allie

tuney

Sorry to hear you're having some problems.


Have a look at this post....http://roundcubeforum.net/forum/index.php?topic=232.msg1956#msg1956
If your URL to CPanel has something other than ' frontend/x/mail/ ' in it, eg. ' frontend/x2/mail/ ' then you will need to edit the Cpanel URL in signup.php to match.
This is being corrected in the next release and will be a variable set in db.inc.php

Or, it may be a problem with the allow_url_fopen option.

Check for allow_url_fopen in your phpinfo and ensure that it is set to '1' or on.

If you need to get your phpinfo create a new .php page called phpinfo.php containing the following....
phpinfo();
?>


Upload this to your site and access it in your browser to display phpinfo and settings.
Don't forget to delete the page from your server after use to prevent others from viewing.


tuney

Admin section is coming along with the following functions completed and working.....
Delete Account
Create Account (with option to set quota different from default set in db.inc.php)
Change Quota
Send Password
Change Password
Give Admin Privelages (any user given admin privelages will be able to login to the admin panel using their usual email login)

A list of email accounts are displayed in a table which includes email address, quota, name, alternate email address, date and time account was created and IP address.

Just some final integration and GUI to finish off.
After testing I will make available for download.

Anything else anyone thinks might be nice to have on there, let me know.



RustedNut

Alright, fixed the frontend url issue. But now after I register, put in the correct pass it keeps saying Log In Failed.

I take it that its an isssue with the main.inc.php? I wasnt sure on some of the settings so if someone that knows their stuff with roundcube could hit me up on AIM or I would appreciate it. AIM: acid induction

Oh tuney what about multiple domain names on registration page?