# / # <img src="/sites/all/modules/admin_menu/images/icon_users.png" width="16" height="15" alt="Current anonymous / authenticated users" title="Current anonymous / authenticated users" />
<?php
function MYTHEME_preprocess_page(&$variables) {
if (stripos($variables['head_title'],'icon_users.png')) {
$variables['head_title'] = 'User account | ' . variable_get('site_name', '');
}
if (stripos($variables['title'],'icon_users.png')) {
$variables['title'] = 'User account';
}
}
?>
Fatal error: Call to undefined function timezone_open() in /MYSERVERPATH/httpdocs/sites/all/modules/date/date_api.module on line 607
# on the production server:
$ php -v | head -1
PHP 5.2.8 (cli) (built: Dec 9 2008 14:03:11)
$ sudo emacs /etc/yum.repos.d/utterramblings.repo
# FILE CONTENTS - START
[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
# FILE CONTENTS - END
$ sudo yum update
# ...snip...
Resolving Dependencies
# ...snip...
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Updating:
apr i386 1.2.12-2.jason.1 utterramblings 257 k
apr-util i386 1.2.12-5.jason.1 utterramblings 159 k
httpd i386 2.2.8-jason.3 utterramblings 2.5 M
mod_ssl i386 1:2.2.8-jason.3 utterramblings 314 k
mysql i386 5.0.58-jason.2 utterramblings 6.4 M
mysql-server i386 5.0.58-jason.2 utterramblings 10 M
pcre i386 7.6-jason.1 utterramblings 562 k
php i386 5.2.6-jason.1 utterramblings 3.7 M
php-cli i386 5.2.6-jason.1 utterramblings 2.6 M
php-common i386 5.2.6-jason.1 utterramblings 481 k
php-devel i386 5.2.6-jason.1 utterramblings 568 k
php-gd i386 5.2.6-jason.1 utterramblings 320 k
php-ldap i386 5.2.6-jason.1 utterramblings 56 k
php-mbstring i386 5.2.6-jason.1 utterramblings 1.3 M
php-mssql i386 5.2.6-jason.1 utterramblings 61 k
php-mysql i386 5.2.6-jason.1 utterramblings 258 k
php-odbc i386 5.2.6-jason.1 utterramblings 112 k
php-pdo i386 5.2.6-jason.1 utterramblings 159 k
php-pear noarch 1:1.6.2-1.jason.1 utterramblings 418 k
php-soap i386 5.2.6-jason.1 utterramblings 342 k
php-xml i386 5.2.6-jason.1 utterramblings 316 k
php-xmlrpc i386 5.2.6-jason.1 utterramblings 130 k
subversion i386 1.4.4-jason.1 utterramblings 4.3 M
Transaction Summary
=============================================================================
Install 0 Package(s)
Update 23 Package(s)
Remove 0 Package(s)
Total download size: 35 M
Is this ok [y/N]:
$ php -v | head -1
PHP 5.2.6 (cli) (built: May 5 2008 10:32:59)
<?php
// define where all my files are
$path_httpdocs = '/my/first/path/httpdocs';
$path_httpdocs_new = '/my/second/path/httpdocs';
// get a list of files from the 1st location, ignoring subversion folders
chdir($path_httpdocs);
$files_httpdocs = `find . | grep -v \.svn | sort`;
$files_httpdocs = explode("\n", $files_httpdocs);
// get a list of files from the 2nd location, ignoring subversion folders
chdir($path_httpdocs_new);
$files_httpdocs_new = `find . | grep -v \.svn | sort`;
$files_httpdocs_new = explode("\n", $files_httpdocs_new);
// check for file list diffs
$diffs = array_diff($files_httpdocs, $files_httpdocs_new);
sort($diffs);
echo "### Additions to httpdocs:\n";
print_r($diffs);
// loop through files and check if they are additions
foreach ($diffs as $f) {
if (file_exists($path_httpdocs . '/' . $f) && !file_exists($path_httpdocs_new . '/' . $f)) {
// copy new addition to new folder
copy($path_httpdocs . '/' . $f, $path_httpdocs_new .'/' . $f);
}
}
// check for file list diffs
$diffs = array_diff($files_httpdocs_new, $files_httpdocs);
sort($diffs);
echo "### Additions to httpdocs_new:\n";
print_r($diffs);
// do not continue if there are file differences in the 2 directories
if (count(array_diff($files_httpdocs, $files_httpdocs_new)) || count(array_diff($files_httpdocs_new, $files_httpdocs))) {
echo "### Clean up file differences before continuing...\n";
die;
}
// loop through files and check file properties
$diffs = array();
foreach ($files_httpdocs as $f) {
if (!is_file($path_httpdocs . '/' . $f)) continue;
// do a diff on the files
$command = "diff \"$path_httpdocs/$f\" \"$path_httpdocs_new/$f\"";
$t = `$command`;
// if the diff command generated output, store it
if (strlen($t)) {
$diffs[$f] = $t;
}
}
// print all the file diffs
print_r($diffs);
?>
user warning: Got a packet bigger than 'max_allowed_packet' bytes
<?php
$('form#node-form div.form-item').each(function(){
var result = 0;
result += $(this).find('div.form-radios input.form-radio.error').length;
result += $(this).find('div.form-checkboxes input.form-checkbox.error').length;
if (result) $(this).find('label:first').removeClass('error').addClass('error');
});
?>