If the scripts work from the command line then it's usually a case of making sure that the environment is duplicated in the Apache setup. My Oracle know-how is approximately zero, so I don't know what you need to set - but check your environment in your DOS shell, and then add the appropriate entries to your httpd.conf file (see the SetEnv directive).