[PHP] PHP extension is not installed?

2003-06-04 Thread David Busby
List,
I'm trying to install PHP and after each make I get this:

snip
Installing PEAR environment:  /usr/lib/php/
[PEAR] Archive_Tar: 'xml' PHP extension is not installed
[PEAR] Console_Getopt: 'xml' PHP extension is not installed
[PEAR] PEAR: 'xml' PHP extension is not installed
[PEAR] DB: 'xml' PHP extension is not installed
[PEAR] HTTP: 'xml' PHP extension is not installed
[PEAR] Mail: 'xml' PHP extension is not installed
[PEAR] Net_SMTP: 'xml' PHP extension is not installed
[PEAR] Net_Socket: 'xml' PHP extension is not installed
[PEAR] XML_Parser: 'xml' PHP extension is not installed
[PEAR] XML_RPC: 'xml' PHP extension is not installed
Installing build environment: /usr/lib/php/build/
Installing header files:  /usr/include/php/
Installing helper programs:   /usr/bin/
  program: phpize

snip

I cannot run the program 'pear'.
I've built with this configure command

./configure \
  --prefix=/usr \
  --disable-all \
  --localstatedir=/var/php \
  --enable-cli \
  --disable-cgi \
  --with-pear \
  --with-curl \
  --with-pgsql=/usr \
  --without-mysql \
  --with-dom \
  --with-expat-dir=/usr \
  --with-regex=php \
  --with-pcre-regex \
  --with-zlib-dir=/usr/include \
  --enable-sockets \
  --enable-shared \
  --enable-static \
  --disable-short-tags \
  --with-config-file-path=/etc

How do I get my 'xml' PHP extension so I can use pear?

David Busby
Systems Engineer
[EMAIL PROTECTED]

David Busby
Systems Engineer
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] xmlDoValidityCheckingDefaultValue undefined?

2002-10-10 Thread David Busby

List,
I was installing PHP 4.2.3 with the latest zlib and latest libxml2 onto 
my RH73 box.  When loading the libphp4.so Apache reports
that 'xmlDoValidityCheckingDefaultValue' is undefined, there is no error 
in the compile of Apache (2.0.43) or PHP.  I have tried recompiling 
Apache with the new libxml2, and then recompiling PHP to no avail.  The 
list archive, and google searches have not given much help.  I saw no 
errors that related to this in any of my logs.  Is there another option 
I should try?  Reccomendations?

/B


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] echo writes number of chars written

2002-09-30 Thread David Busby

List,
On my php.4.2.3, Apache 4.0.42 install my echo statements all output the
number of characters written (in hex).

So this code:
echo addrone$id-addrone/addrone;
echo addrtwo$id-addrtwo/addrtwo;
echo city$id-city/city;

Makes this XML:

1d
addronePO BOX 698/addrone
13
addrtwo/addrtwo
1a
cityABCDEF GHIJKL/city

Couldn't see anything in the bug report, ideas?

/B


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Strange output using PHP 4.2.3/Apache 2.0.42 with domxml

2002-09-30 Thread David Busby

List,
When using echo or print to output data to the response buffer, these 
functions also put the number of bytes in the buffer into the output 
stream.  This only happens when I use this code in my script:
$doc = domxml_open_mem($HTTP_RAW_POST_DATA);
After that script echo and print also write the number of bytes in the 
buffer into the buffer, why?  Whats the story with that?  How do I tell 
PHP to not do that?  Why does it write that information?

/B


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] echo writes number of chars written

2002-09-27 Thread David Busby

List,
On my php.4.2.3, Apache 4.0.42 install my echo statements all output the 
number of characters written (in hex).

So this code:
echo addrone$id-addrone/addrone;
echo addrtwo$id-addrtwo/addrtwo;
echo city$id-city/city;

Makes this XML:

1d
addronePO BOX 698/addrone
13
addrtwo/addrtwo
1a
cityABCDEF GHIJKL/city

Couldn't see anything in the bug report, ideas?

