[PHP] NOTICE: Attachment Blocked

2005-02-11 Thread postmaster
The following message has been blocked because it contained a potential virus in an attachment. To: php-general@lists.php.net From:[EMAIL PROTECTED] Date:Sat, 12 Feb 2005 08:35:56 +0100 Subject: [PHP] Re: unknown If thi

[PHP] Minimalist permissions

2005-02-11 Thread Ugo Bellavance
Hi, Please forgive me if this specific question has already been addressed, but I'm doing tests to figure out what are the minimal permissions I can give on my files and folders for a PHP application and I just can't find it (even by searching this list). Feel free to redirect me to existi

Re: [PHP] LibMcrypt and Mcrypt and Mhash - OH MY!

2005-02-11 Thread Jeffery Fernandez
Steven Altsman wrote: I’ve beaten my head against the desk repeatedly, RTFM’ing until my eyes are sore, the boss is still at my back.. and I’m completely lost. I’d love to grok intricacies of compiling C code and setting environment variables.. but I am dead once February 15^th rolls around and

[PHP] LibMcrypt and Mcrypt and Mhash - OH MY!

2005-02-11 Thread Steven Altsman
I’ve beaten my head against the desk repeatedly, RTFM’ing until my eyes are sore, the boss is still at my back.. and I’m completely lost.  I’d love to grok intricacies of compiling C code and setting environment variables.. but I am dead once February 15th rolls around and may have to find

Re: [PHP] quotemeta() question...

2005-02-11 Thread Jochem Maas
Jason Barnett wrote: Jochem Maas wrote: ... A better example code would be: $string = 'period.backslash\\plus+star*question?lbracket[rbracket]carat^lparen(rparen)dollar$'; echo "", quotemeta($string), ""; Interesting aside... with the test string above, I noticed that backslash\\ only resolved to

RE: [PHP] Convert a string to ASCII

