Browsing articles from "June, 2011"
Jun
12

Build and install APC extension on Mac OSX 10

By Luc  //  Mac, Php, Programming, System  //  5 Comments

If you tried to install the APC extension on the MAC and got the following error:

pecl mac error: ‘apc_regex’ has no member named ‘nreg’

The problem is that APC depends on the PCRE library and we need to install it before compiling APC. Here is how to fix it!

  • Open a TERMINAL session,  type :  mkdir  temp
  • Head up to this page and download a PCRE library (try to use the latest one). I took pcre-8.12.zip, put the file inside the temp directory
  • uncompress the PCRE archive via Finder (or any other way)


cd  pcre-x.xx replace x with the version number (example: cd  pcre-8.12)
./configure
make
sudo make install

  • now download the latest APC release (link here)
  • uncompress the APC archive via finder  (or terminal by typing    tar zxf  APC-X-XX  replace X with archive name and version number )
  • type

cd ~/temp/APC-3.1.9    (change the version number if you're using something different)
phpize

./configure
make

sudo make install

you should see something similar to this when it’s done compiling

Installing shared extensions:     /usr/lib/php/extensions/no-debug-non-zts-20090626/
Installing header files:          /usr/include/php/

 

Modify your php.ini file to have the extension loaded at php startup

  • Open /private/etc/php.ini   (in Finder, select GO menu, select GO TO FOLDER and type /private/etc)
  • add this line in the Dynamic extensions area

extension=/usr/lib/php/extensions/no-debug-non-zts-20090626/apc.so

Restart the web server (reboot your machine if your lazy, or go into the System preferences, click on Sharing, un-select Web sharing , wait a few seconds and select it again )

You’re done, congrats!

 

Note:

There is a bug in version APC 3.1.9  :-)

if you get error

Fatal error: Unknown: apc_fcntl_unlock failed: in Unknown on line 0

Relax! just modify the file apc_lock.h inside the APC folder you created. Edit the following line around lines 155-160

Find the following:

# define apc_lck_rdunlock(a) apc_fcntl_unlock(&a TSRMLS_CC)

Replace by the following

# define apc_lck_rdunlock(a) apc_fcntl_unlock(a TSRMLS_CC)

 

Recompile APC by doing:

cd ~/temp/APC-x-xx (replace X with version number) make clean phpize ./configure make sudo make install

And restart your web server! Too easy !  enjoy!

 

 

Jun
11

Canceled TV series not to buy on DVD or Bluray!

By Luc  //  Entertainment, Movies  //  No Comments

I’m building a list of TV Series that got canceled, it’s a waste of money to buy any of the released seasons since you will never see the end for any of these shows:

SYFY
Caprica
Stargate Universe
WWE NXT

ABC
All My Children
Better With You
Brothers & Sisters
Detroit 1-8-7
Invasion
The Gates
Mr. Sunshine
My Generation
No Ordinary Family
One Life to Live
Scoundrels
Secret Millionaire
Skating With the Stars
Supernanny
V
The Whole Truth

NBC
100 Questions
Breakthrough With Tony Robbins
The Cape
Chase
The Event
Friday Night Lights
Last Comic Standing
Law & Order: LA
Outlaw
Outsourced
The Paul Reiser Show
Perfect Couples
Persons Unknown
School Pride
Undercovers
Who Do You Think You Are?

FOX
America’s Most Wanted
Breaking In
The Chicago Code
The Good Guys
Human Target
Lie to Me
Lone Star
Running Wilde
Traffic Light

CBS
As the World Turns
The Bridge
CHAOS
Criminal Minds: Suspect Behavior
The Defenders
Live to Dance
Mad Love
Medium
$#*! My Dad Says

 

Jun
8

Fixing VLC and NVidia color profile

 

If you have an NVidia card, I recommend you to change a setting on your Nvidia control panel as soon as possible.  I was often using VLC to play back movies and was puzzled why the black were pictured as dark grays.

 

 

 

 

 

 

 

The picture on the left is greyer and the picture on the right has better contrast. The explanation is that the color palette on our generation of video cards are based on 4 color components ranging from 0 to 255. No every screen is able to reproduce the entire color spectrum so it was a normal practice to limit the range to values between 16 and 235. So instead of having a darkest color with a value of 0 (which gives black), you end up having a darkest color with a value of 16 which is dark grey.

 

You can easily fix this yourself, just go into Windows Control Panel, and click Appearance and Personalization

Click Nvidia Control Panel

Click Adjust Video Color Settings

 

Click on Advanced

Click on Limited (16-235) next to the Dynamic Range

Change it to Full (0-255)

Click Apply and your done..

You should see a difference if you use a software like VLC. Some software seem to bypass the NVidia control panel and they doesn’t have this issue.