/B


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP POST arrar is dropping 4 characters - Bug Info

2002-09-26 Thread David Busby

List,
Here's the bugs:

  http://bugs.php.net/bug.php?id=19460
  http://bugs.php.net/bug.php?id=19554

It's related to mbstring, Apache 2.0.40 and PHP 4.2.3 you can get the 
latest snapshot or you can follow instructions below

snip from the bug page
The issue was with the --enable-mbstr-enc-trans configure
option; remove it from your configure line and rebuild and
the problem goes away.
This has been fixed in CVS.
/snip from the bug page

John Holmes wrote:
 This was just talked about last week, search the archives. IIRC, it was
 a bug, so maybe search the buglist, too.
 
 ---John Holmes...
 
 
-Original Message-
From: David Busby [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 25, 2002 7:29 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP POST arrar is dropping 4 characters

List,
  I'm using PHP on my RH73 box and when I post it drops 4
 
 characters
 
out of
the post array.  Can someone look at the code below and tell me if I'm
missing something?  Why would it cut four characters off?  Perhaps
 
 cause
 
the name is four chars?  Bug?

TIA
/B

HTML that is sent to browser

input name='ei[]' type='checkbox'
value=24033CD9-7C60-4AB0-9D7D-180D885DC857 /Item Onebr /
input name='ei[]' type='checkbox'
value=8D86D6B8-A42E-4B19-B930-826AAECA2AB4 /Item Twobr /
input name='ei[]' type='checkbox'
value=3D6A7538-55ED-47C9-9447-0083EE6525F5 /Item Threebr /
input name='ei[]' type='checkbox'
value=9CAC5C80-AEAA-4EF3-9B96-750994A3E787 /Item Fourbr /

PHP that reads the post:

$ar_ei = $_POST['ei'];
if (is_array($ar_ei))
{
$c = sizeof($ar_ei);
for ($i=0;$i$c;$i++)
{
  // Right here is where the first four characters are cut off
 
 from
 
  // the 'ei[]' value, should be
  // 24033CD9-7C60-4AB0-9D7D-180D885DC857 but instead is
  // 3CD9-7C60-4AB0-9D7D-180D885DC857
  echo $ar_ei[$i].br /;
}
}


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Error during complie of 4.2.3

2002-09-24 Thread David Busby

List,
I'm trying to insstall PHP 4.2.3 on my RH73 box with Apache 2.0.40.  My 
Configure script and my results are posted below, the error I'm getting 
that I can't figure out is:

libtool: link: warning: library `/usr/lib/libxml2.la' was moved.
stub.lo: file not recognized: File truncated
collect2: ld returned 1 exit status
make[1]: *** [libphp4.la] Error 1
make[1]: Leaving directory `/src/php-4.2.3'
make: *** [all-recursive] Error 1

Here is my configure script, can someone please help me figure this one out?
./configure \
   --prefix=/opt/php \
   --includedir=/usr/include \
   --mandir=/usr/share/man \
   --infodir=/usr/share/info \
   --with-config-file-path=/opt/php \
   --enable-force-cgi-redirect \
   --disable-debug \
   --disable-short-tags \
   --enable-dbg=shared \
   --with-dbg-profiler \
   --enable-pic \
   --disable-rpath \
   --enable-inline-optimization \
   --without-bz2 \
   --without-db3 \
   --without-curl \
   --with-dom=/usr \
   --with-png-dir=/usr \
   --without-gd \
   --disable-gd-native-ttf \
   --without-ttf \
   --without-gdbm \
   --with-gettext \
   --without-ncurses \
   --without-gmp \
   --with-iconv \
   --without-cdpflib \
   --without-mm \
   --with-openssl \
   --with-png \
   --without-pspell \
   --with-regex=system \
   --with-xml \
   --with-zlib \
   --with-layout=GNU \
   --enable-bcmath \
   --enable-debugger \
   --enable-exif \
   --enable-ftp \
   --enable-magic-quotes \
   --enable-safe-mode \
   --enable-sockets \
   --enable-sysvsem \
   --enable-sysvshm \
   --enable-discard-path \
   --enable-track-vars \
   --enable-trans-sid \
   --disable-yp \
   --enable-wddx \
   --without-oci8 \
   --without-imap \
   --without-imap-ssl \
   --without-kerberos \
   --without-ldap \
   --without-mysql \
   --with-pgsql=shared \
   --without-snmp \
   --disable-ucd-snmp-hack \
   --with-unixODBC=shared \
   --enable-memory-limit \
   --enable-bcmath \
   --enable-shmop \
   --enable-versioning \
   --enable-calendar \
   --enable-dbx \
   --enable-dio \
   --enable-mcal \
   --disable-mbstring \
   --enable-mbstr-enc-trans \
   --with-apxs2=/opt/httpd/bin/apxs;

/B


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP error starting Apache 2.0.40

2002-09-24 Thread David Busby

List,
Cannot load /opt/httpd/modules/libphp4.so into server:
   /opt/httpd/modules/libphp4.so: undefined symbol: mbstr_treat_data

I'm getting this trying to start Apache 2.0.40 with PHP 4.2.3, can 
anyone point to where I should start looking?  I looked at google but 
only found a few results.  Has anyone else seen this?

/B


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Trouble Making 4.2.2

2002-07-30 Thread David Busby

List,
I get this after make installis this thing trying to make sapi?  I 
want to run on Apache/RH7.3 so I don't know if I need it...couldn't find 
how to turn in with ./configure.  Please help

TIA
/B


make[1]: Leaving directory `/usr/src/php-4.2.2/regex'
Making install in .
make[1]: Entering directory `/usr/src/php-4.2.2'
make[1]: *** [install-sapi] Error 1
make[1]: Leaving directory `/usr/src/php-4.2.2'
make: *** [install-recursive] Error 1



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Download not available

2002-07-25 Thread David Busby

Downloads for the Windows binaries are broken.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] pgSQL Functions with results set to php?

2002-07-12 Thread David Busby

List,
I'm creating a PHP/pgSQL web site...I need to execute queries with a 
cursor and get their result set into my PHP script.  How can I make a 
pgSQL procedure with logic that also returns a result set?  I've 
searched and searched but cannot find the answer.  Does anyone got it?

/B


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Warning Message using pg_***

2002-07-11 Thread David Busby

List,
I'm using PG functions like below and I'm wondering how to get rid of 
that dang Warning message?  PHP.ini setting? or can I turn on/off error 
checking?

$rs is the result from pg_exec() (inside the other function)

[PHP Code]
$rs = get_database_stuff(list);
$irow = 0;
while ($ec = pg_fetch_object($rs, $irow)) {
printf(option value=\%s\, $ec-uuid);
if ($ec_uuid == $ec-uuid) { printf( selected); }
printf(%s/option\n, $ec-name);
$irow++;
}
[Resulting HTML]
option value=C878CD32A3DB4CC98DEF1D5E1BCD4E30Zhuhai Formula One/option
br
bWarning/b:  Unable to jump to row 920 on PostgreSQL result index 3 
in b/var/www/html/default.php/b on line b89/bbr
/select/td/tr


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] pgSQL Stored Procedures

2002-07-11 Thread David Busby

List,
Has anyone built Functions (or Stored Procedures) in PostgreSQL that can 
return a dataset?  I would like to contain my login in PostgreSQL (like 
I did on M$-SQL) and call it from my PHP script (like I did with ASP).

Ex:
$rs = pg_exec($db, someprocname)
while ($rec = pg_result_object($rs, $row)) {
// Stuff
}

Now someprocname should be on my PostgreSQL server and containts a 
SELECT statement whos results I want to send back to PHP for the $rs 
var.  Has anyone got this working?  I've tried all kinds of good stuff 
but can't get it to happen...

TIA
/B


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] setcookie then redirect

2002-07-10 Thread David Busby

List,
I'm trying to set a cookie like this:
?php
function redirect() {
if ($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_NAME']) {
$to = func_get_arg(0);
header(HTTP/1.1 301\n);
header(Location:http://.$_SERVER['SERVER_NAME'].$to.\n);
header(Set-Cookie: sid=$sid;\n\n);
exit();
}
}

function login() {
[... validation code here ...]
// set my cookie
setcookie(sid, $sid);
return true;
}

if (login($token) == true) {
redirect(/somepage.php);
}
?

but this thing isn't working...seems like it's not writing the SID value 
in the cookie.  In other code (on /somepage.php for example) when I read 
the cookie value ($_COOKIES['sid']) it can't find it.  Ideas?

So how do I set cookies then redirect?

I'm using Apache 1.3.x, PHP 4.1.2, RH7.3

TIA
/B


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] setcookie then redirect + Answer

2002-07-10 Thread David Busby

Read your data from $_COOKIE not $_COOKIES.

David Busby wrote:
 List,
 I'm trying to set a cookie like this:
 ?php
 function redirect() {
 if ($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_NAME']) {
 $to = func_get_arg(0);
 header(HTTP/1.1 301\n);
 header(Location:http://.$_SERVER['SERVER_NAME'].$to.\n);
 header(Set-Cookie: sid=$sid;\n\n);
 exit();
 }
 }
 
 function login() {
 [... validation code here ...]
 // set my cookie
 setcookie(sid, $sid);
 return true;
 }
 
 if (login($token) == true) {
 redirect(/somepage.php);
 }
 ?
 
 but this thing isn't working...seems like it's not writing the SID value 
 in the cookie.  In other code (on /somepage.php for example) when I read 
 the cookie value ($_COOKIES['sid']) it can't find it.  Ideas?
 
 So how do I set cookies then redirect?
 
 I'm using Apache 1.3.x, PHP 4.1.2, RH7.3
 
 TIA
 /B
 
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Stored Procedures + Answer

2002-07-05 Thread David Busby

List,
I read the documentation on postgres site (http://techdocs.postgres.sql) 
and then also the Google search and came up with this:

The way PostgreSQL usees stored procedures is like this:
A stored procedure is really a function
It just does more...like INSERT/UPDATE/DELETE, multiple DELETE or 
whatever.  So to write them use a function but just call it stored 
procedure  fancy...

Heres some code that I've never tested or run before:

CREATE FUNCTION putData (char, varchar, varchar) RETURNS int
AS '
DECLARE
x ALIAS FOR $1;
y ALIAS FOR $2;
z ALIAS FOR $3;
BEGIN
INSERT INTO tableA (colX, colY, colZ) VALUES (x, y, z);
RETURN 1;
END
' LANGUAGE 'plpgsql';

Good Luck

David Busby wrote:
 List,
 I'm using a postgres datbase for my PHP project, how do I make 
 stored procedures?  Or if no SPs then what would be recomendation for 
 building simple/reuseable Put and Get procedures for my data?
 
 /B
 
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Warning: Undefined Index?

2002-07-03 Thread David Busby

List,
I'm getting this error and I don't know why...can someone please help out?

// Message on my web page
Warning: Undefined index: mode in /var/www/html/inc/header.php on line 3

// My Script Here
1: ?php
2: // These are globals on every page
3: $mode = $_GET['mode'];
4: $si_uuid = $_GET['si_uuid'];
5: $po_uuid = $_GET['po_uuid'];

TIA
/B


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] odbc_**** failing?

2002-07-03 Thread David Busby

List,
The following code is erroring for me and I can't figure out why

$db = odbc_connect(something, something, passwd);
printf(%s, $db); // Prints ID 1
// Hangs here it looks like
$rs = odbc_exec($db, spGetItems);
// Never gets here
while(odbc_fetch_row($rs)) {
printf(%s, odbc_result($rs, 2));
}


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Using PHP to access a Microsoft SQL server

2002-07-03 Thread David Busby

List,
Has anyone done this before?  I got it to work for my root account on my 
computer but I cannot get access from my PHP scripts when I run under 
the apache user?  What the dilly yo?

Setup:
RH7.3
PHP4
unixODBC
freeTDS


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] New emalloc() error?

2002-07-03 Thread David Busby

List,
I think I saw this one on here before...when reading/writing the database 
I get this when executing odbc_exec(...);  What was the fix?



FATAL:  emalloc():  Unable to allocate 1073784417 bytes


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] New emalloc() error?

2002-07-03 Thread David Busby

Wow, Thats what that means?  There must be some error.  The procedure 
I'm trying to run doesn't return that much data and it will run via 
'isql'.  Anything else I should check?

/B

Lazor, Ed wrote:
 wow, 107megs of ram in one process is impressive.  Have you checked your
 php.ini max memory setting?  Is there sufficient ram / swap file space?  Got
 enough free drive space?
 
 -Original Message-
 List,
   I think I saw this one on here before...when reading/writing the
 database 
 I get this when executing odbc_exec(...);  What was the fix?
 
 
 
 FATAL:  emalloc():  Unable to allocate 1073784417 bytes
  
 
 This message is intended for the sole use of the individual and entity to
 whom it is addressed, and may contain information that is privileged,
 confidential and exempt from disclosure under applicable law.  If you are
 not the intended addressee, nor authorized to receive for the intended
 addressee, you are hereby notified that you may not use, copy, disclose or
 distribute to anyone the message or any information contained in the
 message.  If you have received this message in error, please immediately
 advise the sender by reply email and delete the message.  Thank you very
 much.   
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RegEx question

2002-07-02 Thread David Busby

List,
How can I regex to compare the last three chars of a string to php?

/B


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Make strict?

2002-07-02 Thread David Busby

List,
How do you make you PHP scripts require explicit variable declaration? 
Like Java/SQL/C/C++ or 'use strict;' in PERL or 'Option Explicit' in 
VB/VBScript

/B


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] M$-SQL Access from RH7.3

2002-07-01 Thread David Busby

List,
I've a RH7.3 machine (just installed) and want to get PHP to access my M$ 
SQL database.  I'm on a small time crunch here too.  My M$ web server 
died and it's so hosed that I had to call support (ouch!). 
Anyways...they haven't fixed it yet and I thought it would be funny to 
get my RH7.3/Apache/PHP server to replace it before they could fix my 
machine ;.  I've done this once before (like last year or so) but I 
cannot finc my docs so any pointers would be great.

TIA
/B


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Where do I specify a DSN?

2002-07-01 Thread David Busby

List,
I'm getting this error message...where does it come from?

/B

Warning: SQL error: [unixODBC][Driver Manager]Data source name not 
found, and no default driver specified, SQL state IM002 in SQLConnect in 
/var/www/html/index.php on line 4


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Where do I specify a DSN? v0.2

2002-07-01 Thread David Busby

List,
Guess I should be more specific:

Heres line four:
$db = odbc_connect(somedsn,sa, );

My System:
RedHat 7.3/Apache/PHP 4.1.2-7
I'm getting this error message...I think I just need to define the 
DSN...is that done in /etc/odbc.ini?  Or what?

/B

Warning: SQL error: [unixODBC][Driver Manager]Data source name not
found, and no default driver specified, SQL state IM002 in SQLConnect in
/var/www/html/index.php on line 4


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] ODBC Failures

2002-07-01 Thread David Busby

List,
My ODBC connection is failing it seems...I can run this code just 
fine...odbc_connect and odbc_pconnect seem to work...the odbc_prepare 
even works just fine...but as soon as I execute (with odbc_execute, 
odbc_exec, or odbc_do it fails...any ideas?

?php

$db = odbc_pconnect(Desire,sa, );
echo Database Connection:.$db.br;
$sql = odbc_prepare($db, execute spGetItems);
echo Prepared SQL id:.$sql.br;
// This line will fail
$rs = odbc_execute($sql);

?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php