php.ini set up problem

This is a discussion on php.ini set up problem within the PHP Language forums, part of the PHP Programming Forums category; Hi, I am very new to PHP I am having php.ini problems. I am working in XP with IIS ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-09-2008
mike
 
Posts: n/a
Default php.ini set up problem

Hi,

I am very new to PHP I am having php.ini problems. I am working in XP
with IIS and have php installed as an ISAPI. I am trying to change
values in my php environment like 'upload_tmp_dir',
'upload_max_filesize'. I have scanned my computer and the only php.ini
file on the machine is in C:\Program Files\PHP. If I change entries in
that php.ini file and run phpinfo() it appears that the values are not
getting updated. This is still true after I start and stop the IIS server.

Also the phpinfo() reports my path to the php.ini file is c:\windows,
but there is no php.ini file in that directory. If I copy the php.ini
file to c:\windows and restart the server, then php breaks. I can not
run even simple scripts like phpinfo() or echoing. However if I just
change the name of the file to something like xphp.ini then php will
start working again.

Q1: where does php get its initial ini data if not from php.ini

Q2: why does php break when I copy the php.ini file to the directory
requested in its path.

Thanks
Mike
Reply With Quote
  #2 (permalink)  
Old 03-09-2008
Jerry Stuckle
 
Posts: n/a
Default Re: php.ini set up problem

mike wrote:
> Hi,
>
> I am very new to PHP I am having php.ini problems. I am working in XP
> with IIS and have php installed as an ISAPI. I am trying to change
> values in my php environment like 'upload_tmp_dir',
> 'upload_max_filesize'. I have scanned my computer and the only php.ini
> file on the machine is in C:\Program Files\PHP. If I change entries in
> that php.ini file and run phpinfo() it appears that the values are not
> getting updated. This is still true after I start and stop the IIS server.
>
> Also the phpinfo() reports my path to the php.ini file is c:\windows,
> but there is no php.ini file in that directory. If I copy the php.ini
> file to c:\windows and restart the server, then php breaks. I can not
> run even simple scripts like phpinfo() or echoing. However if I just
> change the name of the file to something like xphp.ini then php will
> start working again.
>
> Q1: where does php get its initial ini data if not from php.ini
>
> Q2: why does php break when I copy the php.ini file to the directory
> requested in its path.
>
> Thanks
> Mike
>


Still trying, Mike?

As I told you before - PHP has default values it uses if it can't find a
php.ini file. The easiest way for right now is to place a php.ini file
with the values you want in your c:\windows directory, then restart IIS.

If you're not going to follow suggestions, why do you even ask?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Reply With Quote
  #3 (permalink)  
Old 03-09-2008
mike
 
Posts: n/a
Default Re: php.ini set up problem

Jerry Stuckle wrote:
> mike wrote:
>
>> Hi,
>>
>> I am very new to PHP I am having php.ini problems. I am working in XP
>> with IIS and have php installed as an ISAPI. I am trying to change
>> values in my php environment like 'upload_tmp_dir',
>> 'upload_max_filesize'. I have scanned my computer and the only php.ini
>> file on the machine is in C:\Program Files\PHP. If I change entries in
>> that php.ini file and run phpinfo() it appears that the values are not
>> getting updated. This is still true after I start and stop the IIS
>> server.
>>
>> Also the phpinfo() reports my path to the php.ini file is c:\windows,
>> but there is no php.ini file in that directory. If I copy the php.ini
>> file to c:\windows and restart the server, then php breaks. I can not
>> run even simple scripts like phpinfo() or echoing. However if I just
>> change the name of the file to something like xphp.ini then php will
>> start working again.
>>
>> Q1: where does php get its initial ini data if not from php.ini
>>
>> Q2: why does php break when I copy the php.ini file to the directory
>> requested in its path.
>>
>> Thanks
>> Mike
>>

>
> Still trying, Mike?
>
> As I told you before - PHP has default values it uses if it can't find a
> php.ini file. The easiest way for right now is to place a php.ini file
> with the values you want in your c:\windows directory, then restart IIS.
>
> If you're not going to follow suggestions, why do you even ask?
>


Sorry your have such a bad day jerry, wife not giving you any again?

If your not going to read the posts why answer?

Reply With Quote
  #4 (permalink)  
Old 03-09-2008
Jerry Stuckle
 
Posts: n/a
Default Re: php.ini set up problem

