Jump to content

Recommended Posts

Hi!

 

    Recently I changed of hosting company. I used to use .htaccess to change my PHP settings, but my new hosting company forbids that. Instead, they told me to use php.ini files. So I had to put a php.ini file in every directory of my website where I wanted special settings.

 

Example:

 

  ~/public_html/admin/admin.php

  ~/public_html/admin/index.php

  ~/public_html/admin/php.ini

  ~/public_html/index.php

  ~/public_html/php.ini

 

php.ini is being read in every directory and the settings it contains are applied to that directory only (not recursive like .htaccess). Anyway, it works well.

 

My problem is: I try to reproduce that behavior at home, on my Windows 2003 server (Apache 2.0.55, PHP 5.2.2), and I really didn't found any clue anywhere about how to setup that! Is it in Apache, is it in php.ini, I just don't know.

 

Help!

 

- Mike

Wow that sucks.  See if you can create a symbolic link (for linux) in windows umm im not sure what it would be, i guess like a shortcut to the php.ini in every directory.  The idea is to have one php.ini in your www root, and then have "links" to it everywhere else.  In linux it would be something like:

 

ln -s php.ini /directory/where/its/stored/in

 

or the otherway around, just google the ln shell command.

Hmm I think that you misunderstood my problem. My problem is not to put my php.ini files in directories... my problem is "how to configure php and/or apache to get it actually READING php.ini in every directory at runtime".

 

(p.s.: the syntax for `ln` is `ln [-s] <source> <destination>`)

 

- Mike

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.