Popular just now

ad1

When your Surname is McDade

History of the Name


This interesting name is of medieval Irish origin and is the Anglicization of the Gaelic 'MacDaibheid', mac denoting 'son of' David, and is also found as MacDevitt, MacDavitt and Davison, but in its homeland, Donegal and Derry, it is generally in the form of MacDaid or MadDade.

Developers Don't Say Don't Re-invent the Wheel

Interesting that your opinion is that no one could ever do better than those that have come before them. The only thing worse is a belief that one can only do well or better as part of a pre-existing community or popular group.

4 reasons there are only two development choices

Two choices the right one and the wrong one . Unfortunately, 99% of the start up companies I have worked for made the wrong choice. Some of them spent good development time trying to invent and create a third choice. Which is why I don't work for them, or they don't exist any longer.

Drupal vs. CCK Compared CCK is just better!! because it's not "Fast Food"

This is an ongoing list of things that are different in CCK and Drupal 5 to 7. Basically everyting that I hated about Drupal 5 whenI first started an everything that I dislike about Drupal as a code base and the ideas that I dislike that have been implemented using procedural code. I have done these things in OOP using the native functionality of PHP.


How to Login in as SSH root user from WinSCP to AWS

When dealing with Amazon Web Services using the command line for accessing the file system to configure the server using Putty is OK. But what if you need a visual interface for handling multiple tasks and projects? This is when WinSCP will make your dev life easier. But AWS and WinSCP do not get along by default. Most tutorials will lead to adjusting the sudoers file but does not work because WinSCP continues to throw a ssh command that AWS does not understand and will give a bash error. Here are some quick steps to using WinSCP after you have successfully connected using Putty.

How to Use Zend Framework 2 Forms in Another Script (Factory)

Here's the same stand-alone form class for Zend Framework 2. I am posting this script as-is from the Content Connection Kit so you'll need to modify it to remove errors of omission. The demo url is http://fhqk.com/cck/?zftest/zfform_factory.

Be aware that I have found that ZF2's take-over of session handling means that any use of session_start() in the container script will cause ZF2 to fail with fatal error. This means that the use of session_start() for other frameworks or class libraries like PFBC running in the same scope will block ZF2 from loading. Because of things like this incompatibility with other systems like Drupal 7.x< 8.x and Symfony2 can be expected. You can work around the problem of ZF2 sessions by avoiding the use of captcha and other functionality that is dependant on sessions. But if anyone knows of a way to disable/override ZF2 session handling completely please speak up!

How to Use Zend Framework 2 Forms in Another Script

I have been going back and forth on Zend Framework 2. First it helps me by providing some really robust code. The flip side of the coin is ZF2 makes me crazy because it's always explained terribly by classically educated computer scientist. Given that me and much of the PHP community are autodidacts this is a turn-off.

I always can tell how useful a PHP framework is by trying to do what I learned first in PHP, building a HTML form. Not one post or tutorial I could find gave a straight forward answer a to how things worked. What was worse no one gave working code for using ZF2 as a library used by another simple PH script. Trying to get this done simply and without Zends MVC in place seemed to be unattainable. This meant that ZF2 was not something I would use at first thought. That has changed now that I have this code working. This is a complete stand-alone class use of the Zend framework and only needs to be called.

Problem connecting to SQL Server from Linux with Cpanel hosting [SOLVED]

I was having trouble getting a Centos VPS to connect to SQL Server via tcpip. After fighting with FreeTds configurations for a week I finally figured out it was a networking problem. Connecting from my PC was ok but connections timed out when connecting between the shared hosts ip addresses.

Drupal 7: Create Forms in a Single Function

I really do not like using Drupals stucture for creating HTML forms automatically. It's too complicated to create and debug. I took the time out in a project to find an easier way. Here's the code for having the form print out directly when the method is called:


Apple is Building the World's Largest Wind Turbine and Altenator?

Apple's new Campus 2 design is missing a few things. The inner ring should be levitated on a bed of permanent magnets for earthquake safety. The outer rings should rotate with the outer surface shaped as fins with coils underneath. This would make it the worlds largest VAWT (vertical axis wind turbine) and electric generator.

Drupal 7 Views: Getting User and Node Reference ID from row using PHP

Drupal views is my default system for creating sites where an administrator or webmaster can configure a website after it has been developed. Unfortunately the community has misled many into believing that anything can be done using Views, Rules and a handful of popular modules without coding. This is definitively not true! And even if you can code it is a dangerous road to walk.

So here's my latest gripe. Connecting User and Node References, counting references and displaying the right information.
If you try to get the node id or user id from a reference it is not available in the $row variable as it should be. Ask the programmer why because I have no idea what this variable is good for otherwise. The output from it is:

stdClass Object
(
    [field_tutor] => 18
    [field_school] => 7
    [field_school_year] => 18
    [field_student] => 18
    [field_tutor_1] => 18
    [php] => 
)

