UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Technical Support > cPanel Reseller Hosting

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 16-12-2007, 22:52
new member
 
Join Date: Dec 2007
Posts: 4
Default Remote Access Key - Usage

I see in WHM we have access to our Remote Access Key to enable the management of Accounts etc. in an AUTOmated way using PERL/PHP

I don't seem to be able to include:
require '/usr/local/cpanel/Cpanel/Accounting.php.inc';

And get the following error:
Warning: require(/usr/local/cpanel/Cpanel/Accounting.php.inc) [function.require]: failed to open stream: Operation not permitted in /home/*****/public_html/del.htm on line 12

I want to be able to automate my customer experience so they can purchase hosting without my interaction...

Any ideas?
Reply With Quote
  #2 (permalink)  
Old 17-12-2007, 12:47
eUKhost.com's Avatar
Chief Marketing Officer
 
Join Date: Sep 2005
Posts: 4,048
Send a message via AIM to eUKhost.com Send a message via MSN to eUKhost.com
Default

Your question is quite Tricky and it wont be possible for any of our support staff to sort this problem as you have not included reference to cpanel accounting functions in your code. You need to check tutorials on cpanel.net as they provide documentation to automate account setup using scripts.
__________________
UK Web Hosting || Business Hosting || eUKhost Knowledgebase
Toll Free : 0808 262 0255 || MSN : mark @ eukhost.com || AIM : eukmark
A bunch of Sheep led by a Lion is better than a bunch of Lions led by a Sheep.
__________________________________________________

Great Opportunity :: Join our Affiliate Program for FREE and earn 20% commission on each referral.
Reply With Quote
  #3 (permalink)  
Old 17-12-2007, 14:47
AlexP's Avatar
System Administrator.
 
Join Date: Apr 2007
Posts: 49
Default

Quote:
Originally Posted by Tricky View Post
I see in WHM we have access to our Remote Access Key to enable the management of Accounts etc. in an AUTOmated way using PERL/PHP

I don't seem to be able to include:
require '/usr/local/cpanel/Cpanel/Accounting.php.inc';

And get the following error:
Warning: require(/usr/local/cpanel/Cpanel/Accounting.php.inc) [function.require]: failed to open stream: Operation not permitted in /home/*****/public_html/del.htm on line 12

I want to be able to automate my customer experience so they can purchase hosting without my interaction...

Any ideas?
The reseller will only be able to do things via the API within the constraints of their reseller privileges. The XML-API (new in version 11) is a bit more robust in terms of functionality and they may consider using that instead. Documentation for that is available at: http://www.cpanel.net/plugins/xmlapi/index.html
__________________
Thanks and Regards,
Alex P
System Administrator.
Dedicated Hosting || Semi Dedicated Hosting
Reply With Quote
  #4 (permalink)  
Old 17-12-2007, 19:41
new member
 
Join Date: Dec 2007
Posts: 4
Default

PHP Code:
<?php
require '/usr/local/cpanel/Cpanel/Accounting.php.inc';
$host "localhost";
$user "my username in here";
$accesshash 'my hash key is in here';

$accts listaccts($host,$user,$accesshash,0);
print_r($accts);
$pkgs listpkgs($host,$user,$accesshash,0);
print_r($pkgs);
?>
My code looks like the above - I want to be able to add new accounts under my reseller account, but allow someone to purchase an account online and have this created without manual intervention from me.

Some of the functions I'll be looking to use will include : Showversion, listaccts, createacct, suspend

I believe the issue is that we have not been granted read access to the common Accounting.php.inc file ???



Regards

Last edited by Tricky : 18-12-2007 at 21:42.
Reply With Quote
  #5 (permalink)  
Old 19-12-2007, 20:34
new member
 
Join Date: Dec 2007
Posts: 4
Wink

Had an online 24/7 support session with Jason.M this evening and between us (well Jason) we sorted it...

I'd not spotted in the error : Warning: require() [function.require]: open_basedir restriction in effect. File(/usr/local/cpanel/Cpanel/Accounting.php.inc) is not within the allowed path(s): (/home/*****/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/*****/public_html/del.htm on line 12

I'd assume I didn't have access to read the file following a previous 24/7 chat - so proceeded with the Forum Post - looking for more answers tried the 24/7 again...

Jason.M - removed the open_basedir restriction and my scripts now work

Another great fix and assistance just when we needed it
Reply With Quote
  #6 (permalink)  
Old 19-12-2007, 21:15
eUKhost.com's Avatar
Chief Marketing Officer
 
Join Date: Sep 2005
Posts: 4,048
Send a message via AIM to eUKhost.com Send a message via MSN to eUKhost.com
Default

Quote:
Originally Posted by Tricky View Post
Had an online 24/7 support session with Jason.M this evening and between us (well Jason) we sorted it...

