Re: [PHP] HTTP methods, Web Browsers and REST

2007-08-14 Thread Chris



Looking over PHP i can see a web service client
could be written for a
RESTful web service using the curl extension (and perhaps others as well)
because it facilitates an
ability to invoke the HTTP PUT and DELETE methods.
Now, coming to my question..  Looking at the W3C page on the XHTML 1.0 form
tag specification http://www.w3schools.com/tags/tag_form.asp, it is
clear the method attribute supports only  get and post.  What i wonder is
why would it not also support
put and delete?


Because they are not part of forms, they are something the webserver 
needs to handle.


http://www.apacheweek.com/features/put

Particularly this sentence:

POST method is normally handed a script which is explicitly named by 
the resource (that is, something that already exists), while a PUT 
request could be directed at a resource which does not (yet) exist.


--
Postgresql  php tutorials
http://www.designmagick.com/

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



Re: [PHP] About Buggy SQL Query

2007-08-14 Thread Kelvin Park

Chris wrote:

Kelvin Park wrote:
mySQL database becomes inaccessible after a buggy sql string gets 
queried.
The SQL server runs fine, however it seems like just the database is 
being

looped infinitely so to say.
Here is an example:

(PHP)
$sql = SELECT * FROM DB_TABLE WHERE PR_NUMBER = $whatever, DFLJJ =
$SD;LOOE; (-- invalid sql query string)
mysql_query($sql);

When this query string is queried during the (webpage) loading 
process, the

webpage just gets timed out without any error nor warning messages.

Does anyone know if there is a certain way to prevent mysql database 
from

stalling due to buggy sql strings?


use mysql_real_escape_string to stop it from happening.

Thanks, I looked over some comments posted on the PHP library web site 
under mysql_real_escape_string function. I didn't realize it is also 
used to aid sql injection prevention.


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



Re: [PHP] problem in tr

2007-08-14 Thread sanjeevn
basically you want your page needs to be submitted to the next page when you
click on the tr

so do one thing. create 2 forms..

form 1 will have your main table and the datas
form 2 will have hidden inputs

for each tr you need to assign a variable called rownumber and create the
hidden fields in each td as
name11, name12, name13
name21, name22, name33

i think you understand what i am trying to explain...
and convert the tr as tr
onclick=submitvaluetoanotherform('thisrownumber');

define the function which submits the value of this rownumbers value into
the second form and say submit form2 automatically

Thanks


On 8/14/07, shivendra [EMAIL PROTECTED] wrote:



 Sir,u r not getting what i m trying to say,my problem is how can i send
 the
 values of tds in a perticuler row,by a function in onClick event of that
 row.actuallly the values are coming from database,and i what i want when i
 click a perticuler row the values are sent to some other page:
 table
 tr name=t1 id=t1
 tdmonu/tdtd23/td
 /tr
 tr name=t2 id=t2
 tdsuman/tdtd24/td
 /tr
 /table
 like the values in tds of tr name=t1 is monu and 23 ,i want when
 i
 click on tr name=t1 ,monu and 23 is sent to some other
 page,similarly same procedure follows when i click the tr name=t2 but
 this time the value would be  suman and 24,i think u r getting what i
 m
 try to say.pls send the code for this:
 --
 View this message in context:
 http://www.nabble.com/problem-in-%3Ctr%3E-tf4253021.html#a12138652
 Sent from the PHP - General mailing list archive at Nabble.com.

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




-- 
Warm Regards
Sanjeev

http://www.sanchanworld.com/
http://webdirectory.sanchanworld.com/
http://webhosting.sanchanworld.com/


[PHP] zip freezes - how to handle corrupt CRC in zip-file

2007-08-14 Thread ecc

Hi @all,

i´m reading zip-files with the php zip-functions without a problem. Now i
got and Zip containing an corrupt crc (If i open this file via winzip, the
error is shown).

It looks like the php functions for zip-handeling zip_entry_read and
ZipArchive::getFrom... do not quit on a bad crc checksum so these
functions read in the file and than are in an infinite loop. Because i use
PHP-GTK2 my tool feezes and the process has to be killed. On an
web-enviroment this could also a big problem . ok, user-zip handeling on
web is not the best idea :-)

I´ve found no way to find out, if an file in the zip file is an valid or
corrupt entry. The output of ZipArchive::statName give me no info about
the state of an entry.

Is there any trick out there, how to manage this problem. Maybe this is an
bug or missing feature in the zip extensions. Dont know!

Regards,
Andreas
-- 
View this message in context: 
http://www.nabble.com/zip-freezes---how-to-handle-corrupt-CRC-in-zip-file-tf4266474.html#a12142189
Sent from the PHP - General mailing list archive at Nabble.com.

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



Re: [PHP] zip freezes - how to handle corrupt CRC in zip-file

