Re: [PHP] problems with exec()

2006-11-30 Thread Juanjo Pascual
What is the safe_mode value in your php.ini? To run exec the value of your safe_mode has to be OFF. [EMAIL PROTECTED] escribió: Try exec('/path/to/copy', $return); print_r($return); read the manual : http://nl3.php.net/manual/en/function.exec.php Description string exec ( string command [,

[PHP] [PHP 4.4.5 / Apache 2.2.3] Abrupt and unrepeatable Segmentation fault (11)

2006-11-30 Thread Jan Schröter
Hi all! I'm having trouble with my server(s) for some weeks now and did not find any solution for now. My System is Opensuse 10.1 (32 bit) with Apache 2.2.3 and PHP 4.4.5-dev as apache module (latest stable CVS, but wasn't the solution). Im having abrupt segmentation faults in my Apache

Re: [PHP] problems with exec()

2006-11-30 Thread Jan Schröter
Think he's not getting an general error - just didn't read the manual concerning the return value of exec. kind regards jan Juanjo Pascual wrote: What is the safe_mode value in your php.ini? To run exec the value of your safe_mode has to be OFF. [EMAIL PROTECTED] escribió: Try

Re: [PHP] Detecting naughty sites

2006-11-30 Thread Satyam
The Wikipedia article of the day provides some interesting facts about when if became naughty: http://en.wikipedia.org/wiki/History_of_erotic_depictions -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Tidy HTML source?

2006-11-30 Thread Satyam
- Original Message - From: Paul Novitski [EMAIL PROTECTED] At 11/29/2006 05:13 AM, Satyam wrote: - Original Message - From: Paul Novitski [EMAIL PROTECTED] What I find to be a much greater problem is the human readability of logic code when HTML is mixed throughout. Your

Re: [PHP] LDAP password question

2006-11-30 Thread Alain Roger
Hi Ray, the question is for which reason you need to know something about the pwd ? to log on ? if yes, it's not needed. I personally did like that : 1. with login + pwd given by user, i try to bind. 2. if bind works, it means that user login+pwd are equal to AD login+pwd. 3. if error during

[PHP] Webbased Visual DOM Training Tool

2006-11-30 Thread Bernhard Zwischenbrugger
Hi all I made a web based visual Document Object Model (DOM) Training Tool for my students: http://test.datenkueche.com (you need Firefox !!!) Before I torture my students with this tools, I would like to have some feedback from php mailinglist. This tool should help to learn the DOM Object

[PHP] Help with strange include problem in PHP 5.2.0

2006-11-30 Thread Markus Mayer
Hi all, I have a strange problem including files in PHP 5.2.0 running on Unix. If I try to include a file using include 'filename.inc';, everything is fine. As soon as I try to put a . in front of the file name, for example include './filename.inc';, I get a failed to open stream: No such

[PHP] turning use session cookies off still uses cookies?

2006-11-30 Thread blackwater dev
I asked a similar question the other day but I have been having an issue lately with my sessions and certain browsers. I then tried to set my session.use_cookies var in php.ini to 0 yet if I log in and don't have cookies turned on, the sessions still don't seem to work. Can I really use

Re: [PHP] Tidy HTML source?

2006-11-30 Thread clive
Mark Kelly wrote: Am I crazy to make an extra effort in my code to make the generated HTML pretty? By this I mean linebreaks, indentation etc. - stuff that is aimed at readability rather than correctness. This is obviously above and beyond simply making sure it validates. It's not a huge

RE: [PHP] LDAP password question

2006-11-30 Thread Ray Hauge
Hello, I was actually wondering if the PHP implementation of an LDAP client encodes the password before being sent, or if it sends the password in plain-text. The most information I've got on this subject, so far, is from http://adldap.sourceforge.net/faq.php Q. Why am I getting poor

Re: [PHP] hiding passwd in cmdlines that appear in the process list

