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 :
- Change the settings in your php.ini file to disable the deprecated warnings.
- 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 !
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.
Tags:
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 !
Tags:
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 !
Tags: