1. App Can and Can't See Public Variable from Included File
- Posted by euphoric (admin) Mar 13, 2019
- 1077 views
I have an include file I'm using (_curl_.e) that exposes some functions and constants. When I use that file from a Windows desktop app, everything works fine. But when I attempt to use that file during a call from Apache, it throws this error:
c:\eu_include\htf\prefs.e:55 <0074>:: Errors resolving the following references: 'curl_get' (c:\eu_include\htf\prefs.e:46) has not been declared. 'HTTP_STATUS' (c:\eu_include\htf\prefs.e:47) has not been declared. 'HTTP_BODY' (c:\eu_include\htf\prefs.e:48) has not been declared. 'HTTP_BODY' (c:\eu_include\htf\prefs.e:55) has not been declared. res = res[HTTP_BODY] ^
Exact same file is being used, but one works and the other doesn't.
In prefs.e, I have these lines:
include lib/_common_.e include lib/_curl_.e include lib/_curl_constants_.e
lib/_curl_.e is definitely getting included, so it should see those constants. Again, the exact same executable file works from the console but not when it's used by an Apache process.
This is the most bizarre thing I've ever seen from Euphoria. It's like I've discovered an obscure bug, but I know that can't be the case. I just can't figure out what's going wrong and where.
Anybody ever experience something like this?! How do you think I should go about diagnosing and resolving this?
2. Re: App Can and Can't See Public Variable from Included File
- Posted by jmduro Mar 14, 2019
- 1059 views
This could be a problem related to environment variables being lost as with CGI. Can you display EUDIR from within Apache?
Jean-Marc
3. Re: App Can and Can't See Public Variable from Included File
- Posted by euphoric (admin) Mar 14, 2019
- 1032 views
This could be a problem related to environment variables being lost as with CGI. Can you display EUDIR from within Apache?
Jean-Marc
Good point, JM. I'll have to look into that!