Init script & the green [ OK ]PHP _SERVER[“USER”] and _SERVER[“HOME”] appear from nowherePHP-CGI Not working on CentOS 5?Single fastcgi/php-cgi server for multiple virtualhosts?how to spawn php-cgi automatically when it exits?How to set the httpd.conf when using php-fpm with php(5.3.8) and apache2?Why the php-cgi wrapper script for php-fpm? (Using virtualhost and suexec.)How to tell: Is it nginx or PHP-cgi which is slower?Can't start Hadoop from an init.d scriptPHP-FPM with Apache 2.2.22 and Ubuntu 12.10 - 500 Error, or returns text (not executing)FastCGI: “comm with server aborted: read failed” only for one specific file

Find the cipher used

Who was this character from the Tomb of Annihilation adventure before they became a monster?

Do atomic orbitals "pulse" in time?

How to compact two the parabol commands in the following example?

How can this triangle figure be modeled/drawn with TikZ?

Understanding integration over Orthogonal Group

What is the best way for a skeleton to impersonate human without using magic?

What are the implications of the new alleged key recovery attack preprint on SIMON?

Why in a Ethernet LAN, a packet sniffer can obtain all packets sent over the LAN?

tikz: not so precise graphic

On what legal basis did the UK remove the 'European Union' from its passport?

Make all the squares explode

Why was Endgame Thanos so different than Infinity War Thanos?

How does Howard Stark know this?

How to use structured binding in an array passed as arg to some function?

Is the schwa sound consistent?

List software from restricted, multiverse separately

"Right on the tip of my tongue" meaning?

How to minimise the cost of guessing a number in a high/low guess game?

c++ what does , means after if

Anatomically Correct Carnivorous Tree

Was this a power play by Daenerys?

Repair a file using Audacity?

How did Thanos not realise this had happened at the end of Endgame?



Init script & the green [ OK ]


PHP _SERVER[“USER”] and _SERVER[“HOME”] appear from nowherePHP-CGI Not working on CentOS 5?Single fastcgi/php-cgi server for multiple virtualhosts?how to spawn php-cgi automatically when it exits?How to set the httpd.conf when using php-fpm with php(5.3.8) and apache2?Why the php-cgi wrapper script for php-fpm? (Using virtualhost and suexec.)How to tell: Is it nginx or PHP-cgi which is slower?Can't start Hadoop from an init.d scriptPHP-FPM with Apache 2.2.22 and Ubuntu 12.10 - 500 Error, or returns text (not executing)FastCGI: “comm with server aborted: read failed” only for one specific file






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








4















I am trying to install fast-cgi for nginx on an EC2 instance. I followed the steps explained here, but that is meant for Debian and does not work out of the box for a red-hat based system. I modified the script a bit to look like -



#!/bin/bash
### BEGIN INIT INFO
# Provides: php-fcgi
# Required-Start: $nginx
# Required-Stop: $nginx
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts php over fcgi
# Description: starts php over fcgi
### END INIT INFO

. /etc/rc.d/init.d/functions

(( EUID )) && echo .You need to have root priviliges.. && exit 1
BIND=/tmp/php.socket
USER=nginx
PHP_FCGI_CHILDREN=15
PHP_FCGI_MAX_REQUESTS=1000

PHP_CGI=/usr/bin/php-cgi
PHP_CGI_NAME=`basename $PHP_CGI`
PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND"
RETVAL=0

start()
echo -n "Starting PHP FastCGI: "
#ORIGINAL LINE
#daemon $PHP_CGI --quiet --start --background --chuid "$USER" --exec /usr/bin/env -- $PHP_CGI_ARGS
#MODIFIED LINE
daemon --user=$USER $PHP_CGI -b $BIND&
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/php-fcgi
#echo "$PHP_CGI_NAME."

stop()
echo -n "Stopping PHP FastCGI: "
killall -q -w -u $USER $PHP_CGI
RETVAL=$?
echo "$PHP_CGI_NAME."
rm /var/lock/subsys/php-fcgi


