Category: Apache

  • 500 Internal Server Error caused by editing .htaccess file

    500 internal server error caused by editing htaccess file500 internal server error caused by editing htaccess file Just wanted to write a quick post about why you might get a "500 Internal Server Error" message after editing your .htaccess file. This happened to me a few days ago, but i just ignored this message and used some work-around (can’t remember what exactly i did during that time). But i wanted to find the real issue behind this error as it was getting annoying having to encounter it more often.. I was able to pin-point the cause of the problem in matter of a few seconds. But the weird thing is that i first tried doing a quick search for “500 Internal Server Error caused by editing .htaccess file” on Google; which was a very specific search, but i couldn’t find anything specifically related to my issue. I am sure i would have eventually ended up with a good result, but time was a factor here 🙂 So that is the reason behind this post, I’m writing this for future reference and in case anyone else who might stumble upon this issue. OK, I know; Enough talk. The issue was the character encoding of the file. I was using the Komodo IDE instead of of my usual Notepad+, I noticed my Komodo was setup to save all files in the UTF-8 character encoding; so i decided to change the file encoding to Western European CP1252, then saved the file again and BOOM! It worked 🙂 Please let me know if this helped you 🙂

    Share
  • Apache 2.2.x won’t load php5apache2.dll solution

    Recently, I started upgrading all my applications to the latest versions or at least upto the version my hosting providers uses – i was using Apache 1.3.x HTTP Server, but I’ve finally upgraded to the latest version which is Apache 2.2.15 & PHP 5.3.2 as of writing this post. I think it’s a good idea to keep your Apache / PHP and MySQL up-to date with the latest release or at least up-to date to match your Web Hosting Provider. Anyways, while i was upgrading from Apache 1.3.4 to Apache 2.2.15 i ran into a problem – Apache 2 actually installed pretty smoothly without any complicated issues arising. After the Apache & PHP Installation I started to setup Apache to use PHP where the real problem begin, Apache couldn’t load the php5apache2.dll Module, it was saying that the module can’t be found (look at the below pic to see the error i was getting). Apache 2.2.x Can't Load php5apache2.dll Module Error I was using the PHP Installation Manual (install.txt) all this time that came included with the PHP zip file, i had the below values added as said in that install file: # For PHP 5 do something like this: LoadModule php5_module "c:/php/php5apache2.dll" AddType application/x-httpd-php .php # configure the path to php.ini PHPIniDir "C:/php" I then double checked the PHP installation directory to make sure there is a file called php5apache2.dll and sure enough, it was there. While i was checking for the above file I also noticed that there is another file in that directory called php5apache2_2.dll. I tried giving that file a try and change the file name in httpd.conf from php5apache2.dll to php5apache2_2.dll, Which got it working! It was a really simple fix but very easy to overlook it. Hope this will save others (who come across this issue) some valuable time.

    Share