Author Topic: add php module to php in directadmin  (Read 8272 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
add php module to php in directadmin
« on: มกราคม 24, 2011, 12:17:15 PM »
cd /usr/local/directadmin/custombuild
mkdir -p custom/ap2
cp -fp configure/ap2/configure.php5 custom/ap2/configure.php5
#เพิ่ม module ที่ต้องการโดยใส่ --with-module เข้าไปในไฟล์ custom/ap2/configure.php5 ,
# อย่าลืมเครื่องหมาย \ ปิดท้ายด้วยนะครับ จากนั้นสั่ง

#ใช้สำหรับเป็น php5
./build php 5

#ใช้สำหรับเป็น php4
./build php 4


##Linux
/sbin/service httpd restart

##FreeBSD
/usr/local/etc/rc.d/httpd restart

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: add php module to php in directadmin
« Reply #1 on: ธันวาคม 26, 2013, 06:27:36 PM »
./build php n

y = yes to all (compile additional package) - reply yes to questions
n = no to all (doesnt compile additional package) - reply no to questions
d = default (actually dont remember on default what is included and what isnt)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: add php module to php in directadmin
« Reply #2 on: ธันวาคม 06, 2017, 04:06:59 PM »
add php module to PHP5.6 in DirectAdmin CP.

1.First, figure out which configure file your system is using.  Type:
cd /usr/local/directadmin/custombuild
./build used_configs | grep configure.php

2.It might look like this:
PHP (default) configuration file: /usr/local/directadmin/custombuild/configure/ap2/configure.php56

3.Change in the values if they're different.
To add this flag, run the following:
cd /usr/local/directadmin/custombuild
mkdir -p custom/ap2
cp -fp configure/ap2/configure.php56 custom/ap2/configure.php56



3. Add your --with-module line to the end of the custom/ap2/configure.php56 file, and make sure the \ character exists at the end of all lines except the last one. The \ character tells the line configure line to loop to the next line, making the configure settings easier to read.  Without the \ character to trigger the wrap, the next line becomes a separate command, which is not correct. (see error below). Once set, type:
เช่น  --enable-exif แล้วสั่ง
./build php n

change configure.php5 to configure.php4 if you're using php4.
If you're using suphp, the paths would be configure/suphp/configure.php5 and custom/suphp/configure.php5.


4.Restart apache:

RedHat:
/sbin/service httpd restart


FreeBSD:
/usr/local/etc/rc.d/httpd restart
« Last Edit: ธันวาคม 06, 2017, 04:14:24 PM by golfreeze »