PHP 5.3 now requires that you either have a timezone set in your php.ini file or that you pass the desired timezone via the date_default_timezone_set() function before calling the date() function.
Permanent link to this article: http://www.evsmisc.info/linux/php-5-3-and-it-is-not-safe-to-rely-on-the-systems-timezone-settings.html
May 18 2012
Upgrade PHP 5.1/5.2 to 5.3 on CentOS
Permanent link to this article: http://www.evsmisc.info/linux/upgrade-php-5-15-2-to-5-3-on-centos.html
May 15 2012
How to List Shared Library Dependencies Used by an Application
Every how and then you need to find out what libraries a certain application is using. Log in to your shell prompt and type eg :
ldd `which nano`
You should see a result like:
ldd -v `which nano`
linux-gate.so.1 => (0xb7f58000)
libncursesw.so.5 => /lib/libncursesw.so.5 (0xb7f0e000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7db3000)
libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7dae000)
/lib/ld-linux.so.2 (0xb7f59000)
Version information:
/usr/bin/nano:
libc.so.6 (GLIBC_2.3) => /lib/i686/cmov/libc.so.6
libc.so.6 (GLIBC_2.3.4) => /lib/i686/cmov/libc.so.6
libc.so.6 (GLIBC_2.1) => /lib/i686/cmov/libc.so.6
libc.so.6 (GLIBC_2.2) => /lib/i686/cmov/libc.so.6
libc.so.6 (GLIBC_2.0) => /lib/i686/cmov/libc.so.6
/lib/libncursesw.so.5:
libdl.so.2 (GLIBC_2.1) => /lib/i686/cmov/libdl.so.2
libdl.so.2 (GLIBC_2.0) => /lib/i686/cmov/libdl.so.2
libc.so.6 (GLIBC_2.1.3) => /lib/i686/cmov/libc.so.6
libc.so.6 (GLIBC_2.3) => /lib/i686/cmov/libc.so.6
libc.so.6 (GLIBC_2.2) => /lib/i686/cmov/libc.so.6
libc.so.6 (GLIBC_2.1) => /lib/i686/cmov/libc.so.6
libc.so.6 (GLIBC_2.0) => /lib/i686/cmov/libc.so.6
/lib/i686/cmov/libc.so.6:
ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
/lib/i686/cmov/libdl.so.2:
ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
libc.so.6 (GLIBC_2.1.3) => /lib/i686/cmov/libc.so.6
libc.so.6 (GLIBC_2.1) => /lib/i686/cmov/libc.so.6
libc.so.6 (GLIBC_2.0) => /lib/i686/cmov/libc.so.6
libc.so.6 (GLIBC_PRIVATE) => /lib/i686/cmov/libc.so.6
Permanent link to this article: http://www.evsmisc.info/linux/how-to-list-shared-library-dependencies-used-by-an-application.html
May 14 2012
How To Patch vSphere 5 ESXi Without Update Manager
Since vSphere ESXi 5.0 uses the new VIB model the commands and process have changed slightly but the basic concepts are the same.
- Download the patch file you want directly from the VMware Patch Portal
- Ensure that you enable SSH for remote support on the ESXi Host
- Make sure your host is in Maintenance Mode, this is a requirement since you will need to reboot
- Transfer the update file over to the host using FileZilla or SCP to a MOUNTED DATASTORE of some kind. NOTE: There is not enough space to transfer this to a location on the local ESXi Image. It took me a bit to realize this was failing to copy.
- Once you have uploaded the file to a datastore, this is considered a “Local Depot Repository” as opposed to one on FTP or HTTP.
Permanent link to this article: http://www.evsmisc.info/virtualisation/vmware/how-to-patch-vsphere-5-esxi-without-update-manager.html
May 09 2012
ssh-copy-id and sshd port
For security purposes, I don’t run sshd on the default port (22). This gave me some problems when attempting to use the command ssh-copy-id. Ideally, you’d expect the following to work:
ssh-copy-id -p XXXX -i '~/.ssh/id_rsa.pub' username@host
However, that didn’t do anything but output an error:
Bad port 'umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys'
The solution was to enclose it in quotes as follows:
ssh-copy-id ‘-p XXXX -i ~/.ssh/id_rsa.pub username@host’
Hope that helps.
(The above error probably doesn’t make any sense. ssh-copy-id is a shell script. The command that appears in the error message is a command sent to the server via SSH. Feel free to take a look at the file: cat `locate ssh-copy-id | head -n1`)
Another suggested option is:
ssh-copy-id -i ~/.ssh/id_rsa.pub ‘-p xxxx username@host’
Permanent link to this article: http://www.evsmisc.info/linux/ssh-copy-id-and-sshd-port.html
Permanent link to this article: http://www.evsmisc.info/mtb/2012-convict-100-50km.html
May 07 2012
Setting Up Chromium in Kiosk mode
Terminal window: “sudo vi /usr/share/xsessions/chromeKiosk.sh” This should bring up another vi window for you to insert the following code:
#!/bin/bash
xscreensaver -nosplash &
cat ~/.config/chromium/Local\ State | perl -pe “s/\”bottom.*/\”bottom\”: $(xrandr | grep \* | cut -d’ ‘ -f4 | cut -d’x’ -f2),/” > ~/.config/chromium/Local\ State
cat ~/.config/chromium/Local\ State | perl -pe “s/\”right.*/\”right\”: $(xrandr | grep \* | cut -d’ ‘ -f4 | cut -d’x’ -f1),/” > ~/.config/chromium/Local\ State
while true; do chromium-browser %u –start-maximized; sleep 5s; done
If you would like to disallow access to the URL bar simply insert “–kiosk” between %u and –start-maximized as shown in the sixth picture on this step.
A few people commented that the inclusion of the “–incognito” switch at the same place as “–kiosk” goes makes it so that you do not have to worry about making the Chromium user profile read only.
After you have created these two files run “sudo chmod 755 /usr/share/xsessions/chromeKiosk.sh” in order to make this script executable.
Permanent link to this article: http://www.evsmisc.info/linux/setting-up-chromium-in-kiosk-mode.html
Apr 30 2012
Making Ubuntu 11.04 as Kiosk using Google Chrome
2. Switch to Login Kiosk Users, Open Chrome to create default setting, Set Screensaver Setting (E.g. 5 minutes with no password lock)
3. Logout Kiosk Users, Switch back to your normal users
4. sudo vi /usr/share/xsessions/kiosk.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Kiosk Mode
Comment=Chromium Kiosk Mode
Exec=/usr/share/xsessions/chromeKiosk.sh
Type=Application
Permanent link to this article: http://www.evsmisc.info/linux/making-ubuntu-11-04-as-kiosk-using-google-chrome.html
Apr 17 2012
Fix ….. install/uninstall error 1402 ‘Setup cannot open the registry key: UNKNOWN\Components\…’
Fixing a 1402 error while uninstalling or installing a product:
Error 1402. Setup cannot open the registry key: UNKNOWN\Components\<very long CLASS ID ending in>0F01FEC. Verify that you have sufficient permissions to access the registry or contact Microsoft Product Support Services (PSS) for assistance. For information about how to contact PSS, see C:\Users\XXX\AppData\Local\Temp\Setup00000e60\PSS10R.Chm.
Permanent link to this article: http://www.evsmisc.info/window/fix-installuninstall-error-1402-setup-cannot-open-the-registry-key-unknowncomponents.html
Apr 09 2012
Virtual SMTP servers with a Postfix Relay – Ubuntu Forums
relay_domains = example.com, example.net
and also something you need to know.
you dont need to set the mx record as in the same domain your want it to work for.
let say you need example.net and example.com to be relayed using 80.80.80.80
you are making an A record in the name let say smtp.relayserver-domain.com
and in the mx records of the other domains you set the smtp.relayserver-domain.com
as your mx record.
Permanent link to this article: http://www.evsmisc.info/linux/virtual-smtp-servers-with-a-postfix-relay-ubuntu-forums.html
