php-install Digest 17 Apr 2002 04:02:28 -0000 Issue 792

Topics (messages 6652 through 6659):

PHP, IIS, and multiple web sites
        6652 by: Mark Payton

PHP4 issues with GD from OpenBSD 3.0 ports
        6653 by: Iván Montoro Ten

inline php not working
        6654 by: Daniël Beukers
        6655 by: Todd Mortensen

unlink security problem
        6656 by: Patrick Cossette
        6659 by: Yasuo Ohgaki

PHP on a 2K Server
        6657 by: Darwin Sayo

Php 4.x install problems.
        6658 by: Todd Mortensen

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 ---
I've installed PHP on IIS 5.0 and it does work fine--for my default web 
page. However, I have a second web page on the server, which is located on 
a separate hard drive, and PHP does not work for that one. All I get back 
is a blank page with the simple "Hello World" php script, although the 
exact same script works if I run it from the default web site located on 
the same hard drive. I've changed the doc_root setting in the ini file, but 
that didn't do a thing.

I'm running on Windows 2000 Server, with pretty up-to-date patches and 
service packs, IIS 5.0, and PHP 4.1.2.

I thought I had seen something in the docs about PHP needing to be on the 
same drive as the web page, but I can't locate it. As it is, PHP is on C:, 
as is the default web page, but the one for which I need PHP is on D:. Is 
this the problem?

Mark Payton




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

Here goes the dump from the debug.log file while trying to compile PHP4.
----------------------------------------------------------------------------
--------------------------------------------
CONFIGURE:   './configure' '--prefix=/var/knowgate/php4'
'--with-apache=../apache_1.3.24' '--with-mysql=/usr/local' '--with-openssl=
/var/knowgate/openssl/' '--enable-ftp' '--with-ldap' '--enable-sockets'
'--with-gd=/usr/local/' '--with-jpeg=/usr/local/'
CC:         gcc
CFLAGS:     -g -O2
CPPFLAGS:
CXX:
CXXFLAGS:
INCLUDES:    -I/var/tmp/xtras/apache/apache_1.3.24/src/include -I/var/tmp/xt
ras/apache/apache_1.3.24/src/os/unix  -I$(top_builddir)/
Zend -I/var/knowgate/openssl//include -I/usr/local//include -I/usr/local/inc
lude -I/usr/local/include/mysql
LDFLAGS:     -R/var/knowgate/openssl//lib -L/var/knowgate/openssl//lib -R/us
r/local//lib -L/usr/local//lib -R/usr/local/lib -L/usr/l
ocal/lib
LIBS:       -lmysqlclient -lldap -llber -lgd -lssl -lcrypto -lresolv -lm  -l
resolv
DLIBS:
SAPI:       apache
PHP_RPATHS:  /var/knowgate/openssl//lib /usr/local//lib /usr/local/lib
uname -a:   OpenBSD furia 3.0 GENERIC#94 i386

gcc -o
conftest -g -O2   -R/var/knowgate/openssl//lib -L/var/knowgate/openssl//lib 
-R/usr/local//lib -L/usr/local//lib -R/usr/local/
lib -L/usr/local/lib
conftest.c -lmysqlclient -lldap -llber -lgd -lssl -lcrypto -lresolv -lm  -lr
esolv 1>&5
/usr/libexec/ld.so: Undefined symbol "_jpeg_resync_to_restart" in
conftest:/usr/local/lib/libgd.so.18.3
----------------------------------------------------------------------------
--------------------------------------------

