Go Back   CodingForums.com > :: Computing & Sciences > Computer/PC discussions

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 08-08-2007, 08:39 PM   PM User | #1
TheShaner
Senior Coder

 
TheShaner's Avatar
 
Join Date: Sep 2005
Location: Orlando, FL
Posts: 1,120
Thanks: 2
Thanked 38 Times in 38 Posts
TheShaner will become famous soon enoughTheShaner will become famous soon enough
PHP Configuration File Not Loading

Hey all,

This is something that I'm really stuck on. I configured PHP to look for my configuration file (php.ini) in /php/ini. /php/ini is a symbolic link to my actual php folder. In that folder resides php.ini.

When I display phpinfo(), next to Loaded Configuration File is (none), but next to Configuration File (php.ini) Path is /usr/local/php.

None of my settings in php.ini are in place, so I know that php.ini is not loading for sure. What can I do to see what's going on? Can I set PHP's Config File Path to a symbolic link? I don't see why not. Could my php.ini be erroring out and that's why it doesn't load? If so, how do I found out if it's really erroring and what line is bad?

Thanks for any guidance,

Shane

Last edited by TheShaner; 08-09-2007 at 04:20 PM.. Reason: Probably shouldn't have my actual paths on the web
TheShaner is offline   Reply With Quote
Old 08-08-2007, 08:43 PM   PM User | #2
Spookster
The Infractionator-inator


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 5,605
Thanks: 3
Thanked 21 Times in 21 Posts
Spookster is on a distinguished road
Did you restart apache after making changes?
__________________
Spookster
CodingForums Tyrant
All Hail Spookster
Where do you want to go today? Microso... errr Wrong!!! Make the switch Ubuntu Linux
Spookster is offline   Reply With Quote
Old 08-08-2007, 08:56 PM   PM User | #3
TheShaner
Senior Coder

 
TheShaner's Avatar
 
Join Date: Sep 2005
Location: Orlando, FL
Posts: 1,120
Thanks: 2
Thanked 38 Times in 38 Posts
TheShaner will become famous soon enoughTheShaner will become famous soon enough
I've restarted the apache server many times and even the actual gentoo server and all to no avail.

-Shane
TheShaner is offline   Reply With Quote
Old 08-08-2007, 09:09 PM   PM User | #4
oracleguy
The Spaminator


 
Join Date: Jun 2002
Location: USA
Posts: 8,023
Thanks: 1
Thanked 201 Times in 197 Posts
oracleguy has a spectacular aura aboutoracleguy has a spectacular aura aboutoracleguy has a spectacular aura about
Are you sure that the user account the apache process is running under has read access to the file and directory in question?
__________________
OracleGuy
My Blog
"... the VP of our third biggest account started sweating bullets in our latest project status conference when Roy stood up and asserted: 'We don’t code our products for SMACKTARDS.'" - Daily Victim #564
oracleguy is offline   Reply With Quote
Old 08-08-2007, 09:23 PM   PM User | #5
TheShaner
Senior Coder

 
TheShaner's Avatar
 
Join Date: Sep 2005
Location: Orlando, FL
Posts: 1,120
Thanks: 2
Thanked 38 Times in 38 Posts
TheShaner will become famous soon enoughTheShaner will become famous soon enough
I'm working under root, although if you're talking about the apache web server's account, then should i make that php directory owned by the apache account?

None of the other folders, like public_html, are owned by the apache account and the website comes up locally no problem

Edit: I ran php --ini on the command line and contrary to what phpinfo() says, it told me that configuration file path is /usr/local/lib. When I put my php.ini file in that location, it works. What can I do to correct this?


-Shane

Last edited by TheShaner; 08-09-2007 at 04:22 PM.. Reason: Editting out actual server paths
TheShaner is offline   Reply With Quote
Old 09-12-2007, 09:45 AM   PM User | #6
Reubenxx2007
New to the CF scene

 
Join Date: Sep 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Reubenxx2007 is an unknown quantity at this point
When you compile php, use these options:

--sysconfdir=/etc --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d

I had this same problem and this fixed it so that php.ini is loaded correctly when php is run from command line, or via apache module.
Reubenxx2007 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:22 AM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.