Re: [PHP] php / mysql performance resources

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 10:17 am, Robert Cummings wrote: > On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: >> Hi everyone, >> >> Can anyone recommend any good books/resources for php and mysql >> performance management? I'm more interested in the software >> development side (as opposed t

Re: [PHP] Is this code thread safe?

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 10:52 am, Christian Cantrell wrote: > I'm pretty sure this code is thread safe, but I just want to be 100% > sure. > I have a class called ViewHelper with a static function called > is_signed_in. > All it does is check the session for the existence of a particular > variable,

Re: [PHP] Redirecting to a parent page

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 11:12 pm, Yamil Ortega wrote: > Lets say that I have the next structure on my web directory > > /file1.php > > /procces/file2.php > > /file3.php > > So, when I see the file1.php on the browser I see the page in this > route > > http://localhost/apache2/file1.php > > I have a

Re: [PHP] Re: any security problems with this?

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 3:51 pm, Eric Butera wrote: > Guess that patch to prevent it from being spidered is a bit late. A noindex,nofollow patch for phpinfo() is a Good Idea, imho. Patch it, if it isn't already. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from

Re: [PHP] Going from simple to super CAPTCHA

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 7:18 am, tedd wrote: > At 4:37 PM -0400 6/11/07, Daniel Brown wrote: >> I'm going to try to knock out a >>proof-of-concept later this week if I can to bring some of it >>together. >> >>-- >>Daniel P. Brown > > > Daniel et al: > > While thinking about proof-of-concepts, think

Re: [PHP] Going from simple to super CAPTCHA

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 2:06 pm, Daniel Brown wrote: > Okay, here's something I whipped up today: > > http://pilotpig.com/captcha/index.php > > Works pretty well, but keep in mind that it's in the very early > stages. I randomized the position and size to assist in throwing off > Turing

Re: [PHP] Going from simple to super CAPTCHA

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 10:49 am, tedd wrote: > Now, how is a bot going to figure that out? The bot doesn't figure any damn thing out. A human figures it out, and programs the bot to do it. If you're just fighting a bot, any captcha will work. If you're fighting an actual human, any captcha can be

Re: [PHP] Going from simple to super CAPTCHA

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 7:01 am, tedd wrote: > I was thinking about this the other day -- computers are fast and > people are generally slow. So, instead of making the time short, > examine how fast the answer was obtained. Immediate = computer; > delayed = human. > > Even an easy LETTER CAPTCHA take

RE: [PHP] PHP list as a blog

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 3:10 pm, Paul Scott wrote: > > On Tue, 2007-06-12 at 14:56 -0500, Jay Blanchard wrote: >> + 10*12^23, I don't want to be that famous. >> > OK, downed it. Will figure out a regular expression to strip out the > email addresses when I have had some coffee in the morning I'm no

Re: [PHP] Going from simple to super CAPTCHA

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 3:40 pm, Tijnema wrote: > A PFP (Pixel-For-Pixel) Approach would do the job, but I don't think > there exists software yet for it. I would have to get the file format > of the bitmap you're using (PNG I Guess), and then parse it PFP. Oh, the software exists. http://php.net/im

Re: [PHP] Going from simple to super CAPTCHA

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 9:33 am, Tijnema wrote: > I meant reverse order :P That would be pretty broken. There's no guarantee that browsers will present the inputs in any order at all, even though they all seem (so far) to follow the convention of presenting them in the order they appear in the form

Re: [PHP] Going from simple to super CAPTCHA

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 6:41 am, tedd wrote: > If my dot-captcha holds up against Tijnema, we could think of various > ways to combine both. E. Now that I've looked at the source, how do you stop: http://sperling.com', '/examples/dot-captcha/index.php', 'Submit.x=200&Submit.y=50'); ?> Spammer

Re: [PHP] Re: any security problems with this?

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 2:41 pm, Eric Butera wrote: > Hopefully nobody has phpinfo just sitting out on a production server. A quick Google: http://www.google.com/search?hl=en&q=%22Zend+logo+This+program+makes+use+of+the+Zend+Scripting+Language+Engine%3A%22&btnG=Google+Search will tell you that you

