MainelyDesign.com Blog

Apache Tagged Blog Posts

Speeding Up Windows 8 for Web Development (using WAMP)

Posted on 02/25/2013 at 01:33 pm | Viewed 48,704 times | 0 comments

Here is my list of optimizations and changes you can make (and I've had to make) in order to get WAMP (and CakePHP) to run faster on my Windows 8 computer.

Speed Up WAMP Web Development on Windows 8

The short list, in order of importance (stop once you are happy with your localhost web server response time and speed):

  • Get the latest version of WAMP.
    Start by downloading the latest wamp.  I used the 64 bit version.  Download WAMP here.

  • Edit your hosts file.
    Make sure it has the proper entries, and most importantly, remove the IPv6 localhost setting.  Your Windows 8 hosts file should look like this:

    127.0.0.1          localhost
    #    ::1             localhost

  • Disable IP v6
    A great tutorial can be found here.  My advice is to disable IPv6 BOTH ways- via the network adapter and via the regedit hack.

  • Edit Apahce httpd.conf
    These tweaks are supposed to speed up the lstat() system calls when reading files/scanning directories.  They are:

    EnableMMAP On
    EnableSendfile On

  • Edit PHP.ini
    Increase the real path cache size.  This helps when you have lots of files involved.

    ; Determines the size of the realpath cache to be used by PHP. This value should
    ; be increased on systems where PHP opens many files to reflect the quantity of
    ; the file operations performed.
    ; http://php.net/realpath-cache-size
    realpath_cache_size = 24M

  • CakePHP: make sure debug is off.

Integration of Cakephp Internationalization and GIT

Posted on 12/28/2012 at 12:33 pm | Viewed 21,374 times | 0 comments

We have discovered in a recent implementation of Internationalization that GIT can corrupt the POEdit generated *.po and *.mo files.

Upon committing updated files GIT by default will replace the LF with CRLF in these files.   These files cannot be tampered with after generation,  even viewing the files with most windows based editor may corrupt them. 

CakePHP Form Security Blackhole on Large Forms

Posted on 06/28/2012 at 11:11 am | Viewed 14,838 times | 0 comments

I kept getting the White Screen of Death (WSOD).  What we at Saco Design have appropriately named the behavior of the default blackhole Security Component setting.  The weird issue was that I was getting the issue only on the live server.  I had recently updated the live server's version of PHP to the latest 5.3.x release.  However, I neglected to update my local PHP version, which was still 5.3.5. 

Faking Symlinks on Windows 2003

Posted on 09/17/2009 at 04:25 pm | Viewed 17,452 times | 0 comments

My production server is a LAMP server.  I love it.  I have one cental location for my CakePHP application and symlink the folders I need to each individual hosting account.  It's pretty easy to do and very powerful.  I work on another server that is Windows 2003.  Everytime I sit down to do work, I bemoan not having the ability to create symlinks.  Turns out there is a way...

Network Solutions' Flawed .htaccess and Mod_Rewrite Rules Implementation

Posted on 08/06/2009 at 02:38 pm | Viewed 34,484 times | 7 comments

I can't believe it!  I spent hours trying to get the mod_rewrite rules working in .htaccess on Network Solutions' servers.  Everything I tried didn't work.  Using the default .htaccess (from Cake distribution) failed.  I've used the distribution on several servers and never had any issue with the rewrite rules.  However, Network Solutions's mod_rewrite works differently than [all] other servers.

Naming a Text File .htaccess on Windows

Posted on 05/13/2009 at 12:15 pm | Viewed 11,239 times | 0 comments

A big pain- you can't just name a file .htaccess through Windows Explorer.  It complains that you need to supply a name!  No problem.

Here's how you can name a file .htaccess (only tested on Notepad, though hopefully it will work on more):

  1. Load up your file in Notepad or create a new file in Notepad
  2. Add your .htaccess declarations
  3. File > Save As
  4. In the filename text box put ".htaccess" - with the double quotes (".htaccess" exactly)
  5. In the filetype select box choose 'All Files'
  6. Save it!

Making Apache Parse .html files as .php Files

Posted on 05/13/2009 at 12:09 pm | Viewed 12,516 times | 0 comments

When re-designing a site, or somehow being locked into a given web site structure that uses .html (or .htm) file extensions, it's a good idea to keep the file names the same (especially if the site has been around a while and has good search engine visibility).  Think you can't use PHP on .html or .htm web pages?  Think again.  With apache it's as easy as modifying the .htaccess file.

Full Tag List

Meet Site Avenger - Hosted Content Management System

Powered By: Site Avenger | Site Production: Saco Design