2005-02-11 Thread Jesse Castro
> -Original Message- > From: Shaun [mailto:[EMAIL PROTECTED] > Sent: Friday, February 11, 2005 4:44 PM > To: php-general@lists.php.net > Subject: Re: [PHP] Convert a string to ASCII > > > > "Jay Blanchard" <[EMAIL PROTECTED]> wrote > in message > news:[EMAIL PROTECTED] > [snip] > Is

Re: [PHP] Convert a string to ASCII

2005-02-11 Thread Shaun
"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [snip] Is it possible to create an ascii representation of a string with php, i had a look on the site but with no luck :( [/snip] You mean like this? __ ^(picture of a s

[PHP] Re: PHP User Permissions

2005-02-11 Thread Ugo Bellavance
Matthew Walker wrote: And if you're running apache as root, you shouldn't be allowed to. Apache should always be run as as nonpriviledged user. On Fri, 2002-09-13 at 09:04, J Smith wrote: A running script cannot change its own permissions If you mean can't change it's user ID and/or group ID, that

Re: [PHP] How do you read one of these parameters?

2005-02-11 Thread Chris
[EMAIL PROTECTED] wrote: On 11 Feb 2005 Richard Lynch wrote: BAD: http://example.com/dynamic_pdf.php?record_id=1 GOOD: http://example.com/dynamic_pdf.php/record_id=1/fool_ie.pdf Just curious, how does IE screw up the first one? -- Tom IE has unique (read: non-standard) way of determining

RE: [PHP] Convert a string to ASCII

2005-02-11 Thread Jay Blanchard
[snip] Is it possible to create an ascii representation of a string with php, i had a look on the site but with no luck :( [/snip] You mean like this? __ ^(picture of a string, obvious).j/k Do you mean the ascii values for a string? Yes it is

[PHP] Convert a string to ASCII

2005-02-11 Thread Shaun
Hi, Is it possible to create an ascii representation of a string with php, i had a look on the site but with no luck :( Thanks for your advice -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: pdf properties

2005-02-11 Thread Stian Berger
On Thu, 10 Feb 2005 12:28:19 -0700, Jason Motes <[EMAIL PROTECTED]> wrote: Hello, Is there anyway to retrieve the properties from a pdf file using php? When you right click on a pdf file in windows you can see the title of the file and you can change this property there also. I wrote a php page

Re: [PHP] quotemeta() question...

2005-02-11 Thread Jason Barnett
Jochem Maas wrote: ... A better example code would be: $string = 'period.backslash\\plus+star*question?lbracket[rbracket]carat^lparen(rparen)dollar$'; echo "", quotemeta($string), ""; Interesting aside... with the test string above, I noticed that backslash\\ only resolved to two backslashes. I th

Re: [PHP] Uploading products in database using zip file?

2005-02-11 Thread afan
>>>Hi, >>>right now in my firm, to upload new products to web site, marketing >>> person >>>has to, in admin area, upload csv file (then php read content and store >>>info in DB), and then ftp all images in temp directory. And then, using >>>other php script, resize images and put them in product_

Re: [PHP] quotemeta() question...

2005-02-11 Thread Jochem Maas
Jason Barnett wrote: Richard Lynch wrote: Steve Kaufman wrote: Why does quotemeta("pat:1$WRW") return pat:1 instead of pat:1\$WRW What am I misunderstanding about quotemeta function? You usually would use quotemeta on data coming from the database, or the user, or extern

Re: [PHP] Uploading products in database using zip file?

2005-02-11 Thread Jason Barnett
[EMAIL PROTECTED] wrote: One more thing" marketing person use Windows and he will probably use Winzip. Is this still ok, or it's better to use some other application? First of all I would suggest using 7zip on Windows. Its usage is 100% free (you can of course donate to the project if you feel it

Re: [PHP] Checking the Version of mySql and settings on server

2005-02-11 Thread Marek Kilimajer
GH wrote: However, this does not tell you if they are using the Old or New Password on the newer version... how can i check that? On Fri, 11 Feb 2005 21:01:02 +0100, Marek Kilimajer <[EMAIL PROTECTED]> wrote: GH wrote: Is it possible to check via php what version of mysql is running and if it is a

Re: [PHP] Uploading products in database using zip file?

2005-02-11 Thread afan
One more thing" marketing person use Windows and he will probably use Winzip. Is this still ok, or it's better to use some other application? > Hi, > right now in my firm, to upload new products to web site, marketing person > has to, in admin area, upload csv file (then php read content and sto

Re: [PHP] How do you read one of these parameters?

2005-02-11 Thread Blake Schroeder
I may be looking at this problem from the wrong direction but if your form method is a post you will not see the parameters in the url, if your form method is a get you will. examples: example url: http://www.something.com/test.php example url: http://www.something.com/test.php?x=yes Sor

[PHP] Uploading products in database using zip file?

2005-02-11 Thread afan
Hi, right now in my firm, to upload new products to web site, marketing person has to, in admin area, upload csv file (then php read content and store info in DB), and then ftp all images in temp directory. And then, using other php script, resize images and put them in product_images directory. Wh

Re: AW: [PHP] export mysql to csv prob

2005-02-11 Thread Redmond Militante
they're on separate machines, this seems the fastest method, but i'm not sure if it's possible given my setup [Fri, Feb 11, 2005 at 09:48:18AM +] This one time, at band camp, Tom said: > If your mysql server has access (or can have access) to the directory > where you want to dump the file,

Re: [PHP] Checking the Version of mySql and settings on server

2005-02-11 Thread GH
However, this does not tell you if they are using the Old or New Password on the newer version... how can i check that? On Fri, 11 Feb 2005 21:01:02 +0100, Marek Kilimajer <[EMAIL PROTECTED]> wrote: > GH wrote: > > Is it possible to check via php what version of mysql is running and > > if it is

[PHP] Re: How can I read the output from a local php file [fopen()]?

2005-02-11 Thread Jason Barnett
Al wrote: ... But, but, it doesn't work when my script is started from a cronjob, only from a remote browser. Any suggestions? Thanks. cURL extension: http://www.php.net/manual/en/ref.curl.php -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc

[PHP] How can I read the output from a local php file [fopen()]?

2005-02-11 Thread Al
I have a script that needs to read the output, not the file itself, from a local php file using its absolute address. Normally I'd simply use $handle= fopen(http://www.whatever.com, 'rb') However, the webhost [Powweb] just changed their system to use "load balancing" servers. Now, my script mu

Re: [PHP] Checking the Version of mySql and settings on server

2005-02-11 Thread Marek Kilimajer
GH wrote: Is it possible to check via php what version of mysql is running and if it is a 4.1.x or better version to see if it is using the --old-password switch or not? I would like to know so that I can code both ways and just have a conditional statement direct which code is used... hmm, mysql,

[PHP] Checking the Version of mySql and settings on server

2005-02-11 Thread GH
Is it possible to check via php what version of mysql is running and if it is a 4.1.x or better version to see if it is using the --old-password switch or not? I would like to know so that I can code both ways and just have a conditional statement direct which code is used... Thanks -- PHP Gene

Re: [PHP] How do you read one of these parameters?

2005-02-11 Thread Robert Cummings
On Thu, 2005-02-10 at 19:28, Brian Dunning wrote: > I see URLs formatted like this: > >http://tinyurl.com/xyz > > How do you read that "xyz," since there's no "/?x=" preceding it? Is it > not a get parameter? It means the hosting webserver either does a URL rewrite for the receiver applicat

Re: [PHP] export mysql to csv prob

2005-02-11 Thread Redmond Militante
hi, this pear package is working beautifully, but so far i've only managed to generate .xls docs. are there any formatting commands that would allow me to generate just a tab delimited text file? thanks redmond [Fri, Feb 11, 2005 at 12:41:42AM +0100] This one time, at band camp, Mirco Blitz s

Re: [PHP] Secure system calls -- how

2005-02-11 Thread Niels
Hi, Richard Lynch wrote: > I suspect that people who looked into doing this fall into two categories: > > Those who heeded the experts who told them "Don't do that" and didn't do > it. > > Thoee who ignored the experts, went ahead and did it, and cobbled together > enough band-aid security measu

Re: [PHP] quotemeta() question...

2005-02-11 Thread Jason Barnett
Richard Lynch wrote: Steve Kaufman wrote: Why does quotemeta("pat:1$WRW") return pat:1 instead of pat:1\$WRW What am I misunderstanding about quotemeta function? You usually would use quotemeta on data coming from the database, or the user, or externally, or, errr, basic

Re: [PHP] Secure system calls -- how

2005-02-11 Thread Niels
Hi, Jason Wong wrote: > To put it simply you would have to check *extremely* carefully the user > input to ensure that it is not malicious, and that it is what it should > be. I believe your original problem was about writing procmail files. No, not exactly. Thank you just the same, you bring up

Re: [PHP] Re: imagettftext color problem

2005-02-11 Thread hitek
You are using imagecreate() with png, which creates an indexed color image. > $img=imagecreate($width, $height); Use Imagecreatetruecolor() instead. > > From: Anni Hienola <[EMAIL PROTECTED]> > Date: 2005/02/11 Fri AM 02:27:03 EST > To: php-general@lists.php.net > Subject: [PHP] Re: imagettftex

Re: [PHP] How do you read one of these parameters?

2005-02-11 Thread trlists
On 11 Feb 2005 Richard Lynch wrote: > BAD: http://example.com/dynamic_pdf.php?record_id=1 > GOOD: http://example.com/dynamic_pdf.php/record_id=1/fool_ie.pdf Just curious, how does IE screw up the first one? -- Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://

Re: [PHP] Creating a varable with a name held in a string

2005-02-11 Thread Richard Lynch
Ben Edwards wrote: > From the manual > > "For each key/value pair it will create a variable in the current symbol > table". > > What exactly is a simble table? Internally, PHP stores variables in an array. That array is sometimes referred to as a "symbol table" because each symbol (variable name)

Re: [PHP] Re: imagettftext color problem

2005-02-11 Thread Richard Lynch
Anni Hienola wrote: > > And to correct one mistake in the code that was kindly pointed out but is > here just a typo: > >> $bg=imagecolorallocate($img, 255, 255, 255); >> $font_color=imageallocatecolor($img, 0, 0, 0); > > Should be: > $bg=imagecolorallocate($img, 255, 255, 255); > $font_color=i

Re: AW: [PHP] export mysql to csv prob

2005-02-11 Thread Richard Lynch
> i have a script that exports the result of a mysql query to a csv file > suitable for downloading > > the code looks like > $result = mysql_query("select * from user,mjp1,mjp2,mjp3,mjp4"); > while($row = mysql_fetch_array($result)) { > $csv_output .= "$row[userid] $row[firstname] $row[lastname]\

Re: [PHP] How do you read one of these parameters?

2005-02-11 Thread M. Sokolewicz
or, you could use a 404-errorHandler, and have it parse the URL that caused it couldn't find ;) (that's what I use occasionally) Richard Lynch wrote: Brian Dunning wrote: I see URLs formatted like this: http://tinyurl.com/xyz How do you read that "xyz," since there's no "/?x=" preceding it? Is

Re: [PHP] avoiding user using back button-need to re-route

2005-02-11 Thread Angelo Zanetti
ok sorry, I dont get a chance to read the list a lot, can you send me the subject... TIA >>> "Richard Lynch" <[EMAIL PROTECTED]> 02/10/05 9:50 PM >>> Angelo Zanetti wrote: > I have a site, the user goes through a few pages inputting info and also > making various selections. On the last page they

Re: [PHP] Creating a varable with a name held in a string

2005-02-11 Thread Jason Barnett
Ben Edwards wrote: ... What exactly is a simble table? Ben The symbol table is the where, deep down inside the guts of the Zend Engine, your variables are stored. There are symbol tables for different scopes (function, class, global) -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/s

Re: [PHP] Creating a varable with a name held in a string

2005-02-11 Thread Richard Lynch
Ben Edwards (lists) wrote: > I have the following code;_ > > $sql = "select * from text where id= '$id' "; > > $row = fetch_row_row( $sql, $db ); You may also wish to consider: list($img_loc, $text_type, $seq, $rec_type, $section, $code, $repeat, $description, $text) = fetch_row_r

Re: [PHP] quotemeta() question...

2005-02-11 Thread Richard Lynch
Steve Kaufman wrote: > Why does > quotemeta("pat:1$WRW") > return > pat:1 > instead of > pat:1\$WRW > > What am I misunderstanding about quotemeta function? You usually would use quotemeta on data coming from the database, or the user, or externally, or, errr, basical

Re: [PHP] Adding Business Days

2005-02-11 Thread Richard Lynch
Ben C wrote: > I am trying to add 5 business/week days to today's date. Does anyone > know a good way of how to do it? Untested Code: \n"; $mdy = date('m/d/Y', $now); list($m, $d, $y) = explode($mdy); $workdays = 0; $then = $now; while ($workdays < 5){ $then += 60 * 60 * 24; //24 h

[PHP] [Fwd: Re: [PHP-WIN] Re: SESSION]

2005-02-11 Thread Jason Barnett
Please send responses to the newsgroup. I am usually happy to help you out, but I do need to keep things organized / slightly sane on my end :) The short answer to your question below: yes you can use Word with PHP and depending on your needs this might happen on the server or you might just send

Re: [PHP] How do you read one of these parameters?

2005-02-11 Thread Richard Lynch
Brian Dunning wrote: > I see URLs formatted like this: > >http://tinyurl.com/xyz > > How do you read that "xyz," since there's no "/?x=" preceding it? Is it > not a get parameter? If you can't do mod_rewrite you can use: http://tinyurl.com/index.php/xyz with: I use it all the time, especial

RE: [PHP] FW: [NEWBIE GUIDE] For the benefit of new members

2005-02-11 Thread Chris Ramsay
An addition to point 5 perhaps? [snip] One useful trick is to print the variable/sql query using print or echo command and check whether you get what you expected. [/snip] How about mentioning var_dump() and print_r() also? rgds Chris Ramsay -- PHP General Mailing List (http://www.php.net/

Re: AW: [PHP] export mysql to csv prob

2005-02-11 Thread Tom
If your mysql server has access (or can have access) to the directory where you want to dump the file, you can just use the "SELECT INTO OUTFILE FIELDS TERMINATED BY ','..." syntax as your query, which is very fast. Mirco Blitz wrote: Hi, Probably the Pear Excel_Syltesheet_Writer works for

Re: [PHP] fsockopen: fetching url

2005-02-11 Thread Richard Lynch
[EMAIL PROTECTED] wrote: > > I'm using code below to fetch content from the url. > This code was worked properly on two servers I tested but it want worked > on > the > designated one, so after getting error message I figure it out it may > be php.ini settings limitation >

Re: [PHP] Limit iterations on a foreach loop?

2005-02-11 Thread Robby Russell
On Thu, 2005-02-10 at 15:58 -0800, Brian Dunning wrote: > I'm using an RSS feed that has WAY too much content, I only want the > first 10. I'm outputting the array with a foreach loop: is there a way > to limit it to only go through the first 10? > > Thanks, > > - Brian > Is this data coming

Re: [PHP] How do you read one of these parameters?

2005-02-11 Thread Greg Donald
On Thu, 10 Feb 2005 16:28:15 -0800, Brian Dunning <[EMAIL PROTECTED]> wrote: > I see URLs formatted like this: > >http://tinyurl.com/xyz > > How do you read that "xyz," since there's no "/?x=" preceding it? Is it > not a get parameter? Apache ModRewrite RewriteEngine on RewriteRule ^([A-Za-

Re: [PHP] Creating a varable with a name held in a string

2005-02-11 Thread Ben Edwards
On Thu, 10 Feb 2005 23:08:22 -0500, John Holmes <[EMAIL PROTECTED]> wrote: > Randy Johnson wrote: > > I like to do this: > > > > foreach( $row as $key=>$val) { > > > > $$key = $row[$key]; > > > > } > > You're just recreating a slower version of extract()... extract seems like the ticket, but as

[PHP] Re: imagettftext color problem

2005-02-11 Thread Anni Hienola
And to correct one mistake in the code that was kindly pointed out but is here just a typo: > $bg=imagecolorallocate($img, 255, 255, 255); > $font_color=imageallocatecolor($img, 0, 0, 0); Should be: $bg=imagecolorallocate($img, 255, 255, 255); $font_color=imagecolorallocate($img, 0, 0, 0); Full

Re: [PHP] Student Suspended Over PHP use.

2005-02-11 Thread Zareef Ahmed
Hi, News is very old it was published in june 2000. zareef ahmed On Thu, 10 Feb 2005 07:24:27 -0600, Steve Buehler <[EMAIL PROTECTED]> wrote: > Shouldn't have taken your Cat to school with a bag of catnip. That was > asking for trouble. :) > > Steve > > At 08:44 PM 2/9/2005, Dotan Cohen

Re: [PHP] Limit iterations on a foreach loop?

2005-02-11 Thread Alex Hogan
> I'm using an RSS feed that has WAY too much content, I only want the > first 10. I'm outputting the array with a foreach loop: is there a way > to limit it to only go through the first 10? foreach($var as $newvar){ if($count <= 10){ // Do something here } else{ break;

RE: [PHP] Upgrade PHP 4.3.4 to PHP 5.0.3 (Windows 2k & IIS5), I recieve a Blank Page and Session errors

2005-02-11 Thread Fabian I. Cuesta
The $_SESSION['sitedoc'] was not initialized because I use $_SERVER["PATH_TRANSLATED"] to make the requires for diffrent files. In these file I initialized this $_SESSION varibales. I already took care for this ploblem (in PHP5 you have to replace it for ORIG_PATH_TRANSLATED). But I still have the

Re: [PHP] File upload, suid directory and temporary dir

2005-02-11 Thread Richard Lynch
ADNET Ghislain wrote: > upload_tmp_dir/www/htdocs/upload /no value/ ^^^ / / *THIS* is the one that matters -+ Someh

Re: [PHP] Limit iterations on a foreach loop?

2005-02-11 Thread Greg Donald
On Thu, 10 Feb 2005 15:58:28 -0800, Brian Dunning <[EMAIL PROTECTED]> wrote: > I'm using an RSS feed that has WAY too much content, I only want the > first 10. I'm outputting the array with a foreach loop: is there a way > to limit it to only go through the first 10? Use a counter variable and bre

RE: [PHP] How do you read one of these parameters?

2005-02-11 Thread Mike Johnson
From: Brian Dunning [mailto:[EMAIL PROTECTED] > I see URLs formatted like this: > >http://tinyurl.com/xyz > > How do you read that "xyz," since there's no "/?x=" preceding > it? Is it not a get parameter? My best guess is that it's being converted by Apache using mod_rewrite. For one of m

[PHP] fsockopen: fetching url

2005-02-11 Thread branimir . topic
I'm using code below to fetch content from the url. This code was worked properly on two servers I tested but it want worked on the designated one, so after getting error message I figure it out it may be php.ini settings limitation

[PHP] Re: Limit iterations on a foreach loop?

2005-02-11 Thread Greg Beaver
Brian Dunning wrote: I'm using an RSS feed that has WAY too much content, I only want the first 10. I'm outputting the array with a foreach loop: is there a way to limit it to only go through the first 10? Thanks, - Brian $i = 1; foreach ($rsses as $rss) { if ($i++ >= 10) { break;

RE: [PHP] Adding Business Days

2005-02-11 Thread Mikey
Lookup the manual in the date and time section, more specifically: http://uk.php.net/mktime If the date is then on a weekend, you can add whatever days you need. HTH, Mikey > -Original Message- > From: Ben C [mailto:[EMAIL PROTECTED] > Sent: 11 February 2005 15:38 > To: php-general@li

[PHP] Limit iterations on a foreach loop?

2005-02-11 Thread Brian Dunning
I'm using an RSS feed that has WAY too much content, I only want the first 10. I'm outputting the array with a foreach loop: is there a way to limit it to only go through the first 10? Thanks, - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/uns

[PHP] How do you read one of these parameters?

2005-02-11 Thread Brian Dunning
I see URLs formatted like this: http://tinyurl.com/xyz How do you read that "xyz," since there's no "/?x=" preceding it? Is it not a get parameter? Just curious, - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Adding Business Days

2005-02-11 Thread Ben C
I am trying to add 5 business/week days to today's date. Does anyone know a good way of how to do it? Thanks, Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] FW: [NEWBIE GUIDE] For the benefit of new members

2005-02-11 Thread Jay Blanchard
= Please feel free to add more points and send to the list. = 1. If you have any queries/problems about PHP try http://www.php.net/manual/en first. You can download a copy and use it of