[PHP] Database Question

2003-04-02 Thread José Pereira
Hi all, I'm trying to grab information from two DBs one being a mamber db and the other a report DB I want to print a list of users(pilots for a Virtual Airline) from the Pilot db and then next to them the nº of reports and total hours they have so far from the REPORT DB. The Pilot ID on this li

Re: [PHP] QUESTION - user management

2003-04-02 Thread Marek Kilimajer
Check the archives, this has been discused many times before [EMAIL PROTECTED] wrote: How do applications know how many users are logged into the system? For example postnuke will tell you '3 users online, 2 members'. Im gussing it uses sessions, but how? Edd Barrett (http://www.filibusta.net)

Re: [PHP] accessing protected remote files

2003-04-02 Thread David Feldman
How would that work? --Dave On Monday, March 31, 2003, at 09:27 AM, Marek Kilimajer wrote: You need to use socket functions and check the response headers David Feldman wrote: I have a script that needs to open a remote file on another Web server, which may or may not be protected (for exampl

Re: [PHP] uploading entire directory, with or without compression...

2003-04-02 Thread Marek Kilimajer
Your clients can zip the folder, upload the zip file, and then you can on the server side use PclZip class to read the content Kenn Murrah wrote: Greetings. I have a web site which permits my clients to upload a file via php4, and it works great ... however, some clients have requested that the

Re: [PHP] newbie2

2003-04-02 Thread Ilyas
It is an online shop : oscommerce How can I restart Php? Any ideas??? Ilyas At 06:42 02.04.2003 -0500, you wrote: fatal error? What gave you this? Enabling it might not be a good idea, for security. .. but if you want to enable it you have to editing the php.ini and set register_globals to ON. ch

[PHP] uploading entire directory, with or without compression ...

2003-04-02 Thread Kenn Murrah
Greetings. I have a web site which permits my clients to upload a file via php4, and it works great ... however, some clients have requested that they be able to upload entire directories from their windows or macintosh computers ... that is, to select the entire folder rather than doing one file

Re: [PHP] file upload

2003-04-02 Thread anders thoresson
Am I making any obvious mistakes here, in my upload script? I want to upload text-files only, they should end up in the directory from which the script is executed and be names __traningsmatcher.txt. Further details: Everything works, but I'm just curious if there is some hidden mistakes. This i

[PHP] Help in sorting

2003-04-02 Thread Haseeb Iqbal
hi, i want to sort messages in a sequence the sequence is "23,12,25" (these are message nos) now when i call like this $nMsgSeq="23,12,25"; imap_fetch_overview($pIMAP,$nMsgSeq,0); i get an array sorted like Array ( [0] => stdClass Object ( [uid] => 21

[PHP] Re: Zip to postcode

2003-04-02 Thread Andy
Looks like i have it sussed thank you to all. HOWEVER :o( I have two small problems that i cannot solve, and seeing as you are all gods in my opinion maybe you can help me further before i throw myself out the window. I am getting this error when i am taken to the member page after correctly fill

RE: [PHP] Returning a variable from a function problem

2003-04-02 Thread Ford, Mike [LSS]
> -Original Message- > From: ODCS [mailto:[EMAIL PROTECTED] > Sent: 02 April 2003 08:10 > > I have a form where the user inputs information - the code > below is the > error checking for one of the fields. The first IF statement > just checks > that the filed is not empty and works fine.

RE: [PHP] getting values from objects

2003-04-02 Thread Ford, Mike [LSS]
> -Original Message- > From: Charles Kline [mailto:[EMAIL PROTECTED] > Sent: 01 April 2003 21:21 > To: Dan Joseph > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] getting values from objects > > > My objective was to try and NOT use a temporary variable. > > for example I can do this: > > f

RE: [PHP] Zip to postcode[Scanned]

2003-04-02 Thread Ford, Mike [LSS]
> -Original Message- > From: Michael Egan [mailto:[EMAIL PROTECTED] > Sent: 02 April 2003 13:05 > > There are some ready made scripts for dealing with UK post > codes on the relevant page on the PHP site: > > http://www.php.net/manual/en/function.ereg.php And not one of them is 100% cor

[PHP] use of sessions compared to global scope

2003-04-02 Thread Dan Rossi
hi guys , as per my previous email i am trying to sort out a similar error handling as c or java exception, although in the error handler i am sending an error code to it and then return to the previous page with the error on it , the only way i can do this is to store the code in a session variabl

[PHP] database question

2003-04-02 Thread José Pereira
Hi all, I'm trying to grab information from two DBs one being a mamber db and the other a report DB I want to print a list of users(pilots for a Virtual Airline) from the Pilot db and then next to them the nº of reports and total hours they have so far from the REPORT DB. The Pilot ID on this li

Re: [PHP] Zip to postcode

2003-04-02 Thread William Bailey
Hi Andy, The following function seems to work for me: function split_postcode ($postcode) { if(eregi('(^[A-Z]{1,2})([0-9|A-Z]{1,2}).*([0-9][A-Z]{2}$)', str_replace(' ', '', $postcode), $parts)){ $outcode=strtoupper(sprintf('%s%s%s', $parts[1], @str_repeat(' ', 4-strlen($part

re: [PHP] Zip to postcode

2003-04-02 Thread Peter Hicks
Don't forget some London postcodes are Q1Q QQQ! Peter. On Wed, 2 Apr 2003, skate wrote: > sorry, don't have anything to add for code, but just a note to remember that UK post > codes can also be in the form... > > QQ11 1QQ > Q1 1QQ > Q11 1QQ > QQ1 1QQ > > so it's a real pain to write an expr

re: [PHP] Zip to postcode

2003-04-02 Thread skate
sorry, don't have anything to add for code, but just a note to remember that UK post codes can also be in the form... QQ11 1QQ Q1 1QQ Q11 1QQ QQ1 1QQ so it's a real pain to write an expression for this... -skate- Can someone please tell me how i change the following code: if (!ereg("^[0-9]{

RE: [PHP] $_SERVER[REMOTE_ADDR]

2003-04-02 Thread Mark Charette
> -Original Message- > From: thomas [mailto:[EMAIL PROTECTED] > > $_SERVER["REMOTE_ADDR"] > > If the user have a proxy the real IP is: > $_SERVER["HTTP_X_FORWARDED_FOR"] Maybe. If it's set and is set correctly. Even then: How are 127.0.0.1 or 192.168.1.1 going to help you, supposing that

[PHP] file upload

2003-04-02 Thread anders thoresson
Am I making any obvious mistakes here, in my upload script? I want to upload text-files only, they should end up in the directory from which the script is executed and be names __traningsmatcher.txt. HTML-form: Fil: And php, on the recieving end: /

[PHP] trigger error and set error handling in an object

2003-04-02 Thread Dan Rossi
hi guys i am having an issue getting a set error handler to get a function within a class, i am also having problems trying to trigger the error, i dont want fatals or the error handler wont catch it anyway , but user or message picks up annoying messages like undefined index on variable , how can

RE: [PHP] Zip to postcode[Scanned]

2003-04-02 Thread Michael Egan
Andy, There are some ready made scripts for dealing with UK post codes on the relevant page on the PHP site: http://www.php.net/manual/en/function.ereg.php HTH, Michael Egan -Original Message- From: Andy [mailto:[EMAIL PROTECTED] Sent: 02 April 2003 12:54 To: [EMAIL PROTECTED] Subjec

[PHP] Zip to postcode

2003-04-02 Thread Andy
Can someone please tell me how i change the following code: if (!ereg("^[0-9]{5,5}(\-[0-9]{4,4})?$",$postcode)) to a UK postcode QQ1 1QQ When i fill out the form it tells me that the postcode is not valid and i think it is because it is in zip code format. Thank you Andy -- PHP General Maili

RE: [PHP] Menu from Directory

2003-04-02 Thread Niklas Lampén
You might want to start with searching the manual for opendir() function. There is a sample code listing all files from a directory. :) Niklas -Original Message- From: Ben Whitehead [mailto:[EMAIL PROTECTED] Sent: 2. huhtikuuta 2003 1:05 To: [EMAIL PROTECTED] Subject: [PHP] Menu from D

Re: [PHP] UTF-8 encoding/decoding

2003-04-02 Thread Marek Kilimajer
There are 2 separate extenssions - iconv and recode Michael Mulligan wrote: Hi So say I have some UTF-8 (not certain, but probably in UTF-8 format, I need to check some more) encoded text. The text comes in encoded already, so it's not an htmlspecialchars kind of quick fix. For instance, I get '

Re: [PHP] newbie2

2003-04-02 Thread Sebastian
fatal error? What gave you this? Enabling it might not be a good idea, for security. .. but if you want to enable it you have to editing the php.ini and set register_globals to ON. cheers, - Sebastian - Original Message - From: "Ilyas" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wed

Re: [PHP] newbie2 php.ini

2003-04-02 Thread Chris Hayes
At 13:32 2-4-03, you wrote: FATAL ERROR: register_globals is disabled in php.ini, please enable it! How can I make this? First question would be: do i want this? Since PHP 4.10 the register_globals is turned off by default, see the release notes at http://www.php.net/release_4_1_0.php . Second

Re: [PHP] security flaw?

2003-04-02 Thread Marek Kilimajer
It should not be too difficult to change the delphi utility to post a sql or csv file to a php script, in the script you can check the sql commands and then execute them or parse the csv file respectively. The password is not really hidden, maybe it is not even scrambled in the binary, and can

[PHP] Menu from Directory

2003-04-02 Thread Ben Whitehead
I am trying to sort an image menu system which is passed a directory name, and can count and name the files in a menu from simply seeing which files are in this directory. It would be ideal if it can just do this just by looking at the files in the directory, and their file names, but if that is no

[PHP] newbie2

2003-04-02 Thread Ilyas
FATAL ERROR: register_globals is disabled in php.ini, please enable it! How can I make this? Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP and Front Page XP

2003-04-02 Thread Marek Kilimajer
No, this information is not provided by the browsers. Tomás Liendo wrote: Thanks! Your help solved my problems! Is there some form of obtaining the complete path??? I tried $f1_path, but don't work... :-) Thank you very much, -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Another Problem installing PHP 4.3.1 - won't compile dueto error.

2003-04-02 Thread Marek Kilimajer
My guess you have a mess in your curl library installation. For example you use header from version 7.9.5 and specify that you have version 7.10.3. Find all libcurl.so and curl.h files on your system and check if they are really the version you think they are. You may try running rpm -V libcurl

[PHP] QUESTION - user management

2003-04-02 Thread [EMAIL PROTECTED]
How do applications know how many users are logged into the system? For example postnuke will tell you '3 users online, 2 members'. Im gussing it uses sessions, but how? Edd Barrett (http://www.filibusta.net) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.p

[PHP] Sending messages with HL7

2003-04-02 Thread Miguel González Castaños
Dear all, A friend of mine has told me that his group is trying to build a php interface to HL7 messages. Their spec is: They need to send through PHP (from a browser) a HL7 message with a query, interpret that HL7 message, make the request with the information inside the HL7 message to an Info

Re: [PHP] Php.ini doesn't exit

2003-04-02 Thread skate
you can set _some_ directives directly in php check the manual for the set ini options, can't remember the exact function... php will work without an .ini file, but will have all defaults set. again, check thru the manual to see what the defaults are. - Original Message - From: "Javier C

Re: [PHP] Php.ini doesn't exit

2003-04-02 Thread Awlad Hussain
I think php.ini file must exist.. otherwise php will not work. - Original Message - From: "Javier Carreras" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 02, 2003 11:01 AM Subject: [PHP] Php.ini doesn't exit > Hi all, > > Where does PHP get its settings if php.ini fi

Re: [PHP] Email advice

2003-04-02 Thread Burhan Khalid
Tony Burgess wrote: Just wanted to know what the best way to deal with a system that makes use of lots of emails. The application itself creates emails using php mail() function, but I recall reading that this was not necessarily the best way to do this if sending lots of emails. Any suggestions o

[PHP] Php.ini doesn't exit

2003-04-02 Thread Javier Carreras
Hi all, Where does PHP get its settings if php.ini file doesn't exist? BTW- I want to enable sockets that are not enabled. Could I do that without creating a php.ini file? Regards, Javi. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] timestamp from uniqid()

2003-04-02 Thread Justin French
If you want the microsecond use microtime(). Justin on 02/04/03 8:44 PM, Sebastian ([EMAIL PROTECTED]) wrote: > may i ask what is it that your trying to do? Why not use time(); ? > > cheers, > Sebastian > > - Original Message - > From: "nooper" <[EMAIL PROTECTED]> > > > | Would there

[PHP] Email advice

2003-04-02 Thread Tony Burgess
Hi everyone! Just wanted to know what the best way to deal with a system that makes use of lots of emails. The application itself creates emails using php mail() function, but I recall reading that this was not necessarily the best way to do this if sending lots of emails. Any suggestions or thou

Re: [PHP] Newbie

2003-04-02 Thread skate
could this not also be solved by switching register_globals as on? reading through the error, it looks like that's what it's complaining about. there is security risks to turning this on, which is probably why it doesn't suggest doing it, but depends how secure you need your site to be? and also ho

Re: [PHP] timestamp from uniqid()

2003-04-02 Thread Sebastian
may i ask what is it that your trying to do? Why not use time(); ? cheers, Sebastian - Original Message - From: "nooper" <[EMAIL PROTECTED]> | Would there be a way to extract a timestamp from uniqid(), since the | function is based on the microsecond, and its purpose is not to be random

[PHP] timestamp from uniqid()

2003-04-02 Thread nooper
Would there be a way to extract a timestamp from uniqid(), since the function is based on the microsecond, and its purpose is not to be random in anyway, simply unique. I understand that it is not supposed to act as a timestamp, just wondering if anyone has a method of extracting a date or time fro

Re: [PHP] Newbie

2003-04-02 Thread Burhan Khalid
Ilyas wrote: Hi all I downloaded the oscommerce online shop. I have no experience with php. I installed yesterday php 4.3. Just my question: I get this error if I call the startpage of this shop: Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4

Re: [PHP] checkdate function

2003-04-02 Thread tech
On Tuesday 01 April 2003 02:47 pm, Jon Haworth wrote: > Hi Siva, > > > checkdate function verifies whether the date is valid or > > not by taking month, day and year as arguments. > > The problem is when someone enters a three digit year by > > mistake (200 instead of 2003), this function does not

[PHP] Re: $_SERVER[REMOTE_ADDR]

2003-04-02 Thread Nicole
Try these: function getIP() { if (getenv('HTTP_CLIENT_IP')) $ip=getenv('HTTP_CLIENT_IP'); else if ( getenv('REMOTE_ADDR') ) $ip=getenv('REMOTE_ADDR'); else $ip = 'unknown'; return trim($ip); } function getISP($addr,$byIP=true) { /* Can pass in an ip, like 64.xxx.xxx.xx or a domain, lik

[PHP] Newbie

2003-04-02 Thread Ilyas
Hi all I downloaded the oscommerce online shop. I have no experience with php. I installed yesterday php 4.3. Just my question: I get this error if I call the startpage of this shop: Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please

[PHP] Re: Returning a variable from a function problem

2003-04-02 Thread Nicole
Hello, Where is $duplicate originally being set? Are you using global variables? is $duplicate being POST'd or GET'd or what? If it is only gaining it's value from the duplicate_name() function, is that function returning those possible values (1,2) based on whatever the result of the action take

[PHP] Adding to md5 checksums.

2003-04-02 Thread William Bailey
Hi all, Just wondering if it is possiable to add or combine 2 or more md5 checksums togeather? Basically i've got a value/file that i can get the md5 checksum for but want to be able to padd the input value/file with nulls to a specific length example: value is

<    1   2