[PHP] Zend Studio, phpMyAdmin, and mysql.sock

2006-07-13 Thread Dave M G
PHP List, I am trying out Zend Studio for editing and debugging my PHP scripts. When I first ran it, it kept giving me this error: Can't connect to local MySQL server through socket /tmp/mysql.sock After some research on the web, I found that this could be solved by editing /etc/mysql/my.conf

Re: [PHP] [totaly off t****]

2006-07-13 Thread Robert Cummings
On Thu, 2006-07-13 at 22:11, Ligaya Turmelle wrote: > Jay Blanchard wrote: > > [snip] > > ...stuff... > > [/snip] > > > > I think I can help, because I am the man. > > > And when you are tired of listening to the men yell about how great they > are... > > I, the WOMAN, will actually do it Yes!

Re: [PHP] [totaly off t****]

2006-07-13 Thread Ligaya Turmelle
Jay Blanchard wrote: [snip] ...stuff... [/snip] I think I can help, because I am the man. And when you are tired of listening to the men yell about how great they are... I, the WOMAN, will actually do it ;) -- life is a game... so have fun. -- PHP General Mailing List (http://www.php.ne

Re: [PHP] session_start/session_write_close creates multiple session cookie headers. How to fix this.

2006-07-13 Thread Chris
Mathijs wrote: Hello again, I Use session_write_close() so the page loads quicker because i use session on multiple place. This because session has protection for race conditions. Now it works very well and i don't have any problems at all. I only see that there are multiple session cookie he

[PHP] [SOLVED] Re: [PHP] ftp_put()'ing a string ...

2006-07-13 Thread Jochem Maas
I figured out how to ftp a string into a remote file using the ftp streams wrappers. the code looks as follows (I leave out the definition of the [error logging] callback PLFTPServerNotifier() the prototype requirements of which can be found in the manual): array('overwrite' => false))); strea

Re: [PHP] Scrubbing URL's

2006-07-13 Thread Chris
Paul Nowosielski wrote: Dear All, I have 150,000 + URLS I need to validate. When I say validate, I mean I would like to verify the URL opens up a web page that returns a '200' and not a '404'. I was thinking of first verifying the host has a DNS A record by using checkdnsrr(). Then using

[PHP] Re: Scrubbing URL's

2006-07-13 Thread Amit Arora
Hi, You can also do this using the following code: $fh = @fopen($url, "r"); if ($fh) { fclose($fh); } else { echo "URL ($url) doesn't exists"; } This does work for the HTTP code 200 and 400. I am not sure how it handles the redirects Code 302. Regards, Amit Arora www.digitalamit.co

Re: [PHP] GD to database directly

2006-07-13 Thread Kevin Waterson
This one time, at band camp, "Richard Lynch" <[EMAIL PROTECTED]> wrote: > If you've benchmarked on YOUR hardware and have a proven savings, > fine, post your tests and output. Already done in previous threads. nowhere do I say the db is faster than file system. Just that various methods of db

Re: [PHP] Functions

