Re: [PHP] mail

2007-03-14 Thread Richard Lynch
On Tue, March 13, 2007 1:35 pm, Dani Dws wrote: I just want to know if the mail function works from a localhost (local server)? It *can* be made to work, even if you have not succeeded so far. I've checked my php.ini all the setting are right but the mail function is not sending any mail,

Re: [PHP] variables in CSS in PHP question/problems

2007-03-14 Thread Richard Lynch
Surf directly to your CSS URL and see what happens. There are several possibiliies: #1. Your CSS has ?php ... ? in its output, because you have not convinced your web-server to run your CSS file through PHP to compute the dynamic result. You need something like this in .htacces: File

Re: [PHP] Using a reentrant form

2007-03-14 Thread Richard Lynch
On Tue, March 13, 2007 10:19 am, Todd Cary wrote: To validate a page, I set the form value to the page name the user is on. Then there is a hidden variable, looped that is set to 1. By checking looped, I know if the user has re-entered the form so I can do my validation checks. Is there a

Re: [PHP] dst and strtotime

2007-03-14 Thread Richard Lynch
He meant + 24 * 60 * 60 not * 24 * 60 * 60 The idea is to ADD the number of seconds in one day to shift your time over by one day, not to multiply the time by the number of seconds in one day, which is just plain ridiculously high number beyond the scale of Unix time stamp. I would recommend

Re: [PHP] Capitalizing the first letter

2007-03-14 Thread Richard Lynch
On Tue, March 13, 2007 9:10 am, Todd Cary wrote: I would like to write a filter that takes the text smith or SMith and returns Smith; same for ralph smith. No, you don't. :-) You *think* you want to write that function, but this is one of those things that is *way* more complicated than it

[PHP] PHP Printer

2007-03-14 Thread raaj sharma
Sir, I am trying to use printer functions in my script.pls. help me. The printer is working fine with other documents of ms-word etc. pls. help me Thanx Raaj The code is: ?php $handle = printer_open(); printer_write($handle, Text to print); printer_close($handle); ? It is giving errors like

Re: [PHP] PHP Printer

2007-03-14 Thread Tijnema !
On 3/14/07, raaj sharma [EMAIL PROTECTED] wrote: Sir, I am trying to use printer functions in my script.pls. help me. The printer is working fine with other documents of ms-word etc. pls. help me Thanx Raaj The code is: ?php $handle = printer_open(); You should define which printer to

Re: [PHP] question regarding form filtering

2007-03-14 Thread Richard Lynch
I use PCRE for filtering all the time. As a general rule, be sure you are using a pattern that says allow these valid characters and not one that says deny these invalid characters. You never know when some user will send Unicode or something so far outside what you expected that your deny

Re: [PHP] Redirecting in a PHP script

2007-03-14 Thread Tijnema !
On 3/14/07, Chris Shiflett [EMAIL PROTECTED] wrote: Tijnema wrote: Did you guys ever noted that little arrow down just right of the back button, where you can go back 2 steps at once, so you don't have to click very fast? I think we both remember browsing before that feature was invented.

Re: [PHP] Data Types Problem

2007-03-14 Thread Richard Lynch
THIS IS (ALMOST) TOTALLY OFF-TOPIC HIT DELETE NOW Unless you want a chuckle at my expense... :-) On Tue, March 13, 2007 9:23 am, Jochem Maas wrote: Richard Lynch wrote: By definition, all HTTP data is of type 'string' because that's the ONLY data type HTTP supports. PHP will cheerfully

RE: [PHP] Re: question regarding form filtering

2007-03-14 Thread Richard Lynch
I personally would not presume that PHP and JS regex patterns are 100% compatible... Store a separate pattern for each. And, actually, the PHP check might be more involved than the JS check. For example, if the users is making up a password, and this password has access to something that's

Re: [PHP] session/login issue

2007-03-14 Thread Richard Lynch
Check the before/after php.ini settings. My first guess is they finally turned register_globals OFF and the Plesk code is relying on register_globals. Upgrade, fix, or abandon Plesk if that's the case. My second guess is they changed the session.auto_start or completely messed up the session GC

Re: [PHP] About exec function

2007-03-14 Thread Richard Lynch
The PHP User probably does not have write access to the new .out file it just created. Why Windows would be this weird, and let you create a file you cannot write to is beyond my comprehension, but there it is... If it's a multi-user Windows box, try logging in as the user PHP runs as, which is

