Loading ...
Sorry, an error occurred while loading the content.

/opt/bin/php-fcgi gives an error

Expand Messages
  • rvanderh3
    After testing with apache and thttpd I found PHPWebAppUsingFastCGI. I followed the manual. But when starting php-fcgi it halts with the warnings: PHP Warning:
    Message 1 of 11 , May 7, 2006
    • 0 Attachment
      After testing with apache and thttpd I found PHPWebAppUsingFastCGI. I
      followed the manual. But when starting php-fcgi it halts with the
      warnings:
      PHP Warning: Module 'dom' already loaded in Unknown on line 0
      PHP Warning: Module 'xml' already loaded in Unknown on line 0

      Not hindered with knowledge I decided to uncomment these extensions in
      php.ini. When startig php-fcgi it doesn't give me these warnings
      anymore, but also doesn't give me back my prompt. If I start cherokee
      with php-fcgi i cherokee.conf it doesn't give any website. With a
      standard cherokee.conf it's no problem, but php is not interpreted.

      Anybody knows what to do about this ?

      Thx, Rik
    • Brian Zhou
      These warnings are probably harmless. The core php compiles dom & xml as module, and php-fcgi compiles them built-in. A quick test shows that a simple info.php
      Message 2 of 11 , May 7, 2006
      • 0 Attachment
        These warnings are probably harmless. The core php compiles dom & xml
        as module, and php-fcgi compiles them built-in.

        A quick test shows that a simple info.php page still works. I'll try
        to figure out a better compilation option later when I have time.

        php-fcgi without any parameter will launch the php executable, and
        read stdin. So if it does not give back your prompt, it's expected. If
        you press ctrl-D, it will end. Another way is to skip the manual
        php-fcgi launch, since cherokee will automatically launch php-fcgi for
        you if it's on the same machine.

        If you only want to make sure about php-fcgi version, you can use
        "php-fcgi -v".

        -Brian Zhou

        --- In nslu2-general@yahoogroups.com, "rvanderh3" <rvanderh@...> wrote:
        >
        > After testing with apache and thttpd I found PHPWebAppUsingFastCGI. I
        > followed the manual. But when starting php-fcgi it halts with the
        > warnings:
        > PHP Warning: Module 'dom' already loaded in Unknown on line 0
        > PHP Warning: Module 'xml' already loaded in Unknown on line 0
        >
        > Not hindered with knowledge I decided to uncomment these extensions in
        > php.ini. When startig php-fcgi it doesn't give me these warnings
        > anymore, but also doesn't give me back my prompt. If I start cherokee
        > with php-fcgi i cherokee.conf it doesn't give any website. With a
        > standard cherokee.conf it's no problem, but php is not interpreted.
        >
        > Anybody knows what to do about this ?
        >
        > Thx, Rik
        >
      • rvanderh3
        ... Thanks. It looks like starting cherokee.conf with /opt/sbin/cherokee -C cherokee.conf doesn t work well because of the php-fcgi warnings. My cherokee.conf
        Message 3 of 11 , May 7, 2006
        • 0 Attachment
          --- In nslu2-general@yahoogroups.com, "Brian Zhou" <b88zhou@...> wrote:
          >
          > These warnings are probably harmless. The core php compiles dom & xml
          > as module, and php-fcgi compiles them built-in.
          >
          > A quick test shows that a simple info.php page still works. I'll try
          > to figure out a better compilation option later when I have time.

          Thanks. It looks like starting cherokee.conf with
          /opt/sbin/cherokee -C cherokee.conf
          doesn't work well because of the php-fcgi warnings.

          My cherokee.conf is from DeployPHPWebAppUsingFastCGI
          -----
          Port 8082
          IPv6 Off
          Timeout 60
          KeepAlive On
          MaxKeepAliveRequests 500
          ServerTokens Full
          PidFile /var/run/cherokee.pid
          Icons /opt/etc/cherokee/icons.conf
          MimeFile /opt/etc/cherokee/mime.types
          MimeFile /opt/etc/cherokee/mime.compression.types
          Include /opt/etc/cherokee/advanced.conf
          Include /opt/etc/cherokee/mods-enabled
          Documentroot /opt/share/www/cherokee
          DirectoryIndex index.html
          Extension php, php3, php4, php5 {
          Handler fcgi {
          Server 192.168.1.77:8002 {
          Env PHP_FCGI_MAX_REQUESTS "4000"
          Env PHP_FCGI_CHILDREN "4"
          Interpreter "/opt/bin/php-fcgi -b 8002"
          }
          }
          }
          -----
          When I go to http:/myslug:1082 I get
          405 Method Not Allowed
        • janne5011
          ... enabled /default and used the default cherokee.conf with this little change Include /opt/etc/cherokee/sites-enabled/default then simply put cherokee
          Message 4 of 11 , May 7, 2006
          • 0 Attachment
            > I got the same problem but when I put php-fcgi-part in "sites-
            enabled"/default
            and used the default cherokee.conf with this little change
            "Include /opt/etc/cherokee/sites-enabled/default"
            then simply put "cherokee" without -c in commandline and look if it
            gives errors.
            then php works =)
            with the method in the wiki html-pages didnt work (405error not
            supported or something)
            but Im complete new to this so I can have something wrong-(?)

            //Janne

            If I start cherokee
            > with php-fcgi i cherokee.conf it doesn't give any website. With a
            > standard cherokee.conf it's no problem, but php is not interpreted.
            >
            > Anybody knows what to do about this ?
            >
            > Thx, Rik
            >
          • rvanderh3
            ... Okay, I appended Extension php, php3, php4, php5 { Handler fcgi { Server 192.168.1.77:8002 { Env PHP_FCGI_MAX_REQUESTS 4000 Env PHP_FCGI_CHILDREN 4
            Message 5 of 11 , May 7, 2006
            • 0 Attachment
              --- In nslu2-general@yahoogroups.com, "janne5011" <janne5011@...> wrote:
              >
              > > I got the same problem but when I put php-fcgi-part in "sites-
              > enabled"/default
              > and used the default cherokee.conf with this little change
              > "Include /opt/etc/cherokee/sites-enabled/default"
              > then simply put "cherokee" without -c in commandline and look if it
              > gives errors.
              > then php works =)

              Okay, I appended
              Extension php, php3, php4, php5 {
              Handler fcgi {
              Server 192.168.1.77:8002 {
              Env PHP_FCGI_MAX_REQUESTS "4000"
              Env PHP_FCGI_CHILDREN "4"
              Interpreter "/opt/bin/php-fcgi -b 8002"
              }
              }
              }
              to opt/etc/cherokee/sites-enabled/default ->
              /opt/etc/cherokee/sites-available/default
              (while i was asking myself why port 8002, where in the beginning of
              this file is port 8082 ?)

              and I put the includeline in cherokee.conf

              stopped cherokee and started it with
              /opt/sbin/cherokee cherokee.conf

              hmm, makes no difference.
            • janne5011
              ok I got this in the end of sites-enabled/default and sites- available/default: ..... ## Extension: ## Set some basic extensions ## ## NOTE: Probably it is a
              Message 6 of 11 , May 7, 2006
              • 0 Attachment
                ok I got this in the end of sites-enabled/default and sites-
                available/default:
                .....
                ## Extension:
                ## Set some basic extensions
                ##
                ## NOTE: Probably it is a good idea to keep these definitions
                ## at the end of the file (higher priority)
                ##

                Extension php, php3, php4, php5 {
                Handler fcgi {
                Server localhost:8002 {
                Env PHP_FCGI_MAX_REQUESTS "4000"
                Env PHP_FCGI_CHILDREN "4"
                Interpreter "/opt/bin/php-fcgi -b 8002"
                }
                }
                }

                Port is set in cherokee.conf to 81
                and for restart: "cherokee".
                I dont know what is 8002 for and Im not sure why but it works
                =)
                http://jnrn.sytes.net/
                //J



                > >
                > > > I got the same problem but when I put php-fcgi-part in "sites-
                > > enabled"/default
                > > and used the default cherokee.conf with this little change
                > > "Include /opt/etc/cherokee/sites-enabled/default"
                > > then simply put "cherokee" without -c in commandline and look if
                it
                > > gives errors.
                > > then php works =)
                >
                > Okay, I appended
                > Extension php, php3, php4, php5 {
                > Handler fcgi {
                > Server 192.168.1.77:8002 {
                > Env PHP_FCGI_MAX_REQUESTS "4000"
                > Env PHP_FCGI_CHILDREN "4"
                > Interpreter "/opt/bin/php-fcgi -b 8002"
                > }
                > }
                > }
                > to opt/etc/cherokee/sites-enabled/default ->
                > /opt/etc/cherokee/sites-available/default
                > (while i was asking myself why port 8002, where in the beginning of
                > this file is port 8082 ?)
                >
                > and I put the includeline in cherokee.conf
                >
                > stopped cherokee and started it with
                > /opt/sbin/cherokee cherokee.conf
                >
                > hmm, makes no difference.
                >
              • rvanderh3
                ... Ah great Janne it s working now ! Next step installing phpmyadmin. http://sluggy/phpmyadmin gives me: cannot load mysql extension; please check PHP
                Message 7 of 11 , May 8, 2006
                • 0 Attachment
                  --- In nslu2-general@yahoogroups.com, "janne5011" <janne5011@...> wrote:

                  Ah great Janne it's working now !

                  Next step installing phpmyadmin.
                  http://sluggy/phpmyadmin gives me:
                  cannot load mysql extension;
                  please check PHP configuration

                  Tried changing 'mysql' into 'mysqli' in config.inc.php
                  $cfg['Servers'][$i]['extension'] = 'mysql';
                • janne5011
                  ... Good to hear php works..:) I struggle with the same problem and work more on it when I have time this week.. dont forget to write here if you found out how
                  Message 8 of 11 , May 8, 2006
                  • 0 Attachment
                    --- In nslu2-general@yahoogroups.com, "rvanderh3" <rvanderh@...>
                    wrote:
                    >
                    > --- In nslu2-general@yahoogroups.com, "janne5011" <janne5011@>
                    wrote:
                    >
                    > Ah great Janne it's working now !


                    >
                    > Next step installing phpmyadmin.
                    > http://sluggy/phpmyadmin gives me:
                    > cannot load mysql extension;
                    > please check PHP configuration
                    >
                    > Tried changing 'mysql' into 'mysqli' in config.inc.php
                    > $cfg['Servers'][$i]['extension'] = 'mysql';
                    >
                    Good to hear php works..:)
                    I struggle with the same problem and work more on it when I have time
                    this week..
                    dont forget to write here if you found out how to !
                    but i try to learn php with db in txtfiles and I have no hurry on
                    this
                    check http://192.168.1.77:8000/phpmyadmin/
                    If that works you have apache installed and must get rid off it,
                    phpmyadmin works with apache so I hope it works with cherokee..
                  • Robert Hammond
                    In message , janne5011 writes ... Strange because phpmyadmin works just fine for me using the latest optware
                    Message 9 of 11 , May 8, 2006
                    • 0 Attachment
                      In message <e3ocs6+7tva@...>, janne5011 <janne5011@...>
                      writes
                      >--- In nslu2-general@yahoogroups.com, "rvanderh3" <rvanderh@...>
                      >wrote:
                      >>
                      >> --- In nslu2-general@yahoogroups.com, "janne5011" <janne5011@>
                      >wrote:
                      >>
                      >> Ah great Janne it's working now !
                      >
                      >
                      >>
                      >> Next step installing phpmyadmin.
                      >> http://sluggy/phpmyadmin gives me:
                      >> cannot load mysql extension;
                      >> please check PHP configuration
                      >>
                      >> Tried changing 'mysql' into 'mysqli' in config.inc.php
                      >> $cfg['Servers'][$i]['extension'] = 'mysql';
                      >>
                      >Good to hear php works..:)
                      >I struggle with the same problem and work more on it when I have time
                      >this week..
                      >dont forget to write here if you found out how to !
                      >but i try to learn php with db in txtfiles and I have no hurry on
                      >this
                      >check http://192.168.1.77:8000/phpmyadmin/
                      >If that works you have apache installed and must get rid off it,
                      >phpmyadmin works with apache so I hope it works with cherokee..
                      >
                      Strange because phpmyadmin works just fine for me using the latest
                      optware Cherokee and Php-Fcgi running in Fcgi mode with unslung 5.5

                      I have made some changes to various config files such as :-

                      In PHP increasing the allowed memory limit to 16M (from 8M) and changing
                      some other memory and timeout defaults. Changing to 16M was a crucial
                      step regarding getting Gallery and Gallery2 working. Suggest that you
                      try this.

                      In Cherokee increasing the default time out and perhaps some other minor
                      changes.
                      --
                      Robert Hammond
                      PGP:0x154144DA
                    • rvanderh3
                      ... changing ... minor ... It doesn t look like a timeout. html-output just stops as soon as mysql-code gets in sight. I tried a really simple script which is
                      Message 10 of 11 , May 8, 2006
                      • 0 Attachment
                        --- In nslu2-general@yahoogroups.com, Robert Hammond <rob.hammond@...>
                        wrote:

                        > Strange because phpmyadmin works just fine for me using the latest
                        > optware Cherokee and Php-Fcgi running in Fcgi mode with unslung 5.5
                        >
                        > I have made some changes to various config files such as :-
                        >
                        > In PHP increasing the allowed memory limit to 16M (from 8M) and
                        changing
                        > some other memory and timeout defaults. Changing to 16M was a crucial
                        > step regarding getting Gallery and Gallery2 working. Suggest that you
                        > try this.
                        >
                        > In Cherokee increasing the default time out and perhaps some other
                        minor
                        > changes.

                        It doesn't look like a timeout. html-output just stops as soon as
                        mysql-code gets in sight. I tried a really simple script which is
                        working on my pc. On the slug it only gives '<br><b>Start</b><br>'

                        <?php $hostname= "localhost";
                        $user= "rik"; $dbn= "riktest";
                        $pass= "xxxx";
                        echo "<b>Start</b><br>";
                        $qry="select * from riktest.tja1";
                        $connectie= mysql_connect($hostname, $user, $pass);
                        mysql_select_db($dbn, $connectie);
                        mysql_query($qry,$connectie);
                        $result=mysql_query( $qry, $connectie);
                        while ($row= mysql_fetch_row($result)) {
                        echo "<br>" . $row[0] . "<TAB>" . $row[1] ;
                        }
                        mysql_close($connectie);
                        echo "<br><b>Einde</b>";
                        ?>

                        I actually miss a good php error log. Anybody a suggestion how to
                        organize this ?
                      • rvanderh3
                        I found out that my php version (5.0.x) was different from my php-mysql and php-cfgi version (5.1.4.1). I reinstalled everything to 5.1.4.1. Did a reboot. And
                        Message 11 of 11 , May 10, 2006
                        • 0 Attachment
                          I found out that my php version (5.0.x) was different from my
                          php-mysql and php-cfgi version (5.1.4.1). I reinstalled everything to
                          5.1.4.1. Did a reboot. And now my test php script is working.

                          phpmyadmin in /opt/var/www/cherokee/phpmyadmin is not working. But
                          there still is this old version of phpmyadmin in /var/www/phpmyadmin
                          which I linked to /var/www/cherokee/pmatest and quess what ...... It's
                          working and it's much quicker then apache.

                          Thanks, Rik
                        Your message has been successfully submitted and would be delivered to recipients shortly.