2006-07-13 Thread Amit Arora
Hi, You might wanna try something like this: function cleaner($var) { $var = trim($var); $var = strip_tags($var); $var = ucfirst($var); $var = addslashes($var); // This line is not required $var = str_replace ("$","",$var); return ($var) } And to actually use this functi

Re: [PHP] Language Translation (spanish->english) PHP

2006-07-13 Thread Satyam
It is not a matter of an API, automated translations don't work except for very restricted environments. Some software companies are trying to provide their knowledge base in multiple languages and I admit the results don't stink, but they are far from being a decent translation. It is favored

[PHP] Re: url obfuscation

2006-07-13 Thread Jon Drukman
Dan McCullough wrote: For me it doesnt matter I dont want Google in the section that I'm obfuscation. use nonsequential ids (as you do) and a robots.txt file to stop google (and any search engine that obeys robots.txt) http://www.robotstxt.org/wc/exclusion.html also google has a thing called

Re: [PHP] Separation between View and State (The Back Button)

2006-07-13 Thread Richard Lynch
That will work fine. The other suggestion half-remembered by a previous poster is to do a header("Location: ") after you process the post, so that their "Back" button doesn't take them through the POST again. However, a user who is intentionally playing with the submit, forward, and back buttons

Re: [PHP] Searching and storing results index in cookies or session variables

2006-07-13 Thread Brian Anderson
Hey, I figured I was making a nightmare goulash out of it, but with limited knowledge and few examples I could find, it is what I came up with, back in yonder times. Probably why I am questioning it's viability now. I understand offset and limit in SQL. Perhaps, like this example

Re: [PHP] url obfuscation

2006-07-13 Thread Dan McCullough
For me it doesnt matter I dont want Google in the section that I'm obfuscation. On 7/13/06, Richard Lynch <[EMAIL PROTECTED]> wrote: On Fri, July 7, 2006 10:56 pm, Anas Mughal wrote: > My URLs are constant. They are not changing. > All my dynamic pages are indexed nicely on Google. > > I agree t

Re: [PHP] Separation between View and State (The Back Button)

2006-07-13 Thread Paul Novitski
At 11:27 AM 7/13/2006, Michael B Allen wrote: Let's say you have a "Buy" button that posts a form to a script that inserts or increments the quantity of a record in a shopping cart table. So you click "Buy" and then "Checkout". Now if you hit the Back button it asks the user if they would like to

[PHP] Language Translation (spanish->english) PHP

2006-07-13 Thread Russell Jones
Anyone know of an API (soap, xml-rpc, rest, anything) for PHP that assists with language translation? Thanks Russ

RE: [PHP] How do I prevent a session from rebuilding itself?

2006-07-13 Thread Richard Lynch
On Wed, July 12, 2006 6:20 pm, Daevid Vincent wrote: >> Sequence of events: >> script starts >> you rm -rf /tmp/sess_* >> script writes out data >> script ends >> >> Exactly WHAT do you think "should" happen in this case?... > > I expect this to work like it USED TO WORK! Bug or not. > > I expect:

Re: [PHP] url obfuscation

2006-07-13 Thread Richard Lynch
On Fri, July 7, 2006 10:56 pm, Anas Mughal wrote: > My URLs are constant. They are not changing. > All my dynamic pages are indexed nicely on Google. > > I agree that a computerized screen scrapper could still screen scrap > most of > my site. However, a simple script that attempts to bump up the >

RE: [PHP] Randomly rotate image on page load? File under: Image Manipulation

2006-07-13 Thread Richard Lynch
On Mon, July 10, 2006 4:48 pm, tedd wrote: > At 1:52 PM -0500 7/10/06, Jay Blanchard wrote: >>For sure. "Photo Slideshow" or just "Slideshow" makes the most sense >> to >>me. >>[/snip] >> >>While we are splitting hairs, slideshow would only be applicable if >> the >>images continued to change witho

Re: [PHP] combine implode() and array_keys() to get a string of key names

2006-07-13 Thread Richard Lynch
On Mon, July 10, 2006 2:14 am, Larry Garfield wrote: > It is slightly more complicated than that, since if the value is > numeric and > going into a numeric field, then it's not supposed to be quoted. > (MySQL > generally doesn't care, but some other databases may; I'm not > certain.) AFAIK, MySQL

Re: [PHP] GD to database directly

2006-07-13 Thread Richard Lynch
On Thu, July 13, 2006 1:25 pm, Kevin Waterson wrote: > This one time, at band camp, "Richard Lynch" <[EMAIL PROTECTED]> wrote: > > >> It's coming FROM THE FILE SYSTEM. > > databases can be stored on RAW partitions, thus eliminating FILE > SYSTEM > overhead And are you actually doing this, or merel

Re: [PHP] GD to database directly

2006-07-13 Thread Richard Lynch
On Tue, July 11, 2006 11:38 am, Eric Butera wrote: > I don't see a problem with storing images in the DB IF they aren't > going to be continually accessed that way. For example say you have a > script that lets a user upload an image and creates a small, medium, > and large view out of it. Stick

Re: [PHP] Separation between View and State (The Back Button)

2006-07-13 Thread Michael B Allen
On Thu, 13 Jul 2006 14:41:21 -0400 Jim Moseby <[EMAIL PROTECTED]> wrote: > > > > Let's say you have a "Buy" button that posts a form to a script that > > inserts or increments the quantity of a record in a shopping cart > > table. So you click "Buy" and then "Checkout". Now if you hit the Back >

Re: [PHP] Proper configuration of safe mode

2006-07-13 Thread Richard Lynch
On Wed, July 12, 2006 4:18 pm, mbneto wrote: > What is wrong with my openbase_dir setting? (yes I've already read the > manual - http://www.php.net/manual/en/features.safe-mode.php - before > posting my first message). > > Since safe mode will be deprecated what is (will be) the alternative? The t

Re: [PHP] Separation between View and State (The Back Button)

2006-07-13 Thread Jochem Maas
Michael B Allen wrote: > Let's say you have a "Buy" button that posts a form to a script that > inserts or increments the quantity of a record in a shopping cart > table. So you click "Buy" and then "Checkout". Now if you hit the Back > button it asks the user if they would like to repost the form.

Re: [PHP] Searching and storing results index in cookies or session variables

2006-07-13 Thread Richard Lynch
On Wed, July 12, 2006 3:40 pm, Brian Anderson wrote: > I have a question about how I am searching through a products > database. > What I am wanting to do is store the result set so that I can provide > a > link to go back to previous searches quickly, and also manipulate it > quickly. If I had a f

Re: [PHP] When is a global not a global?

2006-07-13 Thread Richard Lynch
On Wed, July 12, 2006 5:52 pm, Nick Wilson wrote: > After upgrading a CMS, im having a problem with global variables not > showing up anymore -- configs and things could have changed, but > search > as i have, i cannot find anything to help me work out what the problem > is. > > This should work of

RE: [PHP] Separation between View and State (The Back Button)

2006-07-13 Thread Jim Moseby
> > Let's say you have a "Buy" button that posts a form to a script that > inserts or increments the quantity of a record in a shopping cart > table. So you click "Buy" and then "Checkout". Now if you hit the Back > button it asks the user if they would like to repost the form. If you > click "Ok"

Re: [PHP] What is you IP ?

2006-07-13 Thread Richard Lynch
On Wed, July 12, 2006 8:29 pm, Roger Thomas wrote: > I want to filter IP addresses. I noticed that my script catches IP > addresses that looks like they came from the internal LAN, ie > 192.x.x.x and 10.x.x.x > > My script catched those IPs by $_SERVER['REMOTE_ADDR']. Am I not being > able to catch

Re: [PHP] [totaly off t****]

2006-07-13 Thread Jochem Maas
Jay Blanchard wrote: > [snip] > ...stuff... > [/snip] > > I think I can help, because I am the man. > lol. today was a good day :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Separation between View and State (The Back Button)

2006-07-13 Thread Michael B Allen
Let's say you have a "Buy" button that posts a form to a script that inserts or increments the quantity of a record in a shopping cart table. So you click "Buy" and then "Checkout". Now if you hit the Back button it asks the user if they would like to repost the form. If you click "Ok" the db scrip

Re: [PHP] GD to database directly

2006-07-13 Thread Kevin Waterson
This one time, at band camp, "Richard Lynch" <[EMAIL PROTECTED]> wrote: > You really need to TEST your assumption about the DB being faster. Do you _really_ think I am speaking without testing any of this?? I once wrote an article on this very topic in PHP mag and published the benchmarks. Kev

RE: [PHP] [totaly off t****]

2006-07-13 Thread Jay Blanchard
[snip] ...stuff... [/snip] I think I can help, because I am the man. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] GD to database directly

2006-07-13 Thread Kevin Waterson
This one time, at band camp, "Richard Lynch" <[EMAIL PROTECTED]> wrote: > It's coming FROM THE FILE SYSTEM. databases can be stored on RAW partitions, thus eliminating FILE SYSTEM overhead Kevin -- "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed

Re: [PHP] [totaly off t****]

2006-07-13 Thread tedd
At 4:05 PM +0200 7/13/06, Jochem Maas wrote: >tedd wrote: > > but for Stut being "The Man" I would support that claim. > > >but that leaves so little room for the 'Other Men' - and could turn >into a pissing match (you know how John Nichel likes a good pissing match :-P) Jochem: Two things: 1.

[PHP] [RESOLUTION] -- Spreadsheet Excel Writer

2006-07-13 Thread Jef Sullivan
Yesterday I wrote a request for some help with setting the column width when exporting a php generated page to Excel. After further research I was able to find setColumn(). There were some that asked what I was able to come up with when using this feature since the documentation is incomplete.

Re: [PHP] Silly varible question

2006-07-13 Thread Jochem Maas
Ed Curtis wrote: > ... > > Thanks for all the help guys. I now have a better understanding of multi > dimensional arrays and can use it for what I'm trying to accomplish. This as Mary Poppins said 'php arrays are scrumptious'. > list is the greatest!! yeah we rule (the land of goblins, fair

[PHP] Re: Upload a big file.

2006-07-13 Thread Jo�o C�ndido de Souza Neto
Ok guys. Thanks a lot by your tips. I´ll try and give you an answer. ""João Cândido de Souza Neto"" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > Hello gang. > > I´ve got a e-commerce system where one can import data from his management > system. > > This importation fi

[PHP] [totaly off t****] Re: [PHP] Debugging Log

2006-07-13 Thread Jochem Maas
tedd wrote: > At 6:19 PM -0400 7/12/06, Michael B Allen wrote: >> On Wed, 12 Jul 2006 22:44:23 +0100 >> Stut <[EMAIL PROTECTED]> wrote: >> >>> Michael B Allen wrote: Thanks for the tip dipshit. >>> Maybe I'm in a sensitive mood, but that was uncalled for. Michael, meet >>> /dev/null, I hope yo

Re: [PHP] Upload a big file.

2006-07-13 Thread Jochem Maas
João Cândido de Souza Neto wrote: > Hello gang. > > I´ve got a e-commerce system where one can import data from his management > system. > > This importation files sometimes has a size about 8Mb. Unfortunatly, when > one try to put this file into e-commerce, generaly one gets any error > becau

RE: [PHP] Upload a big file.

2006-07-13 Thread Jay Blanchard
[snip] > First of all, use set_time_limit(0) in your script, which gives an unlimited execution time. Then amend the max files size limit in php.ini, or locally. [/snip] You will likely have to do the same thing in Apache (or whatever your web server software is) as there will be a time-out built

RE: [PHP] Silly varible question

2006-07-13 Thread Ed Curtis
> Just make $item a 2-dimensional array, with the first diemnsion addressed by > $count; so: > > $item[$count][] = $_POST['phone']; > $item[$count][] = $_POST['category']; > $item[$count][] = $_POST['copy']; > $item[$count][] = $_POST['pic_style']; > $item[$count][] = $cost; > $item[

RE: [PHP] Silly varible question

2006-07-13 Thread Ford, Mike
On 13 July 2006 13:53, Ed Curtis wrote: > I know this is probably simple as all get out but it's early and I > can't find an answer anywhere after searching for a while > > > I need to assign a number to a variable and then use that variable > in a session to store an array. It's for a sho

Re: [PHP] Upload a big file.

2006-07-13 Thread Dave Goodchild
On 13/07/06, João Cândido de Souza Neto <[EMAIL PROTECTED]> wrote: Hello gang. I´ve got a e-commerce system where one can import data from his management system. This importation files sometimes has a size about 8Mb. Unfortunatly, when one try to put this file into e-commerce, generaly one get

Re: [PHP] How do I prevent a session from rebuilding itself?

2006-07-13 Thread tedd
At 11:58 AM +0100 7/13/06, Andrew Brampton wrote: >If anyone reads DailyWTF, then you might remember this post: >http://thedailywtf.com/forums/thread/78892.aspx >Explaining the dangers of "rm -rf /tmp" > >I'm sure you won't fall victim to this, but it is a fun read :) > >Andrew Fun read. But the t

[PHP] Upload a big file.

2006-07-13 Thread Jo�o C�ndido de Souza Neto
Hello gang. I´ve got a e-commerce system where one can import data from his management system. This importation files sometimes has a size about 8Mb. Unfortunatly, when one try to put this file into e-commerce, generaly one gets any error because your connection speed is very slow and can´t

Re: [PHP] Silly varible question

2006-07-13 Thread Dave Goodchild
On 13/07/06, Ed Curtis <[EMAIL PROTECTED]> wrote: I know this is probably simple as all get out but it's early and I can't find an answer anywhere after searching for a while I need to assign a number to a variable and then use that variable in a session to store an array. It's for a shop

Re: [PHP] Debugging Log

2006-07-13 Thread tedd
At 6:19 PM -0400 7/12/06, Michael B Allen wrote: >On Wed, 12 Jul 2006 22:44:23 +0100 >Stut <[EMAIL PROTECTED]> wrote: > >> Michael B Allen wrote: >> > Thanks for the tip dipshit. >> >> Maybe I'm in a sensitive mood, but that was uncalled for. Michael, meet >> /dev/null, I hope you live happily ever

Re: [PHP] Silly varible question

2006-07-13 Thread Jochem Maas
Brad Bonkoski wrote: > Why not just have another array... > > $bag = array(); > $item[] > > array_push($bag, $item); > > then store the bag in the session. > so, you would have count($bag) items in your shopping cart, and you > would be able to easily access them. > Just a thought, instead

Re: [PHP] Silly varible question

2006-07-13 Thread Brad Bonkoski
Why not just have another array... $bag = array(); $item[] array_push($bag, $item); then store the bag in the session. so, you would have count($bag) items in your shopping cart, and you would be able to easily access them. Just a thought, instead of munging variable names. -B Ed Curti

[PHP] Silly varible question

2006-07-13 Thread Ed Curtis
I know this is probably simple as all get out but it's early and I can't find an answer anywhere after searching for a while I need to assign a number to a variable and then use that variable in a session to store an array. It's for a shopping cart system I'm building. What I've got is:

Re: [PHP] When is a global not a global?

2006-07-13 Thread Nick Wilson
* and then Robert Cummings declared > On Wed, 2006-07-12 at 18:52, Nick Wilson wrote: > > hi all, > > > > After upgrading a CMS, im having a problem with global variables not > > showing up anymore -- configs and things could have changed, but search > > as i have, i cannot find anything to

Re: [PHP] How do I prevent a session from rebuilding itself?

2006-07-13 Thread Andrew Brampton
If anyone reads DailyWTF, then you might remember this post: http://thedailywtf.com/forums/thread/78892.aspx Explaining the dangers of "rm -rf /tmp" I'm sure you won't fall victim to this, but it is a fun read :) Andrew - Original Message - From: "Daevid Vincent" <[EMAIL PROTECTED]> T

[PHP] session_start/session_write_close creates multiple session cookie headers. How to fix this.

2006-07-13 Thread Mathijs
Hello again, I Use session_write_close() so the page loads quicker because i use session on multiple place. This because session has protection for race conditions. Now it works very well and i don't have any problems at all. I only see that there are multiple session cookie headers set. I Pers

Re: [PHP] Searching and storing results index in cookies or session variables

2006-07-13 Thread Shafiq Rehman
Hello Brian, Storing the result set in session or cookie is not a good idea. You can implement some caching mechanism in your search results. I implemented this in my project and it works simply great. Its very simple, You have to write two functions 1- writeCache($id, $data, $ttl) This routine

Re: [PHP] Language Translation and PHP...

2006-07-13 Thread Sameer N Ingole
tedd wrote: At 2:09 PM -0400 7/12/06, Russell Jones wrote: Anyone know of any language translation APIs or anything of that sort out there? Looking to translate quite a bit of content and would rather not do it by hand. I'm not sure as to what you want, but perhaps this might help: ht

RE: [PHP] How do I prevent a session from rebuilding itself?

2006-07-13 Thread Ford, Mike
On 13 July 2006 00:20, Daevid Vincent wrote: > > Sequence of events: > > script starts > > you rm -rf /tmp/sess_* > > script writes out data > > script ends > > > > Exactly WHAT do you think "should" happen in this case?... > > I expect this to work like it USED TO WORK! Bug or not. > > I expec