Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Experimenting Ajax - problem installing Apache2::Ajax

by randyk (Parson)
on Oct 02, 2007 at 20:06 UTC ( #642232=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Experimenting Ajax - problem installing Apache2::Ajax
in thread Experimenting Ajax - problem installing Apache2::Ajax

The configuration dialogue I was referring to was the part when it asked

Please provide a full path to 'httpd' executable: [] /etc/init.d/apache2
Depending on your PATH environment variable, this might be the result of running which apache2. To check, examine the /etc/init.d/apache2 script and look for a line that points to the httpd binary; on my system, it looks like
# the path to your httpd binary, including options if necessary HTTPD='/usr/local/httpd/bin/httpd' #
which indicates the full path to the binary is /usr/local/httpd/bin/httpd. Similarly, the apxs script (which might be called apxs2) may be the result of running which apxs, or it might be under the same directory as httpd.

If you have multiple apache installations, you have to make sure that the httpd that you specify is the mod_perl-enabled one.


Comment on Re^3: Experimenting Ajax - problem installing Apache2::Ajax
Download Code
Re^4: Experimenting Ajax - problem installing Apache2::Ajax
by Anonymous Monk on Oct 03, 2007 at 07:10 UTC
    /etc/init.d/apache2 basically just calls apache2ctl which is in /usr/sbin/apache2ctl which contains
    # the path to your httpd binary, including options if necessary HTTPD='/usr/sbin/apache2' #
    so I've found https
    which apxs -> no results
    which apxs2 -> no results
    Moreover trying to install Apache2::Ajax from source or from cpan doesn't ask me any more to introduce the full path to httpd executable. Maybe the wrong path has been saved somewhere but how to find it?

    Summing up:
    1) now I know which is the path to httpd but not where are my apxs|apxs2.
    2) The dialogue configuration doesn't appear any more.

    Here is the output of my Apache2::Ajax installation
    CPAN.pm: Going to build R/RK/RKOBES/Apache2-Ajax-0.1.tar.gz [ info] generating script t/TEST Checking if your kit is complete... Looks good Writing Makefile for Apache2::Ajax cp lib/Apache2/Ajax.pm blib/lib/Apache2/Ajax.pm Manifying blib/man3/Apache2::Ajax.3pm /usr/bin/make -- OK Running make test /usr/bin/perl -Iblib/arch -Iblib/lib \ t/TEST -clean [warning] setting ulimit to allow core files ulimit -c unlimited; /usr/bin/perl /home/om/.cpan/build/Apache2-Ajax-0 +.1/t/TEST -clean APACHE_TEST_GROUP= APACHE_TEST_HTTPD= APACHE_TEST_PORT= APACHE_TEST_US +ER= APACHE_TEST_APXS= \ /usr/bin/perl -Iblib/arch -Iblib/lib \ t/TEST -bugreport -verbose=0 [warning] setting ulimit to allow core files ulimit -c unlimited; /usr/bin/perl /home/om/.cpan/build/Apache2-Ajax-0 +.1/t/TEST -bugreport -verbose=0 Usage: /etc/init.d/apache2 start|stop|restart|reload|force-reload Usage: /etc/init.d/apache2 start|stop|restart|reload|force-reload Usage: /etc/init.d/apache2 start|stop|restart|reload|force-reload [ error] You are using mod_perl response handlers [ error] but do not have a mod_perl capable Apache. make: *** [run_tests] Error 1 /usr/bin/make test -- NOT OK Running make install make test had returned bad status, won't install without force
      Theoretically, you don't need apxs to run the tests. What might be an idea is to run the tests manually, using the option in Apache::Test to override the runtime configuration, so that you can make sure that the location of httpd you're using is the right one.
