Re: [PHP] How do I remove a string from another string in a fuzzy way?

2013-05-21 Thread Tedd Sperling
On May 20, 2013, at 10:17 PM, Daevid Vincent dae...@daevid.com wrote: Initially I was thinking that somehow I could use a simple regex on the needle and haystacks to strip out all white space and str_ireplace() them that way, but then I don't have a way to put the whitespace back that I can

[PHP] How do I remove a string from another string in a fuzzy way?

2013-05-20 Thread Daevid Vincent
We have a support ticket system we built and customers can reply via email which then posts their reply into our database. The problem is that when you read a ticket, you see each ticket entry (row in DB) but they tend to accumulate the previous entries text since the customer replied to an email.

Re: [PHP] How do I remove a string from another string in a fuzzy way?

2013-05-20 Thread shiplu
Is your ticketing system written from scratch? Because such type of logic is already implemented in existing help desk softwares. I think you can also use a specific string in your email to define which part goes in ticket and which part not. For example, you can include PLEASE REPLY ABOVE THIS

RE: [PHP] How do I remove a string from another string in a fuzzy way?

2013-05-20 Thread Daevid Vincent
-Original Message- From: muquad...@gmail.com [mailto:muquad...@gmail.com] On Behalf Of shiplu Sent: Monday, May 20, 2013 9:03 PM To: Daevid Vincent Cc: php-general General List Subject: Re: [PHP] How do I remove a string from another string in a fuzzy way? Is your ticketing

RE: [PHP] How do I do count the occurrence of each word?

2012-08-20 Thread Ford, Mike
-Original Message- From: Marco Behnke [mailto:ma...@behnke.biz] Sent: 19 August 2012 06:39 To: php-general@lists.php.net Subject: Re: [PHP] How do I do count the occurrence of each word? Am 19.08.12 06:59, schrieb tamouse mailing lists: On Sat, Aug 18, 2012 at 6:44 PM, John

Re: [PHP] How do I do count the occurrence of each word?

2012-08-19 Thread tamouse mailing lists
On Sun, Aug 19, 2012 at 12:38 AM, Marco Behnke ma...@behnke.biz wrote: Am 19.08.12 06:59, schrieb tamouse mailing lists: On Sat, Aug 18, 2012 at 6:44 PM, John Taylor-Johnston jt.johns...@usherbrooke.ca wrote: I want to parse this text and count the occurrence of each word: $text =

[PHP] How do I do count the occurrence of each word?

2012-08-18 Thread John Taylor-Johnston
I want to parse this text and count the occurrence of each word: $text = http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.html; #Can I do this? $stripping = strip_tags($text); #get rid of html $stripping = strtolower($stripping); #put in lowercase First of all I

Re: [PHP] How do I do count the occurrence of each word?

2012-08-18 Thread tamouse mailing lists
On Sat, Aug 18, 2012 at 6:44 PM, John Taylor-Johnston jt.johns...@usherbrooke.ca wrote: I want to parse this text and count the occurrence of each word: $text = http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.html; #Can I do this? $stripping = strip_tags($text); #get rid of html

Re: [PHP] How do I do count the occurrence of each word?

2012-08-18 Thread Marco Behnke
Am 19.08.12 06:59, schrieb tamouse mailing lists: On Sat, Aug 18, 2012 at 6:44 PM, John Taylor-Johnston jt.johns...@usherbrooke.ca wrote: I want to parse this text and count the occurrence of each word: $text = http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.html; #Can I do this?

Re: [PHP] How do I enable more useful PHP error logging?

2012-02-29 Thread Simon Schick
Hi, Daevid What you could do to have it quick is to install the plugin xdebug. Here you can (as described in the documentation linked here) enable to get some extra information for a E_* message from php. http://xdebug.org/docs/stack_trace I would not do that on a live-system where you have 30k

Re: [PHP] How do I enable more useful PHP error logging?

2012-02-29 Thread Stuart Dallas
On 29 Feb 2012, at 01:13, Daevid Vincent wrote: -Original Message- From: Stuart Dallas [mailto:stu...@3ft9.com] Seriously? Errors like this should not be getting anywhere near your production servers. This is especially true if you're really getting 30k hits/s. Don't get me

[PHP] How do I enable more useful PHP error logging?

2012-02-28 Thread Daevid Vincent
My question is, is there a way to enable some PHP configuration that would output more verbose information, such as a backtrace or the URL attempted? In our PHP error log, we have the usual semi-useful information. However this is only a partial story as it's hard to re-create the URL that caused

Re: [PHP] How do I enable more useful PHP error logging?