2006-11-30 Thread Jochem Maas
Richard Lynch wrote: Don't use exec. ;-v yeah - which is annoying because outside of php/exec() using the `cat /path/2/myqyl/passwd` trick works (i.e. ps doesn't give the passwd away) thanks to everyone for there input - I have plenty to read/think about, I send something back to the list when

Re: [PHP] SEGINT, readline extension clean script exit - how to do it

2006-11-30 Thread Jochem Maas
hi Richard, Richard Lynch wrote: On Tue, November 28, 2006 7:25 am, Jochem Maas wrote: so the question is how can I use readline() and handle the SIGINT gracefully whilst not waiting for readline() to return control to my script? I'm just guessing here, but you probably don't. I guess so

Re: [PHP] problems with exec()

2006-11-30 Thread Ray
Hi, thanks for your help. I was using exec('/path/to/copy', $return); var_dump($return); (but I simplified it for posting) and I was still getting no output. actually, the return value is the least of my concerns, I just want this script to move some files around and the script works from the

RE: [PHP] turning use session cookies off still uses cookies?

2006-11-30 Thread Vincent DUPONT
look at this inside the PHP.INI ; trans sid support is disabled by default. ; Use of trans sid may risk your users security. ; Use this option with caution. ; - User may send URL contains active session ID ; to other person via. email/irc/etc. ; - URL that contains active session ID may be

RE: [PHP] turning use session cookies off still uses cookies?

2006-11-30 Thread Vincent DUPONT
hello, you can use sessions without cookies by asking PHP to ad the sessionid into every link on your website. I don't remember how to do this, but there should be a php_ini directive, and more info on the php.net/manual website. vincent -Original Message- From: blackwater dev

Re: [PHP] problems with exec()

2006-11-30 Thread admin
Output you will only get if something goes wrong with the copy process. But then again you say the 'whoami' command runs perfect. So the only things that comes to my sleepy brain is incorrect paths or permissions. Tried it here with 5.2 and 4.4.4 and seems to work. Maybe somebody else has a

Re: [PHP] hiding passwd in cmdlines that appear in the process list

2006-11-30 Thread Edwin Barrios
Hi !. I don't know if my solution is better or not. but in one of my programs i had to make a backup online then my solution was to use shell vars to put important information like db_password . When we use putenv function those var only exists on the current shell and on its subshells. In your

Re: [PHP] hiding passwd in cmdlines that appear in the process list

2006-11-30 Thread Jochem Maas
Edwin Barrios wrote: Hi !. I don't know if my solution is better or not. neither do I! but I'm certainly going to give the alternative a go and see what exsact it shows in the process list. thanks for the tip! but in one of my programs i had to make a backup online then my solution was

[PHP] Issues with tidy and utf-8 encoding

2006-11-30 Thread Youri LACAN-BARTLEY
Hi list, this is my first post and I've only been lurking around these premises for the past week. I've been running into some strange issues with tidy. When I try and output my HTML in utf-8 all the accentuated characters come out as total gobbledeegook. I've have no issues echoing a string

Re: [PHP] magic_quotes

2006-11-30 Thread Johannes Lindenbaum
Chris schrieb: That part is correct. You shouldn't need to use addslashes - use mysql_real_escape_string or mysql_escape_string depending on your (current) php version - they are both locale aware and will escape things for you depending on mysql server (re: language setup). Then just use

Re: [PHP] magic_quotes

2006-11-30 Thread Robert Cummings
On Thu, 2006-11-30 at 10:37 -0600, Johannes Lindenbaum wrote: Chris schrieb: That part is correct. You shouldn't need to use addslashes - use mysql_real_escape_string or mysql_escape_string depending on your (current) php version - they are both locale aware and will escape things for

Re: [PHP] magic_quotes

2006-11-30 Thread Eric Butera
On 11/30/06, Johannes Lindenbaum [EMAIL PROTECTED] wrote: And on retrieval stripslashes(). You shouldn't have to stripslashes your data coming from the DB. Addslashes and friends exist to escape your data. It is not part of your data. So when you INSERT Jingle\'s Bells when you retrieve it

Re: [PHP] Issues with tidy and utf-8 encoding

2006-11-30 Thread Richard Lynch
On Thu, November 30, 2006 10:21 am, Youri LACAN-BARTLEY wrote: Which is really dodgy if you ask me. ... I've set a meta tag as follows, but that seems to be modified by tidy on the fly if ever the used encoding differs from the one indicated in the meta tag. E. Using an encoding other

Re: [PHP] SEGINT, readline extension clean script exit - how to do it

2006-11-30 Thread Richard Lynch
On Thu, November 30, 2006 8:41 am, Jochem Maas wrote: hi Richard, Richard Lynch wrote: On Tue, November 28, 2006 7:25 am, Jochem Maas wrote: so the question is how can I use readline() and handle the SIGINT gracefully whilst not waiting for readline() to return control to my script? I'm

Re: [PHP] hiding passwd in cmdlines that appear in the process list

2006-11-30 Thread Richard Lynch
On Thu, November 30, 2006 9:59 am, Edwin Barrios wrote: I don't know if my solution is better or not. but in one of my programs i had to make a backup online then my solution was to use shell vars to put important information like db_password . When we use putenv function those var only

Re: [PHP] regular expressions

2006-11-30 Thread tedd
At 11:42 PM +0200 11/29/06, Dotan Cohen wrote: On 20/11/06, Paul Novitski [EMAIL PROTECTED] wrote: -snip- Paul, I just got around to reading this thread. The post of yours that I quote above has got to be one of the best posts that I've read in the 5 years that I've been on and off the php list.

Re: [PHP] turning use session cookies off still uses cookies?

2006-11-30 Thread Richard Lynch
On Thu, November 30, 2006 7:42 am, blackwater dev wrote: I asked a similar question the other day but I have been having an issue lately with my sessions and certain browsers. I then tried to set my session.use_cookies var in php.ini to 0 yet if I log in and don't have cookies turned on, the

Re: [PHP] Tidy HTML source?

2006-11-30 Thread Paul Novitski
At 11/30/2006 01:52 AM, Satyam wrote: And, stepping back, you're perpetuating the embedding of markup with logic so that it will still take a PHP programmer to modify the markup of one of your pages. Do you not see the advantage in separating the two layers? Yes, I do, and I would recommend

Re: [PHP] Webbased Visual DOM Training Tool

2006-11-30 Thread Richard Lynch
On Thu, November 30, 2006 6:56 am, Bernhard Zwischenbrugger wrote: I made a web based visual Document Object Model (DOM) Training Tool for my students: http://test.datenkueche.com (you need Firefox !!!) I found it annoying that I couldn't break out of demo1 by clicking on demo2 demo1 demo2

Re: [PHP] Help with strange include problem in PHP 5.2.0

2006-11-30 Thread Richard Lynch
On Thu, November 30, 2006 6:49 am, Markus Mayer wrote: I have a strange problem including files in PHP 5.2.0 running on Unix. If I try to include a file using include 'filename.inc';, everything is fine. As soon as I try to put a . in front of the file name, for example include

Re: [PHP] hiding passwd in cmdlines that appear in the process list

2006-11-30 Thread Edwin Barrios
On 11/30/06, Richard Lynch [EMAIL PROTECTED] wrote: On Thu, November 30, 2006 9:59 am, Edwin Barrios wrote: I don't know if my solution is better or not. but in one of my programs i had to make a backup online then my solution was to use shell vars to put important information like

Re: [PHP] magic_quotes

2006-11-30 Thread Richard Lynch
On Wed, November 29, 2006 11:55 pm, Johannes Lindenbaum wrote: But... magic_quotes. If my understanding is correct magic quotes will give ', and \ (for ASCII characters, e.g. \n) a preceding backslash to escape it. I also see that magic_quotes_gpc() is On by default. So all data in $_POST