Re: [PHP] Going from simple to super CAPTCHA

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 6:42 am, Stut wrote: > tedd wrote: >> At 7:38 PM +0200 6/11/07, Tijnema wrote: >>> >>> Well, if you think this is the uncrackable* solution, create it and >>> i'll see if I can crack it ;) >>> >>> Tijnema >>> >>> * I hope you don't mean the same uncrackable as AACS did:

Re: [PHP] What can cause session_destroy to fail?

2007-06-12 Thread Richard Lynch
On Mon, June 11, 2007 8:36 pm, Mattias Thorslund wrote: > One of my clients just received a PHP warning that session_destroy() > failed. Using the default session handler (with tmp files), what are > the > most likely things that can cause session_destroy() to return false? > > Thanks for any sugge

Re: [PHP] weird. iceweasel crash my laptop after i use costum sessions

2007-06-12 Thread Richard Lynch
Show us your source for the session queries and any loops that surround that. Most likely, you have an error in there. Or, even more likely, you have a: header("Location: xxx"); where xxx ends up putting you back on the same page... Then you execute header("Location: xxx") again. This puts you

Re: [PHP] Login page error

2007-06-12 Thread Richard Lynch
On Mon, June 11, 2007 9:28 pm, Humani Power wrote: > Hi! Im trying to make a login page. I have searched for examples that > makes > me check the user name with a database, and the one that suits better > is > this code. > // Perhaps you have a BLANK LINE right here? // Even a BLANK LINE counts a

Re: [PHP] Persistent MySQL Connection

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 12:16 am, PHP Mailing List wrote: > Can I maintain just one mysql connection resource to all my pages per > user session. As far as I knows create connection is more expensive > than > executing queries ? > > Any reference how to make efficient for connection resources ? Plea

RE: [PHP] Looking for help with forms/variables and an array!

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 12:02 pm, BSumrall wrote: > Every single example on the internet is for register_globals = on. Actually, this is not at all true. And, really, fixing the example before you run it to not need register_globals is the way to go. > As far as the brackets, I tried with or witho

RE: [PHP] Looking for help with forms/variables and an array!

2007-06-12 Thread Richard Lynch
AJAX simply creates an HTTP dialog between the browser and a server (probably your server) for an ongoing interactive user experience. There is nothing specific to Microsoft about it, other than that Microsoft actually did first create the XmlHttpRequest object for some other stupid purpose, befor

RE: [PHP] Looking for help with forms/variables and an array!

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 3:34 am, BSumrall wrote: > I got a little bit further, but still feel like the "monkey with a > light-bulb"! Could be worse. You could be a monkey with an army. [as in 'W'] :-v -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indi

Re: [PHP] Looking for help with forms/variables and an array!

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 3:20 am, BSumrall wrote: > Dreamweaver help me with a good part of this, No comment... > A selection box has 4 options, php queries the Mysql database for > matching > options. > > Then a second options box with another 4 options filters the query > even > more. When the us

Re: [PHP] Going from simple to super CAPTCHA

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 6:25 am, tedd wrote: > At 6:22 PM +0200 6/11/07, Tijnema wrote: >>Server builds up a database of pictures, client does the same with >> MD5 >>check, and problem solved...:) >> >>Tijnema > > Tijnema: > > Not exactly, I don't think you could MD5 this: > > http://sperling.com/exa

