A common optimization that can be done for php to improve performance is to install Alternative PHP Cache (APC).
What it does, is it caches php files in memory in their parsed and compiled state.
This removes the need for re-reading, parsing, and compiling for each request, thus greatly lowering your system load.
The cost of using this mosulde is increased memory usage, since that's where the cache lives.
Note - This won't work with suPhp, since each call to php is with a seperate binary call, and doesn't share the same memory. CLI is always running in memory, hence can shared the same memory, which is why it works.
1) To install it with the default CLI version of php, use the following:
cd /usr/local/directadmin/custombuild
wget http://pecl.php.net/get/APC-3.1.9.tgz
tar xvzf APC-3.1.9.tgz
cd APC-3.1.9
/usr/local/bin/phpize
./configure --with-php-config=/usr/local/bin/php-config
make
make install
2) Then, we needed to edit the php.ini to add the code:
extension=apc.so
apc.enabled=1
apc.shm_size=128M
apc.ttl=7200
apc.user_ttl=7200
apc.enable_cli=1
3) as well as change the php.ini line from:
extension_dir = "./"
to be:
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613/"
but, this may vary per system. The "make install" command will tell you where the apc.so was installed to (Installing shared extensions:).
Note that this is a 3rd party module, and would be beyond our technical support for any issues that arise.
Note: It's been observed that with APC enabled, php may not install on the "make install" step. The error it produces is as follows:
Fatal error: Class 'PEAR' not found in phar://install-pear-nozlib.phar/index.php on line 24
make[1]: *** [install-pear-installer] Error 255
make: *** [install-pear] Error 2
After removing the APC options from the php.ini, it installed. The APC could be re-enabled.
آموزش نصب و کانفیگ مجازی ساز kvm
آموزش نصب VNC در Centos
آشنایی با 5 پلاگین کاربردی Nginx در وردپرس
آموزش نصب و فعالسازی SSL در سرورهای Cpanel
آموزش دانلود یک پوشه از یک سرور Remote
آموزش افزایش و بالا بردن امنیت WHMCS
آموزش ساخت صفحات اضافی در WHMCS
آشنایی با 15 دستور کاربردی در آنتی شل maldet
آموزش نصب و کانفیگ ftp سرور در CentOS 7
آموزش نصب phpmyadmin در nginx
آموزش نصب کلود لینوکس CloudLinux
آموزش تغییر IP و Hostname در Centos
آموزش شناسایی و حذف CryptoPHP PHP malware
آموزش افزایش امنیت سایت های جوملا Joomla
آموزش نصب Virtualizor روی centos 6.5
آشنایی با انواع Raid در سرور
آموزش نصب و کانفیگ php-fpm در دایرکت ادمین directadmin
آموزش نصب Spamassassin در دایرکت ادمین
آموزش خاموش کردن brute force notification
آموزش تنظیم mysql remote در دایرکت ادمین
سرویس کانفیگ ویژه امنیتی سرور
دستورالعمل جديد فعاليت سايت هاي چت روم
درباره پی سی سرور
تعطیلی 4 روزه بخش پشتیبانی
فروش ویژه سرورهای مجازی قدرتمند مختص چت روم های پربازدید
فروش ویژه سرور مجازی VPS بصورت مدیریت شده
خدمات مانیتورینگ و نگهداری و رفع اشکال سرور
کانفیگ سرورهای دایرکت ادمین
کانفیگ سرورهای سی پنل
اطلاعیه مهم: مدیران سایت های چت روم بخوانند
سیستم مدیریت محتوای سایت های عکس
راه اندازی سامانه پشتیبانی آنلاین پی سی سرور
سوء استفاده افراد کالاه بردار سود جو از نام پی سی پارسی
شروع بکار مجدد بخش پشتیبانی
تعطیلی 1 هفته ای بخش پشتیبانی بدلیل تغییر مکان شرکت
سیستم مدیریت محتوای سایت های تفریحی
سوء استفاده گروه سود جو "TopazVPS" گول نخورید
قوانین سرویس دهی پی سی سرور
طراحی چت روم
حفره امنیتی خطرناک در wordpress