cancel
Showing results for 
Search instead for 
Did you mean: 

.htaccess, PHP and Joomla

JasonR
Newbie
Posts: 7
Registered: ‎19-08-2007

.htaccess, PHP and Joomla

Hi
I'm trying to install the Joomla CMS (v1.0.13) in a directory on my CCGI space (not under the cgi-bin directory).
I've uploaded all of the files, and added the following lines to the .htaccess file in the installation directory:
register_globals off
php_flag magic_quotes_gpc on
According to the Joomla site, this switches off the register globals, and switches magic quotes on.  Except when I run the installation page, it says they're on and off respectively, i.e. the .htaccess file has had no effect.
Has anyone else had this problem?
Thanks in advance.
Jason
5 REPLIES 5
prichardson
Grafter
Posts: 1,503
Thanks: 1
Registered: ‎05-04-2007

Re: .htaccess, PHP and Joomla

This occurs because the CCGI platform we use makes use of PHP as a CGI application and not as the Apache module. Due to this, .htaccess files will not assist.
JasonR
Newbie
Posts: 7
Registered: ‎19-08-2007

Re: .htaccess, PHP and Joomla

Hi Phil
Thanks for your reply - the alternative method they recommend is copying a php.ini file specifying those settings into each directory.  Would this work with PlusNet's set-up?
If so, is there a default php.ini that I can copy and adapt?
Regards
Jason
MikeWhitehead
Grafter
Posts: 748
Registered: ‎19-08-2007

Re: .htaccess, PHP and Joomla

http://cvs.php.net/viewvc.cgi/php-src/php.ini-dist?revision=1.231.2.10.2.21
That is the most recent php.ini from the CVS. However, make sure PlusNet havent overridden using alternate php.ini files (to be honest, I wasn't even aware it was possible simply by uploading one into a directory, doesn't seem a very smart thing to me O.o).
astarsolutions
Grafter
Posts: 393
Registered: ‎26-07-2007

Re: .htaccess, PHP and Joomla

In a standard php installation there is only one php.ini file that you aren't going to be able to edit or add to.
You might be able to include an option using the ini_set command
http://uk2.php.net/ini_set
JasonR
Newbie
Posts: 7
Registered: ‎19-08-2007

Re: .htaccess, PHP and Joomla

Thanks for your help - to be honest the Joomla site seems to assume you're running on your own hardware or dedicated server, which obviously I'm not.
Having to copy a php.ini file throughout the directory structure seems a little "ropey", but I didn't do it earlier this year and ended up with it getting hacked.  I don't know whether someone guessed the password or used a PHP exploit, but I'd like to cut out that possibility.
Thanks again.
Jason