thatsamguy / albatross

web hosting panel software using nginx, php-fpm, mysql
MIT License
2 stars 2 forks source link

Added start of spl_autoload_register and misc cleanups #9

Closed markc closed 9 years ago

markc commented 9 years ago

Some more indentation wherever I happen to be editing.

Functionally I commented out this redirect on line 140 of index.php because there is some looping somewhere and I'm not yet sure where it's coming from (locks up my Firefox, exhausts memory etc).

//header('Location: /');

I presume the codebase would be considered alpha/devel quality atm so the next pull request will be for temporary error_log(FILE) lines at the beginning of all php files so I can see the flow of called files. For instance, as one example, conf/mysql.config.php is being included multiple times, which is not unnecessary, and using include_once() is not the right solution.

markc commented 9 years ago

The "spin" I was getting was that I simply have to restart php7.0-fpm after every edit! I hadn't noticed this before but I guess this is the most PHP editing I've done since setting up php7 so something about how php7 caches (opcache perhaps), or my current settings, requires a full restart to pick up PHP script file changes. Live and learn.

I hope these changes so far are generally useful. Much more cosmetic indentation is required but the php-cs-fixer phar script did a 90% pretty good job I think. I'll have to leave it at this for a while as I need to revisit my own simple code examples to remember how I would set up a project.

I've also come to a full stop because I'm unsure exactly how to proceed to add sites, domains and email accounts. Without docs or some example content it's a bit too tedious to try and figure it all out by hit and miss attempts at creating db entries.

thatsamguy commented 9 years ago

I'll work on providing you some examples.

Were you looking for:

markc commented 9 years ago

how to use the current albatross web UI

Probably this one. When fiddling with ISPConfig and Froxlor it was never really obvious to me exactly what order to create items. fe; low level services need to be set up before configuring plans before adding user accounts so that then finally adding a virtual host with a domainname is possible. With Albatross I'm not sure where to start and like I say I'm not too keen on just banging around on the interface to see what sticks... especially on top of the interface not always working as expected (my fault, like restarting php-fpm) so is a problem my tweaks or my lack of understanding of how the system is meant to work... or...

I think if I had a working set of example entries already inserted in the database then I could add/remove more items and see for myself how it works via mysql logging and php error logging. Without any example entries or instructions I can diddle on a PHP level but not on an Albatross system level.

how to configure postfix and dovecot

Now that is a sore point, for me, because I don't use either of them and have no intention of using them so when it comes to mail service I have to make addition scripts for courier-mta which very few other folks would be interested in. Even when it comes to nginx+php-fpm I have a very specific way of setting up those services which is most likely quite different to your way (I haven't got that far yet). So not only do I have to discover how Albatross is expected to work I also need to be comfortable enough with the system to extend it the way I want... which is the whole point of not using cPanel/WHM and WHMCS in the first (and last) place :-)

ATM on my own real world servers I basically type newuser admin@example.org and that sets up "everything" and after the fact I/we add user details.