doudeng3008 2014-03-13 22:49
浏览 64

默认的php.ini文件和更改

I am currently using HOSTFORWEB as my hosting company. I want to make some changes to the php.ini file but i cannot find it (the path displayed by phpinfo() is nowhere to be found).

Reading similar questions to mine, i understood that its not possible for the hosting company to let each user alter their default php.ini file. Also i read that its possible for me to build my php.ini (or php5.ini for PHP 5) file and upload it to root folder.

My question is: Is there a default php.ini (or php5.ini) file that suits all servers with the proper customization? Is the file in the link below what i am searching for?

https://github.com/php/php-src/blob/master/php.ini-production

If it is, what are the parameters i have to change in order to work on the HOSTFORWEB web server?

Also, to apply this php.ini file to my entire website i have to change the .htaccess file somehow. Is there a default code for this as well? Because i see different solutions for the same question:


"If you would like to load your local php.ini file recursively for all your subfolders, you just need to add the following line to your .htaccess file inside the folder where you would like to apply the recursion:

Code: SuPHP_ConfigPath /home/username/public_html/php.ini

The above assumes that you are going to replace "username" with your actual cpanel username and that your php.ini file lives inside of public_html."

and


"You can create custom php.ini files for each directory in your web site, but many people configure settings in one php.ini file and then apply it to the entire web site. To do this, add the following line to the .htaccess file in your web site's document root directory. Replace USERNAME with your A2 Hosting username:

SetEnv PHPRC /home/USERNAME/public_html/php.ini"

Thanks in advance.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 WPF 大屏看板表格背景图片设置
    • ¥15 这个主板怎么能扩出一两个sata口
    • ¥15 不是,这到底错哪儿了😭
    • ¥15 2020长安杯与连接网探
    • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
    • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
    • ¥16 mybatis的代理对象无法通过@Autowired装填
    • ¥15 可见光定位matlab仿真
    • ¥15 arduino 四自由度机械臂
    • ¥15 wordpress 产品图片 GIF 没法显示