php-install Digest 13 Sep 2001 17:35:51 -0000 Issue 456

Topics (messages 4285 through 4289):

php4 and apache on SuSE Linux
        4285 by: T.Sean Schulze

Re: [PHP] php4 and apache on SuSE Linux
        4286 by: T.Sean Schulze

Compiling errors with PHP+SSL
        4287 by: Jonathan Hilgeman

How to check for http:[EMAIL PROTECTED] ?
        4288 by: Joerg Aldinger

PHP not compiling
        4289 by: Sean McCoy

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]


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


I am trying to run a simple php4 script on my SuSE Linux 7.2 (Update) 
system, but I am not getting the correct output.  Instead of the browser 
(Netscape or Konqueror) showing a normal web page, it shows the raw 
commands from the php script portion of the html file.

Here is the script I am using:

<html>
        <head>
        <title>PHP Test Example</title>
        </head>
        <body>
        <?php
                
                echo <hr>;
                echo date("H:i, jS F");
                echo <p>;
                echo Hi, I am a PHP script!<p>;
                echo <hr>;
                
        ?>
        </body>
</html>

When I open this file with konqueror or Netscape, the browser window 
carries the title "PHP Test Example", but the output within the browser 
window looks like this:

; echo date("H:i, jS F"); echo 

; echo Hi, I am a PHP script!

; echo 
-------------------------<a horizontal rule>___________________
; ?> 

Furthermore, if I run a simple script from the command line, something like 
this ("trythis.php"):

#!/usr/bin/php

echo "Hey, I am working fine.";

this is the output I get:

tschulze:~/web_dev/schulze> ./trythis.php
X-Powered-By: PHP/4.0.4pl1
Content-type: text/html
 
 
echo "Hey, I am working fine.";
 
tschulze:~/web_dev/schulze>

Any idea what I need to do to get this working right?

TIA,
Sean

[EMAIL PROTECTED]




Kelly Barrett wrote:

> Hi Sean,
> What webserver are you using?  Is it using the Apache module of PHP or the
> CGI version?
> 

I will admit to being a newbie, but I am pretty sure that I am using the 
module version.  My /etc/httpd/httpd.conf file includes these lines:

<IfDefine PHP>
LoadModule php3_module /usr/lib/apache/libphp3.so
</IfDefine>
<IfDefine PHP4>
LoadModule php4_module /usr/lib/apache/libphp4.so
</IfDefine>

and these:

    #
    # AddType allows you to tweak mime.types without actually editing it, 
or to
    # make certain files to be certain types.
    #
    # For example, the PHP 3.x module (not part of the Apache distribution 
- see    # http://www.php.net) will typically use:
    #
    <IfModule mod_php3.c>
    AddType application/x-httpd-php3 .php3
    AddType application/x-httpd-php3-source .phps
    AddType application/x-httpd-php3 .phtml
    </IfModule>
    #
    # And for PHP 4.x, use:
    #
    <IfModule mod_php4.c>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php4
    AddType application/x-httpd-php-source .phps
    </IfModule>

> Perhaps the extension of your file doesn't have the PHP processor
> associated with it (if it is installed as an Apache process)?
> 

See above.

> Maybe you are using the CGI version incorrectly?
> 

I think I am using the module.

> With the command line version, you still need the <?php ?> tags before it
> will process the PHP code.
> 
> e.g.
> #!/usr/bin/php
> 
> <?php
> echo "Hey, I am working fine.";
> ?>
> 
> That should work as you expect.
> 

Thanks for that tip.  That fixed the command line script I was working on.  
Now, if I could get the module working...

I think I just figured it out.  I think the problem was the location of the 
file.  I was trying to open a file in my home directory, not in apache's 
DocumentRoot directory as defined in the httpd.conf file.  Once I moved the 
file there, it ran fine.

Thanks you all for your help.

Cheers,
Sean




I just recently installed OpenSSL 0.9.6b, then Apache 1.3.20+mod_ssl 2.8.4
and now I want to add on PHP 4.0.6. However, when I try to compile, it fails
with the following error:

--- SNIPPET ---
checking for OpenSSL support... yes
checking for OpenSSL version... >= 0.9.5
checking for CRYPTO_free in -lcrypto... yes
checking for SSL_CTX_set_ssl_version in -lssl... no
configure: error: libssl not found!
===>  Script "configure" failed: here are the contents of "config.log"
--- END SNIPPET ---

So, I looked at the bottom of the output and I see:

-- SNIPPET ---
configure:7920: cc -o
conftest -O -pipe  -DHARD_SERVER_LIMIT=512 -DDOCUMENT_LOCATION="/usr/local/w
ww/data/" -DDEFAULT_PATH="/usr/local/bin:/bin:/usr/bin" -DACCEPT_FILTER_NAME
="httpready" -DMOD_SSL=208104 -DEAPI -DEAPI_MM -DUSE_EXPAT
conftest.c -lssl  -lcrypto -lm  1>&5
/usr/lib/libssl.so: undefined reference to `sk_new_null'
/usr/lib/libssl.so: undefined reference to `RAND_add'
... about 6 more undefined references ...
/usr/lib/libssl.so: undefined reference to `RAND_pseudo_bytes'
--- END SNIPPET ---

Anyone have any ideas what is happening? I have libssl.so, .so.0, .so.1,
.so.2, and .a all in /usr/local/lib. PHP was searching in /usr/lib for it,
so I made symbolic links in /usr/lib for all of those files.

- Jonathan






I would like to enable personal homepages on my domain using an address like
http:[EMAIL PROTECTED] , I have seen it used on a provider's site, and
imagine I could do this with Apache and PHP but have no clue as to how it
could work.
The problem is, that $PHP_AUTH_USER is empty if Authentication is turned
off, that would have been the easiest way...
Any ideas out there?






The following is the content from my debug.log.
This happens whether I am compiling 4.04, 05 or 06.
=============================
CONFIGURE:   './configure' '--with-apxs=/usr/local/apache/bin/apxs'
'--enable-versioning' '--with-pgsql=/usr/local/pgsql' '--enable$
CC:         gcc
CFLAGS:     -g -O2
CPPFLAGS:    -DLINUX=22 -DMOD_SSL=208102 -DUSE_HSREGEX -DEAPI -DEAPI_MM -DUS
E_EXPAT
CXX:
CXXFLAGS:
INCLUDES:    -I/usr/local/apache/include  -I$(top_builddir)/Zend -I/usr/loca
l/ssl/include -I/usr/local/imap-2001.RELEASE-CANDIDATE.$
LDFLAGS:     -Wl,-rpath,/usr/local/ssl/lib -L/usr/local/ssl/lib -Wl,-rpath,/
usr/local/imap-2001.RELEASE-CANDIDATE.1/c-client -L/usr$
LIBS:       -lmm -lpq -lgd -lcrypto -lssl -lresolv -lm -ldl -lcrypt -lnsl  -
lresolv
DLIBS:      -lc-client
SAPI:       apache
PHP_RPATHS:  /usr/local/ssl/lib
/usr/local/imap-2001.RELEASE-CANDIDATE.1/c-client /usr/local/pgsql/lib
/usr/local/lib/mm/lib
uname -a:   Linux agi_lnx_0 2.4.6-686-smp #1 SMP Thu Jul 5 22:06:27 EST 2001
i686 unknown

gcc -o
conftest -g -O2  -DLINUX=22 -DMOD_SSL=208102 -DUSE_HSREGEX -DEAPI -DEAPI_MM 
-DUSE_EXPAT  -Wl,-rpath,/usr/local/ssl/lib -L/us$
/usr/bin/ld: cannot find -lgd
collect2: ld returned 1 exit status



Reply via email to