• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Force ads on accounts automatically for FREE with cpanel ...

I found out how to install mod_layout correctly and I do have forced ads now. :) http://ralph.0cpanel.com

cd /usr/local/src
wget http://0cpanel.com/mod_layout-3.2.1.tar.gz
tar xvfz mod_layout-3.2.1.tar.gz
cd mod*
make clean
make install
service httpd restart

This is for apache 1.3 and make sure that you have enable curl ssl with your php4 and php5.

I ran php -q /home/someuser/public_html/ipanel/cron/cronjob.php --job=httpd_conf --debug --force --verbose to force the ads whenever I felt like the cronjob wasn't doing its job......
Last edited:
Joe, I'm struggling to get this to work. I'm using mod layout for apache 2.2, does that affect it ?

With linebreaks do you mean the whole config. So no line breaks anywhere? I edited the config to this:
<?php $config = array('admine' => 'Jonnyhux@gmail.com','timestamp' => DATE_RFC822, 'httpd.conf' => '/usr/local/apache/conf/httpd.conf', 'plans' => array('adsplan'),'ads' => array('header' => '/home/***/adsh.html', 'footer' => '/home/***/adsf.html')); ?>

I don't think it's running at all. I edited the emails, so it sends nevermind the package and added a array at the top. Still didn't send anything..
Last edited:
Well the line breaks thing was only for if you had the comments left in, which you don't need and don't have ...

When I wrote the code apache2.2 was available, and I tested on all versions that there were, I remember, because it took forever to build all the versions ...

1. Make certain that mod_layout is installed, have a look at server signature on a 404, or make manual edits to httpd.conf to place ads on an account ( make sure you restart apache after httpd.conf edits )
2. Check the file is named /scripts/postwwwacct NOT /scripts/postwwwacct.php
3. Check permissions on the file, make certain it's executable ( +x | 0755 | 755 )
4. Add
echo "<pre>";
print_r( $whm );
print_r( $config ) ;
print_r( $email );
echo "</pre>";
right at the end of the script
5. Make an account inside of WHM as root, copy and paste all the output ( displayed after the stupid ajax thing goes away ) to a pm or this thread, so I can have a look see at it ...
I think I know whats up with it.
Too bad i'm setting off soon and won't be on untill tommorrow. I'll get a response back to you.
Can't seem to download it from there... not surprised though, my ISP has loads of problems. Anyway, I've already gotten my friend to download it and then send it to me, so I don't need a mirror anymore :p
It works per plan, so long as the root user sets up, you can force ads on whatever plans exist on the server from whatever reseller you like ...
Sorry bout the delay, real busy...

This was tested with all versions of apache and mod_layout, it should work with whatever you throw at it ...

You should bear in mind that, mod_layout and mod_gzip ( or any gzip compression output filters ) do not get along, lots of forums and CMS' use gzip to reduce bandwidth, as yet there is no solution or workaround other than disabling gzip compression wherever it is a problem ...