The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Invalid command 'php_value', perhaps mis-spelled or defined by a module not included

Discussion in 'General Discussion' started by milindras, Jan 12, 2011.

  1. milindras

    milindras Member

    Joined:
    Dec 29, 2010
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    Hi,
    I have a newly build web server using cpanel 11.28.64. & OS is centOS.
    Before go live I wanted a test a website & I copied the files from my current ubuntu web server.
    But when I tryto access the site I am getting the Internal Server Error + getting the following error on apache error log.

    "Invalid command 'php_value', perhaps mis-spelled or defined by a module not included in the server configuration"

    So what i did was I commented out the php_values (following) on my .htaccess file & then it worked.
    php_value magic_quotes_gpc 0
    php_value register_globals 0
    php_value browscap php_browscap.ini

    But I need to keep those php_values in the .htaccess files. Its looks like apache doesnt identify those lines.
    My current PHP and SuExec configuration on the server is:

    Default PHP Version (.php files) 5
    PHP 5 Handler suphp
    PHP 4 Handler none

    Apache suEXEC on

    What do you recommend?

    many Thanks
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Re: Invalid command 'php_value', perhaps mis-spelled or defined by a module not inclu

    You are using suPHP, so you cannot use the following directives in .htaccess files: php_flag, php_admin_flag, php_value, php_admin_value. You also cannot use these directives in the httpd.conf file; they are only valid when DSO is used as the PHP handler.

    Instead, use a custom php.ini file. Copy /usr/local/lib/php.ini to the directory that requires custom PHP values, and customize the PHP values in the "local" php.ini file. Note that the values in custom php.ini files are not "inherited" to subdirectories. If you place a custom php.ini file in /home/someuser/public_html, its settings will not be inherited by /home/someuser/public_html/somesubdir. /home/someuser/public_html/somesubdir would need its own custom php.ini file.
     
  3. milindras

    milindras Member

    Joined:
    Dec 29, 2010
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    Re: Invalid command 'php_value', perhaps mis-spelled or defined by a module not inclu

    Many Thanks for the reply.

    Is there any alternative method to enbale to use those directives? Something like change the PHP handler to a diff one?

    Because I never use anything like custom php.ini to a domain on my Ubunutu server which runs webmin.

    Regards
    Milindra
     
  4. milindras

    milindras Member

    Joined:
    Dec 29, 2010
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    Re: Invalid command 'php_value', perhaps mis-spelled or defined by a module not inclu

    That worked anyway.

    many Thanks
     
Loading...

Share This Page