php-install Digest 24 Jul 2002 01:09:37 -0000 Issue 945

Topics (messages 7875 through 7884):

Re: Build PHP 4.2.1 on OS X: "Multiple Definitions"
        7875 by: Frank Bitterlich
        7878 by: Steve Cayford

Re: php-install Digest 23 Jul 2002 12:04:43 -0000 Issue 944
        7876 by: J Fazenda
        7880 by: Christopher Lyon
        7884 by: J Fazenda

Re: [PHP-DEV] libphp4.so, Sun Solaris 8, relocation error
        7877 by: Jani Taskinen

PHP 4.2.2 install woe: cannot stat libs/libphp.so
        7879 by: Reuben D. Budiardja

php-install
        7881 by: David Pottier

virtual directory support apache 1.3.26 / php 4.1.2
        7882 by: Matthew Darcy

php 4.1.2 --enable--safe-mode set yet safe mode disabled.
        7883 by: Matthew Darcy

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 ---
Steve,

I first tried the instruction in php.net's "INSTALL" document, and then 
the one from the book "Professional PHP4", which is specific to OS X.

I've looked at the hints on developer.apple.com, but they're somewhat 
outdated (for PHP 4.0.6), they tell me to modify a "ltconfig" file, but 
I have no such beast. It says I need to enter something like this:
archive_cmds='$CC -force_flat_namespace ...
Sounds like it has something to do with the namespace problem you 
mentioned... but I can't find such a file.

AFAICS the entropy.ch site only offers a pre-built PHP module, but I 
need FrontBase support, so (I guess) I have to build my own...

A call to ./buildconf keeps telling me I have no "automake"; might that 
be the problem? I know where I can D/L the source for it, but I have no 
clue how to compile _that_ again... sigh...

I would be really thankful for your recipe, maybe it gets me going.

TIA,
   Frank+++

In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] (Steve Cayford) wrote:

> On Monday, July 22, 2002, at 02:10  PM, Frank Bitterlich wrote:
> 
> > Hi,
> >
> > newbie alert! I've never built anything on OS X, so I thought I'd better
> > follow the docs by the letter. Still, no go...
> 
> Building PHP on OSX is tricky, at least the last time I did it (a couple 
> months ago). What directions were you following?
> 
> You have to work around OSX's two namespace issues, and I believe a 
> different version of libtool.
> 
> Start by looking at http://www.entropy.ch/software/macosx/php.
> 
> If that doesn't help, I can send you my step-by-step recipe, but I don't 
> know if it works with the current php and osx.
> 
> -Steve
>
--- End Message ---
--- Begin Message ---
The entropy.ch site has a brief mention of building php 4.2.x way down 
at the bottom of the page:

http://www.entropy.ch/software/macosx/php/#build

As far as what I did, I've gotten in the habit of writing shell scripts 
with the configuration command and comments listing all the steps I 
took. So here is what I have for php 4.1.2. I originally had more steps 
in here to deal with compiling in openbase support, which required the 
buildconf step and automake.

Caveat lector: This worked for me, with php 4.1.2 and osx 10.1.3. I'm 
not an expert at this and can't guarantee that it won't just waste your 
time...

<script>

#! /bin/tcsh
#
# config.args_I_used
#
# pre 1. installed automake-1.4 from gnu (configure, make, make check, 
make install)
#        (I wouldn't think you'd need this unless you need to run the 
buildconf step)
# pre 2. fetch libtool-1.3.5 patch from fink
#        (http://fink.sourceforge.net/doc/porting/libtool.php, also a 
good, informative read)
# pre 3. installed libtool-1.3.5 from gnu (apply patch, configure, make, 
make check, make install)
#
#  1. unpack both php 4.0.6 and 4.1.2 source into separate directories
#    a. copy this config script into both source directories
#
#  2. cd 4.0.6
#    a. ./buildconf (you probably don't need this step)
#    b. run this configure script (tcsh config.php.4.1.2-osx-generic)
#
#  3. cd 4.1.2
#    a. copy configure, ltconfig, ltmain.sh from 4.0.6 source directory
#    b. run this configure script
#    c. copy libtool from 4.0.6
#
#  4. in libtool verify existence of '-flat_namespace' after the $CC in 
the 'archive_cmds=' line
#  5. make, make install

setenv LDFLAGS '-flat_namespace'

./configure \
         --with-xml \
         --with-zlib \
         --with-apxs=/usr/sbin/apxs \
         --enable-trans-sid \
         --enable-shared \
         --with-mysql=/usr/local \
         --with-jpeg-dir=/usr/local \
         --with-zlib-dir=/usr/local \
         --with-tiff-dir=/usr/local \
         --with-png-dir=/usr/local \
         --with-ldap=/usr/local

</script>

-Steve


On Tuesday, July 23, 2002, at 07:36  AM, Frank Bitterlich wrote:

