Joomla! Discussion Forums



It is currently Wed Nov 25, 2009 2:22 pm (All times are UTC )

 


Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security Checklist
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2
Author Message
Posted: Wed Jun 06, 2007 3:07 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Fri Apr 20, 2007 9:49 pm
Posts: 1
okouliko wrote:
Nothing appears. Blank page. ???


Yes, I tried this tip but get a blank page now instead of the homepage. I used the absolute path ie require('/../joomla.conf')  and made the mock config file non-writable. What else could be wrong? Is it necessary to have the configuration.php outside the public folder if I run a dedicated host?


Top
  E-mail  
 
Posted: Fri Jun 22, 2007 7:40 am 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Tue Jun 06, 2006 7:41 am
Posts: 808
Location: Third planet from Sol
Quote:
Is it necessary to have the configuration.php outside the public folder if I run a dedicated host?


If you run a dedicated host, you have a lot more control, and can probably do whatever you want.

In either case, the goal of this trick is to get the config file out of public_html which, dedicated or not, is a world-readable directory. You don't really have to move the file as long as it's permissions are good and tight.

_________________
Web Home: http://www.ronliskey.com
Support http://support.educationgrove.com


Last edited by rliskey on Fri Jun 22, 2007 7:41 am, edited 1 time in total.

Top
  E-mail  
 
Posted: Tue Dec 04, 2007 2:11 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Fri Sep 21, 2007 2:54 am
Posts: 4
This is VERY helpful! Thank you!

I have a question though...Is there a list somewhere of these "confidential" files that I should move outside of the public_html folder?


Top
   
 
Posted: Thu Dec 06, 2007 12:05 am 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Oct 12, 2007 12:52 am
Posts: 123
jasonyon wrote:
This is VERY helpful! Thank you!

I have a question though...Is there a list somewhere of these "confidential" files that I should move outside of the public_html folder?


Thanks so much for this tip! Every bit helps.

I just moved my config file out of the public folder, took a few tries  ;), but I too would be interested in what other "confidential" files  should move out of the public_html folder. Oh and how to move them of course.


Top
  E-mail  
 
 Post subject: Doesn't work for me
Posted: Sun Dec 16, 2007 9:58 am 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Wed Nov 15, 2006 1:20 am
Posts: 507
Location: Las Vegas, NV, USA
This doesn't work.

Here's what I did:

Code:
<?php
require( dirname( __FILE__ ) . '/../joomla.config' );
?>


And I placed joomla.config here: /home2/robertc/
And Joomla is installed here:      /home2/robertc/public_html/new/

And when I try to load th site, I get this:

Warning: main(/home2/robertc/public_html/new/../joomla.config) [function.main]: failed to open stream: No such file or directory in /home2/robertc/public_html/new/configuration.php on line 2

Warning: main(/home2/robertc/public_html/new/../joomla.config) [function.main]: failed to open stream: No such file or directory in /home2/robertc/public_html/new/configuration.php on line 2

Fatal error: main() [function.require]: Failed opening required '/home2/robertc/public_html/new/../joomla.config' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/robertc/public_html/new/configuration.php on line 2

So am I not able to do this trick or am I doing something wrong?


edit: Nevermind, I got it to work, it was a permissions issue, couldn't use 400, so I used 404 on both files, is that ok?

_________________
http://www.campaignforliberty.com - Official website of Ron Paul's Campaign For Liberty
http://www.robertconti.com - Robert Conti Jazz Guitar Music & Instruction


Last edited by dax702 on Sun Dec 16, 2007 10:12 am, edited 1 time in total.

Top
  E-mail  
 
Posted: Mon Jan 07, 2008 8:17 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sat Feb 03, 2007 9:49 pm
Posts: 9
have an interesting question regarding moving config.php into its own folder...after moving the renamed config.php, then uploading the "new" config.php with the suggested code in its place, does it matter whether I save this file using notepad as ansi or utf-8?


Top
   
 
Posted: Sun Jan 13, 2008 4:53 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Dec 30, 2007 3:20 pm
Posts: 16
Isura wrote:
okouliko wrote:
Nothing appears. Blank page. ???


Yes, I tried this tip but get a blank page now instead of the homepage. I used the absolute path ie require('/../joomla.conf')  and made the mock config file non-writable. What else could be wrong? Is it necessary to have the configuration.php outside the public folder if I run a dedicated host?



This is happening to me as well.  I renamed to joomla.conf in a new folder in the /home directory.  I am on a dedicated server that is running two of my websites ( so i guess its a dedicated shared server ;)) and can't change the permissions to 404, they keep resetting to 604.  The folder the joomla.conf is in has the permissions of 704.  Is this why I keep getting the blank page when I make the change?  I have tried the new configuration.php file with both the dirname( __FILE path and also typing the specific path with the same results.

Thanks.

_________________
http://www.rentgal.net


Top
  E-mail  
 
Posted: Wed Jan 16, 2008 12:39 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Jan 16, 2008 12:29 pm
Posts: 7
clone980 wrote:
Isura wrote:
okouliko wrote:
Nothing appears. Blank page. ???


Yes, I tried this tip but get a blank page now instead of the homepage. I used the absolute path ie require('/../joomla.conf')  and made the mock config file non-writable. What else could be wrong? Is it necessary to have the configuration.php outside the public folder if I run a dedicated host?



This is happening to me as well.  I renamed to joomla.conf in a new folder in the /home directory.  I am on a dedicated server that is running two of my websites ( so i guess its a dedicated shared server ;)) and can't change the permissions to 404, they keep resetting to 604.  The folder the joomla.conf is in has the permissions of 704.  Is this why I keep getting the blank page when I make the change?  I have tried the new configuration.php file with both the dirname( __FILE path and also typing the specific path with the same results.

Thanks.


Top
  E-mail  
 
Posted: Sat Mar 15, 2008 7:58 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Oct 12, 2007 12:52 am
Posts: 123
For Joomla 1.0.15 would adding:
Code:
defined( '_VALID_MOS' ) or die( 'Restricted access' );
to the beginning of the new configuration.php file help to make this even more secure? So it would look something like this:

Code:
<?php
// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );
require( '/home/XXXXX/config.conf' );;
?>


I tried it and it and everything seems to be working fine, but I thought I would share and see what everyone else thinks.


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2

Quick reply

 



Who is online

Users browsing this forum: frano8 and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group