Results 1 to 15 of 15
  1. #1
    Join Date
    Oct 2002
    Posts
    13

    Talking Unanswered: Zeus+FastCGI+PHP

    Hey
    About our thread at vB.com Paul, i'm wondering about all that aliases and handlers, are they relative to docroot or zeushome?
    Damn, i'm going nuts

  2. #2
    Join Date
    Feb 2001
    Location
    NC, USA
    Posts
    200
    The 'Requests for...' is relative to docroot and the 'Are mapped to...' is the real and full path on your server. Unless it's a remote responder and then the mapped to is a server : port.

    These fancy GUIs can be confusing when you're used to working with text config files.

    After you're familiar with it and it's all running you'll definately be happy with it... honest!

  3. #3
    Join Date
    Oct 2002
    Posts
    13
    Yup, i really love the .conf files, a lot easier to work with.
    I asked you about the paths coz i've managed to get things going with Apache+FastCGI, and this is how i've done it.
    Grabbed:
    fcgi-2.2.12.tar.gz -> DevKit
    mod_fcgi -> Apache Module -> this is later dumped into <apachedir>/usr/modules/fastcgi
    untar it
    done a
    Code:
    # ./configure
    # make
    # make install
    all done with fastcgi
    now compiling php
    Code:
    # ./configure --prefix=/usr/local ......... --with-fastcgi --with-apache=../apache_1.3.27.....
    # make
    # make install
    all done with php

    going to apache
    Code:
    # ./configure --prefix=/usr/local ....... --enable-module=src/modules/fastcgi/ libfastcgi.a
    # make
    # make install
    Notice that no libphp4.a module is activated.
    Done with apache.
    editing httpd.conf
    Code:
    FastCgiServer /usr/local/bin/php
     AddHandler php-fastcgi .php
     <Location /bin/php>
         SetHandler fastcgi-script
     </Location>
     Action php-fastcgi /bin/php
     DirectoryIndex index.html index.shtml index.cgi index.php
     AddType application/x-httpd-php .php
    Now this puzzled me
    Both lines containing /bin/php, for fastcgi to work i had to create a bin directory under htdocs Apache directory and dump php executable into it.
    Like this, fastcgi will work.
    Any feedback Paul?
    BTW, you're back to Zeus, i saw that.

  4. #4
    Join Date
    Feb 2001
    Location
    NC, USA
    Posts
    200
    The <Location> directive is always relative to the docroot. If you want to use absolute paths, you shoudl use the <Directory> directive.

    In this case, the best option is probably to just create a symlink to the php binary in a real directory off your Apache root called /fcgi-bin/ or something.

    PS. How did you know I was on Zeus? You haven't been getting any Bad Gateway errors have you?

  5. #5
    Join Date
    Oct 2002
    Posts
    13
    Went through your instructions again and *BOOM*, it worked.
    Zeus+FastCGI working flawlessly!!
    Now let's try this baby with phpaccelerator.
    Thank you so much Paul

  6. #6
    Join Date
    Oct 2002
    Posts
    13

    Question

    What about gzipping?
    Is it possible to install mod_gzip with Zeus

  7. #7
    Join Date
    Feb 2001
    Location
    NC, USA
    Posts
    200
    Originally posted by nuno
    What about gzipping?
    Is it possible to install mod_gzip with Zeus
    Yes. Under 'Content Compression'
    Attached Thumbnails Attached Thumbnails zeus-gzip.gif  

  8. #8
    Join Date
    Oct 2002
    Posts
    13
    Duh!
    Thanks.

  9. #9
    Join Date
    Oct 2002
    Posts
    13
    Originally posted by Paul
    PS. How did you know I was on Zeus? You haven't been getting any Bad Gateway errors have you?
    Blame it on leknor's page
    BTW, have you notice a serverload increase with Zeus?

  10. #10
    Join Date
    Feb 2001
    Location
    NC, USA
    Posts
    200
    Originally posted by nuno
    Blame it on leknor's page
    BTW, have you notice a serverload increase with Zeus?
    Nope. I've actually seen a drop in load during peak periods (700 people online). I believe this due to the Zeus's threaded model.

  11. #11
    Join Date
    Oct 2002
    Posts
    13
    Odd
    Mine went from 1.2 with Apache to 1.7 with Zeus.
    ...........Zeus's threaded model.
    Threaded Model?

  12. #12
    Join Date
    Feb 2001
    Location
    NC, USA
    Posts
    200
    Originally posted by nuno
    Threaded Model?
    Apache forks a new process for each request, whereas Zeus simply starts a new thread within the same process.

    Apache 2 also has the option of using threads.

  13. #13
    Join Date
    Feb 2001
    Location
    NC, USA
    Posts
    200
    Originally posted by nuno
    Odd
    Mine went from 1.2 with Apache to 1.7 with Zeus.
    Did you have PHP Accelerator installed with Apache. Once you install with Zeus, you should see it drop well below.

  14. #14
    Join Date
    Oct 2002
    Posts
    13
    Originally posted by Paul
    Did you have PHP Accelerator installed with Apache. Once you install with Zeus, you should see it drop well below.
    Yup phpaca1.3.3r1

  15. #15
    Join Date
    Feb 2003
    Posts
    1

    Cool fast-cgi php install

    Hello,

    I have a problem when I try to install Apache+PHP+FastCGI. Could help me to
    find what is wrong ?


    Installation & configuration on Linux RH 7.3 :

    sablotron : (XML engine)
    -----------

    ./configure --prefix=/usr/local/sablotron
    make && make install


    fcgi-2.2.2 :
    ------------
    ./configure --prefix=/usr/local/fcgi
    make && make install

    php 4.3.0:
    ----------
    ./configure --prefix=/usr/local/php --with-mysql --with-apache=/usr/local/ap
    ache_1.3.27 --with-xslt-sablot=/usr/local/sablotron/ --enable-xslt --with-fa
    stcgi=/usr/local/fcgi
    make && make install

    mod_fastcgi 2.4.0:
    ------------------

    "tar xcvf" of the tarball in the apache_1.3.27/src/modules directory & "mv
    mod_fastcgi-2.4.0 mod_fastcgi"

    apache 1.3.27 :
    ---------------
    ./configure --prefix=/usr/local/apache --activate-module=src/modules/fastcgi
    /libfastcgi.a
    make && make install


    - I configure and install Apache in a chrooted environment (It works fine
    and Apache with only PHP works fine too)

    - I put the php binary from /usr/local/php/bin in the /usr/local/apache/bin
    directory

    - In my httpd.Conf, I put the following lines to handle fastcgi :

    #Fast-CGI
    FastCgiServer /bin/php <= path in my chrooted env (ie
    /usr/local/apache/bin)
    AddHandler php-fastcgi .php
    <Location /> <= root directory for my ".php" files
    SetHandler fastcgi-script
    </Location>
    Action php-fastcgi /bin/php

    .... and I have the following messages when I try to start the Apache web
    server:


    Error messages :
    ----------------

    [Tue Feb 11 17:23:43 2003] [info] created shared memory segment #1605632
    [Tue Feb 11 17:23:43 2003] [notice] Apache/1.3.27 (Unix) mod_fastcgi/2.4.0
    configured -- resuming normal operations
    [Tue Feb 11 17:23:43 2003] [info] Server built: Feb 11 2003 18:16:40
    [Tue Feb 11 17:23:43 2003] [notice] Accept mutex: sysvsem (Default: sysvsem)
    [Tue Feb 11 17:23:43 2003] [notice] FastCGI: process manager initialized
    (pid 2122)
    [Tue Feb 11 17:23:43 2003] [warn] FastCGI: server "/bin/php" started (pid
    2124)
    PHP Fatal error: input in flex scanner failed in - on line 1

    Fatal error: input in flex scanner failed in - on line 1
    [Tue Feb 11 17:23:43 2003] [warn] FastCGI: server "/bin/php" (pid 2124)
    terminated by calling exit with status '0'
    [Tue Feb 11 17:23:48 2003] [warn] FastCGI: server "/bin/php" restarted (pid
    2125)
    PHP Fatal error: input in flex scanner failed in - on line 1


    Thank you in advance for your help.

    Best Regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •