Page 1 of 1

[Mac]Error when executing Script from Apache / PHP

Posted: Mon May 20, 2019 8:57 am
by t.ogawa
Software:QCAD Pro 3.22.0.0
OS:Mac Mojave
PHP:v7.3.2

Hello.

https://qcad.org/rsforum/viewtopic.php?f=32&t=6281

The place where I ran the script that was taught at the above URL,
It runs on a terminal, but running from PHP with exec () results in the following error:

[do command]

Code: Select all

qcad -no-gui -allow-multiple-instances -autostart qcad_purgeblock.js -f -o out.dxf in.dxf
[Apache Error Log]

Code: Select all

QCAD version  3.22.0
16:40:35: Debug:    RDwgPlugin::init
16:40:35: Debug:    RDxfPlugin::init
16:40:35: Debug:    RHelpPlugin::init
16:40:35: Debug:    RPolygonPlugin::init
16:40:35: Debug:    RProScriptsPlugin::init
16:40:35: Debug:    RScriptsPlugin::init
16:40:35: Debug:    RSpatialIndexProPlugin::init
16:40:35: Debug:    RTriangulationPlugin::init
16:40:35: Debug:    calling odInitialize
16:40:35: Debug:    dropped global XDATA (no res buf):  "ViewportCenter"
2019-05-20 16:40:35.863 QCAD-Pro[52809:1569010] +[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'ClientCallsAuxiliary': Connection interrupted
16:40:35: Debug:    bb:  RBox(6.66667,7.83122: 283.323x202.377) 
16:40:35: Debug:    f: 1.3687309870976447
16:40:36: Debug:    RPluginBase::uninit:  "DWG"
16:40:36: Debug:    RPluginBase::uninit:  "POLYGON"
16:40:36: Debug:    RPluginBase::uninit:  "PROTOOLS"
16:40:36: Debug:    RPluginBase::uninit:  "SPATIALINDEXPRO"

As a result, the file is output but the contents are not purged.
And this error has occurred even if i delete the process to be purged.

What is the cause of this?

Sorry to bother you again.
thank you.

Re: [Mac]Error when executing Script from Apache / PHP

Posted: Mon May 20, 2019 9:21 am
by t.ogawa
additional info.

This error seems to occur in the following.

Code: Select all

if (!di.exportFile(outFile)) {
        di.destroy();
        print("Cannot export file:", outFile);
        return;
}

Re: [Mac]Error when executing Script from Apache / PHP

Posted: Mon May 27, 2019 10:51 am
by t.ogawa
It runs on Linux (CentOS 7), so it may be just a Mac environment.
There is no problem if it can be run on Linux, so close it.

thank you.