Re: [PHP] cURL: can't prevent url redirect

2006-11-30 Thread Richard Lynch
On Wed, November 29, 2006 10:09 pm, Andrew Warner wrote: This login script works when I use Snoopy (php http class), but here with php curl the response is the redirected page. The script is following a 302 redirect and I don't want it to because I need some header info from the 302 page. The

Re: [PHP] cURL: can't prevent url redirect

2006-11-30 Thread Richard Lynch
On Wed, November 29, 2006 11:26 pm, Andrew Warner wrote: Actually, the problem is that the site isn't recognizing my cookies. Is there anything wrong with the below code? Same thing in Snoopy works perfectly. Going to stick with Snoopy. $the_headers = array( Language: en, Accept:

Re: [PHP] hiding passwd in cmdlines that appear in the process list

2006-11-30 Thread Edwin Barrios
Hi .! First of all . Pardon if my last mail was not undestable !! Then Richrad said that, the following is a cons of my solution : A simple debug statement to dump out all of ENV / $_GLOBALS will expose the password. So you have to ask yourself if you and all your employees and all the

Re: [PHP] several sites sharing the same script

2006-11-30 Thread Richard Lynch
http://php.net/include_path On Wed, November 29, 2006 5:48 pm, [EMAIL PROTECTED] wrote: Hello all, I am writing new php application which will be used by several sites. All sites will use same script (all files), but every will have its own config.php file. I would like to place all

RE: [PHP] Maybe an HTML prob?

2006-11-30 Thread Richard Lynch
On Wed, November 29, 2006 3:14 pm, Frank Reichenbacher, Bio-Concepts, Inc. wrote: Well, my code worked fine with that one simple change from = to == Well, that means you aren't using E_ALL, as there *IS* an E_NOTICE being issued for $_POST['Permission'] when you attempt to read it, as it's not

Re: [PHP] magic_quotes

2006-11-30 Thread Johannes Lindenbaum
Richard Lynch schrieb: On Wed, November 29, 2006 11:55 pm, Johannes Lindenbaum wrote: But... magic_quotes. If my understanding is correct magic quotes will give ', and \ (for ASCII characters, e.g. \n) a preceding backslash to escape it. I also see that magic_quotes_gpc() is On by default.

Re: [PHP] Tidy HTML source?

2006-11-30 Thread Sancar Saran
On Thursday 30 November 2006 18:51, Paul Novitski wrote: At 11/30/2006 01:52 AM, Satyam wrote: And, stepping back, you're perpetuating the embedding of markup with logic so that it will still take a PHP programmer to modify the markup of one of your pages. Do you not see the advantage in

Re: [PHP] hiding passwd in cmdlines that appear in the process list

2006-11-30 Thread Jochem Maas
Richard Lynch wrote: On Thu, November 30, 2006 9:59 am, Edwin Barrios wrote: I don't know if my solution is better or not. but in one of my programs i had to make a backup online then my solution was to use shell vars to put important information like db_password . When we use putenv

Re: [PHP] Webbased Visual DOM Training Tool

2006-11-30 Thread Jochem Maas
Richard Lynch wrote: On Thu, November 30, 2006 6:56 am, Bernhard Zwischenbrugger wrote: I made a web based visual Document Object Model (DOM) Training Tool for my students: http://test.datenkueche.com (you need Firefox !!!) I found it annoying that I couldn't break out of demo1 by

Re: [PHP] magic_quotes

