php-install Digest 16 Aug 2001 13:28:43 -0000 Issue 416 Topics (messages 3984 through 3995): Re: If phpinfo works why doesnt anything else ? 3984 by: Mark Roedel 3987 by: Jonathan Hilgeman PHP4.0.6 Installed as CGI - #!/usr/local/php/php line echoed with output 3985 by: Gary Betz 3988 by: Gary Betz Quite a perplexing problem (install on Apache + PHP CGI) 3986 by: Mike Eheler Close Postgresql Database Connection Problem ? 3989 by: Perrin Installing on a cobalt Raq 3 3990 by: Jason Brashear Problem running ./configure 3991 by: Neo 3993 by: Neo 3994 by: Jani Taskinen hi all 3992 by: Hans Problems installing ucd-snmp-4.2.2 into PHP 4.0.6 3995 by: Gayland Gump 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] ----------------------------------------------------------------------
> -----Original Message----- > From: Pierce Leahy [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 15, 2001 3:21 PM > To: [EMAIL PROTECTED] > Subject: [PHP-INST] If phpinfo works why doesnt anything else ? > > > I've tried most every combination of servers with php and all > I can ever get to work is the phpinfo and sometimes not even > that. I have 2 nt boxes on one I tried IIS and on the other > I've tried apache and Xitami. Nothing works the way it should. Specific details are good. What happens when it doesn't work? Do you see error messages? (If so, what do they say?) Do you get *some* output, but just not what you expected to see? (If so, how is it different from what you expected?) > The latest is I just get blank pages This usually means that the file isn't getting processed by the PHP engine. (If you view source in your browser, I'd expect you'll probably see your PHP source code.) Which, in turn, usually means that you haven't correctly modified your server configuration files to tell the PHP engine what to process. On Apache, this is done with the AddType lines in httpd.conf; for the other servers you're running, you'll just have to dig into the manual and see what the appropriate steps are. --- Mark Roedel | "Blessed is he who has learned to laugh Systems Programmer | at himself, for he shall never cease LeTourneau University | to be entertained." Longview, Texas, USA | -- John Powell
I set up lots of development boxes using Windows/PHP and I've found that the quickest road to getting started is just to download and run FoxServ: http://prdownloads.sourceforge.net/foxserv/foxserv-v1.0.exe It will install PHP 4.0.5/mySQL 3.23.37/Apache 1.3.19 with GD and all that jazz and it takes literally about 1-3 minutes (3 minutes on a 486 running Windows 95) to be staring at a working PHP page, and from there, you can modify configs as you like to change Apache's document root to a different directory if you don't want all your web-accessible files to be in C:\FoxServ\www, etc.... I've been working on a tool to configure post-installed FoxServ, but it's not finished yet. I'm not the developer of the installer program, but this is one of the best installers I've seen. The only problem is that the developer ran out of time and is trying to pass the project on to someone else now. So there won't be any updates until someone takes it on. - Jonathan "Pierce Leahy" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Xitami > WinNt > php 4 > > I've tried most every combination of servers with php and all I can ever get > to work is the phpinfo and sometimes not even that. I have 2 nt boxes on one > I tried IIS and on the other I've tried apache and Xitami. Nothing works the > way it should. > > The "documentation" says to set some dir's in the php ini file, I did that > nothing works. I saw a post from a woman who says to set the dir's to blank, > I did that and phpinfo started working and she doesn't even work for php. > > The latest is I just get blank pages > > Isn't there some sort of configuration tool that you can run and it'll check > all the setting to make sure they're correct.?? ? > > >
I've installed PHP4.0.6 as a CGI application. I have everthing working and I can run my scripts from the command line with no problems. The problem lies in when I install my php script into the cgi-bin directory and run it from a browser. The header line in the script gets echoed along with the script output. For example, here's the script: #!/usr/local/php4.0.6/bin/php <? $hourdiff = "-3"; // hours difference between server time and local time $timeadjust = ($hourdiff * 60 * 60); $mydate = date("l, F dS, Y",time() + $timeadjust); print ("$mydate"); ?> This is the ouput: #!/usr/local/php4.0.6/bin/php Wednesday, August 15th, 2001 Any suggestions? I tend to believe its an Apache configuration issue, but I not sure specifically. I'm running Apache 1.3.17. Thanks
All, Found the solution in another posting. You need to use the --enable-discard-path option when compiling PHP. Evidently, this supresses the output of the #!/path header output when using PHP as a CGI application. Thx Gary Betz wrote: > I've installed PHP4.0.6 as a CGI application. I have everthing working > and I can run my scripts from the command line with no problems. > > The problem lies in when I install my php script into the cgi-bin > directory and run it from a browser. The header line in the script gets > echoed along with the script output. For example, here's the script: > > #!/usr/local/php4.0.6/bin/php > > <? > $hourdiff = "-3"; // hours difference between server time and local time > > $timeadjust = ($hourdiff * 60 * 60); > > $mydate = date("l, F dS, Y",time() + $timeadjust); > > print ("$mydate"); > > ?> > > This is the ouput: > > #!/usr/local/php4.0.6/bin/php Wednesday, August 15th, 2001 > > Any suggestions? I tend to believe its an Apache configuration issue, > but I not sure specifically. I'm running Apache 1.3.17. > > Thanks
Okay, be prepared for this one. It's a doozy. Here's what I ultimately want to accomplish. Have a central script: http://www.myisp.com/controlpanel/filemanager.php User logs into control panel, and wants to access the file manager. Let's say this user is called "myhostedsite", and has a site called "myhostedsite.com" which is on our servers at /usr/local/apache/virtual-hosts/com/m/myhostedsite/, owner.group: myhostedsite.myhostedsite Now, I want to be able to give full read/write permissions to that user, through this file manager script that I have written. Currently I have looked at renaming the file manager to something like "filemanager.sphp" and then having .sphp send files through a wrapper on that user's hosted site. (/usr/local/apache/virtual-hosts/com/m/myhostedsite/cgi-bin/php-wrapper.cgi or .sh or whatever will work) to suid before executing the script. I have attempted having a copy of the PHP CGI binary installed in /usr/local/bin/php and having the shell script invoke the CGI binary by the command line, then spewing forth the output. One other option I looked at, was to have every hosted site have a /control-panel alias (so http://myhostedsite.com/control-panel) and have that load to our control panel, but since our sites are managed with mod_rewrite (hence our directory structure). No such luck so far, and I was hoping someone with a little more knowledge/experience in doing something similar may be able to steer me in the right direction in getting this configured properly, or even an entirely different way of setting it up so that it'll work. Mike Eheler
Hi ! There are some confusion for me. Could you help me ? Suppose I write a program by php and connect the postgresql database through web page. If I use the providing API from PHP connect to postgresql database, like that pg_connect(); ==> $connection = pg_connect("$constr user='$USER' password='$PW'"); Actually It should be closed the connection after access finished, like that pg_close(); ==> pg_close($connection); But if the user force to close the web page that means have not close the connection. I want to ask the connection will be closed by Apache Server automatic ? or when user closed the web page the connection will be closed at the same time ? If the connection have not been closed automatic. So the Apache Server will keep the connect port forever ? Actually the connection port handle by Apache Server or PHP ? Details: ================= PHP 4.0.3pl1 PostgresSQL 7.0.3 Apache Server 1.3.14 Linux Redhat 6.2 Regard's
I am having trouble getting PHP 4.0.6 to install on a Raq 3 from cobalt. Please help... -Jason
(Last line found in config.log: configure:2181: checking lex output file root) The ./configure failed with this message: configure: error: cannot find output from lex; giving up Can anyone PLEASE tell me why I got this? (Aside from the fact that it said the command was not found, what do I DO about it?) Thanks for any help you can provide. Neo Greensboro, NC
(Last line found in config.log: configure:2181: checking lex output file root) The ./configure failed with this message: configure: error: cannot find output from lex; giving up Can anyone PLEASE tell me why I got this? (Aside from the fact that it said the command was not found, what do I DO about it?) Thanks for any help you can provide. Neo Greensboro, NC
Install flex. --Jani On Wed, 15 Aug 2001, Neo wrote: >(Last line found in config.log: configure:2181: checking lex output file >root) > >The ./configure failed with this message: > >configure: error: cannot find output from lex; giving up > >Can anyone PLEASE tell me why I got this? (Aside from the fact that it said >the command was not found, what do I DO about it?) > >Thanks for any help you can provide. > >Neo >Greensboro, NC > > > > >
Hi all, I am just wondering why is PHP4 so hard to install on Win98 PWS machine. I have try every possible way from internet, buat nothing worked out :( I tried BadBlue, Apache bla bla, still doesn't work! Can somebody pls explain how to install php4 properly step by step ? Thx in advanced Hans
Help! I am unable to install build PHP 4.0.6 with ucd-smnp-4.2.1. I hope I have provided sufficient information to obtain assistance. Please contact me if you have any additional information needs. ./configure --without-mysql --with-pgsql=3D3D/usr/local/pgsql=3D20 --with-apache=3D3D../apache_1.3.20 --with-snmp --enable-sockets ******************** DEBUG.LOG FOLLOWS: ******************** CONFIGURE: './configure' '--without-mysql' '--with-pgsql=3D3D/usr/local/pgsql' '--with-apache=3D3D../apache_1.3.20' '--with-snmp' '--enable-sockets' CC: /usr/local/bin/gcc CFLAGS: -g -O2 CPPFLAGS: -D_POSIX_PTHREAD_SEMANTICS -DSUPPORT_UTF8 CXX: =3D20 CXXFLAGS: =3D20 INCLUDES: -I/home/gump/build/apache_1.3.20/src/include -I/home/gump/build/apache_1.3.20/src/os/unix -I$(top_builddir)/Zend -I/usr/local/include/ucd-snmp LDFLAGS: -L/usr/local/lib -R/usr/ucblib -L/usr/ucblib -R/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0 -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0 -R/usr/local/pgsql/lib -L/usr/local/pgsql/lib -R/usr/local/lib -L/usr/local/lib LIBS: -lsnmp -lpq -lcrypt -lresolv -lresolv -lresolv -lm -ldl -lsocket -lsocket -lgcc DLIBS: =3D20 SAPI: apache PHP_RPATHS: /usr/ucblib /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0 /usr/local/pgsql/lib /usr/local/lib uname -a: SunOS yawah.nbt.us.net 5.8 Generic_108528-09 sun4u sparc SUNW,Sun-Blade-100 /usr/local/bin/gcc -o conftest -g -O2 -D_POSIX_PTHREAD_SEMANTICS -DSUPPORT_UTF8 -L/usr/local/lib -R/usr/ucblib -L/usr/ucblib -R/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0 -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0 -R/usr/local/pgsql/lib -L/usr/local/pgsql/lib -R/usr/local/lib -L/usr/local/lib conftest.c -lsnmp -lpq -lcrypt -lresolv -lresolv -lresolv -lm -ldl -lsocket -lsocket -lgcc 1>&5 /usr/local/lib/libsnmp.so: undefined reference to `EVP_DigestInit' /usr/local/lib/libsnmp.so: undefined reference to `kstat_read' /usr/local/lib/libsnmp.so: undefined reference to `kstat_data_lookup' /usr/local/lib/libsnmp.so: undefined reference to `EVP_DigestFinal' /usr/local/lib/libsnmp.so: undefined reference to `EVP_md5' /usr/local/lib/libsnmp.so: undefined reference to `HMAC' /usr/local/lib/libsnmp.so: undefined reference to `EVP_sha1' /usr/local/lib/libsnmp.so: undefined reference to `des_cbc_encrypt' /usr/local/lib/libsnmp.so: undefined reference to `des_key_sched' /usr/local/lib/libsnmp.so: undefined reference to `kstat_close' /usr/local/lib/libsnmp.so: undefined reference to `EVP_DigestUpdate' /usr/local/lib/libsnmp.so: undefined reference to `RAND_bytes' /usr/local/lib/libsnmp.so: undefined reference to `des_ncbc_encrypt' /usr/local/lib/libsnmp.so: undefined reference to `kstat_lookup' /usr/local/lib/libsnmp.so: undefined reference to `kstat_open' collect2: ld returned 1 exit status ******************** Local environment ******************** BASH=3D3D/usr/bin/bash BASH_VERSINFO=3D3D([0]=3D3D"2" [1]=3D3D"03" [2]=3D3D"0" [3]=3D3D"1" =3D [4]=3D3D"release" [5]=3D3D"sparc-sun-solaris") BASH_VERSION=3D3D'2.03.0(1)-release' CC=3D3D/usr/local/bin/gcc HOSTTYPE=3D3Dsparc LANG=3D3DC LDFLAGS=3D3D-L/usr/local/lib LD_LIBRARY_PATH=3D3D/usr/local/lib:/usr/local/ssl/lib MACHTYPE=3D3Dsparc-sun-solaris OPTERR=3D3D1 OPTIND=3D3D1 OSTYPE=3D3Dsolaris PATH=3D3D/home/gump/bin:/usr/local/mysql/bin:/usr/local/pgsql/bin:/usr/l o= c a=3D l /bin:/usr/local/sbin:/usr/sbin:/usr/ccs/bin:/usr/bin::/usr/dt/bin:/usr/o penwin/bin:/bin:/usr/ucb PWD=3D3D/home/gump/build/php-4.0.6 SHELL=3D3D/usr/bin/bash SHELLOPTS=3D3Dbraceexpand:hashall:histexpand:monitor:history:interactive -= c o=3D m ments:emacs SHLVL=3D3D1 ******************** build for ucd-snmp-4.2.1 ******************** ./configure --enable-internal-md5 make make install =3D20 ******************** contents of /usr/local/lib ******************** bash-2.03$ ls /usr/local/lib gcc-lib libglib.so libstdc++.so gimp libgmodule-1.2.so.0 libstdc++.so.3 glib libgmodule-1.2.so.0.0.10 libstdc++.so.3.0.0 libbfd.a libgmodule.a libsupc++.a libbfd.la libgmodule.la libsupc++.la libgcc_s.so libgmodule.so libtcl8.3.so libgcc_s.so.1 libgthread-1.2.so.0 libtclstub8.3.a libgck-1.2.so.2 libgthread-1.2.so.0.0.10 libtiff.a libgck-1.2.so.2.0.0 libgthread.a libtiff.so libgck.a libgthread.la libtk8.3.so libgck.la libgthread.so libtkstub8.3.a libgck.so libgtk-1.2.so.0 libucdagent-0.4.2.1.so libgdk-1.2.so.0 libgtk-1.2.so.0.9.1 libucdagent.a libgdk-1.2.so.0.9.1 libgtk.a libucdagent.la libgdk.a libgtk.la libucdagent.so libgdk.la libgtk.so libucdmibs-0.4.2.1.so libgdk.so libhistory.a libucdmibs.a libgimp-1.2.so.2 libiberty.a libucdmibs.la libgimp-1.2.so.2.0.0 libopcodes.a libucdmibs.so libgimp.a libopcodes.la libwrap.a libgimp.la libpng.a libz.a libgimp.so libpng.so locale libgimpui-1.2.so.2 libpng.so.2 perl5 libgimpui-1.2.so.2.0.0 libpng.so.2.1.0.12 php libgimpui.a libreadline.a pkgconfig libgimpui.la libsnmp-0.4.2.1.so python2.1 libgimpui.so libsnmp.a tcl8.3 libglib-1.2.so.0 libsnmp.la tclConfig.sh libglib-1.2.so.0.0.10 libsnmp.so tk8.3 libglib.a libstdc++.a tkConfig.sh libglib.la libstdc++.la CC: /usr/local/bin/gcc CFLAGS: -g -O2 CPPFLAGS: -D_POSIX_PTHREAD_SEMANTICS -DSUPPORT_UTF8 CXX: =3D20 CXXFLAGS: =3D20 INCLUDES: -I/home/gump/build/apache_1.3.20/src/include -I/home/gump/build/apache_1.3.20/src/os/unix -I$(top_builddir)/Zend -I/usr/local/include/ucd-snmp LDFLAGS: -L/usr/local/lib -R/usr/ucblib -L/usr/ucblib -R/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0 -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0 -R/usr/local/pgsql/lib -L/usr/local/pgsql/lib -R/usr/local/lib -L/usr/local/lib LIBS: -lsnmp -lpq -lcrypt -lresolv -lresolv -lresolv -lm -ldl -lsocket -lsocket -lgcc DLIBS: =3D20 SAPI: apache PHP_RPATHS: /usr/ucblib /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0 /usr/local/pgsql/lib /usr/local/lib uname -a: SunOS yawah.nbt.us.net 5.8 Generic_108528-09 sun4u sparc SUNW,Sun-Blade-100 /usr/local/bin/gcc -o conftest -g -O2 -D_POSIX_PTHREAD_SEMANTICS -DSUPPORT_UTF8 -L/usr/local/lib -R/usr/ucblib -L/usr/ucblib -R/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0 -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0 -R/usr/local/pgsql/lib -L/usr/local/pgsql/lib -R/usr/local/lib -L/usr/local/lib conftest.c -lsnmp -lpq -lcrypt -lresolv -lresolv -lresolv -lm -ldl -lsocket -lsocket -lgcc 1>&5 /usr/local/lib/libsnmp.so: undefined reference to `EVP_DigestInit' /usr/local/lib/libsnmp.so: undefined reference to `kstat_read' /usr/local/lib/libsnmp.so: undefined reference to `kstat_data_lookup' /usr/local/lib/libsnmp.so: undefined reference to `EVP_DigestFinal' /usr/local/lib/libsnmp.so: undefined reference to `EVP_md5' /usr/local/lib/libsnmp.so: undefined reference to `HMAC' /usr/local/lib/libsnmp.so: undefined reference to `EVP_sha1' /usr/local/lib/libsnmp.so: undefined reference to `des_cbc_encrypt' /usr/local/lib/libsnmp.so: undefined reference to `des_key_sched' /usr/local/lib/libsnmp.so: undefined reference to `kstat_close' /usr/local/lib/libsnmp.so: undefined reference to `EVP_DigestUpdate' /usr/local/lib/libsnmp.so: undefined reference to `RAND_bytes' /usr/local/lib/libsnmp.so: undefined reference to `des_ncbc_encrypt' /usr/local/lib/libsnmp.so: undefined reference to `kstat_lookup' /usr/local/lib/libsnmp.so: undefined reference to `kstat_open' collect2: ld returned 1 exit status ******************** Local environment ******************** BASH=3D3D/usr/bin/bash BASH_VERSINFO=3D3D([0]=3D3D"2" [1]=3D3D"03" [2]=3D3D"0" [3]=3D3D"1" =3D [4]=3D3D"release" [5]=3D3D"sparc-sun-solaris") BASH_VERSION=3D3D'2.03.0(1)-release' CC=3D3D/usr/local/bin/gcc HOSTTYPE=3D3Dsparc LANG=3D3DC LDFLAGS=3D3D-L/usr/local/lib LD_LIBRARY_PATH=3D3D/usr/local/lib:/usr/local/ssl/lib MACHTYPE=3D3Dsparc-sun-solaris OPTERR=3D3D1 OPTIND=3D3D1 OSTYPE=3D3Dsolaris PATH=3D3D/home/gump/bin:/usr/local/mysql/bin:/usr/local/pgsql/bin:/usr/l o= c a=3D l /bin:/usr/local/sbin:/usr/sbin:/usr/ccs/bin:/usr/bin::/usr/dt/bin:/usr/o penwin/bin:/bin:/usr/ucb PWD=3D3D/home/gump/build/php-4.0.6 SHELL=3D3D/usr/bin/bash SHELLOPTS=3D3Dbraceexpand:hashall:histexpand:monitor:history:interactive -= c o=3D m ments:emacs SHLVL=3D3D1 ******************** build for ucd-snmp-4.2.1 ******************** ./configure --enable-internal-md5 make make install =3D20 ******************** contents of /usr/local/lib ******************** bash-2.03$ ls /usr/local/lib gcc-lib libglib.so libstdc++.so gimp libgmodule-1.2.so.0 libstdc++.so.3 glib libgmodule-1.2.so.0.0.10 libstdc++.so.3.0.0 libbfd.a libgmodule.a libsupc++.a libbfd.la libgmodule.la libsupc++.la libgcc_s.so libgmodule.so libtcl8.3.so libgcc_s.so.1 libgthread-1.2.so.0 libtclstub8.3.a libgck-1.2.so.2 libgthread-1.2.so.0.0.10 libtiff.a libgck-1.2.so.2.0.0 libgthread.a libtiff.so libgck.a libgthread.la libtk8.3.so libgck.la libgthread.so libtkstub8.3.a libgck.so libgtk-1.2.so.0 libucdagent-0.4.2.1.so libgdk-1.2.so.0 libgtk-1.2.so.0.9.1 libucdagent.a libgdk-1.2.so.0.9.1 libgtk.a libucdagent.la libgdk.a libgtk.la libucdagent.so libgdk.la libgtk.so libucdmibs-0.4.2.1.so libgdk.so libhistory.a libucdmibs.a libgimp-1.2.so.2 libiberty.a libucdmibs.la libgimp-1.2.so.2.0.0 libopcodes.a libucdmibs.so libgimp.a libopcodes.la libwrap.a libgimp.la libpng.a libz.a libgimp.so libpng.so locale libgimpui-1.2.so.2 libpng.so.2 perl5 libgimpui-1.2.so.2.0.0 libpng.so.2.1.0.12 php libgimpui.a libreadline.a pkgconfig libgimpui.la libsnmp-0.4.2.1.so python2.1 libgimpui.so libsnmp.a tcl8.3 libglib-1.2.so.0 libsnmp.la tclConfig.sh libglib-1.2.so.0.0.10 libsnmp.so tk8.3 libglib.a libstdc++.a tkConfig.sh libglib.la libstdc++.la