Chapter 16: Command-Line PHP Utilities 583 (Photography web hosting) For example,

Chapter 16: Command-Line PHP Utilities 583 For example, say you kept reminder.php and reminder.conf in /usr/ local/src/reminder directory, you can run the following commands as root to create the link: cd /etc/cron.daily ln -s /usr/local/src/reminder/reminder.php 2. Once the symlink is created, run: /etc/cron.daily/reminder.php as a test. If you get an error message about reminder.conf not being found, you need to edit the reminder.php to change require_once ( reminder.conf ) to require_once( /path/to/reminder/ reminder.conf ). For our example case, this would be require_once( /usr/local/src/reminder/reminder.conf ). 3. Make sure reminder.php is executable. You can run chown root:root reminder.* chmod 700 reminder.php from the directory of the script to allow root to own and be able to execute the reminder scripts. If your cron daemon does not run as root, make sure you replace root:root with the appropriate user and group names that enable cron to execute the script. 4. Now you can set up reminders in one or more user reminder directories (~username/remidners/reminders.txt) and create necessary mail files in the reminders directory. 5. Let cron run the job at the regularly scheduled time and you should receive reminders if you have set any for yourself. If you do not receive a reminder you expect to receive, check the ~usernmame/reminders/ username.log file. Also check /var/log/cron for possible file execute permission issues Building a Geo Location Finder Tool for IP Ever find an IP address in a log file that looked suspicious or interesting and you wanted to know from which part of the world that IP came? A trace route might give you clues but it is too much work to find geographic locations of an IP address. In this section, we will develop a simple script called geolocator.php using the netgeo.php class, which you can download from http://www.phpclasses.org/ netgeoclass.

WordPress database error: [Table 'armadillowebhosting_com_-_jsp.wp_comments' doesn't exist]
SELECT * FROM wp_comments WHERE comment_post_ID = '639' AND comment_approved = '1' ORDER BY comment_date

Leave a Reply