[PHP] Undefinded Index on Mysql Result under Win98/PWS

2001-02-23 Thread Greg Kopp

I am using PHP4 + MySQL + PWS + Windows 98.

We are trying to port over a web site to a laptop for remote use.

However, when we execute a SQL query on a DB in which a filed of the record
contains a NULL value, we get an error.

The code is as follows:

$GetQuery = mysql_query ("SELECT * FROM ApplicantsTbl WHERE App_ID = $qq");
$AppResult = mysql_fetch_array ($GetQuery);
$AppDOB = $AppResult[AppDOB];

The query executes just fine, and PARTS of the $AppResult array get
returned. However...

We are experiencing TWO problems:

First, unless we put quote marks around the index so it reads
$AppResult['AppDOB'], we get an undefined constant. This doesn't happen on
our Linux/Apache web server.

Second, if the field AppDOB contains a NULL value, PHP barks that there is
an undefined index. It appears that it won't even create the index.

I would appreciate any help you could be.

Greg


-- 
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]




RE: [PHP] Undefinded Index on Mysql Result under Win98/PWS

2001-02-23 Thread Greg Kopp

Thanks a ton to all. That did the trick.

Greg

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 23, 2001 1:47 PM
To: Jason Stechschulte; Greg Kopp; [EMAIL PROTECTED]
Subject: Re: [PHP] Undefinded Index on Mysql Result under Win98/PWS


Addressed to: Jason Stechschulte <[EMAIL PROTECTED]>
  Greg Kopp <[EMAIL PROTECTED]>
  [EMAIL PROTECTED]

** Reply to note from Jason Stechschulte <[EMAIL PROTECTED]> Fri, 23 Feb 2001
12:59:05 -0500
>
> On Fri, Feb 23, 2001 at 12:20:19PM -0500, Greg Kopp wrote:
> > I am using PHP4 + MySQL + PWS + Windows 98.
> > We are experiencing TWO problems:
> >
> > First, unless we put quote marks around the index so it reads
> > $AppResult['AppDOB'], we get an undefined constant. This doesn't happen
on
> > our Linux/Apache web server.
> >
> > Second, if the field AppDOB contains a NULL value, PHP barks that there
is
> > an undefined index. It appears that it won't even create the index.
>
> I think you want to check the php.ini file. I believe error_reporting
> can be changed to something less restrictive.

That might be good for a temporary solution, but not having quotes there
ia a potential bug waiting to happen.  That is why it there is a warning
about it.




Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com

--
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]




[PHP-CVS] Bug in Autoconf with latest CVS

2001-04-05 Thread Greg Kopp

I got this after I d/l'd the CVS:

