PHP

This page lists all content tagged with the term "PHP".

Extending Drupal 7 text field character limit

After getting the message, "There is data for this field in the database. The field settings can no longer be changed." while trying to extend the character limit for a text field in a Drupal 7 instance, I used the code below to increase the character limit. It modifies the relevant parts of the database to allow more characters. I ran the SQL code through a content node with the PHP Code Text Filter enabled, but it could also be run in a custom module.

Adding Secondary Validation to Drupal’s User Login

Want to add another layer of authentication to the default Drupal login? Say, by calling a company’s internal web service? Here’s a clean approach I’ve taken. Notice that we are inserting our secondary authentication into the validators, rather than overriding anything. Also notice that if we authenticate against our local Drupal DB, there’s no reason to look at the secondary web service or DB, but rather we only look if our default local authentication failed. Then, if we authenticate against our secondary source, we create a user to be used later on.

General error: 126 Incorrect key file for table

Saw this error in Magento admin:
SQLSTATE[HY000]: General error: 126 Incorrect key file for table '/tmp/#sql_7397_0.MYI'; try to repair it

Solved it by increasing the tmp directory space on the MySQL server.

Call to undefined function money_format

While setting up a local copy of a Magento based e-commerce site on my Windows machine, I was presented with a number of messages stating, "Fatal error: Call to undefined function money_format()." After a little research I was able to discover that this particular PHP function is not available on the Windows platform.

In order to get access to a version of the function that would be available from anywhere in the site's php code, I used the Apache auto_prepend_file directive in my php.ini file:

Views Block with Arguments

Blocks created by a view in Drupal do not have access to the page URL and thus arguments won't work normally. However, by using some custom PHP code in the argument default setting, we can pass information from the URL to the block as if it were a page.

The best tutorial I was able to find on this is here: Drupal View Block With Arguments

The PHP code I used to get a user's blog to show under his team profile page on this site is below. Used as default argument code for "User: Name."

SHRM India

For this project, we developed several Drupal modules to customize the site behavior and user experience. We were also responsible for content management, documentation, and deployment to staging and production environments.

Learning

Automation Excellence (AE) is a company started by a homeschool family in 1998. AE serves clients through software automation testing – providing services like load testing and website functionality. About 6 years ago, AE faced a crisis. Like any company, they needed a higher Return on Investment (ROI) than their competitors. However, the crisis was that their competition followed a disappointing trend to hire offshore employment. This made it seemingly impossible for AE to keep American employees and maintain a high ROI.

FIRE Church

We built this site with Drupal, adding some custom PHP features to fit the client's hosting company, also integrating an ASP web app from the legacy site that was still in use.

Joshua Williams

I am a programmer, web developer, webmaster and graphic-designer-in-training. I live in Estes Park, Colorado with my wife and three children. After connecting through their e-learning site, HomeGrownProgrammers.com, I have worked with Automation Excellence since the summer of 2009 and also have some freelance programming experience prior to that.

Eric Pierce

I'm a software tester, developer, and graphic designer living in Colorado Springs with my wife and son. I have five years of experience with automated testing, ten years of software engineering and development, and fifteen years in illustration and 3D graphics.

Syndicate content