Question: **Environment:**  

**Server**: Ubuntu Server 12.04 x64  

**Web Server**: Apache 2  

**PHP**: 5.3.10-1ubuntu3.8  

**Oracle**: Instant Client 11.2 

Problem:  

I have a script that I am setting up as a cron job, but when it runs it produces 

> 
> PHP Fatal error; Call to undefined function oci\_connect() in /var/www/reports/inc/config.php on line 25 
> 
> 
> 

If I run this script or any other script using oci\_connect or oci\_pconnect through Apache, they work fine. I just migrated to a new machine and the script ran fine on the previous machine, but I cannot think of what I am missing. 

Permissions on the script are the same as the config file and I have tried running as www-data, my user account, and root (all provide the same error).

Answer: 
You can do like jquery live does and bind on the document level.

```
require(["dojo/on", "dojo/query"], function(on){
  on(document, "#dispatchBtn:click", function(evt){
        alert("Clicked on node " + this.id);
  });
});

```

Fiddle:<http://jsfiddle.net/theinnkeeper/NTn6g/>
Why are you adverse to checking if the button exists? That makes the most sense

```
var btn = dojo.byId("dispatchBtn");
 if(btn) {
    on(btn, 'onclick', function() {});
}

```