•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 401,571 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,386 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1683 | Replies: 1
![]() |
Hello,
I run multiple domains/sites on my linux and windows server. I know there is a php.ini files that comes with the php installation package. But I have heard that there is a way to create a local php.ini file for each domain.
Does anyone knows how to create local php.ini files for each domain. Is there a special setting i need to do to make it run?
Thanx for your help
PS - I use cPanel on my linux server and Plesk on my windows server.
I run multiple domains/sites on my linux and windows server. I know there is a php.ini files that comes with the php installation package. But I have heard that there is a way to create a local php.ini file for each domain.
Does anyone knows how to create local php.ini files for each domain. Is there a special setting i need to do to make it run?
Thanx for your help
PS - I use cPanel on my linux server and Plesk on my windows server.
•
•
Join Date: Jul 2007
Location: Sofia, Bulgaria
Posts: 138
Reputation:
Rep Power: 2
Solved Threads: 10
Hi there.
You can set php configuration options with ini_set() in every page. There is a limitation I think that with this command you cannot load extensions.
I don't know about Linux, but this is how it can be done on Windows :
httpd.conf :
php.conf
Form PHPIniDir will php.ini loaded after restart.
On the other hand :
httpd.conf :
In sites for example we've got test1.conf :
//
You can use specific apache directives in httpd.conf or .htaccess :
php_value name value
php_flag name on|off
php_admin_value name value
php_admin_flag name on|off
//
With this you have different configuration options for different directories.
- Mitko Kostov
You can set php configuration options with ini_set() in every page. There is a limitation I think that with this command you cannot load extensions.
I don't know about Linux, but this is how it can be done on Windows :
httpd.conf :
Include conf/php.conf
php.conf
# PHP Definitions for Apache # Load PHP Module & Associate .php extensions #PHP 5 PHPIniDir "C:/web/Apache/conf" LoadModule php5_module c:/web/PHP/php5apache2_2.dll AddType application/x-httpd-php .php # PHP Test & Help Sites Alias /php "C:/web/webs/php" Alias /phpmanual "C:/web/PHP/html" DirectoryIndex index.php index.html index.html.var
Form PHPIniDir will php.ini loaded after restart.
On the other hand :
httpd.conf :
Include conf/sites/*.conf
In sites for example we've got test1.conf :
Alias /test1 C:/web/webs/test1 <Directory "C:/web/webs/test1"> Order Deny,Allow php_flag register_globals off </Directory>
//
You can use specific apache directives in httpd.conf or .htaccess :
php_value name value
php_flag name on|off
php_admin_value name value
php_admin_flag name on|off
//
With this you have different configuration options for different directories.
- Mitko Kostov
Last edited by MitkOK : Aug 17th, 2007 at 2:03 pm.
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- creating an advanced php search (PHP)
- Php ini setting--mail function (PHP)
- IIS & PHP configuration-PHP.ini instructions ignored (Windows Servers and IIS)
- php.ini file not being read (PHP)
Other Threads in the PHP Forum
- Previous Thread: How to open a php script
- Next Thread: Making a page read-only


Linear Mode