blog / Matthias Vanneste

Icon

PHP 5.3.0 and AMFPHP

Anyone who is messing around with amfphp and has updated their PHP to version 5.3.0 or updated their Wampserver to version 2.0i, using PHP 5.3.0,  will probably have encountered the following warning message :

Function eregi_replace() is deprecated

The error message is thrown because since PHP 5.3.0 the function eregi_replace(), used in one of the amfphp core php files, has indeed become deprecated.

This warning message will not only get thrown when using amfphp, any use of the eregi_replace() function will of course trigger this warning.

For those who are not that familiar with the term “deprecated” , it means that the function has been put out of use because there is a better equivalent now. The function still exists and works but the people of PHP would like it if you stop using it so they can let it slowly disappear.

You can do two things about this small problem :

  1. Change the settings in your php.ini file to disable the deprecated warnings.
  2. Replace the php code in that specific amfphp core file, using the new equivalent function.

I suggest you do the second, but either one works. The first solution is not ideal because it will prevent PHP from throwing any warnings concerning notices and coding standards. Some of these are useful when developing.

1. Change the php.ini file

Locate the php.ini file, you will normally find the php.ini file in the bin directory of your webserver. If you are indeed using Wampserver, you can easily open your php.ini file by clicking the wampserver icon in your tray and selecting PHP > php.ini . This will open the php.ini file in your text editor. Now search (you might want to use the search function) for “error_reporting =”. This will be set to the default value which is “error_reporting = E_ALL”. Changing this to “error_reporting = E_ALL & ~E_NOTICE” will prevent PHP from throwing warnings concerning notices and coding standards. Only the errors will get thrown. Now save and close the php.ini file and restart your server.

2.Change the deprecated code

This example is only suitable in the case of amfphp and wampserver, of course the method of changing the deprecated code will work in other cases as well. You can use this code as an example to alter the deprecated code in other cases.

So, in the case of amfphp the deprecated code is located in the MethodTable.php file. At line 505 to be exact. You will find the MethodTable.php file at “C:\wamp\www\amfphp\core\shared\util\” , assuming your wampserver is placed at the root of your C drive and amfphp at the root of your webserver. Anyway, when the warning message gets thrown, the exact location of the MethodTable.php file is mentioned. When found, open the MethodTable.php file in an editor and alter the following.

Go to line 505 and remove, or comment, the following lines of code :

$comment = eregi_replace(“\n[ \t]+”, “\n”, trim($comment));
$comment = str_replace(“\n”, “\\n”, trim($comment));
$comment = eregi_replace(“[\t ]+”, ” “, trim($comment));

$comment = eregi_replace(“\n[ \t]+”, “\n”, trim($comment))
$comment = str_replace(“\n”, “\\n”, trim($comment));
$comment = eregi_replace(“[\t ]+”, ” “, trim($comment));

Then replace it with the following code, using the equivalent function preg_replace() :

$comment = preg_replace(“`\n[ \t]+`U”, “\n”,trim($comment));
$comment = str_replace(“\n”, “\\n”, trim($comment));
$comment = preg_replace(“`[\t ]+`U”, ” “,trim($comment));

Save and close the MethodTable.php file. Restarting your webserver is not necessary but is a good idea.

These solutions should have resolved the deprecated eregi_replace() issue.

Code on !

Filed under: Uncategorized ,

Microsoft looking for extra forces to tackle Google ?

Microsoft has made a bid of 837 million Euro for the Norwegian software company Fast Search and Transfer (Fast). The Scandinavian company is specialized in search engines.
The board of direction of Fast has unanimously agreed to Microsofts offer. The take-over should be completed in the 2nd kwarter of 2008.

Is Mircosoft looking for some support in their battle with search engine world leader Google?

Filed under: Mircosoft

Adobe Beyond Boundaries

herhie, herhie !

For every Belgian Flex, AIR or Flash developer/designer: Adobe Beyond Boundaries in Brussels on Wednesday 10 Oct 2007 starting at 10:00 am until 5:30 pm. And this in the SAP lounge 16F, generaal wahislaan in Brussels.

The speakers list? Quite impessive :

0.00 am – 11.00am Introduction to ActionScript 3.0 Sakri Rosenstrom
11.00 am – 11.45 am Flash CS3 components unraveled Serge Jespers
Break

12.15 am – 01.00 pm Styling Rich apps with FL, PS, AI and FW Serge Jespers
Break

02.00 pm – 03.00 pm ActionScript 3.0 Sakri Rosenstrom
03.00 pm – 03.30 pm Flex Builder 3 Danny Dura
Break

04.30 pm – 05.30 pm Rich desktop apps with Adobe AIR and Flex Danny Dura

For more info and subscribing see adobe.be and click events.

See you there ?

Greets !

Filed under: Uncategorized

