hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : php.ini include_path issues
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

php.ini include_path issues

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 10-21-2008, 06:19 PM
Tom M Tom M is offline
WHT Addict
 
Join Date: Dec 2005
Location: South Wales, UK
Posts: 152
php.ini include_path issues

Hello,
I've installed Drupal quite a few times on different servers but it was the first time on a new server we are working on. Likewise, we installed another CMS application for the first time on this server.
Both Drupal and the other CMS were bringing up errors during installation.
Drupal was displaying:
Code:

Warning: include_once(includes/install.inc) [function.include-once]: failed to open stream: No such file or directory in /home/*****/*****/*****.com/public_html/includes/database.inc on line 129

Warning: include_once() [function.include]: Failed opening 'includes/install.inc' for inclusion (include_path='/usr/local/lib/php') in /home/*****/*****/*****.com/public_html/includes/database.inc on line 129

Fatal error: Call to undefined function install_goto() in /home/*****/*****/*****.com/public_html/includes/database.inc on line 130
The other CMS, errors that were also related to include_path.
After abit of digging around on Drupal's forums I found a thread that had the exact error I was encountering and the problem, the thread starter claimed, was a "misconfiguration" within php.ini. He said that he made the following change and it fixed his problem:
Changing:
Code:

; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
include_path = "/usr/local/lib/php"
TO
Code:

; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
include_path = ".:/usr/lib/php:/usr/local/lib/php"
Well, after exhausting all other means to remedy this problem I tried it out. It did indeed fix my problem with Drupal and Drupal ran perfectly. It also fixed the problem with the other CMS.
I contacted the management company that we use sometimes just to see what they had to say about the problem and the solution I used:
Quote:


The changes (you have made) are not correct. Include_path should be disabled and Drupal installation directory's permission needs to be changed to 777.



Not understanding this fully they apparently disabled include_path. Drupal still responds, however, the other script (CMS) is now very slow.
I just wanted to ask if the change to include_path within php.ini I made was truly incorrect and why/what they have actually disabled?
Any help would be appreciated!
Thanks,
Tom





__________________It can only be attributable to human error.

Reply With Quote


Sponsored Links
  #2  
Old 10-22-2008, 01:10 AM
jem3 jem3 is offline
Junior Guru Wannabe
 
Join Date: Oct 2008
Location: Ohio
Posts: 41
Changing a directory's permissions to 777 is just not secure. It is a bit surprising that a hosting company would tell you to do this!
The adding to the include path cured the problem and avoided the security issue; it seems like the best solution.





__________________
Joyce Miletic RHCT + Systems EngineerNavisite Dedicated Hostinghttp://dedicatedhosting.navisite.com"24/7/365" Myth or Reality? Take the Survey

Reply With Quote
  #3  
Old 10-22-2008, 01:22 AM
koithara koithara is offline
Junior Guru Wannabe
 
Join Date: Oct 2006
Location: India
Posts: 62
hei tom,
you needn't have to disable include_path for your drupal installation to work. i don't think thats the right way to do things. and on changing the permission to 777 is not at all advisable. i guess there is some other problem with your server permissions.
why don't you give a "tail -f /usr/local/apache/logs/error_log" from shell as root user while browsing your site. it may shed some light on your actual issue.





__________________Sony Koithara ,CrazyAdmins.com -> where admins go c r @ z y!!!

Reply With Quote
Sponsored Links
  #4  
Old 10-22-2008, 01:30 AM
steveks steveks is offline
WHT Addict
 
Join Date: Sep 2008
Posts: 134
Is this a cpanel server ? I believe some thing called as OpenBase Dir restrictions which can cause these kind of issues.
Just have a try by disabling it in WHM. Just a try, not 100% sure.





__________________
The man who removes a mountain begins by carrying away small stones.

Reply With Quote
  #5  
Old 10-22-2008, 01:46 AM
koithara koithara is offline
Junior Guru Wannabe
 
Join Date: Oct 2006
Location: India
Posts: 62
openbae dir restrictions can be disabled for a particualr domain from whm-> tweak security





__________________Sony Koithara ,CrazyAdmins.com -> where admins go c r @ z y!!!

Reply With Quote
  #6  
Old 10-22-2008, 03:51 AM
steveks steveks is offline
WHT Addict
 
Join Date: Sep 2008
Posts: 134
yes, that i meant before. Tom, have a try and let us know.





__________________
The man who removes a mountain begins by carrying away small stones.

Reply With Quote
  #7  
Old 10-22-2008, 01:54 PM
Tom M Tom M is offline
WHT Addict
 
Join Date: Dec 2005
Location: South Wales, UK
Posts: 152
Hello,
Many thanks for the replies.
I should have stated in the original post, I use DirectAdmin not Cpanel.
I have not been able to locate anything in error logs.
I updated my management ticket with further questions, wondering why after they disabled include_path that one of the CMS's appears to be running very slowly:
Quote:


Either application should stop or it should work if we disable include_path. There is no reason to being slowed.
I have optimized MySQL and Apache it should be Ok now. Include_path should be disabled because PHP finds default path for application itself so there is no need to modify it specially in control panel servers.


Unsure if I should just re-enable include_path and set it as I did originally.





__________________It can only be attributable to human error.






Last edited by Tom M : 10-22-2008 at 01:57 PM.

Reply With Quote
  #8  
Old 10-23-2008, 06:55 AM
jem3 jem3 is offline
Junior Guru Wannabe
 
Join Date: Oct 2008
Location: Ohio
Posts: 41
Hey Tom, only you can make that decision... if it were me, if you can stay within the parameters that they set out and still have a secure site, then I would do that, but if doing it their way results in a blatant vulnerability, then I would argue to go the other way. Are there any downsides to enabling include_path? Does it cause something else to stop working?





__________________
Joyce Miletic RHCT + Systems EngineerNavisite Dedicated Hostinghttp://dedicatedhosting.navisite.com"24/7/365" Myth or Reality? Take the Survey

Reply With Quote
  #9  
Old 10-23-2008, 07:35 AM
macooper macooper is offline
Junior Guru
 
Join Date: Mar 2004
Location: UK
Posts: 213
There shouldn't be any need to use the include_path for this type of problem, but modifying the directories to 777 also seems wrong. Personally, I woud modify the directory permissions to 755 and leave out the include_path setting. The only directories that should need 777 permissions are any directories where users upload images (such as avatars, personal pics for a gallery etc.)





__________________
Martin

Reply With Quote
  #10  
Old 10-23-2008, 01:00 PM
Tom M Tom M is offline
WHT Addict
 
Join Date: Dec 2005
Location: South Wales, UK
Posts: 152
Thanks Jem3 and macooper.
I agree completely on the 777 issue - I'll be changing that back (unsure why they changed it in the first place)
I'll stick with the change they have made for now and try to troubleshoot why it has slowed down the other script.
Thanks for the help.
T.





__________________It can only be attributable to human error.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
GoGrid Launches Free Cloud Migration Service through Racemi Partnership Web Hosting News 2013-04-10 11:16:38
MSPAlliance Readies MSPWorld 2013 Conference in Orlando Web Hosting News 2013-03-15 16:24:53
Cloud Security Alliance Launches Website for Cloud-Related Legal Issues Web Hosting News 2013-02-25 11:27:00
50d0d1f2-f254-44ec-a69a-695345a799a0 Listing 2013-03-05 18:26:06
EMC and Cisco Team Up for Cloud-Focused Educational Program Web Hosting News 2012-04-02 10:42:58


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?