Support » Fixing WordPress » php 4 and php 5

  • I host wordpress on my own site under with a German host called greatnet. The server has both php4 and php 5 installed and one of my plugins is now telling me I should use php5.

    My question is, how do I change it?

    I asked my host and they said to rename all files ending in .php to .php5 which seems to me a recipe for disaster as I don’t think wordpress or any plugins would work after that.

    I found this topic and one answer was to add an entry to .htaccess but I do not have that file. Can I just create it and if so, where?

Viewing 10 replies - 1 through 10 (of 10 total)
  • esmi


    Forum Moderator

    If you have set up a custom permalink structure, you should have an .htaccess file in your root WordPress folder. Make sure that the FTP client or file management software is configured to show all files.

    If you’re absolutely sure that you do not have such a file, you can create it in a plain text editor (e.g NotePad) and add:

    AddType x-mapp-php5 .php

    to the top of the file followed by a single blank line. Save the file as .htaccess (no extension and don’t forget the preceding ‘.’), then upload it in ASCII format using FTP (or whatever file management software that your host provides) to your root WordPress folder.

    I tried that and at the same time asked my host if it should work. They came back and said that based on their server architecture it would not work, the only way to use php5 on the server my site is hosted on would be to rename all .php files to .php5 … looks like I am going to have to bite the bullet and either do that or take my host up on their offer to move my site to a server that uses php5 as standard

    I’ve never heard of using .php5 files before..

    Perhaps they mean you need to add the type and handler, ie..

    AddHandler application/x-httpd-php5 .php
    AddType application/x-httpd-php5 .php
    AddHandler application/x-httpd-php .php4
    AddType application/x-httpd-php .php4



    Forum Moderator

    Q1. Can you survive without access to PHP4?
    Q2. Are your hosts offering to move your site for free?

    If the answer to both questions is “Yes”, take them up on their offer. Far better for you long term.

    Agreed, if the host is willing to do the leg work, take them up on the offer.

    Ensure either you or your host backs up your data beforehand though “just incase”…

    The reason why I am looking into this issue is that I use NextGEN Gallery and some of it’s functions are only available under php 5.

    I have asked my host whether they would help in moving but have not yet had a reply.

    If PHP 5 is installed (along with PHP 4), then all you need do is add the handler and type like i’ve shown above.

    It would go into your htaccess file.

    Pass the code along to your host for approval if you like, i’m pretty confident that’s what they’re referring to ..

    Or perhaps what emsi suggested..

    I’ve not had to do it myself, but it’s only the sake of updating your htaccess for a few moments, if it doesn’t work you can always remove the code… 🙂

    I did pass the htaccess to my host and they rejected it, they did however move all my files to a new server with php5, installed WP and pixelpost for me and tested it from their end.

    They then gave me temporary access to the new server under a different domain so I could test and set up my email accounts on the new server. Once I was happy thay changed the actual DNS entries so my site now runs on a new server … happy!

    That’s nice of them… 🙂

    I have a similar problem i upgraded to php5 and could not access the site so i placed into the AddHandler application/x-httpd-php5 .php
    .htaccess file and my site appeared but i am unable to login to the admin section of the site do you have anyideas. I checked with a php info and the .htaccess is using php5.

    my .htaccess

    AddHandler application/x-httpd-php5 .php

    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    AuthUserFile /home/spot/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/spot/public_html/_vti_pvt/service.grp

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]


    # END WordPress

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘php 4 and php 5’ is closed to new replies.