php.ini is nonexistent Loaded Configuration File (none)

前端 未结 4 1959
逝去的感伤
逝去的感伤 2020-12-28 14:19

I have compiled php and apache successfully, without specifying the directory for the php config file. I want to add pear features, but there doesn\'t appear to be a php.ini

相关标签:
4条回答
  • 2020-12-28 14:43

    You have to copy the file php.ini-dist from PHP source. Standard way is copying such file to /usr/local/lib/php.ini.

    0 讨论(0)
  • 2020-12-28 14:47

    The problem is that you compiled php without the --with-config-file-path=PATH option.

    Try to reconfigure php using this option. Then run "make clean", "make" and "make install" again in this order. You must run "make clean" for this to work.

    0 讨论(0)
  • 2020-12-28 14:50

    first check is there /etc/php.ini exists , if no try to copy it

    sudo cp /etc/php.ini.default /etc/php.ini
    

    else

    sudo cp /etc/php.ini.default /usr/local/lib/php.ini
    

    then reload the webserver and try to see result with

    php --ini
    
    0 讨论(0)
  • 2020-12-28 15:08

    ini file must end with .ini and not php.ini-dist. Remove the -dist as it looks like a notepad file (in Windows) and cannot be read by the system. Restart Apache and check you phpinfo() output.

    0 讨论(0)
提交回复
热议问题