Page 1 of 2

Can not execute SpiderBite sample

Posted: Fri Feb 08, 2019 11:27 pm
by ehbarba
Hello

After install SpiderBite in SpiderBasic I tryed to compile ExamplePHP.sb but it rise a sintax error in:

ProcedureDLL myPhpProcedure1()

SpiderBasic does not recognize ProcedureDLL.

What am I missing or doing wrong?

Re: Can not execute SpiderBite sample

Posted: Sat Feb 09, 2019 8:44 am
by Peter
ehbarba wrote:SpiderBasic does not recognize ProcedureDLL.
Did you install the tools the way I described it on this page?

https://github.com/spiderbytes/SpiderBi ... einrichten

Re: Can not execute SpiderBite sample

Posted: Mon Feb 11, 2019 11:29 pm
by ehbarba
Hi Peter, thank you

I checked the installation, and it was Not Ok!

I think it's Ok now:

Image

Image


But when I run the example, the PB compiler generates an error as shown in the following image:

Image

I'm using Miva Merchant Mia is an engine and personal web server environment. I try with and without it installed and the error is the same.

Re: Can not execute SpiderBite sample

Posted: Mon Feb 11, 2019 11:57 pm
by Peter
ehbarba wrote:Image
InitCGI() is only available starting with PureBasic Version 5.40.

Greetings ... Peter

Re: Can not execute SpiderBite sample

Posted: Tue Feb 12, 2019 4:11 am
by swan
Hi Peter.
I was going to start a new topic but it would have had the same heading so I tagged on here.
I too am having an issue with running any of the SpiderBite examples. I get this error - "Line 1: 'C' is not a valid operator"
Have checked and rechecked the installation to your instructions. I think it's OK.
SB compiles and runs as normal. Any help would be great.
Cheers,
Steve ..... :)

Re: Can not execute SpiderBite sample

Posted: Tue Feb 12, 2019 9:51 pm
by ehbarba
Thank you, Peter, as allways!

Re: Can not execute SpiderBite sample

Posted: Wed Feb 13, 2019 9:24 pm
by Peter
swan wrote:I get this error - "Line 1: 'C' is not a valid operator"
Unfortunately, I don't have the slightest idea what could trigger this error.

Please search for a single "C" in the code.

Greetings ... Peter

Re: Can not execute SpiderBite sample

Posted: Fri Feb 15, 2019 6:34 am
by swan
Hi Peter,
Bit of an update but no cigar yet.
Uninstalled everything (including SB) and reinstalled. Redownloaded all files, yet same error. A single "C" in code gives a syntax not that error.
Now, the error only occurs following "EnablePBCgi" in the code. EnableASP, EnablePHP, etc is not effected.
I'm using Win 10 and the web server is IIS. I also tried Apache but I don't think the error is reaching that point.
Here is the simplest code that produces the error.

Code: Select all

#SpiderBite_Profile = "default"
EnablePbCgi
DisablePbCgi
Sorry to be a pain but I'd love to see this work.
Steve ....

Re: Can not execute SpiderBite sample

Posted: Fri Feb 15, 2019 9:33 am
by Peter
Hello Steve,

Okay, I think I figured it out.

Please check if you have write permissions in the directory you specified under PbCgiFilename.

Image

If I (as you can see on the screenshot) create the cgi.exe in C:\intepub\wwwroot\ then everything works.

If I want to write in C:\intepub\ (I don't have write permission there), I get the same error as you.

Greetings ... Peter

Re: Can not execute SpiderBite sample

Posted: Tue Feb 19, 2019 6:08 am
by swan
Apologies for the delay - yes you're right, it was write permissions in IIS. I really should have checked that - :oops:
Now PB compiles and deposits the exe as per the config profile as it should.
But I get this error in the debug window when run :
"error: error/NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://localhost/PBcgi/'."
This code:

Code: Select all

#SpiderBite_Profile = "default"
EnablePbCgi
  ProcedureDLL.s myPbCgiProcedure()
    ProcedureReturn "Hello from myPbCgiProcedure"
  EndProcedure
DisablePbCgi
Debug myPbCgiProcedure()
As always thanx Peter.
Steve ...