| | | | |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| | |
| Moderator Registriert seit: 03.09.2004
Beiträge: 11.792
PHP-Kenntnisse: Fortgeschritten ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Code: PHP searches for php.ini in the following locations (in
order):
* PHPIniDir directive (Apache 2 module only)
* HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath
* The PHPRC environment variable
* Directory of PHP (for CLI), or the web server's directory (for
SAPI modules)
* Windows directory (C:\windows or C:\winnt)
If you are running Apache 2, the simpler option is to use the
PHPIniDir directive (read the installation on Apache 2 page),
otherwise your best option is to set the PHPRC environment variable.
This process is explained in the following FAQ entry.
Note: If you're using NTFS on Windows NT, 2000, XP or 2003, make
sure that the user running the web server has read permissions to
your php.ini (e.g. make it readable by Everyone).
Code: # For PHP 4 Action application/x-httpd-php "/php/php.exe" # For PHP 5 Action application/x-httpd-php "/php/php-cgi.exe" # specify the directory where php.ini is SetEnv PHPRC C:/php Code: Installing as an Apache module
You need to insert these two lines to your Apache httpd.conf
configuration file to set up the PHP module for Apache 2.0:
Example 2-6. PHP and Apache 2.0 as Module
# For PHP 4 do something like this:
LoadModule php4_module "c:/php/sapi/php4apache2.dll"
AddType application/x-httpd-php .php
# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php"
Note: Remember to substitute the c:/php/ for your actual path to
PHP in the above examples. Take care to use either php4apache2.dll
or php5apache2.dll in your LoadModule directive and not
php4apache.dll or php5apache.dll as the latter ones are designed to
run with Apache 1.3.x.
Warning
Don't mix up your installation with DLL files from different PHP
versions. You have the only choice to use the DLL's and extensions
that ship with your downloaded PHP version.
Code: Chapter 4. Runtime Configuration
The configuration file
The configuration file (called php3.ini in PHP 3, and simply php.ini
as of PHP 4) is read when PHP starts up. For the server module
versions of PHP, this happens only once when the web server is
started. For the CGI and CLI version, it happens on every invocation.
The default location of php.ini is a compile time option (see the FAQ
entry), but can be changed for the CGI and CLI version with the -c
command line switch, see the chapter about using PHP from the command
line. You can also use the environment variable PHPRC for an
additional path to search for a php.ini file.
If php-SAPI.ini exists (where SAPI is used SAPI, so the filename is
e.g. php-cli.ini or php-apache.ini), it's used instead of php.ini.
Note: The Apache web server changes the directory to root at
startup causing PHP to attempt to read php.ini from the root
filesystem if it exists.
oder benutze xampp, da kannst du ganz bequem zwischen php4 und 5 switchen (laufen nciht synchron) mfg robo47
__________________ robo47.net - Blog, Codeschnipsel und mehr | |
| |
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| php.ini & error_* | squig | PHP Tipps 2007 | 2 | 25.12.2006 22:18 |
| Probleme bei Speicherung von serialize() Strings | Manni2k | PHP Tipps 2006 | 13 | 15.10.2006 15:06 |
| Was sind Voraussetzungen für eine locale php.ini | stani | PHP Tipps 2006 | 1 | 07.10.2006 14:42 |
| suPHP erkennt php.ini nicht | Sundriver | Server, Hosting und Workstations | 0 | 29.04.2006 18:14 |
| [Erledigt] php.ini Konfigurations Probleme | PHP-Fortgeschrittene | 1 | 11.02.2006 10:57 | |
| PHP.ini wird nicht gefunden | PHP Tipps 2006 | 5 | 03.01.2006 17:29 | |
| Probleme bei der Installation von Turck MMCache | tomx992 | PHP-Fortgeschrittene | 2 | 27.09.2005 20:31 |
| php.ini änderungen nicht wirksam | Server, Hosting und Workstations | 19 | 22.04.2005 17:04 | |
| Pfadangabe in php.ini funktioniert nicht | PHP Tipps 2005 | 10 | 29.03.2005 15:16 | |
| php.ini bearbeiten | Juuro | Server, Hosting und Workstations | 13 | 01.02.2005 22:51 |
| PHP 5.0.3 neu installiert | PHP Tipps 2005 | 1 | 30.01.2005 16:23 | |
| [Erledigt] Server lokal - php.ini Timeout einstellen | PHP-Fortgeschrittene | 7 | 28.12.2004 12:05 | |
| [Erledigt] Technische Probleme mit Sessions | PHP-Fortgeschrittene | 4 | 18.11.2004 14:45 | |
| Probleme mit Apache2 und PHP5 nach Update von PHP4 | Server, Hosting und Workstations | 9 | 28.10.2004 16:01 | |
| probleme mit php 4.3.6 | PHP Tipps 2004 | 9 | 15.06.2004 18:54 | |
| Besucher kamen über folgende Suchanfragen bei Google auf diese Seite |
| php.ini xp einstellen, php 4.3.6 for apache, php cgi windows ini path -iis, php4 für php5 anpassen, php-cgi.exe scriptalias einbinden, php probleme mit parse ini, apache server auf windows erkennt php-dateien nicht php-cgi.exe |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.