2007-08-14 Thread sanjeevn
Use error handling function for time being and exit from the loop
where control going in the loop.


On 8/14/07, ecc [EMAIL PROTECTED] wrote:


 Hi @all,

 i´m reading zip-files with the php zip-functions without a problem. Now i
 got and Zip containing an corrupt crc (If i open this file via winzip, the
 error is shown).

 It looks like the php functions for zip-handeling zip_entry_read and
 ZipArchive::getFrom... do not quit on a bad crc checksum so these
 functions read in the file and than are in an infinite loop. Because i use
 PHP-GTK2 my tool feezes and the process has to be killed. On an
 web-enviroment this could also a big problem . ok, user-zip handeling
 on
 web is not the best idea :-)

 I´ve found no way to find out, if an file in the zip file is an valid or
 corrupt entry. The output of ZipArchive::statName give me no info about
 the state of an entry.

 Is there any trick out there, how to manage this problem. Maybe this is an
 bug or missing feature in the zip extensions. Dont know!

 Regards,
 Andreas
 --
 View this message in context:
 http://www.nabble.com/zip-freezes---how-to-handle-corrupt-CRC-in-zip-file-tf4266474.html#a12142189
 Sent from the PHP - General mailing list archive at Nabble.com.

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




-- 
Warm Regards
Sanjeev

http://www.sanchanworld.com/
http://webdirectory.sanchanworld.com/
http://webhosting.sanchanworld.com/


Re: [PHP] apache content negotiation and $_GET

2007-08-14 Thread Per Jessen
Stut wrote:

 Actually it suggests exactly that. Apache is giving PHP the query
 string, and PHP does nothing to it before it puts it in the $_SERVER
 variable. So this basically means that when you use the type-map
 Apache is not populating the query string variable.
 
 In short, I'm 5-9's% certain it's Apache that's throwing it away.

FYI - http://issues.apache.org/bugzilla/show_bug.cgi?id=33112


/Per

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



[PHP] COM Objects

2007-08-14 Thread Nathan Wallis
I am having some trouble instantiating a COM object, it seems to crash my
web server every time I call the line.

 

$tve=new COM(TVE3COM.TVE);

 

I have downloaded a trial version of the Turbo Video Engine SDK and this was
a line I got from the php examples folder.  

 

Is anyone familiar with this SDK?  I ran the installer which I guess would
install the files in the correct location.  Or do I need to have the DLL's
in the same directory?

 

I am very new to all of this.

 

Thanks again,

 

Nathan



Re: [PHP] zip freezes - how to handle corrupt CRC in zip-file

2007-08-14 Thread ecc

Hi Sanjeev,
thank you for your fast answer.
what do you mean with error handling function ()? If i read in the
zip_entry, the function is freezing no chance to handle the error,
because php dont give me an error or exception. If php find a corrupt file,
it freezes on this position. Maybe i can post the corrupt zip, so somebody
can try it :-)

Thank you for your idea.
Andreas


Sanjeev N wrote:
 
 Use error handling function for time being and exit from the loop
 where control going in the loop.
 
 
 On 8/14/07, ecc [EMAIL PROTECTED] wrote:


 Hi @all,

 i´m reading zip-files with the php zip-functions without a problem. Now i
 got and Zip containing an corrupt crc (If i open this file via winzip,
 the
 error is shown).

 It looks like the php functions for zip-handeling zip_entry_read and
 ZipArchive::getFrom... do not quit on a bad crc checksum so these
 functions read in the file and than are in an infinite loop. Because i
 use
 PHP-GTK2 my tool feezes and the process has to be killed. On an
 web-enviroment this could also a big problem . ok, user-zip handeling
 on
 web is not the best idea :-)

 I´ve found no way to find out, if an file in the zip file is an valid or
 corrupt entry. The output of ZipArchive::statName give me no info about
 the state of an entry.

 Is there any trick out there, how to manage this problem. Maybe this is
 an
 bug or missing feature in the zip extensions. Dont know!

 Regards,
 Andreas
 --
 View this message in context:
 http://www.nabble.com/zip-freezes---how-to-handle-corrupt-CRC-in-zip-file-tf4266474.html#a12142189
 Sent from the PHP - General mailing list archive at Nabble.com.

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


 
 
 -- 
 Warm Regards
 Sanjeev
 
 http://www.sanchanworld.com/
 http://webdirectory.sanchanworld.com/
 http://webhosting.sanchanworld.com/
 
 

-- 
View this message in context: 
http://www.nabble.com/zip-freezes---how-to-handle-corrupt-CRC-in-zip-file-tf4266474.html#a12142440
Sent from the PHP - General mailing list archive at Nabble.com.

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



[PHP] Looking for xslt extension that was part of php4

