Re: [PHP] Effecient mass mailings

2008-02-04 Thread Robert Fitzpatrick
On Mon, 2008-02-04 at 08:53 -0800, Jim Lucas wrote:
 If you were sending HTML formatted emails and included images for the layout, 
 that would be fine.  But a 2-5MB attachment?  Why would want to send that as 
 an 
 attachment.  Give them a link back to your website.  If it is a private 
 thing, 
 make them log in.

Thanks Jim and Daniel. Not sure why I was stuck on duplicating the
existing apps efforts :/ I talked to my client and this it the way we're
going...

-- 
Robert

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



[PHP] Effecient mass mailings

2008-02-04 Thread Robert Fitzpatrick
I a currently re-writing a web app from ASP to PHP and have come to the
part where the app sends mass mailings to their customer base. This has
always been problematic for them with the existing setup and I am
looking for the best approach. While I've setup mailings with PHP, never
such mass mailings. They will be using a web form to send sometimes
2-5MB attachments to thousands of customers to advertise new products
with PDF's, etc. Using their Windows IIS SMTP virtual server smarthost
function, I send their mail off-site to our postfix mail gateway, but it
still bogs down and I'm sure a remote server is not the answer, but
still better than the errors they receive trying to use localhost and
IIS. Once the re-write, the app will be on to a Linux box where I can do
some tweaking to these and hope localhost will work better for these
mailings.

Can someone give some pointers at how I may want to approach such mass
mailings? Thanks in advance!

-- 
Robert

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



[PHP] Maps

2007-12-05 Thread Robert Fitzpatrick
Well, I have two clients that both want mapping for their sales people.
I have been looking at the Google API and Phoogle
(www.systemsevendesigns.com/phoogle). I assume with these examples I
will be able to produce what they need? Which is to select several
addresses and produce a fastest route map with directions to those
addresses from a start address. Not clear from my reading yet, but can
someone with some experience tell me if this is possible with the Google
API or some hints that might speed up my process of the best way to go
for this...

Thanks in advance!

-- 
Robert

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



[PHP] Image upload

2007-02-05 Thread Robert Fitzpatrick
I have a small application that ran on one server and now gives me a
problem with uploading images on a new server. I am running PHP 4.4.4
now on this server and hoping it is just something that needs adjusted
in php.ini, but cannot seem to find. The file is posted as a file fields
in a multipart/form-data form, the application tests the file with
getimagesize() shown below. I am getting the die response in the
browser. I tried echo of the file and it prints a random file name under
the /tmp directory on this CentOS Linux system. If I sleep for 10
seconds, the file gets created and gone after the script finishes. Can
someone suggest what my problem may be?