case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo "Usage: php-fastcgi restart"
exit 1
;;
esac
exit $RETVAL


The problem I have now is -




  1. service php-fcgi start keeps the shell blocked. If I run service php-fcgi start & and then ps aux, I see the php-cgi process running bound to the socket. I see the start command stop only when I execute service php-fcgi stop. How do I solve this blocking issue? I have tried adding an & at the end of the line spawning the daemon. But other scripts do not seem to be doing this.
    This is the most complicated script I am attempting to modify yet :-(

  2. How do I get the script to display the green [ OK ]? I checked scripts like httpd and saw that all they were doing was something as shown below. But I never see a green [ OK ] when I execute php-fcgi. I also discovered that putting echo_success with functions sourced displays the green [ OK ] but I do not see any other scripts in the /etc/rc.d/init.d/ executing echo_success or echo_failure. What have I got wrong?

  3. Also, How do i specify PHP_FCGI_CHILDREN with daemon?


echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/










share|improve this question






























    4















    I am trying to install fast-cgi for nginx on an EC2 instance. I followed the steps explained here, but that is meant for Debian and does not work out of the box for a red-hat based system. I modified the script a bit to look like -



    #!/bin/bash
    ### BEGIN INIT INFO
    # Provides: php-fcgi
    # Required-Start: $nginx
    # Required-Stop: $nginx
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-Description: starts php over fcgi
    # Description: starts php over fcgi
    ### END INIT INFO

    . /etc/rc.d/init.d/functions

    (( EUID )) && echo .You need to have root priviliges.. && exit 1
    BIND=/tmp/php.socket
    USER=nginx
    PHP_FCGI_CHILDREN=15
    PHP_FCGI_MAX_REQUESTS=1000

    PHP_CGI=/usr/bin/php-cgi
    PHP_CGI_NAME=`basename $PHP_CGI`
    PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND"
    RETVAL=0

    start()
    echo -n "Starting PHP FastCGI: "
    #ORIGINAL LINE
    #daemon $PHP_CGI --quiet --start --background --chuid "$USER" --exec /usr/bin/env -- $PHP_CGI_ARGS
    #MODIFIED LINE
    daemon --user=$USER $PHP_CGI -b $BIND&
    RETVAL=$?
    echo
    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/php-fcgi
    #echo "$PHP_CGI_NAME."

    stop()
    echo -n "Stopping PHP FastCGI: "
    killall -q -w -u $USER $PHP_CGI
    RETVAL=$?
    echo "$PHP_CGI_NAME."
    rm /var/lock/subsys/php-fcgi


    case "$1" in
    start)
    start
    ;;
    stop)
    stop
    ;;
    restart)
    stop
    start
    ;;
    *)
    echo "Usage: php-fastcgi restart"
    exit 1
    ;;
    esac
    exit $RETVAL


    The problem I have now is -




    1. service php-fcgi start keeps the shell blocked. If I run service php-fcgi start & and then ps aux, I see the php-cgi process running bound to the socket. I see the start command stop only when I execute service php-fcgi stop. How do I solve this blocking issue? I have tried adding an & at the end of the line spawning the daemon. But other scripts do not seem to be doing this.
      This is the most complicated script I am attempting to modify yet :-(

    2. How do I get the script to display the green [ OK ]? I checked scripts like httpd and saw that all they were doing was something as shown below. But I never see a green [ OK ] when I execute php-fcgi. I also discovered that putting echo_success with functions sourced displays the green [ OK ] but I do not see any other scripts in the /etc/rc.d/init.d/ executing echo_success or echo_failure. What have I got wrong?

    3. Also, How do i specify PHP_FCGI_CHILDREN with daemon?


    echo
    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/










    share|improve this question


























      4












      4








      4


      1






      I am trying to install fast-cgi for nginx on an EC2 instance. I followed the steps explained here, but that is meant for Debian and does not work out of the box for a red-hat based system. I modified the script a bit to look like -



      #!/bin/bash
      ### BEGIN INIT INFO
      # Provides: php-fcgi
      # Required-Start: $nginx
      # Required-Stop: $nginx
      # Default-Start: 2 3 4 5
      # Default-Stop: 0 1 6
      # Short-Description: starts php over fcgi
      # Description: starts php over fcgi
      ### END INIT INFO

      . /etc/rc.d/init.d/functions

      (( EUID )) && echo .You need to have root priviliges.. && exit 1
      BIND=/tmp/php.socket
      USER=nginx
      PHP_FCGI_CHILDREN=15
      PHP_FCGI_MAX_REQUESTS=1000

      PHP_CGI=/usr/bin/php-cgi
      PHP_CGI_NAME=`basename $PHP_CGI`
      PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND"
      RETVAL=0

      start()
      echo -n "Starting PHP FastCGI: "
      #ORIGINAL LINE
      #daemon $PHP_CGI --quiet --start --background --chuid "$USER" --exec /usr/bin/env -- $PHP_CGI_ARGS
      #MODIFIED LINE
      daemon --user=$USER $PHP_CGI -b $BIND&
      RETVAL=$?
      echo
      [ $RETVAL -eq 0 ] && touch /var/lock/subsys/php-fcgi
      #echo "$PHP_CGI_NAME."

      stop()
      echo -n "Stopping PHP FastCGI: "
      killall -q -w -u $USER $PHP_CGI
      RETVAL=$?
      echo "$PHP_CGI_NAME."
      rm /var/lock/subsys/php-fcgi


      case "$1" in
      start)
      start
      ;;
      stop)
      stop
      ;;
      restart)
      stop
      start
      ;;
      *)
      echo "Usage: php-fastcgi restart"
      exit 1
      ;;
      esac
      exit $RETVAL


      The problem I have now is -




      1. service php-fcgi start keeps the shell blocked. If I run service php-fcgi start & and then ps aux, I see the php-cgi process running bound to the socket. I see the start command stop only when I execute service php-fcgi stop. How do I solve this blocking issue? I have tried adding an & at the end of the line spawning the daemon. But other scripts do not seem to be doing this.
        This is the most complicated script I am attempting to modify yet :-(

      2. How do I get the script to display the green [ OK ]? I checked scripts like httpd and saw that all they were doing was something as shown below. But I never see a green [ OK ] when I execute php-fcgi. I also discovered that putting echo_success with functions sourced displays the green [ OK ] but I do not see any other scripts in the /etc/rc.d/init.d/ executing echo_success or echo_failure. What have I got wrong?

      3. Also, How do i specify PHP_FCGI_CHILDREN with daemon?


      echo
      [ $RETVAL -eq 0 ] && touch /var/lock/subsys/










      share|improve this question
















      I am trying to install fast-cgi for nginx on an EC2 instance. I followed the steps explained here, but that is meant for Debian and does not work out of the box for a red-hat based system. I modified the script a bit to look like -



      #!/bin/bash
      ### BEGIN INIT INFO
      # Provides: php-fcgi
      # Required-Start: $nginx
      # Required-Stop: $nginx
      # Default-Start: 2 3 4 5
      # Default-Stop: 0 1 6
      # Short-Description: starts php over fcgi
      # Description: starts php over fcgi
      ### END INIT INFO

      . /etc/rc.d/init.d/functions

      (( EUID )) && echo .You need to have root priviliges.. && exit 1
      BIND=/tmp/php.socket
      USER=nginx
      PHP_FCGI_CHILDREN=15
      PHP_FCGI_MAX_REQUESTS=1000

      PHP_CGI=/usr/bin/php-cgi
      PHP_CGI_NAME=`basename $PHP_CGI`
      PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND"
      RETVAL=0

      start()
      echo -n "Starting PHP FastCGI: "
      #ORIGINAL LINE
      #daemon $PHP_CGI --quiet --start --background --chuid "$USER" --exec /usr/bin/env -- $PHP_CGI_ARGS
      #MODIFIED LINE
      daemon --user=$USER $PHP_CGI -b $BIND&
      RETVAL=$?
      echo
      [ $RETVAL -eq 0 ] && touch /var/lock/subsys/php-fcgi
      #echo "$PHP_CGI_NAME."

      stop()
      echo -n "Stopping PHP FastCGI: "
      killall -q -w -u $USER $PHP_CGI
      RETVAL=$?
      echo "$PHP_CGI_NAME."
      rm /var/lock/subsys/php-fcgi


      case "$1" in
      start)
      start
      ;;
      stop)
      stop
      ;;
      restart)
      stop
      start
      ;;
      *)
      echo "Usage: php-fastcgi restart"
      exit 1
      ;;
      esac
      exit $RETVAL


      The problem I have now is -




      1. service php-fcgi start keeps the shell blocked. If I run service php-fcgi start & and then ps aux, I see the php-cgi process running bound to the socket. I see the start command stop only when I execute service php-fcgi stop. How do I solve this blocking issue? I have tried adding an & at the end of the line spawning the daemon. But other scripts do not seem to be doing this.
        This is the most complicated script I am attempting to modify yet :-(

      2. How do I get the script to display the green [ OK ]? I checked scripts like httpd and saw that all they were doing was something as shown below. But I never see a green [ OK ] when I execute php-fcgi. I also discovered that putting echo_success with functions sourced displays the green [ OK ] but I do not see any other scripts in the /etc/rc.d/init.d/ executing echo_success or echo_failure. What have I got wrong?

      3. Also, How do i specify PHP_FCGI_CHILDREN with daemon?


      echo
      [ $RETVAL -eq 0 ] && touch /var/lock/subsys/







      php fastcgi daemon shell-scripting init.d






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 2 at 2:54









      Pang

      15916




      15916










      asked Apr 15 '12 at 21:57









      Lord Loh.Lord Loh.

      54131023




      54131023




















          2 Answers
          2






          active

          oldest

          votes


















          3















          1. Change the daemon line to:



            daemon --user $USER --pidfile=$PIDFILE "$PHP_CGI -b $BIND &> /dev/null &"


            &> /dev/null is equipvalent to >/dev/null 2>&1, means that
            redirect both stdout and stderr to /dev/null.




          2. If that doesn't show the [ OK ] flag, try this:



            if [ -n "$pid" ]; then
            echo $pid > $PIDFILE
            success "Starting php-cgi service"
            else
            failure "Starting php-cgi service"
            fi


            Take a look at the success function in the /etc/init.d/functions
            for more details.



            The stop function should change to:



            killproc -p $PIDFILE $PHP_CGI_NAME



          3. Insert the PHP_CGI_ARGS as an environment variable to the daemon function:



            daemon --user $USER --pidfile=$PIDFILE "env - $PHP_CGI_ARGS
            $PHP_CGI -b $BIND &> /dev/null &"



          Moreover, to make it start automatically at boot, you should change the init info to the Red Hat based style:



          # chkconfig: 345 85 15
          # description: Running php-cgi
          # processname: php-cgi
          # config: /etc/sysconfig/php-cgi





          share|improve this answer

























          • There should be an echo after the success, failure or warning functions, as in success; echo "Good job!"

            – mFeinstein
            May 3 '17 at 0:55











          • As a side note, I can only print the [ OK ] message from success if I use echo, and I can't see how it should work otherwise after reading the code for success... But, there are pieces of code showing success messages without echo I have no idea how it could work, so if someone understands it, please to tell me

            – mFeinstein
            May 9 '17 at 7:17



















          2














          So, you're on a redhat based system, and you want a version of PHP that comes with FPM (the best way to do cgi on PHP >= 5.3)? Why don't you just install the packages from somewhere like IUS: http://iuscommunity.org/ , rather then trying to get a custom-built version working? The repository will allow you to stay up to date a lot easier, and will generally make your life easy.



          Once the repo is installed, this is all you'd need to do: chkconfig php-fpm start; service php-fpm start, and you'll be all set.






          share|improve this answer























          • Thank you for the suggestion. While this will help me with the fast CGI, I would still like to know how to write init scripts. I tried reading a few, but am not able to replicate their behavior.

            – Lord Loh.
            Apr 16 '12 at 17:26











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "2"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f379706%2finit-script-the-green-ok%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3















          1. Change the daemon line to:



            daemon --user $USER --pidfile=$PIDFILE "$PHP_CGI -b $BIND &> /dev/null &"


            &> /dev/null is equipvalent to >/dev/null 2>&1, means that
            redirect both stdout and stderr to /dev/null.




          2. If that doesn't show the [ OK ] flag, try this:



            if [ -n "$pid" ]; then
            echo $pid > $PIDFILE
            success "Starting php-cgi service"
            else
            failure "Starting php-cgi service"
            fi


            Take a look at the success function in the /etc/init.d/functions
            for more details.



            The stop function should change to:



            killproc -p $PIDFILE $PHP_CGI_NAME



          3. Insert the PHP_CGI_ARGS as an environment variable to the daemon function:



            daemon --user $USER --pidfile=$PIDFILE "env - $PHP_CGI_ARGS
            $PHP_CGI -b $BIND &> /dev/null &"



          Moreover, to make it start automatically at boot, you should change the init info to the Red Hat based style:



          # chkconfig: 345 85 15
          # description: Running php-cgi
          # processname: php-cgi
          # config: /etc/sysconfig/php-cgi





          share|improve this answer

























          • There should be an echo after the success, failure or warning functions, as in success; echo "Good job!"

            – mFeinstein
            May 3 '17 at 0:55











          • As a side note, I can only print the [ OK ] message from success if I use echo, and I can't see how it should work otherwise after reading the code for success... But, there are pieces of code showing success messages without echo I have no idea how it could work, so if someone understands it, please to tell me

            – mFeinstein
            May 9 '17 at 7:17
















          3















          1. Change the daemon line to:



            daemon --user $USER --pidfile=$PIDFILE "$PHP_CGI -b $BIND &> /dev/null &"


            &> /dev/null is equipvalent to >/dev/null 2>&1, means that
            redirect both stdout and stderr to /dev/null.




          2. If that doesn't show the [ OK ] flag, try this:



            if [ -n "$pid" ]; then
            echo $pid > $PIDFILE
            success "Starting php-cgi service"
            else
            failure "Starting php-cgi service"
            fi


            Take a look at the success function in the /etc/init.d/functions
            for more details.



            The stop function should change to:



            killproc -p $PIDFILE $PHP_CGI_NAME



          3. Insert the PHP_CGI_ARGS as an environment variable to the daemon function:



            daemon --user $USER --pidfile=$PIDFILE "env - $PHP_CGI_ARGS
            $PHP_CGI -b $BIND &> /dev/null &"



          Moreover, to make it start automatically at boot, you should change the init info to the Red Hat based style:



          # chkconfig: 345 85 15
          # description: Running php-cgi
          # processname: php-cgi
          # config: /etc/sysconfig/php-cgi





          share|improve this answer

























          • There should be an echo after the success, failure or warning functions, as in success; echo "Good job!"

            – mFeinstein
            May 3 '17 at 0:55











          • As a side note, I can only print the [ OK ] message from success if I use echo, and I can't see how it should work otherwise after reading the code for success... But, there are pieces of code showing success messages without echo I have no idea how it could work, so if someone understands it, please to tell me

            – mFeinstein
            May 9 '17 at 7:17














          3












          3








          3








          1. Change the daemon line to:



            daemon --user $USER --pidfile=$PIDFILE "$PHP_CGI -b $BIND &> /dev/null &"


            &> /dev/null is equipvalent to >/dev/null 2>&1, means that
            redirect both stdout and stderr to /dev/null.




          2. If that doesn't show the [ OK ] flag, try this:



            if [ -n "$pid" ]; then
            echo $pid > $PIDFILE
            success "Starting php-cgi service"
            else
            failure "Starting php-cgi service"
            fi


            Take a look at the success function in the /etc/init.d/functions
            for more details.



            The stop function should change to:



            killproc -p $PIDFILE $PHP_CGI_NAME



          3. Insert the PHP_CGI_ARGS as an environment variable to the daemon function:



            daemon --user $USER --pidfile=$PIDFILE "env - $PHP_CGI_ARGS
            $PHP_CGI -b $BIND &> /dev/null &"



          Moreover, to make it start automatically at boot, you should change the init info to the Red Hat based style:



          # chkconfig: 345 85 15
          # description: Running php-cgi
          # processname: php-cgi
          # config: /etc/sysconfig/php-cgi





          share|improve this answer
















          1. Change the daemon line to:



            daemon --user $USER --pidfile=$PIDFILE "$PHP_CGI -b $BIND &> /dev/null &"


            &> /dev/null is equipvalent to >/dev/null 2>&1, means that
            redirect both stdout and stderr to /dev/null.




          2. If that doesn't show the [ OK ] flag, try this:



            if [ -n "$pid" ]; then
            echo $pid > $PIDFILE
            success "Starting php-cgi service"
            else
            failure "Starting php-cgi service"
            fi


            Take a look at the success function in the /etc/init.d/functions
            for more details.



            The stop function should change to:



            killproc -p $PIDFILE $PHP_CGI_NAME



          3. Insert the PHP_CGI_ARGS as an environment variable to the daemon function:



            daemon --user $USER --pidfile=$PIDFILE "env - $PHP_CGI_ARGS
            $PHP_CGI -b $BIND &> /dev/null &"



          Moreover, to make it start automatically at boot, you should change the init info to the Red Hat based style:



          # chkconfig: 345 85 15
          # description: Running php-cgi
          # processname: php-cgi
          # config: /etc/sysconfig/php-cgi






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Aug 3 '12 at 5:47

























          answered Aug 3 '12 at 5:08









          quantaquanta

          43.5k15114196




          43.5k15114196












          • There should be an echo after the success, failure or warning functions, as in success; echo "Good job!"

            – mFeinstein
            May 3 '17 at 0:55











          • As a side note, I can only print the [ OK ] message from success if I use echo, and I can't see how it should work otherwise after reading the code for success... But, there are pieces of code showing success messages without echo I have no idea how it could work, so if someone understands it, please to tell me

            – mFeinstein
            May 9 '17 at 7:17


















          • There should be an echo after the success, failure or warning functions, as in success; echo "Good job!"

            – mFeinstein
            May 3 '17 at 0:55











          • As a side note, I can only print the [ OK ] message from success if I use echo, and I can't see how it should work otherwise after reading the code for success... But, there are pieces of code showing success messages without echo I have no idea how it could work, so if someone understands it, please to tell me

            – mFeinstein
            May 9 '17 at 7:17

















          There should be an echo after the success, failure or warning functions, as in success; echo "Good job!"

          – mFeinstein
          May 3 '17 at 0:55





          There should be an echo after the success, failure or warning functions, as in success; echo "Good job!"

          – mFeinstein
          May 3 '17 at 0:55













          As a side note, I can only print the [ OK ] message from success if I use echo, and I can't see how it should work otherwise after reading the code for success... But, there are pieces of code showing success messages without echo I have no idea how it could work, so if someone understands it, please to tell me

          – mFeinstein
          May 9 '17 at 7:17






          As a side note, I can only print the [ OK ] message from success if I use echo, and I can't see how it should work otherwise after reading the code for success... But, there are pieces of code showing success messages without echo I have no idea how it could work, so if someone understands it, please to tell me

          – mFeinstein
          May 9 '17 at 7:17














          2














          So, you're on a redhat based system, and you want a version of PHP that comes with FPM (the best way to do cgi on PHP >= 5.3)? Why don't you just install the packages from somewhere like IUS: http://iuscommunity.org/ , rather then trying to get a custom-built version working? The repository will allow you to stay up to date a lot easier, and will generally make your life easy.



          Once the repo is installed, this is all you'd need to do: chkconfig php-fpm start; service php-fpm start, and you'll be all set.






          share|improve this answer























          • Thank you for the suggestion. While this will help me with the fast CGI, I would still like to know how to write init scripts. I tried reading a few, but am not able to replicate their behavior.

            – Lord Loh.
            Apr 16 '12 at 17:26















          2














          So, you're on a redhat based system, and you want a version of PHP that comes with FPM (the best way to do cgi on PHP >= 5.3)? Why don't you just install the packages from somewhere like IUS: http://iuscommunity.org/ , rather then trying to get a custom-built version working? The repository will allow you to stay up to date a lot easier, and will generally make your life easy.



          Once the repo is installed, this is all you'd need to do: chkconfig php-fpm start; service php-fpm start, and you'll be all set.






          share|improve this answer























          • Thank you for the suggestion. While this will help me with the fast CGI, I would still like to know how to write init scripts. I tried reading a few, but am not able to replicate their behavior.

            – Lord Loh.
            Apr 16 '12 at 17:26













          2












          2








          2







          So, you're on a redhat based system, and you want a version of PHP that comes with FPM (the best way to do cgi on PHP >= 5.3)? Why don't you just install the packages from somewhere like IUS: http://iuscommunity.org/ , rather then trying to get a custom-built version working? The repository will allow you to stay up to date a lot easier, and will generally make your life easy.



          Once the repo is installed, this is all you'd need to do: chkconfig php-fpm start; service php-fpm start, and you'll be all set.






          share|improve this answer













          So, you're on a redhat based system, and you want a version of PHP that comes with FPM (the best way to do cgi on PHP >= 5.3)? Why don't you just install the packages from somewhere like IUS: http://iuscommunity.org/ , rather then trying to get a custom-built version working? The repository will allow you to stay up to date a lot easier, and will generally make your life easy.



          Once the repo is installed, this is all you'd need to do: chkconfig php-fpm start; service php-fpm start, and you'll be all set.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Apr 16 '12 at 0:31









          devicenulldevicenull

          5,20312029




          5,20312029












          • Thank you for the suggestion. While this will help me with the fast CGI, I would still like to know how to write init scripts. I tried reading a few, but am not able to replicate their behavior.

            – Lord Loh.
            Apr 16 '12 at 17:26

















          • Thank you for the suggestion. While this will help me with the fast CGI, I would still like to know how to write init scripts. I tried reading a few, but am not able to replicate their behavior.

            – Lord Loh.
            Apr 16 '12 at 17:26
















          Thank you for the suggestion. While this will help me with the fast CGI, I would still like to know how to write init scripts. I tried reading a few, but am not able to replicate their behavior.

          – Lord Loh.
          Apr 16 '12 at 17:26





          Thank you for the suggestion. While this will help me with the fast CGI, I would still like to know how to write init scripts. I tried reading a few, but am not able to replicate their behavior.

          – Lord Loh.
          Apr 16 '12 at 17:26

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Server Fault!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f379706%2finit-script-the-green-ok%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

          What if the end-user didn't have the required library?What is setup.py?What is a clean, pythonic way to have multiple constructors in Python?What does Ruby have that Python doesn't, and vice versa?What is the reason for having '//' in Python?How do I create a namespace package in Python?How to package shared objects that python modules depend on?setuptools vs. distutils: why is distutils still a thing?Navigation in Windows 10 vs code not going to virtualenv library when the same library is installed at user levelPython create package for local usePackaging a project that uses multiple python versionsWhy is permission denied on pip install except for when “--user” is included at end of command?

          Esgonzo ibérico Índice Descrición Distribución Hábitat Ameazas Notas Véxase tamén "Acerca dos nomes dos anfibios e réptiles galegos""Chalcides bedriagai"Chalcides bedriagai en Carrascal, L. M. Salvador, A. (Eds). Enciclopedia virtual de los vertebrados españoles. Museo Nacional de Ciencias Naturales, Madrid. España.Fotos