This is a mechanism modules can use to link themselves into the configuration process. It is useful for automatically adjusting the configuration and build parameters from the modules sources. This is the new top-level configure script from Apache 1.
Any parameterization can be done via command line options to the configure script. Since Apache 1. Currently this is a pure Unix-based solution because at present the complete Apache 1. It doesn't work on the Win32 platform for example. Besides Windows NT support this is one of most interesting features in Apache 1. Its a way to build Apache modules as so-called dynamic shared objects usually named modulename. The benefit is that the modules are part of the httpd executable only on demand, i.
This is interesting for instance in relation to memory consumption and upgrading. This is a new support tool from Apache 1. It knows the platform dependent build parameters for making DSO files and provides an easy way to run the build commands with them.
No patching of the Apache source tree is needed in the standard situation and in the APXS situation not even the Apache source tree is needed. PL in the past. And additionally the Makefile.
PL controlled the Apache build process. This approach is problematic in several ways. The new approach described below avoids these problems. This way, no conflicts can occur.
We will return to each of the above configuration mechanisms when describing different installation passes, once the overview of the four building steps is completed. The command perl Makefile. PL , which is also known as a "configuration stage" , accepts various parameters. In this section we will learn what they are, and when should they be used.
Answering 'y' confirms either Makefile. Answering 'y' will make sure an httpd binary will be built in.. PL to make a guess. If you choose not to build the binary you will have to do that manually. We will talk about it later. Note that, make test won't work until you have built the server. A callback hook abbrev. Callbacks are used when we want some action subroutine call to occur when some event takes place.
Since we don't know exactly when the event will take place we give the event handler a callback to the subroutine we want executed. The handler will call our subroutine at the right time.
Embperl , Apache::Peek , etc. Normally, if an extension is statically linked with Perl it is listed in Config. However, if an extension is statically linked with Perl after it is installed, it is not listed in Config.
You may either edit Config. PL to pass any arguments you want to the Apache. If you use t? This causes all the arguments except the first to be ignored by the configuration process. So it's better to save them in a file. Parameters supplied at the command line will override the parameters given in this file.
Notice that this file can be located in your home directory or in the.. This file can also start with dot. If you are faced with a compiled Apache and no trace of the parameters used to build it, you can usually still find them if the sources were not make clean 'd. This circumvents the need to set up a live server just to find out if a certain callback hook is available. One of the ways to find this out is to run the following code:.
You also may try to look at the symbols inside the httpd executable with help of nm 1 or a similar utility. But this will only work if you have an unstripped httpd binary. By default, make install strips the binary before installing it.
Use the --without-execstrip. Yet another approach that will work in most of the cases is to try to use the feature in question. If it wasn't configured Apache will give an error message. If you wish to pass it your own version, do this:. Where Configuration. It is possible that it's improperly installed or not installed at all.
Sometimes the reason is that your Perl executable was built on a different machine, and the software installed on your machine is not the same. Generally this happens when you install the prebuilt packages, like RPM or deb.
The dependencies weren't properly defined in the Perl binary package and you were allowed to install it, although some essential package is not installed. The most frequent pitfall is a missing gdbm library. See Missing or Misconfigured libgdbm. But why guess, when we can actually see the real error message and understand what the real problem is.
Down around line you will see a line like this:. On some Linux RedHat systems you might encounter a problem during the perl Makefile. PL stage, when the installed from the rpm package Perl was built with the gdbm library, but the library isn't actually installed.
If this is your situation make sure you install it before proceeding with the build process. Sometimes the problem is even more obscure: you do have libgdbm installed but it's not properly installed. Do this:. On some installations the libgdbm. Of course if when you read this a new version of the libgdbm library will be released, you will have to adjust the version numbers. We didn't use the usual xx version replacement here, to make it easier to understand how the symbolic links should be set.
You may have to work a bit to get both Apache and Perl to use the same library and you are likely to have trouble copying the dbm file from one system to another or even using it after an upgrade. This happens when you have a statically linked perl build i.
Build a dynamically linked perl with libperl. Library files such as libfoo. Whereas libfoo. At the linking time the application only knows which library it wants.
Only at the loading time runtime that shared library will be loaded. One of the benefits of using a shared library, is that it's loaded only once. If there are two application linking to libperl.
The second application will share that loaded library that service is provided by the OS kernel. In the case of static libfoo. Of course this is not the only benefit of using shared libs. So you have libperl. You are certainly looking at the modperl version of libperl. Some distributions notably Debian have chosen to put libperl. If building against the dynamic perl's libperl. Also see libperl. This confuses the build process. This and similar error messages may show up during the make process.
Generally it happens when you have a broken Perl installation. Make sure it's not installed from a broken RPM or another binary package. If it is, build Perl from source or use another properly built binary package. Run perl -V to learn what version of Perl you are using and other important details. This error usually reported due to the problems with some versions of SFIO library. Try to use the latest version to get around this problem.
If any of the tests fails, the make test stage will fail. Running make test will start a freshly built httpd on port running under the uid and gid of the perl Makefile.
PL process. The httpd will be terminated when the tests are finished. Each file in the testing suite generally includes more than one test, but when you do the testing, the program will only report how many tests were passed and the total number of tests defined in the test file. However if only some of the tests in the file fail you want to know which ones failed.
To gain this information you should run the tests in verbose mode. The tests are run with the SSLDisable directive. Tests are invoked by running the. Use the -v option for verbose tests. You might run an individual test like this:. The TEST script starts the server before the test is executed. You cannot run make test before you build Apache, so if you told perl Makefile. PL not to build the httpd executable, there is no httpd to run the test against. If you had a stale old Apache header layout in one of the include paths during the build process you will see this message when you try to execute httpd.
Delete it and rebuild Apache. While doing make test you will notice that some of the tests are reported as skipped. The reason is that you are missing some optional modules for these test to be passed.
For a hint you might want to peek at the content of each test you will find them all in the. I'll list a few examples, but of course things may change in the future. Install libapreq package which includes among others the Apache::Request and Apache::Cookie modules. Chances are that all of these are installed if you use CPAN.
The make test suite uses localhost to run the tests that require a network. Also make sure that you have the loopback device [lo] configured. After testing the server, the last step left is to install it. You can use Perl to manage Apache, respond to requests for web pages and much more. This lets you avoid the overhead of starting an external interpreter and avoids the penalty of Perl start-up time, giving you super-fast dynamic content.
It is licensed under the Apache Software License. Have comments? Please send them to the modperl users mailing list. Success Stories.
Mailing Lists. Maillist Subscription. Maillist Archives. The source. The 1. Learn more. Asked 7 years, 4 months ago. Active 7 years, 4 months ago. Viewed times. Improve this question. BIfrost BIfrost 11 2 2 gold badges 2 2 silver badges 7 7 bronze badges.
Add a comment. Active Oldest Votes. Improve this answer. At the present time you must have version 2. Having built and installed Apache 2. Next, run the command. If this build fails, or you want features not present in the official releases, you may want to try the sources obtained from svn - see the discussion on the 2. Be aware, though, that as well as providing bug fixes, there may be new features being added and tested in the svn versions, so at any given time there are no guarantees that these packages will build and test successfully.
At this time you must have version 2. After installing Perl and Apache 2. A quick way to do this is to download the script mpinstall and save it as, for example, mpinstall. Another way, which will be useful if you plan on installing additional Apache modules, is to add the following repository within ppm :. If you're using an ActivePerl 10xx build, based on perl Note that ActivePerl 8xx and ActivePerl 10xx are not binary compatible, which means ppm packages compiled, for example, for an 8xx build are not compatible with ActivePerl 10xx.
Note that, because of binary incompatibilities, one should not install packages for ActivePerl 8xx from a repository containing packages for ActivePerl 6xx, and vice-versa, particularly if these packages contain XS-based modules. However, in the Apache Win32 world it is particularly a good idea to use the latest version, for bug and security fixes.
If the theoryx5. There are a number of binary packages for Win32 that contain the necessary Perl and Apache binaries:.
0コメント