473,545 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

can't get php to read ini file.

My configuration is Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.7d
PHP/5.0.4 on Solaris 10.

phpinfo() lists the location of php.ini as /usr/local/apache/conf and
my php.ini file is there but for some reason it does not appear to be
being read by php. I have defined things such as upload_tmp_dir in
that file yet even with restarting apache I am not seeing this
reflected in phpinfo().

I am pretty new to PHP so its entirely possible I am missing somethign
but any help as to why php.ini would not be read would help me a lot.

Thanks,

Dylan

Aug 17 '06 #1
6 3055
dy************@ gmail.com wrote:

I have defined things such as upload_tmp_dir in
that file yet even with restarting apache I am not seeing this
reflected in phpinfo().

I am pretty new to PHP so its entirely possible I am missing somethign
but any help as to why php.ini would not be read would help me a lot.
I'm not sure if one can define new variables in php.ini...
--
Z powazaniem
Bartek Puzon
Aug 18 '06 #2
dy************@ gmail.com wrote:
My configuration is Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.7d
PHP/5.0.4 on Solaris 10.

phpinfo() lists the location of php.ini as /usr/local/apache/conf and
my php.ini file is there but for some reason it does not appear to be
being read by php. I have defined things such as upload_tmp_dir in
that file yet even with restarting apache I am not seeing this
reflected in phpinfo().

I am pretty new to PHP so its entirely possible I am missing somethign
but any help as to why php.ini would not be read would help me a lot.

Thanks,

Dylan
Hi Dylan,

If phpinfo() runs fine it will also tell you the location of php.ini.
I think somewhere in the first block of info.
Are you edditing THAT php.ini file?
This may sound stupid, but I have seen the mistake of edditing a not-used
php.ini a lot of times before.
Always ask phpinfo() which on eit is using. :-)
Regards,
Erwin Moller
Aug 18 '06 #3
Thanks to both of you....what I mean when I say I defined new variables
in php.ini is not that I added things but rather changed the value of
things that were already but not defined there and the changes do not
show.

f I force a load of php.ini using PHPRC the line at the top of
phpinfo() is /usr/local/apache/conf/php.ini and at that point things
show as they should but other apps (PHPmyAdmin) stop working properly.
Without using PHPRC the line in phpinfo() is just
/usr/local/apache/conf.
>From what I have been able to find looking around the net, if that line
does not end in php.ini then the file is not being read...I just can't
figure out why.

Thanks in advance for any further insight you can provide.

Dylan

Erwin Moller wrote:
dy************@ gmail.com wrote:
My configuration is Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.7d
PHP/5.0.4 on Solaris 10.

phpinfo() lists the location of php.ini as /usr/local/apache/conf and
my php.ini file is there but for some reason it does not appear to be
being read by php. I have defined things such as upload_tmp_dir in
that file yet even with restarting apache I am not seeing this
reflected in phpinfo().

I am pretty new to PHP so its entirely possible I am missing somethign
but any help as to why php.ini would not be read would help me a lot.

Thanks,

Dylan

Hi Dylan,

If phpinfo() runs fine it will also tell you the location of php.ini.
I think somewhere in the first block of info.
Are you edditing THAT php.ini file?
This may sound stupid, but I have seen the mistake of edditing a not-used
php.ini a lot of times before.
Always ask phpinfo() which on eit is using. :-)
Regards,
Erwin Moller
Aug 18 '06 #4
dy************@ gmail.com wrote:
Thanks to both of you....what I mean when I say I defined new variables
in php.ini is not that I added things but rather changed the value of
things that were already but not defined there and the changes do not
show.
Ok, clear.
We just call that something like 'setting php.ini variables'.
>
f I force a load of php.ini using PHPRC the line at the top of
phpinfo() is /usr/local/apache/conf/php.ini and at that point things
show as they should but other apps (PHPmyAdmin) stop working properly.
Without using PHPRC the line in phpinfo() is just
/usr/local/apache/conf.
From what I hear you putted yourself in the php.ini hell by having more
versions around.
Under most circumstances you only have 1 php.ini.
The PHPRC environment variable is just ONE WAY of pointing to a php.ini
file. see www.php.net, chapter 9: runtime configuration for details.

My advise:
1) Make sure you know WHICH php.ini file is used (using PHPRC or whatever
means).
2) Restart apache (graceful) EVERY TIME you made changes to php.ini, so you
are sure the changes in php.ini are loaded in the webserver. (This is not
needed if you run PHP as CGI, but you don't do that I hope because it is
slow)
3) Now fix the php.ini so it does what you want it to do. In your case I
expect that phpmyadmin stopped working because you have the relevant so's
or dll's commented out in your php.ini, and you were using another php.ini
before.

Hope that helps.

Regards,
Erwin Moller

PS: If you don't have a compelling reason to have many php.ini's around, I
advise you to delete/rename them all except the real one.
>
>>From what I have been able to find looking around the net, if that line
does not end in php.ini then the file is not being read...I just can't
figure out why.

Thanks in advance for any further insight you can provide.

Dylan

Erwin Moller wrote:
>dy************@ gmail.com wrote:
My configuration is Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.7d
PHP/5.0.4 on Solaris 10.

