[PHP] Re: PHP The Right Way (website)

2012-10-14 Thread Jim Giner
On 10/14/2012 1:10 AM, tamouse mailing lists wrote: This just dropped in my inbox the other day from Smashing #69: 2. PHP The Right Way If you are developing for the Web, the chances are high that you have to deal with PHP on a regular basis. However, once you've stumbled upon a problem that

Re: [PHP] Re: PHP The Right Way (website)

2012-10-14 Thread tamouse mailing lists
On Sun, Oct 14, 2012 at 10:48 AM, Jim Giner jim.gi...@albanyhandball.com wrote: On 10/14/2012 1:10 AM, tamouse mailing lists wrote: This just dropped in my inbox the other day from Smashing #69: 2. PHP The Right Way If you are developing for the Web, the chances are high that you have to

Re: [PHP] Re: PHP The Right Way (website)

2012-10-14 Thread Daniel Brown
On Sun, Oct 14, 2012 at 11:48 AM, Jim Giner jim.gi...@albanyhandball.com wrote: Sounds like a good idea, but as for me - if I was a newbie I'd have a problem with their very first instructions. It says right off the start to type in the following: php -5 localhost:8000 That should be a

Re: [PHP] Re: PHP The Right Way (website)

2012-10-14 Thread Jim Giner
On 10/14/2012 12:06 PM, tamouse mailing lists wrote: On Sun, Oct 14, 2012 at 10:48 AM, Jim Giner jim.gi...@albanyhandball.com wrote: On 10/14/2012 1:10 AM, tamouse mailing lists wrote: This just dropped in my inbox the other day from Smashing #69: 2. PHP The Right Way If you are developing

Re: [PHP] Re: PHP The Right Way (website)

2012-10-14 Thread Jim Giner
On 10/14/2012 12:12 PM, Daniel Brown wrote: On Sun, Oct 14, 2012 at 11:48 AM, Jim Giner jim.gi...@albanyhandball.com wrote: Sounds like a good idea, but as for me - if I was a newbie I'd have a problem with their very first instructions. It says right off the start to type in the following:

[PHP] Re: is there a way to stop HTMLPurifier/CSStidy from forcing input CSS into all lowercase?

2012-06-02 Thread Govinda
anyone here using HTMLpurifier and CSStidy together? (like e.g. to allow users to create their own external style sheets via form input) [snip] I found how to set CSStidy's config options if I was running CSStidy from the command line, or on its _own_ from PHP runtime, but I do not know how

[PHP] Re: Is there a way to get PHP to release this file?

2010-03-01 Thread Shawn McKenzie
Andrew Ballard wrote: I am editing a data file via ODBC, and would like to be able to download the updated file in the same transaction when finished. It seems, however, that even after calling odbc_close(), PHP still retains a lock on the file for the duration of the request. Is there a way

[PHP] Re: Looking for easier way to build email message

2008-01-24 Thread Manuel Lemos
Hello, on 01/24/2008 09:20 PM Rene Brehmer said the following: Drew a blank off the archive, so here goes... I'm working on some forms for our company website, all of which simply have to be mailed to us by email. After verifying that the content of all the fields is valid and the proper

[PHP] RE: [X-POST] Fastest way to dump this huge table

2007-05-02 Thread Jay Blanchard
[snip] I have a huge MySQL table, 2.1 million records, 200MB. Once a week I need to dump it in CSV format and zip the file. This is not on my server, and it's in production, so I don't want to risk testing different methods and possibly hanging up their server for a period of time, so I

[PHP] Re: [X-POST] Fastest way to dump this huge table

2007-05-02 Thread Colin Guthrie
clive wrote: I'd say give some attention to the zip method you use. or better yet rsync the file, send only what has changed. Good advice but may not work as well with extended insert syntax which results in smaller dump files and much faster import too. I guess with CSV it could work well

[PHP] Re: Re: Re: better way to mix html and php code?

