php-general Digest 18 Jun 2008 07:35:20 -0000 Issue 5520

2008-06-18 Thread php-general-digest-help
php-general Digest 18 Jun 2008 07:35:20 - Issue 5520 Topics (messages 275493 through 275509): Re: mkdir() Cannot Create Directories 275493 by: Daniel Brown 275494 by: David Giragosian 275495 by: Wei, Alice J. 275496 by: Nitsan Bin-Nun CAD file decoding

php-general Digest 18 Jun 2008 20:35:30 -0000 Issue 5521

2008-06-18 Thread php-general-digest-help
php-general Digest 18 Jun 2008 20:35:30 - Issue 5521 Topics (messages 275510 through 275537): Re: substr? 275510 by: Frank Arensmeier 275515 by: Peter Ford 275523 by: Jim Lucas phpinfo shows wrong value of post_max_size 275511 by: Yi Wang 275513 by:

Re: [PHP] Re: Search like php.net's URL thingy

2008-06-18 Thread Iv Ray
Ryan S wrote: Thanks for replying m8, but if you check the rest of the thread you will see this has alraedy been solved and the result is http://ezee.se/ezeeurl.php?do=1 Cheers! Ryan How do you protect this thing from being spammed? I do not know why somebody would spam it, but I have had

Re: [PHP] substr?

2008-06-18 Thread Frank Arensmeier
17 jun 2008 kl. 22.14 skrev Jim Lucas: Jason Pruim wrote: Hi everyone, I am attempting to adopt some code to work more reliably then how it is now... What I am doing is coding a upload form where people could be uploading .zip files in excess of 200 MB... Yes I know that is large, but

[PHP] phpinfo shows wrong value of post_max_size

2008-06-18 Thread Yi Wang
Hi, These day I'm working around large file uploading. php runs on the windows server 2003. I changed the post_max_size value in the registry. Then phpinfo reports the value changed from 8M to 200M (local value. Master value stayed still 8M.). I think phpinfo should report that value as 8M, not

Re: [PHP] Re: Search like php.net's URL thingy

2008-06-18 Thread Philip Olson
Why is an ErrorDocument insufficient or not the elegant way? It accomplishes the goal in a clean way, no? It's *WRONG*. ErrorDocument still preserves the 404 error code, it just gives it a prettier face. If the page really is there, returning a 404 for it is not correct. Search engines

Re: [PHP] phpinfo shows wrong value of post_max_size

2008-06-18 Thread Pavel
В сообщении от Wednesday 18 June 2008 14:25:35 Yi Wang написал(а): Hi, These day I'm working around large file uploading. php runs on the windows server 2003. I changed the post_max_size value in the registry. Then phpinfo reports the value changed from 8M to 200M (local value. Master value

Re: [PHP] CAD file decoding

2008-06-18 Thread Iv Ray
Lester Caine wrote: Has anybody seen any software that could be used with PHP to extract the preview pictures from CAD files such as DXF and the like. I'm looking to keep thumbnails of the drawings in much the same was as we generate thumbnails of images. So I can display a list of previews

Re: [PHP] substr?

2008-06-18 Thread Peter Ford
Frank Arensmeier wrote: 17 jun 2008 kl. 22.14 skrev Jim Lucas: Jason Pruim wrote: Hi everyone, I am attempting to adopt some code to work more reliably then how it is now... What I am doing is coding a upload form where people could be uploading .zip files in excess of 200 MB... Yes I know

[PHP] climb up the path

2008-06-18 Thread Iv Ray
hi all, i need a way to get the path to the parent folder of the folder i am in. one dirty way i found is this - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . .. . DIRECTORY_SEPARATOR . config.php); i can also explode() and reassemble all

Re: [PHP] climb up the path

2008-06-18 Thread James Dempster
Personally I use. ?php require_once(dirname(dirname(__FILE__)).'/config.php'); I think it's what most people do. /James Dempster On Wed, Jun 18, 2008 at 1:31 PM, Iv Ray [EMAIL PROTECTED] wrote: hi all, i need a way to get the path to the parent folder of the folder i am in. one dirty way

Re: [PHP] climb up the path

2008-06-18 Thread Iv Ray
James Dempster wrote: Personally I use. ?php require_once(dirname(dirname(__FILE__)).'/config.php'); I think it's what most people do. A... very interesting, thanks. To get the path only I did this - $path = dirname(__FILE__); $parts= explode(DIRECTORY_SEPARATOR, $path);

Re: [PHP] climb up the path

