Support » Fixing WordPress » Need to edit htaccess to enable PHP 5

  • I’m working on a server problem with my host, 1and!, and they’ve advised I try upgrading to PHP5 to fix the problem. Apparently I can do this as follows:

    By default Apache uses PHP 4 for .php extension. If you don’t want to rename all your
    scripts to .php5 you can do the following:
    Create a .htaccess file and place the following line AddType x-mapp-php5 .php in it.

    This will tell Apache to use PHP 5 instead of PHP 4 for the extension .php in the
    directory the .htaccess is placed and all sub-directories under it.

    My concern is I already have WordPress’s htaccess file in the same folder as my PHP files. Can I just add this line to the existing htaccess file without breaking it? Will WordPress delete the line when it updates the htaccess file?

    I’m totally lost on this one and badly need help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • cronus3166


    I know this is old, but you actually sparked an idea and it worked.

    I also have 1and1 and what I did. Is in my root directory I created a folder and put my website in that folder. Instructing the domain name to be re-directed to that folder.

    Then in the main directory I created a new .htaccess file with that command line. Since it makes that directory and everything sub-directory to use the new command line.

    And it works!

    Thanks this fixed a bunch of 500 internal server error’s I was seeing on 1and1 with wordpress!!

    you are the RoxkZorz!
    After trying the php.ini with memory=128mb (which didn’t work), adding your fix did!

    My fix was simply switching back to php4
    The code suggested for the htaccess file I’ve found on here doesn’t work for me, with php5. I leave the code alone, changed to php4 (cpanel) and wall-ah!

    Thanks Mr. fif. because in my wordpress work hosted in php5.x. so the htaccess is not working on it. I follow up your idea. now it works. I just add “AddType x-mapp-php5 .php” in my htaccess file. now it works. Thanks for your advice.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Need to edit htaccess to enable PHP 5’ is closed to new replies.