php-install Digest 3 Jul 2003 01:22:20 -0000 Issue 1445

Topics (messages 11197 through 11200):

PHP5 Windows XP Install Problem
        11197 by: Louis
        11199 by: jsWalter

Re: PHP Install Solaris 2.8 + Oracle
        11198 by: Charlie Smith

Re: Movie
        11200 by: kuenne.rentec.com

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Description:
------------
I have tried without success to get php-5.0.0b1-Win32 installed on Windows
XP Pro. The web servers I have tried with are:

Apache 1.3.27
Apache 2.0.46

I tried following the PHP 4 instructions for installing PHP 5, both as a
Module and CGI, but Apache refuses to start up. This is what I have put in
to the config httpd.conf file for the server:

LoadModule php4_module C:/Apache2/PHP5/sapi/php4apache2.dll
AddType application/x-httpd-php .php

or

LoadModule php5_module C:/Apache2/PHP5/sapi/php4apache2.dll
AddType application/x-httpd-php .php

I have also copied the php4ts.dll file to the Windows/Winnt and system32
driectories. Also the php.ini file to the windows/winnt directory. I've try
the same above with Apache 1.3 too. Then when I start Apache, I get this
error:

Syntax error on line 176 of C:/Apache2/conf/httpd.conf
Cannot load C:/Apache2/PHP5/sapi/php4apache2.dll into server. The
specified module could not be found

or

Syntax error on line 176 of C:/Apache2/conf/httpd.conf
Cannot load C:/Apache2/PHP5/sapi/php4apache2.dll into server. The
specified procedure could not be found


Can anyone help?



-----------------------------------------------------------
I also tried PHP 4.3.2 and it on Apache 1.3.27 & 2.0.46 using:

#LoadModule php4_module C:/Apache/PHP4/sapi/php4apache.dll
LoadModule php4_module C:/Apache2/PHP4/sapi/php4apache2.dll
AddType application/x-httpd-php .php

with success (of course using the right apache file and php4ts.dll).

I know I can get PHP 4 working with a clean install, but not PHP 5 :-S

Thanks for any help offered



--- End Message ---
--- Begin Message ---
This may, or may not be of help.

I've asked efor comments on this, but none have been had.

See if this helps you.

This was written for my system which (was NT 4) Win 2k and Apache 2.x.

It should work for XP, I have no idea about PHP 5, but I'm hoping you'll
tell me.

walter

======================

This installation description worked on my NT 4.0 (SP 3 thru 6) and on my
Windows 2000 Professional.

[IMPORTANT - READ THIS!]
Before I outline how I installed PHP without the installer or putting
anything in my WINNT or SYSTEM directories, I need to show you how I've
setup my computer overall.

First of all, I have 6 main volumes. This spans 2 physical drives. (I
actually have 5 drives in my machine, but the others are not important
here.)

Physical Drive 1 [10GIG drive ]
  Volume C [8Gig] = Win2k OS - this contains the operating system ONLY
  Volume X [1GIG] = temp - OS/apps temp space ONLY [I have this hidden]

Physical Drive 2 [ 80GIG drive]
  Volume D [40GIG] = Apps - contains all the Win32 apps ONLY
  Volume E [25GIG] = Data - contains all my data files and personal stuff
  Volume F [10GIG] = UNIX - has all my pseudo UNIX stuff, apps, utilities,
etc
  Volume Y [4GIG] = SWAP - OS SWAP space ONLY [I have this hidden]

The temp and swap are in their own spaces to help system performance and
behavior. With these files off by themselves, the OS does not have to work
hard finding things it needs in the OS partition. This keeps the TEMP space
adding and deleting files all day without fragmenting the OS drive. The SWAP
is in it's own space, that way it can create a single contiguous file as big
as it needs to without having to deal with other files being added/removed;
again, no disk fragmentation issues.

Everyone has their own sand box. This make Win32 very happy. Really!