mike wrote:
> Jerry Stuckle wrote:
>> mike wrote:
>>
>>> Hi,
>>>
>>> I am very new to PHP I am having php.ini problems. I am working in XP
>>> with IIS and have php installed as an ISAPI. I am trying to change
>>> values in my php environment like 'upload_tmp_dir',
>>> 'upload_max_filesize'. I have scanned my computer and the only
>>> php.ini file on the machine is in C:\Program Files\PHP. If I change
>>> entries in that php.ini file and run phpinfo() it appears that the
>>> values are not getting updated. This is still true after I start and
>>> stop the IIS server.
>>>
>>> Also the phpinfo() reports my path to the php.ini file is c:\windows,
>>> but there is no php.ini file in that directory. If I copy the php.ini
>>> file to c:\windows and restart the server, then php breaks. I can not
>>> run even simple scripts like phpinfo() or echoing. However if I just
>>> change the name of the file to something like xphp.ini then php will
>>> start working again.
>>>
>>> Q1: where does php get its initial ini data if not from php.ini
>>>
>>> Q2: why does php break when I copy the php.ini file to the directory
>>> requested in its path.
>>>
>>> Thanks
>>> Mike
>>>

>>
>> Still trying, Mike?
>>
>> As I told you before - PHP has default values it uses if it can't find
>> a php.ini file. The easiest way for right now is to place a php.ini
>> file with the values you want in your c:\windows directory, then
>> restart IIS.
>>
>> If you're not going to follow suggestions, why do you even ask?
>>

>
> Sorry your have such a bad day jerry, wife not giving you any again?
>
> If your not going to read the posts why answer?
>
>


I did read your posts. And I answered. But you aren't taking the advice.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Reply With Quote
  #5 (permalink)  
Old 03-09-2008
petersprc
 
Posts: n/a
Default Re: php.ini set up problem

Hi,

It does sound like the installation was corrupted somehow. Are you
able to reinstall PHP using the package at php.net/downloads.php?

Regards,

John Peters

On Mar 8, 10:38 pm, mike <spammesi...@junkmail.com> wrote:
> Hi,
>
> I am very new to PHP I am having php.ini problems. I am working in XP
> with IIS and have php installed as an ISAPI. I am trying to change
> values in my php environment like 'upload_tmp_dir',
> 'upload_max_filesize'. I have scanned my computer and the only php.ini
> file on the machine is in C:\Program Files\PHP. If I change entries in
> that php.ini file and run phpinfo() it appears that the values are not
> getting updated. This is still true after I start and stop the IIS server.
>
> Also the phpinfo() reports my path to the php.ini file is c:\windows,
> but there is no php.ini file in that directory. If I copy the php.ini
> file to c:\windows and restart the server, then php breaks. I can not
> run even simple scripts like phpinfo() or echoing. However if I just
> change the name of the file to something like xphp.ini then php will
> start working again.
>
> Q1: where does php get its initial ini data if not from php.ini
>
> Q2: why does php break when I copy the php.ini file to the directory
> requested in its path.
>
> Thanks
> Mike


Reply With Quote
  #6 (permalink)  
Old 03-09-2008
mike
 
Posts: n/a
Default Re: php.ini set up problem

petersprc wrote:
> Hi,
>
> It does sound like the installation was corrupted somehow. Are you
> able to reinstall PHP using the package at php.net/downloads.php?
>
> Regards,
>
> John Peters
>
> On Mar 8, 10:38 pm, mike <spammesi...@junkmail.com> wrote:
>
>>Hi,
>>
>>I am very new to PHP I am having php.ini problems. I am working in XP
>>with IIS and have php installed as an ISAPI. I am trying to change
>>values in my php environment like 'upload_tmp_dir',
>>'upload_max_filesize'. I have scanned my computer and the only php.ini
>>file on the machine is in C:\Program Files\PHP. If I change entries in
>>that php.ini file and run phpinfo() it appears that the values are not
>>getting updated. This is still true after I start and stop the IIS server.
>>
>>Also the phpinfo() reports my path to the php.ini file is c:\windows,
>>but there is no php.ini file in that directory. If I copy the php.ini
>>file to c:\windows and restart the server, then php breaks. I can not
>>run even simple scripts like phpinfo() or echoing. However if I just
>>change the name of the file to something like xphp.ini then php will
>>start working again.
>>
>>Q1: where does php get its initial ini data if not from php.ini
>>
>>Q2: why does php break when I copy the php.ini file to the directory
>>requested in its path.
>>
>>Thanks
>>Mike

>
>

Hi John,

