LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-15-2007, 04:00 PM   #1
James_Ecker
LQ Newbie
 
Registered: Mar 2004
Posts: 9

Rep: Reputation: 0
Question Apache 2.2, Php 5.1, & Mysql on CentOS5


I have a web based application that works using Apache 2.0, Php 5.0, & mySQL. Prior installations has always allowed the application (via PHP) to access documents outside the documentroot. Example: The documentroot is set to '/var/www/html', I want to have the application access a file in '/var/www/secret' directory. Through php I coded it like this:
<?php require_once('../secret/dbaseSettings.php'); ?>

I have not changed anything in the application, I have only upgraded the operating system and the version of the supporting applications. Now the web base application cannot access the files outside the documentroot. I have checked the permissions for the files and the directories, they are the same as with the previous installations.

Can anyone point me into the direction of fixing this problem?
 
Old 04-15-2007, 06:57 PM   #2
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
I'm guessing you have an open_basedir restriction in effect. Put a phpinfo() page in the webspace to check for that. If there are directories listed, that is the issue. Change open_basedir to none in php.ini and see if that resolves the problem.
 
Old 04-15-2007, 07:56 PM   #3
James_Ecker
LQ Newbie
 
Registered: Mar 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Thank you zaichik for responding so quickly. I checked the open_basedir and it is commented out. Any other ideas?
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware guide for AMP Apache MySQL & PHP xushi Slackware 35 05-11-2006 11:18 AM
Apache ADVX & PHP w/ MySQL MonServeur Linux - Software 3 11-21-2004 03:11 PM
Apache ADVX & PHP w/ MySQL MonServeur Mandriva 2 11-21-2004 01:39 PM
MDK10 and Apache, MySql & PhP prodigal Mandriva 2 08-05-2004 07:49 AM
From RedHat9 to FreeBSD (Apache 2 & Mysql & PHP 4) guardian653 *BSD 5 12-11-2003 05:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration