Snippets for Drupal:
Print node fields to screen:
<pre>
<?php print_r($node) ?>
</pre>
Print Node Body:
<?php print $node->content['body']['#value']; ?>
<?php print=""><?php>
var_dump displays structured information about one or more expressions that including its type and value. A recursive listing is created for Arrays and Objects, with values indented to show structure.
Public, private and protected Object properties are returned in the output.
When setting security permissions in Linux, it may be important to figure out the name of the Apache and PHP users. Often they are the same. To find the name of the Apache user, issue the command:
ps -ef | grep apache
To determine the name of the PHP user, create and execute a PHP script with the following code:
<?php echo posix_getuid();?>
Where is php.ini?
From the Linux command line:To determine the location of php.ini, run the following (Linux only):
php -r "phpinfo();" | grep Configuration
From Drupal:
The default PHP timeout in php.ini is 30 seconds, which is too short for some Drupal activities like listing/enabling modules.
snv info - status of current directory if it is a working copy
svn commit - commit changes to repository
svn update - update working copy with latest changes from repository