2007-08-14 Thread Per Jessen
I am moving a web application from php4 to php5, and have just stumbled
over the lack of the xslt() extension in php5.  The manual says it's
been moved to PECL = pecl.php.net, but I can't find it there.  Does
anyone know where it has gone?
(migrating the code to the newer php5 XSL support is not yet an option).


thanks
Per Jessen

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



Re: [PHP] HTTP methods, Web Browsers and REST

2007-08-14 Thread Nathan Nobbe
Chris,

thanks for your reply

it sounds like apache does allow the use of a script to handle PUT requests

In fact, Apache handles PUT exactly like it handles the POST method. That
is, it supports it, but in order for it to do anything useful you need to
supply a suitable CGI program.

getting php to handle PUT requests is probably not too complicated..  there
is this other constraint, imposed by the protocol, that is noteworthy:

Another difference is that the POST method can be used in response to a
form, while the PUT method can only contain a single data item.

so, perhaps, in designing a page intended to allow the user to create a new
datum in an application, the data elements should probably be sent delimited
by / in the url; then parsing the url would provide the script w/ the
elements it needed to create the  new datum in the application.

this helps me to  understand the basics of using PUT and DELETE in a php
application, but im still unclear as to how PUT and DELETE methods can be
invoked on the server from a browser.  to be specific, is a client side
scripting technology like javascript or otherwise mandatory in order to
invoke PUT and DELETE from the browser, or is there some way to invoke these
methods on the server natively ??

from the sound of it; PUT and DELETE wont work well when using a browser to
interact w/ a server, it seems like they are mostly supplied for
programmatic interaction only, but that sounds odd to me  i wonder what
the intended use of PUT and DELETE was when they were first created and
added to the HTTP.

-nathan

On 8/14/07, Chris [EMAIL PROTECTED] wrote:


  Looking over PHP i can see a web service client
  could be written for a
  RESTful web service using the curl extension (and perhaps others as
 well)
  because it facilitates an
  ability to invoke the HTTP PUT and DELETE methods.
  Now, coming to my question..  Looking at the W3C page on the XHTML 1.0form
  tag specification http://www.w3schools.com/tags/tag_form.asp, it is
  clear the method attribute supports only  get and post.  What i wonder
 is
  why would it not also support
  put and delete?

 Because they are not part of forms, they are something the webserver
 needs to handle.

 http://www.apacheweek.com/features/put

 Particularly this sentence:

 POST method is normally handed a script which is explicitly named by
 the resource (that is, something that already exists), while a PUT
 request could be directed at a resource which does not (yet) exist.

 --
 Postgresql  php tutorials
 http://www.designmagick.com/



Re: [PHP] Looking for xslt extension that was part of php4

2007-08-14 Thread Thijs Lensselink
On Tue, 14 Aug 2007 15:13:48 +0200, Per Jessen [EMAIL PROTECTED] wrote:
 I am moving a web application from php4 to php5, and have just stumbled
 over the lack of the xslt() extension in php5.  The manual says it's
 been moved to PECL = pecl.php.net, but I can't find it there.  Does
 anyone know where it has gone?
 (migrating the code to the newer php5 XSL support is not yet an option).
 
 
 thanks
 Per Jessen
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

The manual also says :

If you need xslt support with PHP 5 you can use the XSL extension.

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



Re: [PHP] Looking for xslt extension that was part of php4

2007-08-14 Thread Thijs Lensselink
On Tue, 14 Aug 2007 15:13:48 +0200, Per Jessen [EMAIL PROTECTED] wrote:
 I am moving a web application from php4 to php5, and have just stumbled
 over the lack of the xslt() extension in php5.  The manual says it's
 been moved to PECL = pecl.php.net, but I can't find it there.  Does
 anyone know where it has gone?
 (migrating the code to the newer php5 XSL support is not yet an option).
 
 
 thanks
 Per Jessen
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

Seems the xslt extension that should have been placed in PECL was never 
released.
http://bugs.php.net/bug.php?id=41934

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



Re: [PHP] Looking for xslt extension that was part of php4

2007-08-14 Thread Per Jessen
Thijs Lensselink wrote:

 The manual also says :
 
 If you need xslt support with PHP 5 you can use the XSL extension.

Yeah, but it is not compatible with the php4 xslt extension, so I would
have to migrate the code, which is as I said not an option yet.


/Per Jessen

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



Re: [PHP] Looking for xslt extension that was part of php4

2007-08-14 Thread Per Jessen
Thijs Lensselink wrote:

 Seems the xslt extension that should have been placed in PECL was
 never released. http://bugs.php.net/bug.php?id=41934

Ah, wonderful.  That's what I love about PHP ... 


/Per Jessen

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



Re: [PHP] very strange behavior.... incomplete query performed

2007-08-14 Thread Alain Roger
There was no error message...hust after few secunds it stop as normaly it
should do...
but i add - set_time_limit(0); and it works.