2006-11-30 Thread Chris Shiflett
Johannes Lindenbaum wrote: Just a question out of pure curiosity. Why would one prefer using mysql_real_escape_string (I'm using 5.1.6 so mysql_escape_string is deprecated). and htmlentities instead of addslashes and stripslashes? This example might be helpful:

[PHP] problem with register globals on new server

2006-11-30 Thread afan
hi, I had to move my osComerce store to new hosting company. new server runs on php5/mysql5. got this error: FATAL ERROR: register_globals is disabled in php.ini, please enable it! since evenon old server globals was Off I was adding ifModule mod_php4.c php_value register_globals 1 /ifModule

[PHP] Preg_match - Find URL and convert to lower case

2006-11-30 Thread Kevin Murphy
I have some text that comes out of a database all in uppercase (old IBM Mainframe that only supports uppercase characters). Occasionally there are web addresses in this text and so I am trying to find them, convert them to a link, and convert them all to all lower case. Yes, I know that

Re: [PHP] Preg_match - Find URL and convert to lower case

2006-11-30 Thread Dave Goodchild
Why not use strtolower on the string after the replacements have been made? -- http://www.web-buddha.co.uk

Re: [PHP] Preg_match - Find URL and convert to lower case

2006-11-30 Thread Kevin Murphy
Well the problem would be then that the entire string would be lower case, and I only can have the link as lower case. Is there a way to apply strtolower into the preg_match? -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu

Re: [PHP] Webbased Visual DOM Training Tool

2006-11-30 Thread Bernhard Zwischenbrugger
Hi http://test.datenkueche.com (you need Firefox !!!) I found it annoying that I couldn't break out of demo1 by clicking on demo2 I have so many setTimout in javascript... but good point, I will change that. Reload the page can be a workaround for now. demo1 demo2 demo3 should

[PHP] Re: SOLVED: [PHP] Preg_match - Find URL and convert to lower case

2006-11-30 Thread Kevin Murphy
$section_notes = preg_replace('/WWW.(.*?) /e', 'a href=\http:// www. . strtolower($1) . \ target=\_blank\http://www.; . strtolower($1) . /a', $section_notes); For some reason I can't get it to work if I decare those items as variables. They have to be inside the preg_replace as written.

Re: [PHP] Tidy HTML source?

2006-11-30 Thread Paul Novitski
On Thursday 30 November 2006 18:51, Paul Novitski wrote: With respect to separating code and markup, you said sometimes there are reasons not to do so, for example, web services. What are some of those reasons? At 11/30/2006 10:57 AM, Sancar Saran wrote: What about performance ? Web

[PHP] EZ array problem - What's wrong with my brain?

2006-11-30 Thread Brian Dunning
var_dump() gives me this: array(1) { [1.2]= array(2) { [code]= array(1) { [0]= string(3) 111 } [status]= array(1) { [0]= string(3) new } } } I'm trying to set a variable to that 1.2. Shouldn't I be able to get it with $var = $arr[0][0]?

Re: [PHP] [PHP 4.4.5 / Apache 2.2.3] Abrupt and unrepeatable Segmentation fault (11)

2006-11-30 Thread Chris
Jan Schröter wrote: Hi all! I'm having trouble with my server(s) for some weeks now and did not find any solution for now. My System is Opensuse 10.1 (32 bit) with Apache 2.2.3 and PHP 4.4.5-dev as apache module (latest stable CVS, but wasn't the solution). Im having abrupt segmentation

Re: [PHP] problem with register globals on new server

2006-11-30 Thread Chris
[EMAIL PROTECTED] wrote: hi, I had to move my osComerce store to new hosting company. new server runs on php5/mysql5. got this error: FATAL ERROR: register_globals is disabled in php.ini, please enable it! since evenon old server globals was Off I was adding ifModule mod_php4.c php_value

[PHP] Re: Preg_match - Find URL and convert to lower case

2006-11-30 Thread Jonesy
On Thu, 30 Nov 2006 14:16:16 -0800, Kevin Murphy wrote: I have some text that comes out of a database all in uppercase (old IBM Mainframe that only supports uppercase characters). I see via other followups that you have your kludge working. *But* , What do you mean by old IBM Mainframe