multisite errors when creating new site

Hi... I think i've almost come up with the solution to my problem... but I need some confirmation before I make changes to my server...

when I create a new site in my network admin area It throws the error:

Warning: Illegal string offset 'auto' in /home/smxagenc/public_html/wp-content/plugins/pro-sites/pro-sites-files/modules/premium-plugins.php on line 341

Warning: Cannot modify header information - headers already sent by (output started at /home/smxagenc/public_html/wp-content/plugins/pro-sites/pro-sites-files/modules/premium-plugins.php:341) in /home/smxagenc/public_html/wp-includes/pluggable.php on line 1196

If I go back to the sites admin, it appears that it has added the site, but but then if i try view the dashboard it shows 404 error, and for the front end it shows the CPanel "sorry" page.

I've looked through many guides and forum posts, and I think its got to do with the wildcard DNS setup. I have added the DNS entry for the wildcard in WHM's Edit DNS Zone. but I think there is another step I am missing (as it's still failing).

do I need to add something to the httpd.conf file?

i.e.

<VirtualHost {SERVER_IP_ADDRESS}>
DocumentRoot /home/{CPANEL_USERNAME}/public_html
BytesLog domlogs/{YOUR_DOMAIN}-bytes_log
User {CPANEL_USERNAME}
Group {CPANEL_USERNAME}
ServerAlias {YOUR_DOMAIN} *.{YOUR_DOMAIN}
ServerName www.{YOUR_DOMAIN}
CustomLog domlogs/{YOUR_DOMAIN} combined
</VirtualHost>

if so, how can I do this with whm?

through my poking around in whm, I have found the "apache configuration Include Editor" (Service-Configuration>Apache-Configuration>Include-Editor). and it lets me add to the httpd.conf in three different ways (see screenshot), though I'm hesitant to make changes to my server's files unless someone can verify that i'm doing it right (don't want to stuff up the other sites hosted there).

Here is my main question... do I add the above code (with my details inserted) to one of the options of the include editor? And if so, Do i Select just the "2.2.29 Apache Version", or the "All versions" option, and do i do it under Pre-main, Pre VirtualHost or Post VirtualHost Include?

Thanks
Nathan

  • Vinod Dalvi

    Hi Nathan,

    Welcome to the WPMU Dev community and thank you for your question.

    when I create a new site in my network admin area It throws the error:

    This is a simple PHP warning and most of the time it doesn't affect functionality of site so it is nothing to worry about!

    Do you have WP_DEBUG set to true in your wp-config.php file?

    If you do then please set it to false.
    This will hide the warning messages and you will be able to use your site normally.

    For information on this, checkout this wpmu.org article.

    If I go back to the sites admin, it appears that it has added the site, but but then if i try view the dashboard it shows 404 error, and for the front end it shows the CPanel "sorry" page.

    Would you mind if I logged in to your site and did some troubleshooting? This might help get to the bottom of this faster. If this is ok, just grant me temporary admin access to your site by clicking "Grant Access" button in the WPMU DEV Dashboard Settings as described on the following page and reply on this thread after granting it?

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    I've looked through many guides and forum posts, and I think its got to do with the wildcard DNS setup. I have added the DNS entry for the wildcard in WHM's Edit DNS Zone. but I think there is another step I am missing (as it's still failing).

    Are you doing this to resolve the above mentioned issue?

    Is your main site working fine and this is the issue with all the subsites created?

    Kind Regards,
    Vinod Dalvi

  • Vinod Dalvi

    Hi Nathan,

    Thank you for granting the support staff access.

    I could confirm the Warning message on creating a sub site and found this is happening because you are using "Premium Plugins" module of Pro Sites plugin but you have not configured it.

    I have have configured it for default WordPress plugin as shown in the attached screenshot and the Warning message is not displaying now.

    I could also confirm that the create sub sites are not working and displaying "404 Not Found" error message.

    Please make sure you have added the correct code in the .htaccess and wp-config.php file of your site as shown in the second attached screenshot.

    Also as you are using subdomain based multisite therefore make sure to configure Wildcard Subdomains as described on the following pages.

    https://codex.wordpress.org/Configuring_Wildcard_Subdomains
    http://www.webhostinghub.com/help/learn/cpanel/manage-domains/how-to-set-up-wildcard-subdomains
    https://www.youtube.com/watch?v=_cNFYMO1oC4

    If you have changed DNS of your domain then it will take some time to propagate the changes.

    Regards,
    Vinod Dalvi

  • Nathan

    ok... I've fixed it, thanks.
    Turns out when you setup wildcard Subdomain in WHM using "Edit DNS Zone" you can't just add the A record using the * symbol and expect it to work... there is another step (which I think i was on the right path to) but I managed to do it a different way.

    Turns out the easy way was to
    1. delete the A record I created in WHM (which was stopping me from creating a Wildcard Sub domain in CPanel)
    2. recreate the * subdomain in in Cpanel. (which must automatically perform the "other step" of adding to the httpd.conf file.... I guess)

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.