Thanks, thats the site where I got the original binaries from,
"php-5.2.5-win32-installer.msi". The install went fairly smoothly.
I could try to reinstall. Are you using php on a windows system?
If so did you place the php.ini file in the c:\windows directory?

Thanks
Mike
Reply With Quote
  #7 (permalink)  
Old 03-09-2008
Jeff Gaines
 
Posts: n/a
Default Re: php.ini set up problem

On 09/03/2008 in message <LHIAj.4922$fX7.1671@nlpi061.nbdc.sbc.com> mike
wrote:

>If so did you place the php.ini file in the c:\windows directory?


My ini file is:
C:\Program Files\PHP\php.ini

During various installs on XP the ini file has alwasy ended up in the php
drectory.

There is also an entry in my httpd.conf file:
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:/Program Files/PHP/"
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

--
Jeff Gaines Damerham Hampshire UK
The facts, although interesting, are irrelevant
Reply With Quote
  #8 (permalink)  
Old 03-09-2008
Paul Herber
 
Posts: n/a
Default Re: php.ini set up problem

On Sun, 09 Mar 2008 02:38:08 GMT, mike <spammesillt@junkmail.com>
wrote:

>Hi,
>
>I am very new to PHP I am having php.ini problems. I am working in XP
>with IIS and have php installed as an ISAPI. I am trying to change
>values in my php environment like 'upload_tmp_dir',
>'upload_max_filesize'. I have scanned my computer and the only php.ini
>file on the machine is in C:\Program Files\PHP. If I change entries in
>that php.ini file and run phpinfo() it appears that the values are not
>getting updated. This is still true after I start and stop the IIS server.
>
>Also the phpinfo() reports my path to the php.ini file is c:\windows,
>but there is no php.ini file in that directory. If I copy the php.ini
>file to c:\windows and restart the server, then php breaks.


What do you mean by 'php breaks'? What does/doesn't it do?
The fact that putting the php.ini file in c:/windows affects operation
certainly proves that that is the correct place for it. Put a standard
php.ini file here then sort out problems from there.



--
Regards, Paul Herber, Sandrila Ltd.
http://www.sdl.sandrila.co.uk/ SDL/MSC/TTCN/URN/UML2 for Visio
Reply With Quote
  #9 (permalink)  
Old 03-09-2008
mike
 
Posts: n/a
Default Re: php.ini set up problem

Jeff Gaines wrote:
> On 09/03/2008 in message <LHIAj.4922$fX7.1671@nlpi061.nbdc.sbc.com> mike
> wrote:
>
>> If so did you place the php.ini file in the c:\windows directory?

>
>
> My ini file is:
> C:\Program Files\PHP\php.ini
>
> During various installs on XP the ini file has alwasy ended up in the
> php drectory.
>
> There is also an entry in my httpd.conf file:
> #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
> PHPIniDir "C:/Program Files/PHP/"
> LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
> #END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
>

I did indeed. I restarted the server and php stopped working. So I
uninstalled php, reinstalled but put the installation in C:/PHP instead
of C:\Program Files\PHP, put the php.ini file in C:\windows, restarted
the server. Now when I do a phpinfo() it is reading the file kind of.
phpinfo() shows that it is finding the file. It shows the proper
upload_tmp_dir. I can change some things like upload_max_filesize in the
php.ini file that get picked up after restarting the server. However,
some things are not getting picked up like extension_dir is not getting
changed from the php.ini

One weird thing happened on the php reinstall. I made a vertual
directory for my php scripts under wwwroot. For some reason the
reinstall left a copy of php.exe in that directory. I used the
automatic windows installer file. Maybe I should do this manually.

looks like you are using a apache server. I do not see a httpd.conf
file in my PHP directory. Is that file specific to the apache install?
Where is the file located.

Thanks
Mike
Reply With Quote
  #10 (permalink)  
Old 03-09-2008
Jeff Gaines
 
Posts: n/a
Default Re: php.ini set up problem

On 09/03/2008 in message <X4YAj.5504$fX7.4535@nlpi061.nbdc.sbc.com> mike
wrote:

>looks like you are using a apache server. I do not see a httpd.conf
>file in my PHP directory. Is that file specific to the apache install?
>Where is the file located.


Yes I am using Apache - it is in:
C:\Program Files\Apache Software Foundation\Apache2.2\bin

and httpd.conf is in:
C:\Program Files\Apache Software Foundation\Apache2.2\conf

--
Jeff Gaines Damerham Hampshire UK
Tell me what you need, and I'll tell you how to get along without it.
Reply With Quote
Reply


Thread Tools
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:06 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0