> Steve,
>
> I first tried the instruction in php.net's "INSTALL" document, and then
> the one from the book "Professional PHP4", which is specific to OS X.
>
> I've looked at the hints on developer.apple.com, but they're somewhat
> outdated (for PHP 4.0.6), they tell me to modify a "ltconfig" file, but
> I have no such beast. It says I need to enter something like this:
> archive_cmds='$CC -force_flat_namespace ...
> Sounds like it has something to do with the namespace problem you
> mentioned... but I can't find such a file.
>
> AFAICS the entropy.ch site only offers a pre-built PHP module, but I
> need FrontBase support, so (I guess) I have to build my own...
>
> A call to ./buildconf keeps telling me I have no "automake"; might that
> be the problem? I know where I can D/L the source for it, but I have no
> clue how to compile _that_ again... sigh...
>
> I would be really thankful for your recipe, maybe it gets me going.
>
> TIA,
>    Frank+++

--- End Message ---
--- Begin Message ---
I had exactly the same problem recently with my very first Linux/Apache/PHP 
installation.
After several days of fruitless efforts, a kind soul told me I was using the wrong 
file extension (.html).
It must be .php to make Apache send the file through the PHP interperter.
Could that be your problem ??

>
> > Subject: PHP 4.2.2 and Apache 1.3.26 Installation
> > Date: Mon, 22 Jul 2002 22:48:45 -0700
> > From: Christopher Lyon <[EMAIL PROTECTED]>
> > To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > OS:
> > Red Hat 7.3
> >
> > I am having a bit of a problem getting the two of these things
> > working. I have extracted both PHP and Apache, ran ./configure
> > - -with-mysql -with-apache=/usr/local/apache_1.3.26 from the php
> > directory. Then I ran make and make install. Once that was done I ran
> > the Apache ./configure, make and make install. I went to edit the
> > httpd.conf file and added the application/x-httpd-phpX .phpx stuff.
> > Once I was done with all of that I went to test to see if PHP was
> > working via some test pages and it looks like a no go. I am getting
> > just the raw html php code. Anybody have an idea of what I am missing
> > or what didn't get loaded?

--- End Message ---
--- Begin Message ---
The document is showing up as .php and I have added the AddType in the
httpd.conf file.  I did try the same browser to another server that is
running PHP and it loaded fine. It just seems to be around the tie between
apache and php. I just can't figure out what and the logs aren't telling me
anything. Thoughts?


