SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard mPeror's Avatar
    Join Date
    Mar 2005
    Location
    Saudi Arabia
    Posts
    1,724
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php.ini and MIME types

    1. Where is php.ini usually located for shared hosting accounts?

    2. How do i use custom MIME types for PHP files such as filename.inc?


    thanks in advace

  2. #2
    SitePoint Addict
    Join Date
    Aug 2004
    Location
    Chicago
    Posts
    296
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1. If you can, use phpinfo(), and you should see something like Configuration File (php.ini) Path. Next to it is the locations

    2. I'm not sure exactly what you mean, but I think you want a .inc file to be parsed by PHP. . .

    If you have Apache as the server, and you have .htaccess enabled, add this line to a .htaccess file to make .inc be parsed by PHP. (You can just change .inc to whatever to have that parsed by PHP too)
    Code:
    AddType application/x-httpd-php .inc
    If you don't have access to .htaccess, ask you administrator if s/he can add that to the server's configuration file
    Last edited by bjcffnet; Jul 7, 2005 at 21:29. Reason: bbcode
    Why's (Poignant) Guide to Ruby
    learn ruby with foxes, wizards, and chunky bacon

  3. #3
    SitePoint Wizard mPeror's Avatar
    Join Date
    Mar 2005
    Location
    Saudi Arabia
    Posts
    1,724
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The php.ini path shown doesn't even exist in my shared host account

    Also , when i added that line to '.htaccess' file , i got the following error (when i tried to request the .inc file) :
    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, webmaster@mashhoor.ws 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 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


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
  •