Re: [PHP] PHP list as a blog

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 1:52 pm, Paul Scott wrote: > I have set up our new Chisimba blog system (GPL, > http://avoir.uwc.ac.za) > to blog all of the posts to this list. > > Please check it out at > http://196.21.45.50/fsiu/chisimba_framework/app/index.php?module=blog&action=allblogs > > and let me kn

Re: [PHP] Effect of syntax error in php.ini

2007-06-12 Thread Richard Lynch
Check Apache error logs. PHP probably just quits reading the php.ini and starts up with the default settings. On Tue, June 12, 2007 1:55 pm, Clive Gould wrote: > Hi > > I have come across some very strange behavior with php-4.3.9-3.22.5 > when > using Moodle 1.8+ on a CentOS 4.5 Linux platform. >

Re: [PHP] Re: any security problems with this?

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 7:47 am, Stut wrote: > Dave Goodchild wrote: >> Unless some server config error causes that stuff to be output on >> the page? >> I tend to put such functions in a .inc file and amend the .htaccess >> to >> prevent download. > > Unless some server config error causes it to i

Re: [PHP] Re: efficient log system

2007-06-12 Thread Richard Lynch
Since there are probably a very limited number of actions a user can take, you could probably easily reduce this by numbering each action: define(1, 'logged in'); define(2, 'logged out'); define(3, 'uploaded photo'); Your DB then table might then look like: user_id action_id notes 42 1

Re: [PHP] efficient log system

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 6:26 am, Alain Roger wrote: > I would like to create a log system to keep a trace of all users' > actions > (log-in, remove, change or update data, and so on...). > What should i do or to what should i take care to not have problem ? > > I was thinking to create a folder on my

Re: [PHP] Re: any security problems with this?

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 8:08 am, Dave Goodchild wrote: > Sure, I usually put these files outside the docroot - unless I am in > some > f**ked-up hosting environment that doesn't let me change the include > path... If one finds oneself in such an environment, or one in which there *IS* no directory o

Re: [PHP] Re: any security problems with this?

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 7:58 am, Eric Butera wrote: > On 6/12/07, Stut <[EMAIL PROTECTED]> wrote: >> Dave Goodchild wrote: >> > Unless some server config error causes that stuff to be output on >> the page? >> > I tend to put such functions in a .inc file and amend the >> .htaccess to >> > prevent do

Re: [PHP] any security problems with this?

2007-06-12 Thread Richard Lynch
On Tue, June 12, 2007 7:01 am, Ross wrote: > I have a page of functions that I include in my page head. In this I > have a > function to connect. I can then just call this on each page when i > need it. > Does doing it this way cause any potential security risks? Of course there is risk. Everythi

Re: [PHP] Question on Connecting to Microsoft SQL Server from PHP

2007-06-12 Thread Richard Lynch
You may want to try using the Sybase drivers. MS basically bought Sybase and re-named it MS SQL and then broke a lot of stuff :-) One of the things they haven't broken (yet) is the basic Sybase driver functionality to send queries. For sure, ' versus " won't make any difference. You may want to

Re: [PHP] php script from bat file

2007-06-12 Thread Richard Lynch
php.exe expects a PHP script as an argument, usually. You can run it interactively with -a or use -i to get phpinfo output and so on, but php.exe with nothing at all will run and not do much of anything. On Tue, June 12, 2007 11:30 am, Bosky, Dave wrote: > What's the syntax I need to use to execu

Re: [PHP] MySQL UTF-8 vs Extended ASCII

2007-06-11 Thread Richard Lynch
On Mon, June 11, 2007 7:34 pm, Larry Garfield wrote: > You may find this useful: > http://us.php.net/manual/en/function.mb-convert-encoding.php > > It is frequently reasonably good at guessing the incoming character > set, at > least the one time we used it at work. Try running all pages/strings >

[PHP] MySQL UTF-8 vs Extended ASCII

2007-06-11 Thread Richard Lynch
This may actually be a MySQL question... Or not. I'm scraping about 55,000 pages from a website into a MySQL database. Some of these pages have "extended ASCII" values in their content, or, in some cases, just plain junk ASCII values, as far as I can tell. For example, decimal 163 is sometimes

Re: [PHP] Going from simple to super CAPTCHA

2007-06-11 Thread Richard Lynch
On Mon, June 11, 2007 12:59 pm, Daniel Brown wrote: >> > http://pilotpig.net/captcha-example.php I would be hard-pressed to answer correctly, I think. Which doesn't matter. Any multiple-choice CAPTCHA is pointless. Spammers would consider at 33% success ratio WONDERFUL. Their entire bu

Re: [PHP] Re: Not getting expected result from file()

2007-06-11 Thread Richard Lynch
trim is probably sub-optimal, as you MIGHT have leading/trailing whitespace as part of the actual data at some point. You should trim off ONLY one last newline character, no more, no less. I dunno why it's not working still though... On Mon, June 11, 2007 12:14 am, kvigor wrote: > OK, I trimmed

Re: [PHP] [RFC] HTTP timezone

2007-06-11 Thread Richard Lynch
On Mon, June 11, 2007 9:05 am, Stefanos Harhalakis wrote: > There is no need to include the DST information since when on DST > the client > will be sending the propper offset. For example, EET+2EEST is +0200 > during > winter and +0300 during DST. I think you are over-simplifying things too muc

Re: [PHP] "tail" solution for PHP5 wanted