if (!getimagesize($_FILES['filPhoto']['tmp_name'])) {
die('The file you are attempting to upload is not an image file.');
} else {
snip

-- 
Robert

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



Re: [PHP] Image upload

2007-02-05 Thread Robert Fitzpatrick

Jochem Maas wrote:

Robert Fitzpatrick wrote:
  

I have a small application that ran on one server and now gives me a
problem with uploading images on a new server. I am running PHP 4.4.4
now on this server and hoping it is just something that needs adjusted
in php.ini, but cannot seem to find. The file is posted as a file fields
in amultipart/form-data form, the application tests the file with
getimagesize() shown below. I am getting the die response in the
browser. I tried echo of the file and it prints a random file name under
the /tmp directory on this CentOS Linux system. If I sleep for 10
seconds, the file gets created and gone after the script finishes. Can
someone suggest what my problem may be?



no. but start by stopping the assumption that getimagesize() returns something
equivelant to false to mean the same thing as that the file does not exist
(or is not an image file.)

this might help: http://php.net/is_uploaded_file

  
Yes, actually that is done first, the getimagesize is used it the script 
to test it as an image. This was written by someone else and worked 
prior to moving servers. This is a more complete snippet of the code:


if (is_uploaded_file($_FILES['filPhoto']['tmp_name'])) {

  // use getimagesize to make sure it's an image file
 if (!getimagesize($_FILES['filPhoto']['tmp_name'])) {

   die('The file you are attempting to upload is not an image 
file.');

snip

also check it's not a permissions issue (i.e. the file is being created but the
webserver cannot subsequently read the file)

  
The /tmp directory where it is created is set with 777 perms. I have not 
checked the destination, but the script does not appear to get back the 
above point, giving us the die response.


--
Robert

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



[PHP] Help with a complex scenario

2006-04-07 Thread Robert Fitzpatrick
I have an order table that we are trying to figure out a way to find the
best (cheapest) scenario to sending to vendors to fill the orders. Let's
say we have 10 parts ordered, if we split that amongst vendors, even
paying a higher shipping cost in some cases can be cheaper. We can send
2 of those parts from this vendor and 3 from another and so on. We have
an ID, price, ship price and vendor to consider that is retrieved via
the api with each vendor. Does anyone have experience in trying to find
all the scenario possibilities?

-- 
Robert

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



[PHP] Running php scripts under cygwin

2006-01-15 Thread Robert Fitzpatrick
I have a php script that I use for backup with rsync over ssh and those 
tools work great under cygwin. I'd like to use this same script that I 
use on my unix/linux servers.


You would think I could find lots of info on this subject, but for some 
reason I can't. I found info from googling the subject and some mention 
of building php with cygwin, but do not see PHP in cygwin setup. I hope 
someone here has PHP running on cygwin and can perhaps point me to some 
information or suggest how I can get my php script to run under cygwin, 
hopefully via cron service. I am not sure if I need PHP in cygwin or can 
access the php.exe already installed under Windows? I tried to run a php 
script from a cygwin prompt using the php.exe installed into Windows, 
but get lots of module not found errors. Is it possible to run a php 
script under cygwin.


--
Robert

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



[PHP] Running php scripts under cygwin

2006-01-15 Thread Robert Fitzpatrick

I have a php script that I use for backup with rsync over ssh and those
tools work great under cygwin. I'd like to use this same script that I
use on my unix/linux servers.

You would think I could find lots of info on this subject, but for some
reason I can't. I found info from googling the subject and some mention
of building php with cygwin, but do not see PHP in cygwin setup. I hope
someone here has PHP running on cygwin and can perhaps point me to some
information or suggest how I can get my php script to run under cygwin,
hopefully via cron service. I am not sure if I need PHP in cygwin or can
access the php.exe already installed under Windows? I tried to run a php
script from a cygwin prompt using the php.exe installed into Windows,
but get lots of module not found errors. Is it possible to run a php
script under cygwin.

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



[PHP] COPY with PostgreSQL

2004-10-22 Thread Robert Fitzpatrick
I am using COPY for PostgreSQL and having problems now that the incoming
file contains more than approx 1500 lines. Is this an issue anyone is
aware of? Lot's of files over 1000 lines have worked fine, but after
getting a file over 1800 I began having problems. I have broke the file
down to a approx. 1500 line that works sometimes and not others. Here is
a snippet of what I'm trying to do:
 
  $result = pg_exec($dbh, COPY tblxrf FROM stdin USING DELIMITERS
',');
  fseek($temp_fh,0); // go to beginning of temp file
  while (($csv_line = fgets($temp_fh,1024))) {
   pg_put_line($dbh, $csv_line);
  }
  $stat = pg_put_line($dbh, \\.\n); // notify db finished or report
error
  if (!$stat) { echo ERROR: An error has occurred while putting last
line of copy databr\n; exit; }
  $stat = pg_end_copy($dbh); // post (sync data) or report error

The process just hangs with the large number of lines, I have to kill
the COPY process for postgresql on the server before trying again.
 
--
Robert

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



RE: [PHP] COPY with PostgreSQL

2004-10-22 Thread Robert Fitzpatrick
On Fri, 2004-10-22 at 14:55, Jay Blanchard wrote:
 [snip]
 I am using COPY for PostgreSQL and having problems...
 [/snip]
 
 So, is this a PHP problem, or a PostgreSQL problem?

If I took the file it is trying to COPY into PostgreSQL and psql to
bring it in on the server directly, no issues.

Seems to be a PHP problem, at least with the pg libraries. I finally,
after trying many things have gotten this to work with the large files.
I found, if I issue a pg_connection_busy($dbh) before the
pg_put_line(...) in the while statement processing the lines of the temp
file handle, it works. Don't ask me why, that is what I'd like to know.
If I report back if busy is true, I get nothing. Maybe it is just giving
a millisecond to breathe or something while checking to see if the
connection is busy. But with that one line, all is well.

-- 
Robert

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



Re: [PHP] Intalling PHP 4.3.7 with PGSQL support and Heimdal

2004-06-07 Thread Robert Fitzpatrick
On Sun, 2004-06-06 at 17:48, Marek Kilimajer wrote:
 Robert Fitzpatrick wrote:
  On Sun, 2004-06-06 at 16:49, Marek Kilimajer wrote:
  
 Robert Fitzpatrick wrote:
 
 Trying to portupgrade my PHP 4.3.6 package with PostgreSQL 7.4.2 support and 
 getting this error below. Trying to setup postgresql with Heimdal Kerberos 5 
 support, believe I have, but not tried anything with it, yet.
 
 /usr/local/lib/libpq.so: undefined reference to `krb5_cc_get_principal'
 /usr/local/lib/libpq.so: undefined reference to `krb5_sname_to_principal'
 /usr/local/lib/libpq.so: undefined reference to `krb5_cc_default'
 /usr/local/lib/libpq.so: undefined reference to `krb5_cc_close'
 /usr/local/lib/libpq.so: undefined reference to `error_message'
 /usr/local/lib/libpq.so: undefined reference to `krb5_free_error'
 /usr/local/lib/libpq.so: undefined reference to `krb5_sendauth'
 /usr/local/lib/libpq.so: undefined reference to `krb5_free_principal'
 /usr/local/lib/libpq.so: undefined reference to `krb5_unparse_name'
 /usr/local/lib/libpq.so: undefined reference to `krb5_free_context'
 /usr/local/lib/libpq.so: undefined reference to `krb5_init_context'
 *** Error code 1
 
 Stop in /usr/ports/lang/php4/work/php-4.3.7.
 
 I've posted this around a few weeks ago on some lists and still no success. I had 
 a suggestion to add lines to the spec file, but not sure which file that is. 
 Seems PHP is having a problem with the PGSQL support and its libraries for krb5. 
 Nonetheless, from the looks of the Makefile for postgresql, everything should be 
 there for it to build with krb5 support. I receive no errors when building or 
 installing posgresql with heimdal support and have tried 'make deinstall' and 
 'make reinstall'. I have the WITH_HEIMDAL_KRB5, HEIMDAL_HOME is set to /usr/local 
 where it resides with libs and includes. Someone also suggested adding a -lkrb5, 
 but again, I have not been able to figure out where to place this setting in the 
 file. Should I add it to the line that produces the error building PHP above (I 
 think the libtool command) or in the postgresql Makefile.
 
 
 Add -lkrb5 to LDFLAGS variable in the Makefile.
  
  
  Thanks, I tried and it doesn't seem to help. This is in the Makefile
  now. I am trying this when building PostgreSQL, do the links shown in my
  last post to psql show the libs are setup correctly after installation
  of PostgreSQL? I have WITH_HEIMDAL_KRB5 set to 'yes' and
  /usr/bin/krb5-config is a symlink to /usr/local/bin/krb5-config which
  has the correct locations for libs and includes.
  
  .if defined(WITH_HEIMDAL_KRB5)
  KRB5CONF=   /usr/bin/krb5-config
  WITH_KRB5=  yes
  .endif
  
  .include bsd.port.pre.mk
  .if defined(WITH_KRB5)
  CONFIGURE_ARGS+=--with-krb5=`${KRB5CONF} --prefix krb5`
  LDFLAGS+=   `${KRB5CONF} --libs krb5`
  CONFIGURE_ENV=  LDFLAGS=${LDFLAGS}
  .endif
  
  That should set things up, but if I add LDFLAGS+=`-lkrb5`, I get an
  error.
  
 
 
 Is /usr/local/lib in /etc/ld.so.conf file?

No, there is no such file. But this is not Linux, FreeBSD Unix 5.2.1.

-- 
Robert

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



[PHP] Intalling PHP 4.3.7 with PGSQL support and Heimdal

2004-06-06 Thread Robert Fitzpatrick
Trying to portupgrade my PHP 4.3.6 package with PostgreSQL 7.4.2 support and getting 
this error below. Trying to setup postgresql with Heimdal Kerberos 5 support, believe 
I have, but not tried anything with it, yet.

/usr/local/lib/libpq.so: undefined reference to `krb5_cc_get_principal'
/usr/local/lib/libpq.so: undefined reference to `krb5_sname_to_principal'
/usr/local/lib/libpq.so: undefined reference to `krb5_cc_default'
/usr/local/lib/libpq.so: undefined reference to `krb5_cc_close'
/usr/local/lib/libpq.so: undefined reference to `error_message'
/usr/local/lib/libpq.so: undefined reference to `krb5_free_error'
/usr/local/lib/libpq.so: undefined reference to `krb5_sendauth'
/usr/local/lib/libpq.so: undefined reference to `krb5_free_principal'
/usr/local/lib/libpq.so: undefined reference to `krb5_unparse_name'
/usr/local/lib/libpq.so: undefined reference to `krb5_free_context'
/usr/local/lib/libpq.so: undefined reference to `krb5_init_context'
*** Error code 1

Stop in /usr/ports/lang/php4/work/php-4.3.7.

I've posted this around a few weeks ago on some lists and still no success. I had a 
suggestion to add lines to the spec file, but not sure which file that is. Seems PHP 
is having a problem with the PGSQL support and its libraries for krb5. Nonetheless, 
from the looks of the Makefile for postgresql, everything should be there for it to 
build with krb5 support. I receive no errors when building or installing posgresql 
with heimdal support and have tried 'make deinstall' and 'make reinstall'. I have the 
WITH_HEIMDAL_KRB5, HEIMDAL_HOME is set to /usr/local where it resides with libs and 
includes. Someone also suggested adding a -lkrb5, but again, I have not been able to 
figure out where to place this setting in the file. Should I add it to the line that 
produces the error building PHP above (I think the libtool command) or in the 
postgresql Makefile.

esmtp# ldd /usr/local/bin/psql
/usr/local/bin/psql:
libpq.so.3 = /usr/local/lib/libpq.so.3 (0x28096000)
libkrb5.so.20 = /usr/local/lib/libkrb5.so.20 (0x280b2000)
...

Anyone know where I can make these changes needed or what to try next?

--
Robert

Re: [PHP] Intalling PHP 4.3.7 with PGSQL support and Heimdal

2004-06-06 Thread Robert Fitzpatrick
On Sun, 2004-06-06 at 16:49, Marek Kilimajer wrote:
 Robert Fitzpatrick wrote:
  Trying to portupgrade my PHP 4.3.6 package with PostgreSQL 7.4.2 support and 
  getting this error below. Trying to setup postgresql with Heimdal Kerberos 5 
  support, believe I have, but not tried anything with it, yet.
  
  /usr/local/lib/libpq.so: undefined reference to `krb5_cc_get_principal'
  /usr/local/lib/libpq.so: undefined reference to `krb5_sname_to_principal'
  /usr/local/lib/libpq.so: undefined reference to `krb5_cc_default'
  /usr/local/lib/libpq.so: undefined reference to `krb5_cc_close'
  /usr/local/lib/libpq.so: undefined reference to `error_message'
  /usr/local/lib/libpq.so: undefined reference to `krb5_free_error'
  /usr/local/lib/libpq.so: undefined reference to `krb5_sendauth'
  /usr/local/lib/libpq.so: undefined reference to `krb5_free_principal'
  /usr/local/lib/libpq.so: undefined reference to `krb5_unparse_name'
  /usr/local/lib/libpq.so: undefined reference to `krb5_free_context'
  /usr/local/lib/libpq.so: undefined reference to `krb5_init_context'
  *** Error code 1
  
  Stop in /usr/ports/lang/php4/work/php-4.3.7.
  
  I've posted this around a few weeks ago on some lists and still no success. I had 
  a suggestion to add lines to the spec file, but not sure which file that is. Seems 
  PHP is having a problem with the PGSQL support and its libraries for krb5. 
  Nonetheless, from the looks of the Makefile for postgresql, everything should be 
  there for it to build with krb5 support. I receive no errors when building or 
  installing posgresql with heimdal support and have tried 'make deinstall' and 
  'make reinstall'. I have the WITH_HEIMDAL_KRB5, HEIMDAL_HOME is set to /usr/local 
  where it resides with libs and includes. Someone also suggested adding a -lkrb5, 
  but again, I have not been able to figure out where to place this setting in the 
  file. Should I add it to the line that produces the error building PHP above (I 
  think the libtool command) or in the postgresql Makefile.
  
 
 Add -lkrb5 to LDFLAGS variable in the Makefile.

Thanks, I tried and it doesn't seem to help. This is in the Makefile
now. I am trying this when building PostgreSQL, do the links shown in my
last post to psql show the libs are setup correctly after installation
of PostgreSQL? I have WITH_HEIMDAL_KRB5 set to 'yes' and
/usr/bin/krb5-config is a symlink to /usr/local/bin/krb5-config which
has the correct locations for libs and includes.

.if defined(WITH_HEIMDAL_KRB5)
KRB5CONF=   /usr/bin/krb5-config
WITH_KRB5=  yes
.endif

.include bsd.port.pre.mk
.if defined(WITH_KRB5)
CONFIGURE_ARGS+=--with-krb5=`${KRB5CONF} --prefix krb5`
LDFLAGS+=   `${KRB5CONF} --libs krb5`
CONFIGURE_ENV=  LDFLAGS=${LDFLAGS}
.endif

That should set things up, but if I add LDFLAGS+=`-lkrb5`, I get an
error.

 
 And please don't crosspost

Sorry, won't do.

-- 
Robert

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



[PHP] Error building PHP with PostgreSQL support

2004-05-24 Thread Robert Fitzpatrick
I am getting the following problem with trying to install from source
PHP 4.3.6 with PG support on FreeBSD 5.2.1. I have PostgreSQL 7.4.2
recently upgraded from 7.3.x and it is up and running fine. I also have
Heimdal 0.6 installed and PostgreSQL was built with that support. Is the
error below from something missing on the Heimdal side of things or
PostgreSQL? And what does anyone suggest to resolve the issue? Maybe I
need to rebuild Heimdal since upgrading PostgreSQL with krb5 support?

/usr/local/lib/libc-client4.so: warning: tmpnam() possibly used
unsafely; consider using mkstemp()
/usr/local/lib/libpq.so: undefined reference to `krb5_cc_get_principal'
/usr/local/lib/libpq.so: undefined reference to
`krb5_sname_to_principal'
/usr/local/lib/libpq.so: undefined reference to `krb5_cc_default'
/usr/local/lib/libpq.so: undefined reference to `krb5_cc_close'
/usr/local/lib/libpq.so: undefined reference to `error_message'
/usr/local/lib/libpq.so: undefined reference to `krb5_free_error'
/usr/local/lib/libpq.so: undefined reference to `krb5_sendauth'
/usr/local/lib/libpq.so: undefined reference to `krb5_free_principal'
/usr/local/lib/libpq.so: undefined reference to `krb5_unparse_name'
/usr/local/lib/libpq.so: undefined reference to `krb5_free_context'
/usr/local/lib/libpq.so: undefined reference to `krb5_init_context'
*** Error code 1

-- 
Robert

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



[PHP] XML error: junk after document element

2003-07-26 Thread Robert Fitzpatrick
I am trying to parse and xml document:

?xml version=1.0?
!DOCTYPE PrequalResponse PUBLIC -//New Edge Networks//DTD Pilot
Prequalification Response 2.3//EN
http://api.newedgenetworks.com/dtd/prequalresponse.dtd;
PrequalResponse
 TransactionCodeCode1005/CodeMessageAuthentication failed: Invalid
user name or password/Message/TransactionCode
/PrequalResponse

I received 'XML error: junk after document element at line 5'. I found some
mention searching the web that the xml_parse() function does not know the
end of the stream:

The problem is that, in the general case, there's no way to
determine if a stream is *supposed* to contain multiple documents.
What is needed is some external way to determine the end of the input;
you can then feed the parser data buffers until the end-of-buffer
function returns true.  You can do this by embedding the chunks of XML
into another protocol; this should not be difficult if you can
determine the size of each XML document in bytes before sending it, so
that each document can be preceeded by the byte-count.  Otherwise,
you'll need a stream encoding that contains explicit end-of-file
markers.

I can set my passing xml document with just 'trythis1/trythis' and I get
the same error, except of course it says line 1 instead of line 5.

Any help on how I can be sure the function knows the end of ?

--
Robert



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



[PHP] XML handlers in classes

2003-07-25 Thread Robert Fitzpatrick
I have a class that receives an XML response from a HTTP request and I am
trying to parse the XML after receiving it. The problem I'm having is the
error when trying to use xml set handlers, such as
'xml_set_element_handler'. It seems the class is having trouble seeing the
handler functions. For instance, if I set this:

  xml_set_element_handler($xml_parser, 'startElement','endElement');

Then I receive the error 'Unable to call handler startElement()', I tried to
put $this- in front of the names of the functions, but same thing. Can
someone show me how to use these handlers in a class?

--
Robert



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



[PHP] RE: XML handlers in classes

2003-07-25 Thread Robert Fitzpatrick
 Use xml_set_object, and away you go.  Perhaps you would benefit from 
 using PEAR's XML_Parser or XML_Transformer, or even PEAR's 
 HTTP_Request 
 class.
 
http://php.net/xml_set_object
http://pear.php.net/xml_parser http://pear.php.net/xml_transformer
http://pear.php.net/http_request

Thanks for the tip. Is there any reason why I can't find docs for
xml_parser or http_request on the PEAR site?

--
Robert



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



[PHP] PHP timeout doing fread from Apache Coyote

2003-07-24 Thread Robert Fitzpatrick
I am trying to communicate with an API of a vendors of ours. They provide a
Perl example that works fast and well. I am trying to do the same thing with
a PHP class. The response takes over a minute before the response comes
back. I see from the response text that the API is running on Apache
Coyote/1.0. Does anyone know of issues with this match-up, here is the
snippet of code that seems to be hanging. Using my Komodo debugger, it
points to the line with 'while($data=fread($fp, 32768))' while waiting for
execution to continue. Using a Perl script provided by them, I get a
response in seconds. Basically, my PHP page prepares content and variables
and then uses this class to send XML formatted content to receive a
response.

  ...
  $fp=fsockopen($this-server, $this-port, $this-errno,
$this-errstr, $this-timeout);

  if(!$fp) {
$this-errstr=Cant Connect to Service ($this-server:$this-port,
$this-errno, $this-errstr);
return;
  }

  if (!fputs($fp, $op, strlen($op))) {
  $this-errstr=Write error;
  return;
  } else {

   $ipd = ;
   while($data=fread($fp, 32768)) {
  $ipd.=$data;
   }
$this-responsetext = $ipd;
//echo p.$ipd./p;
 $ipd = $this-_parse_header($ipd);

  }

  fclose($fp);
  return $ipd;
  ...



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



Re: [PHP] PHP timeout doing fread from Apache Coyote

2003-07-24 Thread Robert Fitzpatrick
  if (!fputs($fp, $op, strlen($op))) {

 which HTTP version are you requesting? I know that if you send a
 HTTP/1.1 then a lot of servers send the data in chunks, thus your
 retrieval code needs to be different. If it is HTTP/1.1 try using
 HTTP/1.0 instead.

Same difference with the 1.0, I was using 1.1, here is the complete request
and response. The response comes back as 1.1 regardless of what I use (of
course, the xml parameter is urlencoded):

Request:
POST /XMLCommunicationServlet HTTP/1.0 Content-Type:
application/x-www-form-urlencoded User-Agent: PHP XMLRPC Host:
api.newedgenetworks.com:80 Connection: keep-alive Content-Length: 758
txnType=Ppartner=xml=%3C%3Fxml+version%3D%221.0%22%3F%3E%3C%21DOCTYPE+preq
ualrequest+SYSTEM+%22http%3A%2F%2Fapi.newedgenetworks.com%3A80%2Fdtd%2Fprequ
alrequest.dtd%22%3E%3CPrequalRequest%3E%3CIdentification%3E%3CUs
er%3Eusername%3C%2FUser%3E%3CPassword%3mypassword%3C%2FPassword%3E++
++%3C%2FIdentification%3E%3CServiceType%3ER%3C%2FServiceType%3E%3CAd
dress%3E+++%3CStreet1%3E2780+CEDARLINKS+DRIVE%3C%2FStreet1%3E+++%3CC
ity%3EMEDFORD%3C%2FCity%3E+++%3CState%3EOR%3C%2FState%3E+++%3CZipCD%
3E97504%3C%2FZipCD%3E%3C%2FAddress%3E%3CPhone%3E%3CPhoneNPA%
3E541%3C%2FPhoneNPA%3E%3CPhoneNXX%3E772%3C%2FPhoneNXX%3E%3CP
honeSuffix%3E6990%3C%2FPhoneSuffix%3E%3C%2FPhone%3E%3C%2FPrequalRequest%
3E

Response:
HTTP/1.1 200 OK Content-Type: text/xml Content-Length: 343 Date: Thu, 24 Jul
2003 15:18:52 GMT Server: Apache Coyote/1.0 Connection: Keep-Alive
1050Prequalification failed: AggregateCircuit unavailable

  $ipd = ;
  while($data=fread($fp, 32768)) {

 Have you tried smaller requests mabey 512? although that shouldn't
 matter, but you might be able to see if it is getting data back at
 all.

Yes, I've tried 128 and get the same delay.

Thanks for any help:)
--
Robert



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



Re: [PHP] REVISED: PHP timeout doing fread from Apache Coyote

2003-07-24 Thread Robert Fitzpatrick
Sorry, the correct request and response is below, the one I copied before
was from the browser:

Request:
Request:brPOST /XMLCommunicationServlet HTTP/1.0
Content-Type: application/x-www-form-urlencoded
User-Agent: PHP XMLRPC
Host: api.newedgenetworks.com:80
Connection: keep-alive
Content-Length: 758

txnType=Ppartner=xml=%3C%3Fxml+version%3D%221.0%22%3F%3E%3C%21DOCTYPE+preq
ualrequest+SYSTEM+%22http%3A%2F%2Fapi.newedgenetworks.com%3A80%2Fdtd%2Fprequ
alrequest.dtd%22%3E%3CPrequalRequest%3E%3CIdentification%3E%3CUs
er%3E4036632%3C%2FUser%3E%3CPassword%3ELnKB8b%3C%2FPassword%3E%3
C%2FIdentification%3E%3CServiceType%3ER%3C%2FServiceType%3E%3CAddres
s%3E+++%3CStreet1%3E2780+CEDARLINKS+DRIVE%3C%2FStreet1%3E+++%3CCity%
3EMEDFORD%3C%2FCity%3E+++%3CState%3EOR%3C%2FState%3E+++%3CZipCD%3E97
504%3C%2FZipCD%3E%3C%2FAddress%3E%3CPhone%3E%3CPhoneNPA%3E54
1%3C%2FPhoneNPA%3E%3CPhoneNXX%3E772%3C%2FPhoneNXX%3E%3CPhone
Suffix%3E6990%3C%2FPhoneSuffix%3E%3C%2FPhone%3E%3C%2FPrequalRequest%3E

Response:
HTTP/1.1 200 OK
Content-Type: text/xml
Content-Length: 343
Date: Thu, 24 Jul 2003 15:18:52 GMT
Server: Apache Coyote/1.0
Connection: Keep-Alive

?xml version=1.0?
!DOCTYPE PrequalResponse PUBLIC -//New Edge Networks//DTD Pilot
Prequalification Response 2.3//EN
http://api.newedgenetworks.com/dtd/prequalresponse.dtd;
PrequalResponse
 TransactionCodeCode1050/CodeMessagePrequalification failed:
AggregateCircuit unavailable/Message/TransactionCode
/PrequalResponse



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



Re: [PHP] REVISED: PHP timeout doing fread from Apache Coyote

2003-07-24 Thread Robert Fitzpatrick

 Try not having the connection kept alive. (just a thought)


Same long reponse :(



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



Re: [PHP] REVISED: PHP timeout doing fread from Apache Coyote

2003-07-24 Thread Robert Fitzpatrick

 I tested it here:
 http://zirzow.dyndns.org/php/fread/timeout.php


Thanks, I took your source and pasted it in my debugger and ran it fine like
on your server. I narrowed down the, evidently significant, difference. Your
content is has crlf line endings, hence, the 'Missing query parameters:
xml' response. If I change those line endings to just lf or put it all on
one continuous line, I get the long delay again.

Any thoughts I what would cause this?

--
Robert



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



[PHP] PHP Compile Error

2003-01-30 Thread Robert Fitzpatrick
Running Redhat 8.0
PHP 4.3.0

When I try to configure with the following:
./configure --with-apxs=/web_root/bin/apxs --enable-track-vars
--enable-versioning --with-mysql=/usr/mysql --with-gd=/usr/local
--with-jpeg-dir=/usr/local/bin/  --with-png-dir=/usr/lib
--with-zlib-dir=/usr/lib --with-zlib --enable-xslt --enable-cli
--disable-debug --with-xslt-sablot

I get the following error:
...
configure: error: libjpeg.(a|so) not found.

Any ideas?

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