www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Server-Side Development > PHP

    PHP Discussion and technical support for using and deploying PHP based websites.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1  
    Old 11-03-2009, 10:32 PM
    benbramz benbramz is offline
    Registered User
     
    Join Date: May 2005
    Posts: 49
    make .php5 .php

    Hi all,

    i moved to a server which has php4 and php5 running. Anyway, in order to run your script in php5 i had to alter the filenames of my main opening files (aparently the includes dont need it..) but this has screwed up my search index results.

    What do i need to add into my .htaccess file to make..

    http://www.mywebsite.com/hello.php5?...ring=something

    load..

    http://www.mywebsite.com/hello.php?q...ring=something

    Thanks guys!
    Reply With Quote
      #2  
    Old 11-04-2009, 09:42 AM
    droomweb droomweb is offline
    Registered User
     
    Join Date: Nov 2009
    Posts: 2
    not sure if you can do it via .htaccess but you can add / modify the following in your apache config:

    Code:
    <Ifmodule mod_php5.c>
    AddType application/x-httpd-php .php .php3 .php4 .php5
    AddType application/x-httpd-php-source .phps
    </IfModule>
    --
    visit my tech blog @ www.schuchlenz.com
    Reply With Quote
      #3  
    Old 11-05-2009, 04:09 AM
    benbramz benbramz is offline
    Registered User
     
    Join Date: May 2005
    Posts: 49
    Quote:
    Originally Posted by droomweb View Post
    not sure if you can do it via .htaccess but you can add / modify the following in your apache config:

    Code:
    <Ifmodule mod_php5.c>
    AddType application/x-httpd-php .php .php3 .php4 .php5
    AddType application/x-httpd-php-source .phps
    </IfModule>
    --
    Is that php.ini?
    Reply With Quote
      #4  
    Old 11-05-2009, 09:05 AM
    NogDog's Avatar
    NogDog NogDog is offline
    High Energy Magic Dept.
     
    Join Date: Aug 2004
    Location: Ankh-Morpork
    Posts: 13,647
    That would be httpd.conf or .htaccess. I'm not sure how well that would "play nicely" though with whatever configuration they've used to implement your PHP5, as it is somewhat common to have one version running as an Apache module while the other is run as CGI.

    If *all* of your files are to be changed from .php to .php5, you could set up you apache config to use mod_rewrite to do a permanent redirect for all .php requests to the corresponding .php5 file, perhaps?
    __________________
    "That's what the gods are! An answer that will do! Because there's food to be caught and babies to be born and life to be lived and so there is not time for big, complicated, and worrying answers! Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be." -- from Nation, by Terry Pratchett
    freelancer.internet.com
    Email me
    Reply With Quote
      #5  
    Old 11-07-2009, 04:21 AM
    opifex's Avatar
    opifex opifex is offline
    ignorance is curable...
     
    Join Date: Sep 2008
    Location: Mexico
    Posts: 692
    you could try this also in .htaccess
    HTML Code:
    AddHandler application/x-httpd-php .php .php3 .php4 .php5
    __________________
    ...but stupidity is terminal.
    Reply With Quote
      #6  
    Old 11-07-2009, 10:33 AM
    benbramz benbramz is offline
    Registered User
     
    Join Date: May 2005
    Posts: 49
    Yeah that code sorted my headache's - thanks @opifex
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 07:17 AM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.