2

I want to write a plugin for WHM, I'm a PHP Developer and beginner with Perl, so i ask is it possible to make plugin by PHP instead Perl?

I tried, but the problem was that important functions in php which deal with command line is disabled in php.ini file, and safe_mode on is another problem, so is there any method to avoid php.ini configurations when use php from command line?

thanks

matthias krull
  • 4,389
  • 3
  • 34
  • 54
Jason4Ever
  • 1,439
  • 4
  • 23
  • 43

2 Answers2

2

cPanel's official tWiki makes no mention to anything other than Perl:

The most powerful way of integrating your custom applications with cPanel is by writing a Perl module. Using this integration method, you can access cPanel's API systems without using the XML or JSON API, and without using or tags. Your application will also process and run much faster.

It's safe to assume that you cannot use anything other than Perl to hook into the cPanel/WHM system through the standard module system.

esqew
  • 42,425
  • 27
  • 92
  • 132
0

Yes, it's completely possible to do this with PHP. The only caveat is that it would need to be a CGI application as referenced by this forum posting: Is it possible to write plugin for WHM by PHP?

So, basically if you add #!/usr/bin/php-cgi to the top of the PHP file, it should work like normal.

Please refer to the following documentation regarding the comments necessary to control the access control list and other necessary options: Access Control

Sumit Singh
  • 15,743
  • 6
  • 59
  • 89