"Can't use an undefined value as a symbol reference" in .cgi file

Rha sorry.
The issue is back.

[cgi:error] [pid 4400] [client 193.107.20.111:50592] AH01215: Use of uninitialized value $length in subtraction (-) at /var/www/cgi-bin/LetiCom/leti.cgi line 131.
[cgi:error] [pid 4400] [client 193.107.20.111:50592] AH01215: Use of uninitialized value $length in numeric eq (==) at /var/www/cgi-bin/LetiCom/leti.cgi line 130.
[cgi:error] [pid 4400] [client 193.107.20.111:50592] End of script output before headers: leti.cgi

However, i have no error about “$ENV{“REQUEST_METHOD”}”

Filezilla has been installed and binary method enabled. Same issue.
Just a question.
My project is pretty old.
Maybe there’s a problem with Xojo with this version?

When i start a new project, all seems right and it works.
I don’t want to rebuild my project from scratch !!!

Xojo is weird and obscure … :frowning:

My works perfect after using linux permissions 700

The privileges are :

  • 755 for all cgi files ,
  • 666 for config file , and
  • 777 for each folder.

I have forced the recursivity about folder, so each files should take 777 too.
No change even if i put 777 everywhere.

I don’t believe this issue be caused by a wrong privilege… i guess!

[quote=221651:@Franck Danard]The privileges are :

  • 755 for all cgi files ,
  • 666 for config file , and
  • 777 for each folder.

I have forced the recursivity about folder, so each files should take 777 too.
No change even if i put 777 everywhere.

I don’t believe this issue be caused by a wrong privilege… i guess![/quote]

You may want to try uploading the CGI file as Text, or as Auto. It is a text file, and not a binary one. The endOfLine may not be properly set to Linux.

Just a hunch : it may explain the third error you reported.

Ok i’ll try it tomorrow and i’ll let you know

Thanks for this clue

Hi at all. The result of the day.

Uploading cgi file using text mode doesn’t work.
I have tried to make a standalone version and using 8080 port and it doesn’t work too.

My website uses 443 (https).
All url starts with https .
Ok …So i have used http://my_website:8080 and it works. (fine ? i don’t know !).
HTTP instead of HTTPS: ok

Next, i have compiled my project, with cgi option.
http://my_server/cgi-bin/LetiCom/leti.cgi ------ > Works
https://my_server/cgi-bin/LetiCom/leti.cgi ------> work !!! (for how many times.???)

Just change 443 port to 8080

I don’t understand what’s going on.
A conflict with ports (apache and my app)?

This is crazy

I just rebooted my server.
Now i’ve the same issue.

I don’t understand why i have so many troubles for try to make it work.
I don’t know if it’s side Xojo, WinSCP, or Centos 7.0 64bits

I lose my time for trying to understand why i have this kind of issue instead of coding my project.
I’m disappointed.

When compiling as cgi, you’re leaving the port on Auto right?

Hi Greg.

I’ve used as CGI, and leaving the port on Auto, right.
But next, i’ve changed this port on 8088 , and it works again.
Usually, auto should work in any cases, if the project is running on the same server including apache using two ports (80 and 443), correct?

I’m afraid that this issue could be caused by a port conflict between my projet and apache.

For your informations, my project is called by an iframe inside a webpage.
I don’t think so that’s could be a problem. :confused:

Thanks for your help.

Have a good night.

Other thing
I tried to use the port 8080 (into the list) and it did not work.
But next, i 've changed this port number by 8088 and all worked fine.

I think you’ve got two problems here. If you leave it on auto, the script will try 3 random ports before giving up. In the long run, that’s probably your best bet, especially if you will be running more than one app on the server.

As far as the iframe goes, make sure you’re setting the security settings properly

http://documentation.xojo.com/index.php/WebApplication.Security

You mean it try these folowing ports step by step , 8080, 9000 ?
it could explain this issue indeed.

Ok good sound about the security too.

i’ll try it asap. and i’ll let you know.

Regards

Hmm i wondered one thing.

Inside my the server, there’s a Web GUI which includes some menu.
So, this server uses several ports like for example : 80, 443, 8080, … already used by apache and other softwares like open fire, and else.

My way for my project is to make one cgi per menu.
For example:
Leti / Home = one.cgi (into iframe)
Leti / Checkin = another cgi (into another iframe)

I thought that it should be more easy to make lots of small project, instead of only one big project, so maybe too heavy.
In the case where there’s a crash on a cgi, the others will be alive and not for the whole project.

Should i use a different port for each one cgi project?
Just for avoid to have this kind of cgi error.

Regards

You are overthinking it. Leave the entire port mess to standalone. Just leave CGI on Auto and you will be fine. I have about half a dozen or more cgi on my site and never had to worry about ports since 2013 when I installed them.

Hi Michel.

I’ll try this way asap.
Thansk for this clue.

Regards

Michel.
If i remember well . Putting the port in Auto mode has been tested for me but it seems not work like this.
Perhaps there’s any problems with Xojo R3 with Linux and the port Auto ?!
Just an idea like that.

[quote=224122:@Franck Danard]Michel.
If i remember well . Putting the port in Auto mode has been tested for me but it seems not work like this.
Perhaps there’s any problems with Xojo R3 with Linux and the port Auto ?!
Just an idea like that.[/quote]

Debugging requires method. If you just bang on walls you will get nowhere.

I believe 2015R3 has been tested under CenTOS 7 but since this is a new version, you must go step by step. If any one does not pass, investigate until you get it working.

  1. I would start by checking if CGI works as expected. My favorite program is a Perl Hello Word, at http://www.troubleshooters.com/codecorn/littperl/perlhelo.htm saved as .cgi, upload, set permissions and point to it with a browser.

  2. Is a very simple program running ? Something like a simple button and a MsgBox, built 64 bit as CGI as Auto. Upload, set permissions and point to it with a browser.

Then, and only then, if simple programs work as expected, you should proceed with a larger project.

I did a simple test like " Hello Work " in perl and if i remember well, no problem with it.
I could redo this test later. In this case i’ll let you know its result.
I’ll check all dependencies libraries required by Xojo, but i believe that all is right.

[quote=224145:@Franck Danard]I did a simple test like " Hello Work " in perl and if i remember well, no problem with it.
I could redo this test later. In this case i’ll let you know its result.
I’ll check all dependencies libraries required by Xojo, but i believe that all is right.[/quote]

The issue you encounter from what you report in your first post October 17 is clearly in the cgi.

Then on October 19 you mention it worked with a standalone build on port 8080. So if there was an issue of dependencies it would have showed then.

Same day you say it worked at at least once as cgi. Can you simply redo this with the port as Auto :

[quote]http://my_server/cgi-bin/LetiCom/leti.cgi ------ > Works
https://my_server/cgi-bin/LetiCom/leti.cgi ------> work !!! (for how many times.???)[/quote]

Important : make sure the leti app is not running before you point to the URL of your new build.

Something like this will let you see all running instances and sessions :

ps aux | grep leti

Then just kill by process number.

Hi all

I don’t know why.
Now it works with Auto mode.
i’ve checked with netstat and ps -ef | grep leti.
No problem here. Just weird.