מעבר מ- PHP 3 אל PHP 4
PHP Manual

מעבר של קבצי ההגדרות

קובץ ההגדרות הגלובלי, php3.ini, שינה את שמו אל php.ini.

לקובץ ההגדרות של Apache, ישנם קצת יותר שינויים. סוגי ה- MINE המוכרים ע"י מודול ה- PHP השתנו.

<div dir="ltr">
application/x-httpd-php3        -->    application/x-httpd-php
application/x-httpd-php3-source -->    application/x-httpd-php-source
</div>

אתה יכול להשתמש בקבצי ההגדרול שלך שיעבדו עם שני גרסאות ה- PHP (זה תלוי באיזה אחד המקומפל לתוך השרת), בעזרת התחביר הבא:

<div dir="ltr">
AddType  application/x-httpd-php3        .php3
AddType  application/x-httpd-php3-source .php3s

AddType  application/x-httpd-php         .php
AddType  application/x-httpd-php-source  .phps
</div>

בנוסף, שמות ההנחיות PHP של Apache השתנו.

מאז PHP 4.0, ישנן רק ארבע הנחיות Apache הקשורות אל PHP:

<div dir="ltr">
php_value [PHP directive name] [value]
php_flag [PHP directive name] [On|Off]
php_admin_value [PHP directive name] [value]
php_admin_flag [PHP directive name] [On|Off]
</div>

ישנם שני הבדלים בין ערכי Admin וערכי Non Admin:

To make the transition process easier, PHP 4 is bundled with scripts that automatically convert your Apache configuration and .htaccess files to work with both PHP 3 and PHP 4. These scripts do NOT convert the mime type lines! You have to convert these yourself.

To convert your Apache configuration files, run the apconf-conv.sh script (available in the scripts/apache/ directory). For example:

~/php4/scripts/apache:#  ./apconf-conv.sh /usr/local/apache/conf/httpd.conf

Your original configuration file will be saved in httpd.conf.orig.

To convert your .htaccess files, run the aphtaccess-conv.sh script (available in the scripts/apache/ directory as well):

~/php4/scripts/apache:#  find / -name .htaccess -exec ./aphtaccess-conv.sh {} \;

Likewise, your old .htaccess files will be saved with an .orig prefix.

The conversion scripts require awk to be installed.


מעבר מ- PHP 3 אל PHP 4
PHP Manual