The Blog

Author: admin

PHP ODBC MAS90/200

Posted on

Create System DSN MAS90PHP best if you copy SOTAMAS90 DSN add username and password to it. And make sure you run apache under user that has access to mas90 share even in mas200. Below is code that you can test connection with.

<?php
$conn = odbc_connect('MAS90PHP','','');
if (!$conn)
{exit("Connection Failed: " . $conn);}
else
echo"Connected<BR>";

$query = "SELECT * FROM GL_Audit";
$result = odbc_exec($conn, $query) or die(odbc_errormsg());

while(odbc_fetch_row($result)){
echo odbc_result($result, "FieldName") . "<br>";

}

odbc_close($conn);
echo"Connection Closed";
?>
Posted in PHP Leave a comment

Moving Ubuntu 11.04 clone to new home

Posted on

UPDATE:

Grabbing live Linux with few exceptions.

tar cvpjf backup.tar.bz2 –exclude=/proc –exclude=/lost+found –exclude=/backup.tar.bz2 –exclude=/mnt –exclude=/sys

to extract to the new HD:

 tar xvpfj backup.tar.bz2 -C /xx/xx
mkdir proc
mkdir lost+found
mkdir mnt
mkdir sys
mkdir dev

So far all that needed to be done was:

Reinstall GRUB

Change fstab to accommodate new data storage location

/dev/sdc1 /DATA ntfs-3g defaults,force 0 0

And change /var/www simlink to adjust for changed www folder

beyond that all is working good.

 

Posted in Uncategorized Leave a comment

You do not have sufficient privileges to delete OU, or this object is protected from accidental deletion

Posted on

Windows Server 2008 has a new feature to protect OU from accidental deletion.

if you try to delete an OU which was marked with the special protection option you will get the following error message when trying to delete the object:

“You do not have sufficient privileges to delete OUNAME, or this object is protected from accidental deletion”

Fix:
Read More

Posted in Server 2008 Stuff Leave a comment

How to use Rewrite Module to redirect any subdomains to a folder

Posted on

Here is a working example of redirecting all but www subdomains to one folder “/var/www/vhosts/sunset-station.com/httpdocs/new/sunset”

ServerAlias *.sunset-station.com
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.* [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.sunset-station\.com
RewriteCond /var/www/vhosts/sunset-station.com/httpdocs/new/sunset -d
RewriteRule ^(.*) /new/sunset/$1 [L]
Posted in Uncategorized Leave a comment

When Everything Goes Wrong Déjà Dup

Posted on

Déjà Dup may fail. Maybe it crashes or gives you an error when you try to restore. When you really need your data back, the last thing you want do deal with is a bug. Consider filing a bug reportbut in the meantime, here are some approaches to workaround a misbehaving Déjà Dup and get your data back.

This is going to get technical. If none of this makes sense to you, don’t be afraid to ask for help.

  1. Open a Terminal window by pressing Ctrl+Alt+T.
  2. Create the directory in which you will place your restored files. This guide will use /tmp/restore:
mkdir -p /tmp/restore

Read More

Posted in Uncategorized Leave a comment
« Previous PageNext Page »