2008-06-18 Thread Stut
On 18 Jun 2008, at 13:57, Iv Ray wrote: James Dempster wrote: Personally I use. ?php require_once(dirname(dirname(__FILE__)).'/config.php'); I think it's what most people do. A... very interesting, thanks. To get the path only I did this - $path = dirname(__FILE__); $parts

Re: [PHP] conversion of unicode characters into utf-8

2008-06-18 Thread tedd
At 10:26 PM -0700 6/16/08, valsaraj wrote: Hi, I am using code $val = htmlentities($val, ENT_QUOTES, UTF-8); but it's not working in version 5.2.0. Is there any additional configuration needed for this. it's working well in 5.2.2. Could you please help me??? -- Here's a good article on the

Re: [PHP] Re: How to prevent DoS on PHP script?

2008-06-18 Thread Philip Thompson
On Jun 17, 2008, at 9:22 AM, Michelle Konzack wrote: Am 2008-06-16 12:02:27, schrieb Per Jessen: Check client IP-addresses? And then? I am DoS'ed from several 1000 IPs and since legitim uploaders are mostly on dynamic IPs I can not block by IP. OK, last Saturday I have installed a

Re: [PHP] substr?

2008-06-18 Thread Jim Lucas
Peter Ford wrote: Frank Arensmeier wrote: 17 jun 2008 kl. 22.14 skrev Jim Lucas: Jason Pruim wrote: Hi everyone, I am attempting to adopt some code to work more reliably then how it is now... What I am doing is coding a upload form where people could be uploading .zip files in excess of

Re: [PHP] climb up the path

2008-06-18 Thread Jim Lucas
Stut wrote: On 18 Jun 2008, at 13:57, Iv Ray wrote: James Dempster wrote: Personally I use. ?php require_once(dirname(dirname(__FILE__)).'/config.php'); I think it's what most people do. A... very interesting, thanks. To get the path only I did this - $path = dirname(__FILE__);

[PHP] Re: How to prevent DoS on PHP script?

2008-06-18 Thread Michelle Konzack
Hello Nitsan and Andrew, Am 2008-06-16 13:20:14, schrieb Andrew Ballard: On Mon, Jun 16, 2008 at 1:01 PM, Nitsan Bin-Nun [EMAIL PROTECTED] wrote: I think you can handle this with 2 pages, the first is checking whether the user is permitted to upload or not and if so passing him to the upload

[PHP] Re: How to prevent DoS on PHP script?

2008-06-18 Thread Michelle Konzack
Am 2008-06-16 19:24:25, schrieb Wolf: There's a number of things you can try, depending on what EXACTLY they are doing. If they are uploading things to your server which they then reference, it is a simple apache configuration that you could do. For instance, you can upload fine to my

[PHP] Re: Strategy to protect images

2008-06-18 Thread Michelle Konzack
Am 2008-06-15 14:07:14, schrieb tedd: At 4:11 PM +0100 6/15/08, Richard Heyes wrote: But, a sophisticated user will find a way around that. A less sophisticated one will use the PrintScr key... :-) Must be a windozes thing. :-) It works on ny Debian GNU/Linux Sarge with Fvwm too. [

[PHP] Re: Boa Webserver and PHP5

2008-06-18 Thread Michelle Konzack
Am 2008-06-16 10:05:00, schrieb Daniel Brown: On Sat, Jun 14, 2008 at 11:12 AM, Michelle Konzack [EMAIL PROTECTED] wrote: * Do not Cc: me, because I READ THIS LIST, if I write here * *Keine Cc: am

Re: [PHP] Re: Search like php.net's URL thingy

2008-06-18 Thread Nate Tallman
On Tue, Jun 17, 2008 at 3:22 PM, Jon Drukman [EMAIL PROTECTED] wrote: Nate Tallman wrote: Why is an ErrorDocument insufficient or not the elegant way? It accomplishes the goal in a clean way, no? It's *WRONG*. ErrorDocument still preserves the 404 error code, it just gives it a prettier

Re: [PHP] climb up the path

2008-06-18 Thread Iv Ray
Stut wrote: $path = dirname(dirname(__FILE__)); That will get you the parent directory. -Stut A,... right! - me and my limited thinking... - dirname() gives the parent of a file AND of a directory, right. Thanks, Iv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] climb up the path

2008-06-18 Thread Iv Ray
Jim Lucas wrote: Iv, tell me why you are wanting to do this? If it is the reason I think it is, I can give you a better way to accomplish this. I have the source and a configuration file, which I want outside the source - it is different from server to server. The easiest is to have the

