Tutorial details | |
---|---|
Difficulty | Intermediate (rss) |
Root privileges | No |
Requirements | PHP / shell |
Time | N/A |
### 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
🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.
🐧 0 comments... add one ↓
🐧 0 comments... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |