Jump to content

z0n1n0z

Members
  • Posts

    12
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Italy

z0n1n0z's Achievements

Rookie

Rookie (2/14)

  • Dedicated Rare
  • Reacting Well Rare
  • Collaborator Rare
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. I'm writing you another note that might be useful. I modified the bash script again like this and it works perfectly: #!/bin/bash exec 2>&1 echo -e "Content-type: text/plain\n" /usr/bin/g++ test.cpp -o test.cgi so, to compile a c++ program it's better to use `/usr/bin/g++` it is not necessary to use the "absolute" path, the "relative" one is sufficient, which is simpler and safer, because it does not reveal to the users their chroot in the server system Greetings
  2. I tried your suggestion literally and got this response in the browser: /tmp/ccKDTXpt.o: In function `main': test.cpp:(.text+0xa): undefined reference to `std::cout' test.cpp:(.text+0xf): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)' test.cpp:(.text+0x19): undefined reference to `std::cout' test.cpp:(.text+0x1e): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)' test.cpp:(.text+0x28): undefined reference to `std::cout' test.cpp:(.text+0x2d): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)' test.cpp:(.text+0x37): undefined reference to `std::cout' test.cpp:(.text+0x3c): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)' test.cpp:(.text+0x46): undefined reference to `std::cout' test.cpp:(.text+0x4b): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)' test.cpp:(.text+0x55): undefined reference to `std::cout' test.cpp:(.text+0x5a): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)' test.cpp:(.text+0x64): undefined reference to `std::cout' test.cpp:(.text+0x69): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)' test.cpp:(.text+0x73): undefined reference to `std::cout' test.cpp:(.text+0x78): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)' test.cpp:(.text+0x82): undefined reference to `std::cout' test.cpp:(.text+0x87): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)' /tmp/ccKDTXpt.o: In function `__static_initialization_and_destruction_0(int, int)': test.cpp:(.text+0xb5): undefined reference to `std::ios_base::Init::Init()' test.cpp:(.text+0xc4): undefined reference to `std::ios_base::Init::~Init()' collect2: error: ld returned 1 exit status then i tried to use `/usr/bin/g++` and it worked great! thank you for everything (to quote the dolphins=aliens from the "hitchhiker's guide to the galaxy", «thanks for all the fish!») I insisted a little because I had intuition that something was wrong and that it would be useful for you so we have the solution
  3. I had already tried several times and it still doesn't work. For example I also tried `/usr/bin/gcc --help` and the scheduler said it doesn't exist
  4. `/usr/bin/gcc` does not exist "for me", because it is not accessible to me: I cannot access the `/usr/bin/` directory. If in Plesk I click on `/usr/bin/` then I see `/bin/`. I don't have the ability to use `/usr/bin/gcc`
  5. Not yet: as I already said, in fact which means that /usr/bin/gcc also doesn't exist, like all the files that should be in `/usr/bin/`, because instead of `/usr/bin/` I still have `/bin/` you probably thought I hadn't checked yet and thought everything was fine...
  6. unfortunately there is another problem: I can't compile it because the compiler is missing. I noticed that a system now appears to be available in the home, but the files in /bin/ and /usr/bin/ are the same. In any case, for example, g++ is missing
  7. I didn't know about the cronjob: I guess it's under "scheduled tasks". Now I try thank you very much
  8. I compiled test.cgi (c++) on my system: Linux/Devuan amd64 I also wanted to try with a perl script, but it doesn't work. I set the rights to 755 and wrote the .htaccess file, which didn't exist. In my system everything works fine thank you all for your attention, you are very kind
  9. as i wrote, the error_log says: [Tue May 30 22:19:44.533866 2023] [cgid:error] [pid 22217:tid 139805337741056] [client 151.21.204.48:59042] End of script output before headers: test.cgi the "test.cgi" file works on my machine: Linux/Devuan + Apache2
  10. dear administrator, i can't get cgi-bin programs to work. The link https://z0n1n0z.helioho.st/cgi-bin/test.cgi is a compiled c++ test program. The source code is at https://z0n1n0z.helioho.st/cgi-bin/test.cpp. https://z0n1n0z.helioho.st/cgi-bin/test.pl doesn't work either. In cgi-bin/ there is also an .htaccess file which contains this: Options +ExecCGI AddHandler cgi-script .cgi .pl .py LimitRequestBody 2147483647 the "error_log" file says: [Tue May 30 22:19:44.533866 2023] [cgid:error] [pid 22217:tid 139805337741056] [client 151.21.204.48:59042] End of script output before headers: test.cgi What can I do to activate cgi-bins? Thanks for the attention Best regards
×
×
  • Create New...