I'd not spotted in the error : Warning: require() [function.require]: open_basedir restriction in effect. File(/usr/local/cpanel/Cpanel/Accounting.php.inc) is not within the allowed path(s): (/home/*****/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/*****/public_html/del.htm on line 12

I'd assume I didn't have access to read the file following a previous 24/7 chat - so proceeded with the Forum Post - looking for more answers tried the 24/7 again...

Jason.M - removed the open_basedir restriction and my scripts now work

Another great fix and assistance just when we needed it
Glad to hear that

If he has helped you to sort something important then please submit a Testimonial in "Customer Testimonials" forum
__________________
UK Web Hosting || Business Hosting || eUKhost Knowledgebase
Toll Free : 0808 262 0255 || MSN : mark @ eukhost.com || AIM : eukmark
A bunch of Sheep led by a Lion is better than a bunch of Lions led by a Sheep.
__________________________________________________

Great Opportunity :: Join our Affiliate Program for FREE and earn 20% commission on each referral.
Reply With Quote
  #7 (permalink)  
Old 02-01-2008, 23:05
Premium Member
 
Join Date: Jan 2007
Posts: 208
Default

Quote:
Originally Posted by Tricky View Post
Had an online 24/7 support session with Jason.M this evening and between us (well Jason) we sorted it...

I'd not spotted in the error : Warning: require() [function.require]: open_basedir restriction in effect. File(/usr/local/cpanel/Cpanel/Accounting.php.inc) is not within the allowed path(s): (/home/*****/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/*****/public_html/del.htm on line 12

I'd assume I didn't have access to read the file following a previous 24/7 chat - so proceeded with the Forum Post - looking for more answers tried the 24/7 again...

Jason.M - removed the open_basedir restriction and my scripts now work

Another great fix and assistance just when we needed it
Yo Lucky Chap!! Most hosts don't allow this to be done for security issues since it is a common file. eUKhost is indeed great!

Regds
IJ
Reply With Quote
  #8 (permalink)  
Old 04-01-2008, 17:43
new member
 
Join Date: Jan 2008
Posts: 2
Cool Access key script only worked on other hosts

I had a whm access key script that worked on hostgator.com host to create subdomains, and it doesn't work on eukhost for the same reason - '/usr/local/cpanel/Cpanel/Accounting.php.inc'.

It is something to do with the security settings on the server, not the script being wrong.

I also have a php email script that only works on a different host.

I've set it all up now so I just redirect some pages to another host.

I contacted eukhost about it in October but they couldn't sort it, I would however appreciate it if I could have the file unlocked as well for my site.

Last edited by guitar : 04-01-2008 at 17:50.
Reply With Quote
  #9 (permalink)  
Old 04-01-2008, 18:48
new member
 
Join Date: Dec 2007
Posts: 4
Default

I would suggest speaking to 24/7 support they are great

Point them in the direction of this post, alternatively the data is available to create a version of accounting/php/inc yourself. Which was going to be my fall back!
Reply With Quote
  #10 (permalink)  
Old 04-01-2008, 19:55
eUKhost.com's Avatar
Chief Marketing Officer
 
Join Date: Sep 2005
Posts: 4,048
Send a message via AIM to eUKhost.com Send a message via MSN to eUKhost.com
Default

Quote:
Originally Posted by guitar View Post
I had a whm access key script that worked on hostgator.com host to create subdomains, and it doesn't work on eukhost for the same reason - '/usr/local/cpanel/Cpanel/Accounting.php.inc'.

It is something to do with the security settings on the server, not the script being wrong.

I also have a php email script that only works on a different host.

I've set it all up now so I just redirect some pages to another host.

I contacted eukhost about it in October but they couldn't sort it, I would however appreciate it if I could have the file unlocked as well for my site.
Please provide us with some details as we would like to know the URL on which you have installed the script. We will need to remove the open_basedir restrictions for that particular domain only.
__________________
UK Web Hosting || Business Hosting || eUKhost Knowledgebase
Toll Free : 0808 262 0255 || MSN : mark @ eukhost.com || AIM : eukmark
A bunch of Sheep led by a Lion is better than a bunch of Lions led by a Sheep.
__________________________________________________

Great Opportunity :: Join our Affiliate Program for FREE and earn 20% commission on each referral.
Reply With Quote
  #11 (permalink)  
Old 07-01-2008, 02:06
Chief Technical Officer
 
Join Date: Jun 2007
Posts: 43
Default

Hello Guitar,

The open_basedir restriction has been diabled for your domain. Now your should work without any errors.

Regards,
Nick J.
Reply With Quote
  #12 (permalink)  
Old 07-01-2008, 08:03
new member
 
Join Date: Jan 2008
Posts: 2
Smile Thanks, the script works fine now

Thanks eukhost, the script works fine now.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 10:53.

 

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

knowledgebase articles

popular blog categories