Jump to content

Override php.ini , pls its urgent


atulkul

Recommended Posts

Hi everyone,

 

i am new to this forum and i would appreciate if someone could give a quick solution to this:

 

i am running PHP Version 5.2.3 under IIS 5.1 with Server API -> ISAPI  (localhost) under windows

 

Is there a way to override my master php.ini(located in path enviromental variable) file settings so that each php website has it's own custom php.ini file

 

for example webiste1 needs register_global = on where website2 needs register_global = on.

 

How can accomplish this?

Link to comment
Share on other sites

sorry also , i want to increase upload_max_filesize and i will have to create custom php.ini . Its poddible through .htaccess but it works only on apache but i need it to happen in IIS 5, I think there is something with PHPRC variable , we need to set export phprc = \path\to\customphpini . I tried a lot but nothing happened , does any one know the detailed process to create a custom php.ini to work on IIS

 

Thanks in advance

Link to comment
Share on other sites

Have you tried to see?

 

ini_set('max_upload_filesize', 8388608); 

 

Are you sure , have u ever tried this ...

Because as far i know we cannot increase upload_max_filesize by ini_set .

If you are dam sure pls let me know.

It would be really thankfull if it get works.

Link to comment
Share on other sites

max_upload_filesize is not settable in a script. Please read the manual. max_upload_filesize is settable on a PHP_INI_PERDIR basis, meaning: "Entry can be set in php.ini, .htaccess or httpd.conf"

 

If you don't have access to the master php.ini, a local php.ini (when php is running as a CGI application), a .htaccess file (when php is running as an Apache module), or httpd.conf (Apache only), then you are out of luck.

 

If php is running as a CGI application, you should be able to configure php to use a local php.ini.

 

For IIS where php is running as a server module ISAPI, your only choice is the master php.ini.

Link to comment
Share on other sites

max_upload_filesize is not settable in a script. Please read the manual. max_upload_filesize is settable on a PHP_INI_PERDIR basis, meaning: "Entry can be set in php.ini, .htaccess or httpd.conf"

 

If you don't have access to the master php.ini, a local php.ini (when php is running as a CGI application), a .htaccess file (when php is running as an Apache module), or httpd.conf (Apache only), then you are out of luck.

 

If php is running as a CGI application, you should be able to configure php to use a local php.ini.

 

For IIS where php is running as a server module ISAPI, your only choice is the master php.ini.

 

Thanks actually i m looking for this type of post.Please let me know how to install php with CGI application

Please provide steps or any link.

Actually you are write if its CGI then we can override php.ini by writing Export PHPRC = \path\to\localphpini , please also tell me reg. this i.e. how to set local php.ini etc

 

Pls its really urgent

Thanks !

Link to comment
Share on other sites

Hi,

 

 

Please let me know how to override master php.ini file.

Please tell me the steps

I have setup PHP5 with CGI application and its on IIS 6.Everything is setup.

I have written export PHPRC = "C:\Inetpub\wwwroot\test2" in my master php.ini i.e. at C:\windows\php.ini at the very top of page.(test2 is my project)

And included copy of php.ini in my project.(test2 folder)

But still when i run <?php phpinfo ?> in my project , it still show master php.ini as a loaded configuration file , I want here the local php.ini file which is stored in local folder (test2)

Please its really very urgent,

Pls can u give reply within one hr or so.

Link to comment
Share on other sites

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.