Paradox Community

Items in pnews.paradox-dos

Subject:Re: qbe to sql
Date:Thu, 26 Oct 2017 23:16:00 +1000
From:Bernie van't Hof <berniev@bje.com.au>
Newsgroups:pnews.paradox-dos
pah man: "The socket extension was written to provide a usable interface 
to the powerful BSD sockets. Care has been taken that the functions work 
equally well on Win32 and Unix implementations".

On 26/10/17 10:11 pm, Bernie van't Hof wrote:
> 
> 
> On 26/10/17 12:03 pm, Larry DiGiovanni wrote:
>> Bernie van't Hof wrote:
>>
>>> The change to C from C: is working here ok.
>>
>> Here as well.  I was able to clone the repository.  Thanks for making 
>> the change.
>>
>>> 1. In initial script, set dir:
>>>  e.g. DataDir = <"C\PDOXDATA\SCRIPTS">
>>> SETDIR DataDir
>>
>> OK, but why?  You mean in the PAL script I am converting with pal2php, 
>> correct?
> yes
>>
>>> php pal2php.php dos/drives/C/PDOXDATA/SCRIPTS/
script tag removed
 <!--- scriptnameNoExtn>
>>
>> No worries.  I threw a testdata/ folder up under PDOXDATA/, and put in 
>> a simple table, form, and script.  The script (FOO.SC) opens the table 
>> and selects the form.  I added a SETDIR to the start.
>>
>> FOO.php was generated.
>>
>>> 3. (opt) Run (converted) lib-building scripts:
>>
>> N/A as I was running a simple script.
>>
>>> 4. File sshost.php is called when a new instance of php is started in 
>>> websocket\sockets\PxStream::StartProc(), and contains a line which 
>>> sets the initial script to load
>>> N.B: .php extn
>>
>> I updated this to:
>> include PxDrives . 'C/PDOXDATA/testdata/FOO.php';
>>
> Agree
>> However, I don't think it gets this far.
>>
>>> 5. Fire up in browser (per prev post).
>>
>>  From your previous post:
>>
>>> First thing to try is websocket server.
>>>  From terminal run php wshost.php
>>
>> I had to modify start.php to point my APPS_ROOT.
> yes (oops)
>>
>> This runs, and listens on 8001 per the config.
> good
>>
>>> Then from browser load public_html\index.php
>>
>> Perhaps I missed a step, but the browser (chrome, in my case) cannot 
>> hit the ws:// address, and http:// requests are rejected.
> any particular errors showing in browser console?
> I assume it instantiated the websocket ok.
> 
>    I deployed a
>> websocket client in chrome ("Simple Websocket Client") and hit 
>> ws://localhost:8001/public_html/index.php.
>>
>> Stack trace:
>> PHP Warning:  socket_create(): Unable to create socket [10047]: An 
>> address incompatible with the requested protocol was used.
>> in C:\Users\Larry\git\pdox\sockets\Socket_AF_UNIX.php on line 64
>> PHP Stack trace:
>> PHP   1. {main}() C:\Users\Larry\git\pdox\wshost.php:0
>> PHP   2. websocket\WsServer->Run() C:\Users\Larry\git\pdox\wshost.php:28
>> PHP   3. websocket\WsConnection->OnConnect() 
>> C:\Users\Larry\git\pdox\websocket\Server.php:174
>> PHP   4. websocket\PxStream->Start() 
>> C:\Users\Larry\git\pdox\websocket\WsConnection.php:117
>> PHP   5. websocket\PxStream->StartStream() 
>> C:\Users\Larry\git\pdox\websocket\PxStream.php:58
>> PHP   6. sockets\Socket_AF_UNIX->Setup() 
>> C:\Users\Larry\git\pdox\websocket\PxStream.php:101
>> PHP   7. socket_create() 
>> C:\Users\Larry\git\pdox\sockets\Socket_AF_UNIX.php:64
>>
>> The error is a windows socket error, which implies that the server 
>> won't accept an IPv6 address.
> Why IPv6?
> 
>    This after much googling.  I assume a
>> consequence of AF_UNIX?
> Mmmm. I worried about AF_UNIX under Windows and older google results 
> showed it might be a problem, but I couldn't find anything in php docs 
> to suggest a problem.
> I'll do some more research as well.
> Darned sockets are kinda black magic.
>    I tried windows 7, 10, and XP, and all gave the
>> same result.  I also tried fiddling with the socket_open call, just to 
>> see what would happen if I used AF_INET or AF_INET6 - just different 
>> errors.
>>
>> I am firing up a Linux image, but I have to update VirtualBox, and 
>> this may take a while.
>>
>>> 6. Monitor logs in logs/. particularly out.txt (php errors/debug/etc) 
>>> and pallog.log (app) for progress.
>>
>> Only thing in logs are the clients.log and wsserver.log.  I assume 
>> because I'm not getting any further.
> Yes
>    It's going to take at least until
>> tomorrow evening to get the updated VirtualBox - possibly longer if my 
>> existing VMs won't work with VirtualBox 5.2.
>>
>> -- 
>> Larry DiGiovanni
>>


Copyright © 2004 thedbcommunity.com