Mcloide's resources library

All about PHP, Javascript, concepts and development

Posts Tagged ‘windows’

New resources

Posted by mcloide on August 21, 2009

Happy Friday everybody ….

2 New resources for you to check out:

  1. Javascript Bookmarklets
  2. Zend Framework and Firebug – Log PHP warning, errors and exceptions

Don’t forget also of the PHPArch Free Webcast today about Running PHP on Windows with Hank Jansen and Zack Owens.

Have fun .. .

Posted in Javascript, PHP, Zend, development, resources | Tagged: , , , , , , , | Leave a Comment »

Context menu disable with JQuery

Posted by mcloide on August 18, 2009

I have found a ton of tutorials teaching how to disable the context menu on browsers and in all of them I have found one flaw:

Does not work with Opera

It’s an anoying situation that got me thinking and searching for a solution through most part of the day and with no luck.

The function is simple:

$(document).ready(function()
{
$(document).bind(“contextmenu”, function(e)
{
return false;
});
});

and it works with (tested):

and it does not work with (tested)

After a lot of research I have found why it does not work with Opera:

Opera (9.5) has an option to allow scripts to detect right-clicks, but it is disabled by default. Furthermore, Opera still doesn’t allow JavaScript to disable the browser’s default context menu which causes a usability conflict.

You can try to disable by disabling the mousedown event filtering only for Opera, but I do suggest a lot testing on this.

To complete just an extra note: this function does not bind the documents inside an iframe, so in this case you should complete the function by disabling the context menu in the iframe document as well.

Posted in Ajax, Javascript, development, linux, resources | Tagged: , , , , , , , , , , , , , | Leave a Comment »

Test mail server tool

Posted by mcloide on May 26, 2009

The main reason why I have created this blog was to keep all my resources and libraries at one place and share them with every developer on the web.

Today I found out that one good resource that I have used for a while was not blogged. The test mail server is a simple application that will take over your mail server locally so you can fully test your applications (basic mail config). If you are developing on Windows, that’s a must have tool.

I have added the link on my Resources page, but you guys can see the original post at: http://www.tiredrobot.com/2008/11/03/test-mail-server-tool/ .

Note: This is a great blog that have the same concept that this one (that I helped and help until today), but a bit older, so you can find more stuff like this and a lot more stuff for Flex programming.

Have fun.

Posted in PHP, development, resources | Tagged: , , , , | Leave a Comment »

Multi-plataform development notes

Posted by mcloide on January 13, 2009

If you have a Windows box to develop web applications and then, for production and quality, uses Unix / Linux box you should know that there are some little things that you should take care of. No need to mention the fact that on Unix / Linux everything is case sensitive and on not on Windows (even knowing that Apache threats everything as case sensitive on Windows) is the number one thing that can break if you are migrating from Windows to Unix / Linux, but there are some functions that might work differently and break if you don’t take a more chirurgical look.

For a smart and small example take a look on the mkdir function from php. All you need to do is enter the path, writing mode (chmode) and if is recursive. On a Windows box if you enter something like mkdir($path,’0777’,true) or mkdir($path,0700,true) it will create the folders in the path but will as well set them as writable, even if you said not to, but on Unix and Linux that would not work.

Take a look on the first function, mkdir ( $path , ‘0777’ , true );

If you set your script to create the folder path like this in a UNIX box, it will be created, but the permissions will be wrong. The second argument for the function is an integer and not a string, therefore the permissions would not be created correctly and if you tried to upload a file to the directory, it would fail on permission denied. On a Windows box this is totally bypassed.

Another thing to consider is the way that Windows creates the path. If you use something like c:\path\to\root it will fail on a UNIX or Linux box. To avoid this you need simply change the back slash for the forward slash (c:/path/to/root). This will work on both platforms’.

Small cares like this can make your life way easier while developing in PHP.

Have fun.

Posted in PHP, development | Tagged: , , , , , , , | Leave a Comment »

We got a new writer

Posted by mcloide on September 18, 2008

I have got some developers asking to post other information and resources here that is not about PHP. Unfortunately that’s not my area. I’m not a great programmer in .NET, Java or even know how to manage a Windows server, considering that, I have asked a couple of friends to help me and the first one have already answered me.

I want to introduce you guys to Vlad Cruz, a good friend of mine, and a infrastructure analyst with specialty in hardware, Windows Servers and Oracle.

Soon enough we are going to have a post from him and meanwhile I will be lobbying other friends to bring more resources to the blog.

Posted in News | Tagged: , , , | Leave a Comment »