Welcome to Geeklog, Anonymous Friday, April 26 2024 @ 07:12 am EDT

Geeklog Forums

Warning: Unable to access config.php (not the newbie version)


hobbzilla

Anonymous
confused
First off, I have an existing geeklog site setup and working fine. I am in the midst of transferring to another host. However, the new host uses Ensim as their CP. I am not as knowledgeable in linux as I wish I was.. but this appears to be some sort of directory restriction in effect.

Taken from Ensim:
ServerName www.myDomain.com
DocumentRoot /var/www/html


pwd upon SSH login gives me : /home/myUsername
pwd after cd into mainwebsite_html gives me: /var/www/html

however if I define in lib-common.php
Text Formatted Code
require_once( '/home/myUsername/config.php' );
 


I receive:

Warning: Unable to access /home/myUsername/config.php in /home/virtual/site62/fst/var/www/html/lib-common.php on line 69

Fatal error: Failed opening required '/home/myUsername/config.php' (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site62/fst/var/www/html/lib-common.php on line 69


so then I try and use the full path:
Text Formatted Code
require_once( '/home/virtual/site62/fst/home/myUsername/config.php' );
 


and I receive:

Warning: Unable to access /home/virtual/site62/fst/home/myUsername/config.php in /home/virtual/site62/fst/var/www/html/lib-common.php on line 69

Fatal error: Failed opening required '/home/virtual/site62/fst/home/myUsername/config.php' (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site62/fst/var/www/html/lib-common.php on line 69


If I move the other geeklog directories as well as config.php inside the mainwebsite_html directory... all is well (however I believe this to be a security risk -- yes?). I didn't have to do this for my current host as /public_html (aka mainwebsite_html) was really /home/user/public_html and not a hardlink to /var/www/html

So, finally my question.. is there a way to get this working securely where config.php is called from my /home directory without having to move into the public realm?
 Quote

Status: offline

geKow

Forum User
Full Member
Registered: 01/12/03
Posts: 445
Maybe this FAQ entryInstalling Geeklog entirely within the web root can be a help.

geKow
 Quote

Status: offline

trinity

Forum User
Regular Poster
Registered: 01/30/05
Posts: 80
Unfortunetly unless you can get your new hosting provider to fix it your gona have to place things in the webroot, but also note that most files will not load on there own becuse most of them check to see if they are being called directly and will complain and not send any thing usefull to the browser

Trinity

glFusion - Technology Fused with Style - www.gllabs.org
 Quote

hobbzilla

Anonymous
Thats what I was afraid of.. thanks for the link & confirmation. I guess I will just have to take measures to protect the core system files from being accessed by snoopers.
 Quote

Status: offline

beewee

Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
Or perhaps it's not too late to transfer to a webhost where you can install GL the way it should be.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
 Quote

Status: offline

knuff

Forum User
Full Member
Registered: 12/17/04
Posts: 340
Location:Sweden
Are you really sure that this is correct ?

/home/virtual/site62/fst/home/myUsername/config.php

If it is just an educated guess, it could still be just a wrong path.

Did phpinfo not give you more info on your real paths ?
In addition did you try to create a directory just above your webroot instead of the home directory. If you are allowed, that should surely fix the issue.


So go to /var/www/html
do cd ..
do ls
if you are in /var/www
do mkdir geek

If this works, than use /home/virtual/site62/fst/var/www/geek as your directory

Best Regards,
Boris




Vanrillaer.com - our Family Portal
 Quote

All times are EDT. The time is now 07:12 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content