Re: [PHP] Re: How to prevent DoS on PHP script?

2008-06-18 Thread Jim Lucas
Michelle Konzack wrote: Hello Nitsan and Andrew, Am 2008-06-16 13:20:14, schrieb Andrew Ballard: On Mon, Jun 16, 2008 at 1:01 PM, Nitsan Bin-Nun [EMAIL PROTECTED] wrote: I think you can handle this with 2 pages, the first is checking whether the user is permitted to upload or not and if so

Re: [PHP] Re: How to prevent DoS on PHP script?

2008-06-18 Thread Daniel Brown
On Wed, Jun 18, 2008 at 1:00 PM, Jim Lucas [EMAIL PROTECTED] wrote: That is fine, but I can upload a file to any php script. I don't need to use your form to do so, I an just use my own form and post data directly to the script. If anybody remembers, this was an exploit that was found in

Re: [PHP] climb up the path

2008-06-18 Thread Jim Lucas
Iv Ray wrote: Jim Lucas wrote: Iv, tell me why you are wanting to do this? If it is the reason I think it is, I can give you a better way to accomplish this. I have the source and a configuration file, which I want outside the source - it is different from server to server. The easiest

Re: [PHP] climb up the path

2008-06-18 Thread Richard Heyes
i need a way to get the path to the parent folder of the folder i am in. one dirty way i found is this - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . .. . DIRECTORY_SEPARATOR . config.php); i can also explode() and reassemble all folders

Re: [PHP] Re: Search like php.net's URL thingy

2008-06-18 Thread Jon Drukman
On Wed, Jun 18, 2008 at 9:19 AM, Nate Tallman [EMAIL PROTECTED] wrote: Not to beat a dead horse, but why would you *not* want to preserve the 404? If it's a bad url anyways, you probably *want* to return a 404 (albeit prettier) and you probably *don't* want search engines indexing it. the

Re: [PHP] CAD file decoding

2008-06-18 Thread Lester Caine
Iv Ray wrote: Lester Caine wrote: Has anybody seen any software that could be used with PHP to extract the preview pictures from CAD files such as DXF and the like. I'm looking to keep thumbnails of the drawings in much the same was as we generate thumbnails of images. So I can display a

RE: [PHP] Re: Boa Webserver and PHP5

2008-06-18 Thread Wolf
Nope, i'm running PHP on my machines just fine and there are no issues. This is a user configuration issue. First: add the lines to apache Second: restart apache Third: empty the browser cache Fourth: reload the web page Then post back what happens. Top posting from my Q otherwise I'd have

[PHP] losing mysql connection during cron job

2008-06-18 Thread Paul Novitski
I've got a simple script running as a cron job that's getting intermittent Lost connection to MySQL server during query errors. The script sends out listserve messages, 50 BCCs each minute, sleep()ing for 60 seconds between sends and updating a data table after each send. The whole BCC list

[PHP] Exporting to Excel

2008-06-18 Thread Dan Shirah
Hello all, I am trying to query an INFORMIX database, and then take the results and export them into a CSV or Excel file. I saw TONS of examples on how to do this using MySQL and tried to adpt them for ifx, but I can't get the darn thing working. My code below sets variables for values passed

Re: [PHP] Exporting to Excel

2008-06-18 Thread Daniel Brown
On Wed, Jun 18, 2008 at 5:53 PM, Dan Shirah [EMAIL PROTECTED] wrote: Hello all, [snip!] Well, when I execute the page I get the popup to save/open the output as an Excel file. When I open it, instead of getting data, it returns an error message of: PHP Warning: Wrong parameter count for

Re: [PHP] Exporting to Excel

2008-06-18 Thread Dan Shirah
Come on, Shirah. GOYA and RTFM! ;-P http://php.net/ifx_fieldtypes Drop the $i parameter below: [snip!] $query = ifx_query ($sql, $connect_id); [snip!] $head[] = ifx_fieldtypes($query, $i); [snip!] Son of a Bisquick! I'll chalk that up to looking at the Manual for like

Re: [PHP] Re: Search like php.net's URL thingy

2008-06-18 Thread Ryan S
clip Thanks for replying m8, but if you check the rest of the thread you will see this has alraedy been solved and the result is http://ezee.se/ezeeurl.php?do=1 Cheers! Ryan How do you protect this thing from being spammed? I do not know why somebody would spam it, but I have had all

[PHP] mail problem (newlines becomes =0A)