phpinfo() lists the location of php.ini as /usr/local/apache/conf and
my php.ini file is there but for some reason it does not appear to be
being read by php. I have defined things such as upload_tmp_dir in
that file yet even with restarting apache I am not seeing this
reflected in phpinfo().

I am pretty new to PHP so its entirely possible I am missing somethign
but any help as to why php.ini would not be read would help me a lot.

Thanks,

Dylan

Hi Dylan,

If phpinfo() runs fine it will also tell you the location of php.ini.
I think somewhere in the first block of info.
Are you edditing THAT php.ini file?
This may sound stupid, but I have seen the mistake of edditing a not-used
php.ini a lot of times before.
Always ask phpinfo() which on eit is using. :-)
Regards,
Erwin Moller
Aug 18 '06 #5
Thanks to everyone for the help
I only had one php.ini on the system and there are no dlls as its a
Sparc Solaris box. Its also a clean install so this would have been the
only php ever put on it.

I was never able to figure out what php.ini php was using (even with a
find / -name) to locate it so in the end I decided it was better to
start from scratch all around. I purged apache, php, mysql, and
openssl and rebuilt them all from source in the order mysql -openssl
-apache -php and everything worked like a charm this time.

Thanks again to everyone for the advice.

Erwin Moller wrote:
dy************@ gmail.com wrote:
Thanks to both of you....what I mean when I say I defined new variables
in php.ini is not that I added things but rather changed the value of
things that were already but not defined there and the changes do not
show.

Ok, clear.
We just call that something like 'setting php.ini variables'.

f I force a load of php.ini using PHPRC the line at the top of
phpinfo() is /usr/local/apache/conf/php.ini and at that point things
show as they should but other apps (PHPmyAdmin) stop working properly.
Without using PHPRC the line in phpinfo() is just
/usr/local/apache/conf.

From what I hear you putted yourself in the php.ini hell by having more
versions around.
Under most circumstances you only have 1 php.ini.
The PHPRC environment variable is just ONE WAY of pointing to a php.ini
file. see www.php.net, chapter 9: runtime configuration for details.

My advise:
1) Make sure you know WHICH php.ini file is used (using PHPRC or whatever
means).
2) Restart apache (graceful) EVERY TIME you made changes to php.ini, so you
are sure the changes in php.ini are loaded in the webserver. (This is not
needed if you run PHP as CGI, but you don't do that I hope because it is
slow)
3) Now fix the php.ini so it does what you want it to do. In your case I
expect that phpmyadmin stopped working because you have the relevant so's
or dll's commented out in your php.ini, and you were using another php.ini
before.

Hope that helps.

Regards,
Erwin Moller

PS: If you don't have a compelling reason to have many php.ini's around, I
advise you to delete/rename them all except the real one.
>From what I have been able to find looking around the net, if that line
does not end in php.ini then the file is not being read...I just can't
figure out why.

Thanks in advance for any further insight you can provide.

Dylan

Erwin Moller wrote:
dy************@ gmail.com wrote:

My configuration is Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.7d
PHP/5.0.4 on Solaris 10.

phpinfo() lists the location of php.ini as /usr/local/apache/conf and
my php.ini file is there but for some reason it does not appear to be
being read by php. I have defined things such as upload_tmp_dir in
that file yet even with restarting apache I am not seeing this
reflected in phpinfo().

I am pretty new to PHP so its entirely possible I am missing somethign
but any help as to why php.ini would not be read would help me a lot.

Thanks,

Dylan

Hi Dylan,

If phpinfo() runs fine it will also tell you the location of php.ini.
I think somewhere in the first block of info.
Are you edditing THAT php.ini file?
This may sound stupid, but I have seen the mistake of edditing a not-used
php.ini a lot of times before.
Always ask phpinfo() which on eit is using. :-)
Regards,
Erwin Moller
Aug 18 '06 #6

hello
when we install php on linux,unix and solaris the file name
php.ini does not exist.It is in the form of php.ini.recomen ded located
in installation directory of php.after installing php copy
php.ini.recomen ded to /etc/php.ini(and where you want to set)

dy************@ gmail.com wrote:
Thanks to everyone for the help
I only had one php.ini on the system and there are no dlls as its a
Sparc Solaris box. Its also a clean install so this would have been the
only php ever put on it.

I was never able to figure out what php.ini php was using (even with a
find / -name) to locate it so in the end I decided it was better to
start from scratch all around. I purged apache, php, mysql, and
openssl and rebuilt them all from source in the order mysql -openssl
-apache -php and everything worked like a charm this time.

Thanks again to everyone for the advice.

Erwin Moller wrote:
dy************@ gmail.com wrote:
Thanks to both of you....what I mean when I say I defined new variables
in php.ini is not that I added things but rather changed the value of
things that were already but not defined there and the changes do not
show.
Ok, clear.
We just call that something like 'setting php.ini variables'.
>
f I force a load of php.ini using PHPRC the line at the top of
phpinfo() is /usr/local/apache/conf/php.ini and at that point things
show as they should but other apps (PHPmyAdmin) stop working properly.
Without using PHPRC the line in phpinfo() is just
/usr/local/apache/conf.
From what I hear you putted yourself in the php.ini hell by having more
versions around.
Under most circumstances you only have 1 php.ini.
The PHPRC environment variable is just ONE WAY of pointing to a php.ini
file. see www.php.net, chapter 9: runtime configuration for details.

