LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 969|回复: 9

服务器上找不到php.ini

[复制链接]
发表于 2004-11-17 18:52:43 | 显示全部楼层 |阅读模式
服务器装的是redhat

find / -name php.ini 居然没能找到php.ini.

应该怎么配置php.ini噢?
发表于 2004-11-18 05:13:00 | 显示全部楼层
Without Zend, php.ini is usually located in /etc or /etc/php4.  Are you sure php is installed?

Test Method 1:
Save the following script as a file, say, php-test.php in your server's  directory home.

<?php
phpinfo();
?>

With your web-browser, type:

http://yourserver-IP/php-test.php

Replace "yourserver-IP" with yourserver's name or IP address.  See what is displayed?

Test Method 2:
use rpm to check if php is installed.
 楼主| 发表于 2004-11-18 08:29:38 | 显示全部楼层
谢谢你的回答

服务器上挂有一个IPB的论坛,应该装有php.ini的吧

我能用phpinfo看到php.ini的一些配置,比如说register_globals = off safe_mode = Off.但是却找不到php.ini的路径。
发表于 2004-11-18 09:38:15 | 显示全部楼层
我用MDK9.1也没找到php.ini
在MDK8.2也有的,其他版本没有试
重装php吧
发表于 2004-11-18 10:46:19 | 显示全部楼层
phpinfo()输出的路径就是php.ini的默认路径,
或者./configure --help
有一现就是有关php.ini的路径设置

php.ini作为一个全局配置文件,如果在默认路径的路径不存在php.ini,
系统就会调用默认的default 选项,
 楼主| 发表于 2004-11-18 19:11:02 | 显示全部楼层
可是我应该如何配置php.ini

我想把safe_mode开启
发表于 2004-11-19 00:56:09 | 显示全部楼层
 楼主| 发表于 2004-11-20 13:01:31 | 显示全部楼层
可是我也找不到php.ini-dist呀
发表于 2004-11-20 13:11:00 | 显示全部楼层
1. download this file
2. edit it with whatever you want
3. save it as php.ini
4. store it at the location you obtained from phpinfo()
5. restart your webserver
 楼主| 发表于 2004-11-21 22:31:37 | 显示全部楼层
THX!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表