Are web-based desktop apps – SaaS getting more serieus ?

Today I read an article about, the originally French constultancy company, Capgemini partnering with Google to support Google’s Apps Premier. Capgemini will provide training, support, integration, and other services to large organizations that implement Google Apps Premier.

 Appearantly this fact made a lot of rumours run in IT land. Specially a lot about the possible down fall of MS Office. Some people have already called Google Apps Premier the Office-killer. Which is to my humble opinion, a bit quick, not realistic and not objective at all.

Off course there are a lot of positive point that can be noticed about online based solutions :

+ Hardware cost reducing
As the online application is hosted on third party severs, the company does not have to invest in expensive servers to host databases and mainframes. Also the desktop pc’s used by the users of the application don’t have to be as powerfull as they are mearly terminals. The users pc is not running the application.
 

+ Administration time reducting
Online applications don’t have to be installed onto each and every user pc, the user pc’s don’t have to be maintenanced as much and the server does not need any hardware maintenance.

 + Cheap and easy collaboration and data sharing
Online platforms create and solution for data sharing and collaboration as everybody is working on the same server or server group and is working on the same platform. A much cheaper solution that similar offline products like MS Sharepoint server or MS BizTalk server but these solutions are much more extended than any available online app.

Microsoft is working on selling products like Sharepoint server as a service, reducing cost by not charging the full price to buy such a platform. This way it becomes more available to smaller companies. I for example, have worked together with a Belgian hosting company to set up some pilots of MS Sharepoint server as SaaS.

But there are also some important disadvantages about online applications :

- Security
One very important one is security. If you are using online applications, all data (confidential or not) is being send trough internet. Outside the save boundaries of the companies firewall. Not only this, the data is also hosted on a third party company. Confidential data sold to the highest bidder ?

-Downtime
You can make your servers and network as good as you want, something will always go down. Something that goes up must come down. Even IT can’t escape the rules of gravity. What happens if your entire company relies on an online platform and internet, network or power goes down ? Technically unemployed. Sure, if you rely on an offline server, hosted in your own network and network or power goes down you have the same result. But throwing internet into the equasion makes it much more unrelaiable.

Microsoft responded to the rumours about a possible Office-killer with the fact that the current amount of users of online based solutions is very vague. No independent studies have been made.
They also point out to the fact that there is no real ‘roadmap’ of Google’s online application adventure. The future of Google Apps Premier is again very vague and can Google provide continuity ? Or is Google Apps Premier just one of their side projects next to the search engine ?
MS also point to the possible fact that just having an online based platform is not enough to run an entire company, you need an offline platform as wel. So if you can do it with just an offline solution alone, why would you invest in both ? Just to get that extra flexiblility ?

For the moment, it looks like MS is going for the best of both worlds in one solutions, working together, extending each other. A bit like they are doing with Exchange server. If you run an Exchange server, you can provide an Oulook Web Acces (owa), so users can check a light version of Outlook online that is synchronised with their data on the Exchange server. But then, the service would be hosted by Microsoft.
A 55-page report from Creese, where they microscopically investigated the pro’s and contra’s of Google Apps Premier, conculded that SaaS is strong in certain areas and weak in others. For example, Creese found the suite lacking in archiving features, such as records management and electronic discovery, as well as in analytics capabilities, such as analysis of content creation patterns.

Google responded with a statement saying that the suite gives organizations “a new set of choices, many of which will complement and extend the power of the desktop, enhance group productivity and improve collaboration.”

Conclusion 
So what you realy can conclude is that online and offline applications work best as extentians of each other. Possibly the path that Microsoft will try to follow. So only time will tell, but the technology is still to young to speak of an Office-killer. And Microsoft will also adapt their products to the futur needs, don’t forget that MS has been talking a long time about online solutions (Windows Live) and even go much further, MS even thinks about online operating systems.
So Google Apps Premier will be a push in the back for Microsoft to put pace in the development of the Windows Live product line.

I wonder…

Greets.

Filed under: Mircosoft, Office, internet

Hidden flight simulator in Google Earth

Yep, we knew that Google is attempting to gain some percentage on the desktop solution market from Microsoft. Trying to undermine they long lasting monopoly (o no, did I say monopoly!). Now that Microsoft is working towards a full online working environment, Windows Live, the time is ideal for Google. Microsoft is now entering the grounds of Google. Shows that they have alot of confidence, or stupidity. Because you can’t really call there online adventure successful until now, Live Search isn’t a real hit. Instead its getting hit, by Google. And many directors have passed trying to make Live Search fly, but until now, none really have succeded.

