| Tutorial details | |
|---|---|
| Difficulty | Intermediate (rss) |
| Root privileges | No |
| Requirements | PHP / shell |
| Estimated completion time | N/A |
The bug may be fixed by applying stable APC patches. APC code is actively maintained. So try updating to the latest stable version. If you are using php-cli, php5-cli or php binary file directly from your scripts try passing -d option. This option can define and override INI entry that enables APC. The exact entry can be located using the following grep command line syntax:
### note php.ini path may be differnt under Unix or linux ### grep --color -i enabled /etc/php.d/php.ini
Sample outputs:
apc.enabled=1
Use the following syntax to define an entry apc.enabled with value 0 (disable it):
/usr/bin/php -d apc.enabled=0 my.cron.php /usr/bin/php -d apc.enabled=0 /path/to/myshelljob.php /usr/bin/php-cli -d apc.enabled=0 /path/to/myshelljob.php
Or you can create a small shell script wrapper for your cron jobs under Linux or Unix like oses:
#!/bin/bash # Purpose - Create search index file for AWS search web service for our db # Author: nixCraft <www.cyberciti.biz> # ------------------------------------------------------------------------ _php="/usr/bin/php" _nice="/bin/nice" _phpargs="-d apc.enabled=0" _base="/opt/sysadmin/aws" _tmp="$_base/tmp" [[ ! -d "$_tmp/$i" ]] && /bin/mkdir "$_tmp/$i" ## Run php with APC disabled ### $_nice -n 3 $_php $_phpargs -f $_base/php/createsearchindex.php
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop










![Linux Find Out If the PCIe / AGP / VGA Driver Is Installed OR NOT [ Radeon X1550 64 bit ]](http://s0.cyberciti.org/images/rp/1/6.jpg)


{ 0 comments… add one now }