Jump to content

Web Host w/ Access ABOVE webroot


ami_liz85

Recommended Posts

I am currently with GoDaddy. They say I cannot access a level above webroot without a dedicated server. I would like to store my connection information somewhere that is not accessible through a browser. Is there any web host that allows this WITHOUT requiring your own server. It is just too pricey to pay $200/mo. just to know my SQL connections are safe should PHP fail.

 

Thanks!

Link to comment
Share on other sites

They're fudging the truth. You probably can't access anything above the webroot through Apache (ie, through a website), but your PHP should be able to get there just fine.

 

Example: with a folder structure like

/home
	/you
		/public_html
			/various things accessible on the website
		/config
			/db.php
			/other files
then you can

include $_SERVER["DOCUMENT_ROOT"] /* public_html */ . "/../config/db.php"; // /home/you/config/db.php

Link to comment
Share on other sites

I was struggling with it, so I sent them a support ticket... this was the response:

 

"On our Shared Hosting accounts we do not allow customers to access above or below the webroot. There is also currently no option to create additional database users. You may want to consider a server so you have more control over your account.
Our servers are sold with the understanding that administration duties, security and management of the server are your responsibility. For more information on the servers we offer please review the following."

 

I would prefer that I not be responsible for the administration, security, and management... especially at $200 a month. If I wanted to do that I would just buy my own server and it would be paid off in no time.

 

They should definitely let you know what is one level up from where your site is stored so you can use that area for these purposes. I don't see why it would be such a big deal to allow this.

@KevinM1 - Which hosts have you used? If this is true, I would be interested in taking a look at them.

 

Thanks!
 

Link to comment
Share on other sites

They're fudging the truth. You probably can't access anything above the webroot through Apache (ie, through a website), but your PHP should be able to get there just fine.

 

Example: with a folder structure like

/home
	/you
		/public_html
			/various things accessible on the website
		/config
			/db.php
			/other files
then you can

include $_SERVER["DOCUMENT_ROOT"] /* public_html */ . "/../config/db.php"; // /home/you/config/db.php

 

Yeah, that's what I'm thinking. They're trying to use your own ignorance against you in order to upsell.

Link to comment
Share on other sites

@ami_liz85:

 

To add to Requinix's response, I think the confusion is that you may not be aware that there is a root folder that the host provides you. But, you can create webroot(s) that are at a lower level. You do NOT have to (nor should you) put your site content at the root of the folder that they give you. Create a logical folder structure (such as Requinix showed) and make your webroot for your domain at one of the lower levels. Anything above that would not be accessible to that domain.

Link to comment
Share on other sites

At the risk of alienating a cousin of mine who's something of a bigwig at the above-named registrar/hosting service, I'd leave them and go to RootBSD.net without hesitation.  Their name says it all ;)

Our business moved 3 sites there last year and I don't think we could be happier.

Link to comment
Share on other sites

I've dealt with some people who used Godaddy shared hosting and they did have one level above the webroot if I recall correctly. That said, I personally found godaddy's shared hosting to be fairly crappy and terribly slow so I'd recommend a different provider just based on that. I've not used any shared hosting in a long time so I can't really recommend any particular place, there is a thread on here with lots of options though.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.