Re^4: Experimenting Ajax - problem installing Apache2::Ajax
by emotiv (Novice) on Oct 04, 2007 at 09:05 UTC
    Almost done... Almost installed apxs2
    sudo apt-get update sudo apt-get install apache2-threaded-dev
    now which apxs2 gives me /usr/bin/apxs2 so i exported APACHE_TEST_HTTPD and APACHE_TEST_APXS
    export APACHE_TEST_HTTPD="/usr/sbin/apache2ctl" export APACHE_TEST_APXS="/usr/bin/apxs2"
    from CPAN
    cpan> install Apache2::Ajax CPAN: Storable loaded ok Going to read /home/om/.cpan/Metadata Database was generated on Thu, 04 Oct 2007 00:36:44 GMT Running install for module Apache2::Ajax Running make for R/RK/RKOBES/Apache2-Ajax-0.1.tar.gz CPAN: Digest::MD5 loaded ok CPAN: Compress::Zlib loaded ok Checksum for /home/om/.cpan/sources/authors/id/R/RK/RKOBES/Apache2-Aja +x-0.1.tar.gz ok Scanning cache /home/om/.cpan/build for sizes Apache2-Ajax-0.1/ Apache2-Ajax-0.1/t/ Apache2-Ajax-0.1/t/response/ Apache2-Ajax-0.1/t/response/TestAjax/ Apache2-Ajax-0.1/t/response/TestAjax/basic.pm Apache2-Ajax-0.1/t/response/TestAjax/no_build.pm Apache2-Ajax-0.1/t/response/TestAjax/show_js.pm Apache2-Ajax-0.1/t/response/TestAjax/error_fn.pm Apache2-Ajax-0.1/t/response/TestAjax/error_html.pm Apache2-Ajax-0.1/t/response/TestAjax/formdump.pm Apache2-Ajax-0.1/t/response/TestAjax/subs.pm Apache2-Ajax-0.1/t/response/TestAjax/chained.pm Apache2-Ajax-0.1/t/ajax/ Apache2-Ajax-0.1/t/ajax/show_js.t Apache2-Ajax-0.1/t/ajax/formdump.t Apache2-Ajax-0.1/t/ajax/pod.t Apache2-Ajax-0.1/t/ajax/subs.t Apache2-Ajax-0.1/t/ajax/error_fn.t Apache2-Ajax-0.1/t/ajax/error_html.t Apache2-Ajax-0.1/t/ajax/chained.t Apache2-Ajax-0.1/t/ajax/no_build.t Apache2-Ajax-0.1/t/conf/ Apache2-Ajax-0.1/t/conf/extra.conf.in Apache2-Ajax-0.1/t/TEST.PL Apache2-Ajax-0.1/Changes Apache2-Ajax-0.1/MANIFEST Apache2-Ajax-0.1/lib/ Apache2-Ajax-0.1/lib/Apache2/ Apache2-Ajax-0.1/lib/Apache2/Ajax.pm Apache2-Ajax-0.1/META.yml Apache2-Ajax-0.1/README Apache2-Ajax-0.1/Makefile.PL Apache2-Ajax-0.1/Build.PL CPAN.pm: Going to build R/RK/RKOBES/Apache2-Ajax-0.1.tar.gz [ info] generating script t/TEST Checking if your kit is complete... Looks good Writing Makefile for Apache2::Ajax cp lib/Apache2/Ajax.pm blib/lib/Apache2/Ajax.pm Manifying blib/man3/Apache2::Ajax.3pm /usr/bin/make -- OK Running make test /usr/bin/perl -Iblib/arch -Iblib/lib \ t/TEST -clean [warning] setting ulimit to allow core files ulimit -c unlimited; /usr/bin/perl /home/om/.cpan/build/Apache2-Ajax-0 +.1/t/TEST -clean APACHE_TEST_GROUP= APACHE_TEST_HTTPD=/usr/sbin/apache2 APACHE_TEST_POR +T= APACHE_TEST_USER= APACHE_TEST_APXS=/usr/bin/apxs2 \ /usr/bin/perl -Iblib/arch -Iblib/lib \ t/TEST -bugreport -verbose=0 [warning] setting ulimit to allow core files ulimit -c unlimited; /usr/bin/perl /home/om/.cpan/build/Apache2-Ajax-0 +.1/t/TEST -bugreport -verbose=0 [warning] root mode: changing the files ownership to 'nobody' (65534:6 +5534) [warning] testing whether 'nobody' is able to -rwx /home/om/.cpan/buil +d/Apache2-Ajax-0.1/t "/usr/bin/perl" -Mlib=/usr/lib/perl5 -MApache::TestRun -e 'eval { Apac +he::TestRun::run_root_fs_test(65534, 65534, q[/home/om/.cpan/build/Ap +ache2-Ajax-0.1/t]) }'; [warning] result: OK [warning] the client side drops 'root' permissions and becomes 'nobody +' /usr/sbin/apache2 -d /home/om/.cpan/build/Apache2-Ajax-0.1/t -f /home +/om/.cpan/build/Apache2-Ajax-0.1/t/conf/httpd.conf -D APACHE2 -D PERL +_USEITHREADS using Apache/2.0.55 (prefork MPM) waiting 60 seconds for server to start: .. waiting 60 seconds for server to start: ok (waited 0 secs) server localhost:8529 started t/ajax/basic.........ok + 3/24 skipped: various reasons t/ajax/chained.......ok + t/ajax/error_fn......ok + t/ajax/error_html....ok + t/ajax/formdump......ok + t/ajax/no_build......ok + t/ajax/pod...........skipped all skipped: Test::Pod 1.00 required for testing POD t/ajax/show_js.......ok + t/ajax/subs..........ok + All tests successful, 1 test and 3 subtests skipped. Files=9, Tests=52, 2 wallclock secs ( 1.83 cusr + 0.26 csys = 2.09 +CPU) [warning] root mode: restoring the original files ownership [warning] server localhost:8529 shutdown /usr/bin/make test -- OK Running make install Manifying blib/man3/Apache2::Ajax.3pm Installing /usr/local/share/perl/5.8.7/Apache2/Ajax.pm Writing /usr/local/lib/perl/5.8.7/auto/Apache2/Ajax/.packlist Appending installation info to /usr/local/lib/perl/5.8.7/perllocal.pod /usr/bin/make install UNINST=1 -- OK
    The module installation seems complete and without errors however as soon as I specify in my apache configuration file
    PerlModule Apache2::Ajax <FilesMatch "do\.ajax$"> SetHandler perl-script PerlResponseHandler MyHandler::Ajax PJX_fn LoadGrid LoadGrid PJX_html Show_Form_sub PJX_JSDEBUG 2 PJX_DEBUG 1 </FilesMatch>
    I get the following:
    Invalid command 'PJX_fn' perhaps mis-spelled or defined by a module not included in the server configuration

    Any clues?

    In any case thank you Randy for everything
      That's great that it works. The problem you encounter now can be fixed by using PerlLoadModule Apache2::Ajax, rather than PerlModule Apache2::Ajax, in your Apache configuration file.
        Yesss!!!
        Your help has been priceless.
        I hope this thread will be useful to many other Apache2::Ajax fans.
        Now we will be able to do some great sperimentation with this promising module improving accessibility and usability on the web.
        All the best ; )

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://642232]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2014-08-21 20:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (143 votes), past polls