2005-11-21 Thread Dan Baker
Robert Cummings [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Mon, 2005-11-21 at 13:41, Dan Baker wrote: There are two ways for retrieving data. The first you have seen is the tag form, but obviously that's a problem when the data goes into a tag :) For this there is the embed

Re: [PHP] Re: Re: Re: better way to mix html and php code?

2005-11-21 Thread Robert Cummings
On Mon, 2005-11-21 at 18:17, Dan Baker wrote: Robert Cummings [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Mon, 2005-11-21 at 13:41, Dan Baker wrote: There are two ways for retrieving data. The first you have seen is the tag form, but obviously that's a problem when the

[PHP] Re: Re: Re: better way to mix html and php code?

2005-11-21 Thread Dan Baker
Robert Cummings [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Mon, 2005-11-21 at 13:41, Dan Baker wrote: I'm curious ... how do you generally handle forms and urls? What if the programmer wants to add a link, something like: a href=page.php?op=Viewid=1234View my info/a How

Re: [PHP] Re: Re: Re: better way to mix html and php code?

2005-11-21 Thread Robert Cummings
On Mon, 2005-11-21 at 18:46, Dan Baker wrote: Robert Cummings [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Mon, 2005-11-21 at 13:41, Dan Baker wrote: I'm curious ... how do you generally handle forms and urls? What if the programmer wants to add a link, something like:

[PHP] Re: OPTIMIZING - The fastest way to open and show a file

2005-10-17 Thread Ruben Rubio Rey
In a almost idle desktop machine always takes arround 0.04. The measured is on a server when it was with low traffic (average load arround 0.7) ac wrote: where did these time measured? on a heavily loaded server or on your own almost idle desktop machine ? On 10/14/05, Ruben Rubio Rey

[PHP] Re: OPTIMIZING - The fastest way to open and show a file

2005-10-17 Thread ac
try `ssh' onto the server and test locally on the server, use `wget', `curl' or even write a small script... what do you get this time ? low traffic may also problemical, if the server shares bandwith with other host, and there are busy ones among them. On 10/17/05, Ruben Rubio Rey [EMAIL

[PHP] Re: OPTIMIZING - The fastest way to open and show a file

2005-10-14 Thread ac
where did these time measured? on a heavily loaded server or on your own almost idle desktop machine ? On 10/14/05, Ruben Rubio Rey [EMAIL PROTECTED] wrote: Hi, I m creating a cache system, and i have a problem: PHP takes a lot of time opening the file. (Im using 2.6.9-1.667smp and XFS) *

[PHP] Re: Is there any way to show the error file without showing the dir information?

2005-04-29 Thread Jason Barnett
cchereTieShou wrote: In many case, if there is an error happen in a php script, it may return an error message something like Parse error: parse error, unexpected T_FUNCTION in /home/content/usr/html/test.php on line 6 Is there any way to not show the dir information, but only as test.php on line

[PHP] Re: looking for a way to manually free memory in the middle of a script

2004-02-02 Thread Justin Patrin
Kumar McMillan wrote: Hi. I'm running PHP 4.3.4 with bundled GD 2.0.1.5 Here is the problem: I'm running a PHP shell script to fix about a thousand image files that were uploaded to a server without much error checking. I'm skipping all the obvious problems like wrong file types and insanely

Re: [PHP] Re: looking for a way to manually free memory in the middle of a script

2004-02-02 Thread kumar mcmillan
On Feb 2, 2004, at 7:15 PM, Justin Patrin wrote: Kumar McMillan wrote: If this does happen to be a GD or PHP memory leak, I would suggest writing a driver script which calls a sub-script which does the processing. Have the driver keep track of all of the files and hand one (or some number) to

[PHP] Re: Is there a way to protect PHP's $_POST, $_GET when user tamper with post string in URL toolbox???

2004-01-07 Thread Scott Fletcher
Will check into whether did I use the post method correctly. Speaking of session, I don't see how can it be done to put the data into the session after the user click the submit button before going over to the next webpage. FletchSOD Scott Fletcher [EMAIL PROTECTED] wrote in message news:[EMAIL

[PHP] Re: Is there a way to protect PHP's $_POST, $_GET when user tamper with post string in URL toolbox???

2004-01-07 Thread Justin Patrin
When the page is submitted, set your session vars, then redirect to the next page. Or you can set the session vars before you do any other processing. Scott Fletcher wrote: Will check into whether did I use the post method correctly. Speaking of session, I don't see how can it be done to put

[PHP] Re: Is there a way to protect PHP's $_POST, $_GET when user tamper with post string in URL toolbox???

2004-01-07 Thread Greg Beaver
Hi Scott, You've discovered one of the basic tenets of form security on the web :) It is crucial that you never trust input from ANY outside source. This means you should do a couple of things: 1) limit the possible input values 2) validate the data type. If you expect a number, use

Re: [PHP] Re: Need a nicer way to escape single/double quotes....

2003-11-13 Thread Scott Fletcher
Wow! That really help for a not so effective HTML tag... Wow! That does really help to make up for the lousy HTML tags... Does that help? :-) Scott F. Scott Fletcher [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Wow! That really help for a not so effective HTML tag...

[PHP] Re: Need a nicer way to escape single/double quotes....

2003-11-12 Thread CPT John W. Holmes
Scott Fletcher [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... I haven't found a more efficient way to better escape the quote characters for the javascript right from PHP because I only get The kid in the javascript alert message, so I'm wondering if anyone of you know of

Re: [PHP] Re: Need a nicer way to escape single/double quotes....

2003-11-12 Thread Scott Fletcher
Wow! That really help for a not so effective HTML tag... Thanks! Scott F. Cpt John W. Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Scott Fletcher [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... I haven't found a more efficient way to better escape

[PHP] Re: IS there a way.

2003-02-28 Thread Rasmus Lerdorf
The industrial strength way to do this is to use the curl functions. See php.net/curl. You can alternatively just fsockopen yourself and issue the request and see what the first line of the response is. (by the way, a slightly shorter .sig would be appreciated) -Rasmus On Sat, 1 Mar 2003,

[PHP] Re: Is there a way to retrieve an entire source code from a php file?

2003-02-04 Thread Goetz Lohmann
The New Source schrieb: What I want to know is if it is possible to retrieve a source code from a url, with a php file. Something like this: There is a php file that retrieve the source code from the url www.url.com and this source is treated and you get content from this file and show it

[PHP] Re: Is there a way to undo the md5() encryption??

2003-01-22 Thread Scott Fletcher
Darn!! There's no way to undo it. So, I can't use this method of encryption for my other project. In that case, I'll live. Scott Fletcher [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi! Is there a way to do the decryption of the encrypted data with the

Re: [PHP] Re: Is there a way to undo the md5() encryption??

2003-01-22 Thread Peter Hutnick
Scott Fletcher said: Darn!! There's no way to undo it. So, I can't use this method of encryption for my other project. In that case, I'll live. Lemme guess? Was it going to be a revolutionary compression program that can compress any file to 128 bits? In all seriousness, the output of

[PHP] Re: Is there a way to undo the md5() encryption??

2003-01-22 Thread rush
Scott Fletcher [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi! Is there a way to do the decryption of the encrypted data with the use of md5()?? nope, that's way it is called one-way function. But if you could, I assume it would be worth a big pile of money

[PHP] Re: File Path - Which way is better ?

2002-05-30 Thread John Simpson
I personally use relative paths unless I am accessing a different server. I don't think there's a bad or good way for doing this. Manisha [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am using file to read / write data. When I give file path I can give it in

[PHP] Re: is their a way to run a command as root ???

2002-04-24 Thread Ray Hunter
check your manpages on chroot and sticky bits... This should help you out... Ray Hunter Scott Baer [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is their a way to run a command as root..or another user.. I know their are a log of security issues with

[PHP] Re: what's the best way to do redirect within PHP

2002-04-08 Thread Wo Chang
Dear All, Thanks for all the response, they all work! --Wo - Original Message - From: Wo Chang [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, April 08, 2002 10:00 AM Subject: what's the best way to do redirect within PHP Dear All, Another simple question: What is the

[PHP] Re: Is there a way to put a scroll in a table ???

2002-03-04 Thread Grant Babb
all- sorry for the late reply, but the information is still timely. :) Anyone that needs Javascript code that works in all browsers should get it from http://dhtmlcentral.com [why reinvent the wheel when somebody offers you a free cadillac] something that might be of use to is the

[PHP] Re: Is there a way to put a scroll in a table ???

2002-02-26 Thread Garth Dahlstrom
You could make use of style=overflow: auto (or scroll) for a div tag, if you are catering to IE5+ / NS6+ browsers. I was playing with this trying to build a grid control, my web server's down but here is some old code... within cells doesn't work as I'd like, but scrolling the whole table is

[PHP] Re: Is there a way to put a scroll in a table ???

2002-02-25 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (J.F.Kishor) wrote: I'am breaking my head by trying to put a scroll in a table, my problem is, using php 'am trying to display a report and the report should have three tables, data to display are taken from three different tables and

[PHP] Re: Is there a way not to pop up the default login window?

2001-11-01 Thread Chris Lee
if your using mod_auth then mod_auth will be called not mod_php. if you want mod_php to be called, dont use .htaccess (they are apart of mod_auth). sorry... -- Chris Lee [EMAIL PROTECTED] Zhu George-Czz010 [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

[PHP] Re: Best [non-PHP] way to redirect a browser

2001-10-26 Thread Mike Frazer
Two ways: #1 - If you have server admin access, just add to the default page list index.php in your server config. #2 - Use a meta refresh: html head meta http-equiv=refresh content=0;URL=http://www.yourdomain.tld/path/to/your/script.php; /head /html Mike Frazer René fournier [EMAIL

Re: [PHP] Re: Best [non-PHP] way to redirect a browser

2001-10-26 Thread Mike Eheler
Actually beyond that, for #1, if you server allows you to create .htaccess files, simply create a .htaccess file in your root directory, and put this in it: DirectoryIndex index.php Mike Mike Frazer wrote: Two ways: #1 - If you have server admin access, just add to the default page list

[PHP] Re: Is there a way to override safe mode to be able to read a etc/passwd file

2001-09-23 Thread Richard Lynch
You'll have to routinely copy /etc/passwd into your own directory or something. The whole *POINT* of safe mode is to block actions like that... -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD:

RE: [PHP] RE: [PHP-DB] Best way to check if a query succeeded

2001-03-30 Thread Boget, Chris
Wouldn't doing it like this however be ok: if ($result = mysql_query($query)) { I could be wrong, but I do not believe so. The above would evaluate as _true_ 100% of the time because irregardless of success of the query, $result is getting a value. It's just like doing: $i = "joe"; if(

Re: [PHP] RE: [PHP-DB] Best way to check if a query succeeded

2001-03-30 Thread Christian Reiniger
On Friday 30 March 2001 16:25, you wrote: Wouldn't doing it like this however be ok: if ($result = mysql_query($query)) { I could be wrong, but I do not believe so. The You are wrong :) ($result = mysql_query(...)) assigns a value to result, and the entire expression evaluates to

Re: [PHP] RE: [PHP-DB] Best way to check if a query succeeded

2001-03-29 Thread Stuart J. Browne
Doesn't the command return 1 or 0 in success or failure? Not 1 or 0. It returns 0 or some other value. Almost the same, but not quite. You may not have a result Probably wrong but something like if (mysql_query($query)) { } else { } or you could die out mysql_query($query) or

[PHP] RE: [PHP-DB] Best way to check if a query succeeded

2001-03-29 Thread Boget, Chris
i was just wondering what you guys do to check if a wquery suceeded or not? I know about mysql_num_rows() and mysql_affected_rows(), just wondered what you guys do? I do this: $result = mysql( $dbname, $query ); if(( $result ) ( mysql_errno() == 0 )) { // query was successful if(

[PHP] Re: [PHP-DB] Re: [PHP] RE: [PHP-DB] Best way to check if a query succeeded

2001-03-29 Thread Terry Romine
On Thursday, March 29, 2001, at 08:32 AM, Nick Davies wrote: Doesn't the command return 1 or 0 in success or failure? You may not have a result Probably wrong but something like if (mysql_query($query)) { } else { } What I understand is that the return from the query only tells you

Re: [PHP] RE: [PHP-DB] Best way to check if a query succeeded

2001-03-29 Thread Nick Davies
Doesn't the command return 1 or 0 in success or failure? You may not have a result Probably wrong but something like if (mysql_query($query)) { } else { } or you could die out mysql_query($query) or die On Thu, 29 Mar 2001, Boget, Chris wrote: i was just wondering what you

RE: [PHP] RE: [PHP-DB] Best way to check if a query succeeded

2001-03-29 Thread Boget, Chris
Doesn't the command return 1 or 0 in success or failure? Not 1 or 0. It returns 0 or some other value. Almost the same, but not quite. You may not have a result Probably wrong but something like if (mysql_query($query)) { } else { } or you could die out mysql_query($query) or die