[root@voyager php4]# ./buildconf
buildconf: checking installation...
buildconf: autoconf version 2.13 (ok)
buildconf: automake version 1.4 (ok)
buildconf: libtool version 1.3.5 (ok)
rebuilding Makefile templates
automake: configure.in: installing `Zend/ylwrap'
rebuilding configure
autoconf: Undefined macros:
***BUG in Autoconf--please report*** AC_ADD_LIBRARY
***BUG in Autoconf--please report*** AC_ADD_LIBRARY
***BUG in Autoconf--please report*** AC_ADD_LIBRARY
***BUG in Autoconf--please report*** AC_ADD_LIBRARY
***BUG in Autoconf--please report*** AC_ADD_LIBRARY
***BUG in Autoconf--please report*** AC_ADD_LIBRARY_WITH_PATH
***BUG in Autoconf--please report*** AC_ADD_LIBRARY
***BUG in Autoconf--please report*** AC_ADD_LIBRARY_WITH_PATH
***BUG in Autoconf--please report*** AC_ADD_LIBRARY
***BUG in Autoconf--please report*** AC_ADD_LIBRARY_WITH_PATH
***BUG in Autoconf--please report*** AC_ADD_LIBRARY
***BUG in Autoconf--please report*** AC_ADD_LIBRARY_WITH_PATH
***BUG in Autoconf--please report*** AC_ADD_LIBRARY
***BUG in Autoconf--please report*** AC_ADD_LIBRARY_WITH_PATH
***BUG in Autoconf--please report*** AC_ADD_INCLUDE
rebuilding acconfig.h
rebuilding main/php_config.h.in




-- 
PHP CVS 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] Cannot get PHP w/GD to compile with Apache on RH

2001-02-12 Thread Greg Kopp

I am having trouble getting PHP, GD and apache compiled. I have successfully
compiled PHP plus options with Apache, but can't seem to get this to work. I
need to get ImageCreateFromJPEG working. I have searched the digest,
newsgroups, etc., and haven;t found a solution that seems to work.

I am using these components:

OS: RedHat Linux 6.2

RPMs:
gd-1.8.3-4
gd-devel-1.8.3-4
gd-progs-1.8.3-4
libjpeg-devel-6b-13
libjpeg-6b-13

PHP source: php-4.0.4pl1
Apache source: apache_1.3.14

I installed the RPM's above and then started the recompile of PHP (the last
two lines I added for this option):

./configure \
--with-mysql \
--with-apache=../apache_1.3.14 \
--with-mcrypt \
--enable-track-vars \
--with-xml \
--with-curl \
--with-pspell \
--with-dom=/usr/include/libxml \
--with-gd \
--with-jpeg-dir=/usr/lib

Durring the configure process, I do see:

checking whether to include GD support... yes (static)
checking for gdImageString16 in -lgd... (cached) yes
checking for gdImagePaletteCopy in -lgd... (cached) yes
checking for gdImageColorClosestHWB in -lgd... (cached) yes
checking for compress in -lz... (cached) yes
checking for png_info_init in -lpng... (cached) yes
checking for gdImageColorResolve in -lgd... (cached) yes
checking for gdImageCreateFromPng in -lgd... (cached) yes
checking for gdImageCreateFromGif in -lgd... (cached) no
checking for gdImageWBMP in -lgd... (cached) yes
checking for gdImageCreateFromJpeg in -lgd... (cached) yes
checking for gdImageCreateFromXpm in -lgd... (cached) yes
checking whether to include FreeType 1.x support... yes
checking for T1lib support... no

Which leads me to believe the gd-1.8.3 RPM already has a link to the libjpeg
libraries. (BTW, I have tried clearing the config.cache just to make sure,
and it comes up fine even with a blank cache).

PHP copntinues and compiles fine with no errors. (make, make install)

Then I try and compile apache using the same configure script I always use:

SSL_BASE=../openssl-0.9.6 \
RSA_BASE=../rsaref-2.0/local \
EAPI_MM=../mm-1.1.3 \
./configure \
--enable-module=ssl \
--prefix=/usr/local/apache \
--enable-shared=ssl \
--activate-module=src/modules/php4/libphp4.a \
--activate-module=src/modules/perl/libperl.a \
--enable-module=vhost_alias \
--enable-module=rewrite

And durring the make process, I get:

  -o httpd buildmark.o modules.o modules/standard/libstandard.a
modules/php4/libphp4.a modules/perl/libperl.a main/libmain.a
./os/unix/libos.a ap/libap.a
lib/expat-lite/libexpat.a  -Wl,-rpath,/usr/local/lib  -rdynamic -L/usr/local
/lib -Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4  -lpam
 -ldl -lpspell -lmcrypt -lmcrypt -lz -lxml -lcurl -lresolv -lm -ldl -lcrypt
-lnsl  -lresolv -L/usr/include/libxml/lib -lz   -lm -lcrypt -lndbm -rdynamic
  -L/usr/local/lib
/usr/lib/perl5/5.00503/i386-linux/auto/DynaLoader/DynaLoader.a -L/usr/lib/pe
rl5/5.00503/i386-linux/CORE -lperl -lnsl -ldl -lm -lc -lposix -lcrypt  -lmm
-ldl
modules/php4/libphp4.a(gd.o): In function `php_free_gd_image':
/usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:198: undefined reference
to `gdImageDestroy'
modules/php4/libphp4.a(gd.o): In function `php_if_imagecreate':
/usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:460: undefined reference
to `gdImageCreate'
modules/php4/libphp4.a(gd.o): In function `_php_image_create_from_string':
/usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:525: undefined reference
to `gdNewDynamicCtx'
modules/php4/libphp4.a(gd.o): In function `php_if_imagecreatefromstring':
/usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:567: undefined reference
to `gdImageCreateFromJpegCtx'
/usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:576: undefined reference
to `gdImageCreateFromPngCtx'
/usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:594: undefined reference
to `gdImageCreateFromWBMPCtx'
modules/php4/libphp4.a(gd.o): In function `_php_image_create_from':
/usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:676: undefined reference
to `gdNewDynamicCtx'



modules/php4/libphp4.a(gdttf.o): In function `tweenColorFetch':
/usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gdttf.c:628: undefined
reference to `gdImageColorResolve'
modules/php4/libphp4.a(gdttf.o): In function `gdttf':
/usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gdttf.c:778: undefined
reference to `TT_Init_FreeType'
collect2: ld returned 1 exit status
make[2]: *** [target_static] Error 1
make[2]: Leaving directory `/usr/src/apache-php-mysql/apache_1.3.14/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/usr/src/apache-php-mysql/apache_1.3.14'
make: *** [build] Error 2

Can someone give me some insight as to what I need to do? I have tried
compiling gd, libjpeg, etc. from sources and get worse results (PHP doesn't
see the ImageCreateFromJPEG function as well as most of the others that GD
should be including).