joelf's blog

Drupal Not Allowing a Page Owner to Edit the Page Content

I recently had a problem with a Drupal site where I chnaged the ownership of a page from the main administrative user to another user on the site. I basically wanted to give that the user the ability to edit that specific page's content.

The problem arose when I logged in as that user and went to the page, the "Edit" tab didn't appear.

I went into the admin area and verified I had the permissions set correctly, and everything seemed fine. I even logged out and back in again as the user in question, but still no "Edit" tab.

Running chkdsk (checkdisk) in Windows XP

The other day I decided it was about time I ran some diagnostics on my drives in Windows XP. They seemed to be acting a little flaky, and I thought it best to clean them up. So I ran two of my favorite apps, CCleaner and File Shredder. These purge my recycle bin and all deleted files. Love them!

HostGator using .htaccess to process .htm files in PHP

I recently took over a site that was developed in PHP, but the files in the web root were all named with a .htm extension. You can read my quick post on running .htm or .html files through PHP in Apache to see what I did to get it running. Works like a champ on my local box.

I experienced a problem, however, when I uploaded the site to my HostGator account. When I did, I was either prompted to download the file, or the PHP code was ignored within the .htm files.

So I began trying various combinations in my .htaccess file, as well as within my control panel to get it to work.

Finally, I broke down and emailed HostGator tech support, explaining my problem. Within 10 minutes I had a reply back with a fix. Here's the recommended usage if you use HostGator:

AddHandler application/x-httpd-php5 .php .htm .html

When that was added, all of the pages began working like a champ!

I hope this can help another HostGator user down the road.

Running .htm or .html files through PHP in Apache

I recently took over a project where the previous developer saved all of his PHP files as .htm files. This allows the viewer to think he's looking at a plain Jane HTML file, when, in reality, he or she is loading a PHP file. The advantage being an unscrupulous user may try and hack the server, knowing it's running PHP.

To update your server to do this, simply create a .htaccess file and put it in your web root. From there, simply add the following into the file:

AddHandler application/x-httpd-php .php .htm .html

Finding File Types for Files That Have No File Extension

I recently received a CD from a Mac client that contained files created by a previous developer. I put the CD into my disk drive, and when I went to browse the files, only about 3 or 4 had file extensions. The rest were just the file name.

I assumed these were all graphic files, so I tried to load a few in Photoshop, but they failed. What to do?

Apache and .htaccess files

I recently installed a fresh install of Fedora 8, and, as usual, I installed PHP, MySQL, and Apache to serve as my web server. Pretty standard stuff.

I then went about copying all of my sites and databases over to the new server. Again, pretty standard and easy stuff.

Testing A Mail Server for Open Relaying

If you run your own email server (or are even contemplating doing so), it's an extremely good idea to test your server to make sure relaying is turned off. If you do not have relaying disabled, basically anyone can send email through your server, without the need to login. This would allow spammers to use your server to send out their filth, eventually getting your server blacklisted.

First, you want to make sure your system is setup to disable it. Once ready, here's an easy way to test:

Syndicate content

Back to the Top