title: Postgres trigger notify with PHP
body: <p>I have a problem or misunderstanding with Postgre trigger -> perform notify -> capture into PHP flow. </p>
  
  <p>My Platform is PHP(5.6) in centos with Postgres. </p>
  
  <p>I have to add <strong>trigger with notifications table and whenever a new notification</strong> is added to that notifications  <strong>SMS has to send</strong> to that user.</p>
  
  <p>So here added trigger like this</p>
  
  <pre><code>CREATE FUNCTION xxx_sms_trigger() RETURNS trigger
      LANGUAGE plpgsql
      AS $$
  DECLARE
  BEGIN
    PERFORM pg_notify('sms', NEW.id||'' );
    RETURN new;
  END;
  </code></pre>
  
  <p>and in php the inserting new notifications work fine.</p>
  
  <p>Now I have a separate file where added this <strong>capturing pg_notify triggering by "pg_get_notify"</strong>, here I couldn't get this flow totally like how Postgres can trigger some unknown php script without its being running as service or how I can make it work?</p>