2007-06-11 Thread Richard Lynch
On Mon, June 11, 2007 11:37 am, Michelle Konzack wrote: > * Do not Cc: me, because I am on THIS list, if I write here.* Actually, not everybody who posts here is subscribed... :-v But I did remember to not Cc: you this time. > I am working again on my PHP Admin interace an need a "tail"

Re: [PHP] Persistent MySQL Connection

2007-06-11 Thread Richard Lynch
On Mon, June 11, 2007 12:53 pm, PHP Mailing List wrote: > Can I maintain just one mysql connection resource to all my pages per > user session. As far as I knows create connection is more expensive > than > executing queries ? > > Any reference how to make efficient for connection resources ? Yes,

Re: [PHP] Going from simple to super CAPTCHA

2007-06-10 Thread Richard Lynch
On Sun, June 10, 2007 3:19 pm, tedd wrote: > Do graphic CAPTCHA's really work? I dunno, but from this it appears > not. Properly implemented, they work great at thwarting 'bots (and the visually impaired) unless you have a determined attacker with a fair amount of time on their hands. If you have

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

2007-06-10 Thread Richard Lynch
On Sat, June 9, 2007 9:04 pm, Robert Cummings wrote: > 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_

Re: [PHP] Going from simple to super CAPTCHA

2007-06-10 Thread Richard Lynch
On Sat, June 9, 2007 10:27 pm, Dave M G wrote: > 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

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

2007-06-10 Thread Richard Lynch
On Sat, June 9, 2007 11:15 pm, Robert Cummings wrote: > 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.

Re: [PHP] Undefined index error

2007-06-10 Thread Richard Lynch
On Sat, June 9, 2007 11:53 pm, Christian Cantrell wrote: > I'm getting this error in my Apache log file, and I can't figure out > why: > > Undefined index: password in /path/to/file.php on line 82 > > Some searching on Google turned up a bunch of questions, but no > answers. > Any idea what this

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

2007-06-10 Thread Richard Lynch
On Sun, June 10, 2007 12:48 am, Robert Cummings wrote: > On Sun, 2007-06-10 at 13:36 +0800, Crayon Shin Chan wrote: >> On Sunday 10 June 2007 04:05, Robert Cummings wrote: >> >> > Funny how the solution often presents itself after you make your >> > problem public *lol* :) Wonder if it falls under

Re: [PHP] Transparent image resizing using php 4.4.x

2007-06-10 Thread Richard Lynch
On Sun, June 10, 2007 12:08 pm, tedd wrote: > At 1:12 AM +0500 6/10/07, Sukhwinder Singh wrote: >>-snip- >>Could anyone please provide me a solution which works using php 4.4.x >> >>Sukhwinder Singh > > Instead of: > > imagecolortransparent($img_resized, $transparent); > > try: > > imagecolortransp

Re: [PHP] session.cookie_path problem

2007-06-10 Thread Richard Lynch
Is PHP sending the correct path in it headers for the cookie? Use FireFox + LiveHTTPHeader to find out. Is your BROWSER correctly honoring the path? It shouldn't be sending back the cookie for app1 in app2, but, if it does, PHP won't know it wasn't supposed to, I don't think... On Sun, June 10, 2

Re: [PHP] Server side issue with

2007-06-10 Thread Richard Lynch
On Sun, June 10, 2007 9:06 am, Roy W wrote: > My host company must have an installation/configuration issue. > > Variables from forms are not being passed to the php scripts that are > sent > via > > Has anyone heard of this and know of the fix? Yes, lots. Usually right after an upgrade to PHP v

Re: [PHP] PHP Form isnt emailing me

2007-06-10 Thread Richard Lynch
, 2007 8:22 pm, Austin C wrote: > how can I tell them not to include new lines? > > On 6/9/07, Richard Lynch <[EMAIL PROTECTED]> wrote: >> >> The return value of http://php.net/mail only says whether or not PHP >> managed to queue up the email to go out. >> >&

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] [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

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

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
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

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] 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

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] 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] 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] 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] 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] 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] 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] 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] 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] [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] [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] [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 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] 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] 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] 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 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] 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] Problems connecting to mysql

2007-06-08 Thread Richard Lynch
It's possible that PHP on the Linux box has a different mysql client driver version than the FreeBSD box... I would expect a more detailed error message in that base, but maybe not... Your command line in Linux could be using yet another different client version. Check output from these: mysql

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

