RTC Forums

Subscription => Support => Topic started by: Kevin Powick on March 31, 2011, 05:04:34 AM



Title: PHP & Linux/FPC support
Post by: Kevin Powick on March 31, 2011, 05:04:34 AM
Does the fact that rtcPHP.pas still resides in the Demos folder mean that PHP support is still only "use at your own risk"?

Also, while I have been able to create clients and servers with RTC on Linux via FPC, how reliable should a RTC server under Linux be considered?  I haven't visited this topic for a long time, but there was a time when Linux socket issues were of possible concern to the stability of a Linux based RTC server under load.  Is it still a concern?


Title: Re: PHP & Linux/FPC support
Post by: D.Tkalcec (RTC) on March 31, 2011, 10:50:17 AM
Hi Kevin,

PHP as well as FPC/Lazarus support are only "use at your own risk" and I don't think that will ever change.

Best Regards,
Danijel Tkalcec


Title: Re: PHP & Linux/FPC support
Post by: Kevin Powick on March 31, 2011, 01:22:30 PM
Ok, D.  Thanks.


Title: Re: PHP & Linux/FPC support
Post by: D.Tkalcec (RTC) on March 31, 2011, 02:39:11 PM
That doesn't mean you can't or shouldn't report problems you might encounter if you try using the RTC SDK with PHP and/or FPC/Lazarus. If the problem you encounter is caused by wrong implementation in the RTC SDK and you can send me a sample project with clear instructions on setting up the environment to reproduce the problem, I will try to fix it.

But ... when it comes to PHP and FPC/Lazarus, there are things which are simply out of my control (like the PHP interface implementation or the FPC compiler, debugger and source code), because of which there is a chance I might not be able to fix the problem, even if someone would report it and send me everything I need to reproduce it.

For example, I was trying to make the RTC SDK compatible with 64bit Windows by using FPC/Lazarus as a compiler. But even though the 64bit WinSock, WinInet and WinHTTP APIs should be identical with their 32bit versions (according to MSDN only reference pointers are 64bit instead of 32bit, even the DLL names are the same) and I got the RTC SDK to compile with Lazarus/FPC for WIN64 (on 64bit Windows 7 Ultimate), most things I tried would either result in the whole app to crash or raise Access Violations. And when that happened, the only thing you will see in the FPC/Lazarus Debugger is Assembly, with zero relation to your source code and no call stack. You don't even get to see the actual exception message in the FPC/Lazarus Debugger (it always says something like: Project xyz.exe raised Exception class 'External: SIGSEV') and you can't even begin to guess where you are in the source code or why the exception might have happened. To make things even worse, breakpoints don't work at all.

Best Regards,
Danijel Tkalcec


Title: Re: PHP & Linux/FPC support
Post by: Kevin Powick on March 31, 2011, 05:15:05 PM
Hi Danijel,

Yes, I understand where you are coming from.  I have a project in which the client wants to save some money by deploying on a cloud-based Linux box instead of Windows.  So, I was hoping that perhaps RTC/FPC had been proven to be as rock-solid as Windows.

I think the few dollars saved each month by going to Linux will not be worth the loss of peace of mind one gets by going with Windows in this case.  Nothing against Linux, but I think that the client will be better served by a Windows platform for this project.


Title: Re: PHP & Linux/FPC support
Post by: D.Tkalcec (RTC) on March 31, 2011, 07:35:30 PM
Hi Kevin,

I agree with you. "Saving some money" is definitely the wrong argument for choosing a Linux Server over a Windows Server, especially when the end result could prove to be the exact opposite (unexpected costs because of problems or limited FPC/Lazarus functionality).

PS. I just checked the current prices for Servers from my hosting provider and the highest price difference between Linux and Windows there was 20 EUR/Month on dedicated Servers, with almost no difference on Virtual Servers. Pricing for Virtual Servers was even identical for Windows and Linux, with the only difference being in the HDD size you get in the package.

Best Regards,
Danijel Tkalcec