adding around 20.000 records to database takes some time :-)
around 1:41 minutes.

I was thinking that i could be faster... :-(

Alain

On 8/13/07, Richard Lynch [EMAIL PROTECTED] wrote:

 Are you using E_ALL?

 Any error messages?

 My first suspect is you are hitting php.ini time_limit setting, or
 possibly the memory_limit.

 On Sun, August 12, 2007 7:09 am, Alain Roger wrote:
  Hi,
 
  I'm still working on importing CSV file content (20.000 records) to
  database
  PostgreSQL.
 
  when i run the query, once i stored into my table  5218 records,
  another
  time 5231 another time 4713 and so on
  every time the amount of records imported to DB is different.
 
  Do you have any idea from where it could come ?
 
  Here is my PHP code :
 
  while (($data = fgetcsv($handle, 1000, ,)) !== FALSE)
  {
  $num = count($data);
 
  if($row1)
  {
 
  $charsetIN ='windows-1250';
  $charsetOUT = 'UTF-8';
 
  $publisher = iconv($charsetIN, $charsetOUT,
  $data[0]);
  $program = iconv($charsetIN,
  $charsetOUT,
  $data[1]);
  $version = iconv($charsetIN,
  $charsetOUT,
  $data[2]);
  $path=iconv($charsetIN,
  $charsetOUT, $data[4]);
  $path =
  str_replace(\\,,$path);
  $licensing_file = iconv($charsetIN, $charsetOUT,
  $data[5]);
  $barcode = iconv($charsetIN,
  $charsetOUT,
  $data[6]);
  $pcinfo_id= iconv($charsetIN,
  $charsetOUT,
  $data[8]);
 
  $date_audit= iconv($charsetIN,
  $charsetOUT,
  trim(str_replace( ,,$data[11])));
 
  $locality = iconv($charsetIN,
  $charsetOUT,
  $data[13]);
  $area= iconv($charsetIN,
  $charsetOUT, $data[12]);
  $username= iconv($charsetIN,
  $charsetOUT,
  $data[14]);
  $personal_number= iconv($charsetIN, $charsetOUT,
  $data[15]);
 
 
  $result = pg_query($dbconn,set search_path = sw_audit;);
  echo result (set search_path) = .$result.br/br/;
  $res=pg_query(SELECT nextval('tmp_importedxls_rec_id_seq')
  as
  key);
  $row=pg_fetch_array($res, 0);
  $key=$row['key'];
 
  $sql = INSERT INTO tmp_importedxls (rec_id, publisher,
  program,
  version, path, licensing_file, date_audit, barcode, pcinfo_ident,
  area,
  locality, users, personal_number)
   VALUES ($key,
   '$publisher',
   '$program',
   '$version',
   '$path',
 
  '$licensing_file','.SplitDate(.,$date_audit).',
   '$barcode',
   '$pcinfo_id',
   '$area',
   '$locality',
   '$username',
   '$personal_number');;
 
  //echo SQL :  .$sql.br/br/;
 
  $result = pg_query($dbconn,$sql);
  if (!$result)
  {
   die(Error in SQL query:  . pg_last_error());
  }
  else
  {
  echo result (INSERT INTO) = .$result.br /;
  }
 
  }
  $row++;
  }
  fclose($handle);
 
  pg_close($dbconn);
 
 
 
  thanks a lot for any help.
 
 
  --
  Alain
  
  Windows XP SP2
  PostgreSQL 8.2.3
  Apache 2.2.4
  PHP 5.2.3
 


 --
 Some people have a gift link here.
 Know what I want?
 I want you to buy a CD from some indie artist.
 http://cdbaby.com/browse/from/lynch
 Yeah, I get a buck. So?




-- 
Alain

Windows XP SP2
PostgreSQL 8.2.3
Apache 2.2.4
PHP 5.2.3


Re: [PHP] php.ini of PHP 5.2.3

2007-08-14 Thread Alain Roger
So what should i do ?

On 8/13/07, Richard Lynch [EMAIL PROTECTED] wrote:

 OpenSSL has a secondary dependency on libeay or whatever it is.

 PHP might *think* it has OpenSSL, but until OpenSSL can also load in
 the libeay thingie, it ain't gonna work.

 It can be confusing, especially when the error log shows something
 about openssl but doesn't say what openssl is missing, and folks think
 it's still missing openssl itself, when it's really missing libeay.

 On Sat, August 11, 2007 6:02 am, Alain Roger wrote:
  I've discovered that when i type php -m, openssl is already loaded
  as
  module.
  It seems that PHP 5.2.3 was compiled with --with-openssl command.
 
  So, why modules with which ones PHP has been compiled do not appear in
  the
  phpinfo() report ?
 
  thanks a lot,
 
  Al.
 
  On 8/11/07, Stut [EMAIL PROTECTED] wrote:
 
  Alain Roger wrote:
   I have a stupid problem.
   At work i installed the PHP 5.2.1 and it works fine.
   i uncomment extension = php_opensll and i see that extension is
  activated
   because phpinfo show me information about such extension.
  
   However, at homw i've just installed PHP 5.2.3 and i did the same
  as at
  work
   but i'm not able to get any table information about openssl via
  phpinfo();
   function.
  
   could you help me please ?
 
  OpenSSL requires a DLL file to be in the path on Windows. From the
  manual page (http://php.net/openssl)...
 
  Note to Win32 Users:  In order for this extension to work, there
  are
  DLL files that must be available to the Windows system PATH. See the
  FAQ
  titled How do I add my PHP directory to the PATH on Windows for
  information on how to do this. Although copying DLL files from the
  PHP
  folder into the Windows system directory also works (because the
  system
  directory is by default in the systems PATH), it is not recommended.
  This extension requires the following files to be in the PATH:
  libeay32.dll
 
  -Stut
 
  --
  http://stut.net/
 
 
 
 
  --
  Alain
  
  Windows XP SP2
  PostgreSQL 8.2.3
  Apache 2.2.4
  PHP 5.2.3
 


 --
 Some people have a gift link here.
 Know what I want?
 I want you to buy a CD from some indie artist.
 http://cdbaby.com/browse/from/lynch
 Yeah, I get a buck. So?




-- 
Alain

Windows XP SP2
PostgreSQL 8.2.3
Apache 2.2.4
PHP 5.2.3


[PHP] Re: www.soongy.com

2007-08-14 Thread Joker7
In news: [EMAIL PROTECTED] - Gevorg
Harutyunyan  wrote :
 Hello,



 I am Gevorg.

 I just wanted to introduce you my new PHP based work here
 www.soongy.com http://www.soongy.com/ .

 It is working on PHP and MySQL and here is used DHTML, AJAX.



 Thank you very much.



 Waiting for your response



 Regards,

 Gevorg

You have a big monitor ?  :)

Chris

-- 
Cheap As Chips Broadband http://yeah.kick-butt.co.uk
Superb hosting  domain name deals http://host.kick-butt.co.uk 

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



Re: [PHP] php.ini of PHP 5.2.3

2007-08-14 Thread Richard Lynch
*IF* this is the actual problem, then find the libeay.ddl thingie and
put it next to the openssl.dll thingie.

On Tue, August 14, 2007 11:42 am, Alain Roger wrote:
 So what should i do ?

 On 8/13/07, Richard Lynch [EMAIL PROTECTED] wrote:

 OpenSSL has a secondary dependency on libeay or whatever it is.

 PHP might *think* it has OpenSSL, but until OpenSSL can also load in
 the libeay thingie, it ain't gonna work.

 It can be confusing, especially when the error log shows something
 about openssl but doesn't say what openssl is missing, and folks
 think
 it's still missing openssl itself, when it's really missing libeay.

 On Sat, August 11, 2007 6:02 am, Alain Roger wrote:
  I've discovered that when i type php -m, openssl is already
 loaded
  as
  module.
  It seems that PHP 5.2.3 was compiled with --with-openssl
 command.
 
  So, why modules with which ones PHP has been compiled do not
 appear in
  the
  phpinfo() report ?
 
  thanks a lot,
 
  Al.
 
  On 8/11/07, Stut [EMAIL PROTECTED] wrote:
 
  Alain Roger wrote:
   I have a stupid problem.
   At work i installed the PHP 5.2.1 and it works fine.
   i uncomment extension = php_opensll and i see that extension is
  activated
   because phpinfo show me information about such extension.
  
   However, at homw i've just installed PHP 5.2.3 and i did the
 same
  as at
  work
   but i'm not able to get any table information about openssl via
  phpinfo();
   function.
  
   could you help me please ?
 
  OpenSSL requires a DLL file to be in the path on Windows. From
 the
  manual page (http://php.net/openssl)...
 
  Note to Win32 Users:  In order for this extension to work, there
  are
  DLL files that must be available to the Windows system PATH. See
 the
  FAQ
  titled How do I add my PHP directory to the PATH on Windows for
  information on how to do this. Although copying DLL files from
 the
  PHP
  folder into the Windows system directory also works (because the
  system
  directory is by default in the systems PATH), it is not
 recommended.
  This extension requires the following files to be in the PATH:
  libeay32.dll
 
  -Stut
 
  --
  http://stut.net/
 
 
 
 
  --
  Alain
  
  Windows XP SP2
  PostgreSQL 8.2.3
  Apache 2.2.4
  PHP 5.2.3
 


 --
 Some people have a gift link here.
 Know what I want?
 I want you to buy a CD from some indie artist.
 http://cdbaby.com/browse/from/lynch
 Yeah, I get a buck. So?




 --
 Alain
 
 Windows XP SP2
 PostgreSQL 8.2.3
 Apache 2.2.4
 PHP 5.2.3



-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] zip freezes - how to handle corrupt CRC in zip-file

2007-08-14 Thread Richard Lynch
On Tue, August 14, 2007 5:42 am, ecc wrote:
 i´m reading zip-files with the php zip-functions without a problem.
 Now i
 got and Zip containing an corrupt crc (If i open this file via winzip,
 the
 error is shown).

 It looks like the php functions for zip-handeling zip_entry_read and
 ZipArchive::getFrom... do not quit on a bad crc checksum so
 these
 functions read in the file and than are in an infinite loop. Because i
 use
 PHP-GTK2 my tool feezes and the process has to be killed. On an
 web-enviroment this could also a big problem . ok, user-zip
 handeling on
 web is not the best idea :-)

 I´ve found no way to find out, if an file in the zip file is an valid
 or
 corrupt entry. The output of ZipArchive::statName give me no info
 about
 the state of an entry.

 Is there any trick out there, how to manage this problem. Maybe this
 is an
 bug or missing feature in the zip extensions. Dont know!

