WHMCS WP Multisite Provisioning not working

Hey Team,

So I’ve got the WHMCS MU Provisioning plugin setup and working, but it seems to be spitting out an error when provisioning from WHMCS, even though it seems to create the website and the user as it should.

WHMCS Error:

Invalid data or no response: The receiving plugin may not be activated at: http://twghosting.com

I turned on Debuging and here is what I got

Request:

whmcs%5Baction%5D=create&whmcs%5Bmapped_domain%5D=braydan.twghosting.com&whmcs%5Bdomain%5D=braydan&whmcs%5Btitle%5D=My+New+Website&whmcs%5Buser_name%5D=hwmickvk&whmcs%5Bpassword%5D=01btL8Z1az&whmcs%5Bemail%5D=bmwillrath%40gmail.com&whmcs%5Blast_name%5D=Willrath&whmcs%5Bfirst_name%5D=Braydan&whmcs%5Bdefault_role%5D=administrator&whmcs%5Bupload_space%5D=&whmcs%5Blevel%5D=&whmcs%5Bcredentials%5D%5Buser_login%5D=whmcs&whmcs%5Bcredentials%5D%5Buser_password%5D=xxxxxx&whmcs%5Bcredentials%5D%5Bremember%5D=0&whmcs%5Bcredentials%5D%5Bwhmcs_client_id%5D=1&whmcs%5Bcredentials%5D%5Bwhmcs_service_id%5D=2&whmcs%5Bcredentials%5D%5Bwhmcs_product_id%5D=1&whmcs%5Bcredentials%5D%5Blevel%5D=

Response:

Array
(
[0] =>
Notice: Array to string conversion in /var/app/current/wp-includes/class-wp.php on line 294

Notice: Undefined index: nickname in /var/app/current/wp-content/plugins/whmcs-multisite-provisioning/whmcs-mrp.php on line 379

Notice: wp_new_user_notification was called with an argument that is <strong>deprecated</strong> since version 4.3.1 with no alternative available. in /var/app/current/wp-includes/functions.php on line 3739

Warning: mkdir(): Permission denied in /var/app/current/wp-content/plugins/whmcs-multisite-provisioning/whmcs-mrp.php on line 459
{"user_name":"hwmickvk","install_type":"subdomain","domain":"braydan.twghosting.com","path":null,"login":"hwmickvk","blog_id":21,"success":true}
[1] => Array
(
[url] => http://twghosting.com/
[content_type] => text/html; charset=UTF-8
[http_code] => 200
[header_size] => 880
[request_size] => 958
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 3.223142
[namelookup_time] => 0.060437
[connect_time] => 0.116835
[pretransfer_time] => 0.116884
[size_upload] => 708
[size_download] => 705
[speed_download] => 218
[speed_upload] => 219
[download_content_length] => 705
[upload_content_length] => 708
[starttransfer_time] => 3.223085
[redirect_time] => 0
[redirect_url] =>
[primary_ip] => 54.79.13.166
[certinfo] => Array
(
)

[primary_port] => 80
[local_ip] => 103.241.3.91
[local_port] => 34231
)

[2] =>
)

Just to be clear, It is provisioning both the subsite and the username properly, but WHMCS receives an error and so does not mark the service as “Provisioned”

It would appear it has something to do with file permissions on the server, I run a very tight multisite given that its running on AWS Elastic Beanstalk so it can’t really have write access to the server (as this would be overwritten when it cycles servers, and would not be mirrored across the redundant server infrastructure)

I also can’t work out what specifically its trying to do, so any help you can give would be helpful.

  • Braydan Willrath
    • Flash Drive

    Even if I remove the seemingly unnecessary code in whmcs-mrp.php on line 459

    //Create the blog uploads directory
    if( ! is_dir( WP_CONTENT_DIR.'/blogs.dir/'.$id . '/files' ) ) {
    mkdir(WP_CONTENT_DIR.'/blogs.dir/'.$id . '/files', 0755, true); //0755 octal
    }

    It still comes back with the provisioning error, This time debug output says

    Array
    (
    [0] =>
    Notice: Array to string conversion in /var/app/current/wp-includes/class-wp.php on line 294

    Notice: Undefined index: nickname in /var/app/current/wp-content/plugins/whmcs-multisite-provisioning/whmcs-mrp.php on line 379

    Notice: wp_new_user_notification was called with an argument that is <strong>deprecated</strong> since version 4.3.1 with no alternative available. in /var/app/current/wp-includes/functions.php on line 3739
    {"user_name":"hwmickvk","install_type":"subdomain","domain":"braydan.twghosting.com","path":null,"login":"hwmickvk","blog_id":23,"success":true}
    [1] => Array
    (
    [url] => http://twghosting.com/
    [content_type] => text/html; charset=UTF-8
    [http_code] => 200
    [header_size] => 880
    [request_size] => 958
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 3.10882
    [namelookup_time] => 0.124406
    [connect_time] => 0.181333
    [pretransfer_time] => 0.181424
    [size_upload] => 708
    [size_download] => 574
    [speed_download] => 184
    [speed_upload] => 227
    [download_content_length] => 574
    [upload_content_length] => 708
    [starttransfer_time] => 3.108775
    [redirect_time] => 0
    [redirect_url] =>
    [primary_ip] => 52.62.150.14
    [certinfo] => Array
    (
    )

    [primary_port] => 80
    [local_ip] => 103.241.3.91
    [local_port] => 35247
    )

    [2] =>
    )

    Looks like you guys maybe need to update the plugin please

    Notice: wp_new_user_notification was called with an argument that is deprecated since version 4.3.1 with no alternative available. in /var/app/current/wp-includes/functions.php on line 3739

  • Ash
    • WordPress Hacker

    Hello @Braydan Willrath

    I hope you are doing good.

    Do you have debug mode enabled in wp-config.php file? If yes, would you please disable and try?

    Change

    define( 'WP_DEBUG', true );

    to

    define( 'WP_DEBUG', false );

    Let me know if it works.

    Have an awesome day!

    Cheers

    Ash

  • Rupok
    • Support Ninja

    Hi Braydan Willrath

    Hope you had a wonderful day.

    I’ve talked with our developer regarding this and he said, any notification, warning, error printed in the response will break json object and therefore the plugin in whmcs side won’t be able to understand / parse the result. So I’m afraid, that’s the solution. You have to keep debug off. You can definitely turn it on again when you need to debug something.

    Have a nice day. Cheers!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.