Can not execute SpiderBite sample

Just starting out? Need help? Post your questions and find answers here.
ehbarba
Posts: 31
Joined: Thu Mar 29, 2018 2:20 am

Can not execute SpiderBite sample

Post 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?
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Can not execute SpiderBite sample

Post 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
ehbarba
Posts: 31
Joined: Thu Mar 29, 2018 2:20 am

Re: Can not execute SpiderBite sample

Post 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.
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Can not execute SpiderBite sample

Post by Peter »

ehbarba wrote:Image
InitCGI() is only available starting with PureBasic Version 5.40.

Greetings ... Peter
swan
Posts: 19
Joined: Tue Dec 15, 2015 2:56 am

Re: Can not execute SpiderBite sample

Post 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 ..... :)
ehbarba
Posts: 31
Joined: Thu Mar 29, 2018 2:20 am

Re: Can not execute SpiderBite sample

Post by ehbarba »

Thank you, Peter, as allways!
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Can not execute SpiderBite sample

Post 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
swan
Posts: 19
Joined: Tue Dec 15, 2015 2:56 am

Re: Can not execute SpiderBite sample

Post 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 ....
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Can not execute SpiderBite sample

Post 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
swan
Posts: 19
Joined: Tue Dec 15, 2015 2:56 am

Re: Can not execute SpiderBite sample

Post 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 ...
Post Reply