Perhaps checking the consistency with this ZIPARCHIVE::CHECKCONS flag
would help.

This is just a wild guess.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] problem in tr

2007-08-14 Thread Richard Lynch
On Mon, August 13, 2007 11:35 pm, shivendra wrote:


 Sir,u r not getting what i m trying to say,my problem is how can i
 send the
 values of tds in a perticuler row,by a function in onClick event of
 that
 row.actuallly the values are coming from database,and i what i want
 when i
 click a perticuler row the values are sent to some other page:
  table
  tr name=t1 id=t1
  tdmonu/tdtd23/td
  /tr
 tr name=t2 id=t2
 tdsuman/tdtd24/td
 /tr
  /table
 like the values in tds of tr name=t1 is monu and 23 ,i want
 when i
 click on tr name=t1 ,monu and 23 is sent to some other
 page,similarly same procedure follows when i click the tr name=t2
 but
 this time the value would be  suman and 24,i think u r getting
 what i m
 try to say.pls send the code for this:

tr
  tda href=whatever.php?td1=monuamp;td2=23monu/a/td
  tda href=whatever.php?td1=monuamp;td2=2323/a/td
/tr

Trying to use the onClick of a TR is relying far too much on
Javascript and browser behaviour.

You can still have the onClick, I guess, for browsers that will work

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] About Buggy SQL Query

