[PHP] Trouble with named session vars in classes

2002-01-08 Thread Alan McFarlane
considerable time now. Oh and BTW, the code MUST be capable of running on PHP 4.0.0 but can take advantage of anything up-to and including PHP 4.1.0, and must use the standard built-in session handling routines. Thanks -- Alan McFarlane [EMAIL PROTECTED] ICQ: 20787656 -- PHP General Mailing

[PHP] Re: New to list

2002-01-10 Thread Alan McFarlane
try: $result = ((0.416/$time)*60)*60); echo number_format($result, 2); or echo sprintf(%.2f, $result); Andrew [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello to you all! I am new to this list and I have a question that maybe someone can help with In a

[PHP] POSTing files

2002-01-11 Thread Alan McFarlane
- remembering of course that I still need the facility to browse the local system for a file Thanks -- Alan McFarlane [EMAIL PROTECTED] ICQ: 20787656 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

[PHP] Best way to get the remote IP address?

2002-01-21 Thread Alan McFarlane
to this problem (and if so, what is it?) Cheers -- Alan McFarlane [EMAIL PROTECTED] ICQ: 20787656 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL

[PHP] Re: upgrade problem

2002-01-25 Thread Alan McFarlane
It sounds like an inconsisteny in the library versions. Try and get the latetst version of the GD library, (source if necessary), or if you have a tool that is capable of analyzing .so/.dll dependancies, use that. Chuck Barnett [EMAIL PROTECTED] wrote in message 002301c1a607$c3dff1e0$[EMAIL

[PHP] Re: HELP! with PHP extension

2002-01-25 Thread Alan McFarlane
Make sure you've copied the contents of the c:\php\dlls folder to your system directory (\windows\system, \winnt\system32, not sure 'bout 2K). Your extension_dir setting in php.ini should be extension_dir = c:/php/extensions/ And make sure you've copied your php.ini to your windows directory

[PHP] Re: Encryption

2002-01-25 Thread Alan McFarlane
As far as I'm aware, as long as you use the same seed or salt value, encrypting material will always yield the same results. However, remember that not all servers have support for mcrypt... You may find it better to use something simpler like md5($seed . $data), where $seed is a unique (and

[PHP] Re: Problem in mysql connection

2002-01-26 Thread Alan McFarlane
What is the error message? (It will help us a lot G) Uma Shankari T. [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, I have installed php4 rpm in my machine.while connecting php with mysql it is giving fatal error.I have given like this

[PHP] Re: Calculate Directory Size

2002-01-26 Thread Alan McFarlane
I suggest using an external tool - using PHP would probably be too slow esp. if you're hitting 1000+ users. (Plus, I think you would have to run a lot of clearstatcache()'s which may cause all sorts of problems)... If you do an ls or dir or similar then you could parse the output, however there

Re: [PHP] Correct URL's

2002-01-27 Thread Alan McFarlane
Please do not send HTML messages. Sorry, Outlook is crap and I'm just too lazy to buy (on Win you have to ??? Outlook does not ~need~ to send HTML messages, it can be configured to send text-only messages Sheesh, It's about time you guys started looking properly at your environments and

Re: [PHP] PHP and MYSQL Security`

2002-01-27 Thread Alan McFarlane
If you know you are running on an apache server, you could try using a simple .htaccess file in a (say) etc directory which contains any or all files you wish to secure. ie: /index.php /etc/config.php /etc/.htaccess --index.php ?php include(etc/config.php); ... ?

[PHP] Is it possible to bypass max time limit?

2002-01-27 Thread Alan McFarlane
I've got a live script which occasional has to retrieve a file via ftp, download to the server, post-process it then display it. I use caching to check to see if I've already got the file, but if I don't I have to process the ftp_get operation which occasionally times out. So, is it possible to

[PHP] Re: Pregenerating Script Once Again Putting this question

2002-02-01 Thread Alan McFarlane
I tak you realise that according to your example interface, users will be browsing for files on their own system and ~not~ the server, are you sure this is what you want? After all, you'll never be able to verify the information contained within those files is viable, safe, legal etc.

[PHP] Re: Can this be done in PHP?

2002-02-01 Thread Alan McFarlane
Mmm - looks damn complex but it's really very simple - Get yourself a copy of phpAdsNew (from sourceforge.net) - It's an amazing banner thingy with all sorts of tricks for display adverts (text, graphics, flash, iframes, frames, layers, etc) and it's well documentated. Ed Lazor [EMAIL PROTECTED]

[PHP] File Manager required

2002-02-01 Thread Alan McFarlane
I'm just being damn lazy, but has anyone got (or seen) a nice file simple file manager writtin in PHP? Facilities should include upload/download, copy,move,rename,delete, possibly view image/source... Thanks -- Alan McFarlane [EMAIL PROTECTED] 'I hate re-inventing the wheel!' -- PHP

[PHP] Sending files to the user...?

2002-02-05 Thread Alan McFarlane
The problem: How to I send a file to the user? Sounds simple but, assume I have a 'daily report' option from my main web page. When the user clicks on it, they are taken to the file 'generate_report.php' (sample included). Now, this code should generate the report, compress it if required and

[PHP] Re: Sending files to the user...?

2002-02-05 Thread Alan McFarlane
Oh, and BTW, after sending the file, I will be redirecting the user to a different page... Alan McFarlane [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The problem: How to I send a file to the user? Sounds simple but, assume I have a 'daily report

[PHP] Re: mktime() Algorithm

2002-02-06 Thread Alan McFarlane
Most langauges have support for this type of function - i.e. the number of seconds since 1970. Check your language manual... David A Dickson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I need to create a function in another programming language that takes

[PHP] Version checking

2002-02-06 Thread Alan McFarlane
What's the best method for checking the PHP version number. I'm assuming that include() was available in all versions, so, from my main index.php script, I include a local script (common.php) : ?php // assume minimum version of PHP required is 4.0.5 if (phpversion() 4) { die(wrong version); }

[PHP] Complex Version Checking

2002-02-07 Thread Alan McFarlane
Does anyone know of a method of testing the minimum version of PHP required for a particular job? - Assume I'm developing a web-site for a customer who has PHP 4.0.5 installed. Now, I tend to use the latest version (4.1.1), so I have to be a little careful in certain aspects, but it would be

Re: [PHP] Php Projects

2002-02-09 Thread Alan McFarlane
I've already got the steady supply of beer, but a backup? remind me - what's that word mean again... Alan McFarlane (Just after suffering a major NT dual server crash when the bac Nick Wilson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... -BEGIN PG

[PHP] Re: Console, colors and stuff

2002-02-09 Thread Alan McFarlane
Try 'echo'ing ansi control sequences? -- Alan Richard [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hey Boys, I'm using PHP CGI version on Win32 to write some scripts. Not for a website or anything, just some scripting at the console window. So now I want

[PHP] IE Combo Box File Selector

2002-02-12 Thread Alan McFarlane
Sorry for being of topic, but I'm having great difficulty with this... The following code does NOT use a single border around the combo box as I would have expected. Any ideas as to why not? /* index.html */ select name=a style=border:solid 1px black; option value=11/option /select -- Alan

[PHP] File/Directory Permissions

2002-03-06 Thread Alan McFarlane
it be done? -- Alan McFarlane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Use of flock()

2002-03-06 Thread Alan McFarlane
I've just written a couple of simple routines which read an write small text files to the server: function readData( $filename, $data ) { if (!$fd = fopen($filename, r)) { return false; } flock($fd, LOCK_SH); $data = fread($fd, filesize($filename)); fclose($fd); return true; }

[PHP] header() and frames

2002-03-06 Thread Alan McFarlane
; target: _top); Anyone got any suggestions or pointers? -- Alan McFarlane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: header() and frames

2002-03-07 Thread Alan McFarlane
Nope, that didn't work... Jim Winstead [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Alan McFarlane [EMAIL PROTECTED] wrote: header(location: index.php; target: _top); header(Location: index.php); header(Window-target: _top); jim -- PHP

[PHP] Re: Is flock necessary?

2002-03-07 Thread Alan McFarlane
ROTECTED]... Group: Is flock even necessary? Allan: You look like you have Perled. It was necessary for Perl. Have you thought of MySQL instead? Alan McFarlane wrote: I've just written a couple of simple routines which read an write small text files to the server: function readData( $

[PHP] Re: 'undef' as an argument value

2002-03-11 Thread Alan McFarlane
function foo( $arg1, $arg2 = null ) { .. as before .. } -- Alan McFarlane Rodent Of Unusual Size [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... An odd request.. I want to have optional function arguments that *aren't* defined unless values are ex

[PHP] Q. Adding line numbers to highlighted source

2003-04-03 Thread Alan McFarlane
? -- Alan McFarlane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Q. Adding line numbers to highlighted source

2003-04-04 Thread Alan McFarlane
. $source[$i]; echo code . implode(br /, $source) . /code; Alan McFarlane [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I've been trying to add line-numbers to my source code, but can't seem to work out how to do it. As an example, I tried the following: ?php function addPrefix

Re: [PHP] Re: Q. Adding line numbers to highlighted source

2003-04-06 Thread Alan McFarlane
','sprintf(br /span style=\color:black;\%05d /span,$i++)',$file); echo hr; echo $file; Enjoy! ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original Message- From: Alan McFarlane [mailto:[EMAIL

[PHP] Re: passing values from one script to another script

2003-03-16 Thread Alan McFarlane
Have a look at the $_POST super global variable documentation. Chinmoy Barua [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello everybody, I want to pass a value, which came from a HTML form, to another PHP script. How can i do this? e.g.: $login - the value of this varriable