LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-27-2006, 01:55 PM   #1
tweety1
LQ Newbie
 
Registered: May 2006
Posts: 7

Rep: Reputation: 0
problem with php.ini


Hi! friends,

My php directory is /usr/local/php.
I search the entire directory for php.ini ,but in vain.

does any one has any idea on where i will find this file??????????????
could any one help me ?

Thanks in advance
 
Old 06-27-2006, 02:16 PM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
When you install PHP from source, there will be no php.ini unless you copy the php.ini-recommended or php.ini-dist from your installation directory to /usr/local/php/lib and rename the file to php.ini.
 
Old 06-27-2006, 02:59 PM   #3
koobi
Member
 
Registered: Jun 2006
Location: Colombo, Sri Lanka
Distribution: Ubuntu
Posts: 103

Rep: Reputation: 15
what reddazz said ^^


but if you mean that your PHP runs but you're just not sure where your php.ini is, you can find it out via phpinfo() by examining the output of the file below via HTTP:
Code:
<?php
    phpinfo(INFO_GENERAL);
?>
 
Old 06-27-2006, 03:43 PM   #4
tweety1
LQ Newbie
 
Registered: May 2006
Posts: 7

Original Poster
Rep: Reputation: 0
thanks for the reply.
I didn't move php.ini-recommended from your installation directory to my php directory.

Now I have the following errors
Warning: require_once() [function.require-once]: SAFE MODE Restriction in effect. The script whose uid is 501 is not allowed to access /usr/local/php/lib/php/symfony/config/sfConfig.class.php owned by uid 0 in /var/www/symfonyphp.net/apps/htdocs/config/config.php on line 19

Warning: require_once(/usr/local/php/lib/php/symfony/config/sfConfig.class.php) [function.require-once]: failed to open stream: Success in /var/www/symfonyphp.net/apps/htdocs/config/config.php on line 19

Fatal error: require_once() [function.require]: Failed opening required '/usr/local/php/lib/php/symfony/config/sfConfig.class.php' (include_path='.:/usr/local/php') in /var/www/symfonyphp.net/apps/htdocs/config/config.php on line 19

Dose any one has any idea where i made mistake that caused the above errors.
Please help !!!!!!!!!!!
Eagerly waiting for your reply....

Last edited by tweety1; 06-27-2006 at 03:48 PM.
 
Old 06-27-2006, 04:56 PM   #5
AdaHacker
Member
 
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 31
You've got safe_mode turned on in your php.ini. One of the restrictions safe mode places on your scripts is that a running script can only open files that are owned by the same user who owns the script. In your case, the config.php file is owned by UID 501, but it's trying to include sfConfig.class.php, which is owned by root.

The solution is to either set safe_mode to off in your php.ini or to change the ownership on your scripts so that they're all owned by the same user.
 
Old 06-28-2006, 01:39 AM   #6
tweety1
LQ Newbie
 
Registered: May 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Thank you for the help.
I set safe_mode to off in my php.ini but the changes have not taken effect ,so i changed the ownership on scripts so that they're all owned by the same user.

But I have the following error
Oops! There was an internal server error.

Go back a page
Visit the home page

500 Error : internal server error

Does any one have any idea where i made mistake that cause the errors??????????????

Thanks in advance
 
Old 06-28-2006, 02:22 AM   #7
hepburnenthorpe
Member
 
Registered: Jun 2006
Location: Sydney
Distribution: Gentoo + Debian
Posts: 132

Rep: Reputation: 15
Quote:
I set safe_mode to off in my php.ini but the changes have not taken effect
Did you restart your server? You need to restart the http server for changes to take effect.

The other errors could be anything. This could be just a php coding problem and if so id'e suggest you might get a better result on a php forum.
 
Old 06-28-2006, 03:49 AM   #8
tweety1
LQ Newbie
 
Registered: May 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Thank you hepburnenthorpe

I restarted my server ,but changes have not effect.

Please help me.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
php.ini-dist to php.ini lord-fu Programming 10 05-02-2006 06:24 PM
php.ini problem newuser455 Linux - Software 3 06-08-2005 05:48 AM
php5 apache2 mysql4 don't work, php does not seem to read php.ini atom Linux - Software 5 03-24-2005 12:05 PM
Upgraded PHP from 4.3.4 to 4.3.10 and now it won't read php.ini gregmcavoy Linux - Software 11 01-22-2005 01:16 PM
php: different mail server from php.ini rayds Programming 0 09-14-2004 04:48 AM


All times are GMT -5. The time now is 12:30 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration