Eli : Memcached, MySQL, Highcharts

Tag - windows

Solve Wrong permissions on configuration file, should not be world writable! error on phpMyAdmin

Introduction

phpMyAdmin want config.inc.php to be not world writable, it's sound simple, but not if you run phpMyAdmin from an NTFS filesystem (in my case, linux server who mount a Windows folder) it's not that simple. There are two way to solve this problem :

Simple way, Linux Server, Linux Filesystem

Just chmod 0755 the file

chmod 0755 config.inc.php


Linux or Windows Server, NTFS Filesystem

If like me you run a Linux Virtual Machine who mount a Windows folder where phpMyAdmin sources are located, edit config.inc.php and add this line :

$cfg['CheckConfigurationPermissions'] = false;

This will tell phpMyAdmin to stop checking for fileperm because they can't be properly detected.

Hope this help

Friday, October 15 2010

Various versions of Memcached for Windows

This post contains various binaries versions of Memcached for Windows as finding some of them may be difficult.

Memcached 1.2.X

Memcached 1.2.4 for Windows (32 Bits) : memcached 1.2.4 win32.zip

Memcached 1.2.5 for Windows (32 Bits) : memcached 1.2.5 win32.zip

Memcached 1.2.6 for Windows (32 Bits) : memcached 1.2.6 win32.zip

Memcached 1.4.X

Memcached 1.4.2 for Windows (32 Bits) : memcached 1.4.2 win32.zip

Memcached 1.4.4 for Windows (32 Bits) : memcached 1.4.4 win32.rar

Memcached 1.4.5 for Windows (32 Bits) : memcached 1.4.5 win32.zip

Memcached 1.4.5 for Windows (64 Bits) : memcached 1.4.5 win64.zip

Credits

All credits goes to Jellycan for 1.2.5 and 1.2.6 and Northscale (now Membase) for 1.4.X.

Other Memcached Resources

You can find a lot of Memcached resources on this Memcached resources page.

Tuesday, October 5 2010

Solve svn : This client is too old to work with working copy error without upgrading Subversion

At work we use two different major version of Subversion : 1.5 for our own repositories and 1.6 for everything that come from others repositories (Apache, Google Code, ...).

Reason is that we do not have time to upgrade to Subversion 1.6, and we cannot commit to Google Code without 1.6 client.

svn: This client is too old to work with working copy

It's dangerous to use 1.6 client with 1.5 working copies because Subversion 1.6 working copy format was upgraded from 1.5, this means that :

  • 1.5 and older Subversion clients will not be able to work with working copies produced by Subversion 1.6
  • Working copies are upgraded automatically
  • We get a svn: This client is too old to work with working copy message too often

Recently we made two mistake using Tortoise SVN and Subclipse for Eclipse Helios newest version in two different places, a linux server via Samba, and my Windows computer.

Nobody is able to work with theses upgraded working copies, getting this message

svn: This client is too old to work with working copy '.'.  You need
to get a newer Subversion client, or to downgrade this working copy.
See http://subversion.tigris.org/faq.html#working-copy-format-change
for details.


Working copy format change with Subversion 1.6

Subversion becomes Apache Subversion in 2010, let's check the new documentation URL on subversion.apache.org.

Sometimes the working copy metadata format changes incompatibly between minor releases. For example, say you have a working copy created with Subversion 1.4.4, but one day you decide to try out Subversion 1.5.0. Afterwards, you attempt to switch back to 1.4.4, but it doesn't work — it just gives the above error.

This is because 1.5.0 upgraded your working copy format to support some new features (in this case, changelists, the keep-local flag, and variable-depth directories). Although 1.4.4 doesn't know anything about these new features, it can at least recognize that the working copy format has been upgraded to something higher than it can handle.

Subversion team distribute a Python script that can downgrade working copies safely because this automatic upgrade behavior can be annoying.

Linux part : change-svn-wc-format.py Python script

Download and installation

We need to first download the change-svn-wc-format.py script

wget http://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/change-svn-wc-format.py

Then don't forget to give execution right to it

chmod +x change-svn-wc-format.py

Testing if everything work by checking the help

 ./change-svn-wc-format.py --help
usage: change-svn-wc-format.py WC_PATH SVN_VERSION [--verbose] [--force] [--skip-unknown-format]
       change-svn-wc-format.py --help
Change the format of a Subversion working copy to that of SVN_VERSION.
  --skip-unknown-format    : skip directories with unknown working copy
                             format and continue the update

If you don't see this message, you probably got a Python error, this script use Python 2.X, check Google to help you on this subject as i'm not a specialist on it.

Downgrading working copy

I want my working copy to be downgraded to Subversion 1.5 and to see what happen so let's use this command :

./change-svn-wc-format.py /my/broken/WC/path/. 1.5 --verbose

