PDA

Click to See Complete Forum and Search --> : PHP server and VB6 core


Krava
Mar 12th, 2010, 12:34 AM
Hi folks!
I am new in this forum as I am VBF oriented.:)
Anyhow, I have an idea but I do not know how to do. I want to setup PHP server for our Intranet. That is fine, my colleauge can do. But my idea is to program Client - server application where the client will be PHP client (only visualisation) and the active core would be programmed in VB6 (active core that will return the data from MySQL server). We have data in MySQL and we have a lot of VB6 codes that manipulates with data. If I would be able to program the functions in VB6, compile it to e.g. DLL or OCX and we could publish it on PHP server that would refer to those functions, would be great. I could the share the workload between a few colleaugues. Would this be possible?

Thanks a lot.

Krava

kows
Mar 12th, 2010, 12:50 AM
well, it would be possible to create extensions for PHP, but I'm not really sure what you want to do would be possible. as far as I know (and I will say that I'm not entirely sure of this), PHP extensions are written in the PHP interpreter's language: C. you can learn a lot about writing extensions for PHP here (http://devzone.zend.com/article/1021).

it would honestly probably be faster/more efficient for you to rewrite the VB functions in PHP. I would say that it will also be a lot less code, as VB tends to be extremely verbose. it would most likely interface with MySQL faster (I don't even know if you could create a library [DLL] that -could- interface with MySQL by itself) than something written in VB, too.

Krava
Mar 12th, 2010, 02:34 AM
Hello, kows!

Thank you for your quick reply!
I understood.
To be frank- if I have to start programming in PHP then I can start with anything else, like ASP etc. I wanted to avoid this because I have only 1 person with PHP knowhow and another 4 guys with VB6 knowhow. And a lot of experience with VB6, ADO, SQL.
I have to reconsider.

With kindest regards

krava

visualAd
Mar 14th, 2010, 04:51 AM
You can load DLL's into PHP and call their functions but it is not something I would recommend.

http://uk3.php.net/manual/en/refs.utilspec.windows.php

Doing this would obviously add overhead to page requests and I doubt that based on their apparent inability to learn a new language, your programmers will be able to adapt the programs to ensure they are thread safe (i.e. detecting race conditions, dead locks, managing sessions etc.)

If you want to write in Classic VB I suggest that you develop something in ASP. While it is not the best, the language (VBScript) is very similar to VB and would only require learning web web design / programming concepts.

Or you could of course tell them all that they have six months to learn either .NET or PHP or they can go work for someone else ;)