Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2005

    .htaccess trouble! Urgent!


    [Mon Jul 4 18:48:09 2005] [alert] /home/site/public_html/hcl/.htaccess: Invalid command 'php_value', perhaps mis-spelled or defined by a module not included in the server configuration

    I receive a 500 Internal Server Error, this problem appears since I recompiled my apache from WHM/Update Apache.
    I´m having problem on subdomains, directories, redirects... all using .htaccess.

    I have more than 120 websites, and I have no idea how to fix this problem.

    Please, anyone could give me a hand?


  2. #2
    Join Date
    Apr 2004
    Atlanta, GA
    i use

    php_value max_execution_time 1200
    php_value memory_limit 200M
    php_value post_max_size 200M
    php_value upload_max_filesize 200M

    in my .htaccess make sure you have something after the php_value

  3. #3
    Join Date
    Mar 2005
    Ok, but what to do when creating subdomains?

    When i use cpanel to create subdomains, i´m getting the error:

    [Mon Jul 4 18:48:09 2005] [alert] /home/site/public_html/ex/.htaccess: Invalid command '$', perhaps mis-spelled or defined by a module not included in the server configuration

    I don´t know why, but .htaccess is wrote if some spaces and binary chars.

  4. #4
    Join Date
    Mar 2005
    My .htaccess (created by cpanel):

    RewriteCond %{HTTP_HOST} ^^M
    $ [OR]
    RewriteCond %{HTTP_HOST} ^^M
    RewriteRule ^(.*)$ [R=301,L]

    Doesn´t works, but if I put:

    RewriteCond %{HTTP_HOST} ^$ [OR]
    RewriteCond %{HTTP_HOST} ^$
    RewriteRule ^(.*)$ [R=301,L]

    Works perfectly...

    Any idea?

  5. #5
    Join Date
    Jun 2005
    I face the same problem too..

  6. #6
    Join Date
    Jun 2005
    You cannot manipulate the php.ini settings with .htaccess when running PHP as
    cgi/phpsuexec. If you are using .htaccess with php_value entries within it, you would
    receive an internal server 500 error when attempting to access the scripts. This is because PHP is
    no longer running as an Apache module and Apache will not handle those directives any longer.
    All PHP values should be removed from your .htaccess files to avoid this issue. Placing a
    php.ini file in its place will solve this issue. (Please see below.)

    Default settings, I need Zend Optimizer or php to run with different
    options than the servers default settings, can I do this?

    The server default settings with php.ini may restrict certain applications, it is possible to modify
    the settings and how php will run on your account, on a per directory basis. If you have an
    application that requires for example :- register_globals = On Then by creating a file named
    php.ini within the directory that the script is located within, with the entry
    register_globals = On would allow you to run that script with your settings.
    If you also require say Zend Optimizer to be installed for your application, you would have :-

    register_globals = On

    You may copy the other variables from the phpinfo page as they appear within it and modify
    the settings as required for your scripts.

    Some important relevant default PHP values are as follows:-

    register_globals = Off
    register_argc_argv = Off
    safe_mode = On
    magic_quotes_gpc = Off

    All other settings can be viewed from your server’s phpinfo.php page.

  7. #7
    Hey Buddy taotoon,

    Thanks for the detailed info.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts