Re: [PHP] Determing Content-type from request header when Apache installed as CGI

2007-06-09 Thread Tijnema
On 6/9/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Fri, June 8, 2007 2:48 pm, Chris Sommers wrote: > I read many notes on apache_request_headers() about simulating this > function > when Apache is configured with PHP as a CGI. In looking at the > $_SERVER > variable definition, I do not see t

Re: [PHP] Double checking - I should turn off "magic quotes"

2007-06-09 Thread Dave M G
David, Thank you for replying. The way you write that makes me hope you understand how mysql_real_escape_string should be used. You do understand that you don't run it on the query, rather on the individual string variables that will be passed to the query. Thank you for your concern and clarif

RE: [PHP] Re: high-bit characters

2007-06-09 Thread WeberSites LTD
Thanks, I'll check this out. Till now I managed to get the result I wanted with : 126) and ($ord != 13) and ($ord != 10)){ Echo "BAD CHAR is : " . $ord; break; } } ?> berber -Original Message- From: news [m

Re: [PHP] filesize() and mime_content_type()

2007-06-09 Thread Daniel Brown
On 6/8/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Thu, June 7, 2007 12:04 pm, Chris Boget wrote: >>Have you uncommented or added `extension=php_mime_magic.dll` in >> your php.ini file for mime_content_type()? What about adding >> something like this, as well: > > extension=php_mime_ma

Re: [PHP] Re: PHP Form isnt emailing me

2007-06-09 Thread Daniel Brown
On 6/8/07, itoctopus <[EMAIL PROTECTED]> wrote: Remove the @ next to the mail function, probably there's a warning somewhere. Additionally, are you sure that your mail server is actually working? -- itoctopus - http://www.itoctopus.com ""Austin C"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL

[PHP] RE: Re: high-bit characters

2007-06-09 Thread Abdullah Ramazanoglu
WeberSites LTD dedi ki: > Thanks, I'll check this out. > > Till now I managed to get the result I wanted with : > > for ($i=0 ; $i < strlen($post_text) ; $i++) { > $chr = $post_text{$i}; > $ord = ord($chr); > if (($ord<32 or $ord>126) and ($ord != 13) and ($ord != > 10)){ > Echo "BAD CHAR is :

[PHP] [RFC] HTTP timezone

2007-06-09 Thread Stefanos Harhalakis
Hello there, I'm currently writting and Internet Draft candidate to describe an HTTP header that will be used to transfer timezone information from browsers to servers. Compliant browsers will need to send a timezone string: Timezone: +0200 that will specify their timezone offset. This way s

[PHP] Re: high-bit characters

2007-06-09 Thread Al
Take a look at !preg_match() using the POSIX extended meta character value [:print:] WeberSites LTD wrote: I'm trying to validate an RSS feed and getting errors about "high-bit characters". How can I check if a string contains any high-bit characters? thanks berber -- PHP General Mailing

Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Daniel Brown
On 6/9/07, Stefanos Harhalakis <[EMAIL PROTECTED]> wrote: Hello there, I'm currently writting and Internet Draft candidate to describe an HTTP header that will be used to transfer timezone information from browsers to servers. Compliant browsers will need to send a timezone string: Timezone:

Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Stefanos Harhalakis
On Saturday 09 June 2007, Daniel Brown wrote: > On 6/9/07, Stefanos Harhalakis <[EMAIL PROTECTED]> wrote: > > I'm currently writting and Internet Draft candidate to describe an HTTP > > header that will be used to transfer timezone information from browsers > > to servers. Compliant browsers will

[PHP] Re: Encrypted Mail

2007-06-09 Thread mot
Waiting for authentification. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] RE: Re: high-bit characters

2007-06-09 Thread WeberSites LTD
Thanks, I'll have a look at it. I do want to allow some chars so I'm trying to replace them like this : $post_text=str_replace(chr(146),"'",$post_text); or $post_text=str_replace("’","'",$post_text); However, it seems that str_replace does not actually replace the chars cause they still end

Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Stut
Stefanos Harhalakis wrote: On Saturday 09 June 2007, Daniel Brown wrote: On 6/9/07, Stefanos Harhalakis <[EMAIL PROTECTED]> wrote: I'm currently writting and Internet Draft candidate to describe an HTTP header that will be used to transfer timezone information from browsers to servers. Compli

[PHP] RE: RE: Re: high-bit characters

2007-06-09 Thread Abdullah Ramazanoglu
WeberSites LTD dedi ki: > Thanks, I'll have a look at it. > > I do want to allow some chars so I'm trying to replace them > like this : > > $post_text=str_replace(chr(146),"'",$post_text); > > or > > $post_text=str_replace("’","'",$post_text); > > > However, it seems that str_replace does no

Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Stefanos Harhalakis
On Saturday 09 June 2007, Stut wrote: > > Just wanted the opinion of PHP people/developers since PHP programmers > > will be most affected by this. Can you point me to the proper php related > > list to ask? > > I fail to see how "PHP programmers will be most affected by this" since > it would eq

Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Stut
Stefanos Harhalakis wrote: On Saturday 09 June 2007, Stut wrote: Just wanted the opinion of PHP people/developers since PHP programmers will be most affected by this. Can you point me to the proper php related list to ask? I fail to see how "PHP programmers will be most affected by this" sinc

[PHP] [URL file-access is disabled]

2007-06-09 Thread Dave Howard Schiff
Hello everyone, I have a problem, that I hope you can help me to solve: I'm writing a very simple PHP script to list a directory contents based on a 'user' variable given by a login/password script. The problem is, the webhosting i'm using don't allow the so called "URL file-access" ( i'm

[PHP] Re: Re: Re: php-cli vs python

2007-06-09 Thread Abdullah Ramazanoglu
Crayon Shin Chan dedi ki: > On Friday 08 June 2007 04:10, Abdullah Ramazanoglu wrote: > >> I found one intersting item though: Under the "What does Python have >> that PHP doesn't?" header, there's a bullet stating that "support for >> all major GUI frameworks". I know that both php and python hav

Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Stefanos Harhalakis
On Saturday 09 June 2007, Stut wrote: > Stefanos Harhalakis wrote: >> I meant people using PHP to write programs also. I would dispute your >> assertion that the majority of dynamic web pages are written in PHP. I >> would accept an assertion that PHP is one of the most widely used >> languages for

Re: [PHP] Re: Re: Re: php-cli vs python

2007-06-09 Thread Nathan Nobbe
Admittedly, there are some annoying features of PHP, the most annoying one being its "dynamic" typing (opposed to "weak" typing). I think its worth mentioning that 'dynamic' and 'weak' typing both refer to type checking, yet they refer to different aspects of type checking. a lanuguage is either

[PHP] PHP5 or PHP4 this is the question

2007-06-09 Thread elk dolk
Hi all, After designing and testing my web pages in PHP 5.2.1 I learned that our web server has PHP 4.4.1 and I have to rollback to version 4 ! . There is no OO implementation like classes or objects in my scripts but every page has some queries the question is : will my scripts wor

Re: [PHP] [URL file-access is disabled]

2007-06-09 Thread Tijnema
On 6/9/07, Dave Howard Schiff <[EMAIL PROTECTED]> wrote: Hello everyone, I have a problem, that I hope you can help me to solve: I'm writing a very simple PHP script to list a directory contents based on a 'user' variable given by a login/password script. The problem is, the webhosting i'm us

Re: [PHP] Sending mail on OS X

2007-06-09 Thread Frank Arensmeier
I think the key to your problem is to configure Postfix on Mac OS X properly. My best suggestion would be "Postfix Enabler" (look at e.g. versiontracker.com for the current version). Postfix Enabler makes it very easy to setup Postfix for exemple to use SMTP for the outgoing mails. Anothe

Re: [PHP] PHP5 or PHP4 this is the question

2007-06-09 Thread Robert Cummings
On Sat, 2007-06-09 at 11:59 -0700, elk dolk wrote: > Hi all, > After designing and testing my web pages in PHP 5.2.1 I learned > that our web server has PHP 4.4.1 and I have to rollback to version 4 ! . > There is no OO implementation like classes or objects in my scripts but every

RE: [PHP] RE: RE: Re: high-bit characters

2007-06-09 Thread WeberSites LTD
My Bad, str_replace works well and so does my original solution with the for loop. This way I get to replace special chars that I want with similar chars between 32 and 126 and not show posts that have other chars. Thanks for your help berber -Original Message- From: news [mailto:[EMA

[PHP] None US ASCII characters not allowed in headers?

2007-06-09 Thread Frank Arensmeier
Hi. I have been struggling with a little problem for quite some time now, without finding a good solution. On one of my pages, users are able to download files that contain none US ASCII characters in their filenames (e.g. character ö,ä,å). And I would like to set the original filename in

Re: [PHP] None US ASCII characters not allowed in headers?

2007-06-09 Thread Frank Arensmeier
Sorry, my misstake. It turned out that the filename (stored in MySQL) was UTF8 encoded. Setting the content header filename value "manually" to something including umlaut characters was no problem. Lazy me... Nice weekend. //frank 9 jun 2007 kl. 21.51 skrev Frank Arensmeier: Hi. I have

[PHP] Transparent image resizing using php 4.4.x

2007-06-09 Thread Sukhwinder Singh
I have tried many ways to resize a transparent gif but it works on my local server which has php 5.1.6 but none works using php 4.4.x Also the below works when using imagecopyresized and not imagecopyresampled. I have no clue why that is the case as imagecopyresampled is supposed to produce be

Re: [PHP] None US ASCII characters not allowed in headers?

2007-06-09 Thread Robert Cummings
On Sat, 2007-06-09 at 21:59 +0200, Frank Arensmeier wrote: > Sorry, my misstake. It turned out that the filename (stored in MySQL) > was UTF8 encoded. Setting the content header filename value > "manually" to something including umlaut characters was no problem. Funny how the solution often pr

Re: [PHP] None US ASCII characters not allowed in headers?

2007-06-09 Thread Frank Arensmeier
9 jun 2007 kl. 22.05 skrev Robert Cummings: On Sat, 2007-06-09 at 21:59 +0200, Frank Arensmeier wrote: Sorry, my misstake. It turned out that the filename (stored in MySQL) was UTF8 encoded. Setting the content header filename value "manually" to something including umlaut characters was no pro

Re: [PHP] None US ASCII characters not allowed in headers?

2007-06-09 Thread Robert Cummings
On Sat, 2007-06-09 at 22:20 +0200, Frank Arensmeier wrote: > 9 jun 2007 kl. 22.05 skrev Robert Cummings: > > > On Sat, 2007-06-09 at 21:59 +0200, Frank Arensmeier wrote: > >> Sorry, my misstake. It turned out that the filename (stored in MySQL) > >> was UTF8 encoded. Setting the content header fil

Re: [PHP] None US ASCII characters not allowed in headers?

2007-06-09 Thread Tijnema
On 6/9/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Sat, 2007-06-09 at 22:20 +0200, Frank Arensmeier wrote: > 9 jun 2007 kl. 22.05 skrev Robert Cummings: > > > On Sat, 2007-06-09 at 21:59 +0200, Frank Arensmeier wrote: > >> Sorry, my misstake. It turned out that the filename (stored in MySQL

[PHP] php-compile error: No rule to make target

2007-06-09 Thread H. Hübel
Hello everyone for learning to develope an own external php-extension i studied the following session under http://devzone.zend.com/article/1021-Extension-Writing-Part-I-Introduction-to-PHP-and-Zend and tried to develope my first extension as the examples from this site. i use Linux (openSuse 10.

[PHP] Keeping file pointers open after script end

2007-06-09 Thread Tijnema
Hi, Is there any way to keep a file pointer open after script is finished, so that it can be access later, by passing it through session? Like this: page1.php: Continue"; ?> page2.php: Thanks, Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php

Re: [PHP] Keeping file pointers open after script end

2007-06-09 Thread Stut
Tijnema wrote: Is there any way to keep a file pointer open after script is finished, so that it can be access later, by passing it through session? Like this: page1.php: Continue"; ?> page2.php: No. File pointers are resources, and resources cannot be stored in the session. What exact

Re: [PHP] Keeping file pointers open after script end

2007-06-09 Thread Robert Cummings
On Sat, 2007-06-09 at 22:44 +0200, Tijnema wrote: > Hi, > > Is there any way to keep a file pointer open after script is finished, > so that it can be access later, by passing it through session? > > Like this: > > page1.php: > > session_start(); > > $fp = fopen("test.php","r"); > $data = fre

Re: [PHP] php-compile error: No rule to make target

2007-06-09 Thread Daniel Brown
On 6/9/07, "H. Hübel" <[EMAIL PROTECTED]> wrote: Hello everyone for learning to develope an own external php-extension i studied the following session under http://devzone.zend.com/article/1021-Extension-Writing-Part-I-Introduction-to-PHP-and-Zend and tried to develope my first extension as the

Re: [PHP] Keeping file pointers open after script end

2007-06-09 Thread Tijnema
On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema wrote: > Is there any way to keep a file pointer open after script is finished, > so that it can be access later, by passing it through session? > > Like this: > > page1.php: > > session_start(); > > $fp = fopen("test.php","r"); > $data = fread(

Re: [PHP] Keeping file pointers open after script end

2007-06-09 Thread Stut
Tijnema wrote: Hmm, fseek seems cool, but what about FTP resources? If I open them with ftp_connect, do I need to fetch all data from FTP again, and then just trash all data I don't need? Yes, but depending on what you're actually doing you may be able to cache enough to skip large chunks in s

Re: [PHP] Keeping file pointers open after script end

2007-06-09 Thread Robert Cummings
On Sat, 2007-06-09 at 22:00 +0100, Stut wrote: > Tijnema wrote: > > Hmm, fseek seems cool, but what about FTP resources? If I open them > > with ftp_connect, do I need to fetch all data from FTP again, and then > > just trash all data I don't need? > > Yes, but depending on what you're actually do

Re: [PHP] Keeping file pointers open after script end

2007-06-09 Thread Tijnema
On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema wrote: > Hmm, fseek seems cool, but what about FTP resources? If I open them > with ftp_connect, do I need to fetch all data from FTP again, and then > just trash all data I don't need? Yes, but depending on what you're actually doing you may be

Re: [PHP] Keeping file pointers open after script end

2007-06-09 Thread Tijnema
On 6/9/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Sat, 2007-06-09 at 22:00 +0100, Stut wrote: > Tijnema wrote: > > Hmm, fseek seems cool, but what about FTP resources? If I open them > > with ftp_connect, do I need to fetch all data from FTP again, and then > > just trash all data I don't

Re: [PHP] Keeping file pointers open after script end

2007-06-09 Thread Stut
Tijnema wrote: On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema wrote: > Hmm, fseek seems cool, but what about FTP resources? If I open them > with ftp_connect, do I need to fetch all data from FTP again, and then > just trash all data I don't need? Yes, but depending on what you're actually

Re: [PHP] Keeping file pointers open after script end

2007-06-09 Thread Tijnema
On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema wrote: > On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: >> Tijnema wrote: >> > Hmm, fseek seems cool, but what about FTP resources? If I open them >> > with ftp_connect, do I need to fetch all data from FTP again, and then >> > just trash all data I

Re: [PHP] php-compile error: No rule to make target

2007-06-09 Thread H. Hübel
Hi Daniel >That's a bit out of the scope of this list, but a simple fix > anyway. Change config.m4: > PHP_NEW_EXTENSION(hello, hello.c, $ext_shared) > > to > PHP_NEW_EXTENSION(hello, php_hello.c, $ext_shared) > Thank you very much! You made my day :) it was the wrong filename

Re: [PHP] Keeping file pointers open after script end

2007-06-09 Thread Stut
Tijnema wrote: On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema wrote: > On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: >> Tijnema wrote: >> > Hmm, fseek seems cool, but what about FTP resources? If I open them >> > with ftp_connect, do I need to fetch all data from FTP again, and then >> > just

Re: [PHP] Keeping file pointers open after script end

2007-06-09 Thread Robert Cummings
On Sat, 2007-06-09 at 23:09 +0200, Tijnema wrote: > On 6/9/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Sat, 2007-06-09 at 22:00 +0100, Stut wrote: > > > Tijnema wrote: > > > > Hmm, fseek seems cool, but what about FTP resources? If I open them > > > > with ftp_connect, do I need to fetch

Re: [PHP] Keeping file pointers open after script end

2007-06-09 Thread Tijnema
On 6/9/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Sat, 2007-06-09 at 23:09 +0200, Tijnema wrote: > On 6/9/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Sat, 2007-06-09 at 22:00 +0100, Stut wrote: > > > Tijnema wrote: > > > > Hmm, fseek seems cool, but what about FTP resources? If I

Re: [PHP] Keeping file pointers open after script end

2007-06-09 Thread Tijnema
On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema wrote: > On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: >> Tijnema wrote: >> > On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: >> >> Tijnema wrote: >> >> > Hmm, fseek seems cool, but what about FTP resources? If I open them >> >> > with ftp_connect, do I

Re: [PHP] Keeping file pointers open after script end

2007-06-09 Thread Stut
Tijnema wrote: On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema wrote: > On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: >> Tijnema wrote: >> > On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: >> >> Tijnema wrote: >> >> > Hmm, fseek seems cool, but what about FTP resources? If I open them >> >> > with

Re: [PHP] Keeping file pointers open after script end

2007-06-09 Thread Tijnema
On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema wrote: > On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: >> Tijnema wrote: >> > On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: >> >> Tijnema wrote: >> >> > On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: >> >> >> Tijnema wrote: >> >> >> > Hmm, fseek seems cool

[PHP] generate images of register definitions

2007-06-09 Thread Mike Frysinger
anyone know of some software to generate images like this: http://wh0rd.org/register.png idea is i have a list of registers and their bit meanings, and i want to automatically generate images like the above one from this data yes, i can write some custom code in PHP using GD, but i'd much rather

[PHP] Re: Re: Re: Re: php-cli vs python

2007-06-09 Thread Abdullah Ramazanoglu
Nathan Nobbe dedi ki: >> Admittedly, there are some annoying features of PHP, the most >> annoying one being its "dynamic" typing (opposed to "weak" typing). > > I think its worth mentioning that 'dynamic' and 'weak' typing both refer > to type checking, yet they refer to different aspects of typ

Re: [PHP] Keeping file pointers open after script end

2007-06-09 Thread Richard Lynch
On Sat, June 9, 2007 3:44 pm, Tijnema wrote: > Is there any way to keep a file pointer open after script is finished, > so that it can be access later, by passing it through session? No. Well, okay, *MAYBE* you could hack something up with exec() and fork some kind of external process that keeps

Re: [PHP] None US ASCII characters not allowed in headers?

2007-06-09 Thread Richard Lynch
On Sat, June 9, 2007 2:51 pm, Frank Arensmeier wrote: > I have been struggling with a little problem for quite some time now, > without finding a good solution. > > On one of my pages, users are able to download files that contain > none US ASCII characters in their filenames (e.g. character ö,ä,å)

Re: [PHP] generate images of register definitions

2007-06-09 Thread Richard Lynch
On Sat, June 9, 2007 4:27 pm, Mike Frysinger wrote: > anyone know of some software to generate images like this: > http://wh0rd.org/register.png > idea is i have a list of registers and their bit meanings, and i want > to automatically generate images like the above one from this data > > yes, i ca

Re: [PHP] None US ASCII characters not allowed in headers?

2007-06-09 Thread Richard Lynch
On Sat, June 9, 2007 3:05 pm, Robert Cummings wrote: > On Sat, 2007-06-09 at 21:59 +0200, Frank Arensmeier wrote: >> Sorry, my misstake. It turned out that the filename (stored in >> MySQL) >> was UTF8 encoded. Setting the content header filename value >> "manually" to something including umlaut ch

Re: [PHP] PHP5 or PHP4 this is the question

2007-06-09 Thread Richard Lynch
On Sat, June 9, 2007 1:59 pm, elk dolk wrote: > After designing and testing my web pages in PHP 5.2.1 I > learned that our web server has PHP 4.4.1 and I have to > rollback to version 4 ! . There is no OO implementation like > classes or objects in my scripts but every page has some >

Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Richard Lynch
On Sat, June 9, 2007 11:08 am, Stut wrote: > Stefanos Harhalakis wrote: >> On Saturday 09 June 2007, Daniel Brown wrote: >>> On 6/9/07, Stefanos Harhalakis <[EMAIL PROTECTED]> wrote: I'm currently writting and Internet Draft candidate to describe an HTTP header that will be used

Re: [PHP] generate images of register definitions

2007-06-09 Thread Tijnema
On 6/9/07, Mike Frysinger <[EMAIL PROTECTED]> wrote: anyone know of some software to generate images like this: http://wh0rd.org/register.png idea is i have a list of registers and their bit meanings, and i want to automatically generate images like the above one from this data yes, i can write

Re: [PHP] [URL file-access is disabled]

2007-06-09 Thread Richard Lynch
On Sat, June 9, 2007 12:14 pm, Dave Howard Schiff wrote: > I have a problem, that I hope you can help me to solve: > > I'm writing a very simple PHP script to list a directory contents > based on a 'user' variable given by a login/password script. The > problem is, the webhosting i'm using don't

Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Richard Lynch
On Sat, June 9, 2007 12:02 pm, Stefanos Harhalakis wrote: > I've already thought about providing the full time but I didn't find > any > applications. Can you provide some examples about its usage? How can > you tell > whether a user has wrong time and not wrong timezone? You can't. You can't tel

Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Richard Lynch
On Sat, June 9, 2007 8:06 am, Stefanos Harhalakis wrote: > I'm currently writting and Internet Draft candidate to describe an > HTTP > header that will be used to transfer timezone information from > browsers to > servers. Compliant browsers will need to send a timezone string: > > Timezone: +020

Re: [PHP] PHP5 or PHP4 this is the question

2007-06-09 Thread Tijnema
On 6/9/07, elk dolk <[EMAIL PROTECTED]> wrote: Hi all, After designing and testing my web pages in PHP 5.2.1 I learned that our web server has PHP 4.4.1 and I have to rollback to version 4 ! . There is no OO implementation like classes or objects in my scripts but every page has so

RE: [PHP] RE: Re: high-bit characters

2007-06-09 Thread Richard Lynch
On Sat, June 9, 2007 10:43 am, WeberSites LTD wrote: > I do want to allow some chars so I'm trying to replace them > like this : > > $post_text=str_replace(chr(146),"'",$post_text); > > or > > $post_text=str_replace("’","'",$post_text); > > > However, it seems that str_replace does not actually rep

Re: [PHP] Keeping file pointers open after script end

2007-06-09 Thread Tijnema
On 6/9/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Sat, June 9, 2007 3:44 pm, Tijnema wrote: > Is there any way to keep a file pointer open after script is finished, > so that it can be access later, by passing it through session? No. Well, okay, *MAYBE* you could hack something up with exe

Re: [PHP] Sending mail on OS X

2007-06-09 Thread Richard Lynch
I'm pretty sure you want \r\n instead of \n\r, though as you only have one header and nothing after it, it doesn't matter maybe... You may also need to LOGIN to your SMTP server, from your PHP server, before you try to send mail through it. Some servers allow only specific IP (other servers in th

Re: [PHP] PHP5 or PHP4 this is the question

2007-06-09 Thread tedd
At 3:27 PM -0400 6/9/07, Robert Cummings wrote: On Sat, 2007-06-09 at 11:59 -0700, elk dolk wrote: Hi all, After designing and testing my web pages in PHP 5.2.1 I learned that our web server has PHP 4.4.1 and I have to rollback to version 4 ! . There is no OO implementation like

Re: [PHP] PHP Form isnt emailing me

2007-06-09 Thread Richard Lynch
The return value of http://php.net/mail only says whether or not PHP managed to queue up the email to go out. It does *NOT* imply that the email actually went anywhere. If your server isn't running through the queues and sending the emails, they don't go out. If your server is rejecting the emai

Re: [PHP] Intercepting fopen, mysql_connect, and similar functions for migration

2007-06-09 Thread Richard Lynch
Unless you want to install the run-kit extension [shudder] you cannot do that. Fix the code. On Fri, June 8, 2007 8:42 pm, Kelly Jones wrote: > I'm migrating a website from one server to another, and my file paths > and dbs have changed. > > For example /a/b/c/foo.txt on the old machine is at /x/

Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Tijnema
On 6/9/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Sat, June 9, 2007 8:06 am, Stefanos Harhalakis wrote: > I'm currently writting and Internet Draft candidate to describe an > HTTP > header that will be used to transfer timezone information from > browsers to > servers. Compliant browsers w

Re: [PHP] Difficulties including scripts from another folder (apache2.2, PHP5, Vista)

2007-06-09 Thread Richard Lynch
On Thu, June 7, 2007 10:29 pm, brice wrote: > I was wondering if anybody had any ideas about how to tackle this > problem: > > I have just set up Apache2.2 and php5 on VISTA There's your first problem. [smirk] > using mod_php. Php page > load > work fine for most things. However, when i try to se

Re: [PHP] need to alter FROM address when sending with PHP forms

2007-06-09 Thread Richard Lynch
On Thu, June 7, 2007 9:03 pm, Dylan Bouterse wrote: > My company has a RH ES4 web server running apache/2.2.2 and PHP 5.1.4. > Our PHP programmer has developed quite a few PHP email forms and each > time an email is sent, the FROM: address is > [EMAIL PROTECTED] I don't know if this is a PHP > pr

Re: [PHP] file permissions

2007-06-09 Thread Richard Lynch
On Thu, June 7, 2007 7:30 am, Ross wrote: > n relation to my other posts it is not that the folder permission are > not > working, when I put an image inside them the image automatically has a > 600 > chmod and has the owner is 'nobody'. This means I cannot delete the > files. > > mkdir('images/'.

Re: [PHP] directories - again

2007-06-09 Thread Richard Lynch
If 'nobody' owns those files because your PHP script was 'nobody' when it uploaded it, write another PHP script, running as 'nobody' to chmod the files. On Thu, June 7, 2007 2:46 am, Ross wrote: > Hi, > > I can make the files now after setting the permission to my images > folder > but I cannot de

Re: [PHP] Re: directories - again

2007-06-09 Thread Richard Lynch
On Thu, June 7, 2007 7:23 am, Ross wrote: > No I want it to be 777 when I upload it not upload it nd have to > change it. A) You really should use 775 for directories and 664 for files. B) Just do the chmod right after the move_uploaded_file and call it done. -- Some people have a "gift" link he

Re: [PHP] XSLT and DocBook

2007-06-09 Thread Richard Lynch
I believe PHP 5 support for XML is pretty darn good. If you're in PHP 4, forget it... There's like 3 different XML libraries, all with warts, and I'm pretty sure none of them support the fancy stuff you need. On Thu, June 7, 2007 1:02 am, Larry Garfield wrote: > Hi all. I have a DocBook source[1

[PHP] Re: Re: Re: Re: php-cli vs python

2007-06-09 Thread Abdullah Ramazanoglu
Abdullah Ramazanoglu dedi ki: > $key = pack("N*", 0x12345678, 0x9abcdef0, 0x87654321, 0x0fedcba9); > > Well, second and third 32-bit hex values were automatically converted by > PHP to float, before packing, because PHP tries to cast them into signed > 32-bit integers, which can't be represented

Re: [PHP] file permissions

2007-06-09 Thread Dave Goodchild
Why not use umask?

Re: [PHP] register_globals and magic_quotes_gpc (again)

2007-06-09 Thread Richard Lynch
Are you running PHP as a Module or as CGI or FCGI? Look at phpinfo() output to be SURE. If it's not running as a Module, none of those directives are defined, because Apache (which implements .htaccess) has no friggin' idea what php_value or php_flag is without PHP Module there to tell it. On We

Re: [PHP] php-cli vs python

2007-06-09 Thread Richard Lynch
I use PHP extensively for command line processing. Why not just try it and see if it works well for you? On Wed, June 6, 2007 5:13 pm, Abdullah Ramazanoglu wrote: > Hello, > > I'm already (going to) use php for web based development. Shell > scripting > and compiled languages have their own place

[PHP] Re: Keeping file pointers open after script end

2007-06-09 Thread Abdullah Ramazanoglu
Tijnema dedi ki: > Is there any way to keep a file pointer open after script is finished, > so that it can be access later, by passing it through session? ftell() / fseek() ? Kind regards, -- Abdullah Ramazanoglu aramazan ÄT myrealbox D0T cöm -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Re: php-cli vs python

2007-06-09 Thread Richard Lynch
Plus, PHP has a very tiny core, and I can't imagine how Python core is "smaller"... ./configure --disable-all for both would be interesting... On Thu, June 7, 2007 10:24 am, Daniel Brown wrote: > On 6/7/07, Robert Cummings <[EMAIL PROTECTED]> wrote: >> On Thu, 2007-06-07 at 10:46 -0400, Daniel B

Re: [PHP] php-cli vs python

2007-06-09 Thread Richard Lynch
On Thu, June 7, 2007 10:55 am, jose javier parra sanchez wrote: > Hi. One big diferrence is that python can be run interactively, while > php not. That's a really good advantage to debug the scripts. Anyway, > use the one you fell more comfortable. U. PHP has dozens of debuggers, and you can

[PHP] Re: php-cli vs python

2007-06-09 Thread Abdullah Ramazanoglu
Richard Lynch dedi ki: > I use PHP extensively for command line processing. > > Why not just try it and see if it works well for you? I will :) -- Abdullah Ramazanoglu aramazan ÄT myrealbox D0T cöm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/uns

Re: [PHP] Difficulties including scripts from another folder (apache2.2, PHP5, Vista)

2007-06-09 Thread brice
Thanks a lot guys! Eventually Richard hit on the issue: require(".\foo.inc.php"); ?># If you put .\ in there, then maybe PHP thinks you mean to NOT use the include_path, but only the local directory? Take .\ out. it was the .\ that stopped it working. taking it out worked a treat! thanks a

Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Stefanos Harhalakis
On Sunday 10 June 2007, Richard Lynch wrote: > On Sat, June 9, 2007 8:06 am, Stefanos Harhalakis wrote: > > Timezone: +0200 > > > > that will specify their timezone offset. This way scripts will be able > > to > > provide appropriate date/time strings/representations and/or content. > > It's pretty

Re: [PHP] PHP5 or PHP4 this is the question

2007-06-09 Thread Larry Garfield
You should get a new server that supports PHP 5.2.1. PHP 4 is dead. It hasn't had a non-security/bug release in years. PHP 5 is 3 years old. The one and only reason to care about PHP 4 at this point is if you're writing something that has to run on any possible cheap shared web host, and eve

[PHP] Is it possible to get the name of the top most calling script?

2007-06-09 Thread barophobia
Hello, I know that __FILE__ and __LINE__ report on the file and line that they occur in. What I want is to be able to get the file name and line of the calling script. The only way I can do this so far is by passing the values through function arguments. Is there any way around this? Thanks,

Re: [PHP] XSLT and DocBook

2007-06-09 Thread Larry Garfield
Yes, I said PHP 5.2 specifically. :-) I did find this: http://us2.php.net/manual/en/function.dom-domdocument-xinclude.php So I'm figuring that XInclude is safe, assuming I give it enough RAM. (It's not a small dataset.) I'm not sure how multi-file output would work, though, given the API. EX

Re: [PHP] Is it possible to get the name of the top most calling script?

2007-06-09 Thread Tijnema
On 6/10/07, barophobia <[EMAIL PROTECTED]> wrote: Hello, I know that __FILE__ and __LINE__ report on the file and line that they occur in. What I want is to be able to get the file name and line of the calling script. The only way I can do this so far is by passing the values through function ar

Re: [PHP] [RFC] HTTP timezone

2007-06-09 Thread Richard Lynch
On Sat, June 9, 2007 7:15 pm, Stefanos Harhalakis wrote: > On Sunday 10 June 2007, Richard Lynch wrote: >> On Sat, June 9, 2007 8:06 am, Stefanos Harhalakis wrote: >> > Timezone: +0200 >> > >> > that will specify their timezone offset. This way scripts will be >> able >> > to >> > provide appropr

Re: [PHP] Is it possible to get the name of the top most calling script?

2007-06-09 Thread Richard Lynch
On Sat, June 9, 2007 7:18 pm, barophobia wrote: > I know that __FILE__ and __LINE__ report on the file and line that > they occur in. What I want is to be able to get the file name and line > of the calling script. The only way I can do this so far is by passing > the values through function argume

Re: [PHP] Keeping file pointers open after script end

2007-06-09 Thread Robert Cummings
On Sat, 2007-06-09 at 22:23 +0100, Stut wrote: > Tijnema wrote: > > On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: > >> Tijnema wrote: > >> > On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: > >> >> Tijnema wrote: > >> >> > On 6/9/07, Stut <[EMAIL PROTECTED]> wrote: > >> >> >> Tijnema wrote: > >> >> >> > Hmm

Re: [PHP] PHP5 or PHP4 this is the question

2007-06-09 Thread Robert Cummings
On Sat, 2007-06-09 at 18:10 -0400, tedd wrote: > At 3:27 PM -0400 6/9/07, Robert Cummings wrote: > >On Sat, 2007-06-09 at 11:59 -0700, elk dolk wrote: > >> Hi all, > >> After designing and testing my web pages in PHP 5.2.1 I > >>learned that our web server has PHP 4.4.1 and I have t

Re: [PHP] Difficulties including scripts from another folder (apache2.2, PHP5, Vista)

2007-06-09 Thread Robert Cummings
On Sun, 2007-06-10 at 01:02 +0100, brice wrote: > Thanks a lot guys! > > Eventually Richard hit on the issue: > > >require(".\foo.inc.php"); ?># > > > >If you put .\ in there, then maybe PHP thinks you mean to NOT use the > >include_path, but only the local directory? > > > >Take .\ out. > > it

Re: [PHP] PHP5 or PHP4 this is the question

2007-06-09 Thread Robert Cummings
On Sat, 2007-06-09 at 19:18 -0500, Larry Garfield wrote: > You should get a new server that supports PHP 5.2.1. PHP 4 is dead. Must be a zombie then because I see it running almost EVERYWHERE. Cheers, Rob. -- .. | InterJinn Application

[PHP] Going from simple to super CAPTCHA

2007-06-09 Thread Dave M G
PHP General List, With a little help from the web, and help from this list, I have a simple CAPTCHA image that works within the content system I'm building. But it's *really* simple. Basically white text on a black background, with a couple of white lines to obscure the text a little. I'm p

Re: [PHP] Going from simple to super CAPTCHA

2007-06-09 Thread Robert Cummings
On Sun, 2007-06-10 at 12:27 +0900, Dave M G wrote: > PHP General List, > > With a little help from the web, and help from this list, I have a > simple CAPTCHA image that works within the content system I'm building. > > But it's *really* simple. Basically white text on a black background, > wi

Re: [PHP] Re: php-cli vs python OT

2007-06-09 Thread Robert Cummings
On Thu, 2007-06-07 at 23:33 +0100, Colin Guthrie wrote: > Robert Cummings wrote: > > On Thu, 2007-06-07 at 16:36 -0400, Daniel Brown wrote: > >> Are you using Amarok on Windows, Linux, or other? I have Amarok > >> 1.3.1 on KDE 3.4.2 on Mandriva 2006.0 Community on 2.6.12-12mdksmp on > >> an i6

  1   2   >