<?php include_once './includes/bootstrap.inc'; include_once './sites/all/modules/pathauto/pathauto.inc'; include_once './sites/all/modules/pathauto/pathauto_node.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); _pathauto_include(); // variable_set('pathauto_max_bulk_update', 5000); node_pathauto_bulkupdate(); ?>
For the sake of your tiny and low resource shared hosting webserver, change the following module's settings to reduce the memory used by the cron job and the time it takes to run:
See excellent tutorial:
http://www.advantagelabs.com/drupal-colonoscopy-or-how-theme-cck-field-drupal-6
Important: In your theme directory, it must content-field.tpl.php file.
Setting cron job to avoid the infamous message "Cron run exceeded the time limit and was aborted", see
http://acquia.com/blog/s-files-cron-run-exceeded-time-limit-and-was-aborted
wget -O - -q -t 1 http://localhost/cron.php
When you are importing a huge *.sql file into MySQL, it sometimes shows the following error message:
mysql -u root -p databasename < huge.sql ERROR:...Got a packet bigger than 'max_allowed_packet' bytes ...
max_allowed_packet = 10M net_buffer_length = 2M
Update: 2010-08-17:
Sometimes you want to generate a different version of your docbook for your customer. In my case, I was using the common attribute role to flag the content that I don't want the customer to see. Therefore, I set the role="NotForClient" on all nodes that I don't want my customer to see. Then, I apply an XSL sheet to remove those nodes.
Here is the XSL file:
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <!-- Copy everything -->
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"> <xsl:template match="guibutton"> <fo:inline border="1px outset #dddddd" background-color="#dddddd"> <xsl:call-template name="inline.charseq"/> </fo:inline> </xsl:template> </xsl:stylesheet>
#!/bin/bash # Create a file touch myfile.txt # Create a directory mkdir mydirectory if [ -f myfile.txt ] then echo "myfile.txt exists!" fi if [ -d mydirectory ] then echo "mydirectory exists!" fi
#!/bin/bash # Description: Get filenme without extension. # Author: Xuan Ngo ############################################# filename=my_filename.txt echo ${filename} # Length of .txt is equal to 4 let fileLength=${#filename}-4 filenameWithNoExt=${filename:0:${fileLength}} echo ${filenameWithNoExt} # Output: # my_filename.txt # my_filename
When Microsoft Virtual PC shutdowns by itself for no apparent reason, check for the following error message in Control Panel->Administrative Tools->Event Viewer->Application:
Faulting application Virtual PC.exe, version 6.0.192.0, time stamp 0x4822fe31, faulting module Virtual PC.exe, version 6.0.192.0, time stamp 0x4822fe31, exception code 0xc0000005, fault offset 0x000424e2, process id 0xc58, application start time 0x01cabc27053164bc.