2008-06-18 Thread debussy007
Hi, When a member register in my site, I send him a mail with activation link. This is the string I send: $mailContent = Thank you for your interest in XYZ !\n\n . In order to activate your account, please click the link below.\n\n . (If the link . I tested on my gmail address,

Re: [PHP] Re: Search like php.net's URL thingy

2008-06-18 Thread Stut
On 18 Jun 2008, at 23:40, Ryan S wrote: clip Thanks for replying m8, but if you check the rest of the thread you will see this has alraedy been solved and the result is http://ezee.se/ezeeurl.php?do=1 Cheers! Ryan How do you protect this thing from being spammed? I do not know why

Re: [PHP] mail problem (newlines becomes =0A)

2008-06-18 Thread Wolf
debussy007 wrote: Hi, When a member register in my site, I send him a mail with activation link. This is the string I send: $mailContent = Thank you for your interest in XYZ !\n\n . In order to activate your account, please click the link below.\n\n . (If the link . I tested

Re: [PHP] mail problem (newlines becomes =0A)

2008-06-18 Thread Daniel Brown
On Wed, Jun 18, 2008 at 7:14 PM, Wolf [EMAIL PROTECTED] wrote: Change it to: $mailContent = Thank you for your interest in XYZ! In order to activate your account, please click the link below. (If the link . ; I've always used this and never had a problem with it. If you want to

[PHP] Adding a page with FPDF

2008-06-18 Thread Brian Dunning
Anyone use FPDF? I'm trying to create a new document in memory, starting with a template document - I'm going to add some stuff to it. The template document might be any size and dimensions. Here is the code I'm using, and my problem is that the resulting document is always an 8.5x11

Re: [PHP] Online Job Available

2008-06-18 Thread Brian Dunning
Yes, I'm sure it's legit, thus your obviously real 2 names and 3 email addresses. :-) On Jun 18, 2008, at 7:33 AM, Brock Diegel wrote: Hi, Our online market research organization starts recruiting self- motivated and reliable individuals willing to take part in well-paying research

Re: [PHP] losing mysql connection during cron job

2008-06-18 Thread Shiplu
The script cycle is, symbolically: foreach (recipients as batch) { mail() using batch of recipients; mysql_query() update table; sleep(60); } final mysql_query() update table as complete; why don't you edit your

[PHP] GD - Print Animated GIF

2008-06-18 Thread Stephen Pynenburg
Hey All, I'm new to the list, but hopefully it's a nice one :) Anyway, my problem is fairly straightforward, but there doesn't seem to be anything on it anywhere. When I read an animated GIF with imagecreatefromgif(), then print it out with imagegif(), the result is just the first frame of the

Re: [PHP] Adding a page with FPDF

2008-06-18 Thread Ray Hauge
Brian Dunning wrote: Anyone use FPDF? I'm trying to create a new document in memory, starting with a template document - I'm going to add some stuff to it. The template document might be any size and dimensions. Here is the code I'm using, and my problem is that the resulting document is

[PHP] Setting session to not expire

2008-06-18 Thread Skip Evans
Hey, I'm reading up about the session functions looking for the proper way to set a session to never expire, but I'm a little confused. is calling session_cache_limiter('private_no_expire'); ...before before session_start() the proper way to set a session to never expire? Or least until

[PHP] Capitalization of variable

2008-06-18 Thread Ron Piggott
How do I make the first letter of a variable be a capital? I am using this with names. If the user types ron I want to save it as Ron. Thanks for your help. Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Capitalization of variable

2008-06-18 Thread Bob
$var = RON; echo ucfirst(strtolower($var)); -Original Message- From: Ron Piggott Sent: 19 June 2008 13:41 To: PHP General Subject: [PHP] Capitalization of variable How do I make the first letter of a variable be a capital? I am using this with names. If the user types ron I want to

[PHP] Variables

2008-06-18 Thread Byron
Hi I was wondering if this is the correct way to reference a variable from a file that has been included inside of a function. Also just general static/global variable usage. For example: Myqsql_functions.php ?php require(config.php) function ach_mysqlCon() {

Re: [PHP] Capitalization of variable

2008-06-18 Thread Daniel Brown
On Wed, Jun 18, 2008 at 11:41 PM, Ron Piggott [EMAIL PROTECTED] wrote: How do I make the first letter of a variable be a capital? Press SHIFT on your keyboard. ;-P -- /Daniel P. Brown Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract!

Re: [PHP] Capitalization of variable

2008-06-18 Thread Ron Piggott
How would I do this for a street address? If the user gave me their address as 12 george street I would like the results to be 12 George Street. Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Variables

2008-06-18 Thread Robert Cummings
On Thu, 2008-06-19 at 15:54 +1200, Byron wrote: Hi I was wondering if this is the correct way to reference a variable from a file that has been included inside of a function. Also just general static/global variable usage. For example: Myqsql_functions.php ?php

Re: [PHP] Capitalization of variable

2008-06-18 Thread Dmitrii Varvashenia
2008/6/19 Ron Piggott [EMAIL PROTECTED]: How would I do this for a street address? If the user gave me their address as 12 george street I would like the results to be 12 George Street. For web I use CSS: text-transform:capitalize; -- WBR, Dmitrii +375 29 60-LINUX +375 29 40-LINUX icq:

Re: [PHP] Capitalization of variable

2008-06-18 Thread Daniel Kolbo
you could explode the string by the space, then use the ucword function walking through the array, then implode http://www.php.net/manual/en/function.explode.php http://www.php.net/manual/en/function.ucwords.php http://www.php.net/manual/en/function.array-walk.php

Re: [PHP] Capitalization of variable

2008-06-18 Thread Nathan Nobbe
On Wed, Jun 18, 2008 at 10:03 PM, Ron Piggott [EMAIL PROTECTED] wrote: How would I do this for a street address? If the user gave me their address as 12 george street I would like the results to be 12 George Street. ucwords(). had you gone to the manual, for ucfirst() from the first reply

[PHP] Case sensitive password

2008-06-18 Thread R.C.
I have coded a php page that accepts a password. What is the code to make sure the password entered is NOT case-sensitive? Thanks much R.C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Capitalization of variable

2008-06-18 Thread Nathan Nobbe
On Wed, Jun 18, 2008 at 10:32 PM, Daniel Kolbo [EMAIL PROTECTED] wrote: you could explode the string by the space, then use the ucword function walking through the array, then implode no, theres no need to use explode here. ucwords() operates over an entire string by itself. if however,

Re: [PHP] Case sensitive password

2008-06-18 Thread Chris
R.C. wrote: I have coded a php page that accepts a password. What is the code to make sure the password entered is NOT case-sensitive? Before you store the password, make it all lowercase (or uppercase, whatever you prefer). $password = strtolower($password); When you compare the passwords,

Re: [PHP] Case sensitive password

2008-06-18 Thread Nathan Nobbe
i hate posting the same answer to a given question thats already been posted, but i had this all typed in when chris submitted his answer, so here it is again.. On Wed, Jun 18, 2008 at 10:36 PM, R.C. [EMAIL PROTECTED] wrote: I have coded a php page that accepts a password. What is the code to

[PHP] Newbie Question: How to pass URL info to .php script ?

2008-06-18 Thread Ethan Whitt
Not sure how to achieve this. How can I grab a portion of a URl to send to a .php script in this fashion? www.test.com/article/3435 - Grab the 3435 to process in a script? Thanks in advance! Ethan

Re: [PHP] Newbie Question: How to pass URL info to .php script ?

2008-06-18 Thread Nathan Nobbe
On Wed, Jun 18, 2008 at 10:45 PM, Ethan Whitt [EMAIL PROTECTED] wrote: Not sure how to achieve this. How can I grab a portion of a URl to send to a .php script in this fashion? www.test.com/article/3435 - Grab the 3435 to process in a script? take a look at the $_SERVER superglobal

Re: [PHP] Case sensitive password

2008-06-18 Thread R.C.
Thank you for your reply. The password is not stored, actually, like in a databse. We're only dealing with one password. When the user inputs the password, he/she should be able to input either in lower or upper case or both abd they should have access to the protected file in this case. Is

Re: [PHP] Case sensitive password

2008-06-18 Thread Chris
R.C. wrote: Thank you for your reply. The password is not stored, actually, like in a databse. We're only dealing with one password. When the user inputs the password, he/she should be able to input either in lower or upper case or both abd they should have access to the protected file in

Re: [PHP] losing mysql connection during cron job

2008-06-18 Thread Paul Novitski
At 6/18/2008 04:49 PM, Shiplu wrote: why don't you edit your code? foreach (recipients as batch) { mail() using batch of recipients; mysql_query() update table; if(mysql_errno()==ERROR_CODE_YOU_GET){

Re: [PHP] losing mysql connection during cron job

2008-06-18 Thread Chris
Thanks for the suggestion. I am currently successfully working around this error by another method, although your suggestion is probably better. The reason I posted this problem, though, is that I want to understand *why* I'm getting the Lost connection to MySQL server during query error.