Permission Denied - PHP On IIS

Hello there,

Have you ever tried to upload a file with php on IIS? or maybe just copy or create a file on a certain folder? Well, I’ve been trying to do that for a while, but it was returning:


Warning: [function] - Permission denied in [my code].

On Windows Server 2003, it’s not an issue and the user can figure out the solution easily by opening the properties of the folder and working with the security tab which I’ll explain later on.

On the other hand, Windows XP users have that security tab hidden. I kept on unchecking the Read-Only, but it was rechecked automatically! The trick is to show the Security Tab in the properties window of the folder. Continue reading »

UTF-8 Support in PHP and JavaScript

When I was developing phpLiveTalk, I wanted to send some URL encoded text in the AJAX response. I encoded the text using urlencode() php function, but the decoding on the client side (JavaScript) was an issue!

Why?

The JavaScript unescape() function does not understand the ‘+’ (Plus) in the encoding of ‘ ‘ (Space). Actually, it should be %20. So why not replacing all the + with %20 then unescape()!!!

Bingo… Solved.

Here’s the code you may use:

message = unescape(replaceAll(message,'+','%20'));

function replaceAll( str, from, to ) {
    var idx = str.indexOf( from );
    while ( idx > -1 ) {
        str = str.replace( from, to );
        idx = str.indexOf( from );
    }
    return str;
}

Good Luck!

phpLiveTalk on sourceforge

I’ve been working for a while on phpLiveTalk. A cross browser chatting engine developed using AJAX techniques and php/mysql on the server side…

Here’s the development page: http://www.phplivetalk.com

I decided to have a project page on sourceforge.net maybe I can get in touch with few contributors… If you wanna contribute, leave a message.

DEDICATED SERVER WOULD BE VERY HELPFULL (help needed!!!)

see ya later…