Category: PHP

Settings to get Drupal 7 working on Hostgator

At the moment, Hostgator’s default PHP version is v.5.2.4, although version 5.3 is available. Drupal 7 requires 5.3, so until they make it the default, it is necessary to manually tell Drupal where to find PHP v. 5.3. Do this by adding

Action application/x-hg-php53 /cgi-sys/php53
AddType application/x-hg-php53 .php 

to an .htaccess file located in the public_html directory of your site. If Drupal is not at the root of your site, and you don’t want to change the entire site over, it works just as well to modify the .htaccess file in the Drupal directory.

An .htaccess file is just a text file named “.htacess” which can contain many different types of directives understood by the apache server.

Continue reading

Drupal YUI Rich Text Editor: Set maximum image dimensions on uploaded images

The search for the perfect WYSIWYG text editor in Drupal goes on. The best I’ve seen yet is YUI Rich Text Editor, but it still has some serious browser incompatibilities and usability problems. One significant is that there is nothing stopping users from upload a huge image, and not resizing it down using the provided resizing tools.

Now that just most cameras produce images of enormous resolution, users in my Drupal sites’ users often upload gigantic photos, which remain splashed across the entire layout until I get around to fixing them. I finally got tired of correcting users’ posts for them and fixed the CSS so it will never happen again.

Continue reading

Add phpMyAdmin to your Web Platform Installer IIS setup

One key item that seems to be inexplicably missing from Microsoft’s Web Platform Installer is some kind of front end like phpMyAdmin for administering mySQL databases. It installs one for SQL Server Express, but not for mySQL. Fortunately, it’s only a 5 minute job to install phpMyAdmin yourself. 

After running the Microsoft Web Platform Installer and installing whatever PHP/mySQL applications you want to run, download and decompress a copy of the latest version of phpMyAdmin from this page. Drop the folder containing the phpMyAdmin files into the inetpubwwwroot directory on your IIS server. Shorten the name of the folder to “phpmyadmin” or something appropriate when typing a URL.

Continue reading

Microsoft Web Platform installer: Drupal on IIS, the easy way.

If you work with Windows servers, then you have probably gotten used to doing without the many opensource web applications taken for granted outside the enterprise environment. Drupal, WordPress, phpBB, Moodle, etc. were all out of reach. Yes, it was possible to install PHP and mySQL, but it took a level of commitment and dogged troubleshooting persistence that few people are willing to undertake.   

Well, now you can have your enterprise cake and your opensource software too! Microsoft’s Web Platform Installer, introduced a couple of years ago, makes the process of installing all those LAMP-style web apps easy. When I say easy, I really mean easy! It just works!

Continue reading

Our complete set of customized site files for new dotproject customizers

For all the dotProject newbies out there, this is the kind of thing I wish I’d had when I got started – it would have saved me a lot of time. I’m posting all the files for a dotproject site I manage, since it seems it may help people get started in customizing dotProject.

To find my changes, search across all the files for the phrases “ellen added” or “ellen changed” in various comments.

One note of caution! I am not an expert in php or dotproject so the fact that something has been done doesn’t necessarily mean it is done in the best way, nor even that works. But these files should help to get you going. This is presented “as is” and I will not fix things for you or document things beyond what is in the articles I post here (Browse all my dotProject posts)


Continue reading

Drupal module Feed Aggregator escapes HTML tags in feeds

Drupal’s Feed aggregator has a problem displaying some of the escaped tags in Google Alerts Feeds. For example, see the screenshot below:

Picture 31.jpeg

The fix is to alter the code in
modules/aggregator/aggregator.module

Search for

 function aggregator_save_item($edit)

In both the UPDATE statement and the INSERT statement:

replace $edit['title']

with

strip_tags($edit['title'])
Continue reading