Skip to main content

Posts

Showing posts from 2008

CakePHP security issue - even in thechaw.com (written by core dev)

CakePHP security issue

Recently I have stumbled upon thechaw.com--written by CakePHP core dev and developed in CakePHP. I just wanted to check if they have fixed the old security issue in CakePHP and found that the issue is still open.

Proof of concept



CakePHP memory error

In another time, found a famous memory error even in bakery.cakephp.org



Bottom line

CakePHP is open source and so you can fix these issues by yourself

Save American College, Madurai

This post was written in 2008 and outdated now. For update, please check Save American College, Madurai (Update 2011)

Update (2011-01-16): Save American College, Madurai (Update 2011)

I'm highly privileged to have 3 degrees (B.Sc. (Spl. Physics), PGDCA and MCA) from The American College, Madurai, South India. Unlike other "commercial" colleges, American College has given room for poor students and uplifted them. And unlike other "elite" colleges who'd give seat only for "intellectuals", American College has produced geniuses.

In the recent months, the saddening thing is that the college is under divide (Principal Vs. Bishop). Here is the email I sent to alumnae lately informing about the informations that I received about the developments:


Update (2011-01-16): Save American College, Madurai (Update 2011)

All:

I was thinking that the "Save American College" campaign was a FUD. But, when I tried to understand the problem through my friends, i…

Rasmus Lerdorf's humbled LinkedIn profile

I recently stumbled upon Rasmus Lerdorf's (creator of PHP) profile in LinkedIn. His profile humbly reads "Developer at PHP".

On the other side, I also stumbled upon
John Resig's (creator of jQuery) profile in LinkedIn. His profile reads "Creator, Lead Developer at jQuery JavaScript Library".

I'm really surprised by Rasmus Lerdorf's humbleness which reminds me of Dr. Dennis Ritchie's (creator of C) humble email to me. Long live Rasmus Lerdorf and his humbleness.

Solved: Safari Flash full screen issue

Some common problems when trying to use Flash video embed code (e.g., YouTube like embed code)

1. When using lightbox on the page, it's getting hidden behind the Flash video player

Solution: Add wmode="transparent" to the embed tag

2. On IE7, getting "click to activate"

Solution: Inject the embed code through JavaScript. (Useful libraries: jQuery Flash Plugin, SWFObject)

3. XHTML validation issue

Solution: Use unobtrusive JavaScript embedding. (Useful libraries: jQuery Flash Plugin, SWFObject)

4. On Safari the full screen doesn't work -- even if we add allowfullscreen="true" (this is the issue I faced lately and google wasn't helpful). In all other browsers, it works fine.

Solution: Add type="application/x-shockwave-flash" to the embed tag

Problems with CakePHP - follow-up

Some people have responded including the Datepicker fame Marc Grabanski. So, this follow-up...

First of all, I was not ranting nor complaining; I've just blogged/documented my experience.

The common problem most of the people pointed out are that it scales for addons.mozilla.com. Those who have accessed their source code can understand that they've done lot of things and also the site is not database-intensive. You should really create a real database-intensive website to understand what I mean.

The other point that been pointed out is about open source and community. Lot of people may not be knowing that it's 2 people pushing it and don't want others to be credited. The generic model or dynamic model idea was originally been from grigri and Marcel. It's hard to be called as open source as only few and sycophants are driving it's direction (I'm not talking about svn access)

So, here are my humble checklist before you start shouting at me

Did you read and underst…

Open source PHP frameworks and problems

I was using CakePHP for sometime and proposed CakePlus, another UIMS toolkit on the top of CakePHP but also altering some problematic core of it. The thread should explain the outcome of the post. And, then I noted Akelos framework has most of the things built in.

Issues with frameworks esp. CakePHP

Scalability not a priority - Developers aren't aware that we can't throw more and more hardware
Excessive use of regular expressions
Evangelist isn't aware that the framework throws many queries unnecessarily
More memory consumption - 100M would never be enough for a simple project
Poor coding standards and practices - Prolong use of extract() often leads to more memory consumption
Can't use the native approaches or baked codes. The override approach always lead to hard to debug codes
Poor architected codes and no clear defined approaches. People belong to the cult drives the direction and often throws unprofiled codes. No native provision to share codes between M-V-C and no distin…

Working with Jeremy Zawodny, Alan Knowles, Cal Henderson

My life and career are full of surprise...


I wanted to work in film direction
Wanted to work in AT&T Bell Labs with Dr. Dennis M. Ritchie (creator of C)
Wanted to work in Borland with the great developers of Delphi

But, none of these dreams came true. And, after 6 years of my career into Web Application Development, I informed the company about my humble desire to work with the great minds I came to know through internet--to see if the company can offer employment for them: Jeremy Zawodny, Alan Knowles, Cal Henderson. Peter (who is actually from UK), who approached them updated me that Jeremy cannot join the company due to his marriage and Alan feels that the company may not offer the international salary.

And, my dreams are just dreams!

If anyone wants to work with me, ping me through LinkedIn

Track previous link of a site in PHP

I just spotted through Google that Raj Shekhar has quoted my post to comp.lang.php in his Blog Ideas page:

mr_burns wrote:
> Is it possible to get the previous url. For example, if I am on page
> page01.php - and I then click to - page02.php - from page02.php, can
> use script to determine that I have come from page01.php? It doesnt
> have to be the entire url, even just the file name. Cheers

Add this line in the beginning of every script or possibly using a
global-common include file say config.php

output_add_rewrite_var('referer', htmlspecialchars($_SERVER['PHP_SELF']));

www.php.net online manual user notes contributions

Sometime ago I had lot of interest in contributing to the www.php.net online manual's notes. Thought lot of them are deleted now and not even relevant now, I'd thought of archiving them for my own reference:

http://www.php.net/ref.pdf#32797
Date: 7 Jun 2003 06:42:11 -0000

If you want to create PDF without using PDFlib library, you may try FPDF ( http://www.fpdf.org ).

If you want to know, how to use FPDF in PHP scripts, you can look at the source code of phpMyAdmin as phyMyAdmin uses this FPDF. ( http://www.phpmyadmin.net )

http://www.php.net/ref.array#32969
Date: 12 Jun 2003 11:32:58 -0000

If you want to remove a particular element from the array without loosing the keys, you can use the following function:


function RemoveArrayElement($arr, $element)
{
if (($key=array_search($element, $arr))!==false)
unset($arr[$key]);
return( $arr );

}/*---------RemoveArrayElement()----------*/



Example:


$arr = array("a","b","c","f","x","d&quo…

"A to Z of C" book turns 5

A to Z of C, the DOS/Turbo C programming book written by K. Joseph Wesley and myself turned 5 on August 1.

Initially, we felt bad for spending our time in writing a book that were rejected and deceived by publishers. Now we get quite reasonable appreciations from people around the world--even though it's having technical and grammatical errors. Long live the internet publishing!

Probably a time for "A to Z of PHP" ?