2007-06-08 Thread Richard Lynch
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 the Content-Type variable listed. > Does > someone know

Re: [PHP] Faulting module php4ts.dll

2007-06-08 Thread Richard Lynch
On Fri, June 8, 2007 1:30 pm, Chris Boget wrote: > We are running PHP 4.3.11 in a Windows Server 2003 environment using > ApacheSSL v1.3. Starting just the other day, we starting seeing the > following error pop up in the windows eventvwr: > > "Faulting application Apache.exe, version 0.0.0.0, fau

RE: [PHP] File Upload - post_max_size and upload_max_filesize in GBs

2007-06-08 Thread Richard Lynch
On Thu, June 7, 2007 10:52 am, Jim Moseby wrote: > Rumor has it that uploaded files are stored in memory before being > committed > to disk. If so, the amount of free RAM available to PHP would be the > limit > to the filesize regardless of the ini file settings. I think you have to go pretty far

Re: [PHP] Patterns

2007-06-08 Thread Richard Lynch
On Thu, June 7, 2007 10:59 am, Steve Marquez wrote: > Greetings. I just want to say thanks for the help over the past couple > of > days. > > I am trying to get a form to delete a file. > > If the file ends in .php, then I want it to unlink from a certain > folder. > However, if the file ends in

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

2007-06-08 Thread Richard Lynch
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_magic.dll is commented out in my php.ini. So that > exp

Re: [PHP] logging of sql queries - success/failed

2007-06-08 Thread Richard Lynch
On Thu, June 7, 2007 2:12 pm, Bosky, Dave wrote: > I've got a script that imports several CSV files via the Load Data > File > command. > > I need to know if each import query was successful or failed. > > > > Is there a way to log the success/failure of each query including how > many rows were in

Re: [PHP] file_get_contents

2007-06-08 Thread Richard Lynch
On Thu, June 7, 2007 3:09 pm, Chris Boget wrote: >>> What's going on? >> That's the strangest absolute path I've ever seen... it seems to >> have >> some kind of non-absolute prefix. >> This has been a troll >:) > > Pardon? I'm not sure what you mean? I think it was a Windows-bashing joke... B

Re: [PHP] file_get_contents

2007-06-08 Thread Richard Lynch
On Thu, June 7, 2007 2:39 pm, Chris Boget wrote: > Does file_get_contents() not work with absolute paths? Works for me. In fact, I try to always use absolute paths so that I don't end up affecting the totally wrong file. > I'm able to > successfully write data to a file that I create dynamically

Re: [PHP] missing openssl

2007-06-08 Thread Richard Lynch
On Thu, June 7, 2007 2:55 pm, s2j1j1b0 wrote: > > > > Hello, > > I am working off my development machine (my home pc) and I just loaded > the > php-sdkfolder in my root directory and than ran php-sdk/install.php > and got > this message. > > INSTALLATION ERROR: One or more required PHP extensions

Re: [PHP] PHP process control

2007-06-08 Thread Richard Lynch
I believe that in CGI or CLI process you'd be okay, as the "fork" happens in its own process, and can only mess up PHP, which is fairly safe. In PHP as Module, you risk thread-safety issues in a big way with any PHP extensions that aren't thread-safe. And nobody is 100% sure on any of the extensi

Re: [PHP] Re: File Upload - post_max_size and upload_max_filesize in GBs

2007-06-08 Thread Richard Lynch
On Fri, June 8, 2007 4:03 pm, Jim Lucas wrote: > afaik, you are using the stock php.ini setting while you are > uploading. This should not be taken to mean that if one changes php.ini, that the change does not affect file upload -- it definitely does matter... Not sure Jim meant that Sukhwinder w

Re: [PHP] Re: File Upload - post_max_size and upload_max_filesize in GBs

2007-06-08 Thread Richard Lynch
On Fri, June 8, 2007 10:17 am, Sukhwinder Singh wrote: > Stut, thank you very much for explaining things and trying to help. > >> The applet *does* POST to PHP. However, it has the option to upload >> to an >> FTP server "the choice of using HTTP, HTTPS or FTP connections >> for >> your transfe

Re: [PHP] Re: File Upload - post_max_size and upload_max_filesize in GBs

