March 30, 2010
Follow along as I learn all about Git, a revision control system, and begin implementing it for all our company’s projects, on the Windows operating system.
This is the first installment of the series.
Up until now, we’ve been using subversion as (centralized) revision control system – a.k.a version control, source control or source code management, together with TortoiseSVN as we’re on Windows.
I knew that we weren’t using subversion correctly, as we had never once created a branch. Shocking, I know. But we had more important things to spend our time on, and the way we had been using it was enough for then. So I recently started looking into how to use subversion properly. I was looking around for other solutions as well, especially as subversion is pretty darn slow. Which ultimately led me to Git, a very popular distributed (in contrast to centralized) revision control system created by Linus Torvalds, the Jedi behind Linux.
February 24, 2010
I created a restricted file download area for a client website, for their clients to download spreadsheets from their site. A problem arose where I got an error message (in Windows) when opening the file directly in Internet Explorer 6, and choosing ‘open’ instead of ‘save’ on the File Download popup. But when opening the same link in Firefox, it opens successfully! This is the error message one gets:
‘C:\Documents and Settings\\Local Settings\Temporary Internet Files\Content.IE5\’ could not be found
It also seems to be an issue in some other Microsoft software (such as Outlook) as well. The error was not given in Internet Explorer, but in whatever program is set to open the file, such as OpenOffice or Excel. The error message differs a little according to the program used, but the problem is that the temporary file cannot be found.
March 4, 2009
I’m working on a wamp system, and have started playing around with sockets. I enabled sockets via the wamp interface:
wamp : PHP settings : PHP extensions : php_sockets
and could run my php file via my browser.
When trying to run the same file via the command prompt (start : run : cmd), I got the following error:
Fatal error: Call to undefined function socket_create() in … on line …
February 19, 2009
According to the MySQL manual
Full-text indexes can be used only with MyISAM tables
I’m using an InnoDB table-type however, so had to look at other ways of implementing a full-text search that would give me rankings by relevance, to order the results by.
It’s possible to do the ranking with PHP, by doing a
LIKE '%term%' MySQL query and then doing a substring count for each search term, but I believe that doing it via MySQL would be faster, and way cooler.
February 19, 2009
I was setting up a database query using a PDOStatement, by looping through an array of values and binding each parameter seperately. But on executing the query, I got the following error:
Fatal error: Uncaught exception ‘PDOException’ with message ‘SQLSTATE[HY000]: General error: 1452 Cannot add or update a child row: a foreign key constraint fails (`places/places`, CONSTRAINT `places_ibfk_3` FOREIGN KEY (`login_id`) REFERENCES `login` (`id`) ON DELETE CASCADE)’ in G:….
February 18, 2009
I just got WAMP and SVN up and running again after having re-installed Windows. Then under my localhost – http://localhost/ – only my SVN directories wouldn’t show at all under the directory listing.