Web Hosting Talk







View Full Version : no php.ini


Precise
08-27-2001, 09:08 PM
Hi,

I have a potentially stupid question. It seems that I cannot find the php.ini file. Cannot locate using "locate php.ini" and more importantly phpinfo() says it is under /usr/local/lib, but it is not there.

Any suggestions?

Gracias!

Tim Greer
08-27-2001, 09:23 PM
Originally posted by Precise
Hi,

I have a potentially stupid question. It seems that I cannot find the php.ini file. Cannot locate using "locate php.ini" and more importantly phpinfo() says it is under /usr/local/lib, but it is not there.

Any suggestions?

Gracias!

You might not have a php.ini file on the system.

acetate
08-27-2001, 09:26 PM
You might have to rename the default php.ini-dist to php.ini and place it in /usr/local/lib/

Try to search for php.ini-dist =)

Precise
08-27-2001, 09:29 PM
Try to search for php.ini-dist

Nope, thats not it. But I appreciate your help anyway!

You might not have a php.ini file on the system.

Then, how would I make config changes to PHP? Thanks for your help.

acetate
08-27-2001, 09:38 PM
Uhh..


The configuration file (called php3.ini in PHP 3.0, and simply php.ini as of PHP 4.0) is read when PHP starts up. For the server module versions of PHP, this happens only once when the web server is started. For the CGI version, it happens on every invocation.

When using PHP as an Apache module, you can also change the configuration settings using directives in Apache configuration files and .htaccess files.

With PHP 3.0, there are Apache directives that correspond to each configuration setting in the php3.ini name, except the name is prefixed by "php3_".

With PHP 4.0, there are several Apache directives that allow you to change the PHP configuration from within the Apache configuration file itself.

acetate
08-27-2001, 09:39 PM
Forgot to give you the link..

http://www.php.net/manual/en/configuration.php

Tim Greer
08-27-2001, 09:42 PM
That's correct, you might not use or need it. I have never needed php.ini to make changes, but it depends on what you're doing, how you're doing it and what changes you want to make.

Precise
08-27-2001, 10:50 PM
Understand that I am not to savvy with apache (in search of a good tech BTW), if I wanted to configure "enable_ftp" for PHP, would I use the following command:

./configure --with-httpd=/usr/local/apache/conf/httpd.conf --enable-ftp

OR, am I completely off base (which I think I am)?

Thanks,
Patrick

acetate
08-27-2001, 10:56 PM
Yeah.. but then u would have to recompile php.. If that's what u want to do.. It's easier if you configure php in your httpd.conf or even grab a php.ini that is similar to your setup. I would give you mine but there's alot of modules I compiled with php..
My phpinfo.php (http://www.intensehost.com/phpinfo.php)

Precise
08-27-2001, 11:36 PM
It is starting to make sense! :D

So, as you stated,It's easier if you configure php in your httpd.conf

Isn't thay what I would be doing if I did this:./configure --with-httpd=/usr/local/apache/conf/httpd.conf --enable-ftp

Thanks again for your help.