2012-02-28 Thread Adam Richardson
On Tue, Feb 28, 2012 at 6:14 PM, Daevid Vincent dae...@daevid.com wrote: My question is, is there a way to enable some PHP configuration that would output more verbose information, such as a backtrace or the URL attempted? In our PHP error log, we have the usual semi-useful information.

Re: [PHP] How do I enable more useful PHP error logging?

2012-02-28 Thread Stuart Dallas
On 28 Feb 2012, at 23:14, Daevid Vincent wrote: My question is, is there a way to enable some PHP configuration that would output more verbose information, such as a backtrace or the URL attempted? In our PHP error log, we have the usual semi-useful information. However this is only a

RE: [PHP] How do I enable more useful PHP error logging?

2012-02-28 Thread Daevid Vincent
-Original Message- From: Stuart Dallas [mailto:stu...@3ft9.com] Seriously? Errors like this should not be getting anywhere near your production servers. This is especially true if you're really getting 30k hits/s. Don't get me started. I joined here almost a year ago. They didn't

Re: [PHP] How do I enable more useful PHP error logging?

2012-02-28 Thread Tommy Pham
On Tue, Feb 28, 2012 at 3:14 PM, Daevid Vincent dae...@daevid.com wrote: My question is, is there a way to enable some PHP configuration that would output more verbose information, such as a backtrace or the URL attempted? Have you looked at log4php? [1] It's a log4j (Java based) logging

Re: [PHP] How do I enable $_SERVER['HTTP_X_WAP_PROFILE'] or $_SERVER['HTTP_PROFILE']

2011-08-04 Thread Stuart Dallas
On 3 Aug 2011, at 21:07, Daevid Vincent wrote: I'm working on a mobile site and from the various searches and reading (and even code fragments I've inherited for the project), they make reference to: $_SERVER['HTTP_X_WAP_PROFILE'] and a fallback $_SERVER['HTTP_PROFILE'] However, when I

[PHP] How do I enable $_SERVER['HTTP_X_WAP_PROFILE'] or $_SERVER['HTTP_PROFILE']

2011-08-03 Thread Daevid Vincent
I'm working on a mobile site and from the various searches and reading (and even code fragments I've inherited for the project), they make reference to: $_SERVER['HTTP_X_WAP_PROFILE'] and a fallback $_SERVER['HTTP_PROFILE'] However, when I hit a phpinfo(); page using both an Android MyTouch 3G

RE: [PHP] How do I convert the string E_ALL ~E_NOTICE to the decimal equivalent 6135?

2010-11-12 Thread Ford, Mike
Subject: RE: [PHP] How do I convert the string E_ALL ~E_NOTICE to the decimal equivalent 6135? -Original Message- From: Daevid Vincent [mailto:dae...@daevid.com] Sent: 11 November 2010 04:06 To: php-general@lists.php.net We're trying to move all of our configuration

RE: [PHP] How do I convert the string E_ALL ~E_NOTICE to the decimal equivalent 6135?

2010-11-11 Thread Ford, Mike
-Original Message- From: Daevid Vincent [mailto:dae...@daevid.com] Sent: 11 November 2010 04:06 To: php-general@lists.php.net We're trying to move all of our configuration files for our DEV/TEST/PROD and various python scripts and such that all need the same DB connection

RE: [PHP] How do I convert the string E_ALL ~E_NOTICE to the decimal equivalent 6135?

2010-11-11 Thread Daevid Vincent
-Original Message- From: Ford, Mike [mailto:m.f...@leedsmet.ac.uk] Sent: Thursday, November 11, 2010 12:58 AM To: php-general@lists.php.net Subject: RE: [PHP] How do I convert the string E_ALL ~E_NOTICE to the decimal equivalent 6135? -Original Message- From

[PHP] How do I convert the string E_ALL ~E_NOTICE to the decimal equivalent 6135?

2010-11-10 Thread Daevid Vincent
We're trying to move all of our configuration files for our DEV/TEST/PROD and various python scripts and such that all need the same DB connection parameters and pathing information to a common and simple config.ini file they all can share across languages. One snag I ran into is this: [dart]

[PHP] How do I use date_diff in my code (both codes are included, mine and the example function) I need process.php

2010-05-02 Thread justino garcia
HOw would I use this function below, from this url http://php.net/manual/en/function.date-diff.php I need to output the subject, date, and the final answer to the calcuation of the time difference (say from e.g. 10:00 AM to 12:00 PM) . Getting total time wrked on at a job site, doing helpdesk. I

[PHP] How do I upgrade GD?