So is Google taking first steps in preparing their attack on MS ? Because they made a (very) small version of one of MS’ better selling products, their flight simulator game. Yep indeed, never saw it ? Its hidden in Google Earth, install Google Earth (free) , run it and hit Ctrl + Alt + A and the flight simulator will start. You can choose between a F16 fighter jet and a SR22 propeller aircraft, you can select your starting point and start flying.
Well as I said, its a very minimalistic flight simulator, no cockpit or anything and very simplistic controls. Nothing for an experianced digital air pilot. But for non-flight simmers amongst us a fun thingy for the boring moments. 
The area that is of course very detailed is the ground, well as detailed as a 2D image can get. Google of course used their rather large collection of satellite photos (same as they use for Google Earth).

 Try it out, have fun with it for one hour and then never open it again. As most people I assume…

Greets !

Filed under: interesting site

Speed up your DNS

Want to surf faster but you don’t want to pay for it ?
Well, here are a couple of things you can do :

Use OpenDNS as your DNS servers.

OpenDNS is a free DNS service that provides faster DNS resolving, all you have to do is use 208.67.222.222 as primairy dns server and 208.67.220.222 as secundary server and your set !
To check if everything is ok just surf to welcome.opendns.com and if you see the welcome page all settings are ok. You can also register at www.opendns.com and use shortcuts and many more… .
For more information checkout www.opendns.com .

Add url’s to Windows’ DNS.

Windows (XP) has a DNS server of is own, only, you have to add the url’s yourself.
Navigate to your Windows folder – System32 – drivers -etc . There you will find a couple of files, one of them being hosts (no extention). If you open this file in a text editor you can add urls and the IP adress. You just have to format them like this :

(IP) (URL)
0.0.0.0 domain.com
72.14.219.191 matthiasvanneste.blogspot.com

Just make sure that there is at least one space between IP and URL. And this way you can create your own DNS. You will also find other DNS alike files like networks. Here you can add (the same priciple) internal network hosts with their IP address.

Disable Caching of negative url’s.

Your browser also caches wrong url’s for an amount of time. This slows down surfing because he will try those first, but they result in a new DNS request so time wasted. To avoid your browser caching wrong (or negative) url’s go to your register editor (run->regedit) and navigate to HKEY_LOCAL_MACHINE – SYSTEM – CurrentControlSet – Services – Dnscache – Parameters and create a new DWORD value. Give it the name “NegativeCacheTime” (without quotes) and give it the value 0. Now your browser wil hold wrong url in cache for 0 seconds, so not… This wil help speed up surfing.

Filed under: NegativeCacheTime, dns, faster, internet, opendns

Microsoft Office interactive developer map

Microsoft has released an interactive API of Office in WPF. It allowes developers to drill down into the API’s of the new Office programs, servers, services and tools. The fact that its made in WPF allowes you to visualize the new features and namespaces you need to extend MS Office and create OBA’s (Office Business Applications).

The Microsoft Office interactive developer map is made in WPF so it requires the .NET Frameworks 2.0 and 3.0 to be installed on your pc.

You can download and install the Microsoft Office interactive developer map (via Click-Once) at http://msdn2.microsoft.com/en-us/office/bb497969.aspx .

Happy exploring !

Greets !

Filed under: API, Developer, Mircosoft, Office, WPF

Joost

Joost is a new way of waching tv on the internet. You can wach a whole bunch of channels on demand. All for free ! All you need is a broadband connection and a Joost invite.

Find out more about Joost at http://www.joost.com .

And if you want an invite just comment your email to this topic or mail me your email address.

Greetings !

Filed under: internet, joost, on demand, tv

Setting up Mono

First of all, what is Mono ?
Well Mono is an open source x-platform version of .NET, runs on Mac,Linux,… and Windows of course.
Great not ? You can develop everything you want (well almost) in your favorite language!
It’s still a beta project, so not all .NET frameworks have yet been made for Mono but every most common framework is already available and new frameworks are being added constantly.

More info, an overview of the availeble framworks and contribution info you can find on http://www.mono-project.com/ .

Now, setting up Mono is not a very easy task (some may disagree). But I found a rather complete and clear tutorial to set it up on codeproject.com written by Will Senn.
You can find it on http://www.codeproject.com/cpnet/hellomono.asp .

Hopefully this topic helps you on the road with Mono, it’s an interesting alternative for Java, Cocoa,C++, …
If you wouldn’t get it running feel free to mail me for some support.

Greetings !

Filed under: .NET, cross platform, mono

Welcome I assume…

Hi,

May I be the first (and only) to welcome you to my brand new blog.
I’ll try to share my experiences in IT, which will be mainly programming, because that is what I do. I’m mainly a Visual C# programmer but I’m also doing a shitload of other programming languages as well. I like SQL very much too,Windows servers in general,Sharepoint 2007 development and x-platform develoment like Java and Mono.

For the moment I’m working as a IT consultant / development consultant in Ireland.

Greetings !

Filed under: Uncategorized