Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Sunday, August 26, 2012

Our KB project - going to Drupal

Very often we exchange tips with colleagues and partners. Things like do you have an example in OpenERP of a search / function field etc

Simply, we exchanges these by e-mail. Best of them go in mail folders.

When working on windows I am using OneNote (great MS office app with IMHO no open-source close equivalent).

I think these e-mails represent valuable material. Good for us during projects, but may be good for other people. So I decided to setup a knowledge-base web site where we can easily store and publish tips and code snippet.

My intention is to use Drupal instead of my usual Joomla. There are 2 keys reasons:

  • Taxonomy : in Joomla the section/category is limited and makes impossible to classify articles. World is not a 2 levels tree - n level (Joomla 2.5) is not better. What I am waiting for since at 7 years: be able to put 1 article in multiple categories... E.G python / openerp / query / partner etc
  • Front-editing : I just want to be able to login and change , cut and paste articles directly. The separation between the site and the admin may give security feeling for a classical site but is clear not appropriate for a community sharing site. 
Installing Drupal 7 is as easy as with Joomla.

Creating content-type is also easy to manage. In Drupal 7 the so called CCK is now a core module. One click and you are done.

However my first snippet post was disappointing... All the alignments are lost. Well for python samples with indent being semantically import the result was not that bad.

2 google search later? I found a Geshi filter module. Well a drupal module using a PHP library called GeSHI.

http://qbnz.com/highlighter/index.php

Much better than simply keeping indentation. It hilight source code syntax with colors for an incredible number of languages.


This is were  hughe communities of coder are incredibly good - thanks to all Drupaler and PHP guys and of course the GeSHI autors - you are great and you did my day !

Tuesday, March 09, 2010

PHP5 installing xdebug on Ubuntu

Just to remember...

sudo aptitude install php5-xdebug

Monday, September 21, 2009

Back to Joomla - Cake -PHP

So after a long Open ERP period I am back to the Joomla world.

Almost a year ago I setup for one customer an application built around JQuery and Cake PHP. A bit later the customer asked for a web site which has been built with Joomla. It would be perfect if the the web site and the application could share the same look and feel. I feel a bit faulty : at that time using Cake was for the simplest way (for me) to structure a small PHP app... but I did not plan anything concerning the web site - at that time his web site was made (by somebody else) with Wordpress - excellent for making a blog but terrible for making a web site...

My first steps today are basically to get back a development environment, the web site, (joomla,db...) the app etc. As usual I use Netbeans, here 6.7 - the PHP support is now stable and official.

Following Netbeans recommendation, I picked XAMPP (http://www.apachefriends.org) to install PHP and MySQL - I am working on my HP XP portable (Paddle).

After having transferred the web site I got an error message in a few modules positions. I then restarted a fresh Joomla install - same result.



Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a reference, value given in C:\xampp\htdocs\joomla\libraries\joomla\cache\handler\callback.php on line 99

Basically Joomla 1.15.xx is not compatible with PHP 5.30 (which comes with the currently latest XAMPP 1.7.2). So you need to get an older PHP version, thus an older XAMPP. Older release are not on the same site, so you need to go to http://sourceforge.net/projects/xampp/files/ to find what you need. I decided to go for 1.6.8 to be sure to get rid of PHP 5.30. Unfortunately I then hitted another issue with phpMyAdmin the MySQL tool I cannot live without...


Too bad. I did not investigate that one, I de-installed XAMPP again. So I moved to 1.7.1 which installed PHP 5.2.9. Proceeding with dichotomy for finding release that's the job I am in...

It is now working (after a small battle for setting up a user and a password).


The rumor says that this will be fixed with Joomla 1.5.15 to be released soon (october).

One more time, I regret the Java platform. Some so called Agile programmers believe that their productivity decrease because of compile cycles, I am laughing at that. These compile times represent little amounts of time for most programming jobs. For me, the Netbeans background compiler removed this concern entirely.

The key point for the pro-compiler camp is this for me : the semantic analysis is a job for developers not for users. When a code is compiled with Java 1.4 it runs on 1.6 just because the VM are backward compatible at the VM level and in spite the language continues to evolve. Language changes do not impact the compiled and so you can keep your olfd stuff working as designed on a recent platform.

At this stage the two interpreted language that I used exhibited the same poor facilities to handle changes in the language itself  : PHP & PYTHON.

So I move back to my stuff and still continue dreaming of the perfect environment for my job...

Monday, April 14, 2008

Netbeans 6.x as a PHP IDE

As I am currently working with a PHP written CMS - Joomla - I tried the new beta plugin for Netbeans. With this extension you can create PHP projects and get code completion. Debugging in the IDE is possible provided you install the xdebug extension on the server.

As usual the Linux distribution is done through source code, it tooks me around 20 minutes to get the build process up and running. Debugging worked fine for simple application but for Joomla the debugger started but the resulting page was always blank.

I finally give up and used Wamp server on windows, there is worked perfectly. I still don't know why I can't get it up and running on my Linux machine. Among the difference : wamp comes with php 5 per default.

Links
The extension for PHP editing in Netbeans : php.netbeans.org.
Debugger for PHP : www.xdebug.org.
Apache + PHP + MySQL : www.wampserver.com.