2007-06-08 Thread Richard Lynch
On Fri, June 8, 2007 8:58 am, Sukhwinder Singh wrote: > I had a look at that. My problem is that along with uploading file I > also > have to post some other information as well. File names are randomly > generated. Jupload seems to do the work other than that POST problem. > Client > is asking for

Re: [PHP] More include issues

2007-06-06 Thread Richard Lynch
Use two different $connection variables, say, $mssql and $informix and pass them in as the optional arg to _query or whatever, and then you can avoid flip-flopping like that. On Wed, June 6, 2007 3:53 pm, Dan Shirah wrote: > It seems that PHP is getting confused unless I post the $database = > mss

Re: [PHP] More include issues

2007-06-06 Thread Richard Lynch
On Wed, June 6, 2007 3:24 pm, Dan Shirah wrote: > Yes, I have error_reporting = E_ALL and show_warnings = On. Use phpinfo to confirm that, because... > Here's something interesting...if I put the include directly above the > code > for the dropdown it workslike below: > and then the code sto

Re: [PHP] Making thumbs same size

2007-06-05 Thread Richard Lynch
On Mon, June 4, 2007 1:44 am, Humani Power wrote: > Hey hi!!. > //get dimensions of the thumbnail > > $thumb_width=$width*0.10; > $thumb_height=$height*.10; It's really up to YOU to choose the thumbnail constant size and to decide what to do about the aspect ratio You could crop or fill with black

Re: [PHP] indexes and arrays

2007-06-05 Thread Richard Lynch
On Tue, June 5, 2007 10:01 am, blueboy wrote: >I have an array of facilities, how do I define them all in one go > so I do > not get the undefined index error? > > http://php.net/isset You also could make an array of checkboxes instead of hand-typing all that... $facilities = array(5=>'Cre

Re: [PHP] returning the index number part2

2007-06-05 Thread Richard Lynch
This will tell you how: On Tue, June 5, 2007 11:16 am, blueboy wrote: > > if I have an array of 3 images > > > > 1. > > > > 2. > > > > 3. > > > > > How do I access the filename? Like this? > > echo $fileName1 = $_FILES['userfile']['name'][0]; > echo $fileName2 = $_FILES['userfile'

Re: [PHP] works in 4.4.2 - breaks in 5.2.1

2007-06-05 Thread Richard Lynch
Does the xmlString print out? Cuz my first guess is they turned off RAW_POST_DATA in the upgrade, so it's just blank... On Tue, June 5, 2007 11:34 am, Jim Berkey wrote: > I'm familiar with actionscript, but pretty new to php . . .I have a > guestbook script that worked fine until my host upgraded

Re: [PHP] Strings

2007-06-05 Thread Richard Lynch
It would really help if you didn't use funky characters for quote that aren't quote in your email. It would help even more if you copy/paste your actual script. On Tue, June 5, 2007 12:50 pm, Steve Marquez wrote: > The following code works: > > > $image = ³²; > > if ($image == NULL) { >

Re: [PHP] undefined GD function

2007-06-05 Thread Richard Lynch
getimagesize is okay, because it's not really really a GD function, even though it's lumped in there... Did you restart Apache? (or the whole machine if you run IIS)? On Mon, June 4, 2007 5:38 am, C.R.Vegelin wrote: > Hi All, > > I am testing some GD functions, but I'm getting "undefined function

Re: [PHP] Security for uploaded PDF files

2007-06-05 Thread Richard Lynch
On Mon, June 4, 2007 7:37 am, Al wrote: > I have an application, with mild security, that approved users can > upload pdf > files. Obviously, the security for executables with a simple pdf > extension > bothers me. > > I's like some suggestions on how I can protect against errant files > with a pd

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

2007-06-05 Thread Richard Lynch
On Mon, June 4, 2007 9:25 am, Dave M G wrote: > Since my database is MySQL, does that mean using addslashes() and > stripslashes()? In other words manually doing what magic quotes was > doing automatically? Please start reading here: http://phpsec.org And, for the record, no, addslashes is NOT th

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

2007-06-05 Thread Richard Lynch
On Mon, June 4, 2007 9:02 am, Dave M G wrote: > I've read on the manual that it's "preferred to code with magic quotes > off and to instead escape the data at runtime, as needed": > > Recently, while configuring my PHP so as to install the GD libraries, > that the default option was to have magic q

<    5   6   7   8   9   10   11   12   13   14   >