Re: [PHP] PHP URL issues

2007-03-14 Thread Richard Lynch
Plus, after you urlencode() the values to go into the URL, you should use htmlentites on the URL to go to the browser, if you want it to be valid HTML. Use Firefox with HTMLValidator and make your HTML valid will solve about 20% of beginner PHP problems. On Tue, March 13, 2007 7:47 am, Satyam

Re: [PHP] PHP URL issues

2007-03-14 Thread Richard Lynch
On Tue, March 13, 2007 9:31 am, Steve wrote: This may or may not help, but here's a few things to note: 1) I would avoid placing variable output in double quoted strings. While not important for smaller scripts, doing a large number of outputs like this causes a decent performance hit. In

[PHP] PLS HELP ME

2007-03-14 Thread raaj sharma
Sir, I am trying to use printer functions in my script.pls. help me. The printer is working fine with other documents of ms-word etc. i am trying it on localhost. Is it needed to make any changes in php.ini. if so how it will work on the server. pls. help me Thanx Raaj The code is: ?php

[PHP] Re: question for translating fsockopen into CURL

2007-03-14 Thread Chin
Yeni Setiawan wrote: dear all. I'm currently writing a script that connect to specific IP (server) at a specific port (1950). then I need to send some parameters and the server will give me a reply. too bad, my current webhost no longer accept fsockopen(). so I need to translate my

[PHP] Re: question for translating fsockopen into CURL

2007-03-14 Thread Chin
Yeni Setiawan wrote: dear all. I'm currently writing a script that connect to specific IP (server) at a specific port (1950). then I need to send some parameters and the server will give me a reply. too bad, my current webhost no longer accept fsockopen(). so I need to translate my

Re: [PHP] PHP Printer

2007-03-14 Thread Tijnema !
On 3/14/07, raaj sharma [EMAIL PROTECTED] wrote: $handle = printer_open(); again it is giving same errors. i am trying it on localhost. Is it needed to make any changes in php.ini. if so how it will work on the server. Thanx Raaj You have not set a default printer in php.ini, and php can't

Re: [PHP] PLS HELP ME

2007-03-14 Thread Tijnema !
On 3/14/07, raaj sharma [EMAIL PROTECTED] wrote: Sir, I am trying to use printer functions in my script.pls. help me. The printer is working fine with other documents of ms-word etc. i am trying it on localhost. Is it needed to make any changes in php.ini. if so how it will work on the

Re: [PHP] 2 errors I can not understand

2007-03-14 Thread Myron Turner
Richard Lynch wrote: On Tue, March 13, 2007 6:04 pm, Jonathan Kahan wrote: This did fix the problem but I am amazed that $s%$d=0 would be interpereted as a statement assigning d to 0 since there is some other stuff in front of d... I would think that would produce an error at compile time

Re: [PHP] 2 errors I can not understand

2007-03-14 Thread Tijnema !
On 3/14/07, Myron Turner [EMAIL PROTECTED] wrote: Richard Lynch wrote: On Tue, March 13, 2007 6:04 pm, Jonathan Kahan wrote: This did fix the problem but I am amazed that $s%$d=0 would be interpereted as a statement assigning d to 0 since there is some other stuff in front of d... I would

Re: [PHP] PHP URL issues

2007-03-14 Thread Satyam
There are lies, damned lies and statistics. Had he known about benchmarks! I have already tried different ways of producing output and I completely disagree that concatenating the pieces and then echoing them is the best. In a first try, I found that echoing the separate parts as arguments to

Re: [PHP] Variable variables and references

