I have been learning a ton of PHP lately in an effort to build a significant amount of custom functionality into a Drupal website. As I am not a developer by trade it has been a steep climb upward. Lately I have been refactoring a lot of my code using functions. Being a noob however, I ran into some issues in that I didn’t understand how PHP scoped the usage of variables.
Case in point, I had written a function to generate a bunch of variables dynamically based on some input into the function, but I wasn’t able to use those variables outside of the function. (more…)
If you run a custom theme for your Owncloud distribution, one of the things you know is that whenever you run an update of your Owncloud server it will automatically disable your theme as part of the update process. This is to keep things from blowing up in the event you have made a modification to a file that will break the updated version of Owncloud.
Themes can be used for more than just visual changes. For example, if you want to disable the “change password” button for users, this can be done by modifying some PHP files and dropping them in your theme. In my case, I added Piwik tracking code in several of my Owncloud files. I want to keep those modifications but I also want the updated code.
This has historically been a pain point during every Owncloud update. Every time I have run an update it has been a laborious process of comparing my theme files to the new stock files and looking for changes and then merging appropriately. So today, I decided to script part of that comparison process… (more…)
I think I have put together a pretty good solution for load balancing websites across multiple instances of IIS 8.5. I am sure my ideas aren’t novel but I am documenting them here for future reference. This isn’t meant to be a full walkthrough but rather it is me keeping notes for personal use and may be a useful springboard for admins with similar needs.
A Quick Introduction to DFSR
DFSR (Distributed File System Replication) is a Role/Feature built into Windows Server – it can be used to keep folders in-sync across multiple servers. Caveats such as replication latency mean that it might not be ideal for all use cases. DFSR is based more or less on the same technology that replicates active directory information between domain controllers. DFSR does “block level replication” which means changes made to files on one end don’t require the entire file to be re-replicated but rather just the changes. This is extremely useful if you are dealing with large “non-static” files. DFSR, I think, was introduce circa Server 2003 so it has been around for quite a while, it just wasn’t something that had really been on my radar until very recently.
If you are looking for a quick way to install a LAMP (Linux, Apache, MySQL, PHP) stack on an Ubuntu server, this should take care of you:
sudo apt-get install tasksel
sudo tasksel install lamp-server
First command installs tasksel… which is a really handy program. (more…)