October 27, 2005

Well Gentoo’s gone :’(

Filed under: Miscellaneous — edg @ 6:49 am

There I was just now trying to work out why webcp was picking up a non existing module (it had somehow become a hidden file) which I eventually deleted.,….well after that I was about to continue looking through web/server/modules.phps when my X session locked up after my terminal suddenly said /bin/ls didn’t exist and wouldn’t ls anymore, I then tried to log in on a VC Ctrl + Alt + F1 and found that I couldn’t, it did nothing except wait and then not log me in…….. so getting annoyed I switched back to X and realised all had locked up… so without being able to do anything I held down the power button and waited.

When I switched my PC back on I was very annoyed to find that Grub said Error 15, which I now know to mean that it can’t find it’s files……..well that’s because almost everything is gone from my Gentoo partition. The only warning I had was my hdd light going a bit crazy which I presumed was some background service e.g. updatedb……………… so my Linux install is gone.

I definately didn’t tell it to delete anything like that, so either gentoo has some weird self deleting feature or somehow I was hacked… I don’t know but this means I need to reinstall an OS quickly so I think I’ll go back to my good friend Slackware for now.

…..a v peeved edg :(

October 26, 2005

new tomcat module

Filed under: New Features, Supported Programs — pdrake @ 9:03 am

This morning I finished up what I spent most of last night working on - a Tomcat module. This module adds the required JkMount directive to the Apache virtualhost file as well as managing the required entries in the Tomcat server.xml file. I imagine that this module is not yet perfect but it does handle domains, subdomains, aliases and pointers right now. The host configuration is defined by a template which the server admin can edit using the templates function. The module does not currently handle tomcat users and roles to allow for restarting, deploying, undeploying, etc. Once I learn a bit more about managers, security realms, roles, etc maybe I can make this happen.

You must ensure that the $cfg[’tomcatpath’] setting within the module points to your Tomcat installation (default /usr/local/tomcat), $cfg[’init’][’tomcat’] points to your stop/start script (default $cfg[’tomcatpath’]/bin/catalina.sh’ and $cfg[’spid’][’tomcat’] points to your tomcat pid file (default /var/run/tomcat.pid) and you should be all set.

As always, feedback and constructive criticism is welcome. Remember that this module is not even beta-quality code so expect bugs but please report them.

While developing this module, I discovered and fixed bugs in subdomain creation, pointer creation (both when using multiple IP addresses) and the SSL module. Additionally, the SSL module needs to either be extended to handle SSL certificates for subdomains and pointers or the SSL sslang entry needs to be limited to domains in some way. Preferrably, the SSL module should be expanded.

October 24, 2005

Filed under: Miscellaneous — edg @ 11:22 am

Well most of today I’ve been trying to work out problems with 0.6, ranging from the user system not working at all except logging me in, it seems not to create users on the system virtual or otherwise………and if it does they can’t be used by sudo which is required for cron.php to run commands…..

I did fix the issue that broke cron and now I’m working on getting register_globals stuff finished, just continuing to check to see if everything works………yet one really annoying thing is the following issue with one file on viewcvs http://cvs.web-cp.net:7467/viewcvs/webcp-0.6/webcp/web/server/backup.phps doesn’t happen with anything else :(

October 22, 2005

ssl module

Filed under: New Features — pdrake @ 10:36 pm

Today I committed a new module to the 0.6 CVS - an SSL module. This module can create certificate requests, generate temporary certificates or upload certificates you may purchase from an SSL certificate provider. It does not handle adding intermediate certificates, however. This may be something that should be considered but I am very unfamiliar with the process of adding these certificates… anyone want to help out in this regard? Most of the code was contributed by Mike. I have converted the contributed code into a module and reviewed the basic functionality but have not performed an extensive review to ensure it follows the web-cp coding standards. In developing this module I discovered a number of bugs (one in the apache module among other places) so if you want to test this module for me, please update all your code.

Issues with chown…..and tutorials installations etc

Filed under: Miscellaneous — edg @ 6:32 am

It seems that chown has changed its ways or at least from what is used at hostinghacks…

On Gentoo chown tells me that in future you will only be able to use the user:group syntax, whereas everything at hostinghacks tells you to use the user.group syntax…

I don’t know if this affects anything within web-cp’s internals either.

Just thought you should know, hmm maybe this should really be in the forums?

October 20, 2005

cron module

Filed under: New Features — pdrake @ 3:07 pm

Believe it or not, I really have been busy coding away on web-cp these last few days. There’s still a lot to do and anyone who wants to jump in and contribute would be very welcome! Today I completed adding the hooks required to add quantity limited features to resellers and domains. I also completed changing the basic cron code over to a quantity based system. Now resellers can have a quantity of crons which they can then assign to domains (or not, as appropriate). Once this is done, domain-level users can create crons up to the quantity granted by their reseller. The entire user-defined cron functionality has been encapsulated in the cron.mod.phps module and can be enabled or disabled by the server administrator using the module management page. Also, quite a number of bugs or annoyances were discovered and fixed during my coding sessions. Download the latest 0.6 CVS and check it out!

As always, feedback and constructive criticism is welcome. Remember that this is not even beta-quality code so expect bugs but please report them.

October 17, 2005

Modules and Code Standards and things

Filed under: Miscellaneous — edg @ 1:11 pm

About me:
I have been using web-cp since about v 0.5.3/0.5.4 where I started with Fedora, was looking for a cheaper than CPanel CP for our web server as we wanted to try and actually earn money from the whole hosting thing….and I found web-cp, right now we don’t have the server running full time due to connection issues but since starting with web-cp I’ve found it a very good program and hope I can improve it further. In the past I have worked on the register globals issue and I have also fixed some bugs and started a script installer.
Before web-cp I was into PHP mainly because ever since I started with PHP I loved it, I also began a project called the Easy Links System which is at version 0.1 and hasn’t been worked on in ages.
I have tried C++ and VB and find them to be interesting languages, but of course PHP is much better for the web, even though you can use those fine… though I’ve not written anything for the web in them.
So basicly I liked coding and I like Linux and I got into webcp whilst on Fedora.

Well the modules system sounds great and I want to try it, I might see if I can install a seperate apache and stuff on gentoo today.

As to code standards I too would like to see some consistency but it means going through a lot of code, there’s also a bug report that I think I opened about coments as I think coments are important, well at least if we want to make the code easier to understand, I know I have found some things confusing and the easier it is to help the project the better really. Also coments help other people understand PHP which is good.

EdG

October 14, 2005

nss_mysql module

Filed under: New Features — pdrake @ 4:10 pm

Well, given that we now have a virtual user system which supports using username@domain.tld to login to the control panel, I felt that it was about time to support the same kind of logins throughout (mail, ftp, ssh, etc). The best way to do this, it was determined, was through nss_mysql. Today I installed nss_mysql and wrote a neat little module (nss_mysql.mod.phps) which will enable these kinds of logins system-wide. A few gotchas:

In /etc/nss-mysql.conf and /etc/nss-mysql-root.conf ensure that all group-related table settings are commented out.
In /etc/proftpd.conf ensure that PersistentPasswd is set to off.

Once you’ve done that, you’re all set and virtual users will work virtually perfectly!

My view on web-cp

Filed under: Miscellaneous — Gyrbo @ 5:32 am

Let’s start off with a little introduction for those who’ve never heard of or read about me. I’ve been with web-cp for a while. Although I wasn’t there from the start, I still remember the time when 0.4 was fairly new and 0.5
was in pre-release (and named web://cp). Since than a lot has changed. The original 0.5 version only supported sendmail, apache and basic unix users. The current release (0.5.7) has a lot more functionality.

Currently 0.6 is under heavy development. pdrake is still doing most of the work, but a lot of contributions have been made by other users. I can take credit for writing the base of the module/hook system, but it’s pdrake who really made it shine by actually adding useful modules.

I wanted to write about how I would want web://cp to be. I’m not just talking about “the future of web-cp”, but more about what I would’ve made of it if I had complete freedom. Mind you that I was one of the FlexCP developers, and a lot of the ideas come from there. The goal of FlexCP was to make web://cp how it should have been. In the end it resulted in nothing, but the concepts are still viable.

I’ve put several things from FlexCP into web-cp, one of which was the above mentioned modules system. The template parser was another thing. Currently, templating isn’t where I would want to have it. I’m not exactly sure how CPanel does it, but I think that’s where I want templating to be. Every page is a template and (almost) everything can be changed using templates. No HTML code would be directly output by modules or pages, instead a template would handle the formatting of data. This system would require a major code rewrite (much larger than modularization). This is because web-cp was designed with direct code output in mind. This means you’d have to tear the HTML out of the .phps file, put it into a template and write the code to put data into this template.

Something else I would want in web-cp is code consistency. There were no clear coding guidelines, and thus every contributor pretty much has a different style. This results in issues with for example function names. Was it named list_dir(), listdir(), ListDir() or listDir()? I’ve composed a document with some guidelines, but I’ve received little comment on it: http://www.gyrbo.be/?page_id=2

There’s also a lot of duplicate code in web-cp. Sometimes there are even different implementations, one of which is more efficient than the others. Which brings me to another problem. Certain parts of code are written inefficiently. For example, the usage of implode('’, file(x)) is not uncommon. I’ll have to make a document with some hints about inefficient methods of doing something, and the efficient counterpart (haven’t I done this in a forum post somewhere?).

I have some ideas for a one-step installer (anyone remember complete://cp?), but I’ll leave that for another blog post.

October 13, 2005

custom logos

Filed under: New Features — pdrake @ 10:46 am

I guess I’m just on a roll these days. This morning I went ahead and coded a feature I’ve been meaning to add for quite some time… the ability for server admins and resellers to upload custom logos. The new module system allowed me to add all the required functionality in 1 file - logo.mod.phps in the modules directory. I also fixed a number of other pages while I was at it so if you’re using 0.6 CVS, you probably want to update to the latest version and check it out. Man, the new module system makes enhancement of web-cp so easy that these new features practically code themselves. Woohoo!

Next Page »