innerHTML on tbody element
JavaScript
Written by Websmurf   
Saturday, 08 July 2006
I was playing with AJAX on one of the components I'm developing for Joomla. I ran into an odd issue when I tried to set the innerHTML for a tbody element in Internet Explorer. After some searching I found out that in Internet Explorer, you can't write to certain elements using .innerHTML:

"The property is read/write for all objects except the following, for which it is read-only: COL, COLGROUP, FRAMESET, HTML, STYLE, TABLE, TBODY, TFOOT, THEAD, TITLE, TR. The property has no default value."
[ source ]


A thing to keep in mind next time...


There are 0 comments for this article. Click here to add a comment
 
Running php4 and php5 next to each other
PHP
Written by Websmurf   
Thursday, 02 February 2006
As a webdeveloper i'm running into the problems that i can only easily test in php4 or php5 and not at the same time. After some searching on the internet i found a neat way of running both php4 and php5 on the same server (windows based). I'm not going to explain how to install php4 here, I expect you to have php4 running as a module allready.

First make sure your apache server is listening on two ports on your server, for example port 80 and 81
Listen 80
Listen 81


After this, go to your virtual host section in the apache configuration.

Create a new VirtualHost section with this in it:
<virtualHost *:81>
    ServerAdmin This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
    ServerName server
   
    SetEnv PHPRC C:/php5/
    ScriptAlias /php/ "C:/php5/"
    Action php5-script /php/php-cgi.exe
    AddHandler php5-script .php
</virtualhost>


That will make apache run php5 when visiting through port 81 and php4 when visiting through port 80.
To avoid problems with php.ini files, you'd best copy your php.ini file of php4 to C:/program files/apache groups/apache and keep your php5 php.ini in C:/php5/


There are 0 comments for this article. Click here to add a comment
Last Updated ( Thursday, 02 February 2006 )
 
Installing MySQL 4.1. on Windows
MySQL
Written by Websmurf   
Monday, 10 October 2005

The compagny behind mysql have changed some things to the way MySQL stores passwords in version 4.1. Because of this, php4 will not be able to connect to MySQL 4.1. by default. Below is a way to get it working:

Run through the MySQL installation. After installation is succesfull and you've run through the configuration wizard, open the my.cnf file that is in the directory you've installed mysql. 

Add the following line at the bottom of the file:

old_passwords

This will force mysql to use passwords old style. 

Restart mysql (or your pc, that will do the same) to get it working.

After this, you will have to change the allready stored passwords to be able to connect. Open the mysql command line tool to do this:

Start -> Run -> cmd.exe

Press enter to open the command line

Then enter:

cd C:\Program Files\MySQL\MySQL Server 4.1/bin/

and press enter to go to the right directory.

Type:

mysql -u root -p

and press enter, the command line tool will ask for your root password.

After this, enter the following command:

SET PASSWORD FOR root@localhost = OLD_PASSWORD('mypassword');

Where mypassword, will be the password you want to use. Press enter to set the password. After this you should be able to connect through php. 



There are 0 comments for this article. Click here to add a comment
Last Updated ( Monday, 10 October 2005 )
 
PNG fix for Internet Explorer
CSS
Written by Websmurf   
Monday, 03 October 2005

Found a nice reference to make PNG transparenty work in Internet Explorer:

http://homepage.ntlworld.com/bobosola/

Too bad it will only replace images after they've been loaded, but it works. 

 

 



There are 0 comments for this article. Click here to add a comment
 
<< Start < Prev 1 2 Next > End >>

Results 10 - 17 of 17