include path to files outside the webroot

Asked by:
almurrin / 13 Points
Time:
2012-09-20 3:25 pm EST
Category:
File Management
Hits:
1,411
I put my include files outside my web root (for security), but I can't access them from inside the file (.php) in the webroot. I searched google and it seems that the absolute path should look like '/home//folder/filename.php'. In the error message that I get it says the include_path='.:/usr/lib/php:/usr/local/lib/php:/home//php'.

I don't see what I am missing. Is there something that I need to change in my php.ini file? (although I tried and I don't have access to change it.)
Thanks!

To ask this user for more information, please first login.

To submit an answer, please login.

ANSWERS

0

ScottM
Staff
16,266 Points
2012-09-20 4:44 pm EST
Hello almurrin,

I checked your php.ini, located in your public_html directory and only see the following setting:

include_path = ".:/usr/lib/php:/usr/local/lib/php"

You may need to set it to be:
include_path = ".:/usr/lib/php:/usr/local/lib/php:/home/username/php"

Be sure that the username is your cpanel username.

The php.ini was set to 444 permissions which prevented writing. You can change them by right clicking on the filename and selecting 'Change Permissions' from the menu. I went ahead and made it 644 for you so you can write. Be sure to change it back to 444 afterwards for security.

Best Regards,
Scott M

To submit a comment on this answer, please first login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.
}