Referenced field values are the node id of the parent and not the value that actually connects the information to the node or user content. The information is available though in the $data variable.

print $data->_field_data['nid']['entity']->field_student['und'][0]['nid']; // note nid not "value"
print $data->_field_data['nid']['entity']->field_tutor['und'][0]['uid']; // note uid not "value"

This took me about three days of hunting and frustration (along with a good portion of trial and error) and cost me a deadline. So posting it here might save you the same because there is no straight forward answer about this even from the Fields API creator or the Views team.

Webmin installation of Apache and MySQL randomly stop on CentOS

One of the things that I do rarely is creating and configuring a Linux OS and web server for a client. Especially a Virtual Private Server. In the print business most servers are Microsoft Windows machines and I typically find myself doing a lot of these. But a few weeks ago a friend wanted a tester for his new VPS hosting service and I volunteered. But many things that I never encountered before had to be fixed.

Update PHP to the latest version in Centos VPS

When you use a server image to create a VPS not everything is the latest or best version. So here's the steps for updating PHP to the latest release, which at this time is versio 5.4. While you could this manually adding in the repositories available from the community is easier to maintain.

wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm


EPEL
Extra Packages for Enterprise Linux (EPEL) is a
volunteer-based community effort from the Fedora project to create a repository of high-quality add-on packages for Red Hat Enterprise (RHEL) and its compatible spin-offs such as CentOS or Scientific Linux. Fedora is the upstream of RHEL and add-on packages for EPEL are sourced from the Fedora repository primarily and built against RHEL.



REMI
This is a repository created by Remi Collet with the aim to give support for old Fedora releases to allow them to install recent software, also it gives you the ability to have your CentOS/RHEL systems with the latest software available in the net.

Update PHP to the latest one in the repository



yum --enablerepo=remi update php php-*
/etc/init.d/httpd restart

CentOS Apache installation not responding

I always forget that in a raw CentOS server install the ip table needs to be configured to allow http calls on port 80 and port 10000 if you want to use Webmin. If you don't do this then the web server will not respond to browser calls because it can't.

Rules created with the iptables command are stored in memory. If the system is restarted before saving the iptables rule set, all rules are lost. For netfilter rules to persist through system reboot, they need to be saved.

# iptables -I INPUT 5 -m tcp -p tcp --dport 80 -j ACCEPT
# iptables -I INPUT 5 -m tcp -p tcp --dport 10000 -j ACCEPT
# sudo service iptables save
# service iptables restart 
 

Technical Debt: Drupal, Development, Deadlines and Deaths

Technical debt (also known as design debt or code debt) is a new word coming out of a metaphor that refers to the use of bad code, short cuts and poor architecture in software. The so-called debt manifests itself as incomplete work and sometimes as the real world cost of hiring and firing personnel. The reason the concept of technical debt is taking the software world by storm because it is such a simple way of explaining the constant struggle of businesses to get projects done on time and on budget. One of the things that is not talked about is the usage of open source web based software and the technical debt that doing so incurs.

Why do I need a technical writer?

Most people that have gone to highschool or university write reasonably well. But writing technical materials, such as software user manuals and documentation requires a set of skills that is not always part of their education. It takes time to master the theory and learn the "best practices" of technical writing. Hiring a skilled technical writer benefits you and your company by offering:

Which do I need, a Senior Programmer or Solution Architect?

Smaller Web development companies and Start-ups have a difficult time separating job specifications and actual work. Their lack of understanding of the software development process usually leads to recruiting the wrong person or giving internal promotions to the wrong persons.  These people, many of whom have never worked in or for a very large organization typically have no idea of which roles their personnel are competent to handle. They always seem to think that anyone given or taking the title "senior programmer" means they can do everything with and within a particular technology or software. Even worse they confuse the architects role with that of senior programmer.  So what qualities and skills does an architect have and programmers or developers need to have to become competent architects? And why is it so confusing to know which role is needed?

How to build a PHP extension


The ext_skel script

A PHP extension is composed of several files common to all extensions. As the details of many of those files are similar from extension to extension, it can be laborious to duplicate the content for each one. Fortunately, there is a script which can do all of the initial setup for you. It's called ext_skel, and it's been distributed with PHP since 4.0.


Where to find PHP extensions for Windows?

Windows.php.net is the place where you should be able to find what is need for running PHP on a Windows family operative system.  This is where the pre-compiled binaries can be download. The problem is that this site even after years has never been finished. It also goes down frequently without cause.

So what do you do if you don't want to compile your own extensions? Well, some of the more popular can be found here. The list is on a seperate domain ( uses the php.net root domain and maybe even servers )  than windows.php.net. so it does not go down with it.

Compiling PHP on Windows 7 with VC9

I just tried this in Windows 7 so here are some of my notes. I am writing this up because it prevents me from having to hunt down solutions by searching for hours. The answers are on Google but they are spread around. This is a one stop list of solutions to common errors encountered when compiling PHP on Windows.