OpenBSD 3.0 with libgd compiled from ports directory: pkg_info follows:
----------------------------------------------------------------------------
--------------------------------------------
bash-2.05          GNU Bourne Again Shell
p5-Net-SSLeay-1.13 perl module for using OpenSSL
autoconf-2.13      automatically configure source code on many Un*x
platforms
squid-2.5.PRE5-transparent WWW and FTP proxy cache and accelerator
ntp-4.1.72         network time protocol implementation
bind-9.2.0-static  Berkeley Internet Name Daemon
openldap-client-2.0.23 Open source LDAP software (client)
ipfm-0.11.4        IP bandwidth analysis tool
mysql-client-3.23.49 multithreaded SQL database (client)
p5-DBI-1.21        unified perl interface for database access
p5-DBD-Msql-Mysql-1.22.19 MySQL drivers for the Perl DBI
mysql-server-3.23.49 multithreaded SQL database (server)
jpeg-6b            IJG's JPEG compression utilities
png-1.2.1          library for manipulating PNG images
libiconv-1.7       character set conversion library
gettext-0.10.40    GNU gettext
gmake-3.79.1       GNU make
freetype-1.3.1     free and portable TrueType font rendering engine
gd-1.8.3           graphics library for fast PNG creation
p5-GD-1.33         module to interface with the GD graphics library
----------------------------------------------------------------------------
--------------------------------------------

The "configure" string follows. It works removing last two options (GD and
JPEG). OpenLDAP client, mySQL and OpenSSL are running OK.
----------------------------------------------------------------------------
--------------------------------------------
./configure --prefix=/var/knowgate/php4 --with-apache=../apache_1.3.24 --wit
h-mysql=/usr/local --with-openssl=/var/knowgate/openssl/ --enable-ftp --with
-ldap --enable-sockets --with-gd=/usr/local/ --with-jpeg=/usr/local/
----------------------------------------------------------------------------
--------------------------------------------

Thanks,

Ivan Montoro

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

on my machine, php gets properly executed from .php files but NOT from
inside .html files.

When I include some inline php-code like <?php echo "hello" ?> inside HTML
files it doesn't get parsed by php.

It seems to me like it's a configuration switch, but I can't seem to find
where.

I'm running FreeBSD 4.5-RELEASE-p2. I installed apache 1.3.24_1 and
mod-php4-4.1.2 from the ports.

any ideas? thanks,
Daniël.

--- End Message ---
--- Begin Message ---
You need to tell apache to parse .html files with the php parser. 

By default apache is setup to parse .php files.   Not .html files. 

Here is the line from httpd.conf.
---------------------------------------
AddType application/x-httpd-php .php
---------------------------------------