I strongly suggest you to use --verbose, because using change-svn-wc-format.py in a path that does not exists say that ... it worked.

./change-svn-wc-format.py /this/path/does/not/exists/. 1.5
Converted WC at '/this/path/does/not/exists/.' into format 9 for Subversion 1.5

Now on a real working copy

Processing directory '.'
Parsing file '/my/broken/WC/path/.svn/entries'
Updating file '/my/broken/WC/path/.svn/format'
/my/broken/WC/path/.svn/format does not exist, creating it.
Checking whether WC format can be converted
Writing WC format
[...]
Writing WC format
Converted WC at '/my/broken/WC/path/' into format 9 for Subversion 1.5

A simple status command to check everything :

svn status -u
Status against revision:    604

It worked !

Windows part for change-svn-wc-format.py

Python download and installation

Subversion script use Python 2.X, so download it from this download page, then install it.

Add Python directory (C:/Python27 here) to your Windows environment variable "Path", open Control Panel > System > Advanced Panel > Environment variables > Path > Modify.
A screen in a french Windows XP can help you /blog/public/windows_python_env_path.png.

Download and test change-svn-wc-format.py

Open http://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/change-svn-wc-format.py and "Save As" the script on your computer.
Then open a DOS command prompt windows and execute this command to check correct python installation

python change-svn-wc-format.py --help

If you 've got the following message your are using Python 3.X and you need to install Python 2.X

  File "change-svn-wc-format.py", line 99
    except UnrecognizedWCFormatException, e:
                                        ^
SyntaxError: invalid syntax

Both version can be installed at the same time, but only one can be put in Windows environment variable "Path" or you can try the conversion tool for Python 2.x code from 2to3 tools.

Downgrading working copy

Open a DOS command prompt windows then execute

C:\>python change-svn-wc-format.py c:/my/broken/working/copy 1.5 --verbose
Processing directory 'c:/my/broken/working/copy.'
Parsing file 'c:/my/broken/working/copy.svn/entries'
Updating file 'c:/my/broken/working/copy/.svn/format'
[...]
Converted WC at 'c:/my/broken/working/copy' into format 9 for Subversion 1.5

Again I strongly suggest you to use --verbose using change-svn-wc-format.py in a path that does not exists say that ... it worked.

Hope that after losing hour after hour we finally get some green light to upgrade Subversion.

Monday, September 20 2010

Tricks to speed up Eclipse Helios, PDT, Eclipse Juno, Eclipse Indigo or Eclipse Kepler

logo-eclipse-helios.png

Eclipse can be slow, very slow, here's some quick steps to increase Eclipse speed.

Download the latest version of Eclipse and Java

You must upgrade to the latest version in the official Helios download page
A note of the latest version of PDT that make interesting changes, check this page to know more about them.
Upgrading Java Virtual Machine is also essential.

Eclipse PDT Configuration

Add more RAM to Eclipse

Open configuration file eclipse.ini in your Eclipse installation folder, then add more memory, and restart.

--launcher.XXMaxPermSize
512M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms256m
-Xmx512m

Maybe buying more RAM for your computer can help if you have a lot of applications launched at the same time.

Disable Eclipse validators

By default, all code validators are running, go to Windows > Preferences > Validation and uncheck validators you don't need.

Disable Plugins you won't use and startup builds.

Go to Windows > Preferences > General > Startup and Shutdown and uncheck plugins you don't need.
Don't forget to disable startup automatic builds.

Disable Eclipse PDT automatic build

Go to Windows > Preferences > General > Workspace and uncheck build automatically.

Eclipse Helios use

Close any open PHP projects not used

Open project are refreshed, build, and validated even if you don't use them, right-click on Project > Close project, this will free some memory.

Make your projects smaller and create multiple small PHP projects instead

Having a whole big project is not a good idea, divide them into smaller project, and close the one you don't use or you don't need.

Avoid project on network disk

Network disk latency and slow access can really slow your eclipse, especially if you don't have disabled builds, use a version control system and checkout it on your local disk.

Defragment your local disk

Simple isn't it.

Feel free to comment or add your own tips.

Wednesday, August 25 2010

Memcached 1.4.5 for Windows



Update 2013 : Memcached Windows Build from 1.2 to 1.5

You can find other various build of Memcached for Windows on this post




NorthScale has built and posted packages of Memcached server version 1.4.5 for Windows to the community.

New Features of version 1.4.5

  • reclaimed : This stat reports the number of times an entry was stored using memory from an expired entry.
  • sasl_pwdb : For more simple auth deployments


Download

You can download it from Northscale Labs http://labs.northscale.com/memcached-packages/ :

Memcached 1.4.5 Windows (64-bit) memcached-1.4.5-amd64.zip
Memcached 1.4.5 Windows (32-bit) memcached-1.4.5-x86.zip

- page 1 of 2