in reply to Debugging tip: Change only one thing at a time (was Re: CGI and ODBC (progress))
in thread CGI and ODBC (progress)

That is my last test. I tried now on my own computer where CGI and ODBC work.

1- If I use Easyphp. The script work using CGI
2- If I stop easyphp and install apache separatly and test my cgi script. it's failed (no connection database).

On easyphp apache and apache server, they use the same user :
User daemon
Group daemon

What is the problem ?
  • Comment on Re: Debugging tip: Change only one thing at a time (was Re: CGI and ODBC (progress))

Replies are listed 'Best First'.
Re^2: Debugging tip: Change only one thing at a time (was Re: CGI and ODBC (progress))
by roboticus (Chancellor) on Apr 28, 2010 at 15:39 UTC

    djibel

    It sounds like you're still changing more than one variable at a time. You can run it under your account in a command-line window without CGI and it works, right? If so, put in CGI and run it in the same command-line window, and it should still run. (The text may be a bit much to dig through, as you'll have your HTML stuff, but that ought not stop you.)

    I don't know what Easyphp is, so I can't help you move from that step to the apache configuration, though.

    ...roboticus

      I have resolved the bug, that is the solution. When I use EasyPHP, I think the apache user (deamon) run with privilege of user account used, and as my session is admin, the cgi programme work because apache user can see the DSN ODBC.

      When I use apache separately, CGI doesn't work because the user apache have not the same privilege and I don't know why.
      Then, To change it, I have opened the services (Right click on Computer folder => gestion => services ). I found apache 2 service => connexion => I deselect account local user and select this account ( I have choosing an administrator account), apply and restart the apache service. Now, the cgi script work well, I hope it will help another people.

      Thank you for your helps,

      Best Regards,

      djibel
        That is the wrong solution. Don't make apache root just so it can read your DSN.