-----Original Message-----
From: Daniël Beukers [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 16, 2002 7:51 AM
To: Php-Install (E-mail)
Subject: [PHP-INST] inline php not working


Hi,

on my machine, php gets properly executed from .php files but NOT from
inside .html files.

When I include some inline php-code like <?php echo "hello" ?> inside HTML
files it doesn't get parsed by php.

It seems to me like it's a configuration switch, but I can't seem to find
where.

I'm running FreeBSD 4.5-RELEASE-p2. I installed apache 1.3.24_1 and
mod-php4-4.1.2 from the ports.

any ideas? thanks,
Daniël.


-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi, I've already sent that to the php-general list before discovering php-install. 
Sorry for the duplicate.

I'm running PHP 4.1.2 as an Apache module (Apache 1.3.24) under AIX 4.3.3.

My problem has been covered in Bug #13447 but I still have it and the bug
was under Windows 2000 but I'm running AIX. It's a security
problem with "unlink". My site runs as the user "web" but different parts of
my site are modified by different developpers. Since all
files are owned by "web", I set up an open_basedir so each developper is
limited to make file operations on his directory-tree. My
problem is that this setup does not prevent unlinking, which means that one
can delete files that are not under his directory-tree, and
I do not want that. With the following setup, fopen and include are
restricted by openbasedir, which is good. But one can unlink a file
even if it's not under his directory-tree. I have the following in
httpd.conf:

<Directory "/u/uq/web/www.uqtr.ca/">
Options Indexes Includes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
   <IfModule mod_php4.c>
      AddType application/x-httpd-php .php
      php_flag engine on
      php_admin_value safe_mode 1
      php_admin_value safe_mode_exec_dir "/u/uq/web/www.uqtr.ca/"
      php_admin_value doc_root "/u/uq/web/www.uqtr.ca/"
      php_admin_value open_basedir "/u/uq/web/www.uqtr.ca/"
      php_admin_value user_dir "/u/uq/web/www.uqtr.ca/"
   </IfModule>
</Directory>


The file testerase.php is in /u/uq/web/www.uqtr.ca and contains this:

<?php
include ('/u/uq/web/entete.uqtr.ca/file_to_include');  // THE INCLUDE DOES NOT WORK: 
IT'S RESTRICTED BY OPEN_BASEDIR AND I'M GLAD
unlink ('/u/uq/web/entete.uqtr.ca/file_to_delete');  // THE UNLINK WORKS: NO 
RESTRICTION AT ALL AND I'M UNHAPPY
?>

I need help. Is it possible to bypass file deletion permission and restrict
the directories in which to unlink?

Thanks,

Patrick
[EMAIL PROTECTED]



--- End Message ---
--- Begin Message ---
This is fixed in CVS version and in 4.2.0RCs.

--
Yasuo Ohgaki

Patrick Cossette wrote:
> Hi, I've already sent that to the php-general list before discovering php-install. 
>Sorry for the duplicate.
> 
> I'm running PHP 4.1.2 as an Apache module (Apache 1.3.24) under AIX 4.3.3.
> 
> My problem has been covered in Bug #13447 but I still have it and the bug
> was under Windows 2000 but I'm running AIX. It's a security
> problem with "unlink". My site runs as the user "web" but different parts of
> my site are modified by different developpers. Since all
> files are owned by "web", I set up an open_basedir so each developper is
> limited to make file operations on his directory-tree. My
> problem is that this setup does not prevent unlinking, which means that one
> can delete files that are not under his directory-tree, and
> I do not want that. With the following setup, fopen and include are
> restricted by openbasedir, which is good. But one can unlink a file
> even if it's not under his directory-tree. I have the following in
> httpd.conf:
> 
> <Directory "/u/uq/web/www.uqtr.ca/">
> Options Indexes Includes FollowSymLinks
> AllowOverride None
> Order allow,deny
> Allow from all
>    <IfModule mod_php4.c>
>       AddType application/x-httpd-php .php
>       php_flag engine on
>       php_admin_value safe_mode 1
>       php_admin_value safe_mode_exec_dir "/u/uq/web/www.uqtr.ca/"
>       php_admin_value doc_root "/u/uq/web/www.uqtr.ca/"
>       php_admin_value open_basedir "/u/uq/web/www.uqtr.ca/"
>       php_admin_value user_dir "/u/uq/web/www.uqtr.ca/"
>    </IfModule>
> </Directory>
> 
> 
> The file testerase.php is in /u/uq/web/www.uqtr.ca and contains this:
> 
> <?php
> include ('/u/uq/web/entete.uqtr.ca/file_to_include');  // THE INCLUDE DOES NOT WORK: 
>IT'S RESTRICTED BY OPEN_BASEDIR AND I'M GLAD
> unlink ('/u/uq/web/entete.uqtr.ca/file_to_delete');  // THE UNLINK WORKS: NO 
>RESTRICTION AT ALL AND I'M UNHAPPY
> ?>
> 
> I need help. Is it possible to bypass file deletion permission and restrict
> the directories in which to unlink?
> 
> Thanks,
> 
> Patrick
> [EMAIL PROTECTED]
> 
> 
> 
> 


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

Complete newbie here.

I am running 2k server with IIS.  I installed PHP4.1.2.  I followed the
directions.  Here's the steps I took.  Hopefully I must have missed
something.

- Installed PHP into  c:\php
- php.ini-dist renamed to php.ini and put into the winnt directory
- went into the php.ini file and changed the 'extensions_dir' to point to
c:\php.  Also set the browscap.ini to point to
c:\winnt\system32\ietsrv\browscap.ini.  Other than those two changes that's
all I made.  I didn't enable any of the extensions.
- Installed an updated MDAC
- made a registry change adding the .php extension
- Went to internet services manager/app mappings and added .php

I made an html document including <?php phpinfo();?>.  I get a blank screen.
The instructions said to try to run php.exe from a command line.  I did, got
a bunch of html which means that php is working ok.  Ugh!  Headache.  Help
please.


Darwin Sayo
Video Production
Liquid Machine Productions
www.myalameda.com
[EMAIL PROTECTED]

"Grief can take care of itself; but to get the full value of a joy you must
have somebody to divide it with." -- Mark Twain


--- End Message ---
--- Begin Message ---
I have had this same problem with php-4.1.2 and 4.2 RC4. 

I know the ap_* symbols are for apache but can't seem to find out why I
can't find them.  Is there another dir I should be adding to my
LD_LIBRARY_PATH?

Any idead appreciated.  I have been recompiling this for a week or more with
the same results.


todd@svlecs01:~/src/php-4.2.0RC4$env
PWD=/data/home/todd/src/php-4.2.0RC4
TZ=US/Pacific
LD_LIBRARY_PATH=/usr/lib:/usr/local/apache/libexec:/usr/local/lib
PS1=\u@\h:\w$
BLOCKSIZE=K
USER=todd
MACHTYPE=sparc-sun-solaris2.8
MAIL=/var/mail/todd
OLDPWD=/data/home/todd/src/php-4.2.0RC4/sapi
CVS_RSH=ssh
OGNAME=todd
SHLVL=1
SHELL=/usr/local/bin/bash
HOSTTYPE=sparc
OSTYPE=solaris2.8
HOME=/data/home/todd
TERM=xterm
PATH=/usr/local/bin:/usr/ucb:/usr/bin:/usr/sbin:/usr/openwin/bin:/usr/dt/bin
:/usr/ccs/bin:/usr/local/mysql/bin:/opt/VRTSvcs/bin:/usr/openv/netbackup/bin
:/usr/openv/netbackup/bin/goodies:/opt/VRTSllt/bin:/usr/local/apache/bin
_=/usr/bin/env

todd@svlecs01:~/src/php-4.2.0RC4$apachectl start
Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp4.so into server: ld.so.1:
/usr/local/apache/bin/httpd: fatal: relocation error: file
/usr/local/apache/libexec/libphp4.so: symbol ap_block_alarms: referenced
symbol not found
/usr/local/apache/bin/apachectl start: httpd could not be started
todd@svlecs01:~/src/php-4.2.0RC4$ldd -r /usr/local/apache/libexec/libphp4.so

        libdl.so.1 =>    /usr/lib/libdl.so.1
        libpam.so.1 =>   /usr/lib/libpam.so.1
        libmysqlclient.so.10 =>
/usr/local/mysql/lib/mysql/libmysqlclient.so.10
        libcrypt_i.so.1 =>       /usr/lib/libcrypt_i.so.1
        libresolv.so.2 =>        /usr/lib/libresolv.so.2
        libm.so.1 =>     /usr/lib/libm.so.1
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libgcc_s.so.1 =>         /usr/local/lib/libgcc_s.so.1
        libz.so.1 =>     /usr/lib/libz.so.1
        libgen.so.1 =>   /usr/lib/libgen.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        symbol not found: ap_block_alarms
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_unblock_alarms
(/usr/local/apache/libexec/libphp4.so)
        /usr/platform/SUNW,Ultra-250/lib/libc_psr.so.1
        symbol not found: ap_user_id
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_server_root
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_group_id
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_user_name
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: top_module
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_max_requests_per_child
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_table_get
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_table_setn
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_update_mtime
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_kill_timeout
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_uudecode
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_setup_client_block
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_add_cgi_vars
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_getword
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_getword_nulls_nc
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_destroy_sub_req
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_pstrdup
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_log_error
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_table_add
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_sub_req_lookup_uri
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_run_sub_req
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_register_cleanup
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_signal
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_send_http_header
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_pstrndup
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_block_alarms
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_child_terminate
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_set_etag
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_rwrite
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_table_set
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_get_client_block
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_add_version_component
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_hard_timeout
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_rflush
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_set_last_modified
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_reset_timeout
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_unblock_alarms
(/usr/local/apache/libexec/libphp4.so)
        symbol not found: ap_add_common_vars
(/usr/local/apache/libexec/libphp4.so)
--- End Message ---

Reply via email to