Can't get to auto create accounts.
desm0n - May 31, 2006 - 07:39
| Project: | Cpanel Integration |
| Version: | 4.7.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | yecarrillo |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
Module installed and working and proceeded to setup.
I log into my cpanel through http://www.porttalbotchat.co.uk:2082 so i typed in that as the server address and got an error. So i changed it to www.porttalbotchat.co.uk and set the port as 2082 and the error went away.
I set up the username and password as required and enabled email accounts and access control. Everything appeared as it should be.
However when enabling a new email account per user basis nothing is being created in cpanel it would seem.
I set the email domain to be porttalbotchat.co.uk.
porttalbotchat.co.uk is set as sub domain of onebigbite.com so i'm wondering if this is the problem ?
Any guidiance here would be appreciated.

#1
Ok. Here some things would be happening.
1. I test this module with cPanel v.10.8.2-STABLE_120. What is your version? Look at source code of your admin pages for this info.
2. cPanel is a themable aplication. All http requests for this module are done using the address with the "x" theme. Check your cPanel administration pages. Did you see URLs like these:
http://www.porttalbotchat.co.uk:2082/frontend/x/ftp/realdodelftp.html
http://www.porttalbotchat.co.uk:2082/frontend/x/mail/dopasswdpop.html
If not, send me some examples of your cPanel admin URLs to do something about this "themes" issue.
If you see the README.txt file you will find:
Server name is just the "server name". use the "port" textfield to set the port of your admin interface.
3. "Mail domain" is your own domain or subdomain.
Login into your cPanel, navigate to "Mail"->"Manage/Add/Remove Accounts"->"[ "[Add Account ]"
You will get at there a list of your registered domains (or created subdomains) on where you can create email accounts. Use one of these values.
4. To use this module, your cPanel account needs to have "unlimited email accounts" option. If not, only your "x" first Drupal users who apply for the accounts will have this privilege; where "x" is the number of email accounts your host provider lets you create.
On the main Cpanel page you will see something like
"Email Accounts x / 10000"
5. Creation or deletion of email/ftp accounts are logged at watchdog. Login into Drupal see the logs. Please look for this values:
Error creating cPanel email account username@porttalbotchat.co.ukor
Created cPanel email account username@porttalbotchat.co.uk with password : xxx at datePlease list me this logs to see what is happening .
#2
ok logging into my cpanel gives me the following url :-
http://www.porttalbotchat.co.uk:2082/frontend/rvblue/index.html
Also the cpanel version is 10.8.2-RELEASE-83
So i set up cpanel module as follows :-
Cpanel Server Settings
www.porttalbotchat.co.uk
Port
2082
I then set the username and password for my login.
Email account options are enabled with 10meg quota and the mail domain (which i checked as per your instructions) is porttalbotchat.co.uk with unlimited accounts.
Creating the email account however gives me (in the logs)
Error creating cPanel email account denzel@porttalbotchat.co.uk
I think it could be an issue with the theme default. Clicking on adding an email account i get the following url
http://www.porttalbotchat.co.uk:2082/frontend/rvblue/mail/pops.html?extr... <--- To the account page
http://www.porttalbotchat.co.uk:2082/frontend/rvblue/mail/addpop2.html <--- to add an email account
#3
hi desm0n
You need to edit the following part in the cpanel module to work with your host. Line no 224
$ret = _cpanel_handle_request('/frontend/x/mail/doaddpop.html', array('email' => $cpanel_username, 'password' => $edit['pass'], 'domain' => $cpanel_mail_domain, 'quota' => variable_get('cpanel_mail_quota', 2)));with this
$ret = _cpanel_handle_request('/frontend/rvblue/mail/addpop2.html', array('email' => $cpanel_username, 'password' => $edit['pass'], 'domain' => $cpanel_mail_domain, 'quota' => variable_get('cpanel_mail_quota', 2)));I hope this fixes it.
#4
still the same error i'm afraid :(
Nice try though as i was 100% sure this would have worked.
#5
The cPanel links on my web host are all this:
/frontend/brand/
instead of this:
/frontend/x/
So I did a search/replace in the module code and it's working for me. It creates an email account for each new user. I do not plan to enable FTP account creation so I can't vouch for that part though.
Drupal: 4.7.3
cPanel Build: 10.8.1-STABLE 114
#6
Oh, forgot to mention...
Do NOT replace the doaddpop.html with addpop2.html, or change any other parts of the module code.
addpop2.html is the page that is displayed to you when you choose to add a new pop email account. doaddpop.html is the page that gets the info POST'd to it. It's the file that actually does the work. The only part that needs to be changed is the /frontend/x/.
it should be relatively simple for the module author to add another text field in the module settings that would allow a user to enter the proper text for that part of the URLs and then this module would be jammin'.
#7
I'm getting the following errors when trying to create new users:
warning: array_keys() [function.array-keys]: The first argument should be an array in /home/texa/public_html/modules/user.module on line 351.warning: implode() [function.implode]: Bad arguments. in /home/texa/public_html/modules/user.module on line 351.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT DISTINCT(p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /home/texa/public_html/includes/database.mysql.inc on line 120.
image_exact: File does not exist.
Am I just lost, here, or what?
#8
Mine is frontend/bluehost/, so I did a seach and replace as suggested. Still, nothing's happening. Since I changed the frontent, I'm not even getting errors in the Watchdog - just a silent fail.
Drupal 4.7.3
cPanel 10.8.2-RELEASE 119
#9
Sorry, fixed it and now accounts are created. However, the account passwords are not matching the drupal passwords - several site members have tested the feature, and while the mail/ftp accounts are created in cpanel, the users cannot log in with their account passwords.
#10
It appears that unless the users fill in a password on their "edit settings" page (as if they were changing their password), then the email and ftp accounts are created without passwords. It would be best if the module could either divine their current passwords, or run a check to make sure they have entered a new one.
#11
Fist part of this issue is related to Cpanel themes other than "x". I will make a file to configure different themes and their urls. If some of you can send me the source code of problematic Cpanel pages, I can include these themes on next release.
Reported themes: