php-install Digest 26 Sep 2001 06:23:48 -0000 Issue 475

Topics (messages 4399 through 4406):

php install and setup questions
        4399 by: brain_damaged

Problem locating php.ini
        4400 by: Michael D. Stackhouse
        4401 by: Rasmus Lerdorf

Error compiling PHP-4.0.6
        4402 by: m.ibarra.cdcixis-na.com

Re: Apache PHP Module not working (everything else is) - HELP!!!
        4403 by: Jeremy Wadsack

File permissions within my PHP document when running on an Apache web server
        4404 by: Jack A.

Where to find Apache configuration files in Redhat
        4405 by: Jayaprakash

sablot and iconv
        4406 by: Justin Makeig

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]


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


Hello,
Installing,setup and configuring PHP to run on a 
Freebsd 4.3 machine.
I am new to all of this. I bought enough books on all of them plus apache and mysql to 
wipe out 10 acres of rain forest. I have started but have overwhelemed myself.

I have installed apache 1.3.19, freebsd 4.3, mysql 3.23 and php 4.0.6 (or whatever the 
latest is from the freebsd ports collection).

When I installed the apache it also mod's for php3 and php4. Is that okay ?

I have in my /usr/local/etc ini files for php3 (php3.ini) and php.ini (which I 
understand is for php4). There is also a directory under that ith a php.standalone 
with a php.ini 
So Which is the one to edit ?

I would like to make sure I have or will be setting up a secure box so I am open to 
suggestions on how to secure PHP and of cousre any other advice on running PHP.

THanks
Kindly
Md






We've installed Free BSD 4.2, with Apache 1.3.19.1 with
mod_php4-4.0.4pl1

We also have php4-4.0.4pl1 running stand alone.

We also have phpmyadmin-2.1.0 installed.  Phpmyadmin reports that we
don't have magic_quotes_gcp enabled, and we need to do so.

All of these packages were installed automatically from the FreeBSD
ports collection

Our problem comes in trying to enable this feature - not really sure
where to do this.   We apparently don't have a live php.ini file on our
system (all are still php.ini-dist).  I have attempted to copy and
rename that file to php.ini, and put in various folders - Phpmyadmin
still reports magic quotes still aren't enabled.

We tried to enable in Apache's httpd.conf file with php_flag on - still
not working.

There are other php settings we need to customize, but we're not sure
where to make them.  How can we verify that we are indeed enabling magic
quotes?

Thanks very much

Mike Stackhouse
SAMSA, Inc.
5560 Gratiot Rd - Suite D
Saginaw, MI 48603
USA
989-790-0507 - voice
989-790-0758 - fax
[EMAIL PROTECTED]





phpinfo() tells you where PHP is looking for php.ini

On Tue, 25 Sep 2001, Michael D. Stackhouse wrote:

> We've installed Free BSD 4.2, with Apache 1.3.19.1 with
> mod_php4-4.0.4pl1
>
> We also have php4-4.0.4pl1 running stand alone.
>
> We also have phpmyadmin-2.1.0 installed.  Phpmyadmin reports that we
> don't have magic_quotes_gcp enabled, and we need to do so.
>
> All of these packages were installed automatically from the FreeBSD
> ports collection
>
> Our problem comes in trying to enable this feature - not really sure
> where to do this.   We apparently don't have a live php.ini file on our
> system (all are still php.ini-dist).  I have attempted to copy and
> rename that file to php.ini, and put in various folders - Phpmyadmin
> still reports magic quotes still aren't enabled.
>
> We tried to enable in Apache's httpd.conf file with php_flag on - still
> not working.
>
> There are other php settings we need to customize, but we're not sure
> where to make them.  How can we verify that we are indeed enabling magic
> quotes?
>
> Thanks very much
>
> Mike Stackhouse
> SAMSA, Inc.
> 5560 Gratiot Rd - Suite D
> Saginaw, MI 48603
> USA
> 989-790-0507 - voice
> 989-790-0758 - fax
> [EMAIL PROTECTED]
>
>
>





I've tried building various ways. I've recently rebuilt libmcal from CVS.
Platform/OS: Mandrake Linux (Intel) 2.4.3

Any help with the message below would be appreciated.
I am not on this list, could you please reply to me via email?

Thank you in advance.

-mike


CONFIGURE:   './configure' '--with-apache=../apache_1.3.20' '--with-gd'
'--with-mysql=/usr/local/mysql' '--enable-track-vars'
'--with-sybase=/opt/sybase-11.9.2' '--enable-memory-limit=yes'
'--enable-debug=no' '--with-freetype-dir=/usr/local/include/freetype2'
'--with-zlib' '--with-mm' '--with-mcal=../libmcal' '--with-ldap'
'--with-imap=../imap' '--with-gettext' '--enable-ftp'
'--with-db3=/usr/local/BerkeleyDB.3.2'
CC:         gcc
CFLAGS:     -g -O2
CPPFLAGS:    -DSUPPORT_UTF8
CXX:        
CXXFLAGS:   
INCLUDES:    -I/usr/local/src/apache_1.3.20/src/include
-I/usr/local/src/apache_1.3.20/src/os/unix  -I$(top_builddir)/Zend
-I/usr/local/include -I/usr/local/BerkeleyDB.3.2/include
-I/usr/local/include/freetype2/freetype -I/usr/local/src/imap/c-client
-I/usr/local/src/libmcal -I/usr/local/mysql/include/mysql
LDFLAGS:     -Wl,-rpath,/usr/local/lib -L/usr/local/lib
-Wl,-rpath,/usr/local/BerkeleyDB.3.2/lib -L/usr/local/BerkeleyDB.3.2/lib
-Wl,-rpath,/usr/local/src/imap/c-client -L/usr/local/src/imap/c-client
-Wl,-rpath,/usr/local/src/libmcal -L/usr/local/src/libmcal
-Wl,-rpath,/usr/local/mysql/lib/mysql -L/usr/local/mysql/lib/mysql
LIBS:       -lmm -lmysqlclient -lz -lmcal -lldap -llber -lgd -lfreetype -ldb
-lz -lcrypt -lresolv -lm -ldl -lnsl  -lresolv
DLIBS:      -lc-client 
SAPI:       apache
PHP_RPATHS:  /usr/local/lib /usr/local/BerkeleyDB.3.2/lib
/usr/local/src/imap/c-client /usr/local/src/libmcal
/usr/local/mysql/lib/mysql
uname -a:   Linux webmail.hawk.com 2.4.3-20mdksmp #1 SMP Sun Apr 15 22:32:27
CEST 2001 i686 unknown

gcc -o conftest -g -O2  -DSUPPORT_UTF8  -Wl,-rpath,/usr/local/lib
-L/usr/local/lib -Wl,-rpath,/usr/local/BerkeleyDB.3.2/lib
-L/usr/local/BerkeleyDB.3.2/lib -Wl,-rpath,/usr/local/src/imap/c-client
-L/usr/local/src/imap/c-client -Wl,-rpath,/usr/local/src/libmcal
-L/usr/local/src/libmcal -Wl,-rpath,/usr/local/mysql/lib/mysql
-L/usr/local/mysql/lib/mysql conftest.c -lmm -lmysqlclient -lz -lmcal -lldap
-llber -lgd -lfreetype -ldb -lz -lcrypt -lresolv -lm -ldl -lnsl  -lresolv
1>&5
/usr/local/lib/libmcal.so: undefined reference to `cc_login'
/usr/local/lib/libmcal.so: undefined reference to `cc_searched'
/usr/local/lib/libmcal.so: undefined reference to `cc_vlog'
/usr/local/lib/libmcal.so: undefined reference to `cc_vdlog'
collect2: ld returned 1 exit status





billos ([EMAIL PROTECTED]):

> Hi,

> If anyone can help me with this, I would really appreciate it!

> ok,

> Got Apache 1.3, installed on an NT4 box, with MySQL and PHP4

> I can query the MySQL db with PHP, but ONLY in a standalone DOS box, the
> rows are returned, as requested, no problem...

> I had been starting Apache in a DOS box, before installing it as a service.
> When starting with DOS box, the banner declares that PHP has been loaded, so
> know the PHP module has been loaded, but...

> ***

> Cannot use PHP, via code embedded in html doc, i.e. apache doesn't seem to
> be redirecting the PHP commands to PHP, the page is just blank, with no
> error message!

> ***

> I'm sure I've followed all the intructions in "install.txt" that came with
> PHP, but it's drivin me NUTS! I'm pretty sure that it's a conf thing in
> httpd.conf (apache's def conf file)

> can ANYONE help???

Did you add the AddHandler and AddType lines to your httpd.conf or
srm.conf as described in the install.txt?

-- 

Jeremy Wadsack
Wadsack-Allen Digital Group





I'm having a problem with file permissions within my PHP document when
running on an Apache web server.

When accessing a perl script or an executable from the cgi-bin directory the
web server runs the script as the correct user and group id.  However then a
PHP document is accessed within the same directories as any of my other HTML
documents the web server runs the PHP document as the user "nobody".  I
found this out by calling the PHP function posix_getuid() within this PHP
document.  The problem is that the data files that are own by my account are
not accessible to my PHP document since PHP is running as user "nobody".  I'
m aware that the Apache web server runs as user "nobody" then switches to
the owner of the cgi-bin directory when executing a script, so how do I get
the web server to switch to user "myaccount" when executing a PHP document
from the root directory of the web account including its subdirectories?

The following is my PHP test documents:
On this server user id 99 is "nobody".

=====================================
File test.php
=====================================
<html>
    <head>
        <title>PHP Test</title>
    </head>
    <body>
<?php
echo PHP_VERSION;
echo "<br>";

$uid = posix_getuid();
$gid = posix_getgid();

echo "UID=$uid GID=$gid <br>";

echo "Opening for read index.html<br>";
$file = fopen ("index.html", "r");
if($file != 0) fclose($file);

echo "Opening for write new.html<br>";
$file = fopen ("new.html", "w");
if($file != 0) fclose($file);
?>
    </body>
</html>


=====================================
Output from the web browser
=====================================
4.0.6
UID=99 GID=99
Opening for read index.html
Opening for write new.html

Warning: fopen("new.html","w") - Permission denied in
/www/myaccount/test.php on line 20







Where to find Apache Configuration Files in Redhat 6.2
I need to compile PHP4 with apache

./configure -with--apache  = path to apache

if apache is installed from an RPM where will it be








I'm trying to compile PHP with sablot on Mac OS X (10.0.4). When I use
the --with-sablot flag (with a variety of direcotries specified) the 
configure script always craps out trying to find an iconv library. I
installed libiconv 1.7, but I still get the same problems:

checking for Sablotron XSL support... yes
checking libexpat dir for Sablotron 0.50... no
checking for Sablotron in default path... found in /usr/local
checking for SablotSetEncoding in -lsablot... no
checking for iconv_open in -lc... (cached) no
configure: error: iconv not found

Does anyone have any suggestions. I'm really at wit's end.

Thanks,

Justin

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. 
http://im.yahoo.com


Reply via email to