I can not get the subscriptions.php to run.
I have had my admin setup the cron jobs but the scripts will not run I get this error.
Fatal error: Maximum execution time of 30 seconds exceeded in /usr/wwwroot/ddehek/newzealandnz/discussions/cron/php/subscriptions.php on line 95
// Require the library
require ("../../includes/main.inc.php");
require ("$thispath/languages/{$myprefs['language']}/subscriptions.php");
$html = new html;
$mailer = new mailer;
I have does this
Using the PHP Scripts
1. Customize Paths
Using NotePad, or a suitable text editor, open doexpire.php and subscriptions.php and place the path to PHP in the top of the script. For example, it might look like this:
#!/usr/bin/php
Also in subscriptions.php, you have to change line 22 of the script to reflect the location of your specific install. (i.e., the following line is hard-coded in the script, and needs to be edited:
<pre class="ip-ubbcode-code-pre"> require ("/home/www/html/ubbthreads/main.inc.php");</pre>
2. Upload Files
Open your FTP program and upload the two files in the PHP subfolder (within the cron folder of your zip) in ASCII mode. Be sure to maintain the same file structure on your server as is contained in the zip.
3. Change Permissions
Change the file permissions on doexpire.php and subscriptions.php files so that they can be read and executed by everyone (755). No other permissions need to be set.
Either use telnet to issue the command chmod 755 *.php, or use your FTP program to set the permissions. For assistance with permissions, see the detailed explanation in the UBB.threads Installation Guide.
4. Set up Cron Task – Subscriptions
If you wish to use the digest subscriptions feature (users can subscribe to daily digests of forum activity), then the file subscriptions.php should be run nightly. Tell your webhost the location where you have uploaded the file, and request that they set up a cron task for you to run the script.
If you’re doing it yourself, you need to edit your crontab so the script will run nightly. Use the command “crontab –e” or “man crontab”. DO NOT RUN THIS SCRIPT AS ROOT.
Something like the following will work on most systems.
0 1 * * * root /home/httpd/html/ubbthreads.com/php/cron/subscriptions.php
You might also need to change the path to the script or the user it runs as, but this example would run the script at 1 AM every morning.
Once the cron task is set up, you will need to go into your UBB.threads Admin control panel, click “config settings”, click “special functions/miscellaneous”, and select “allow subscriptions to forum”. Click “update config.inc.php” and the email digest feature will be enabled.