shared hosting install overwriting .htaccess
  • Hi,
    I am trying to setup a newscoop install on webfaction.com and I think (hope) I just have one final hurdle.
    Backstory: In order to use APC or XCache (I setup XCache), one needs to build PHP locally in the home directory. So I did this and added XCache. in order to get the newscoop app to use this local PHP installation, an .htaccess file pointing to the local install has to be created.
    Action php_custom /my_php.cgi
    <FilesMatch .php$>
        SetHandler php_custom
    </FilesMatch>
     
    During the newscoop installation process, somewhere in the midsts of setting up the database, the private function databaseConfiguration($p_input) is called from within the install/classes/CampInstallationBase.php file and the .htaccess file is copied to .htaccess-default and the original .htaccess file is deleted (unlinked). Later newscoop would normally attempt to copy the htaccess file contents to .htaccess, but this installation hangs when it no longer is being told to use the local PHP installation and reverts back to the global PHP install, without XCache. Even if I preseed htaccess with the instructions, the code doesn't make it far enough to copy the htaccess over to .htaccess.

    Is there any issue with disabling this functionality in this one file and manually completing the htaccess/.htaccess merge after installation? Is the scope of .htaccess manipulation the limited to these two funtions? it seems so.

    I suppose switching PHP builds mid-function is a deathblow.

    Any pointers would be appreciated?
    Thanks
  • 3 Comments sorted by
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    xcache is not required option. It's only optional to speed up newscoop site
  • sure, and I want to use it, and it's set up to use it. It's just that the install script does not preserve the .htaccess file and it has a critical instruction set in it. I just want to make sure there aren't any unforseen consequences of disabling the overwrite during installation if I manually merge them afterwards, or if I alter the installation code to merge them during installation?  
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    as you like
    before installation you can prepare the original htaccess file which is used as source for .hrtaccess