2007-08-14 Thread Richard Lynch
What is in $SD?

And are you using mysql_real_escape_string on all values?

On Mon, August 13, 2007 11:31 pm, Kelvin Park wrote:
 mySQL database becomes inaccessible after a buggy sql string gets
 queried.
 The SQL server runs fine, however it seems like just the database is
 being
 looped infinitely so to say.
 Here is an example:

 (PHP)
 $sql = SELECT * FROM DB_TABLE WHERE PR_NUMBER = $whatever, DFLJJ =
 $SD;LOOE; (-- invalid sql query string)
 mysql_query($sql);

 When this query string is queried during the (webpage) loading
 process, the
 webpage just gets timed out without any error nor warning messages.

 Does anyone know if there is a certain way to prevent mysql database
 from
 stalling due to buggy sql strings?



-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



[PHP] HTTP 1.1 keep-alive support in ext/soap/php_http.c ? (fwd)

2007-08-14 Thread Brian A. Seklecki


Re-send to php-general@ since soap@ is a ghost town.

Per the msg below, still trying to figure out why each client call to any 
server results in a new TCP socket being built and closed (BAD!)


I finally got around to:
  print Request :\n . $soapClient-__getLastRequestHeaders() . \n;
  print Request :\n . $soapClient-__getLastRequest() . \n;
  print Response:\n . $soapClient-__getLastResponseHeaders() . \n;
  print Response:\n . $soapClient-__getLastResponse() . \n;

As well as checking tcpdump(8) --- my worst fears are confirmed.

The client headers says:
Connection: Keep-Alive

The server header response says:
Response:
HTTP/1.1 200 OK
Content-Type: application/soap+xml;charset=utf-8
Transfer-Encoding: chunked
Date: Tue, 14 Aug 2007 22:35:07 GMT
Server: Apache-Coyote/1.1

And yet, the PHP client running from the CLI binary executing the same 
function call to the server opens  closes two sockets to accomplish the 
work!


~BAS

