Paradox Community

Items in pnews.paradox-dos

Subject:Re: qbe to sql
Date:Wed, 25 Oct 2017 22:03:57 -0400
From:"Larry DiGiovanni" <nospam@nospam>
Newsgroups:pnews.paradox-dos
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?

> 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';

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.

This runs, and listens on 8001 per the config.

> 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.  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.  This after much googling.  I assume a consequence 
of AF_UNIX?  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.  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