I am using a subdomain of some hosting site. so i cannot go directly to apache php.ini to modify.

One Response to “can i modify the php.ini in apache server so that i can include some libraries that i wanted to add?”

  • ryan_pendleton2004:

    As far as I know, you have to put the custom php.ini file in every folder you want the libraries to be included in. Inside that php.ini file, you will want the following code:
    auto_prepend_file = “/full/path/to/includes/file.php”

    Before you bother creating a custom php.ini file, you may want to try creating a .htaccess file in the main directory of your site, and put the following code in it:
    php_value auto_prepend_file “/full/path/to/includes/file.php”

    If that gives you error 500, then you either typed something wrong, or your server is running in CGI mode. If that is the case, then you may have to create the custom php.ini file above, and put it in every directory that needs the libraries.

    EDIT: Sorry, I didn’t realize that you wanted to use a custom php.ini file.

Leave a Reply