2007-03-14 Thread Robert Cummings
On Wed, 2007-03-14 at 12:39 +0100, Jochem Maas wrote: Richard Lynch wrote: On Sat, March 10, 2007 6:28 am, Dave Goodchild wrote: Hi guys, I have just read 'Programming PHP' (O'Reilly) and although I think it's a great book, I am confused about variable variables and references - not

Re: [PHP] 2 errors I can not understand

2007-03-14 Thread Myron Turner
Robert Cummings wrote: On Wed, 2007-03-14 at 12:57 +0100, Tijnema ! wrote: On 3/14/07, Myron Turner [EMAIL PROTECTED] wrote: Richard Lynch wrote: On Tue, March 13, 2007 6:04 pm, Jonathan Kahan wrote: This did fix the problem but I am amazed that $s%$d=0 would be

Re: [PHP] 2 errors I can not understand

2007-03-14 Thread Robert Cummings
On Wed, 2007-03-14 at 07:42 -0500, Myron Turner wrote: Robert Cummings wrote: On Wed, 2007-03-14 at 12:57 +0100, Tijnema ! wrote: On 3/14/07, Myron Turner [EMAIL PROTECTED] wrote: Richard Lynch wrote: On Tue, March 13, 2007 6:04 pm, Jonathan Kahan wrote:

Re: [PHP] dst and strtotime

2007-03-14 Thread Tijnema !
On 3/14/07, Jake McHenry [EMAIL PROTECTED] wrote: He meant + 24 * 60 * 60 not * 24 * 60 * 60 The idea is to ADD the number of seconds in one day to shift your time over by one day, not to multiply the time by the number of seconds in one day, which is just plain ridiculously high number

Re: [PHP] Help me specify/develop a feature! (cluster web sessions management)

2007-03-14 Thread markw
On Tue, March 13, 2007 7:27 pm, Mark wrote: I have a web session management server that makes PHP clustering easy and fast. I have been getting a number of requests for some level of redundancy. As it is, I can save to an NFS or GFS file system, and be redundant that way. Talk to Jason

Re: [PHP] 2 errors I can not understand

2007-03-14 Thread Jonathan Kahan
Thanks for alll the feedback. I also needed to correct a logic issue with this code to check that a number not be divisible by 2 as my function was stating all perfect powers of 2 were prime. I need to remeber as I move from other languages the difference between = and ==. Of course I will be

Re: [PHP] cannot load mysql extension - PHP Installation on Vista/Apache

2007-03-14 Thread Richard Davey
Rahul Sitaram Johari wrote: 'cannot load mysql extension, please check PHP Configuration'. I¹ve installed PHP on XP computers hundreds of times, so I¹m not exactly a newbie to this, but I¹m not sure if it¹s Vista causing the problem or I¹m doing something wrong. Which MySQL extension are you

Re: [PHP] cannot load mysql extension - PHP Installation on Vista/Apache

2007-03-14 Thread Tijnema !
On 3/14/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, I recently configured Installed PHP on my Windows Vista PC, running Apache 2.2 Web Server. MySQL 5 was also installed. Apache is running fine ­ mySQL is running fine ­ PHP is running fine. The problem is, I¹m getting this error

Re: [PHP] cannot load mysql extension - PHP Installation on Vista/Apache

2007-03-14 Thread Rahul Sitaram Johari
You're probably on the right track here. I was doing some googling and I came across someone running Apache/PHP/mySQL on a Windows 2000 computer and was getting the exact same error. They found out it was a Security issue since administrative rights were not being delivered to required

Re: [PHP] cannot load mysql extension - PHP Installation on Vista/Apache

2007-03-14 Thread Rahul Sitaram Johari
You kidding me? I didn't know anything about that! That could be the solution! I'm gonna give this a try and see if that makes a difference. I'm using native mySQL btw, not mysqli. Thanks! On 3/14/07 9:54 AM, Richard Davey [EMAIL PROTECTED] wrote: Rahul Sitaram Johari wrote: 'cannot load

RE: [PHP] Re: question regarding form filtering

2007-03-14 Thread Tim
-Message d'origine- De : Richard Lynch [mailto:[EMAIL PROTECTED] Envoyé : mercredi 14 mars 2007 09:48 À : Tim Cc : 'Haydar Tuna'; php-general@lists.php.net Objet : RE: [PHP] Re: question regarding form filtering I personally would not presume that PHP and JS regex patterns

Re: [PHP] PHP URL issues

2007-03-14 Thread Steve
I personally have not unfortunately. A good friend of mine is also a developer who initially told me about it when I first began coding. Because I don't want to stick with the he-said, she-said approach, I did a quick google search and came up with this link:

[PHP] Environment variables...

2007-03-14 Thread David BERCOT
Hi, I'd like to read an environment variable with PHP. I've tried with : exec ('echo $CONTEXTE_D_EXECUTION',$result); $result is empty !!! I've put the variable in /etc/environment, in /etc/profile, in /etc/bash.bashrc but nothing worked... Do you have any idea ? If it is not possible,

Re: [PHP] Environment variables...

2007-03-14 Thread Tijnema !
On 3/14/07, David BERCOT [EMAIL PROTECTED] wrote: Hi, I'd like to read an environment variable with PHP. I've tried with : exec ('echo $CONTEXTE_D_EXECUTION',$result); $result is empty !!! I've put the variable in /etc/environment, in /etc/profile, in /etc/bash.bashrc but nothing

Re: [PHP] Environment variables...

2007-03-14 Thread Erik Jones
Depending on your system and environment (platform and cli v. cgi), they should be in either of the $_ENV or $_SESSION superglobals. On Mar 14, 2007, at 9:32 AM, David BERCOT wrote: Hi, I'd like to read an environment variable with PHP. I've tried with : exec ('echo

Re: [PHP] Environment variables...

2007-03-14 Thread David BERCOT
Le Wed, 14 Mar 2007 15:40:28 +0100, Tijnema ! [EMAIL PROTECTED] a écrit : On 3/14/07, David BERCOT [EMAIL PROTECTED] wrote: Hi, I'd like to read an environment variable with PHP. I've tried with : exec ('echo $CONTEXTE_D_EXECUTION',$result); $result is empty !!! I've put

[PHP] Referring URL Authentication

2007-03-14 Thread Matthew Vickery
The situation is as follows: I wish to protect the entire Website http://www.example.com from direct URL access. i.e. if someone enters http://www.example.com into their browser they get a message stating that they are not authorised to access the site. The only way to access

Re: [PHP] Environment variables...

2007-03-14 Thread David BERCOT
Le Wed, 14 Mar 2007 09:42:13 -0500, Erik Jones [EMAIL PROTECTED] a écrit : Depending on your system and environment (platform and cli v. cgi), they should be in either of the $_ENV or $_SESSION superglobals. It is Debian... But the variable I added is not in $_ENV or $_SESSION superglobals...

[PHP] Parse

2007-03-14 Thread al phillips
I keep getting a parse error line x when trying view php info() Can you help please? - Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games.

Re: [PHP] Referring URL Authentication

2007-03-14 Thread Tijnema !
On 3/14/07, Matthew Vickery [EMAIL PROTECTED] wrote: The situation is as follows: I wish to protect the entire Website http://www.example.com from direct URL access. i.e. if someone enters http://www.example.com into their browser they get a message stating that they are not authorised to access

Re: [PHP] Parse

2007-03-14 Thread Andrei
al phillips wrote: I keep getting a parse error line x when trying view php info() Can you help please? - Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. . And the code you use would look like?

[PHP] Re: [!! SPAM] [PHP] Parse

2007-03-14 Thread Andrei
al phillips wrote: I keep getting a parse error line x when trying view php info() Can you help please? - Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. . Or maybe you should try with phpinfo() ?

Re: [PHP] Parse

2007-03-14 Thread Németh Zoltán
2007. 03. 14, szerda keltezéssel 07.53-kor al phillips ezt írta: I keep getting a parse error line x when trying view php info() Can you help please? no, if you don't post the exact error message and your code here btw, it is probably a typo in your code at line x, but we cannot see it as

Re: [PHP] Re: [!! SPAM] [PHP] Parse

2007-03-14 Thread Tijnema !
On 3/14/07, Andrei [EMAIL PROTECTED] wrote: al phillips wrote: I keep getting a parse error line x when trying view php info() Can you help please? - Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. .

Re: [PHP] Referring URL Authentication

2007-03-14 Thread Robert Cummings
On Wed, 2007-03-14 at 14:50 +, Matthew Vickery wrote: The situation is as follows: I wish to protect the entire Website http://www.example.com from direct URL access. i.e. if someone enters http://www.example.com into their browser they get a message stating that they are not authorised

[PHP] Re: Using a reentrant form

2007-03-14 Thread Tony Marston
I honestly don't know why people use the approach of having a hidden field on a re-entrant form to indicate whether it should be validated or not. I have used re-entrant forms for years without such a thing. How? Quite simply there are two phases to a form - GET, which requests a form from the

Fw: [PHP] PHP URL issues

2007-03-14 Thread Satyam
One more example of a questionable benchmark, not wrong but I wonder (as I was doing in my previous) whether it is really representative. There are two main ways to handle strings, one is to malloc exactly the required memory for each string and keep moving characters around from one chunk of

RE: [PHP] cannot load mysql extension - PHP Installation on Vista/Apache

2007-03-14 Thread Tim
-Message d'origine- De : Rahul Sitaram Johari [mailto:[EMAIL PROTECTED] Envoyé : mercredi 14 mars 2007 15:05 À : Richard Davey; PHP Objet : Re: [PHP] cannot load mysql extension - PHP Installation on Vista/Apache You kidding me? I didn't know anything about that! That could

RE: [PHP] Referring URL Authentication

2007-03-14 Thread Tim
-Message d'origine- De : Robert Cummings [mailto:[EMAIL PROTECTED] Envoyé : mercredi 14 mars 2007 16:13 À : Matthew Vickery Cc : php-general@lists.php.net Objet : Re: [PHP] Referring URL Authentication On Wed, 2007-03-14 at 14:50 +, Matthew Vickery wrote: The situation

Re: [PHP] cannot load mysql extension - PHP Installation on Vista/Apache

2007-03-14 Thread Rahul Sitaram Johari
Ave, Well good words there, I'm not gonna argue with you on that. And as much as I have heard general windows users crib about Vista's security features, I have heard same amount of praise by more 'developers' genre of users about its' security features. Your second suggestion of learning your

Re: Fw: [PHP] PHP URL issues

2007-03-14 Thread Robert Cummings
On Wed, 2007-03-14 at 16:31 +0100, Satyam wrote: One more example of a questionable benchmark, not wrong but I wonder (as I was doing in my previous) whether it is really representative. There are two main ways to handle strings, one is to malloc exactly the required memory for each string

Re: [PHP] PHP Printer

2007-03-14 Thread Jim Lucas
raaj sharma wrote: Sir, I am trying to use printer functions in my script.pls. help me. The printer is working fine with other documents of ms-word etc. pls. help me Thanx Raaj The code is: ?php $handle = printer_open(); printer_write($handle, Text to print); printer_close($handle); ?

Re: [PHP] PHP Printer

2007-03-14 Thread Tijnema !
On 3/14/07, Jim Lucas [EMAIL PROTECTED] wrote: raaj sharma wrote: Sir, I am trying to use printer functions in my script.pls. help me. The printer is working fine with other documents of ms-word etc. pls. help me Thanx Raaj The code is: ?php $handle = printer_open();

RE: [PHP] cannot load mysql extension - PHP Installation on Vista/Apache

2007-03-14 Thread Tim
-Message d'origine- De : Rahul Sitaram Johari [mailto:[EMAIL PROTECTED] Envoyé : mercredi 14 mars 2007 16:48 À : Tim; PHP Objet : Re: [PHP] cannot load mysql extension - PHP Installation on Vista/Apache Ave, Well good words there, I'm not gonna argue with you on that.

Re: [PHP] PHP Printer

2007-03-14 Thread Jim Lucas
Tijnema ! wrote: On 3/14/07, Jim Lucas [EMAIL PROTECTED] wrote: raaj sharma wrote: Sir, I am trying to use printer functions in my script.pls. help me. The printer is working fine with other documents of ms-word etc. pls. help me Thanx Raaj The code is: ?php $handle =

Re: [PHP] PHP Printer

2007-03-14 Thread Tijnema !
On 3/14/07, Jim Lucas [EMAIL PROTECTED] wrote: Tijnema ! wrote: On 3/14/07, Jim Lucas [EMAIL PROTECTED] wrote: raaj sharma wrote: Sir, I am trying to use printer functions in my script.pls. help me. The printer is working fine with other documents of ms-word etc. pls. help me Thanx

Re: Fw: [PHP] PHP URL issues

2007-03-14 Thread Satyam
- Original Message - From: Robert Cummings [EMAIL PROTECTED] To: Satyam [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Wednesday, March 14, 2007 4:49 PM Subject: Re: Fw: [PHP] PHP URL issues On Wed, 2007-03-14 at 16:31 +0100, Satyam wrote: One more example of a questionable

Re: [PHP] Referring URL Authentication

2007-03-14 Thread Matthew Vickery
Robert Cummings wrote: On Wed, 2007-03-14 at 14:50 +, Matthew Vickery wrote: The situation is as follows: I wish to protect the entire Website http://www.example.com from direct URL access. i.e. if someone enters http://www.example.com into their browser they get a message stating that they

Re: Fw: [PHP] PHP URL issues

2007-03-14 Thread Robert Cummings
On Wed, 2007-03-14 at 17:15 +0100, Satyam wrote: - Original Message - From: Robert Cummings [EMAIL PROTECTED] To: Satyam [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Wednesday, March 14, 2007 4:49 PM Subject: Re: Fw: [PHP] PHP URL issues On Wed, 2007-03-14 at 16:31

[PHP] logging erros and user access to logs

2007-03-14 Thread Jason Joines
My users want to be able to debug their scripts, see mysql errors, and such. Using mysql_error(), and display_errors, problems such as non-existent databases, or variable and such seem to get printed to the screen. However, syntax errors do not. They get written to the global php log, for

[PHP] $_POST array order

2007-03-14 Thread Tim
Hi, Quick question regarding $_POST array element order, first the situation: I am submitting a form with x first fields and the post value returns the last element as being the submit button name and value Is it safe to consider that the last element in the $_POST array will ALWAYS be the

[PHP] Re: $_POST array order

2007-03-14 Thread Al
Why not simply unset() the unwanted value by its key, i.e., the submit button's name. Tim wrote: Hi, Quick question regarding $_POST array element order, first the situation: I am submitting a form with x first fields and the post value returns the last element as being the submit button

RE: [PHP] $_POST array order

2007-03-14 Thread Brad Fuller
-Original Message- From: Tim [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 14, 2007 12:58 PM To: 'PHP' Subject: [PHP] $_POST array order Hi, Quick question regarding $_POST array element order, first the situation: I am submitting a form with x first fields and the post

Re: [PHP] variables in CSS in PHP question/problems

2007-03-14 Thread tedd
At 2:15 AM -0500 3/14/07, Richard Lynch wrote: Surf directly to your CSS URL and see what happens. There are several possibiliies: #1. Your CSS has ?php ... ? in its output, because you have not convinced your web-server to run your CSS file through PHP to compute the dynamic result. You need

Re: [PHP] Re: $_POST array order

2007-03-14 Thread Jochem Maas
Al wrote: Why not simply unset() the unwanted value by its key, i.e., the submit button's name. actually double unset it. to avoid the request array key hack that exists in older versions of php :-) Tim wrote: Hi, Quick question regarding $_POST array element order, first the situation:

Re: [PHP] Referring URL Authentication

2007-03-14 Thread Robert Cummings
On Wed, 2007-03-14 at 16:23 +, Matthew Vickery wrote: Robert Cummings wrote: On Wed, 2007-03-14 at 14:50 +, Matthew Vickery wrote: The situation is as follows: I wish to protect the entire Website http://www.example.com from direct URL access. i.e. if someone enters

Re: [PHP] Environment variables...

2007-03-14 Thread Erik Jones
Well, as David BERCOT pointed out, if this is in a web environment then the environment available to php will be that of whatever user your web server is running as (probably 'nobody' if you're on apache, not sure about other web servers). So, you'll need to look at making that variable

Re: [PHP] $_POST array order

2007-03-14 Thread Tijnema !
On 3/14/07, Tim [EMAIL PROTECTED] wrote: Hi, Quick question regarding $_POST array element order, first the situation: I am submitting a form with x first fields and the post value returns the last element as being the submit button name and value Is it safe to consider that the last element

Re: [PHP] displaying image from MySQL DB using HTML/PHP

2007-03-14 Thread Børge Holen
On Tuesday 13 March 2007 22:09, Tijnema ! wrote: On 3/13/07, Bruce Gilbert [EMAIL PROTECTED] wrote: On 3/13/07, Tijnema ! [EMAIL PROTECTED] wrote: So you just need to set the content-type and output add this to the bottom of the script: header(Content-Type: .$encodeddata); echo

Re: [PHP] PHP URL issues

2007-03-14 Thread Jim Lucas
Steve wrote: I personally have not unfortunately. A good friend of mine is also a developer who initially told me about it when I first began coding. Because I don't want to stick with the he-said, she-said approach, I did a quick google search and came up with this link:

Re: [PHP] $_POST array order

2007-03-14 Thread Richard Lynch
On Wed, March 14, 2007 11:58 am, Tim wrote: Quick question regarding $_POST array element order, first the situation: I am submitting a form with x first fields and the post value returns the last element as being the submit button name and value Is it safe to consider that the last

RE: [PHP] $_POST array order

2007-03-14 Thread Richard Lynch
On Wed, March 14, 2007 12:28 pm, Brad Fuller wrote: You could also omit the name parameter of the submit button and it will not even be passed at all. input type=submit value= Submit Form I dunno about these new-fangled browsers, but in the old ones, you'd get Submit as the name if the user

Re: [PHP] logging erros and user access to logs

2007-03-14 Thread Richard Lynch
Get the errors OFF the web page (display_errors OFF) and into the logs and provide your users with logs for their own domains with vhosts. On Wed, March 14, 2007 11:02 am, Jason Joines wrote: My users want to be able to debug their scripts, see mysql errors, and such. Using mysql_error(),

Re: [PHP] Re: Using a reentrant form

2007-03-14 Thread Richard Lynch
And if the user re-loads the page they just POSTed? On Wed, March 14, 2007 10:24 am, Tony Marston wrote: I honestly don't know why people use the approach of having a hidden field on a re-entrant form to indicate whether it should be validated or not. I have used re-entrant forms for years

Re: [PHP] Parse

2007-03-14 Thread Richard Lynch
?php phpinfo();? No space in the function name 'phpinfo' If that's not it, show us your source code. On Wed, March 14, 2007 9:53 am, al phillips wrote: I keep getting a parse error line x when trying view php info() Can you help please? - Be a PS3

RE: [PHP] $_POST array order

2007-03-14 Thread Robert Cummings
On Wed, 2007-03-14 at 17:23 -0500, Richard Lynch wrote: On Wed, March 14, 2007 12:28 pm, Brad Fuller wrote: You could also omit the name parameter of the submit button and it will not even be passed at all. input type=submit value= Submit Form I dunno about these new-fangled

Re: [PHP] Environment variables...

2007-03-14 Thread Richard Lynch
PHP runs as its own user in its own environment. Stuff you cram into your environment has no effect on that, as it should be. If you alter the environment of the PHP user you might get what you want. You may also be able to use http://php.net/setenv And http://php.net/getenv is probably faster

RE: [PHP] Re: question regarding form filtering

2007-03-14 Thread Richard Lynch
On Wed, March 14, 2007 9:07 am, Tim wrote: You almost for sure do *NOT* want to attempt to send the entire Webster's 2nd Edition dictionary to the browser as JS data so that the JS can check. :-) Hehe, oh? Really? ;-) I suppose you could do a Web 2.0 Ajax-y thingie for that... Not a

Re: [PHP] 2 errors I can not understand

2007-03-14 Thread Richard Lynch
On Wed, March 14, 2007 6:52 am, Myron Turner wrote: Richard Lynch wrote: On Tue, March 13, 2007 6:04 pm, Jonathan Kahan wrote: The = operator takes precedence, and $d is set to 0. But why? According to the manual, the modulus operator has precedence over the equals! So shouldn't this

Re: [PHP] PHP 5.2 + IE 7 = HTTP 304 in login procedure [SOLVED]

2007-03-14 Thread Richard Lynch
On Wed, March 14, 2007 6:22 am, Seak, Teng-Fong wrote: Richard Lynch wrote: I wonder if the changes that allow for Interntional domain names, with various Unicode characters I don't even know how to get out of my keyboard, *ALSO* made _ suddenly be legal... Just a hypothesis. I gotta say

Re: [PHP] Re: Using a reentrant form

2007-03-14 Thread Tony Marston
Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] And if the user re-loads the page they just POSTed? Easy peasy. After a successful POST I perform a redirect, either to the same page or a different, which changes the POST into a GET. So if the user presses the refresh

Re: [PHP] Redirecting in a PHP script

2007-03-14 Thread Ben Ramsey
On 3/13/07 4:50 PM, Tijnema ! wrote: Did you guys ever noted that little arrow down just right of the back button, where you can go back 2 steps at once, so you don't have to click very fast?? Browsers have buttons in them? Next thing, you'll be telling me I can see images and color in my

[PHP] Regex error

2007-03-14 Thread jekillen
Hello; The following regex: ereg(member value='[a-zA-Z ]{1,25}' uspace='([a-z0-9-\.\/]{2,11})' id='$m[1]', $groups, $m1); is causing the following error: Warning: ereg() [function.ereg]: REG_ERANGE in path info_proc.php on line 81 Can someone tell me what this means? What I am trying to

[PHP] Re: Regex error

2007-03-14 Thread Al
Get The Regex Coach http://weitz.de/regex-coach/ Use preg_match_all() Build your pattern one step at a time using the coach. Don't forget the delimiters. jekillen wrote: Hello; The following regex: ereg(member value='[a-zA-Z ]{1,25}' uspace='([a-z0-9-\.\/]{2,11})' id='$m[1]', $groups,

Re: [PHP] Regex error

2007-03-14 Thread Myron Turner
jekillen wrote: Hello; The following regex: ereg(member value='[a-zA-Z ]{1,25}' uspace='([a-z0-9-\.\/]{2,11})' id='$m[1]', $groups, $m1); is causing the following error: Warning: ereg() [function.ereg]: REG_ERANGE in path info_proc.php on line 81 Can someone tell me what this means?

[PHP] register_globals and passing variables

2007-03-14 Thread Jeff
Ok, all I am new to PHP MySQL. (please don't let this scare you off) I had my site hosted with Gisol.com and due to their very poor service and tech support I left them for Lunarpages.com who so far have a better service and their tech support is excellent!! But my pages won't pass variables

[PHP] Can a Form Action transfer to another file that is a form?

2007-03-14 Thread Stephen
I have a script file that is both the form and action handle (using isset), which is a menu selection. If the action handler is executing it is a switch statement that will chose the next form. I would like to transfer to another script file that is also a combination form and handler.

[PHP] Passing Variables

2007-03-14 Thread Jeff
Ok, all I am new to PHP MySQL. (please don't let this scare you off) I had my site hosted with Gisol.com and due to their very poor service and tech support I left them for Lunarpages.com who so far have a better service and their tech support is excellent!! But my pages won't pass variables any

[PHP] re regex error

2007-03-14 Thread jekillen
Hello again; Regarding the error I was inquiring about: Warning: ereg() [function.ereg]: REG_ERANGE in path info_proc.php on line 81 I still would like to know what it means but I solved the script problem. I found that since $groups is a string that was exploded to form the $g_list array

Re: [PHP] register_globals and passing variables

2007-03-14 Thread Bruce Cowin
Hi Jeff, You want to leave register_globals OFF. Depending on how $charid is passed, you want to use $_POST or $_GET: $charid = $_POST['charid']; or $charid = $_GET['charid']; I think you'll need to do the same for your $db_select variable. Is that what you're after? Regards, Bruce

Re: [PHP] Passing Variables

2007-03-14 Thread Richard Lynch
On Wed, March 14, 2007 9:14 pm, Jeff wrote: I've read and the wrote back and told me that they use suPHP to parse php files and I have the option of using custom php.ini files. That I could create a .htaccess file or put individual php.ini files in the folder that contains the files im

Re: [PHP] Regex error

2007-03-14 Thread Richard Lynch
On Wed, March 14, 2007 7:56 pm, jekillen wrote: Hello; The following regex: ereg(member value='[a-zA-Z ]{1,25}' uspace='([a-z0-9-\.\/]{2,11})' id='$m[1]', $groups, $m1); is causing the following error: Warning: ereg() [function.ereg]: REG_ERANGE in path info_proc.php on line 81 Can

Re: [PHP] register_globals and passing variables

2007-03-14 Thread Larry Garfield
Firstly, welcome to PHP. :-) Secondly, that's not how you would enable register_globals if they're not enabled. Thirdly, you do not want to turn on register_globals. register globals are a security risk. They're disabled by default on any recent (within the past 5 years) version of PHP,

Re: [PHP] Class and subclass

2007-03-14 Thread Richard Lynch
I think you'd need to take this up with Zend if they are claiming it's invalid syntax when it is valid. If it's really not valid, I'm not seeing why, but what do I know? On Tue, March 13, 2007 4:18 am, Alain Roger wrote: Hi Richard, In fact the problem is that under Zend Studio editor, when i

Re: [PHP] re regex error

2007-03-14 Thread Jim Lucas
jekillen wrote: Hello again; Regarding the error I was inquiring about: Warning: ereg() [function.ereg]: REG_ERANGE in path info_proc.php on line 81 I still would like to know what it means but I solved the script problem. I found that since $groups is a string that was exploded to form

Re: [PHP] Redirecting in a PHP script

2007-03-14 Thread Richard Lynch
On Tue, March 13, 2007 3:41 pm, Chris Shiflett wrote: Robert Cummings wrote: I've found clicking really fast can get you back :) I, too, have successfully used this technique. :-) +1 Sometimes back button followed at just the right time by top so I get the HTML, but no JS runs. -- Some

Re: [PHP] Redirecting in a PHP script

2007-03-14 Thread Richard Lynch
On Tue, March 13, 2007 3:50 pm, Tijnema ! wrote: On 3/13/07, Chris Shiflett [EMAIL PROTECTED] wrote: Robert Cummings wrote: I've found clicking really fast can get you back :) I, too, have successfully used this technique. :-) Chris Did you guys ever noted that little arrow down just

  1   2   >