[PHP] php via cmdline including unwanted headers

2007-05-29 Thread Sebe
I run some scripts via php (cgi) which sends output to another file, but it's including unwanted cookie header, etc in the outfile. example: php /home/dev/script.php > /home/production/feeds/news.xml 2>&1 and at the top of news.xml i get: X-Powered-By: PHP/5.2.2 Set-Cookie: . Set-Cookie:

Re: [PHP] OOB problem, super stumped.

2007-05-29 Thread Jim Lucas
Brian Seymour wrote: I am super stumped. This works fine separately but when I put everything together it breaks. I has an authenticate class and a sql class. However I always get the same error. SQL class. class SQL { public $host; public $user;

RE: [PHP] OOB problem, super stumped. (resolved)

2007-05-29 Thread Robert Cummings
On Tue, 2007-05-29 at 23:07 -0400, Brian Seymour wrote: > Strangely enough the only thing that was wrong was: > > $this->result=mysql_query($query, $this->conx); > > I removed $this->conx so it looked like > > $this->result=mysql_query($query); NO NO NO... don't do that. If you remove the link

RE: [PHP] OOB problem, super stumped. (resolved)

2007-05-29 Thread Brian Seymour
Strangely enough the only thing that was wrong was: $this->result=mysql_query($query, $this->conx); I removed $this->conx so it looked like $this->result=mysql_query($query); And now everything works perfect. I also fixed the line you recommended I fix. I must have overlooked that =D. But anyho

Re: [PHP] OOB problem, super stumped.

2007-05-29 Thread Robert Cummings
On Tue, 2007-05-29 at 22:36 -0400, Brian Seymour wrote: > I am super stumped. This works fine separately but when I put everything > together it breaks. I has an authenticate class and a sql class. However I > always get the same error. The following line: > $this->conx=$this->connection($host,$u

[PHP] OOB problem, super stumped.

2007-05-29 Thread Brian Seymour
I am super stumped. This works fine separately but when I put everything together it breaks. I has an authenticate class and a sql class. However I always get the same error. SQL class. host=$host; $this->user=$user; $this->pass=$pass; $

Re: [PHP] Client does not support authentication protocol...

2007-05-29 Thread Chris
Zoltán Németh wrote: 2007. 05. 28, hétfő keltezéssel 23.52-kor Tom ezt írta: Hi, as always, I'm trying to connect to a MySQL database in the following way: mysql_connect('host','user','password'); In my local PC this Works perfectly, but in the server I receipt the following error: mysql_c

Re: [PHP] Re: Too many records to display in one web page

2007-05-29 Thread Chris
Steve wrote: The way I handle it: Step 1- Add SELECT SQL_CALC_FOUND_ROWS to the front of your initial query and add the pagination limit to the end (LIMIT 200, 400 or whatever range you want to display.) Step 2- Do a 2nd query: SELECT FOUND_ROWS() immediately after. With a *HUGE* clause th

Re: [PHP] Streaming download to IE doesn't work

2007-05-29 Thread Daniel Kasak
On Tue, 2007-05-29 at 13:52 +0200, Jochem Maas wrote: > Daniel Kasak wrote: > > Hi all. > > > > > > > Who knows WTF is wrong and how I can work around it? > > without getting into the holywar of download headers, > here is one mans's take/solution: > > http://richardlynch.blogspot.com/20

Re: [PHP] php and Ajax problem

2007-05-29 Thread Arpad Ray
Richard Kurth wrote: if(response.indexOf('|' != -1)) { Spot the misplaced bracket. if($_GET['takeaction']=="delete"){ $uid=$_GET['uid']; echo $uid; This is wide open to XSS attacks, you need to be just as careful with scripts intended to be accessed via javascript as you do with us

Re: [PHP] exec dont work for svn

2007-05-29 Thread Manolet Gmail
Hi, thanks petter, now im getting this error... svn: Can't check path '/root/.svn': Permission denied using this: $cmd = "svn up"; $cmd .= " --username $user --password $pass --non-interactive --revision $rev"; $cmd .= " --no-auth-cache --config-dir ~/.svn/ 2>&1"; i try

Re: [PHP] Re: a question on session ID and security

2007-05-29 Thread Stut
Jared Farrish wrote: I've asked the internals list why PHP doesn't natively validate the session ID by using the user agent or other variables because I actually don't know the reasoning behind it. I'll let you know what they say. I would think it's because browsers are flaky and you can't real

RE: [PHP] exec dont work for svn

2007-05-29 Thread Peter Lauri
Hi, In many apps the messages comes as STDERR, so try: exec("svn update 2>&1", $out); Best regards, Peter Lauri www.dwsasia.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free > -Original Message- > From: Manolet Gmail [mailto:[EMAIL PROTE

Re: [PHP] Re: a question on session ID and security

2007-05-29 Thread Jared Farrish
But by doing that you're exposing how your app validates the authentication key, leaving it open to being transferred to another machine. True. Although I'm only exposing a part of the auth chain, not *how* that is constructed to produce the actual authentication token. It does not, however, ti

[PHP] @imap_headerinfo->date

2007-05-29 Thread Umar
Dear Members! When I try to get email date through @imap_headerinfo the output like this Wed, 30 May 2007 01:14:03 +0900 Tue, 29 May 2007 22:31:43 +0500 But i want to change it e.g on current date it should be only time 01:14 PM and on previous day its should be (May 29) h

Re: [PHP] Re: a question on session ID and security

2007-05-29 Thread Stut
Jared Farrish wrote: That's not what I'm saying. My basic question is why send the "secondary hash key" to the client when it doesn't need it? Use the authentication key to identify the users data, then get the "secondary hash key" from that data. The browser never needs to see the hash, and from

[PHP] Re: Too many records to display in one web page

2007-05-29 Thread Steve
The way I handle it: Step 1- Add SELECT SQL_CALC_FOUND_ROWS to the front of your initial query and add the pagination limit to the end (LIMIT 200, 400 or whatever range you want to display.) Step 2- Do a 2nd query: SELECT FOUND_ROWS() immediately after. What does this do? It will return your

Re: [PHP] Re: a question on session ID and security

2007-05-29 Thread Jared Farrish
On 5/29/07, Jared Farrish <[EMAIL PROTECTED]> wrote: I do think the stated best practice of SESSIONS, at this point, probably does need to be described to be further useful as a topic of discussion. I've been a little unclear in some things, so I get the feeling we've got the same point of view,

[PHP] exec dont work for svn

2007-05-29 Thread Manolet Gmail
2007/5/28, Greg Donald <[EMAIL PROTECTED]>: On 5/28/07, Manolet Gmail <[EMAIL PROTECTED]> wrote: > but this doesnt work: > > exec("svn update",$out); > foreach($out as $line)echo"$line\n"; > > dont print anything... dont update the files Is it possible you need to provide some type of authentica

Re: [PHP] Re: a question on session ID and security

2007-05-29 Thread Jared Farrish
That's not what I'm saying. My basic question is why send the "secondary hash key" to the client when it doesn't need it? Use the authentication key to identify the users data, then get the "secondary hash key" from that data. The browser never needs to see the hash, and from a purist security poi

[PHP] ini_set() security question

2007-05-29 Thread Samuel Vogel
I would be very interested in knowing which options, that are accessible with PHP_INI_ALL or PHP_INI_PERDIR, could be risky to allow on a shared hosting server. I would like to allow the users to ini_set(), while disabling the risky options with php_admin_flag/value! Stuff like 'memory_limit'

Re: Fwd: [PHP] Re: a question on session ID and security

2007-05-29 Thread Stut
Jared Farrish wrote: On 5/29/07, Stut <[EMAIL PROTECTED]> wrote: Don't get me wrong, I don't want to discourage anyone from thinking about ways to improve it, but personally I consider this issue done to death. Well, I think the difference is that you send one key (a session identifier) and

Fwd: [PHP] Re: a question on session ID and security

2007-05-29 Thread Jared Farrish
On 5/29/07, Stut <[EMAIL PROTECTED]> wrote: Don't get me wrong, I don't want to discourage anyone from thinking about ways to improve it, but personally I consider this issue done to death. Well, I think the difference is that you send one key (a session identifier) and hash on user agent rep

Re: [PHP] Re: a question on session ID and security

2007-05-29 Thread Stut
Jared Farrish wrote: On 5/29/07, Stut <[EMAIL PROTECTED]> wrote: The only part of an SSL connection that's not encrypted is the handshaking that goes on to set it up in the first place. Everything after that, the GET/POST line, headers and the body as well as the entire response is encrypted.

Re: [PHP] Upload a ppt file

2007-05-29 Thread tedd
At 11:07 PM +0200 5/28/07, Tijnema wrote: On 5/28/07, tedd <[EMAIL PROTECTED]> wrote: Hi Gang: I can upload a text file and an image file via a html form, but I am having problems uploading a PowerPoint file. Apparently, that's a different critter. Duh! Thanks for the hints -- it was stupid

Re: [PHP] Re: a question on session ID and security

2007-05-29 Thread Jared Farrish
On 5/29/07, Stut <[EMAIL PROTECTED]> wrote: The only part of an SSL connection that's not encrypted is the handshaking that goes on to set it up in the first place. Everything after that, the GET/POST line, headers and the body as well as the entire response is encrypted. One of these days I'

Re: [PHP] Re: a question on session ID and security

2007-05-29 Thread Stut
Jared Farrish wrote: On 5/29/07, Stut <[EMAIL PROTECTED]> wrote: What utter crud. An SSL connection encrypts the whole HTTP conversation, including headers and even the URL you are requesting. The response is also encrypted. It doesn't matter whether you're doing a POST or a GET request, it's a

Re: [PHP] Re: Tipos about which CMS use

2007-05-29 Thread Dave Goodchild
You could also try Drupal. Drupal 5 comes bundled with jQuery. Drupal is powerful and flexible and the community is large and supportive.

Re: [PHP] Re: Tipos about which CMS use

2007-05-29 Thread robert mena
Hi, Thanks for the reply. I already use wordpress for my blog but not as a CMS. I could not find, for instance, the hability to create users with some sort of priviledge regarding reading/writing particular documents or areas. Can you send me more info about it? On 5/17/07, itoctopus <[EMAIL

[PHP] Re: a question on session ID and security

2007-05-29 Thread Jared Farrish
On 5/29/07, Stut <[EMAIL PROTECTED]> wrote: What utter crud. An SSL connection encrypts the whole HTTP conversation, including headers and even the URL you are requesting. The response is also encrypted. It doesn't matter whether you're doing a POST or a GET request, it's all encrypted. The U

Re: [PHP] Streaming download to IE doesn't work

2007-05-29 Thread Jochem Maas
Daniel Kasak wrote: > Hi all. > > Who knows WTF is wrong and how I can work around it? without getting into the holywar of download headers, here is one mans's take/solution: http://richardlynch.blogspot.com/2006_06_01_archive.html it should contain enough to help you out. PS. you might

[PHP] stack violation. after last line has been executed succesfully

2007-05-29 Thread Marc Weber
Hello. I've confirmed this problem on my gentoo linux box and using Xampp on windows.. = apache log = [Mon May 28 20:38:47 2007] [notice] child pid 16577 exit signal Aborted (6) *** glibc detected *** /usr/sbin/apache2: free(): invalid n

Re: [PHP] tinymce, php and mysql problem

2007-05-29 Thread Darren Whitlen
Zoltán Németh wrote: 2007. 05. 29, kedd keltezéssel 10.29-kor blueboy ezt írta: Hi, I am using tinymce to save news articles with very basic html styling in a database. This works well upto a point but when I get over a certain number of characters and then the 'you have an error in your SQL

Re: [PHP] tinymce, php and mysql problem

2007-05-29 Thread Zoltán Németh
2007. 05. 29, kedd keltezéssel 10.29-kor blueboy ezt írta: > Hi, > > I am using tinymce to save news articles with very basic html styling in a > database. This works well upto a point but when I get over a certain number > of characters and then the 'you have an error in your SQL syntax' error

[PHP] tinymce, php and mysql problem

2007-05-29 Thread blueboy
Hi, I am using tinymce to save news articles with very basic html styling in a database. This works well upto a point but when I get over a certain number of characters and then the 'you have an error in your SQL syntax' error. I am saving in as a LONGBLOB so it should not be a data type misma

Re: [PHP] Re: a question on session ID and security

2007-05-29 Thread Stut
Zoltán Németh wrote: 2007. 05. 29, kedd keltezéssel 10.09-kor Stut ezt írta: Jared Farrish wrote: 1. script for login process is located on a SSL-enabled server, so usernames and passwords are encrypted. https:// is an envelope encryption, so POST data, which is a part of the packet data, not

Re: [PHP] Re: a question on session ID and security

2007-05-29 Thread Zoltán Németh
2007. 05. 29, kedd keltezéssel 10.09-kor Stut ezt írta: > Jared Farrish wrote: > >> 1. script for login process is located on a SSL-enabled server, so > >> usernames and passwords are encrypted. > > https:// is an envelope encryption, so POST data, which is a part of the > > packet data, not packet

[PHP] Re: Web Application Design Literature

2007-05-29 Thread info
Steve, I have some experience developing web applications. My suggestion is to choose literature/code that uses PHP 4.x IF you plan on distributing the web application to multiple sites. But if instead you plan to have a single site web application, then use the literature/code for the latest an

Re: [PHP] Re: a question on session ID and security

2007-05-29 Thread Stut
Jared Farrish wrote: 1. script for login process is located on a SSL-enabled server, so usernames and passwords are encrypted. https:// is an envelope encryption, so POST data, which is a part of the packet data, not packet headers, is encrypted. As long as you POST or COOKIE data that needs e

Re: [PHP] Client does not support authentication protocol...

2007-05-29 Thread Zoltán Németh
2007. 05. 28, hétfő keltezéssel 23.52-kor Tom ezt írta: > Hi, as always, I'm trying to connect to a MySQL database in the following > way: > > mysql_connect('host','user','password'); > > In my local PC this Works perfectly, but in the server I receipt the > following error: > > mysql_connect(