I even have DATA off by itself on the chance that I lose the OS drive. I
still have my personal data and I can back that up easily without wasting
time and energy backing up the OS and the apps (which, in my opinion, is a
waste of time. If you have to ask why, then you've not had to reinstall your
OS more than twice in a year!)

This brings us to the UNIX volume.

Here I have Perl, Apache, mySQL, PHP and windows based UNIX command line
tools. I also have the classic 'etc', 'usr', 'home', 'tmp' directories; just
as if it were a real Un*x machine. These applications like this format. This
is where they came from. They don't really like being forced into the
Windows mold, so why bother!

Now, I haven't taken the Un*x metaphor to the extreme. I don't have files
and aliases all over the place. Since it wouldn't do any good anyway, since
Windows SHORTCUTS do not behave like a Un*x alias.

The 'etc' directory contains...
 - httpd - this is where Apache lives
 - mySQL - this is where mySQL lives
 - php - this is where PHP lives

Very straight forward, almost Un*x, but why make it more complicated then it
needs to be.
The 'home' directory just contains clones of the user/domain accounts I
maintain. Just like they are on my Un*x server.

The 'usr' directory is used for Perl, and a part of PHP (but more on that
later). On my Un*x Server Perl lives at '/usr/local/bin', so I installed
ActiveState Perl in the same path. Now I can create my Perl scripts, access
them from my Apache server and the SHEBANG line [#!/usr/local/bin/perl] will
work on both machines without [!] modification.

So, now you know how may machine is configured. Now we can take a look at
how I installed PHP on my win32 machine in 15 minutes.

NOTE: You really don't need to go to this extreme. But You will need to
create
      the above defined directories at the root of whatever Volume you have
Apache
      sitting on

First, retrieve the latest windows binaries from...
     http://www.php.net/downloads.php

I grabbed the full ZIP package, not the "installer".

I downloaded it into a 'UNIX installers' directory on my UNIX drive.
UnZIPped into its own directory and went from there.

The manual says to copy several DLLs and the INI file into the system
folder. I didn't. I can't stand putting anything in there! Flash back to my
old Macintosh days (we won't talk about the Preferences Folder!).

Anyway, I created a 'php' folder in the 'etc' folder. It seems like a good
as any place to put it. Close to the UNIX server. Into this PHP directory, I
copied entire the contents of the DLL directory (from the install
directory), all of them.

I also took these files for the installer directory root...
  - php.exe
  - php4embed.lib
  - php4ts.dll
  - php4ts.lib
  - magic.mime
  - php.ini-recommended [renamed it php.ini]

Then I took the directory 'extensions' and 'sapi' and copies them directly,
as directories, into the PHP directory.

There is also a directory labeled 'CLI'. This contains a version of the PHP
binary that can handle a command line interface (CLI!). Now, unfortunately,
this EXE is also called PHP.exe, which means it can not be in the same
directory as the web access version we already have in there. So I renamed
it 'php-cli.exe' can copied it into the PHP folder.

At this point you should have 24 objects (22 files and 2 folders) in the PHP
directory.
Now we have only one more directory to deal with, the 'mibs'. This is one
that the manual says you put in the '/usr' directory, so, since I just
happen to have one for my Perl installation, I dropped it in there and let
well enough alone.

Now, all the files you need are in position. The last 2 steps deal with
configuration files, both text based and Windows system based.

First, Windows. At this point I added a new System Environmental variable
called (what else) PHP and gave it value of 'G:/etc/php'. Then I added %php%
(don't forget the percentage symbols on BOTH ends!) at the end of the
existing PATH variable.
This tells the OS to add this path to its search parameters when it needs to
look for something. This bypasses the need to place these DLLs in the system
directory. It also lets me run PHP from the command line anywhere in my
system without explicitly defining a path to PHP.exe.
Second the php.ini file. A few steps ago, we copied and INI from the
installation directory into our PHP folder. This file needs to be modified.

Search for...
   ; Windows: "\path1;\path2"

I want you to added this line underneath it...
   include_path = ".;G:\etc\php\extensions"
   [change the volume letter to match yours]

Now scroll down just a little and you will see...

   ; Directory in which the loadable extensions (modules) reside.

add this under that...

    extension_dir = "G:\etc\php\extensions"
    [change the volume letter to match yours]

Now search for...

   ;extension=php_gettext.dll

Take the semicolon off that line so PHP can be used from within Apache.

Now your in business. No need to restart or anything.

Now all you need is a sample PHP to test against to see how we did.
Try this one...

test.php
<?php
  echo "Our simple test", "\n\n";
  echo getcwd(), "\n";
?>

I placed this in my PHP directory, opened a DOS prompted, entered ...

    C:\>php test.php

And got back what I thought I should get! It worked!

And now the final test, making this work from Apache!

The only file I copied was the TEXT.php file. I placed it in my htdocs
directory. Then I modified the httpd.conf file to tell apache I now want it
to handle PHP!

But, once again I cheated.

At the end of my httpd.conf file I have...

# Include other conf files, any and all..

   include conf.d

This tells apache to look in this directory for other .conf files and
process them as well. This is where I keep all my virtual hosts .conf files.
One easy place to update.

It is here I added a php.conf file!

# ###########################################################
# Adding PHP integration
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
# Un*x version
# LoadModule php4_module modules/libphp4.so

# Windows Win32 version
LoadFile "/etc/php/gnu_gettext.dll"
LoadModule php4_module "/etc/php/sapi/php4apache2.dll"
# End Windows Win32 version

Action application/x-httpd-php "/etc/php/php.exe"
ScriptAlias /php/ "/etc/php/"
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

#
# Cause the PHP interpreter handle files with a .php extension.
#
<Files *.php>
  SetOutputFilter PHP
  SetInputFilter PHP
  LimitRequestBody 524288
</Files>

#
# Add index.php to the list of files that will be served as
# directory indexes.
#
DirectoryIndex index.php

# eof
# ###########################################################

NOTE: change the paths defined here to match yours.
      Since all my apps are on the same volume (letter) I don't need to
define it!

Now just restart your apache, open your browser, and key in the URL that
should open the TEXT.php file.

It should just say 'Our simple test'

That's it! We're done!

See, you can install PHP on a windows machine, by hand, in less than 15
minutes!






--- End Message ---
--- Begin Message ---
I've installed successfully on Solaris 2.8 + Oracle with following:
 ./configure  --with-apache=../apache_1.3.27 --with-oci8=/path/to/oracle/9.0.1 
--with-oracle=/path/to/oracle/9
.0.1 --with-mysql=/path/to/mysql

Does this help?

If your running a 32 bit compiler, you'll need to modify the Makefiles to referece 32 
bit libraries from Oracle.

>>> "Steve Sherry" <[EMAIL PROTECTED]> 06/25/03 12:28PM >>>
I'm having trouble getting PHP to build and install on a Solaris 2.8
platform.

I can get php to build and run if I run
./configure --prefix=www --with-apxs=/www/bin/apxs

When I run ./configure --prefix=www --with-apxs=/www/bin/apxs --with-oci8 I
get the following error message

Installing PEAR environment: /users/atisrdc/she/php/php/lib/php/
Segmentation Fault
make[1]: *** [install-pear-installer] Error 139
make: *** [install-pear] Error 2

I have also tried to build php without pear and then again with cli
disabled. The build will complete, but then I get a segmentation error when
I start apache.

Does anyone have any ideas?

Thanks!
Steve



-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 




------------------------------------------------------------------------------
This message may contain confidential information, and is intended only for the use of 
the individual(s) to whom it is addressed.


==============================================================================


--- End Message ---
--- Begin Message ---
Please see the attached zip file for details.

--- End Message ---

Reply via email to