CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Pre-installation Questions (Moderator: Dave Greenberg) »
  • Changing File Extensions
Pages: [1]

Author Topic: Changing File Extensions  (Read 1754 times)

rpainter

  • Guest
Changing File Extensions
January 02, 2008, 11:38:27 am
Hello. I have been looking at civicrm, and think that it would be an excellent fit for my organization. Here is the problem:

Our host has PHP4 and PHP5 installed on the server. They told me that in order to run PHP5, I need to change the extension of the files from .php to .php5, or add the following line to my .htaccess file (if I want to keep the .php extension):

Code: [Select]
AddHandler application/x-httpd-php5 .php
I tried to add the line to the file, but it broke some of the other parts of my site. SO...my question is this:

Can I change the file extensions on the civicrm files to .php5? Can I run both PHP4 and PHP5 on the same site? Sorry if these sound like stupid questions, but I just don't know the answers.

Thanks for your help.

geilhufe

  • I post frequently
  • ***
  • Posts: 293
  • Karma: 33
    • Social Source Software
Re: Changing File Extensions
January 02, 2008, 12:09:27 pm

I believe it is as simple as putting the modified .htaccess file into the civicrm folder. That way it will only force php5 for civicrm files and not the rest of the files on your site.
Drupal and CiviCRM consulting, strategy and configuration
http://www.social-source.com/

rpainter

  • Guest
Re: Changing File Extensions
January 02, 2008, 12:14:31 pm
So civicrm will be placed in a separate folder? Cool. that will work. I'll download it and try.

Thanks for your help.

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: Changing File Extensions
January 02, 2008, 04:36:47 pm
Here is how I did it with help from this forum.  The sub directory may depend on what else you are running on on your domain.

I have a drupal directory where there is an .htaccess file where I added the following line:
AddHandler application/x-httpd-php5 .php

Good luck.


Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Changing File Extensions
January 03, 2008, 02:32:33 am
Yes, CiviCRM runs off of its own directory, so putting the .htaccess file there should be all that is needed.

Alternatively, you can switch the other files to have .php4 extension; switching CiviCRM to have .php5 extension is a lot of work, as you’d have to replace all the require_once calls inside CiviCRM that import .php files.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Pre-installation Questions (Moderator: Dave Greenberg) »
  • Changing File Extensions

This forum was archived on 2017-11-26.