2010-03-20 Thread PmI
Hi, how do I upgrade GD? PHP still comes bundled with the three year old version 2.0.34, even though there have been lots of bugfixes in 2.0.35 and 2.0.36 (most importantly, 2.0.36 now actually supports unicode text, rather than any unicode text as long as it's only UCS-2, which means any

Re: [PHP] How do I upgrade GD?

2010-03-20 Thread Per Jessen
PmI wrote: Hi, how do I upgrade GD? PHP still comes bundled with the three year old version 2.0.34, even though there have been lots of bugfixes in 2.0.35 and 2.0.36 (most importantly, 2.0.36 now actually supports unicode text, rather than any unicode text as long as it's only UCS-2, which

[PHP] how do I use php://memory?

2010-01-29 Thread Mari Masuda
Hello, I have a function that uses tidy to attempt to clean up a bunch of crappy HTML that I inherited. In order to use tidy, I write the crappy HTML to a temporary file on disk, run tidy, and extract and return the clean(er) HTML. The program itself works fine but with all of the disk

Re: [PHP] how do I use php://memory?

2010-01-29 Thread Nathan Nobbe
On Fri, Jan 29, 2010 at 5:35 PM, Mari Masuda mari.mas...@stanford.eduwrote: Hello, I have a function that uses tidy to attempt to clean up a bunch of crappy HTML that I inherited. In order to use tidy, I write the crappy HTML to a temporary file on disk, run tidy, and extract and return the

Re: [PHP] how do I use php://memory?

2010-01-29 Thread Jochem Maas
Op 1/30/10 1:35 AM, Mari Masuda schreef: Hello, I have a function that uses tidy to attempt to clean up a bunch of crappy HTML that I inherited. In order to use tidy, I write the crappy HTML to a temporary file on disk, run tidy, and extract and return the clean(er) HTML. The program

Re: [PHP] how do I use php://memory?

2010-01-29 Thread Mari Masuda
On Jan 29, 2010, at 4:38 PM, Nathan Nobbe wrote: On Fri, Jan 29, 2010 at 5:35 PM, Mari Masuda mari.mas...@stanford.edu wrote: Hello, I have a function that uses tidy to attempt to clean up a bunch of crappy HTML that I inherited. In order to use tidy, I write the crappy HTML to a

Re: [PHP] how do I use php://memory?

2010-01-29 Thread Mari Masuda
On Jan 29, 2010, at 10:57 PM, Mari Masuda wrote: On Jan 29, 2010, at 4:38 PM, Nathan Nobbe wrote: On Fri, Jan 29, 2010 at 5:35 PM, Mari Masuda mari.mas...@stanford.edu wrote: Hello, I have a function that uses tidy to attempt to clean up a bunch of crappy HTML that I inherited. In

Re: [PHP] How do I remove unused GET parameters from the URL?

2010-01-20 Thread Rene Veerman
Michael, while i respect your choices, i think you should know that jquery.com is pretty good at minimizing browser-incompatibility headaches (and keeping js apps small), and the quircks that are left are easy enough to learn about. for things whereby - the server needs to generate tons of HTML

Re: [PHP] How do I remove unused GET parameters from the URL?

2010-01-20 Thread Ashley Sheridan
On Tue, 2010-01-19 at 20:55 -0800, Daevid Vincent wrote: I have an HTML form with a hundred or so elements on it, used for searching a database. When the user submits the form (via GET) the URL is loaded with ALL of these fields, and many of them are not even actually used in the search

Re: [PHP] How do I remove unused GET parameters from the URL?

2010-01-20 Thread Michael A. Peters
Rene Veerman wrote: Michael, while i respect your choices, i think you should know that jquery.com is pretty good at minimizing browser-incompatibility headaches (and keeping js apps small), and the quircks that are left are easy enough to learn about. for things whereby - the server needs to

Re: [PHP] How do I remove unused GET parameters from the URL?

2010-01-20 Thread Ashley Sheridan
On Wed, 2010-01-20 at 10:30 -0800, Michael A. Peters wrote: Rene Veerman wrote: Michael, while i respect your choices, i think you should know that jquery.com is pretty good at minimizing browser-incompatibility headaches (and keeping js apps small), and the quircks that are left are

RE: [PHP] How do I remove unused GET parameters from the URL?

2010-01-20 Thread Daevid Vincent
Comments inline below... -Original Message- From: Ashley Sheridan GET has a limit on the amount of data it may carry, which is reduced the longer the base URL is. True, but for search parameters, it's IMHO best to use GET rather than POST so the page can be bookmarked. This used

RE: [PHP] How do I remove unused GET parameters from the URL?

2010-01-20 Thread Ashley Sheridan
On Wed, 2010-01-20 at 13:06 -0800, Daevid Vincent wrote: Comments inline below... -Original Message- From: Ashley Sheridan GET has a limit on the amount of data it may carry, which is reduced the longer the base URL is. True, but for search parameters, it's IMHO best to

[PHP] How do I remove unused GET parameters from the URL?

2010-01-19 Thread Daevid Vincent
I have an HTML form with a hundred or so elements on it, used for searching a database. When the user submits the form (via GET) the URL is loaded with ALL of these fields, and many of them are not even actually used in the search criteria.

Re: [PHP] How do I remove unused GET parameters from the URL?

2010-01-19 Thread Michael A. Peters
Daevid Vincent wrote: *snip* The problem as I see it, is that this magic happens when the user hits Submit, so not sure PHP has any way to intercept at that point. Javascript might be able to do something on the onClick event or onSubmit I suspect. But this seems like something that someone

Re: [PHP] How do I remove unused GET parameters from the URL?

2010-01-19 Thread Michael A. Peters
Daevid Vincent wrote: I guess I could always redirect to some 'scrubber' page that strips them out and redirects on to the refering page again, but that seems klunky. BTW, I want to use GET so that the page can be bookmarked for future searches of the same data (or modified easily with

Re: [PHP] How do I get reliable COMPUTERNAME?

2009-11-05 Thread Jim Lucas
Andrew Ballard wrote: I want to store the name of the computer that is executing a script in some log tables. (Our servers are load balanced, and I'd like to be able to determine which physical machine is serving each request.) On my development machine (Windows PC running the debugger in

Re: [PHP] How do I get reliable COMPUTERNAME?

2009-11-05 Thread Andrew Ballard
On Thu, Nov 5, 2009 at 2:03 PM, Jim Lucas li...@cmsws.com wrote: Andrew Ballard wrote: I want to store the name of the computer that is executing a script in some log tables. (Our servers are load balanced, and I'd like to be able to determine which physical machine is serving each request.)

[PHP] How do I extract link text from anchor tag as well as the URL from the href attribute

2009-08-16 Thread chrysanhy
I have the following code to extract the URLs from the anchor tags of an HTML page: $html = new DOMDocument(); $htmlpage-loadHtmlFile($location); $xpath = new DOMXPath($htmlpage); $links = $xpath-query( '//a' ); foreach ($links as $link) { $int_url_list[$i++] = $link-getAttribute( 'href' ) . \n;

[PHP] How do I Upload XML file using cUrl?

2009-06-12 Thread Rahul S. Johari
Ave, I have a client who used Lead360.Com to manage their Leads. We have a Leads Management application in place that creates an XML file of the lead which give the client manually to download. What are client is requesting is to POST the XML File directly to their Leads360.Com account.

[PHP] How do I access a local variable?

2009-04-19 Thread abdulazeez alugo
Hi guys, I have a function inside which I set alocal variable to store a result. Can I access this variable in another function? if yes then how? function tbl1($entrytitle, $entrytext) { global $conn; $result= mysql_query(INSERT INTO tbl1(tbl1_id, title, text) VALUES('NULL',

Re: [PHP] How do I access a local variable?

2009-04-19 Thread Chris
abdulazeez alugo wrote: Hi guys, I have a function inside which I set alocal variable to store a result. Can I access this variable in another function? if yes then how? No, you can't. You either need to pass it back (recommended) or make it global (not recommended). function

Re: [PHP] How do I access a local variable?

2009-04-19 Thread Paul M Foster
On Mon, Apr 20, 2009 at 12:54:27AM +0100, abdulazeez alugo wrote: Hi guys, I have a function inside which I set alocal variable to store a result. Can I access this variable in another function? if yes then how? function tbl1($entrytitle, $entrytext) { global $conn; $result=

Re: [PHP] How do I access a local variable?

2009-04-19 Thread Ashley Sheridan
On Sun, 2009-04-19 at 21:55 -0400, Paul M Foster wrote: On Mon, Apr 20, 2009 at 12:54:27AM +0100, abdulazeez alugo wrote: Hi guys, I have a function inside which I set alocal variable to store a result. Can I access this variable in another function? if yes then how? function

[PHP] How do I remove an array element from within a recursive function?

2009-02-26 Thread Daevid Vincent
I have an array like this and I simply need to recurse over it and find a matching menu item to remove: array(3) { [dart]= array(10) { [0]= object(menuItem)#4 (9) { [menu]= string(7) My DART [name]= string(7) My DART [title]= string(39) Data

[PHP] how do i allow more than 2 threads of php to run?

2008-12-09 Thread Rene Veerman
i'm getting freezes for the 3rd to Nth concurrent request on my homeserver (got root, on debian4 + apache2). how can i allow more threads? like 50 or so? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how do i allow more than 2 threads of php to run?

2008-12-09 Thread Jochem Maas
Rene Veerman schreef: i'm getting freezes for the 3rd to Nth concurrent request on my homeserver (got root, on debian4 + apache2). how can i allow more threads? like 50 or so? probably need to fix the apache.conf to allow more concurrent child processes. also note I said 'processes' - php is

Re: [PHP] how do i allow more than 2 threads of php to run?

2008-12-09 Thread Rene Veerman
Jochem Maas wrote: Rene Veerman schreef: i'm getting freezes for the 3rd to Nth concurrent request on my homeserver (got root, on debian4 + apache2). how can i allow more threads? like 50 or so? probably need to fix the apache.conf to allow more concurrent child processes. K,

Re: [PHP] how do i allow more than 2 threads of php to run?

2008-12-09 Thread Jochem Maas
Rene Veerman schreef: Jochem Maas wrote: Rene Veerman schreef: i'm getting freezes for the 3rd to Nth concurrent request on my homeserver (got root, on debian4 + apache2). how can i allow more threads? like 50 or so? probably need to fix the apache.conf to allow more concurrent

Re: [PHP] how do i allow more than 2 threads of php to run?

2008-12-09 Thread Rene Veerman
Jochem Maas wrote: Rene Veerman schreef: Jochem Maas wrote: Rene Veerman schreef: i'm getting freezes for the 3rd to Nth concurrent request on my homeserver (got root, on debian4 + apache2). how can i allow more threads? like 50 or so? probably need to fix the

Re: [PHP] how do i allow more than 2 threads of php to run?

2008-12-09 Thread Krister Karlström
Hi! Please note that most browser follows the RFC:s and does not allow more than two connections to each domain simultaneously. You can do work-arounds to solve this problem, like using subdomains for some requests. In Firefox you might also be able to disable this feature... Regards,

Re: [PHP] how do i allow more than 2 threads of php to run?

2008-12-09 Thread Daevid Vincent
Assuming this is in-fact your issue, I ALWAYS do this registry hack on my Windows computers: http://support.microsoft.com/kb/282402 On Tue, 2008-12-09 at 22:10 +0200, Krister Karlström wrote: Hi! Please note that most browser follows the RFC:s and does not allow more than two connections

Re: [PHP] how do i allow more than 2 threads of php to run?

2008-12-09 Thread Ashley Sheridan
On Tue, 2008-12-09 at 12:19 -0800, Daevid Vincent wrote: Assuming this is in-fact your issue, I ALWAYS do this registry hack on my Windows computers: http://support.microsoft.com/kb/282402 On Tue, 2008-12-09 at 22:10 +0200, Krister Karlström wrote: Hi! Please note that most

Re: [PHP] how do I stop Firefox doing a conditional get?

2008-05-15 Thread Al
Make certain your steam is compressed http://www.whatsmyip.org/mod_gzip_test/ Per Jessen wrote: Robin Vickery wrote: 2008/5/14 Per Jessen [EMAIL PROTECTED]: The issue is - I'd like this page to appear to be as real time as possible, and the occasional delay caused by the conditional get

Re: [PHP] how do I stop Firefox doing a conditional get?

2008-05-15 Thread Robin Vickery
On 15/05/2008, Al [EMAIL PROTECTED] wrote: Make certain your steam is compressed http://www.whatsmyip.org/mod_gzip_test/ Compressed steam can be dangerous: http://en.wikipedia.org/wiki/2007_New_York_City_steam_explosion -robin -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] how do I stop Firefox doing a conditional get?

2008-05-15 Thread Per Jessen
Al wrote: Make certain your steam is compressed http://www.whatsmyip.org/mod_gzip_test/ The files I was having the problem with are GIFs, so already LZW compressed. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how do I stop Firefox doing a conditional get?

2008-05-15 Thread Al
Try by not LZW compressing and the use ob_start() and flush() so your files are gzip compressed. I don't know if Firefox knows how to readily handle LZW on the fly. It does know how to handle gzip. Per Jessen wrote: Al wrote: Make certain your steam is compressed

Re: [PHP] how do I stop Firefox doing a conditional get?

2008-05-15 Thread Per Jessen
Al wrote: Per Jessen wrote: Al wrote: Make certain your steam is compressed http://www.whatsmyip.org/mod_gzip_test/ The files I was having the problem with are GIFs, so already LZW compressed. Try by not LZW compressing and the use ob_start() and flush() so your files are gzip

[PHP] how do I stop Firefox doing a conditional get?

2008-05-14 Thread Per Jessen
All, not really PHP related, but I figured someone here would already have solved this problem. I've got a page with a single img. I change the src attribute dynamically using javascript. Although the images being served all have long expiry times, Firefox still does a conditional get to

Re: [PHP] how do I stop Firefox doing a conditional get?

2008-05-14 Thread Robin Vickery
2008/5/14 Per Jessen [EMAIL PROTECTED]: All, not really PHP related, but I figured someone here would already have solved this problem. I've got a page with a single img. I change the src attribute dynamically using javascript. Although the images being served all have long expiry

Re: [PHP] how do I stop Firefox doing a conditional get?

2008-05-14 Thread Per Jessen
Robin Vickery wrote: 2008/5/14 Per Jessen [EMAIL PROTECTED]: The issue is - I'd like this page to appear to be as real time as possible, and the occasional delay caused by the conditional get is a nuisance. My images are clearly cached, so how do I prevent Firefox from doing the

[PHP] How do I search the archives?

2008-03-11 Thread Lamonte H
I went to the page, but I didn't find a search box and what not. Is there a way to search the archives? Else when I get home I'll just create a script to DL all the links to a page then create a simple search box.

Re: [PHP] How do I search the archives?

2008-03-11 Thread Stut
On 11 Mar 2008, at 16:02, Lamonte H wrote: I went to the page, but I didn't find a search box and what not. Is there a way to search the archives? Else when I get home I'll just create a script to DL all the links to a page then create a simple search box. You might want to think about

Re: [PHP] How do I search the archives?

2008-03-11 Thread Daniel Brown
On Tue, Mar 11, 2008 at 12:11 PM, Stut [EMAIL PROTECTED] wrote: On 11 Mar 2008, at 16:02, Lamonte H wrote: I went to the page, but I didn't find a search box and what not. Is there a way to search the archives? Else when I get home I'll just create a script to DL all the links

Re: [PHP] how do i get a printout of original multipart post data

2007-11-28 Thread Olav Mørkrid
what is the thought behind php not providing access to original post data? this removes any chance of analyzing corrupt upload data, which is often the case with mobile browsers. can future versions of php please include a way of viewing raw server requests in full? On 26/11/2007, [EMAIL

[PHP] how do i get a printout of original multipart post data

2007-11-26 Thread Olav Mørkrid
hello how can i get a raw and untouched printout of a multipart/form-data POST? i need this to analyze what certain user agents do wrong when uploading files. what happens is that php just fails to put files into $_FILES, and gives no way of seeing the original posting and exactly what is wrong

Re: [PHP] how do i get a printout of original multipart post data

2007-11-26 Thread Robert . Degen
If you're with linux try netcat (nc) at listening mode. Something like (not exactly) nc -vtlp 80 and then submut against any localhost url. greetings - Ursprüngliche Nachricht - Von: Olav Mørkrid [EMAIL PROTECTED] Datum: Montag, November 26, 2007 1:52 pm Betreff: [PHP] how do i

[PHP] How do I specify a local file for fopen()?

2007-11-04 Thread Jon Westcot
Hi all: I've been beating my head against a brick wall trying to figure this out and I'm still no closer than I was two weeks ago. How do I specify a local file on my computer to use with fopen() on the server? I've checked and the allow_url_fopen setting is set to On. I use the

Re: [PHP] How do I specify a local file for fopen()?

2007-11-04 Thread Cristian Vrabie
Server can't access files on clients computers as they wish or it would be madness. Nothing would be secure. However you can get to the file if you make it public in some way and with some restrictions. Therea are several methods: 1. (wich i think is best) install a ftp server and share the

Re: [PHP] How do I get PHP to save a backslash in a Mysql table?

2007-10-10 Thread Nathan Nobbe
On 10/10/07, Don Proshetsky [EMAIL PROTECTED] wrote: Hi, I have a field in which a user inputs a Windows style directory path, hence using backslashes and not forward slashes. Example: c:\qb\data\mydatadile.qbw However, when the use clicks update, what gets saved is:

Re: [PHP] How do I get PHP to save a backslash in a Mysql table?

2007-10-10 Thread TG
isn't what you expect it to be or want it to be. -TG - Original Message - From: Nathan Nobbe [EMAIL PROTECTED] To: Don Proshetsky [EMAIL PROTECTED] Cc: php-general@lists.php.net Date: Wed, 10 Oct 2007 14:12:34 -0400 Subject: Re: [PHP] How do I get PHP to save a backslash in a Mysql table

RE: [PHP] How do I get PHP to save a backslash in a Mysql table?

2007-10-10 Thread Bastien Koert
use mysql_real_escape_string bastien From: [EMAIL PROTECTED] To: php-general@lists.php.net Date: Wed, 10 Oct 2007 13:48:03 -0400 Subject: [PHP] How do I get PHP to save a backslash in a Mysql table? Hi, I have a field in which a user inputs a Windows style directory path, hence using

Re: [PHP] How do I get PHP to save a backslash in a Mysql table?

2007-10-10 Thread James Ausmus
On 10/10/07, Don Proshetsky [EMAIL PROTECTED] wrote: Hi, I have a field in which a user inputs a Windows style directory path, hence using backslashes and not forward slashes. Example: c:\qb\data\mydatadile.qbw However, when the use clicks update, what gets saved is:

[PHP] How do I delete a composite key?

2007-08-26 Thread nitrox .
Im trying to delete a composite key but cannot figure out the proper format. Would somebody tell me where im messing up? I have an url that is supposed to send the member id and game id to a delete query. And the delete query is supposed to grab the id's based on type. This is the link: a

Re: [PHP] How do I delete a composite key?

2007-08-26 Thread Stut
nitrox . wrote: Im trying to delete a composite key but cannot figure out the proper format. Would somebody tell me where im messing up? I have an url that is supposed to send the member id and game id to a delete query. And the delete query is supposed to grab the id's based on type. This

[PHP] How do I get Apache 1.3.36 to use PHP 5

2007-08-26 Thread Beauford
Not to sound like a total nob, but how do I get Apache 1.3.36 to use PHP5. I have both 4 and 5 installed, but it still uses 4. I never had a problem with 4. I read the followed the INSTALL file for PHP5, below. I reinstall Apache as well and nothing - step 11. I tried putting LoadModule

Re: [PHP] How do I delete a composite key?

2007-08-26 Thread Richard Lynch
On Sun, August 26, 2007 2:05 pm, Stut wrote: nitrox . wrote: Im trying to delete a composite key but cannot figure out the proper format. Would somebody tell me where im messing up? I have an url that is supposed to send the member id and game id to a delete query. And the delete query is

Re: [PHP] How do I get Apache 1.3.36 to use PHP 5

2007-08-26 Thread Richard Lynch
On Sun, August 26, 2007 3:03 pm, Beauford wrote: I tried putting LoadModule php5_module /usr/local/apache/libphp5.so in my http.conf, but it doesn't exist. Example 2-2. Installation Instructions (Static Module Installation for Apache) for PHP I think static module installation means

[PHP] how do I pass a variable with header?

2007-04-21 Thread Ross
header('Location: edit_property.php?property_id=.'$property_id'.'); t: 0131 553 3935 | m:07816 996 930 | [EMAIL PROTECTED] | http://www:blue-fly.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how do I pass a variable with header?

2007-04-21 Thread Stut
Ross wrote: header('Location: edit_property.php?property_id=.'$property_id'.'); You read the manual to learn basic PHP syntax. header('Location: edit_property.php?property_id='. urlencode($property_id)); Also, technically the URL given in a location header should be

Re: [PHP] how do I pass a variable with header?

2007-04-21 Thread Richard Lynch
On Sat, April 21, 2007 8:54 am, Ross wrote: header('Location: edit_property.php?property_id=.'$property_id'.'); Location: edit_property.php?property_id=$property_id However, you should be using a complete URI in Location: to be within HTTP spec. -- Some people have a gift link here. Know what

Re: [PHP] How do I force my script to exit after 5 seconds?

2007-02-23 Thread Richard Lynch
On Thu, February 22, 2007 9:06 am, Aaron Gould wrote: So, my question is: how can I force this script to stop after 5 seconds has elapsed? Here's the script: Inlined code might work... $fp = fsockopen('192.168.3.25', 10001,

[PHP] How do I force my script to exit after 5 seconds?

2007-02-22 Thread Aaron Gould
I have a script that connects to a networked device via PHP's socket functions. This device accepts proprietary commands (e.g.: KPRINT, as seen below), and returns data. However, this device does not have any sort of EXIT command to end the processing of events. So it essentially loops

Re: [PHP] How do I force my script to exit after 5 seconds?

2007-02-22 Thread Brad Bonkoski
I think something like this will work for you.. $start_time = time(); ...loop.. if( time() - $start_time 5 ) exit; -B Aaron Gould wrote: I have a script that connects to a networked device via PHP's socket functions. This device accepts proprietary commands (e.g.: KPRINT, as seen below),

Re: [PHP] How do I force my script to exit after 5 seconds?

2007-02-22 Thread Aaron Gould
I tried this earlier, but it does not seem to work... It appears to just hang when no data is returned from the networked device. It seems as if the loop stops, and is waiting for something. Brad Bonkoski wrote: I think something like this will work for you.. $start_time = time();

Re: [PHP] How do I force my script to exit after 5 seconds?

2007-02-22 Thread Brad Bonkoski
Aaron Gould wrote: I tried this earlier, but it does not seem to work... It appears to just hang when no data is returned from the networked device. It seems as if the loop stops, and is waiting for something. probably blocking on the socket have you tried:

Re: [PHP] How do I force my script to exit after 5 seconds?

2007-02-22 Thread Robin Vickery
On 22/02/07, Aaron Gould [EMAIL PROTECTED] wrote: I tried this earlier, but it does not seem to work... It appears to just hang when no data is returned from the networked device. It seems as if the loop stops, and is waiting for something.

Re: [PHP] How do I force my script to exit after 5 seconds?

2007-02-22 Thread Aaron Gould
Thanks very much, I've added stream_set_timeout functionality, and it seems to work very well! For reference, here's the modified script: $fp = fsockopen('192.168.3.25', 10001, $errno, $errstr, 5); if (!$fp) { echo 'Error...'; }

[PHP] how do I just escape double quotes within a string?

2007-02-13 Thread blackwater dev
If I use add slashes, it strips everything, I just want to replace all the double quotes with slash double quote but this, of course, throws errors: str_replace(,\,$code); Thanks!

Re: [PHP] how do I just escape double quotes within a string?

2007-02-13 Thread Eric Butera
On 2/13/07, blackwater dev [EMAIL PROTECTED] wrote: If I use add slashes, it strips everything, I just want to replace all the double quotes with slash double quote but this, of course, throws errors: str_replace(,\,$code); Thanks! Try this $string = 'Hello person. How are you?';

Re: [PHP] how do I just escape double quotes within a string?

2007-02-13 Thread tg-php
You could use addslashes(): http://us3.php.net/manual/en/function.addslashes.php Or, the code you mentioned below, could be rewritten like: str_replace(\,\\,$code); or str_replace('','\',$code); And if you're doing it for a MySQL query call, then you want to use mysql-real-escape-string()

Re: [PHP] How do I get ini_set('output_handler', '') to work?!

2006-11-02 Thread Richard Lynch
On Wed, November 1, 2006 3:42 pm, Ed Lazor wrote: Unless you want to pre-parse set_ini() for constants differently than set_ini() for variables. [shudder] It sounds like we just need support for pre-parser commands. You end up with one set of variables, but now you have the opportunity to

RE: [PHP] How do I get ini_set('output_handler', '') to work?!

2006-11-01 Thread Richard Lynch
On Tue, October 31, 2006 6:22 pm, Daevid Vincent wrote: There is nothing to re-compile here. The command line has an existing flag for you to specify the php.ini file, or to override any setting[s] within the php.ini file. Mebbe so, but that's equally obnoxious to pass this command line

Re: [PHP] How do I get ini_set('output_handler', '') to work?!

2006-11-01 Thread Ed Lazor
Unless you want to pre-parse set_ini() for constants differently than set_ini() for variables. [shudder] It sounds like we just need support for pre-parser commands. You end up with one set of variables, but now you have the opportunity to change attributes of the environment before script

RE: [PHP] How do I get ini_set('output_handler', '') to work?!

2006-10-31 Thread Richard Lynch
On Mon, October 30, 2006 7:19 pm, Daevid Vincent wrote: Thank you for the reply Richard (and Tom). That news sucks however. Seems that the PHP pre-parser should handle this better. It's not like it's a one-pass parser (like Ruby). ?php ini_set('output_handler', 'mb_output_handler'); echo

RE: [PHP] How do I get ini_set('output_handler', '') to work?!

2006-10-31 Thread Daevid Vincent
There is nothing to re-compile here. The command line has an existing flag for you to specify the php.ini file, or to override any setting[s] within the php.ini file. Mebbe so, but that's equally obnoxious to pass this command line parameter to a lot of existing scripts. It's just easier to

RE: [PHP] How do I get ini_set('output_handler', '') to work?!

2006-10-30 Thread Daevid Vincent
Lynch [mailto:[EMAIL PROTECTED] Sent: Sunday, October 29, 2006 9:25 PM To: Daevid Vincent Cc: php-general@lists.php.net Subject: Re: [PHP] How do I get ini_set('output_handler', '') to work?! On Fri, October 27, 2006 3:46 pm, Daevid Vincent wrote: What am I doing wrong... In my

  1   2   3   4   5   6   7   8   >