-- Forwarded message --
Date: Wed, 8 Aug 2007 11:51:50 -0400 (EDT)
From: Brian A. Seklecki [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [SOAP] HTTP 1.1 keep-alive support in ext/soap/php_http.c ?


All:

Am I correct in reading ext/soap/php_http.c that the SoapClient / SoapServer 
object will not transmit a Connection: Close line into the HTTP header 
(either via the Client call itself or by modifying Apache's response?)


E.g., by default PHP SOAP client recycles HTTP connections to the server for 
calls to methods using the same server object / instance?



l8*
-lava (Brian A. Seklecki - Pittsburgh, PA, USA)
   http://www.spiritual-machines.org/

--
PHP Soap 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



Re: [PHP] very strange behavior.... incomplete query performed

2007-08-14 Thread Chris

Alain Roger wrote:

There was no error message...hust after few secunds it stop as normaly it
should do...
but i add - set_time_limit(0); and it works.

adding around 20.000 records to database takes some time :-)
around 1:41 minutes.

I was thinking that i could be faster... :-(


After doing your iconv stuff, turn it back into a csv file and use \copy 
like:


\copy table from '/path/to/file.csv'

Also see http://www.postgresql.org/docs/8.2/interactive/populate.html 
for some ideas.


--
Postgresql  php tutorials
http://www.designmagick.com/

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



Re: [PHP] HTTP methods, Web Browsers and REST

2007-08-14 Thread Chris

Nathan Nobbe wrote:

Chris,

thanks for your reply

it sounds like apache does allow the use of a script to handle PUT requests


If you install the module, yes.

from the sound of it; PUT and DELETE wont work well when using a browser 
to interact w/ a server, it seems like they are mostly supplied for 
programmatic interaction only, but that sounds odd to me  i wonder 
what the intended use of PUT and DELETE was when they were first created 
and added to the HTTP.


http://www.webdav.org/specs/rfc2518.html#METHOD_PUT

What are you trying to do anyway where you need put/delete?

--
Postgresql  php tutorials
http://www.designmagick.com/

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



Re: [PHP] HTTP 1.1 keep-alive support in ext/soap/php_http.c ? (fwd)

2007-08-14 Thread Brian A. Seklecki


Found it:

http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_http.c?annotate=1.109

Lines 892-895 and 903-905 bring the violence.

Rev 1.28 commented it out:

http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_http.c?r1=1.27r2=1.28


The bugs assocaited with it are:
 http://bugs.php.net/bug.php?id=33164
 http://bugs.php.net/bug.php?id=30329

Please advise on a course of action -- I will open another bug report if 
requested.


http://wiki.apache.org/ws/FrontPage/Axis/AxisCommonsHTTP

Extract from [WWW] RFC 2616 : HTTP/1.1 - Persistent Connection :

* An HTTP/1.1 server MAY assume that a HTTP/1.1 client intends to 
maintain a persistent connection unless a Connection header including the 
connection-token close was sent in the request.


Then presumably, unless the server explicitly closes the connection by 
instructing the client to do so in headers, the client may simply check 
for the presence of HTTP/1.1 and continue to cane the connection/socket.


Cane one!

~BAS

On Tue, 14 Aug 2007, Brian A. Seklecki wrote:



Re-send to php-general@ since soap@ is a ghost town.

Per the msg below, still trying to figure out why each client call to any 
server results in a new TCP socket being built and closed (BAD!)


I finally got around to:
 print Request :\n . $soapClient-__getLastRequestHeaders() . \n;
 print Request :\n . $soapClient-__getLastRequest() . \n;
 print Response:\n . $soapClient-__getLastResponseHeaders() . \n;
 print Response:\n . $soapClient-__getLastResponse() . \n;

As well as checking tcpdump(8) --- my worst fears are confirmed.

The client headers says:
Connection: Keep-Alive

The server header response says:
Response:
HTTP/1.1 200 OK
Content-Type: application/soap+xml;charset=utf-8
Transfer-Encoding: chunked
Date: Tue, 14 Aug 2007 22:35:07 GMT
Server: Apache-Coyote/1.1

And yet, the PHP client running from the CLI binary executing the same 
function call to the server opens  closes two sockets to accomplish the 
work!


~BAS

-- Forwarded message --
Date: Wed, 8 Aug 2007 11:51:50 -0400 (EDT)
From: Brian A. Seklecki [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [SOAP] HTTP 1.1 keep-alive support in ext/soap/php_http.c ?


All:

Am I correct in reading ext/soap/php_http.c that the SoapClient / SoapServer 
object will not transmit a Connection: Close line into the HTTP header 
(either via the Client call itself or by modifying Apache's response?)


E.g., by default PHP SOAP client recycles HTTP connections to the server for 
calls to methods using the same server object / instance?



l8*
-lava (Brian A. Seklecki - Pittsburgh, PA, USA)
   http://www.spiritual-machines.org/

--
PHP Soap 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




l8*
-lava (Brian A. Seklecki - Pittsburgh, PA, USA)
   http://www.spiritual-machines.org/

Guilty? Yeah. But he knows it. I mean, you're guilty.
You just don't know it. So who's really in jail?
~Maynard James Keenan

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



Re: [PHP] HTTP methods, Web Browsers and REST

2007-08-14 Thread Nathan Nobbe
im imagining a system using the REST paradigm where a web browser is the
client.
rather than a REST paradigm simply for web services.

-nathan

On 8/14/07, Chris [EMAIL PROTECTED] wrote:

 Nathan Nobbe wrote:
  Chris,
 
  thanks for your reply
 
  it sounds like apache does allow the use of a script to handle PUT
 requests

 If you install the module, yes.

  from the sound of it; PUT and DELETE wont work well when using a browser
  to interact w/ a server, it seems like they are mostly supplied for
  programmatic interaction only, but that sounds odd to me  i wonder
  what the intended use of PUT and DELETE was when they were first created
  and added to the HTTP.

 http://www.webdav.org/specs/rfc2518.html#METHOD_PUT

 What are you trying to do anyway where you need put/delete?

 --
 Postgresql  php tutorials
 http://www.designmagick.com/



Re: [PHP] HTTP 1.1 keep-alive support in ext/soap/php_http.c ? (fwd)

2007-08-14 Thread Chris

Brian A. Seklecki wrote:


Found it:

http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_http.c?annotate=1.109

Lines 892-895 and 903-905 bring the violence.

Rev 1.28 commented it out:

http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_http.c?r1=1.27r2=1.28


The bugs assocaited with it are:
 http://bugs.php.net/bug.php?id=33164
 http://bugs.php.net/bug.php?id=30329

Please advise on a course of action -- I will open another bug report if 
requested.


Best to ask the -internals list me thinks - they handle the C code 
behind php :)


--
Postgresql  php tutorials
http://www.designmagick.com/

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



RE: [PHP] www.soongy.com

2007-08-14 Thread Bastien Koert

Looks nice, but you need to have it adapt to screen resolutions...the fixed 
size of the page doesn't allow for scrolling etc...does not fit well on a 
1400x900 laptop screen
 
bastien From: [EMAIL PROTECTED] To: php-general@lists.php.net Date: Tue, 14 
Aug 2007 20:15:27 +0500 Subject: [PHP] www.soongy.com  Hello,I am 
Gevorg.   I just wanted to introduce you my new PHP based work here 
www.soongy.com http://www.soongy.com/ .  It is working on PHP and MySQL 
and here is used DHTML, AJAX.Thank you very much.Waiting for 
your response Regards,  Gevorg   
_
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx

Re: [PHP] www.soongy.com

2007-08-14 Thread heavyccasey
Yes, add a scroll-bar. Middle-click works, for those who wants to read.

On 8/14/07, Bastien Koert [EMAIL PROTECTED] wrote:

 Looks nice, but you need to have it adapt to screen resolutions...the fixed 
 size of the page doesn't allow for scrolling etc...does not fit well on a 
 1400x900 laptop screen

 bastien From: [EMAIL PROTECTED] To: php-general@lists.php.net Date: Tue, 
 14 Aug 2007 20:15:27 +0500 Subject: [PHP] www.soongy.com  Hello,I 
 am Gevorg.   I just wanted to introduce you my new PHP based work here 
 www.soongy.com http://www.soongy.com/ .  It is working on PHP and MySQL 
 and here is used DHTML, AJAX.Thank you very much.Waiting for 
 your response Regards,  Gevorg  
 _
 News, entertainment and everything you care about at Live.com. Get it now!
 http://www.live.com/getstarted.aspx

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



[PHP] About UTF-8 / ANSI

2007-08-14 Thread Kelvin Park
I heard from a person that he was having some problem with uploading and 
displaying a web site on an ordinary web hosting server because the 
files weren't saved as UTF-8 charset (instead they were saved in 
iso-8859-1).


Could saving HTML files in a different charset (UTF-8 or iso-8859-1) 
cause problem with the web hosting server making the website totally 
inaccessible?


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



Re: [PHP] About UTF-8 / ANSI

2007-08-14 Thread Anders Norrbring

Kelvin Park skrev:
I heard from a person that he was having some problem with uploading and 
displaying a web site on an ordinary web hosting server because the 
files weren't saved as UTF-8 charset (instead they were saved in 
iso-8859-1).


Could saving HTML files in a different charset (UTF-8 or iso-8859-1) 
cause problem with the web hosting server making the website totally 
inaccessible?




Probably not.. However (as always), if code is misinterpreted due to 
character set, tags may be interpreted incorrectly and generate errors 
which prevents output. Most likely in case of cached pages where output 
isn't presented until the page is fully parsed.


But I'd say it's not likely...

Anders.

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