# Unable to find whether the script is being executed or not?

**URL:** <https://community.dreamfactory.com/t/unable-to-find-whether-the-script-is-being-executed-or-not/2363>\
**Category:** Server-Side Scripting\
**Created:** [March 15, 2016, 6:01pm UTC](https://community.dreamfactory.com/t/unable-to-find-whether-the-script-is-being-executed-or-not/2363 "2016-03-15T18:01:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krishna\_G](https://avatars.discourse-cdn.com/v4/letter/k/46a35a/32.png) [@Krishna\_G](https://community.dreamfactory.com/u/Krishna_G)\
**Post date:** [March 15, 2016, 6:01pm UTC](https://community.dreamfactory.com/t/unable-to-find-whether-the-script-is-being-executed-or-not/2363/1 "2016-03-15T18:01:37Z")

</div>

HI,

I have created a post process script in v8js. But the script is not being executed.

Here is the script I have written:

> print(“Starting FirstTable post process”);  
> var\_dump(event.response); // outputs to file in storage/log of dreamfactory install directory  
> var lodash = require(“lodash.min.js”);  
> var options = {  
> “CURLOPT\_HTTPHEADER”: [“Content-type: application/json”, “kf-api-key: 1234567”]  
> };  
> print(“Starting payload process”);  
> if (event.request.payload.resource) {

> ```
> lodash._.each (event.request.payload.resource, function( record ) {
> print("saving user to klipfolio");
> result = platform.api.post("https://app.klipfolio.com/api/1/users", {"first_name":record.Column1,"last_name":record.Column1,"email":record.email}, options);
>    
> });
> 
> ```
> 
> print(“Ending payload process”);  
> }

I have added print message at every step.But nothing is being displayed in the dreamfactory log. But I see following log messages:

```
[2016-03-15 17:37:02] local.DEBUG: Resource event: srdb._table.{table_name}.post.pre_process [2016-03-15 17:37:02] local.DEBUG: Resource event: srdb._table.FirstTable.post.pre_process [2016-03-15 17:37:02] local.DEBUG: Resource event: srdb._table.FirstTable.post.post_process [2016-03-15 17:37:02] local.DEBUG: Resource event: srdb._table.{table_name}.post.post_process  

```

I am clueless on where the mistake is. Please help.

Best Regards  
Krishna G

---

<div class="post-metadata">

**Author:** ![toddappleton](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/toddappleton/32/159_2.png) [@toddappleton](https://community.dreamfactory.com/u/toddappleton)\
**Post date:** [March 15, 2016, 7:46pm UTC](https://community.dreamfactory.com/t/unable-to-find-whether-the-script-is-being-executed-or-not/2363/2 "2016-03-15T19:46:31Z")

</div>

For V8js scripting use var\_dump() not print(). For Node.js scripting use console.log().

---

<div class="post-metadata">

**Author:** ![Krishna\_G](https://avatars.discourse-cdn.com/v4/letter/k/46a35a/32.png) [@Krishna\_G](https://community.dreamfactory.com/u/Krishna_G)\
**Post date:** [March 16, 2016, 3:50am UTC](https://community.dreamfactory.com/t/unable-to-find-whether-the-script-is-being-executed-or-not/2363/3 "2016-03-16T03:50:09Z")

</div>

Hi,

Thank you for the suggestion. I used var\_dump as well. The log is not capturing any of these messages. I am always getting the message as follows in the log:

> [2016-03-16 03:43:09] local.DEBUG: Resource event: srdb.\_table.FirstTable.post.post\_process  
> Even adding var\_dump(“Starting”) step in the post or pre process of processing event, none of these messages are being displayed.

Please suggest.I a trying to do this since for 1 week.

Best Regards  
Krishna G

---

<div class="post-metadata">

**Author:** ![Krishna\_G](https://avatars.discourse-cdn.com/v4/letter/k/46a35a/32.png) [@Krishna\_G](https://community.dreamfactory.com/u/Krishna_G)\
**Post date:** [March 17, 2016, 4:02pm UTC](https://community.dreamfactory.com/t/unable-to-find-whether-the-script-is-being-executed-or-not/2363/4 "2016-03-17T16:02:47Z")

</div>

Any other suggestions please. I am kind of stopped here.

---

<div class="post-metadata">

**Author:** ![toddappleton](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/toddappleton/32/159_2.png) [@toddappleton](https://community.dreamfactory.com/u/toddappleton)\
**Post date:** [March 17, 2016, 9:31pm UTC](https://community.dreamfactory.com/t/unable-to-find-whether-the-script-is-being-executed-or-not/2363/5 "2016-03-17T21:31:40Z")

</div>

Try a single line script like this:

`var_dump("Hello");`

If that doesn’t work perhaps V8 is not running properly. What OS and DreamFactory version are you on?

---

<div class="post-metadata">

**Author:** ![Krishna\_G](https://avatars.discourse-cdn.com/v4/letter/k/46a35a/32.png) [@Krishna\_G](https://community.dreamfactory.com/u/Krishna_G)\
**Post date:** [March 19, 2016, 5:34pm UTC](https://community.dreamfactory.com/t/unable-to-find-whether-the-script-is-being-executed-or-not/2363/6 "2016-03-19T17:34:10Z")

</div>

I am using bitnami DreamFactory 2.1.0-4 in LInux machine.

I have verified that v8js is working fine in bitnami with the help of bitnami support team.

The simple message suggested by you also not working. Please suggest any other options.

Thanks  
Krishna G

---

<div class="post-metadata">

**Author:** ![toddappleton](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/toddappleton/32/159_2.png) [@toddappleton](https://community.dreamfactory.com/u/toddappleton)\
**Post date:** [March 22, 2016, 12:59pm UTC](https://community.dreamfactory.com/t/unable-to-find-whether-the-script-is-being-executed-or-not/2363/7 "2016-03-22T12:59:39Z")

</div>

Check the log file for errors. In your Bitnami installation directory it’ll be in apps/dreamfactory/htdocs/storage/logs. In your htdocs/.env file you can also set APP\_DEBUG=true. Make sure you don’t have any other scripts that are failing. You can temporarily deactivate all the other scripts to help debug.

---

<div class="post-metadata">

**Author:** ![Krishna\_G](https://avatars.discourse-cdn.com/v4/letter/k/46a35a/32.png) [@Krishna\_G](https://community.dreamfactory.com/u/Krishna_G)\
**Post date:** [March 23, 2016, 6:29pm UTC](https://community.dreamfactory.com/t/unable-to-find-whether-the-script-is-being-executed-or-not/2363/8 "2016-03-23T18:29:29Z")

</div>

Hi,

Thank you for the suggestion. I have tried this. But the log is not showing any thing additional about those print messages. Any other thoughts please?

Thanks  
Krishna
