SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Zealot usmangt's Avatar
    Join Date
    Apr 2009
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP .htaccess error

    I am getting this error when i create the .htaccess and write

    php_admin_value open_basedir none


    And now when i goto my website it says

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, webmaster@kilbridebabyspace.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request




    Please help!

    Thanks

    usman

  2. #2
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try
    Code:
    php_value open_basedir none

  3. #3
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    when you see 500 Internal Server, you should check web-server's error log for the error message

  4. #4
    SitePoint Wizard PHPycho's Avatar
    Join Date
    Dec 2005
    Posts
    1,201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Some server doesn't allow php.ini settings in .htacess.
    Please make sure that removing that line works properly else you have to contact your server administrator with problems.
    More about settings here
    Thanks

  5. #5
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    usmangt, don't be silly
    first, read the real problem description in the error log
    second, find solution

  6. #6
    SitePoint Wizard PHPycho's Avatar
    Join Date
    Dec 2005
    Posts
    1,201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Qouted from PHP Manual(link):
    php_admin_value name value

    Sets the value of the specified directive. This can not be used in .htaccess files. Any directive type set with php_admin_value can not be overridden by .htaccess or ini_set(). To clear a previously set value use none as the value.

  7. #7
    SitePoint Wizard PHPycho's Avatar
    Join Date
    Dec 2005
    Posts
    1,201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Qouted from PHP Manual(link):
    php_admin_value name value

    Sets the value of the specified directive. This can not be used in .htaccess files. Any directive type set with php_admin_value can not be overridden by .htaccess or ini_set(). To clear a previously set value use none as the value.

  8. #8
    SitePoint Zealot usmangt's Avatar
    Join Date
    Apr 2009
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well this is what i found in the log

    [Thu Nov 12 17:11:57 2009] [error] [client x.x.x.x] File does not exist: /home/yonged/public_html/500.shtml
    [Thu Nov 12 17:11:57 2009] [alert] [client x.x.x.x] /home/yonged/public_html/plesk-billing/.htaccess: php_admin_value not allowed here


    i tried the following but no success, i think you better know what log says

    php_admin_value open_basedir none
    php_value open_basedir none
    php_admin flag open_basedir none

    Plesae help

    Thanks

    usmangt

  9. #9
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You cannot use .htaccess unless you are running php as an apache module. If you're running php via cgi, it won't work. You need to edit php.ini. Your host might allow you to configure or create your own php.ini, so ask them(there can be lots of variations on how they set it up).

  10. #10
    SitePoint Wizard PHPycho's Avatar
    Join Date
    Dec 2005
    Posts
    1,201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes thats right what crmalibu has mentioned.

    Please check the line quoted by me in above post and the text in your log file:
    [Thu Nov 12 17:11:57 2009] [alert] [client x.x.x.x] /home/yonged/public_html/plesk-billing/.htaccess: php_admin_value not allowed here
    you can know where the things had gone wrong.

    Thanks


Bookmarks

Posting Permissions

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