php-install Digest 9 Jul 2001 00:38:35 -0000 Issue 352

Topics (messages 3438 through 3446):

Can't run php scripts!! segment fault in error_log
        3438 by: L.C.C

Re: Configuration issues w/PHP4, MySQL, Apache on RH7.1
        3439 by: Derek Steinkamp

Re: [PHP] installing php on apache
        3440 by: Ben Bleything
        3442 by: Michael Duxbury
        3443 by: Ben Bleything

Problems with making apache with PHP support
        3441 by: Faarooq Lowe

Re: [PHP-WIN] Re: [PHP] installing php on apache
        3444 by: Daniel Beulshausen

php apache linux
        3445 by: Harry van Rijn

update php to 4.0.6
        3446 by: Harold Arando

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]


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


Can any one please help?

I have just compiled php 4.0.6 on my system running on Mandrake 8 + Apache 1.3.19
as a Dynamic apache module (DSO). Everything goes smoothly during the installation
stage (configure + make install).

However, I dun seem to be able to run php scripts even though I have checked and made 
sure 
that the httpd.conf file contents all the neccessary lines (i.e. AddType 
application/x-httpd-php .php) and php.ini are already in position.
When I access a php page (i.e. x.x.x.x/php/try.php) I get a "503 Error: TCP Error". On
investigating the error_log file, I see "[notice] child pid 31226 exit signal 
Segmentation fault (11)" lines.

Could it be some firewall stuff at work? (i.e. Portsentry? IPChains?)
What could be the problem? Please Advise!! TIA!




Ok, it seems that either your /usr/lib/mysql or your /var/lib/mysql has the
libraries in them. cd to both of them and find out which has
libmysqlclient.so.10 and other similarly named libraries... I am 99% sure it
will be the /usr/lib/mysql.

Edit your /etc/ld.so.conf file, and add this line:

/usr/lib/mysql

Or whatever the directory the files were in. (like I said, /usr/lib/mysql seems
the logical place)

Do a "make clean" on php.
Run ldconfig (optionally, you can add a -v for verbose mode)
Go back to php, and "./configure --with-mysql=/usr/lib/mysql
--with-apxs=/path/to/apache/bin/apxs"
make, make install and you should be good. As it was apparent earlier, I am not
sure how the RedHat ldcondif works. Optimally, you should just be able to merge
the /usr/lib/mysql in with already cached shared libraries (hence the -m), but
you may have to reload all the paths. As long as you have the path correct in
the PHP configure script, just mess around with ldconfig and get that path
linked...

Leave it to RedHat to butcher ldconfig :)

If you can't get it right after messing with ldconfig, remove the RPM and
install from source (It's much easier and hassle free in the long run, IMHO)

Best of luck,

Derek


"McAtee, Gabriel" wrote:

> Actually, I'm not sure what my base director is... I did the RPM install,
> and there is MySQL stuff all over the hard drive now!!!!  I did a "locate
> mysql | grep "/lib/mysql", and /var/lib/mysql and /user/lib/mysql show up.
> I tried the configure with both of those locations, and both times I get the
> error "configure: error: Cannot find header files under /usr/lib/mysql".
> Also, an attempt to run ldconfig -m fails, no such option as -m on RH7.1.
> Thanks, though... I'll keep plugging away... :)
>
> "Derek Steinkamp" <[EMAIL PROTECTED]> wrote in message
> news:<[EMAIL PROTECTED]>...
> > I am going to assume that /usr/bin/mysql is your base directory. That
> would
> > make the shared libraries in the directory /usr/bin/mysql/lib/mysql. A
> simple:
> >
> > # ldconfig -m /usr/bin/mysql/lib/mysql
> >
> > Should fix all your woes. Depending on your flavor of Unix you run, you
> will
> > want to add the above directory line to your /etc/ld.so.conf file or
> similar
> > hints file.
> >
> > One other thing... you should be configuring PHP with apxs.. looking
> something
> > like:
> >
> > # ./config --with-mysql=/path/to/MySQL
> --with-apxs=/path/to/apache/bin/apxs
> >
> > Hope this helps.
> >
> > Derek Steinkamp
> >
> >
> >
> >
> > Gabriel McAtee wrote:
> >
> > > So.... I have MySQL up and working, Apache up and working, and PHP4 up
> and
> > > working... but not connecting to MySQL.  I ran
> > > "configure --with-mysql=/usr/bin/mysql" which apparently is not
> correct...
> > > it returned an error stating that it could not find the MySQL libraries
> in
> > > the indicated path.  Could someone give me a pointer here?  I've been
> > > struggling with this for a week and a half now, and not making any
> progress
> > > to speak of...   :(
> > >
> > > --
> > > _______________________________________
> > > _______________________________________
> > > _______________________________________
> > > Gabriel K. McAtee
> > > Consultant
> > > Project Leadership Associates
> > > 250 S. Wacker Dr., Suite 345
> > > Chicago, IL 60606
> > > _______________________________________
> > > _______________________________________
> > > _______________________________________
> > >
> > > --
> > > PHP Install Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >





The key here is this line:
        AddType application/x-httpd-php .php

What this means, to apache, is that it will only send to the php binary
files that end in .php.  Two options: first, if you are going to have
php in almost all files, you can just add .html to this line after .php.

Second, rename any files that have php in them to .php files, and
instruct Apache to look for index.php files (I forget where this is... I
believe it's towards the bottom of the default httpd.conf file)  

Another thing that I noticed when I was trying to install php and apache
in windows was that it is very easy to put in both sets of
descriptions... the one for the module and the one for the binary, so
just be sure you didn't do that =>

Ben

-----Original Message-----
From: Michael Duxbury [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, July 08, 2001 5:37 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: [PHP] installing php on apache

I am trying in vain to get php running.

I have win98 and apache1.3.6 server running.

I unzipped the php-4.0.6-Win32 into c:\php

I then downloaded php406-installer and I ran that, did a standard
install.

I was told that the installer hadn't edited my httpd.conf file for
apache
and i would have to do this with accordance with the php\install.txt
file.
Which has the following instructions:-
If you unzipped the PHP package to C:\PHP\ as desribed
  above, you need to insert these lines to your Apache conf
  file to set up the CGI binary:

   ScriptAlias /php/ "c:/php/"
   AddType application/x-httpd-php .php
   Action application/x-httpd-php "/php/php.exe"

So this I did, so my httpd.conf file within apache looks like this:-
# For example, the PHP3 module (not part of the Apache distribution)
# will typically use:
#
#AddType application/x-httpd-php3 .phtml
#AddType application/x-httpd-php3-source .phps
ScriptAlias /php/ "c:/php/"
   AddType application/x-httpd-php .php
   Action application/x-httpd-php "c:/php/php.exe"

But I shutdown and restart apache and try to run load a .html file in my
browser
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<?php echo "Hello World<p>"; ?>
</body>
</html>

But nothing happens.

I have tried to be as verbose as possible in the hope that someone can
help
me out here.

Thankyou.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






Thanks,
> Second, rename any files that have php in them to .php files, and
I already name my PHP files .php


> instruct Apache to look for index.php files (I forget where this is... I
> believe it's towards the bottom of the default httpd.conf file)

I can't seem to find this part of the document the only mention of PHP in my
file is like this:
 # For example, the PHP3 module (not part of the Apache distribution)
# will typically use:
#
#AddType application/x-httpd-php3 .phtml
#AddType application/x-httpd-php3-source .phps
ScriptAlias /php/ "c:/php/"
   AddType application/x-httpd-php .php
   Action application/x-httpd-php c:/php/php.exe

Does this mean that there is another problem that is stopping me running
php?

"Ben Bleything" <[EMAIL PROTECTED]> wrote in message
news:001b01c107cb$73e445e0$0201a8c0@c1141975c...
> The key here is this line:
> AddType application/x-httpd-php .php
>
> What this means, to apache, is that it will only send to the php binary
> files that end in .php.  Two options: first, if you are going to have
> php in almost all files, you can just add .html to this line after .php.
>
> Second, rename any files that have php in them to .php files, and
> instruct Apache to look for index.php files (I forget where this is... I
> believe it's towards the bottom of the default httpd.conf file)
>
> Another thing that I noticed when I was trying to install php and apache
> in windows was that it is very easy to put in both sets of
> descriptions... the one for the module and the one for the binary, so
> just be sure you didn't do that =>
>
> Ben
>
> -----Original Message-----
> From: Michael Duxbury [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, July 08, 2001 5:37 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: [PHP] installing php on apache
>
> I am trying in vain to get php running.
>
> I have win98 and apache1.3.6 server running.
>
> I unzipped the php-4.0.6-Win32 into c:\php
>
> I then downloaded php406-installer and I ran that, did a standard
> install.
>
> I was told that the installer hadn't edited my httpd.conf file for
> apache
> and i would have to do this with accordance with the php\install.txt
> file.
> Which has the following instructions:-
> If you unzipped the PHP package to C:\PHP\ as desribed
>   above, you need to insert these lines to your Apache conf
>   file to set up the CGI binary:
>
>    ScriptAlias /php/ "c:/php/"
>    AddType application/x-httpd-php .php
>    Action application/x-httpd-php "/php/php.exe"
>
> So this I did, so my httpd.conf file within apache looks like this:-
> # For example, the PHP3 module (not part of the Apache distribution)
> # will typically use:
> #
> #AddType application/x-httpd-php3 .phtml
> #AddType application/x-httpd-php3-source .phps
> ScriptAlias /php/ "c:/php/"
>    AddType application/x-httpd-php .php
>    Action application/x-httpd-php "c:/php/php.exe"
>
> But I shutdown and restart apache and try to run load a .html file in my
> browser
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
>
> <body bgcolor="#FFFFFF" text="#000000">
> <?php echo "Hello World<p>"; ?>
> </body>
> </html>
>
> But nothing happens.
>
> I have tried to be as verbose as possible in the hope that someone can
> help
> me out here.
>
> Thankyou.
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>






You say. . .

"But I shutdown and restart apache and try to run load a .html file in
my browser"

Did you mean a .php file?  My guess is that this is likely to be your
problem.  Unless you make the change I specified, apache _will not_
parse any php code in a .html file (or any other file, except a .php).

If you did everything else exactly as the documentation told you, and
apache otherwise runs correctly, AND you can invoke 'php foo.php' on the
command line and it will output correctly (make a file that contains
'<?php phpinfo(); ?>' in the c:\php directory, and php yourfile.php.  If
you see a ton of stuff scroll by, php is working), then there is likely
to be a problem with your configuration.  This will be difficult to find
without being able to see your httpd.conf file.

Ben

-----Original Message-----
From: Michael Duxbury [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, July 08, 2001 10:20 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: [PHP] installing php on apache

Thanks,
> Second, rename any files that have php in them to .php files, and
I already name my PHP files .php


> instruct Apache to look for index.php files (I forget where this is...
I
> believe it's towards the bottom of the default httpd.conf file)

I can't seem to find this part of the document the only mention of PHP
in my
file is like this:
 # For example, the PHP3 module (not part of the Apache distribution)
# will typically use:
#
#AddType application/x-httpd-php3 .phtml
#AddType application/x-httpd-php3-source .phps
ScriptAlias /php/ "c:/php/"
   AddType application/x-httpd-php .php
   Action application/x-httpd-php c:/php/php.exe

Does this mean that there is another problem that is stopping me running
php?

"Ben Bleything" <[EMAIL PROTECTED]> wrote in message
news:001b01c107cb$73e445e0$0201a8c0@c1141975c...
> The key here is this line:
> AddType application/x-httpd-php .php
>
> What this means, to apache, is that it will only send to the php
binary
> files that end in .php.  Two options: first, if you are going to have
> php in almost all files, you can just add .html to this line after
.php.
>
> Second, rename any files that have php in them to .php files, and
> instruct Apache to look for index.php files (I forget where this is...
I
> believe it's towards the bottom of the default httpd.conf file)
>
> Another thing that I noticed when I was trying to install php and
apache
> in windows was that it is very easy to put in both sets of
> descriptions... the one for the module and the one for the binary, so
> just be sure you didn't do that =>
>
> Ben
>
> -----Original Message-----
> From: Michael Duxbury [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, July 08, 2001 5:37 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: [PHP] installing php on apache
>
> I am trying in vain to get php running.
>
> I have win98 and apache1.3.6 server running.
>
> I unzipped the php-4.0.6-Win32 into c:\php
>
> I then downloaded php406-installer and I ran that, did a standard
> install.
>
> I was told that the installer hadn't edited my httpd.conf file for
> apache
> and i would have to do this with accordance with the php\install.txt
> file.
> Which has the following instructions:-
> If you unzipped the PHP package to C:\PHP\ as desribed
>   above, you need to insert these lines to your Apache conf
>   file to set up the CGI binary:
>
>    ScriptAlias /php/ "c:/php/"
>    AddType application/x-httpd-php .php
>    Action application/x-httpd-php "/php/php.exe"
>
> So this I did, so my httpd.conf file within apache looks like this:-
> # For example, the PHP3 module (not part of the Apache distribution)
> # will typically use:
> #
> #AddType application/x-httpd-php3 .phtml
> #AddType application/x-httpd-php3-source .phps
> ScriptAlias /php/ "c:/php/"
>    AddType application/x-httpd-php .php
>    Action application/x-httpd-php "c:/php/php.exe"
>
> But I shutdown and restart apache and try to run load a .html file in
my
> browser
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
> </head>
>
> <body bgcolor="#FFFFFF" text="#000000">
> <?php echo "Hello World<p>"; ?>
> </body>
> </html>
>
> But nothing happens.
>
> I have tried to be as verbose as possible in the hope that someone can
> help
> me out here.
>
> Thankyou.
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
[EMAIL PROTECTED]
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






Hello,

Whenever I attempt to perform a make on an apache 1.3.14  web server with
PHP support I receive the following error

gcc -DHPUX11 -DMOD_SSL=207101 -I/opt/local/src/php-4.0.5 -I/opt/local/src/ph
p-4.0.5/main -I/opt/local/src/php-4.0.5/main -I/opt/local/src/php-4.0.5/Zend
 -I/opt/local/src/php-4.0.5/Zend -I/opt/local/src/php-4.0.5/TSRM -I/opt/loca
l/src/php-4.0.5/TSRM -I/opt/local/src/php-4.0.5 -DEAPI -DEAPI_MM -DUSE_EXPAT
 -I../lib/expat-lite
`../apaci` -L/opt/local/ssl/lib -L../../../mm-1.1.3/.libs -L/opt/local/lib -
o gen_test_char
gen_test_char.o -L/u01/app/oracle/product/7.3.4/lib -L/u01/app/oracle/produc
t/7.3.4/lib -Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4 
-lpam -lclntsh -l:libcl.a -lm -lcl -l:libcma.sl -lm -lcrypt -lnsl -lm -lpthr
ead -lssl -lcrypto -lmm
./gen_test_char >test_char.hsh: 11390 Memory fault(coredump)

*** Error exit code 139

Stop.

*** Error exit code 1

Stop.

*** Error exit code 1

Stop.

*** Error exit code 1

I have added all of the patch PHSS_22514 and I even tried using gnu pth.

Can anyone offer any suggestions.







At 18:19 08.07.2001 +0100, Michael Duxbury wrote:
>Thanks,
> > Second, rename any files that have php in them to .php files, and
>I already name my PHP files .php
>
>
> > instruct Apache to look for index.php files (I forget where this is... I
> > believe it's towards the bottom of the default httpd.conf file)
>
>I can't seem to find this part of the document the only mention of PHP in my
>file is like this:
>  # For example, the PHP3 module (not part of the Apache distribution)
># will typically use:
>#
>#AddType application/x-httpd-php3 .phtml
>#AddType application/x-httpd-php3-source .phps
>ScriptAlias /php/ "c:/php/"
>    AddType application/x-httpd-php .php
>    Action application/x-httpd-php c:/php/php.exe

this line is wrong, change it to:
Action application/x-httpd-php "/php/php.exe"
and buy yourself new glasses :)

daniel

/*--
daniel beulshausen - [EMAIL PROTECTED]
using php on windows? http://www.php4win.de





*.php  files are not processed by apache/php

say I hav test.php with "<html><body><HR><?php echo "hello php";
?><HR></body></html>"
then I only see the two <HR>'s.

I' use
    apache-1.3.20.tar.gz
    php-4.0.6.tar.gz
    mod_perl-1.25.tar.gz

unptarring . . .

configuring/making apache
    ./configure --enable-modules=most --enable-shared=max
    make
    make install

    now apache is in /usr/local/apache situated.
    so when I run /usr/local/bin/apachectl start, apache works.

 configuring.making mod_perl
    perl Makefile.PL

 configuring/making php4-4.0.6
    ./configure --with-mysql=/usr
--with-apxs=/usr/local/apache/bin/apxs  [
--with-config-file-path=/usr/local/apache ]
    make
    make install

 check on /usr/local/apache/conf/httpd.conf
    LoadModule perl_module    libexec/libperl.so
    LoadModule php4_module  libexec/libphp4.so

    AddModule  mod_perl.c
    AddModule  mod_php4.c

    AddType application/x-httpd-php .php .php3 .phtml
    AddType application/x-httpd-php-source .phps

 copy the php.ini-dist to /usr/loca/lib/php.ini

 and finally /usr/local/apache/bin/apachectl stop
 and /usr/local/apache/bin/apachectl start

when I open an *php  file (see above) I don't see anything of php code..

Further information : the /usr/local/apache/logs/error.log says the
modules perl and php are loaded
and operation is normal.
In the /usr/local/apache/logs/access.log no metion is made of the
opening of the *php file.
I thing apache indeed call the php module to process the *php file, but
then nothing happens.

I've seen this problem has attracted the attention of many other people,
but no satisfying answer is given.

Is there someone who has knowledge of the php stuff and can help me how
to solve this ?

many thanks in advance.
Harry van Rijn





Hi everybody............... I work with linux red hat 7.1 ,apache and php 4.0.4... my 
question is how I can update my version of php to 4.0.6   I read various text but only 
learn how Install.. but not how update......help me..... thanks in advance.....




Reply via email to