PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old December 30th, 2003, 11:32 PM
Enforcer Enforcer is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Nevada, USA
Posts: 28 Enforcer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unable to effectively edit php.ini

Hello.

Housekeeping first --> $me = phpnoob();

System: Win2K, Apache 2.0.46, and php 4.3.2

Problem: Editing of php.ini configuration settings do not seem to alter the php settings. Any attempted changes do not appear in the information generated by phpinfo();. Step-through debugging bears out this fact as well.

I have RTFM'd ALL of the php distribution install.txt file as well other documentation.

For example, I set the php.ini include_path to 'c:webserverphp_includes', but phpinfo() shows the include_path as '.;c:php4pear', which appears to be the default (interesting note - a search of php.ini shows zero instances of '.;c:php4pear' anywhere in the file).

Ditto for my turning off 'short_open_tag', etc.

I have placed my edited (but apparently ineffective) php.ini file in c:windowssystem32, according to the install.txt. I have restarted (and reinstalled) Apache, which did not help.

The server runs fine, but I must do things like manually set the 'save_session_path()' since the php.ini won't set it for me. Instead, I use workarounds such as:

php Code:
Original - php Code
  1.  
  2. <?php
  3.  
  4. //set the session path
  5. session_save_path($_SERVER['DOCUMENT_ROOT'] . "/sessions/");
  6.  
  7. //start the new session
  8.  
  9. //$ame old Micro$oft
  10. header("Cache-control:private"); //IE 6 fix
  11.  
  12. ?>   



Any help would be much appreciated. Thanks

Reply With Quote
  #2  
Old December 31st, 2003, 01:23 AM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: Unable to effectively edit php.ini

My install of php looks for the php.ini file in the c:windows directory. When you run phpinfo(), check the first box of attributes for the 'Configuration File (php.ini) Path' and place your modified php.ini file there...

FYI, there is an excellent win based php.ini modification tool called phpconfig written by analogX. The url is as follows:

http://www.analogx.com/contents/download/network/phpconf.htm

it makes editing the php.ini much easier that using a text editor. Let me know if you have any questions

Reply With Quote
  #3  
Old December 31st, 2003, 02:07 AM
Enforcer Enforcer is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Nevada, USA
Posts: 28 Enforcer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Unable to effectively edit php.ini

Ummm. phpinfo(); now shows the updated information, but when I do a step through debug of
php Code:
Original - php Code
  1.  
  2. $include_path = get_include_path;


it shows the same include_path as before:'.;c:php4pear'.

This is quite frustrating. How can phpinfo(); show my correct php.ini config value, but stepping through the code shows that the value has not changed at run time? Hmmm.

************************************

Due to retardation (and the inability to read the 5th line of the phpinfo(); output), my successful implementation was thwarted.

The blind (eddie), showed me the light.

It worked on my test system just great Blindeddie, so I have no doubt that I will be able to successfully implement my config on my production server.

I was looking for a Zebra, but it was really just a horse. Thank you very much.

And BTW, I note that you are an admin on CodeWalkers(CW). May I snag a CW graphic and use it for a link on my site?

Reply With Quote
  #4  
Old December 31st, 2003, 02:43 AM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: Unable to effectively edit php.ini

I am an admin, but not the owner of the site. The person you need to contact about that would be Matt Wade, the owner. His nick is matt and the best way to contact him is via PM, so look above for 'Message Center' and click 'compose' if you have any problems getting in touch with Matt, let me know and I will forward your request...

Reply With Quote
  #5  
Old December 31st, 2003, 12:20 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: Unable to effectively edit php.ini

I tested this and it seems to be working fine for me... what is the value you have for the include path in the php.ini file? what is displayed in the phpinfo()? Let me know and I will take a look...

Reply With Quote
  #6  
Old December 31st, 2003, 12:30 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: Unable to effectively edit php.ini

Is your include path blank? if it is then by default the path .;c:php4pear is used by php. I just tested it and was able to reproduce it. There is either some kind of error in the php.ini file or you did not restart the web server after making mods to the include path. After making mods to the php.ini file it is recommended that you restart the web services to make sure your changes take.

Reply With Quote
  #7  
Old December 31st, 2003, 01:49 PM
Enforcer Enforcer is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Nevada, USA
Posts: 28 Enforcer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Unable to effectively edit php.ini

phpinfo(); shows the values in my php.ini file, so I believe that it is reading the ini file correctly.

I use Zend personal edition editor. Stepping through the code and watching my 'include_path' value shows that it ALWAYS resets to the default. Perhaps it's a side effect of using Zend. I really don't know.

I even tried restore_include_path(); to see if I could force a re-read of the php.ini value, but no-go.

I saved the 'view source' from my phpinfo(); output HERE.

Thanks for looking at this Blindeddie, I appreciate it.

Reply With Quote
  #8  
Old December 31st, 2003, 02:12 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: Unable to effectively edit php.ini

what you should try is echoing the get_include_path() on a regular page and not in ZEND editor and see what is output. I assume it will be correct on an actual page.

Reply With Quote
  #9  
Old December 31st, 2003, 04:25 PM
Enforcer Enforcer is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Nevada, USA
Posts: 28 Enforcer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Unable to effectively edit php.ini

It appears to be working when I edit my code, then check on a non-local box. I did some tweaking of a few things, but I can now use something like this to access my include files:
php Code:
Original - php Code
  1.  
  2. //add include file of misc funcs
  3. include(ini_get("include_path") . "functions.inc");


which is what I wanted in the first place. Thx much eddie.

Reply With Quote
  #10  
Old December 31st, 2003, 08:57 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: Unable to effectively edit php.ini

I think you are missing the point of the include path in the ini file...what it does is tell php to look in the path specified in the include_path line of the ini file (there can be multiple paths seperated by a semi-colon)if an include is found in a script, so the example you posted should work if you form it this way

php Code:
Original - php Code
  1.  
  2. <?
  3. include('functions.inc');
  4. ?>


PHP will look in the same directory as the file the include is contained in as well as the include_path path. If it does not find the file in either of those locations php will throw an error. Basically there is no need to use the ini_get function in the include statement... If you nedd clarification, let me know...

Reply With Quote
  #11  
Old December 31st, 2003, 09:07 PM
Enforcer Enforcer is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Nevada, USA
Posts: 28 Enforcer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Unable to effectively edit php.ini

Hehe.

Thanks. As I stated, I'm brand new to php. That makes sense to me though. Is this the part where I slap my forehead and say "duh!"? I believe it is.

In any case, the system is working as it should and I have been cleaning up code (as you noted above - I need to do more cleaning).

Many thanks for your assistance O Blind one.
Â*

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > Unable to effectively edit php.ini


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway