Internet Hacking 101, with PHP

June 1, 2011

The point is, a web site (blog?) with an option or requirement to login before commenting (or blogging) and no captcha, may be easy to get into as an admin. Make sure your web site is secure. Micah Lee, in 2600, The Hacker Quarterly tells how to "write code that automatically loads web pages, submits forms, and [can create an admin user-id in WordPress...

Read more »

quiz yourself on PHP

May 17, 2011

PHP 1.) The eregi() function is deprecated in PHP 5.3+ A. TRUE B. FALSE 2.) Which of the following will be most likely to work as intended: A. mail($headers, $body, $subject, $to); B. if ($i = $item) C. foreach ($i=0;$i $v) E. none of the above 3.) Which of the following is a valid php statement A. print ("<p> Hello World </p>"); B. echo...

Read more »

Clean up WordPress

May 7, 2011

There are some problems with WordPress which can be easy to fix if someone would just tell you how. Some issues involve portability: when you change internet hosting providers, and when you have a copy of your web site, certainly your wordpress blog, on your pc, it is a backup copy, and a place to safely try out things like new plugins and themes...

Read more »

Caching, the ultimate speed-up for wordpress

April 19, 2011

All dynamic web sites are built from server side programs accessing databases, and the more code, the more it is broken up – into separate files, the slower the access. Starting with the index.php, there are well over 2 dozen php programs that have to be accessed from the disk, and the fastest SCSI hard disks are still 1000 times slower than RAM. One...

Read more »

Browser Hacking; Firefox and Google Triumph

April 15, 2011

2011 Hacking Contest Browser Results Wednesday, March 16, 2011 Pwn2Own, now in its fifth year, is a hacking competition divided into two areas: web browsers and mobile phones. This year’s Pwn2Own contest has come and gone with February, leaving in its wake 3 exposed browsers. Vupen (a French security firm) hacked the Apple Saffari browser version 5.0.4 earning $15,000 from TippingPoint. The Google Chrome...

Read more »

I got a "grub>" prompt and NO operating system

January 8, 2011

I had windows and an old copy of fedora on my first of 2 hard disks and wanted to install the latest Fedora on the second one. The first time I installed Fedora 14 on my 2nd disk including the grub boot-loader, I did not give it permission to touch my 1st hard disk containing windoze and fedora 13, which I did not want...

Read more »

Open Source LMS, MOODLE, ATutor, Sakai, Canvas, and others

December 29, 2010

Because moodle has abandoned so many of its installed client base with the release of moodle version 2.0, it’s seems to be the right time to look at the alternatives. Moodle has only about 10% of the on-line education market. "Moodle has been in a downward spiral for a few years" – educhalk.org ATutor ver. 2.0 PHP 5 meg tar.gz Claroline ver. 1.10 PHP...

Read more »

How to Find Linux CPU Usage

November 29, 2010

To find what is soaking up your cpu How do I Find Unix-Linux CPU Utilization System Monitor on your desktop, you can find all that and more at Applications -> System Tools -> System Monitor. There, you will find each processor, RAM, your operating system, its version, kernel, hard disk space, cpu load averages over the past 1, 5, and 15 minutes, processes running,...

Read more »

CRON JOBS; crontab, cron tables

November 24, 2010

Your crontab editor The default editor for the ‘crontab -e’ command and many others is vi. On Ubuntu, it is the nano editor. To change it to something else, like emacs, or gedit, for instence, use the commmand $ export VISUAL='gedit' (or whatever editor you like) $ export VISUAL='emacs' To see your crontab editor What is your crontab editor? to see what your crontab...

Read more »

php basic String functions

November 10, 2010

updated 2014-08-07 strcmp, substring, strtoupper, strtolower, str_replace, addslashes, trim, strstr, strpos, str_repeat, strrev, explode, implode, chunk_split, . . .   string length $length = strlen($str); substring $str = "abcdefgh"; echo substr($str, 1); // bcdefgh echo substr($str, 3); // defgh echo substr($str, -1); // h echo substr($str, 2, 4); // cdef (starting point, length)   compare If you need to compare two strings, the strcmp()...

Read more »

how to get linux to recognize your modem or router, internet connection

October 26, 2010
how to get linux to recognize your modem or router, internet connection

2009 – 2010 – 2011 How to get Fedora to recognize your internet connection. I installed Fedora and it will not recognize my cat5 (cat5e) ethernet, internet, connection. I installed linux on my pc (Fedora 11, then a year or 2 later, 13, and now fedora 14) and, each time, everything was fine except that Fedora would not communicate with the internet, even-though the...

Read more »

help! wireless network not active

October 25, 2010
help! wireless network not active

Laptop with wireless is disabled. unplugged Belkin-n router, and modem, and now the wireless does not work fedora 13: how to "re-enable" wireless NIC ? fedora 13: (re)activate wlan0 "Operation not possible due to RF-kill" fedora 13: "wireless is disabled"; "enable wireless" is grayed out my laptop (Sony Vaio) was networking, communicating with the internet just fine. with or without the CAT5e wire –...

Read more »

PHP Fatal error: Cannot redeclare

October 18, 2010

" Fatal error: Cannot redeclare () … " I defined a function (fff) in the top of my pgm. (not in a loop) it spanned from line 5 to 11 and used it in the program, later. I got this error msg: Fatal error: Cannot redeclare fff() (previously declared in /…/xxx.php:5) in /…/xxx.php on line 11 clearly, I only defined it once in the...

Read more »

hints to a few 2 and 3-dimentional puzzles

October 2, 2010
hints to a few 2 and 3-dimentional puzzles

For those who don’t want the answer handed to them, but do want a hint. "Block By Block" ThinkFun games – thinkFun.com Block by Block 3D Puzzle a 7-piece stacking puzzle that asks you to match 60 different three-dimensional patterns! Block by Block helps players sharpen their spatial thinking skills and have fun at the same time The puzzle pieces are the same as...

Read more »

a few Puzzles, Mazes, and Sudoku

October 1, 2010
a few Puzzles, Mazes, and Sudoku

1. what is the minimum height of a mirror that lets you see a full head-to-toe view of yourself? ("relatively speaking") 2. Two identical wooden wheels carry a 10 lb weight. One weight is a disk at the center of the wheel; the other weight is a ring attached near the rim of the other wheel. If the wheels are released at the same...

Read more »

change root password in MySQL

September 30, 2010

how to change / fix the root password in MySQL First: If you install MySQL through an X-window GUI application, like System >> Administration >> Add-Remove Software, then, it will install without prompting, and the one mysql user that is created, "root" will have a blank password. From a terminal command line, type $ mysql -u root -p Enter password: [just hit enter...

Read more »

two online PHP tests

August 25, 2010

This is information for some on-line PHP tests: Even when you’ve been developing in PHP for a few years, a valid concern is whether an exam asks questions that are tricky or obscure. If so, you can miss questions on topics that you understand very well. Here are some obscure bits of information from just such a php test. int xml_parse ( resource $parser,...

Read more »

Function: Convert Numbers to Words

August 8, 2010

This little, recursive, script is to convert a number, an integer, to words. It has an upper limit of 999,999,999 but you can expand or reduce it from there. Put the function in your include file and try it out. /* * Function: number_to_words * Description: recursive numerics to words function * Converts a given integer (in range , inclusive) into * alphabetical format...

Read more »

SQL: from WHERE to HAVING

June 22, 2010

WHERE filters results before they are grouped. HAVING filters results after they are grouped. correct: count players by team: SELECT COUNT(*) count, plheight_ft FROM ALplayers WHERE plheight_ft = 6 GROUP BY plheight_ft ORDER BY count error: SELECT COUNT(*) count, plheight_ft FROM ALplayers WHERE count = 6 // 1 ORDER BY ckname ( — o.k. — I saw 7 dups.(2 each) ) now, to see...

Read more »

computer cartoons

May 25, 2010
computer cartoons

Just for the fun of it: from www.userfriendly.org see www.calvinandhobbes.me this is so old, I don’t remember where it came from:

Read more »

Syntax Check a PHP Pgm

May 14, 2010

Be sure your error reporting is turned on: (for your testing copy or for your IP address) @ini_set('display_errors', '1'); error_reporting(E_ALL ^ E_NOTICE); If it is and you still get nothing but a blank page … then, by all means, your next step might be to take the syntax check option built into PHP! From a linux/unix command line (terminal session), run php with its...

Read more »