You are here: Home Tech Notes
Tech Notes
Apache: Error(98) PDF Print E-mail
Tech Notes - General
Written by Rick   
Tuesday, 25 May 2010 10:23

I ran across a situation where Apache wouldn't start. It generated the following error;

"(98)address already in use: make_sock: could not bind to address [::]:80 (98)address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down unable to open logs"

I located a thread at wallpaperama.com that fixed the problem. Use the following from CLI;

First;

for i in `ps auwx | grep -i nobody | awk {'print $2'}`; do kill -9 $i; done

Second;

for i in `lsof -i :80 | grep http | awk {' print $2'}`; do kill -9 $i; done

If Apache still doesn't start;

for i in `ipcs -s | grep nobody | awk '{print $2}'`; do ipcrm -s $i; done

Correcting my particular problem did not require running the last line.

 
PHP/PostgreSQL: Create Recordset & Display PDF Print E-mail
Development - PHP
Written by Rick   
Monday, 25 January 2010 12:00

Creating a recordset and displaying data from a PostgreSQL table using PHP;

Making the connection:

$DB_HOST="hostname";
$DB_NAME="databasename";
$DB_USER="username";
$DB_PASSWORD="password";


$psql="Select DISTINCT fieldname FROM table";
$const = "host=".$DB_HOST." dbname=".$DB_NAME." user=".$DB_USER." password=".$DB_PASSWORD."";
$pcon=pg_connect($const);
if (!$pcon) {
echo "<script type=\"text/javascript\">alert(\"Unable to connect to PostgreSQL Server!\")</script><script type=\"text/javascript\">history.back()</script>";
}else{
$getRS = pg_exec($pcon,$psql);
}

pg_close($pcon);


Create the recordset and display:

$getRS = psqlSelectRS($psql);
$rows=pg_num_rows($getRS);

for ($i=0; $i<$rows; $i++) {
$row_getRS=pg_fetch_row($getRS, $i);
echo "Row Value: ".$row_getRS[0]."<br />;
}

pg_free_result($getRS);

 
Windows 7 Release Underwhelms PDF Print E-mail
IMHO - General
Written by Rick   
Friday, 23 October 2009 18:00

Where was the great fanfare associated with past Windows releases? No news stories about people standing in-line at midnight to get their copy? Did people stand in-line to get a copy on the first day of release? If they did, it must not have been news worthy, or perhaps I just missed it. I did however, notice the news about Windows competitors. Apparently Apple released a new ad campaign targeting Windows 7 and IBM revved up it's bid to get Linux on the deskptop. Ubuntu, I'm sure with the Windows release in-mind, released the RC version of 9.10 code-named Karmic Koala (Who comes up with these names?).

Metaphorically speaking, these are direct shots at Microsoft. Unfortunately, the view finder seems a little off as none, independently, will do major damage to Windows now or in the near future. Though each time these shots are fired, the bullets get bigger and the target become clearer. Window's won't be brought down with a single shot. It'll take time and effort to chip-away at the monolith. With each year that passes, Microsoft loses a little.

I can't "sing the praises" of free operating systems loud enough (no one wants to hear me sing anyway) a.k.a. Linux. I'm empowered and unfettered without Microsoft Windows or Apple's OS X. I can't help but feel that all those years I was a Windows fan went to waste.

 
Ubuntu Lucid Upgrade: Dell T3500 Disaster PDF Print E-mail
Tech Notes - Linux
Written by Rick   
Tuesday, 18 May 2010 17:47

My system at work had been acting funky for months. Every now and again, the monitor would go non-linear and I'd get no response from the mouse or keyboard. It would normally still be accessible remotely. So, I'd just reboot it that way and move on. I was pretty sure it was a memory or video card issue.  But, I read where Ubuntu had some problems with the NVidia cards. I figured I'd wait 'til Ubuntu released 10.04 and do a fresh install.

Read more...
 
Linux CLI: Copy MySQL Database PDF Print E-mail
Tech Notes - Linux
Written by Rick   
Tuesday, 06 April 2010 11:57

There is no command in MySQL to copy a database. One method to copy a database is as follows;

  1. Create a new empty database.
  2. Export the source database using mysqldump.
  3. Import the database to the new empty database created in step 1 above.

(See Linux CLI: MySQL Database Backup & Restore article for mysqldump usage).

Alternatively, phpMyAdmin can be used for small databases. More often-than-not, databases exceed size limits imposed by phpMyAdmin forcing CLI use or another method.

 
<< Start < Prev 1 2 3 Next > End >>

Page 1 of 3