My advise:
1) Make sure you know WHICH php.ini file is used (using PHPRC or whatever
means).
2) Restart apache (graceful) EVERY TIME you made changes to php.ini, so you
are sure the changes in php.ini are loaded in the webserver. (This is not
needed if you run PHP as CGI, but you don't do that I hope because it is
slow)
3) Now fix the php.ini so it does what you want it to do. In your case I
expect that phpmyadmin stopped working because you have the relevant so's
or dll's commented out in your php.ini, and you were using another php.ini
before.

Hope that helps.

Regards,
Erwin Moller

PS: If you don't have a compelling reason to have many php.ini's around, I
advise you to delete/rename them all except the real one.
>
>>From what I have been able to find looking around the net, if that line
does not end in php.ini then the file is not being read...I just can't
figure out why.
>
Thanks in advance for any further insight you can provide.
>
Dylan
>
Erwin Moller wrote:
>dy************@ gmail.com wrote:
>>
My configuration is Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.7d
PHP/5.0.4 on Solaris 10.
>
phpinfo() lists the location of php.ini as /usr/local/apache/conf and
my php.ini file is there but for some reason it does not appear to be
being read by php. I have defined things such as upload_tmp_dir in
that file yet even with restarting apache I am not seeing this
reflected in phpinfo().
>
I am pretty new to PHP so its entirely possible I am missing somethign
but any help as to why php.ini would not be read would help me a lot.
>
Thanks,
>
Dylan
>>
>Hi Dylan,
>>
>If phpinfo() runs fine it will also tell you the location of php.ini.
>I think somewhere in the first block of info.
>Are you edditing THAT php.ini file?
>This may sound stupid, but I have seen the mistake of edditing a not-used
>php.ini a lot of times before.
>Always ask phpinfo() which on eit is using. :-)
>>
>>
>Regards,
>Erwin Moller
Sep 13 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3398
by: Sven Groot | last post by:
Using Outlook 2002 NL with all updates installed. I'm trying to open a backup pst file I have on CD. I have copied the file to my harddrive, made sure it's not read-only, am logged in as adminstrator and have full control over the file, and so has the SYSTEM account. The error message I get is: "backup.pst is not a personal folder file" (I...
0
2081
by: SeanR | last post by:
I have a function to copare two files. It will first copy the original file form a different server to a local temp path and then compare that version to a version that has been restored form tape. Once the compare is complete the file that was copied to a temp location needs to be deleted. I am using the method file.copy(sourcePath,...
10
2267
by: ZafT | last post by:
Thanks in advance for any tips that might get me going in the right direction. I am working on a simple exercise for school that is supposed to use read to read a file (about 10 MB). I am supposed to change the buffer size and see how this affects the read time. In other words, the buffer is supposed to limit how much of the file gets...
1
3484
by: Martin | last post by:
I use dbx and i got the following error: Reading GL_CliConnMgr core file header read successfully Reading ld.so.1 dbx: core file read error: address 0xff3e6000 not available dbx: core file read error: address 0xff3e70a0 not available dbx: warning: could not initialize librtld_db.so.1 -- trying libDP_rtld_db.so Make sure this is the same...
2
4317
by: Sathyaish | last post by:
I am using MCI (winmm.dll) to read, record and playback sound. For now, I am doing this with disk files instead of realtime doing it straight from the memory. If I want to stream/relay/transmit this sound (file) on a Windows socket (not using FTP but TCP), can I read the file into a byte array? Because if it is possible then I can send it on...
4
2719
by: ESPN Lover | last post by:
Below is two snippets of code from MSDN showing how to read a file. Is one way preferred over the other and why? Thanks. using System; using System.IO; class Test { public static void Main()
18
4324
by: Jen | last post by:
I'm using Microsoft's own VB.NET FTP Example: http://support.microsoft.com/default.aspx?scid=kb;en-us;832679 I can get the program to create directories, change directories, etc., but I can't get it to upload a file to the FTP server. I just get a "Cannot connect to remote server" error after this TRY: s = New...
8
23893
by: a | last post by:
I have a struct to write to a file struct _structA{ long x; int y; float z; } struct _structA A; //file open write(fd,A,sizeof(_structA)); //file close
2
2740
by: dasilva109 | last post by:
Hi guys I am new to C++ and need urgent help with this part of my code for a uni coursework I have to submit by Thursday //ClientData.h #ifndef CLIENTDATA_H #define CLIENTDATA_H #include <string>
5
3289
by: lovecreatesbea... | last post by:
The condition at line 31 is added to check if the program finished to read the whole file. Is it needed and correct? Thank you. #include <fstream> #include <iostream> #include <string> using namespace std; int read(string filename, int last_pos) {
0
7410
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7437
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5984
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5343
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3466
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1901
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1025
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.