You are not logged in Log in Join
You are here: Home » Members » andym » wiki » ZopePyPerl » wikipage_view

Log in
Name

Password

 
 
FrontPage » WinDows »

ZopePyPerl

Installing Zope 2.4.3 for windows

My System:

-Windows 2000 Professional

-Perl 5.6.1 (built by me)

-perl is in the path environment variable

-Apache 1.3.20 (windows binary install)

-VC++ (for compilation of the perl modules)

Procedure:

  1. Install Zope 2.4.3 using binary windows install program.

    Note:

    I had trouble getting Zope to properly start and shut down on this installation. I had previously installed 2.4.1, uninstalled it, and installed and uninstalled 2.4.3

    The problem occured when trying to shut down the Zope service. The service applet times out and then reports the service as shut down. However, attempts to connect to Zope with the service shut down succeed. Zope simply starts up and runs. When Zope is started in this way, however, a Python process is started (you can see it in the Task Manager) and attempts to manually shut down the protected process fail.

    To avoid this, I have re-installed Zope, choosing to start it manually, not as a service. Attempting to connect to Zope without first running start.bat still results in a protected (and unstoppable) python process starting up. But, starting the server through start.bat allows me to shut down the server normally.

  2. Edit the httpd.conf file for Apache to include the following directives:
      RewriteEngine on
      RewriteLog C:\desired\log\path\ModRewrite.log
      RewriteCond %{HTTP:Authorization}  ^(.*)
      # redirect all requests containing /Zope/ to Zope.cgi, adding whatever is found after /Zope/ to the URL
      # ie http://localhost/Zope/manage becomes http://localhost/Zope/cgi-bin/Zope.cgi/manage
      RewriteRule ^/Zope/(.*) /path/to/Zope/cgi-bin/Zope.cgi/$1 [E=HTTP_CGI_AUTHORIZATION:%1,T=application/x-httpd-cgi,L]
      ScriptAlias /path/to/Zope/cgi-bin/ "C:/local/path/to/Zope/cgi-bin/"
      <Directory "C:/local/path/to/Zope/cgi-bin/">
        AllowOverride None
        Options ExecCGI
        Order allow,deny
        Allow from all
      </Directory>
    
  3. Copy the Zope.cgi file found in the root of your Zope installation into C:/local/path/to/Zope/cgi-bin
  4. Start Zope
    • if you installed Zope as a service, it should start automatically
    • if you installed Zope to run manually, run start.bat found in the directory you installed Zope into
  5. Test the installation by starting up your browser and navigating to: http://localhost/Zope/manage

    You should be presented with the Apache authorization prompt, where you should enter the super user and password that you supplied when you installed Zope. Once authorized, the Zope control panel should appear.

  6. Shut down Zope:
    • if you installed Zope as a service, shut it down through the service applet.
    • if you installed Zope to start up manually, close the command window that started when you ran start.bat
  7. Since the python installed by Zope does not contain the source code (including the all important python21.lib file for the next step), you need to re-install python 2.1 into the bin directory of your Zope installation.
    • Empty the bin directory.
    • Get Python 2.1 from www.python.org (the Windows exe file is fine)
    • install this version into the bin directory of your Zope installation.
  8. Put the path to the python executable in your PATH variable. You need to do this to install pyperl.
  9. Procure pyperl 1.0 from http://www.activestate.com/download/Zope-Perl/
  10. Unzip to a temp directory. C:\setup\pyperl-1.0 for example.
  11. Using your favorite text editor, open the file C:\setup\pyperl-1.0\Python-Object\Makefile.PL

    There is a problem with this makefile, in that it doesn't know that there is a version 2.1 of python out there. Let's tell it there is one: Go to line 28 of the file. You should see:

        if ($^O eq 'MSWin32') {
          my $pylib;
          for (15,16,20) { <---problem here
            $pylib = "$pyinc\\..\\libs\\python$_.lib";
    

    Edit line 28 to look like this

    for( 15,16,20,21) {

    Save and close the file.

    You also have to change C:\setup\pyperl-1.0\setup.py

    On line 116 you'll find:

        for x in ['15','16','20']:      <---- problem here
          if access(os.path.join(sys.prefix, 'libs', 'python'+x+'.lib'), \
    

    Change line 116 to look like this:

        for x in ['15','16','20','21']:
    

  12. Open up a command line window.
  13. cd to C:\setup\pyperl-1.0\Python-Object
  14. type:
      perl Makefile.PL
      nmake
      nmake install
      cd..
      python setup.py install
      python test.py
    
  15. Procure zoperl-1.0.beta5 from http://www.activestate.com/download/Zope-Perl/
  16. Unzip zoperl to a temp directory, like C:\Setup\zoperl-1.0.beta5
  17. In your command line window, type:
      cd C:\setup\zoperl-1.0.beta5\lib\python\Products\PerlMethod\Hack-Names
      perl Makefile.PL
      nmake
      nmake install
    
  18. Create a directory called perl in the lib directory of your Zope installation.
  19. Copy Zope.pm from C:\setup\zoperl-1.0.beta5\lib\perl to the newly created directory.
  20. Copy the contents of C:\setup\zoperl-1.0.beta5\lib\python\Products into the lib\python\Products directory of your Zope installation.
  21. Restart Zope, you should now see perl objects in the drop-down add object menu.