-----Original Message-----
From: J Fazenda [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, July 23, 2002 7:04 AM
To: PHP Install
Subject: [PHP-INST] Re: php-install Digest 23 Jul 2002 12:04:43 -0000 Issue
944

I had exactly the same problem recently with my very first Linux/Apache/PHP
installation.
After several days of fruitless efforts, a kind soul told me I was using the
wrong file extension (.html).
It must be .php to make Apache send the file through the PHP interperter.
Could that be your problem ??

>
> > Subject: PHP 4.2.2 and Apache 1.3.26 Installation
> > Date: Mon, 22 Jul 2002 22:48:45 -0700
> > From: Christopher Lyon <[EMAIL PROTECTED]>
> > To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > OS:
> > Red Hat 7.3
> >
> > I am having a bit of a problem getting the two of these things
> > working. I have extracted both PHP and Apache, ran ./configure
> > - -with-mysql -with-apache=/usr/local/apache_1.3.26 from the php
> > directory. Then I ran make and make install. Once that was done I ran
> > the Apache ./configure, make and make install. I went to edit the
> > httpd.conf file and added the application/x-httpd-phpX .phpx stuff.
> > Once I was done with all of that I went to test to see if PHP was
> > working via some test pages and it looks like a no go. I am getting
> > just the raw html php code. Anybody have an idea of what I am missing
> > or what didn't get loaded?


-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
As I said before, my only problem was that I was using the wrong file
extension, but the folowing excerpts from mail I exchanged with members
of this list may help you identify your problem. Good luck.

------------------
I found the following lines in the httpd.conf that was installed in my
system:

<IfDefine> HAVE_PHP4>
LoadModule php4-module
</IfDefine>
.....
<IfDefine> HAVE_PHP4>
AddModule php4-module.c
</IfDefine>
........
<IfModule mod_php4.c>
  AddType application/x-httpd-php .php4 .php3 .phtml .php
  AddType application/x-httpd-php-source .phps
</IfModule>

And the following lines in the Apache startup script :

if [ -f /etc/sysconfig/apache ] ; then
        . /etc/sysconfig/apache
fi
....
start() {
        echo -n $"Starting $prog: "
        daemon $httpd `moduleargs` $OPTIONS
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && touch /var/lock/subsys/httpd
        return $RETVAL
}
------------------------

> Take a look at that `moduleargs`. You'll also find in the file a
> function called moduleargs that is intended to generate all of those
> defines. It takes a file list of /usr/lib/modules/*.so and applies
some
> regular expressions.

NOTE 7/24 - THIS IS A GOOD TEST

Do a "ps auxww | fgrep httpd" and you should see a
> bunch of -DHAVE_xxx arguments.

------------------------

1 - I do see several blocks <IfDefine>...</IfDefine> in httpd.conf but I

only got:
    root 3353 0.0 0.3 1728 564 pts/1 s 15:48 0:00 fgrep httpd
when I did
    ps auxww | fgrep httpd

NOTE  7/24 - BIG MISTAKE ! - Apache was not running when I did the
above.

 2 - PHP seems to be installed. I got
    php -4.0.6-7
when I did
    rpm -q php

----------------------

/ In fact I didn't have a real problem, just ignorance. All I had to do
was to change the Index file extension to .PHP.

/ And it was a silly mistake to do "ps auxww | fgrep httpd" with the
server turned off.
I started and stopped it so many times in the last few days that I
didn't know anymore what I was doing.

NOTE 7/24 - THIS IS A GOOD TEST

When I run that command now (with the server running :-), of course), I
received a truck load of -DHAVE's and, sure enough, there were many
PHP4' there.

Christopher Lyon wrote:

>
>
> The document is showing up as .php and I have added the AddType in the
> httpd.conf file.  I did try the same browser to another server that is
> running PHP and it loaded fine. It just seems to be around the tie
> between apache and php. I just can't figure out what and the logs
> aren't telling me anything. Thoughts?
>
> -----Original Message-----
> From: J Fazenda [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 23, 2002 7:04 AM
> To: PHP Install
> Subject: [PHP-INST] Re: php-install Digest 23 Jul 2002 12:04:43 -0000
> Issue 944
>
> I had exactly the same problem recently with my very first
> Linux/Apache/PHP installation.
> After several days of fruitless efforts, a kind soul told me I was
> using the wrong file extension (.html).
> It must be .php to make Apache send the file through the PHP
> interperter.
> Could that be your problem ??
>
> >
> > > Subject: PHP 4.2.2 and Apache 1.3.26 Installation
> > > Date: Mon, 22 Jul 2002 22:48:45 -0700
> > > From: Christopher Lyon <[EMAIL PROTECTED]>
> > > To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> > >
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > OS:
> > > Red Hat 7.3
> > >
> > > I am having a bit of a problem getting the two of these things
> > > working. I have extracted both PHP and Apache, ran ./configure
> > > - -with-mysql -with-apache=/usr/local/apache_1.3.26 from the php
> > > directory. Then I ran make and make install. Once that was done I
> ran
> > > the Apache ./configure, make and make install. I went to edit the
> > > httpd.conf file and added the application/x-httpd-phpX .phpx
> stuff.
> > > Once I was done with all of that I went to test to see if PHP was
> > > working via some test pages and it looks like a no go. I am
> getting
> > > just the raw html php code. Anybody have an idea of what I am
> missing
> > > or what didn't get loaded?
>
> --
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---

    It should be added now, try the latest CVS snapshot:
    
    http://snaps.php.net/php4-latest.tar.gz
    
    --Jani
    

-- 

On Tue, 23 Jul 2002, Thomas Langås wrote:

>Thomas Langås:
>> Output from ldd:
>> dilbert:/usr/src/web/php-4.2.2# ldd -d  /local/apache/libexec/libphp4.so 
>>         libdl.so.1 =>    /lib/libdl.so.1
>>         libpam.so.1 =>   /lib/libpam.so.1
>>         libxmlrpc.so.0 =>        /local/lib/libxmlrpc.so.0
>>         libexpat.so.0 =>         /local/lib/libexpat.so.0
>>         libpdf.so.1 =>   /local/lib/libpdf.so.1
>>         libz.so.1 =>     /lib/libz.so.1
>>         libsched.so.1 =>         /lib/libsched.so.1
>>         libgen.so.1 =>   /lib/libgen.so.1
>>         libsocket.so.1 =>        /lib/libsocket.so.1
>>         libnsl.so.1 =>   /lib/libnsl.so.1
>>         libmysqlclient.so.10 =>  /local/lib/mysql/libmysqlclient.so.10
>>         libldap.so.2 =>  /local/lib/libldap.so.2
>>         liblber.so.2 =>  /local/lib/liblber.so.2
>>         libintl.so.1 =>  /lib/libintl.so.1
>>         libt1.so.1 =>    /local/lib/libt1.so.1
>>         libm.so.1 =>     /lib/libm.so.1
>>         libxml2.so.2 =>  /local/lib/libxml2.so.2
>>         libgdbm.so.2 =>  /local/lib/libgdbm.so.2
>>         libcrypt_i.so.1 =>       /lib/libcrypt_i.so.1
>>         libresolv.so.2 =>        /lib/libresolv.so.2
>>         libclntsh.so.8.0 =>      /local/oracle/lib/libclntsh.so.8.0
>>         libc.so.1 =>     /lib/libc.so.1
>>         libmp.so.2 =>    /lib/libmp.so.2
>>         libwtc8.so =>    /local/oracle/lib/libwtc8.so
>>         libaio.so.1 =>   /lib/libaio.so.1
>>         /usr/platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1
>>         symbol not found: __floatdidf           (/local/apache/libexec/libphp4.so)
>
>When I added "LDFLAGS += -lgcc" to the topdir-Makefile, this went away
>and everything seems to work now. Why isn't this included by default?
>
>

--- End Message ---
--- Begin Message ---
I tried to upgrade from PHP 4.2.1 to 4.2.2 due to the security bug
announce in the web site. When I do make install, it stopped with
errors. The following are the last few lines from the output:

[activating module `php4' in /usr/local/apache/conf/httpd.conf]
cp libs/libphp4.so /usr/local/apache/libexec/libphp4.so
cp: cannot stat `libs/libphp4.so': No such file or directory
apxs:Break: Command failed with rc=1
make[1]: *** [install-sapi] Error 1
make[1]: Leaving directory `/usr/src/php-4.2.2'
make: *** [install-recursive] Error 1

When I checked the directory libs, there are only files
libphp4.a   libphp4.la

I tried to make symlink called libphp4.so to one of this files, and then
the make install run without error. But then when I started my apache,
it gives me:

bash $> /usr/local/apache/bin/apachectl start
Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp4.so into server:
/usr/local/apache/libexec/libphp4.so: invalid ELF header
/usr/local/apache/bin/apachectl start: httpd could not be started

Here is my configure line:
./configure --with-mysql --enable-track-var --disable-debug
--prefix=/usr/local/apache/php --with-config-file-path=/usr/local/apache
lib --with-apxs=/usr/local/apache/bin/apxs --with-gd --with-zlib

I added flag '-lz' for 'LTLIBRARY_LDFLAGS' definition before running
make.
 
Any help on this would be greatly appreciated. Thanks in advance.
Reuben D. Budiardja





--- End Message ---
--- Begin Message ---
Subscribe php-install [EMAIL PROTECTED] 

--- End Message ---
--- Begin Message ---
Hi,

I have just compiled and installed php 4.1.2 into apache 1.3.26.

All went well - thanks to help from this group.

I have just fired up apache and used the php info test page to view my
options.

They look like this

      System SunOS burns 5.8 Generic_108528-13 sun4u sparc SUNW,UltraAX-i2
      Build Date Jul 23 2002 21:07:45
      Configure Command './configure'
'--with-apache=/usr/local/src/apache_1.3.26' '--enable-foce-cgi-redirect'
'--enable-debug' '--with-openssl=/usr/local/ssl' '--with-jpeg-dir=/usr/lib'
'--enable-ftp' '--with-mysql=/usr/local/mysql'
      Server API Apache
      Virtual Directory Support disabled
      Configuration File (php.ini) Path /usr/local/lib
      Debug Build yes
      Thread Safety disabled



my questions are.

Virtual Directory Support = disabled.
How do I enable this ? is it just a case of defining virtual dirs in apache
?

Configuration File = /usr/local/lib
I thought this went in /usr/local/apache/conf/ and was called php.ini ?
where is this defined ?

Thanks,

Matt.



--- End Message ---
--- Begin Message ---
Hi,

I have built php4.1.2 into apache 1.3.26. My exact configure command is.

./configure --with-apache=/usr/local/src/apache_1.3.26 --enable-foce-cgi-red
irect --enable-debug --with-openssl=/usr/local/ssl --with-jpeg-dir=/usr/lib 
--with-zlib=/usr/local/include --enable-ftp --with-mysql=/usr/local/mysql --
enable-safe-mode --enable-libgcc

yet when I view the php info page when I start up the webserver I see safe
mode disabled and the --enable-safe-mode is not in the configure command



      System SunOS burns 5.8 Generic_108528-13 sun4u sparc SUNW,UltraAX-i2
      Build Date Jul 23 2002 21:07:45
      Configure Command './configure'
'--with-apache=/usr/local/src/apache_1.3.26' '--enable-foce-cgi-redirect'
'--enable-debug' '--with-openssl=/usr/local/ssl' '--with-jpeg-dir=/usr/lib'
'--enable-ftp' '--with-mysql=/usr/local/mysql'
      Server API Apache
      Virtual Directory Support disabled
      Configuration File (php.ini) Path /usr/local/lib
      Debug Build yes
      Thread Safety disabled



Why is this? as the --with-libgcc command is also missing ?

Thanks,

Matt.



--- End Message ---

Reply via email to