[PHP] replacing mail()

2002-09-18 Thread Liam

Yeah, mail() again...

I want to disable the default mail command and replace it with my own.
I've written a function that talks directly to my SMTP server, however, I'd
rather not go thru every single script on my server and change all the
mail() functions.

Any ideas?

Cheers,
Liam



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Redirecting - header location - sometimes not work

2002-09-18 Thread Marek Kilimajer

Try direct connection to the server to see the response it sends, you 
may also try to send header(HTTP/1.0 302 Found) and see if that helps.
What browsers does it happens to?

jana konickova wrote:

I have the php script with the command
Header(Location: https://$SERVER_NAME$path;);
which redirect from the script file1.php to the script file2.php.
If I fill the form in the www page file1.php and click the Submit button, 
the script file1.php save the information to database and then redirect to 
the page file2.php.
This redirecting  is functional, but not always. In some www browser the 
first redirecting not work, and if I return to the www page file1.php and 
if I click the Submit button again, the redirecting  working.

Do you have some help, please?

(Using Linux,  Apache/1.3.23  PHP 4.1.2)

Much thanks!

Jana Konickova

  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Please, Help dynamicaly creating an Array

2002-09-18 Thread Marek Kilimajer

Try eval(), like this:

$str= 'THREE'=3, 'FOUR'=4;

eval(\$data2 = array('ONE'=1,'TWO'=2,$str););


Max Sullivan wrote:

I am trying to populate array values and keys from a variable with no
luck.

Lets say I have the following array.

$data1 = array('ONE'=1,'TWO'=2,'THREE'=3,'FOUR'=4);

And I want to create part of the array with the string below:

$str= 'THREE'=3, 'FOUR'=4;
$data2 = array('ONE'=1,'TWO'=2,$str);


How can I create $data2 to work the same as $data1.  When I try the
above for $data2 a new key is created ([0]) for $str. And I end up with
...'TWO'=2, [0] = 'THREE'=3, 'FOUR'=4.  It doesn't interpret the
variable how I expect it to, instead it see's $str as a value.  I guess
the question is how can I make php use the string literally.

I've tried everything I can think of and I think my head is about to
explode :).  Is it possible to create an Array this way?  Any help is
appreciated!!


print_r($data1):
Array
(
[ONE] = 1
[TWO] = 2
[THREE] = 3
[FOUR] = 4
)


print_r($data2):
Array
(
[ONE] = 1
[TWO] = 2
[0] = 'THREE'=3, 'FOUR'=4
)


  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] time to seconds

2002-09-18 Thread adi

 Hi, I have a table table1, with a column Duration time type(ex 00:12:30)
I want to make in PHP a sql selection:
SELECT * from table1 WHERE condition, and after that, to make sum of values
of column Duration and display it.
Any Help?

How to transform time in seconds, with php functions?
tx




Re: [PHP] adding unix account via system command

2002-09-18 Thread Marek Kilimajer

It's a shell script, and your shell drops root privileges. Use a shell 
that doesn't or use a C-wraper.

tim tom wrote:

Dear Pete,
Yes, apache runs as nobody. But I have setuid add.sh. Wouldn't that be sufficient ?

--
tim

--- Peter Houchin [EMAIL PROTECTED] wrote:
  

you need to make sure that the web has permission to use that file .. my
guess is it don't have permission hence why you can run add.sh from the
command line (where your not your web user I'm assuming).





__
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Conditionally include file based on document location

2002-09-18 Thread Marek Kilimajer

switch($DOCUMENT_URI) {
case '/':
include( watch you want);
break;
case 

}

Eric C. Pollitt wrote:

I would like to know how to conditionally included a file based on the
document location.

The purpose is for placement of location-specific navigation menus.

I'm not interested in DHTML hierarchical drop-down menus, rather inserting
ready made HTML files using perhaps (?) DOCUMENT_URI (?) and error checking
logic.


EXAMPLE

If DOCUMENT_URI is / (home) then the following file included:

URL: http://www.globalhemp.com/includes/apple.html

If DOCUMENT_URI is /quicktime/ then the following file included:

URL: http://www.globalhemp.com/includes/quicktime.html

If DOCUMENT_URI is /quicktime/download/ then the following file included:

URL: http://www.globalhemp.com/includes/quicktime_download.html


The error checking logic would be for child directories that don't have
their own include file and thus would use a parent directory include file.
If a parent directory file doesn't exist, it would include the top-level
(home) include file.

The closest PHP example that I have found thus far follows:


[INCOMPLETE] PHP CONDITIONAL INCLUDE EXAMPLE
Extracted from: http://www.jwweb.com/20010629.html

?php
if ($location == quicktime) {
include(quicktime.inc);
if ($location == quicktime/download) {
include(download.inc);
} else {
include(home.inc);
}
?


THANKS!

Eric C. Pollitt, Founder
401 E. Illinois Ave.
Peoria, IL 61603
Global Hemp - Portal to the hemp community
http://www.globalhemp.com/

Create like a god.  Command like a king.  Work like a slave!
-- Constantin Brancusi


  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: time to seconds

2002-09-18 Thread Denis Basta

Hello,

Try this:
SELECT SUM(duration) AS summ, ..., ..., ..., FROM table1 WHERE condition
Hope it will help ya!

Regards,
Denis Basta.

Adi [EMAIL PROTECTED] wrote in message
008701c25ef1$01d94260$9600a8c0@adi">news:008701c25ef1$01d94260$9600a8c0@adi...
Hi, I have a table table1, with a column Duration time type(ex 00:12:30)
I want to make in PHP a sql selection:
SELECT * from table1 WHERE condition, and after that, to make sum of values
of column Duration and display it.
Any Help?

How to transform time in seconds, with php functions?
tx





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] replacing mail()

2002-09-18 Thread Marek Kilimajer

Try to set it in disable_functions, it may help, or may not. Otherwise 
disable it in php sources or even better regexp your scripts to change 
mail to something else.

Liam wrote:

Yeah, mail() again...

I want to disable the default mail command and replace it with my own.
I've written a function that talks directly to my SMTP server, however, I'd
rather not go thru every single script on my server and change all the
mail() functions.

Any ideas?

Cheers,
Liam



  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: time to seconds

2002-09-18 Thread Marek Kilimajer

won't help, it's forbidden to mix aggregate columns with non aggregate 
without a group by clause. Make your first query and then the sum.

Denis Basta wrote:

Hello,

Try this:
SELECT SUM(duration) AS summ, ..., ..., ..., FROM table1 WHERE condition
Hope it will help ya!

Regards,
Denis Basta.

Adi [EMAIL PROTECTED] wrote in message
008701c25ef1$01d94260$9600a8c0@adi">news:008701c25ef1$01d94260$9600a8c0@adi...
Hi, I have a table table1, with a column Duration time type(ex 00:12:30)
I want to make in PHP a sql selection:
SELECT * from table1 WHERE condition, and after that, to make sum of values
of column Duration and display it.
Any Help?

How to transform time in seconds, with php functions?
tx





  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Messaging Solution

2002-09-18 Thread Marek Kilimajer

You are very general, what you are asking for is all PHP is about.

karthikeyan wrote:

Messaging Solution

I want to develop a web-based Messaging System where the clients needs the messages 
and server keeps sending the messages based on Technical Request from the client.

I need to write a php script for responding to the client's Request.

How do I go about this job, is there already PHP Classes or Open Source Solution 
Ready which I might take and go about this job or I need to do this from the scratch.

Kindly guide me on this.

karthikeyan.

  

  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Auto-increment value

2002-09-18 Thread Faisal Abdullah

Hi people,

I have a table with a column called ID (auto-increment).
Is it possible to know the value of ID, right after inserting 
a row? 

I'm using postgresql.

Thanks.

Sincerely,
Faisal

__


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] time to seconds

2002-09-18 Thread Warren Daly

if your data is in UNIX TIMESTAMP format:

$result = mysql_query(select * from table1;,$db);
while ($row = mysql_fetch_array($result)){
// convert seconds from epoch into human date //
$data[] = date(Hi,mktime(0,0,$row['duration'],1,1,1970));
}

so I guess using mktime to convert DATE into unix timestamp

///mktime to recreate the unix timestamp
$result = mysql_query(select * from table1;,$db);
while ($row = mysql_fetch_array($result)){
$data[] =  mktime($hours ,$minutes, $seconds,$month ,$day,$year);
}

to sum the row you would need to add something like this.

$result = mysql_query(select * from table1;,$db);
while ($row = mysql_fetch_array($result)){
$var = $row['duration']
$sum = $var + $sum
}
echo $sum

but I'm sure other people have much better ways of doing it:) it's a bit
early in the morning for me
hope this helps.
Warren 

-Original Message-
From: adi [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 9:55 AM
To: PHP-General
Subject: [PHP] time to seconds


 Hi, I have a table table1, with a column Duration time type(ex
00:12:30)
I want to make in PHP a sql selection:
SELECT * from table1 WHERE condition, and after that, to make sum of
values
of column Duration and display it.
Any Help?

How to transform time in seconds, with php functions?
tx




smime.p7s
Description: application/pkcs7-signature


Re: [PHP] Auto-increment value

2002-09-18 Thread Scott Houseman

Hi there.

You can use the function mysql_insert_id( [link id] ).

regards

Scott

Faisal Abdullah wrote:
 Hi people,
 
 I have a table with a column called ID (auto-increment).
 Is it possible to know the value of ID, right after inserting 
 a row? 
 
 I'm using postgresql.
 
 Thanks.
 
 Sincerely,
 Faisal
 
 __
 
 


-- 
////
// Scott Houseman //
// Jam Warehouse http://www.jamwarehouse.com/ //
// Smart Business Innovation  //
// +27 21 4477440 / +27 82 4918021//
////


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Auto-increment value

2002-09-18 Thread Erwin

Scott Houseman wrote:
 Hi there.
 
 You can use the function mysql_insert_id( [link id] ).
 
 I'm using postgresql.

Not if you're using PostGreSQL

Grtz Erwin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Auto-increment value

2002-09-18 Thread Marek Kilimajer

As he uses postgresql, he should use *pg_last_oid()*

Scott Houseman wrote:

 Hi there.

 You can use the function mysql_insert_id( [link id] ).

 regards

 Scott

 Faisal Abdullah wrote:

 Hi people,

 I have a table with a column called ID (auto-increment).
 Is it possible to know the value of ID, right after inserting a row?
 I'm using postgresql.

 Thanks.

 Sincerely,
 Faisal

 __






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: note 25286 added to function.mb-strcut

2002-09-18 Thread nicos

It means the $_GET or $_POST doesn't exist, just verify that it exists.
a GET is on your URL like lala.php?irc=1 and $_GET['irc] = 1;
a POST is on your form and it will appear like $_POST['lol'].

Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
www.WorldAKT.com - Hébergement de sites Internet

- Original Message -
From: [EMAIL PROTECTED]
Newsgroups: php.notes
To: [EMAIL PROTECTED]
Sent: Wednesday, September 18, 2002 10:42 AM
Subject: note 25286 added to function.mb-strcut


 I always receive the error message:

 Call to underfined function:...

 when call this kind ( multiby string ) of function
 --
 http://www.php.net/manual/en/function.mb-strcut.php
 http://master.php.net/manage/user-notes.php?action=edit+25286
 http://master.php.net/manage/user-notes.php?action=delete+25286
 http://master.php.net/manage/user-notes.php?action=reject+25286



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Help.....still stuck after 3 days :/

2002-09-18 Thread Marek Kilimajer

I would do it this way (it fails if some names are same):

Chad Winger wrote:

Hello Rudolf,
Thank you for responding to my post, I really appreciate it.

I ran the script you sent me, and then I tried looking up the syntax to try
to figure out what it means. As it would be pointless for me just to take
suggestions that people send me and then not learn what they mean. The
resulkt of your code does in fact alphabatize the teams in the select list,
however there is a little problem with the end result.

your code:

?php

  include (C:\Program
Files\EasyPHP\www\florentiaviola.com\control\config.php);
  

  $fd = fopen ($teams, r);
  while (!feof ($fd))
  {
   $list = fgets($fd, 4096);
   $squads = explode(|, $list);
   $alphabetical[$squads[1]] = $squads[0];
  }
   fclose ($fd);

   ksort ($alphabetical);
  

   foreach ($alphabetical as $name = $id)
   {
   echo 'OPTION VALUE='.$id.''.$name.'/OPTION'.\n;
   }



?

returns the follwoing html:
OPTION VALUE=AAglianese/OPTION
OPTION VALUE=BBrescello/OPTION
OPTION VALUE=CCasteldisangro/OPTION
OPTION VALUE=CCastelnuovo/OPTION
OPTION VALUE=FFano/OPTION
OPTION VALUE=FFlorentia Viola/OPTION
OPTION VALUE=FForl/OPTION
OPTION VALUE=GGrosseto/OPTION
OPTION VALUE=GGualdo/OPTION


It is returning the first letter of $squads[1]. so the id variable is
getting lost.That variable is $squads[0]. So in effect that vairable is
getting lost because when i modify the line

echo 'OPTION VALUE='.
$alphabetical[$i][0].''.$alphabetical[$i].'/OPTION'.\n;

to read

echo 'OPTION VALUE='. $squads[0].''.$alphabetical[$i].'/OPTION'.\n;

then the HTML output becomes

OPTION VALUE=19Aglianese/OPTION
OPTION VALUE=19Brescello/OPTION
OPTION VALUE=19Casteldisangro/OPTION
OPTION VALUE=19Castelnuovo/OPTION
OPTION VALUE=19Fano/OPTION
OPTION VALUE=19Florentia Viola/OPTION
OPTION VALUE=19Forl/OPTION
OPTION VALUE=19Grosseto/OPTION
OPTION VALUE=19Gualdo/OPTION

In other words what I am trying to do is something to the effect of
$alphabetical = $squads[1][0]. Then I want to sort that only by $squads[1].
When the html is returned, I want to be able to echo the $squads[0] as the
Value of the select dropdown.

Thanks again,
-Tree


  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP and Microsoft Office

2002-09-18 Thread Marek Kilimajer

Look at the COM support (never have worked with it but it should be what 
you are looking for)

Matthew Tapia wrote:

Can you use PHP to add appts to my microsoft outlook calendar or open up a
document in ms word?





  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Auto-increment value

2002-09-18 Thread Justin French

not on postgreSQL :)

Justin


on 18/09/02 7:24 PM, Scott Houseman ([EMAIL PROTECTED]) wrote:

 Hi there.
 
 You can use the function mysql_insert_id( [link id] ).
 
 regards
 
 Scott
 
 Faisal Abdullah wrote:
 Hi people,
 
 I have a table with a column called ID (auto-increment).
 Is it possible to know the value of ID, right after inserting
 a row? 
 
 I'm using postgresql.
 
 Thanks.
 
 Sincerely,
 Faisal
 
 __
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Auto-increment value

2002-09-18 Thread Faisal Abdullah

I tried that. It gives me 24807, instead of 5.
Or is oid is a reference to something else, which would 
lead me to the '5' i'm looking for?

-- snip snip --

if($result = pg_exec($db, $sql))
{
$query = success;
echo oid :  .pg_last_oid($result);
}

-- snip snip --

Sincerely,
Faisal

-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 5:42 PM
To: PHP
Subject: Re: [PHP] Auto-increment value


As he uses postgresql, he should use *pg_last_oid()*

Scott Houseman wrote:

 Hi there.

 You can use the function mysql_insert_id( [link id] ).

 regards

 Scott

 Faisal Abdullah wrote:

 Hi people,

 I have a table with a column called ID (auto-increment).
 Is it possible to know the value of ID, right after inserting a row?
 I'm using postgresql.

 Thanks.

 Sincerely,
 Faisal

 __






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

__


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Help.....still stuck after 3 days :/

2002-09-18 Thread Ford, Mike [LSS]

 -Original Message-
 From: Chad Winger [mailto:[EMAIL PROTECTED]]
 Sent: 18 September 2002 02:32
 
 however there is a little problem with the end result.
 
 your code:
 
 ?php
 
   include (C:\Program
 Files\EasyPHP\www\florentiaviola.com\control\config.php);
 
   $fd = fopen ($teams, r);
   while (!feof ($fd))
   {
$list = fgets($fd, 4096);
$squads = explode(|, $list);
$alphabetical[] = $squads[1];
   }
 
sort ($alphabetical);
reset ($alphabetical);
 
for ($i = 0; $i = count($alphabetical) - 1; $i++)
{
echo 'OPTION VALUE='.
 $alphabetical[$i][0].''.$alphabetical[$i].'/OPTION'.\n;
}
fclose ($fd);
 
 
 ?

The problem with this script is it only sorts the team names, without
re-ordering the other columns of your array to match.  And the notation
$alphabetical[$i][0] is actually accessing the first character of the string
(tema name) in $alphabetical[$i] -- hence the result you see.

What you need to do is create an array or arrays containing all the content
you need to sort, and then sort them in parallel based on the team names.

My instinct would be to build a nested array of your values thusly:

   while (!feof ($fd))
   {
$list = fgets($fd, 4096);
$squads[] = explode(|, $list);
   }

which would build an array like this:

   $squads[0][0] = 01
   $squads[0][1] = Brescello
   $squads[0][2] = stadium
   $squads[0][3] = city
   $squads[1][0] = 02
   $squads[1][1] = Aglianese
   $squads[1][2] = stadium
   $squads[1][3] = city
   $squads[2][0] = 03
   $squads[2][1] = Casteldisangro
   $squads[2][2] = stadium
   $squads[2][3] = city

etc.

However, a little research in the PHP online manual looking for sorting
functions reveals that there's no simple function to sort this array the way
you want. There are two ways around this:

1. Build your arrays differently; whilst this is possible, it needs more
work and is not nearly as elegant (unless you need them this way for other
stuff in your script).  I'll leave this as an exercise for the reader, as
there at least 2 possible answers, but the sorting functions you might use
are asort() or array_multisort().

2. Use a more complex sorting method that sorts the above array as you want.
This is not actually as hard as it sounds, as there are several user notes
in the online manual under the entry for usort() that address exactly this
problem.  Basically, you need to define a function that says how to compare
two $squads[] rows for sorting -- in this case, by comparing the
$squads[][1] entries, so:

123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456
  function squad_compare($a, $b) // $a, $b each passed a $squads[] row
  {
 return strcasecmp($a[1], $b[1]);  // returns 0 if $a sorts first,
   // 0 if equal, 0 if $b sorts first
   // (case-INsensitive comparison)
  }

and then use this in a usort() (sort with user-defined comparison) call:

  usort($squads, 'squad_compare');

I've broken this down into component steps for easier understanding, but you
can actually do it all-in-one if you don't need to use the compare function
elsewhere; again, this is adapted from a user note on the usort() manual
page:

   usort($squads, create_function('$a,$b', 'return strcasecmp($a[1],
$b[1])'));

Finally, you can iterate through the results and generate your form:

  foreach($squads as $squad_info):
echo 'OPTION
VALUE='.$squad_info[0].''.$squad_info[1].'/OPTION'.\n;
  endforeach;

Hope this helps somewhat!

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




php-general Digest 18 Sep 2002 10:16:23 -0000 Issue 1592

2002-09-18 Thread php-general-digest-help


php-general Digest 18 Sep 2002 10:16:23 - Issue 1592

Topics (messages 11 through 116709):

Re: strange bug(?) when opening lots of files
11 by: Tyler Longren
116668 by: Shane Wright
116669 by: nicos.php.net
116670 by: Shane Wright
116671 by: nicos.php.net

Please, Help dynamicaly creating an Array
116667 by: Max Sullivan
116691 by: Marek Kilimajer

adding unix account via system command
116672 by: tim tom
116676 by: Peter Houchin
116677 by: tim tom
116678 by: Peter Houchin
116693 by: Marek Kilimajer

Conditionally include file based on document location
116673 by: Eric C. Pollitt
116694 by: Marek Kilimajer

Help.still stuck after 3 days :/
116674 by: Chad Winger
116705 by: Marek Kilimajer
116709 by: Ford, Mike   [LSS]

PHP and Microsoft Office
116675 by: Matthew Tapia
116706 by: Marek Kilimajer

Re: Regex for split() to split by , which is not in ()s?
116679 by: David Robley

hidden PATH_INFO
116680 by: perlguy9

Re: [PHP-GTK] problems with socket
116681 by: Steph

PHP and Flash
116682 by: icaam.icaam.com.ar
116683 by: Rasmus Lerdorf

Re: callbacks to methods inside a class/object
116684 by: Tom Rogers

Re: can you get the name of an object from within it's own class?
116685 by: Simon McKenna

Re: any new form builders
116686 by: Justin French

Messaging Solution
116687 by: karthikeyan
116698 by: Marek Kilimajer

mid-level PHP/MySQL people in Los Angeles?
116688 by: PHP freak

replacing mail()
116689 by: Liam
116696 by: Marek Kilimajer

Re: Redirecting - header location - sometimes not work
116690 by: Marek Kilimajer

time to seconds
116692 by: adi
116695 by: Denis Basta
116697 by: Marek Kilimajer
116700 by: Warren Daly

Auto-increment value
116699 by: Faisal Abdullah
116701 by: Scott Houseman
116702 by: Erwin
116703 by: Marek Kilimajer
116707 by: Justin French
116708 by: Faisal Abdullah

Re: note 25286 added to function.mb-strcut
116704 by: nicos.php.net

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

---BeginMessage---

How long does the script tend to run before it just quits?  Perhaps
a timeout is set too low in php.ini.

Take a look at max_execution_time in php.ini

tyler

On Tue, 17 Sep 2002 23:14:46 +0100
Shane Wright [EMAIL PROTECTED] wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hi
 
 One of my pages opens ~100 files, reads from them, and closes them,
 (only one file open at a time).
 
 The problem is that the page just dies mid-way through execution - no
 errors, no segfault, it just dies and returns a blank page to the
 user.  the problem goes away if I reduce the number of files accessed.
 
 its a build of PHP 4.1.2 on Linux running as an Apache module,  (if it
 makes any odds, the configure line is below).
 
 I can't see anything on bugs.php.net about this - has anyone seen this
 before (and, of course, the crucial question; what can I do to fix
 it?)
 
 Any help appreciated,
 
 Thanks
 
 - -- 
 Shane
 http://www.shanewright.co.uk/
 Public key: http://www.shanewright.co.uk/files/public_key.asc
 
 
  './configure' '--with-gd' '--enable-gd-native-ttf'
  '--enable-track-vars' 
 '--enable-sysvsem' '--enable-sysvshm' '--enable-calendar'
 '--with-zlib' '--prefix=/opt/php-4.1'
 '--with-config-file-path=/usr/local/etc/httpd/conf'
 '--enable-memory-limit' '--with-db2=/usr' '--with-db3=/usr'
 '--with-gdbm=/usr' '--with-ndbm=/usr' '--with-dbase' '--with-xml'
 '--with-expat-dir=/usr' '--enable-debugger' '--enable-ftp'
 '--with-ttf' '--with-jpeg-dir=/usr' '--enable-bcmath' '--with-openssl'
 
 '--enable-trans-sid' '--with-mysql=/usr' '--with-xpm-dir=/usr/X11R6' 
 '--with-png' '--with-png-dir=/usr' '--with-imap' '--with-dom=/usr' 
 '--with-bz2' '--with-curl' '--with-mhash=/usr' '--with-mcrypt=/usr' 
 '--with-pgsql' '--with-gmp' '--with-gettext' '--with-iconv'
 '--with-kerberos' '--enable-xslt' '--with-xslt-sablot'
 '--with-freetype-dir=/usr' '--with-apxs=/usr/sbin/apxs'
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.0.7 (GNU/Linux)
 
 iD8DBQE9h6lW5DXg6dCMBrQRAhhiAKCIo1xdyyDtx7fT8SO8Xz4bfWOg7QCfdjE3
 STUVeNEID6bzu4+hq+PqCI4=
 =zZqL
 -END PGP SIGNATURE-
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

---End Message---
---BeginMessage---

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Thanks for the input - but its definately not that; time limit is set to 600 
seconds and it dies inside 1 second :(

(i should have added 

[PHP] Need some help please.

2002-09-18 Thread Simon Angell

Hi.

I am having trouble with a PHP script. I am not the one who made this and my
knowledge on php is very little.
I came across this php script www.canberra-wx.com/bomonster/bomonster01.php
which is weather forecasting for a place called Mildura.
The file that the PHP gets its info from is here...
http://www.bom.gov.au/cgi-bin/wrap_fwo.pl?IDV17001.txt and if you look down
the page you will see the Mildura forecast that the PHP draws its info
output from.

My Problem is that i want it to work for this file...
http://www.bom.gov.au/cgi-bin/wrap_fwo.pl?IDN10035.txt and i cant work out
how to get it going.
i have got this far www.canberra-wx.com/bomonster/bomonster1.php (look at
the code, the actual outpot doesn't work..thats my problem). The part I want
the PHP to do its info output is from A.C.T FORECAST (like from the Mildura
in IDV17001.txt)

Any help on how to get it to work would be great.

Cheers
-
Simon Angell
Canberra ACT
www.canberra-wx.com
-
Member of:
Australian Severe Weather Association.
www.severeweather.asn.au
-
This email is virus free.
Scanned before leaving my mailbox
using Norton Antivirus 2002 for Win2k
Scanned with the latest definition File.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Dependent Dropdown Boxes

2002-09-18 Thread lallous

it is all .js right,
but there are the js_products and the js_categories javascript variables
which are server-side generated. They are dumped from the database and
encode '|' seperated values.


Btw, what you are achieving is heavily JavaScript...otherwise you can it
almost all in PHP w/o javascript...which is reload the page everytime he
chooses a new category.

something like:
panel Categories   |  panel subCats

generate categories as:
select * from categories
generate subCats as:
select * from subcats where cat={selected Cat}

add an event to the categories listbox as: onchange=this.form.submit();

this will cause the form to reload and refill your subCats accordingly.


Elias

Roger Lewis [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Thanks Elias,

 I took a look at the code and there are indeed many things to learn;
 however, it's all in js.
 I'm trying to have php write the js, but I don't know enough about arrays
 and manipulating their elements.

 Roger

 -Original Message-
 From: lallous [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 11, 2002 2:02 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: Dependent Dropdown Boxes

 Hi,

 Try to learn many things from the test code i created below:

 http://lgwm.org/ozone/dynatable.htm

 Good luck,

 Elias





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: replacing mail()

2002-09-18 Thread lallous

There is something you can set in php.ini afaik.
search for 'sendmail' in that file.

Elias,
Liam [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 Yeah, mail() again...

 I want to disable the default mail command and replace it with my own.
 I've written a function that talks directly to my SMTP server, however,
I'd
 rather not go thru every single script on my server and change all the
 mail() functions.

 Any ideas?

 Cheers,
 Liam





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Need some help please.

2002-09-18 Thread Simon Angell

just thought i should add the source
MILDURA (working)
?php

//weather(Mildura,http://www.bom.gov.au/cgi-bin/wrap_fwo.pl?IDV17001.txt;
,bomonster.htm);

weather(Mildura,http://www.bom.gov.au/cgi-bin/wrap_fwo.pl?IDV17001.txt,;
bomonster.htm);

function weather($placename, $inputfilename, $templatefilename){

//

#
// # BOMonster 0.1
// # Author: Matthew Cook ([EMAIL PROTECTED])
// #
// # How to use:
// # $placename is the place you want to find the forecasts for
// # $inputfilename is the file you want to grab the data from
// # $templatefilename is the file you want to put the forecasts into
// # Details are in readme.txt
// #
// # Released under the GNU GPL (http://www.gnu.org/copyleft/gpl.html)
//

#

 //try to connect to target - IDV60035
 if(!$fp=fopen($inputfilename ,r)) {
  echo Can't Open Weather File ;
 }
 else  {
  //initalise $content variable
  $content = ;

  // read content
  while(!feof($fp)){
   $content.=fgets($fp,1024);
  }

 //close  connection
  fclose($fp);

  //create new string containing data for selected place
  preg_match(|$placename.*?\\n\\n.*?\\n\\n|s, $content, $temp);

  //turn the first element of the temp array into a variable
  $temp_content = $temp[0];

  //split place_content into an array by multiple spaces and single [NL]s
  $temp_array = preg_split (/[\s]{2,}|[\n]/, $temp_content);

  //clean out all the Min and Max
  $temp_array = str_replace(Min, , $temp_array);
  $temp_array = str_replace(Max, , $temp_array);

  //trim entries
  for ($counter = 0; $counter = count($temp_array)-1; $counter++){
   trim($temp_array[$counter]);
  }

  //check for today's description  80 char
  if (is_numeric($temp_array[3]) == FALSE){
 $temp_array[2] = $temp_array[2]. .$temp_array[3];
   for ($counter = 3; $counter = count($temp_array)-2; $counter++) {
$temp_array[$counter] = $temp_array[$counter+1];
   }
  }

  //print_r($temp_array);

  //determine if it's the afternoon/evening variant or not
  if (preg_match(/Tonight/, $temp_array[1])){
 $arvomod = 1;
 $temp_array = str_replace(Tonight and , , $temp_array);
  } else {
 $arvomod = 0;
  }

  //convert $temp_array into $place_array
  $place_array[name][0] = $temp_array[0];
  $place_array[name][1] = $temp_array[1];
  $place_array[name][2] = $temp_array[6+$arvomod];
  $place_array[name][3] = $temp_array[10+$arvomod];
  $place_array[name][4] = $temp_array[14+$arvomod];

  $place_array[description][1] = $temp_array[2];
  $place_array[description][2] = $temp_array[7+$arvomod];
  $place_array[description][3] = $temp_array[11+$arvomod];
  $place_array[description][4] = $temp_array[15+$arvomod];

  if ($arvomod = 1){
 $place_array[min_temp][1] = $temp_array[3];
  }
  $place_array[min_temp][2] = $temp_array[8+$arvomod];
  $place_array[min_temp][3] = $temp_array[12+$arvomod];
  $place_array[min_temp][4] = $temp_array[16+$arvomod];

  $place_array[max_temp][1] = $temp_array[3+$arvomod];
  $place_array[max_temp][2] = $temp_array[9+$arvomod];
  $place_array[max_temp][3] = $temp_array[13+$arvomod];
  $place_array[max_temp][4] = $temp_array[17+$arvomod];

  $place_array[precip][1] = $temp_array[5+$arvomod];

  //determine the appropriate images and alt tags
  for ($counter = 1; $counter = 4; $counter++){
   if (stristr($place_array[description][$counter], thunderstorm)){
$place_array[image][$counter] = thunder;
$place_array[alt_tag][$counter] = Thunderstorms;
   } elseif (stristr($place_array[description][$counter], shower)){
$place_array[image][$counter] = shower;
$place_array[alt_tag][$counter] = Showers;
   } elseif (stristr($place_array[description][$counter], fine)){
$place_array[image][$counter] = fine;
$place_array[alt_tag][$counter] = Fine;
   } else {
$place_array[image][$counter] = unknown;
$place_array[alt_tag][$counter] = Unknown;
   }
  }

  //create short names
  for ($counter = 0; $counter = 4; $counter++){
  $place_array[short_name][$counter] =
substr($place_array[name][$counter], 0, 3);
  }
}
  //declare template
  $template = ;

  //open template
  if(!$fp=fopen($templatefilename ,r)) {
   echo Can't Open Template File ;
  }  else  {
   // read template
   while(!feof($fp)){
$template.=fgets($fp,1024);
   }

   //close  connection
   fclose($fp);

   //replace some strings
   $patterns = array(
  /(\%Name\[)(.*?)(\]\%)/se,
  /(\%Description\[)(.*?)(\]\%)/se,
  /(\%Min_Temp\[)(.*?)(\]\%)/se,
  /(\%Max_Temp\[)(.*?)(\]\%)/se,
  /(\%Precip\[)(.*?)(\]\%)/se,
  /(\%Image\[)(.*?)(\]\%)/se,
  /(\%Alt_Tag\[)(.*?)(\]\%)/se,
/(\%Short_Name\[)(.*?)(\]\%)/se
   );

   $replace = array(
 

[PHP] Urgent Installation Question

2002-09-18 Thread César Aracena

Hi all,

I know this has been answered a lot in this list, but I'm not at my computer where I 
have fast access to my e-mails. I'm about to make my first PHP - MySQL installation 
under Win2K + IIS 5.0 and really don't have a clue of what to do (also sleepy). I've 
downloaded the 4.2.3 version of PHP and the version 3.23.52 of MySQL for Windows... 
what now?

I'll leave the PDF, GD, and other libraries for another PHP compilation for now. I 
just need to test my Win2K + IIS configuration.

Thanks in advance,

César Aracena



RE: [PHP] Urgent Installation Question

2002-09-18 Thread John Holmes

Have you tried the chapter in the PHP manual on installation? It walks
you right through it. 

MySQL is just a simple unzip and go, there's no real setup to it at all
other than changing the root password...

---John Holmes...

 -Original Message-
 From: César Aracena [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 18, 2002 5:39 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Urgent Installation Question
 
 Hi all,
 
 I know this has been answered a lot in this list, but I'm not at my
 computer where I have fast access to my e-mails. I'm about to make my
 first PHP - MySQL installation under Win2K + IIS 5.0 and really don't
have
 a clue of what to do (also sleepy). I've downloaded the 4.2.3 version
of
 PHP and the version 3.23.52 of MySQL for Windows... what now?
 
 I'll leave the PDF, GD, and other libraries for another PHP
compilation
 for now. I just need to test my Win2K + IIS configuration.
 
 Thanks in advance,
 
 César Aracena


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Image resolution and php

2002-09-18 Thread dsfljsdfklj kljvdskljfsdkl

I have the following problem:

I need to get resolution information (dpi) from any
image of jpg, gif or png formats.

It would be sufficient to obtain pixel and inches
dimension of such images and calculate resolution by
simply dividing but I haven't found any function that
gets effective dimensions in inches.

I have PHP 4.1.2 with GD libs installed

Thanks
Rik

__
Mio Yahoo!: personalizza Yahoo! come piace a te 
http://it.yahoo.com/mail_it/foot/?http://it.my.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Urgent Installation Question

2002-09-18 Thread César Aracena

Thanks. I installed PHP first and will install MySQL (once the download
finishes) hoping they'll work together just fine. One thing's missing... the
phpinfo.php file, which should be here... but isn't... Should I grab it from
somewhere else?

Thanks again, C.

- Original Message -
From: John Holmes [EMAIL PROTECTED]
To: 'César Aracena' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, September 18, 2002 7:57 AM
Subject: RE: [PHP] Urgent Installation Question


 Have you tried the chapter in the PHP manual on installation? It walks
 you right through it.

 MySQL is just a simple unzip and go, there's no real setup to it at all
 other than changing the root password...

 ---John Holmes...

  -Original Message-
  From: César Aracena [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, September 18, 2002 5:39 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Urgent Installation Question
 
  Hi all,
 
  I know this has been answered a lot in this list, but I'm not at my
  computer where I have fast access to my e-mails. I'm about to make my
  first PHP - MySQL installation under Win2K + IIS 5.0 and really don't
 have
  a clue of what to do (also sleepy). I've downloaded the 4.2.3 version
 of
  PHP and the version 3.23.52 of MySQL for Windows... what now?
 
  I'll leave the PDF, GD, and other libraries for another PHP
 compilation
  for now. I just need to test my Win2K + IIS configuration.
 
  Thanks in advance,
 
  César Aracena




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Auto-increment value

2002-09-18 Thread Faisal Abdullah

Would a select last_value from sequence_name do any good?
Is there a possibility that I get a value from the outcome of
a nextval by another session?

Meaning, I do an insert 1, 2, 3, 4
A 'select last_value from sequence_name' should give me '4'.

But what if another user/session does another insert/nextval(),
before my select statement finishes processing? Would I get
a 5?

Sincerely,
Faisal

-Original Message-
From: Faisal Abdullah [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 6:37 PM
To: PHP
Subject: RE: [PHP] Auto-increment value


I tried that. It gives me 24807, instead of 5.
Or is oid is a reference to something else, which would 
lead me to the '5' i'm looking for?

-- snip snip --

if($result = pg_exec($db, $sql))
{
$query = success;
echo oid :  .pg_last_oid($result);
}

-- snip snip --

Sincerely,
Faisal

-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 5:42 PM
To: PHP
Subject: Re: [PHP] Auto-increment value


As he uses postgresql, he should use *pg_last_oid()*

Scott Houseman wrote:

 Hi there.

 You can use the function mysql_insert_id( [link id] ).

 regards

 Scott

 Faisal Abdullah wrote:

 Hi people,

 I have a table with a column called ID (auto-increment).
 Is it possible to know the value of ID, right after inserting a row?
 I'm using postgresql.

 Thanks.

 Sincerely,
 Faisal

 __






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

__


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

__


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Urgent Installation Question

2002-09-18 Thread John Holmes

There should be a php-ini.dist that you can rename to PHP.ini 

---John Holmes...

 -Original Message-
 From: César Aracena [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 18, 2002 6:03 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] Urgent Installation Question
 
 Thanks. I installed PHP first and will install MySQL (once the
download
 finishes) hoping they'll work together just fine. One thing's
missing...
 the
 phpinfo.php file, which should be here... but isn't... Should I grab
it
 from
 somewhere else?
 
 Thanks again, C.
 
 - Original Message -
 From: John Holmes [EMAIL PROTECTED]
 To: 'César Aracena' [EMAIL PROTECTED];
[EMAIL PROTECTED]
 Sent: Wednesday, September 18, 2002 7:57 AM
 Subject: RE: [PHP] Urgent Installation Question
 
 
  Have you tried the chapter in the PHP manual on installation? It
walks
  you right through it.
 
  MySQL is just a simple unzip and go, there's no real setup to it at
all
  other than changing the root password...
 
  ---John Holmes...
 
   -Original Message-
   From: César Aracena [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, September 18, 2002 5:39 AM
   To: [EMAIL PROTECTED]
   Subject: [PHP] Urgent Installation Question
  
   Hi all,
  
   I know this has been answered a lot in this list, but I'm not at
my
   computer where I have fast access to my e-mails. I'm about to make
my
   first PHP - MySQL installation under Win2K + IIS 5.0 and really
don't
  have
   a clue of what to do (also sleepy). I've downloaded the 4.2.3
version
  of
   PHP and the version 3.23.52 of MySQL for Windows... what now?
  
   I'll leave the PDF, GD, and other libraries for another PHP
  compilation
   for now. I just need to test my Win2K + IIS configuration.
  
   Thanks in advance,
  
   César Aracena
 
 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Help.....still stuck after 3 days :/

2002-09-18 Thread Rudolf Visagie

Hi,

The solution I posted:

echo 'OPTION
VALUE='.$alphabetical[$i][0].''.$alphabetical[$i].'/OPTION'.\n;

did indeed take the first letter of $squads[1] as option value. I wondered
at the time why Chad would want the first letter of the name as option value
(that was his original code); I didn't realise that he wanted the id as
option value.

This code works fine:

$fd = fopen ($teams, r);
while (!feof ($fd))
{
$list = fgets($fd, 4096);
$squads = explode(|, $list);
$alphabetical[$squads[1]] = $squads[0];
}
fclose ($fd);

ksort ($alphabetical);

echo select;
foreach ($alphabetical as $name = $id)
{
echo 'OPTION VALUE='.$id.''.$name.'/OPTION'.\n;
}
echo /select;

(I think it is Marek's code - I added the select).


Building on the above code and if you you wanted to have every column in an
array: Instead of having squad_compares, usorts and the like, why not just
link on id to associative arrays for each column, e.g.

$fd = fopen ($teams, r);
while (!feof ($fd))
{
$list = fgets($fd, 4096);
$squads = explode(|, $list);
$alphabetical[$squads[1]] = $squads[0];
$stadium[$squads[0]] = $squads[2];
$city[$squads[0]] = $squads[3];
}
fclose ($fd);

ksort ($alphabetical);

echo select;
foreach ($alphabetical as $name = $id)
{
echo 'OPTION VALUE='.$id.''.$name. -
.$stadium[$id].'/OPTION'.\n;
}
echo /select;

If you wanted to access the appropriate data you would use $stadium[$id] if
you had the id, or $stadium[$alphabetical[$name]] if you had the name.

Cheers

Rudolf Visagie
Principal Software Developer
Digital Healthcare Solutions
mailto:[EMAIL PROTECTED]
Tel: 011 6901019
Cell: 082 895 1598

-Original Message-
From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 12:21 PM
To: 'Chad Winger'; [EMAIL PROTECTED]
Subject: RE: [PHP] Help.still stuck after 3 days :/


 -Original Message-
 From: Chad Winger [mailto:[EMAIL PROTECTED]]
 Sent: 18 September 2002 02:32
 
 however there is a little problem with the end result.
 
 your code:
 
 ?php
 
   include (C:\Program
 Files\EasyPHP\www\florentiaviola.com\control\config.php);
 
   $fd = fopen ($teams, r);
   while (!feof ($fd))
   {
$list = fgets($fd, 4096);
$squads = explode(|, $list);
$alphabetical[] = $squads[1];
   }
 
sort ($alphabetical);
reset ($alphabetical);
 
for ($i = 0; $i = count($alphabetical) - 1; $i++)
{
echo 'OPTION VALUE='.
 $alphabetical[$i][0].''.$alphabetical[$i].'/OPTION'.\n;
}
fclose ($fd);
 
 
 ?

The problem with this script is it only sorts the team names, without
re-ordering the other columns of your array to match.  And the notation
$alphabetical[$i][0] is actually accessing the first character of the string
(tema name) in $alphabetical[$i] -- hence the result you see.

What you need to do is create an array or arrays containing all the content
you need to sort, and then sort them in parallel based on the team names.

My instinct would be to build a nested array of your values thusly:

   while (!feof ($fd))
   {
$list = fgets($fd, 4096);
$squads[] = explode(|, $list);
   }

which would build an array like this:

   $squads[0][0] = 01
   $squads[0][1] = Brescello
   $squads[0][2] = stadium
   $squads[0][3] = city
   $squads[1][0] = 02
   $squads[1][1] = Aglianese
   $squads[1][2] = stadium
   $squads[1][3] = city
   $squads[2][0] = 03
   $squads[2][1] = Casteldisangro
   $squads[2][2] = stadium
   $squads[2][3] = city

etc.

However, a little research in the PHP online manual looking for sorting
functions reveals that there's no simple function to sort this array the way
you want. There are two ways around this:

1. Build your arrays differently; whilst this is possible, it needs more
work and is not nearly as elegant (unless you need them this way for other
stuff in your script).  I'll leave this as an exercise for the reader, as
there at least 2 possible answers, but the sorting functions you might use
are asort() or array_multisort().

2. Use a more complex sorting method that sorts the above array as you want.
This is not actually as hard as it sounds, as there are several user notes
in the online manual under the entry for usort() that address exactly this
problem.  Basically, you need to define a function that says how to compare
two $squads[] rows for sorting -- in this case, by comparing the
$squads[][1] entries, so:

123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456
  function squad_compare($a, $b) // $a, $b each passed a $squads[] row
  {
 return strcasecmp($a[1], $b[1]);  // returns 0 if $a sorts first,
   

Re: [PHP] Urgent Installation Question

2002-09-18 Thread Marek Kilimajer

If you mean phpinfo.php which calls just phpinfo(), here it is:
?
phpinfo();
?

César Aracena wrote:

Thanks. I installed PHP first and will install MySQL (once the download
finishes) hoping they'll work together just fine. One thing's missing... the
phpinfo.php file, which should be here... but isn't... Should I grab it from
somewhere else?

Thanks again, C.

- Original Message -
From: John Holmes [EMAIL PROTECTED]
To: 'César Aracena' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, September 18, 2002 7:57 AM
Subject: RE: [PHP] Urgent Installation Question


  

Have you tried the chapter in the PHP manual on installation? It walks
you right through it.

MySQL is just a simple unzip and go, there's no real setup to it at all
other than changing the root password...

---John Holmes...



-Original Message-
From: César Aracena [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 5:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Urgent Installation Question

Hi all,

I know this has been answered a lot in this list, but I'm not at my
computer where I have fast access to my e-mails. I'm about to make my
first PHP - MySQL installation under Win2K + IIS 5.0 and really don't
  

have


a clue of what to do (also sleepy). I've downloaded the 4.2.3 version
  

of


PHP and the version 3.23.52 of MySQL for Windows... what now?

I'll leave the PDF, GD, and other libraries for another PHP
  

compilation


for now. I just need to test my Win2K + IIS configuration.

Thanks in advance,

César Aracena
  





  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Auto-increment value

2002-09-18 Thread Marek Kilimajer

MySQL has |LAST_INSERT_ID() function, try it (SELECT ||LAST_INSERT_ID())|

Faisal Abdullah wrote:

Would a select last_value from sequence_name do any good?
Is there a possibility that I get a value from the outcome of
a nextval by another session?

Meaning, I do an insert 1, 2, 3, 4
A 'select last_value from sequence_name' should give me '4'.

But what if another user/session does another insert/nextval(),
before my select statement finishes processing? Would I get
a 5?

Sincerely,
Faisal

-Original Message-
From: Faisal Abdullah [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 6:37 PM
To: PHP
Subject: RE: [PHP] Auto-increment value


I tried that. It gives me 24807, instead of 5.
Or is oid is a reference to something else, which would 
lead me to the '5' i'm looking for?

-- snip snip --

if($result = pg_exec($db, $sql))
{
   $query = success;
   echo oid :  .pg_last_oid($result);
   }

-- snip snip --

Sincerely,
Faisal

-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 5:42 PM
To: PHP
Subject: Re: [PHP] Auto-increment value


As he uses postgresql, he should use *pg_last_oid()*

Scott Houseman wrote:

  

Hi there.

You can use the function mysql_insert_id( [link id] ).

regards

Scott

Faisal Abdullah wrote:



Hi people,

I have a table with a column called ID (auto-increment).
Is it possible to know the value of ID, right after inserting a row?
I'm using postgresql.

Thanks.

Sincerely,
Faisal

__


  





  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Auto-increment value

2002-09-18 Thread Faisal Abdullah

Thanks for your reply,
but I'm using postgresql.
Mysql is irrelevant for me.


-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 7:41 PM
To: PHP
Subject: Re: [PHP] Auto-increment value


MySQL has |LAST_INSERT_ID() function, try it (SELECT ||LAST_INSERT_ID())|

Faisal Abdullah wrote:

Would a select last_value from sequence_name do any good?
Is there a possibility that I get a value from the outcome of
a nextval by another session?

Meaning, I do an insert 1, 2, 3, 4
A 'select last_value from sequence_name' should give me '4'.

But what if another user/session does another insert/nextval(),
before my select statement finishes processing? Would I get
a 5?

Sincerely,
Faisal

-Original Message-
From: Faisal Abdullah [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 6:37 PM
To: PHP
Subject: RE: [PHP] Auto-increment value


I tried that. It gives me 24807, instead of 5.
Or is oid is a reference to something else, which would 
lead me to the '5' i'm looking for?

-- snip snip --

if($result = pg_exec($db, $sql))
{
   $query = success;
   echo oid :  .pg_last_oid($result);
   }

-- snip snip --

Sincerely,
Faisal

-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 5:42 PM
To: PHP
Subject: Re: [PHP] Auto-increment value


As he uses postgresql, he should use *pg_last_oid()*

Scott Houseman wrote:

  

Hi there.

You can use the function mysql_insert_id( [link id] ).

regards

Scott

Faisal Abdullah wrote:



Hi people,

I have a table with a column called ID (auto-increment).
Is it possible to know the value of ID, right after inserting a row?
I'm using postgresql.

Thanks.

Sincerely,
Faisal

__


  





  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

__


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Auto-increment value

2002-09-18 Thread Leonid Mamtchenkov

Dear Faisal Abdullah,

Once you wrote about RE: [PHP] Auto-increment value:
 Thanks for your reply,
 but I'm using postgresql.
 Mysql is irrelevant for me.

There is a similar one for postgresql as well: pg_last_oid() .

 -Original Message-
 From: Marek Kilimajer [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 18, 2002 7:41 PM
 To: PHP
 Subject: Re: [PHP] Auto-increment value
 
 MySQL has |LAST_INSERT_ID() function, try it (SELECT ||LAST_INSERT_ID())|

-- 
Best regards,
  Leonid Mamtchenkov, RHCE
  System Administrator
  Francoudi  Stephanou Ltd.

BOFH: HTTPD Error 666 : BOFH was here

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Image resolution and php

2002-09-18 Thread Jome

 I need to get resolution information (dpi) from any
 image of jpg, gif or png formats.

 It would be sufficient to obtain pixel and inches
 dimension of such images and calculate resolution by
 simply dividing but I haven't found any function that
 gets effective dimensions in inches.

http://www.php.net/manual/en/function.getimagesize.php

I'm sligthly confused about what you're looking for, but the above URL
*could* be something.

Jome



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Auto-increment value

2002-09-18 Thread Faisal Abdullah



 There is a similar one for postgresql as well: pg_last_oid() .

I tried that. It gives me 24807, instead of 5.
Or is oid is a reference to something else, which would 
lead me to the '5' i'm looking for?

-- snip snip --

if($result = pg_exec($db, $sql))
{
$query = success;
echo oid :  .pg_last_oid($result);
}

-- snip snip --

Sincerely,
Faisal

__


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Auto-increment value

2002-09-18 Thread bob parker

SELECT idno ORDER BY idno DESC LIMIT 1;
assuming idno is what gets auto incremented
bob

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Image resolution and php

2002-09-18 Thread Mark Charette

Images don't have a resolution per se; display devices have a resolution.
Images (the formats you're talking about, anyway) are measured in pixel
width and height. The height and width in any units other than pixels of
course necessitates conversion - for an easy example, a 300x300 image on a
1200x1200dpi printer will be exactly one quarter the size of the same image
printed on a 300x300 dpi printer.

-Original Message-
From: Jome [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 8:11 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Image resolution and php


 I need to get resolution information (dpi) from any
 image of jpg, gif or png formats.

 It would be sufficient to obtain pixel and inches
 dimension of such images and calculate resolution by
 simply dividing but I haven't found any function that
 gets effective dimensions in inches.

http://www.php.net/manual/en/function.getimagesize.php

I'm sligthly confused about what you're looking for, but the above URL
*could* be something.

Jome



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Auto-increment value

2002-09-18 Thread Marek Kilimajer

You encounter a race condition

bob parker wrote:

SELECT idno ORDER BY idno DESC LIMIT 1;
assuming idno is what gets auto incremented
bob

  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Auto-increment value

2002-09-18 Thread Jon Haworth

Hi Bob,

 SELECT idno ORDER BY idno DESC LIMIT 1;
 assuming idno is what gets auto incremented

That's not the best idea - what happens if two users are inserting records
into the table at nearly-but-not-quite the same time?

1. Insert A goes through
2. Insert B goes through
3. LastID A returns the ID of B
4. LastID B returns the ID of B

Whoever did insert A would receive the wrong ID.

Cheers
Jon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Oracle connection release

2002-09-18 Thread Rasmus Sellberg

Does PHP release the Oracle connection if I run PHP from the command line?
If not, how can I release the connection if the OCILogoff is empty as stated
on the comments of its documentation page?

//rasmus


Rasmus SellbergInventive Business Technology
Associate ConsultantSödermälarstrand 29, 6tr
[EMAIL PROTECTED] 118 25 Stockholm
  Sweden
+46 70 478 34 41
+46 8 616 99 46 www.inventive.se


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Auto-increment value

2002-09-18 Thread bob parker

If there is a possibilty of that then
BEGIN
INSERT ... whatever
SELECT idno ORDER BY (idno) DESC LIMIT 1;
END;
It works, I just tried it in postgresql, the last idno is
visible to the user making the transaction, and will be
unavailable to others.
From [EMAIL PROTECTED] Wed Sep 18 
22:34:13 2002
Envelope-to: bob@localhost
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
list-help: mailto:[EMAIL PROTECTED]
list-unsubscribe: mailto:[EMAIL PROTECTED]
list-post: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
From: Jon Haworth [EMAIL PROTECTED]
To: 'bob parker' [EMAIL PROTECTED], [EMAIL PROTECTED]
Date: Wed, 18 Sep 2002 13:27:56 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
charset=ISO-8859-1
Subject: RE: [PHP] Auto-increment value
X-UIDL: *ab!\-5!!-$7!!nk~!!

Hi Bob,

 SELECT idno ORDER BY idno DESC LIMIT 1;
 assuming idno is what gets auto incremented

That's not the best idea - what happens if two users are inserting records
into the table at nearly-but-not-quite the same time?

1. Insert A goes through
2. Insert B goes through
3. LastID A returns the ID of B
4. LastID B returns the ID of B

Whoever did insert A would receive the wrong ID.

Cheers
Jon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



bob

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP and Microsoft Office

2002-09-18 Thread Steve Bradwell

Yes you can,

check http://www.php.net/manual/en/ref.com.php for examples.

HTH,
Steve.


-Original Message-
From: Matthew Tapia [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 17, 2002 9:43 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP and Microsoft Office


Can you use PHP to add appts to my microsoft outlook calendar or open up a
document in ms word?





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] extension_dir

2002-09-18 Thread Ivo

Hi

I had problems with extension_dir on windows. I followed the news and found
out that there are more question that answers about it.

I accidentally found a solution and would like to share it, hoping it could
be useful for others looking for help.

I tried in vain to set up the extension_dir as c:\php, c:\php\extensions,
c:\winnt\system32 (on w2k).

Finally before to give up I made an desperation action putting all dlls I
needed into the c:\php\dlls dir

What a happiness! All messages stating that this and that dll cannot be
found disappeared!

Enjoy!

Ivo



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Auto-increment value

2002-09-18 Thread Justin French

I tend to (if I can't use mysql_last_id) insert a unique key into the row,
and pull the row out that matches that key, in order to get the ID...
ensures that it was the right row... then you can delete the unique key.

Justin


on 18/09/02 10:27 PM, Jon Haworth ([EMAIL PROTECTED]) wrote:

 Hi Bob,
 
 SELECT idno ORDER BY idno DESC LIMIT 1;
 assuming idno is what gets auto incremented
 
 That's not the best idea - what happens if two users are inserting records
 into the table at nearly-but-not-quite the same time?
 
 1. Insert A goes through
 2. Insert B goes through
 3. LastID A returns the ID of B
 4. LastID B returns the ID of B
 
 Whoever did insert A would receive the wrong ID.
 
 Cheers
 Jon


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Oracle connection release

2002-09-18 Thread Thies C. Arntzen

On Wed, Sep 18, 2002 at 02:48:13PM +0200, Rasmus Sellberg wrote:
 Does PHP release the Oracle connection if I run PHP from the command line?

yes 

tc

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: replacing mail()

2002-09-18 Thread lallous

Afaik, PHP on Unix does not use internal functions but instead it uses
Sendmail therefore you can configure it in PHP.INI to not use sendmail,

as for win32, PHP mails via direct SMTP connections...


Liam Mackenzie [EMAIL PROTECTED] wrote in message
002a01c25f00$54a01050$0b00a8c0@enigma">news:002a01c25f00$54a01050$0b00a8c0@enigma...
 I've spent over 6 months trying to get sendmail to work to my liking,
don't
 talk to me about sendmail!
 :-P

 eXtremail does the job real good  ;-)
 www.extremail.com

 Is there any way of EASILY rewriting PHP's mail() function?

 Cheers,
 Liam


 - Original Message -
 From: lallous [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, September 18, 2002 9:25 PM
 Subject: [PHP] Re: replacing mail()


 There is something you can set in php.ini afaik.
 search for 'sendmail' in that file.

 Elias,
 Liam [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]...
  Yeah, mail() again...
 
  I want to disable the default mail command and replace it with my own.
  I've written a function that talks directly to my SMTP server, however,
 I'd
  rather not go thru every single script on my server and change all the
  mail() functions.
 
  Any ideas?
 
  Cheers,
  Liam
 
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php









-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: PHP function for searching words in a string?

2002-09-18 Thread yasin inat

  Example 1. Find the string of text php

// the i after the pattern delimiter indicates a case-insensitive search
if (preg_match (/php/i, PHP is the web scripting language of choice.)) {
print A match was found.;
} else {
print A match was not found.;
}


  Example 2. find the word web

// the \b in the pattern indicates a word boundary, so only the distinct
// word web is matched, and not a word partial like webbing or cobweb
if (preg_match (/\bweb\b/i, PHP is the web scripting language of
choice.)) {
print A match was found.;
} else {
print A match was not found.;
}
if (preg_match (/\bweb\b/i, PHP is the website scripting language of
choice.)) {
print A match was found.;
} else {
print A match was not found.;
}


  Example 3. Getting the domain name out of a URL

// get host name from URL
preg_match(/^(http:\/\/)?([^\/]+)/i,
http://www.php.net/index.html;, $matches);
$host = $matches[2];
// get last two segments of host name
preg_match(/[^\.\/]+\.[^\.\/]+$/,$host,$matches);
echo domain name is: .$matches[0].\n;


  This example will produce: domain name is: php.net



See also preg_match_all(), preg_replace(), and preg_split().




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Auto-increment value

2002-09-18 Thread bob parker

From: Marek Kilimajer [EMAIL PROTECTED]
To: PHP [EMAIL PROTECTED]
Subject: Re: [PHP] Auto-increment value

You encounter a race condition

bob parker wrote:

SELECT idno ORDER BY idno DESC LIMIT 1;
assuming idno is what gets auto incremented
bob


To avoid the race it is necessary to do the whole
thing in a transaction, for postgresql this works
BEGIN;
INSERT ... whatever
SELECT ... the last idno
END;
The last idno is available to the user inside the
transaction.
I beleive the terminating ';' are not needed in
php generated sql statements but they don't hurt either.
bob

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] MySQL Current Row??

2002-09-18 Thread Beeman

What function/array index should I use to determine the current row of a
MySQL query when outputting using a do..while.. Loop?



RE: [PHP] MySQL Current Row??

2002-09-18 Thread Cal Evans

In (most) SQL servers there is no concept of 'row number'. Most DA's design
tables with a unique primary key. This can be used to identify the row form
all of the other rows but it is not the same as a 'row number'.

Since you are using PHP you can set a counter to 1 before your loop and then
increment it at each loop. This will give you the semblance of a row number
but be aware it is not the same.  These are row numbers within the cursor
you are looking at.  If your cursor is a subset of the table's data then the
numbers you are counting do not correspond to the data in the table.

HTH,
=C=

*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*


-Original Message-
From: Beeman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 8:30 AM
To: php
Subject: [PHP] MySQL Current Row??


What function/array index should I use to determine the current row of a
MySQL query when outputting using a do..while.. Loop?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] adding unix account via system command

2002-09-18 Thread Henrik Hudson

Personally, running a script directly from a website to add users is asking 
for security trouble.. I would have it write a adduser request to a file 
and then have a cron job parse that file everyt 5, 10 or 30 minutes or 
something looking for new users to add.  This gets you around the SUID 
problem and also allows you to do some more sanity checks, etc... on the user 
being added.

Of course your script is checking to make sure that a webuser isn't submitting 
root, admin, nobody or any of the system names as a user, correct?


On Tuesday 17 September 2002 19:55, tim tom wrote:
 php4.2.3 apache mod
 linux rh7.2
 ---

 I am trying to add unix system account user via a simple php and shell
 script ?
 system(/usr/bin/add.sh timtom752002 timtom752002 /home/timtom752002,$r)
 or die ( $r user creation fail);

 print success;
 ?

 when i ran add.php on my browser, i get
  254 user creation fail

 I created my add.sh file in /usr/bin and I have setuid it:
 -rwsr-xr-x1 root devel 216 Sep 18 08:54 add.sh

 It looks like:
 #!/bin/sh

 username=$1
 password=$2
 homedir=$3
 # create user
 /usr/sbin/useradd -m -d $homedir $username


 # change the password
 (
 echo $password
 sleep 1
 echo $password
 sleep 1
 echo $password
 )|passwd $username

 When I ran the add.sh from the command line, it works ok:
 $ /usr/bin/add.sh n n /home/n
 Changing password for user n
 passwd: all authentication tokens updated successfully
 (i tried login in with uid=n and passwd=n and it was ok)

 What's wrong with those scripts. It DOESN'T even create the user
 timtom752002. Please help

-- 

Henrik Hudson
[EMAIL PROTECTED]

Note:  Beware of Dragons - Thou art crunchy and taste good with ketchup.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Need some help please.

2002-09-18 Thread Simon Angell


I Have now got it kinda working, but not fully, i changed something i
shouldn't have, but fixed that..
 //create new string containing data for selected place
  preg_match(|$placename.*?\\n\\n.*?\\n\\n|s, $content, $temp); (i had it
//create new string containing data for selected place
  preg_match(|$canberra.*?\\n\\n.*?\\n\\n|s, $content, $temp); by
accident), but as you see it doesn't get all the forecast
Mildura (works)
http://www.canberra-wx.com/bomonster/bomonster01.php
Canberra (kinda works)
http://www.canberra-wx.com/bomonster/bomonster1.php

The Problem now is displaying the full description of the forecast and the
forecast temps for the next few days...also noticed that the Mildura
Forecast is not fully displayed, it is missing 1 work at the end of the
forecast description...

So How do i change the php to display the Whole description and the next few
days of temps.
Remember the layout of the source of the info is different
http://www.bom.gov.au/cgi-bin/wrap_fwo.pl?IDV17001.txt is the Mildura
forecast...
http://www.bom.gov.au/cgi-bin/wrap_fwo.pl?IDN10035.txt is the Canberra/A.C.T
Forecast that i want to use.

--
Cheers
-
Simon Angell
Canberra ACT
www.canberra-wx.com
-
Member of:
Australian Severe Weather Association.
www.severeweather.asn.au
-
This email is virus free.
Scanned before leaving my mailbox
using Norton Antivirus 2002 for Win2k
Scanned with the latest definition File.

Simon Angell [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi.

 I am having trouble with a PHP script. I am not the one who made this and
my
 knowledge on php is very little.
 I came across this php script
www.canberra-wx.com/bomonster/bomonster01.php
 which is weather forecasting for a place called Mildura.
 The file that the PHP gets its info from is here...
 http://www.bom.gov.au/cgi-bin/wrap_fwo.pl?IDV17001.txt and if you look
down
 the page you will see the Mildura forecast that the PHP draws its info
 output from.

 My Problem is that i want it to work for this file...
 http://www.bom.gov.au/cgi-bin/wrap_fwo.pl?IDN10035.txt and i cant work out
 how to get it going.
 i have got this far www.canberra-wx.com/bomonster/bomonster1.php (look at
 the code, the actual outpot doesn't work..thats my problem). The part I
want
 the PHP to do its info output is from A.C.T FORECAST (like from the
Mildura
 in IDV17001.txt)

 Any help on how to get it to work would be great.

 Cheers
 -
 Simon Angell
 Canberra ACT
 www.canberra-wx.com
 -
 Member of:
 Australian Severe Weather Association.
 www.severeweather.asn.au
 -
 This email is virus free.
 Scanned before leaving my mailbox
 using Norton Antivirus 2002 for Win2k
 Scanned with the latest definition File.






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Problems with php and qmail

2002-09-18 Thread Michael J Humphries

I have installed the QMQP server end and configured with tcpserver but
am unclear from the docs if I need to install Qmail 1.03 on the Bulletin
Board server or just copy over the files it mentions in the docs.  If
this is not the place to discuss this please let me know but you seem to
have knowledge of this product so I am hoping you can help

Michael Humphries
Alphacomm.net
Network Administrator
906-639-3500
877-450-3500
[EMAIL PROTECTED]
www.alphacomm.net 


-Original Message-
From: Rick Widmer [mailto:[EMAIL PROTECTED]] 
Sent: Monday, September 16, 2002 8:36 PM
To: Michael J Humphries; [EMAIL PROTECTED]
Subject: Re: [PHP] Problems with php and qmail

At 03:20 PM 9/16/02 -0500, Michael J Humphries wrote:
I am running a Bulletin Board system with the following
RH 7.2
Apache
VBulletin (which is all coded in PHP)
PHP4

But my qmail Server is on another physical server and I need to ask how
to configure php to recognize the second server for SMTP mail out
functions.


http://cr.yp.to/qmail/mini.html

Be sure to link (ln -s) /sbin/sendmail to /var/qmail/bin/sendmail and
set your
sendmail path to /sbin/sendmail.  You could set the sendmail path to
/var/qmail/bin/senamil, but there may be other programs on the web
server
that expect a sendmail program at /sbin/sendmail. Some systems use
/usr/sbin/sendmail instead of /sbin/sendmail.  Follow the standard
convention
for your distribution.

Rick


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Join - problem

2002-09-18 Thread Henning

Hello
I'm using PHP4 and MySQL on Apache webserver.
I have a table valled liste with names of some people, and a table
called postnummer with zip-codes and citynames.
My select should join the adress and zip from one table with the
cityname from the other table.
But my join-line does not work.   =:(

My code results in this line:

Warning: Supplied argument is not a valid MySQL result resource in
/var/www/html/find/resultat.php on line 27

The code is:
mysql_select_db(adresser);
$query = (SELECT fornavn, efternavn, gade, liste.postnummer, 
postnummer.postbynavn FROM liste
left join postnummer on liste.postnummer = postnummer.postnummer
WHERE MATCH (fornavn, efternavn) AGAINST ('$search'););
$result = mysql_query($query);
while(list( $fornavn, $efternavn, $gade, $postnummer, $postbynavn) =
mysql_fetch_row($result))
print(TRTD$fornavn/TDTD$efternavn/TDTD$gade/TDTD$postnummer/TDTD$postbynavn/TD/TR\n);
 


What is going on?
The select is ok if I do not join, but then I'm not able to get the
field postbynavn from the other table.

PLEASE HELP!

Henning


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Join - problem

2002-09-18 Thread John Wards

not having the time to look at your code I am not sure but do this to see if
its mysql causeing the errors

$result = mysql_query($query) or die(mysql_error());
- Original Message -
From: Henning [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 18, 2002 5:12 PM
Subject: [PHP] Join - problem


 Hello
 I'm using PHP4 and MySQL on Apache webserver.
 I have a table valled liste with names of some people, and a table
 called postnummer with zip-codes and citynames.
 My select should join the adress and zip from one table with the
 cityname from the other table.
 But my join-line does not work.   =:(

 My code results in this line:

 Warning: Supplied argument is not a valid MySQL result resource in
 /var/www/html/find/resultat.php on line 27

 The code is:
 mysql_select_db(adresser);
 $query = (SELECT fornavn, efternavn, gade, liste.postnummer,
 postnummer.postbynavn FROM liste
 left join postnummer on liste.postnummer = postnummer.postnummer
 WHERE MATCH (fornavn, efternavn) AGAINST ('$search'););
 $result = mysql_query($query);
 while(list( $fornavn, $efternavn, $gade, $postnummer, $postbynavn) =
 mysql_fetch_row($result))

print(TRTD$fornavn/TDTD$efternavn/TDTD$gade/TDTD$postnummer
/TDTD$postbynavn/TD/TR\n);


 What is going on?
 The select is ok if I do not join, but then I'm not able to get the
 field postbynavn from the other table.

 PLEASE HELP!

 Henning


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Join - problem

2002-09-18 Thread 1LT John W. Holmes

Don't include the ; in your query, for one thing.

---John Holmes...

- Original Message -
From: John Wards [EMAIL PROTECTED]
To: Henning [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, September 18, 2002 11:26 AM
Subject: Re: [PHP] Join - problem


 not having the time to look at your code I am not sure but do this to see
if
 its mysql causeing the errors

 $result = mysql_query($query) or die(mysql_error());
 - Original Message -
 From: Henning [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, September 18, 2002 5:12 PM
 Subject: [PHP] Join - problem


  Hello
  I'm using PHP4 and MySQL on Apache webserver.
  I have a table valled liste with names of some people, and a table
  called postnummer with zip-codes and citynames.
  My select should join the adress and zip from one table with the
  cityname from the other table.
  But my join-line does not work.   =:(
 
  My code results in this line:
 
  Warning: Supplied argument is not a valid MySQL result resource in
  /var/www/html/find/resultat.php on line 27
 
  The code is:
  mysql_select_db(adresser);
  $query = (SELECT fornavn, efternavn, gade, liste.postnummer,
  postnummer.postbynavn FROM liste
  left join postnummer on liste.postnummer = postnummer.postnummer
  WHERE MATCH (fornavn, efternavn) AGAINST ('$search'););
  $result = mysql_query($query);
  while(list( $fornavn, $efternavn, $gade, $postnummer, $postbynavn) =
  mysql_fetch_row($result))
 

print(TRTD$fornavn/TDTD$efternavn/TDTD$gade/TDTD$postnummer
 /TDTD$postbynavn/TD/TR\n);
 
 
  What is going on?
  The select is ok if I do not join, but then I'm not able to get the
  field postbynavn from the other table.
 
  PLEASE HELP!
 
  Henning
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Time Stamp

2002-09-18 Thread Chuck Payne

Hi,

I have a form that I am using to update a mysql table but I can get
timestamp to update. How can I pass that information to pass on. I have
READ all books and feel I have correct systax but it just not working...

input type=text name=lastupdate value=?  echo date('D M d, Y H:i:s',
time()); ?

This should pass the time right?

Chuck Payne
Magi Design and Support




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Join - problem

2002-09-18 Thread Henning

Oh dear - I forgot the rights in the new table:

select command denied to user: 'henning@localhost' for table 'postnummer'

Thanks for helping, John!

Henning


John Wards wrote:
 not having the time to look at your code I am not sure but do this to see if
 its mysql causeing the errors
 
 $result = mysql_query($query) or die(mysql_error());
 - Original Message -
 From: Henning [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, September 18, 2002 5:12 PM
 Subject: [PHP] Join - problem
 
 
 
Hello
I'm using PHP4 and MySQL on Apache webserver.
I have a table valled liste with names of some people, and a table
called postnummer with zip-codes and citynames.
My select should join the adress and zip from one table with the
cityname from the other table.
But my join-line does not work.   =:(

My code results in this line:

Warning: Supplied argument is not a valid MySQL result resource in
/var/www/html/find/resultat.php on line 27

The code is:
mysql_select_db(adresser);
$query = (SELECT fornavn, efternavn, gade, liste.postnummer,
postnummer.postbynavn FROM liste
left join postnummer on liste.postnummer = postnummer.postnummer
WHERE MATCH (fornavn, efternavn) AGAINST ('$search'););
$result = mysql_query($query);
while(list( $fornavn, $efternavn, $gade, $postnummer, $postbynavn) =
mysql_fetch_row($result))

 
 print(TRTD$fornavn/TDTD$efternavn/TDTD$gade/TDTD$postnummer
 /TDTD$postbynavn/TD/TR\n);
 

What is going on?
The select is ok if I do not join, but then I'm not able to get the
field postbynavn from the other table.

PLEASE HELP!

Henning


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Time Stamp

2002-09-18 Thread 1LT John W. Holmes

MySQL syntax is MMDDHHMMSS or -MM-DD HH:MM:SS

---John Holmes...

- Original Message -
From: Chuck Payne [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 18, 2002 11:25 AM
Subject: [PHP] Time Stamp


 Hi,

 I have a form that I am using to update a mysql table but I can get
 timestamp to update. How can I pass that information to pass on. I have
 READ all books and feel I have correct systax but it just not working...

 input type=text name=lastupdate value=?  echo date('D M d, Y
H:i:s',
 time()); ?

 This should pass the time right?

 Chuck Payne
 Magi Design and Support




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] header() and POST

2002-09-18 Thread dsfljsdfklj kljvdskljfsdkl

I have the following problem:

a php page receives POST data from a form, it needs to
elaborate the data and send it to another page again
in POST automatically, without the user noticing.

Is it possible to use the header() function to send a
POST request? If yes how? And how do I send the post
data?

Thanx
Rik

__
Mio Yahoo!: personalizza Yahoo! come piace a te 
http://it.yahoo.com/mail_it/foot/?http://it.my.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Large uploads

2002-09-18 Thread Rickard Dahlstrand

Hi again,

Is there anyone in this group that has successfully uploaded a file large
than 10 MB?

Regards, Rickard.


Rickard Dahlstrand [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 I have been trying to upload files using PHP 4.1.2. Everything works OK
 until the filesize gets above 10MB. I have set all the paramaters upload
 filesize and max postsize in PHP and Apache ini-files but it still doesn't
 work. The server seems to just drop the connection since IE just tells me
 that the server didn't respond.

 Please help.

 Rickard.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Image resolution and php

2002-09-18 Thread Eric C. Pollitt

I believe that image files on the Mac platform contain metadata that does in
fact include this information. Sherlock on Mac OS 9 is not capable of
finding this information. However, I did find the following information for
Adobe Photoshop 7 for Mac OS X on how you can achieve this. I don't know if
Adobe Photoshop 7 for Windows can do this.

From: http://www.apple.com/macosx/applications/photoshop/

You have thousands of digital pictures and graphics stored on your hard
disk. Wouldn¹t it be cool to be able to verify what¹s in an image file
before you click on it? Adobe thought so too, which is why the new File
Browser in Photoshop 7.0 lets you do just that. The File Browser lets you
view your thumbnails and image metadata ‹ like color profile, date modified,
and the Exchangeable Image File (EXIF) information generated by digital
cameras ‹ to make sure the images are what you¹re looking for before you
open them. As an added convenience, Photoshop lets you add ranking to your
file criteria. You can have your own ranking system for identifying images
with, for example, rankings such as ³Proof² and ³Final.² You can also sort
images by file name, file width and height, file size, file type,
resolution, color profile, date created, date modified and copyright. The
File Browser also gives you the added advantage of being able to search for
images visually rather than just by file name.

Eric C. Pollitt, Founder
401 E. Illinois Ave.
Peoria, IL 61603
Global Hemp - Portal to the hemp community
http://www.globalhemp.com/

Prohibition will work great injury to the cause of temperance. It is a
species of intemperance within itself, for it goes beyond the bounds of
reason in that it attempts to control a man's appetite by legislation, and
makes a crime out of things that are not crimes.  A Prohibition law strikes
a blow at the very principles upon which our government was founded.

Abraham Lincoln in a speech to the Illinois House of
Representatives on December 18, 1840.

 From: Jome [EMAIL PROTECTED]
 Date: Wed, 18 Sep 2002 14:10:58 +0200
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: Image resolution and php
 
 I need to get resolution information (dpi) from any
 image of jpg, gif or png formats.
 
 It would be sufficient to obtain pixel and inches
 dimension of such images and calculate resolution by
 simply dividing but I haven't found any function that
 gets effective dimensions in inches.
 
 http://www.php.net/manual/en/function.getimagesize.php
 
 I'm sligthly confused about what you're looking for, but the above URL
 *could* be something.
 
 Jome
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Please, Help dynamicaly creating an Array

2002-09-18 Thread Max Sullivan


Thanks Marek,  That's exactly what I was looking for. I also found
another solution, which was to build a second array with the information
I want and merge the two arrays together with +.  I like eval better :)
thanks again.

For anyone that is interested this works too.

$a = 'THREE';
$b = 3;

$data1 = array('ONE'=1,'TWO'=2);
$data2[$a] = $b;

$test = $data1 + $data2;


-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, September 18, 2002 1:54 AM
To: PHP
Subject: Re: [PHP] Please, Help dynamicaly creating an Array


Try eval(), like this:

$str= 'THREE'=3, 'FOUR'=4;

eval(\$data2 = array('ONE'=1,'TWO'=2,$str););


Max Sullivan wrote:

I am trying to populate array values and keys from a variable with no
luck.

Lets say I have the following array.

$data1 = array('ONE'=1,'TWO'=2,'THREE'=3,'FOUR'=4);

And I want to create part of the array with the string below:

$str= 'THREE'=3, 'FOUR'=4;
$data2 = array('ONE'=1,'TWO'=2,$str);


How can I create $data2 to work the same as $data1.  When I try the
above for $data2 a new key is created ([0]) for $str. And I end up with

...'TWO'=2, [0] = 'THREE'=3, 'FOUR'=4.  It doesn't interpret the 
variable how I expect it to, instead it see's $str as a value.  I guess

the question is how can I make php use the string literally.

I've tried everything I can think of and I think my head is about to
explode :).  Is it possible to create an Array this way?  Any help is 
appreciated!!


print_r($data1):
Array
(
[ONE] = 1
[TWO] = 2
[THREE] = 3
[FOUR] = 4
)


print_r($data2):
Array
(
[ONE] = 1
[TWO] = 2
[0] = 'THREE'=3, 'FOUR'=4
)


  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] mid-level PHP/MySQL people in Los Angeles?

2002-09-18 Thread Eric C. Pollitt

I recommend checking out websites such as Elance for freelance workers and
employers to find one another.

http://www.elance.com/

There are several others out there that are similar as well...try searing
http://dmoz.org/Business/Business_Services/Consulting/Marketplaces/Remotely
_Provided_Services/ to find more.

PS I am not affiliated with Elance, just a suggestion.

Eric C. Pollitt, Founder
401 E. Illinois Ave.
Peoria, IL 61603
Global Hemp - Portal to the hemp community
http://www.globalhemp.com/

Create like a god.  Command like a king.  Work like a slave!
-- Constantin Brancusi

 From: PHP freak [EMAIL PROTECTED]
 Date: Tue, 17 Sep 2002 22:44:30 -0700
 To: [EMAIL PROTECTED]
 Subject: [PHP] mid-level PHP/MySQL people in Los Angeles?
 
 I'm looking for 1 or 2 people with good PHP/MySQL experience in the Los
 Angeles area.
 
 I have a few steady projects that pay $20/hr.
 (All of them 100% PHP/MySQL.  All of them fun/non-corporate music-based
 sites.)
 
 If interested, please email my personal address:  [EMAIL PROTECTED]
 Include your contact info  any sites/projects you've worked on.
 
 Thanks!
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Join in MySQL-select doesn't work

2002-09-18 Thread Henning

Hello
I'm using PHP4 and MySQL on Apache webserver.
I have a table valled liste with names of some people, and a table 
called postnummer with zip-codes and citynames.
My select should join the adress and zip from one table with the 
cityname from the other table.
But my join-line does not work.   =:(

My code results in this line:

Warning: Supplied argument is not a valid MySQL result resource in 
/var/www/html/find/resultat.php on line 27

The code is:
mysql_select_db(adresser);
$query = (SELECT fornavn, efternavn, gade, postnummer.postnummer, 
postnummer.postbynavn FROM liste
left outer join postnummer on liste.postnummer = postnummer.postnummer
WHERE MATCH (fornavn, efternavn) AGAINST ('$search'););
$result = mysql_query($query);
while(list($cpr, $fornavn, $efternavn, $gade, $postnummer, $postbynavn) =
mysql_fetch_row($result))

What is going on?
The select is ok if I do not join, but then I'm not able to get the 
field postbynavn from the other table.

PLEASE HELP!

Henning


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Difficult MIME question

2002-09-18 Thread C.F. Scheidecker Antunes

Hello all,

I have one situation other than the normal that I cannot extract/save the
MIME content of an e-mail which Content-type is different than the normal.

When I get attachments that have the following normal structure:

===
Content-Type: application/x-zip-compressed;
name=file1.zip
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename=file1.zip
===

It works perfectly. But I some e-mail clients e-mail me somthing like
bellow:

===
Content-Type: application/octet-stream;
name=file2.zip
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename=file2.zip
X-MailScanner: Found to be clean
Status:
===

Then, it does not work and the system thinks that the e-mail has NO
ATTACHMENTS.

This is weird. Since the only difference here is the Content-Type besides
the X-MailScanner and Status in the last lines, could anyone help me handle
it?

Also, is there anyway to get arrays for each of then separately like :
Content-Type, Content-Transfer-Encoding and Content-Disposition?

A regular mail client like Netscape and OutlookExpress can easily see the
attachment but I cannot do it with PHP imap.

This is a difficult question. Does anyone know how to answer it?

Thanks,

Carlos Fernando Scheidecker Antunes
Linux User #207984


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Image resolution and php

2002-09-18 Thread pan


 I need to get resolution information (dpi) from any
 image of jpg, gif or png formats.
 
 It would be sufficient to obtain pixel and inches
 dimension of such images and calculate resolution by
 simply dividing but I haven't found any function that
 gets effective dimensions in inches.
 

  As Jome wrote - getimagesize.

 Those image formats don't carry any printing format
information. The number of inches an image will be
depends on what is doing the presentation.
 You need to calculate your own inches depending on your
own printing or display environment.

 If you want to learn about image file formats.
http://www.wotsit.org/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP and Flash

2002-09-18 Thread timo stamm

Or let Flash take over the active part.

You can retrieve data from PHP scripts in Flash and build 
dynamic menus, for example. Pretty much everything is possible.


Timo


Am Mittwoch den, 18. September 2002, um 06:11, schrieb Rasmus Lerdorf:
 php.net/ming

 On Wed, 18 Sep 2002, [EMAIL PROTECTED] wrote:

 Hi all,

 I've never combined PHP with Flash, but I do know there's some
 possibilities. I'm wondering if I can make a dynamic-PHP-site which
 controls Flash. I need the administrator to be able to upload 
 a new product
 to a DB, and then be seen by the visitors in Flash... is this 
 possible?

 I want to do something like www.rolex.com but don't want to 
 make new pages
 every time a new product is added... Is this possble? Where 
 can I find the
 documentation?

 Thanks in advance,

 César Aracena
 On Dial-Up

 
 mail2web - Check your email from the web at
 http://mail2web.com/ .



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Stripping specific tags

2002-09-18 Thread Alexis Antonakis

Hi,

I was wondering is there a way to strip ONLY the tags that you specify from
a page, rather than having to include all the tags you do want (using
strip_tags() )

Cheers
Alexis


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Global Vars

2002-09-18 Thread Sascha Braun

Hi Everone,

for my newest projekt i started to use global var like $_REQUEST['varname'] and so on.

But in some cases i started again to use old var mode.

Finally i have read some about there is need to define the vars, before I'm going to 
create
the source for my webpages.

But how can i make definitions like form action=test.php?action=update 
method=post
working without usage of hidden fields.

Or links like test.php?action=update and so on.

Please gimme a hint

Sascha



RE: [PHP] time() problem

2002-09-18 Thread Savaidis



Hello all!

I use time() to keep UNIX seconds from 1970 to a timestamp(14) MySQL field.
But when I read it (Dt_last) it is TO big compearing with today=time() in
a php script that is only some seconds later.
today : 1032350421 Dt_last: 20001101165838

What can I do?
Thanks!
Makis



Makis



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Loop through POST-result

2002-09-18 Thread Michelle

I would like to get all the data from a POST-result into an array.

Is there a function like that adds all the vars from the post into an array
where Key is the name of the form-field and Value is the value entered in
this field.

Like this:
array('firstname' = 'fname', 'lastname' = 'lname');

Thanks,
// Michelle



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] time() problem

2002-09-18 Thread Adam Voigt

Change it to an INT or a VARCHAR datatype, the mysql timestamp field
uses MySQL's date/time formmating. If you decide to let MySQL use it's
own date time format, use UNIX_TIMESTAMP(fieldname) to get the unix
timestamp from that date field.

Adam Voigt
[EMAIL PROTECTED]

On Wed, 2002-09-18 at 13:19, Savaidis wrote:
 
 
 Hello all!
 
 I use time() to keep UNIX seconds from 1970 to a timestamp(14) MySQL field.
 But when I read it (Dt_last) it is TO big compearing with today=time() in
 a php script that is only some seconds later.
 today : 1032350421 Dt_last: 20001101165838
 
 What can I do?
 Thanks!
 Makis
 
 
 
 Makis
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Date(), adjusted for one year

2002-09-18 Thread Support @ Fourthrealm.com

Hi guys,

What is the easiest way to get the date of one year from today?
Accommodating for leap years is not essential (but would be a nice bonus).

Thanks,
Peter


- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Date(), adjusted for one year

2002-09-18 Thread Robert Cummings

Support @ Fourthrealm.com wrote:
 
 Hi guys,
 
 What is the easiest way to get the date of one year from today?
 Accommodating for leap years is not essential (but would be a nice bonus).

Without leap year adjustment...

date( your format string here, time() + 60 * 60 * 24 * 365 );

HTH,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Date(), adjusted for one year

2002-09-18 Thread Jacob Miller

With leap year adjustment...

strtotime(+1 year, timestamp);

will return a unix timestamp.

- Jacob

At 01:49 09/19/2002, Robert Cummings wrote:
Support @ Fourthrealm.com wrote:
 
  Hi guys,
 
  What is the easiest way to get the date of one year from today?
  Accommodating for leap years is not essential (but would be a nice bonus).

Without leap year adjustment...

date( your format string here, time() + 60 * 60 * 24 * 365 );

HTH,
Rob.
--
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Date(), adjusted for one year

2002-09-18 Thread Robert Cummings

Jacob Miller wrote:
 
 With leap year adjustment...
 
 strtotime(+1 year, timestamp);
 
 will return a unix timestamp.

Nice, don't think I've ever used that function :)

Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Unserialize stopped working after php db upgrade

2002-09-18 Thread Geoff Caplan

Hi folks

Bit of a major panic - any help MUCH appreciated.

I have been storing serialized arrays in MySQL Gemini tables without
any problems.

But with Gemini looking more and more like a dead duck, I decided to
take the server down and port from Gemini to InnoDB. I also took the
opportunity to upgrade from php 4.1 to php 4.2.2

Now, when I run unserialize( ) on the serialized arrays, the strings
are being returned unchanged. No error - they are simply passing
through unserialize( ) without being altered.

It is not a backslash issue, as there are no escaped characters in the
strings affected, nor are the strings urlencoded.

I have no idea how to go about fixing this and I am under serious
pressure to get the server back up ASAP - so I am very much hoping
that to get a response from the list.

-- 

Geoff Caplan
Advantae Ltd

mailto:[EMAIL PROTECTED]
http://www.advantae.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Sessions /Cross Domain

2002-09-18 Thread David Buerer

Are sessions domain specific?
 
What I mean is this.
 
Suppose I have two websites:
secure.web.com
www.web.com http://www.web.com 
and both web sites point to the same set of data.
 
If I looking at web page http://www.web.com/index.html
http://www.web.com/index.html  and have a set of session variables defined
and then I call the page https://secure.web.com/index.html
https://secure.web.com/index.html  do I still have access to the same
session variables?



[PHP] PHP Installation

2002-09-18 Thread Sascha Braun

Hi Peops,

I need some help for an PHP Installation.

I did uninstall my apache on my domain. I reinstalled it again and now want to install 
PHP again.

I believe all option in httpd.conf are correct. My Linux Distribution is: RedHat 7.3

I looked into the Modules Direktory from Apache and I could find an libphp4.so, but no 
mod_php.
I did download the final release of PHP 4.2.3 and started to ./configure it.

It told me at last something about the cgi installation and some things i dont 
understand,
so i feel very insecure.

Please help me a little.

Sascha Braun



Re: [PHP] Sessions /Cross Domain

2002-09-18 Thread Robert Cummings

Domains are specific, and so you do not get the same sesion variables. here's are
ways around this, but you need control of the content of both servers.

Cheers,
Rob.

David Buerer wrote:
 
 Are sessions domain specific?
 
 What I mean is this.
 
 Suppose I have two websites:
 secure.web.com
 www.web.com http://www.web.com
 and both web sites point to the same set of data.
 
 If I looking at web page http://www.web.com/index.html
 http://www.web.com/index.html  and have a set of session variables defined
 and then I call the page https://secure.web.com/index.html
 https://secure.web.com/index.html  do I still have access to the same
 session variables?

-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Sessions /Cross Domain

2002-09-18 Thread Sascha Braun

Yeah,

I believe so, but you could reinitialize them when you jump to the other
webserver, or you use one
mysql database for sessionmanagement for both webservers.

Ciao

Sascha


- Original Message -
From: David Buerer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 18, 2002 7:38 PM
Subject: [PHP] Sessions /Cross Domain


 Are sessions domain specific?

 What I mean is this.

 Suppose I have two websites:
 secure.web.com
 www.web.com http://www.web.com
 and both web sites point to the same set of data.

 If I looking at web page http://www.web.com/index.html
 http://www.web.com/index.html  and have a set of session variables
defined
 and then I call the page https://secure.web.com/index.html
 https://secure.web.com/index.html  do I still have access to the same
 session variables?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Sessions /Cross Domain

2002-09-18 Thread Jacob Miller

My first assumption would be yes they are domain specific, but it might be 
possible to cross domains if both domains were run from the same web server 
and you were to pass the session id between pages manually rather than it 
being stored in a cookie..

What does everyone else think?

- Jacob

At 02:06 09/19/2002, Robert Cummings wrote:
Domains are specific, and so you do not get the same sesion variables. 
here's are
ways around this, but you need control of the content of both servers.

Cheers,
Rob.

David Buerer wrote:
 
  Are sessions domain specific?
 
  What I mean is this.
 
  Suppose I have two websites:
  secure.web.com
  www.web.com http://www.web.com
  and both web sites point to the same set of data.
 
  If I looking at web page http://www.web.com/index.html
  http://www.web.com/index.html  and have a set of session variables 
 defined
  and then I call the page https://secure.web.com/index.html
  https://secure.web.com/index.html  do I still have access to the same
  session variables?

--
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Sessions /Cross Domain

2002-09-18 Thread David Buerer

I do have control over the content of both domains...in fact right now it's
the identical contenteven the same physical data store on the disk, I
just seem to be losing session variables for one reason or another.

DAvid

-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 11:06 AM
To: David Buerer
Cc: '[EMAIL PROTECTED]'
Subject: Re: [PHP] Sessions /Cross Domain


Domains are specific, and so you do not get the same sesion variables.
here's are
ways around this, but you need control of the content of both servers.

Cheers,
Rob.

David Buerer wrote:
 
 Are sessions domain specific?
 
 What I mean is this.
 
 Suppose I have two websites:
 secure.web.com
 www.web.com http://www.web.com
 and both web sites point to the same set of data.
 
 If I looking at web page http://www.web.com/index.html
 http://www.web.com/index.html  and have a set of session variables
defined
 and then I call the page https://secure.web.com/index.html
 https://secure.web.com/index.html  do I still have access to the same
 session variables?

-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'



Re: [PHP] Sessions /Cross Domain

2002-09-18 Thread Robert Cummings

Sascha Braun wrote:
 
 Yeah,
 
 I believe so, but you could reinitialize them when you jump to the other
 webserver, or you use one
 mysql database for sessionmanagement for both webservers.

Not exactly true, since if they jump to another server, you can make the
assumption they have a session cookie if they referrer is given, or if you
set their session ID in the URL. This however breaks down if they don't
click to the second site but go there without using the first as a jump
point. A sneakier, but more effective solution IMHO, is to bury an invisible
1x1 pixel in the first site which is located on the second server and vice
versa in the second site. This 1x1 pixel should actually be a PHP script and
you pass it the newly generated session ID, or permanent cookie ID, so that
the second site can synch up on the same ID, which is only really useful if
they use a shared database :)

Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Sessions /Cross Domain

2002-09-18 Thread Sascha Braun

Normaly you store SESSION Data in variables.

When you make the step to another domain, you should reassign a new Session
and
give to data of the old session to the new one.

Or isn't is possible to put some date behind an url like
www.somedomain.com?check=itout=mh

If you are working with databases you just have to take some values out of
your session,
like username and password, or some like this and find out, what data in the
database belongs
to this user (basket, or viewed artikels)

But you still need to work with one database for both servers, or write all
data to both databases
(Server1  Server2)

Am I wrong are would this work out?

Sascha


- Original Message -
From: David Buerer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 18, 2002 7:48 PM
Subject: RE: [PHP] Sessions /Cross Domain


 I do have control over the content of both domains...in fact right now
it's
 the identical contenteven the same physical data store on the disk, I
 just seem to be losing session variables for one reason or another.

 DAvid

 -Original Message-
 From: Robert Cummings [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 18, 2002 11:06 AM
 To: David Buerer
 Cc: '[EMAIL PROTECTED]'
 Subject: Re: [PHP] Sessions /Cross Domain


 Domains are specific, and so you do not get the same sesion variables.
 here's are
 ways around this, but you need control of the content of both servers.

 Cheers,
 Rob.

 David Buerer wrote:
 
  Are sessions domain specific?
 
  What I mean is this.
 
  Suppose I have two websites:
  secure.web.com
  www.web.com http://www.web.com
  and both web sites point to the same set of data.
 
  If I looking at web page http://www.web.com/index.html
  http://www.web.com/index.html  and have a set of session variables
 defined
  and then I call the page https://secure.web.com/index.html
  https://secure.web.com/index.html  do I still have access to the same
  session variables?

 --
 .-.
 | Robert Cummings |
 :-`.
 | Webdeployer - Chief PHP and Java Programmer  |
 :--:
 | Mail  : mailto:[EMAIL PROTECTED] |
 | Phone : (613) 731-4046 x.109 |
 :--:
 | Website : http://www.webmotion.com   |
 | Fax : (613) 260-9545 |
 `--'



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Sessions /Cross Domain

2002-09-18 Thread Sascha Braun

That seems to be a more perfekt way.

Honorabel, nice.

Sascha

- Original Message -
From: Robert Cummings [EMAIL PROTECTED]
To: Sascha Braun [EMAIL PROTECTED]
Cc: PHP Mailingliste [EMAIL PROTECTED]; David Buerer
[EMAIL PROTECTED]
Sent: Wednesday, September 18, 2002 8:16 PM
Subject: Re: [PHP] Sessions /Cross Domain


 Sascha Braun wrote:
 
  Yeah,
 
  I believe so, but you could reinitialize them when you jump to the other
  webserver, or you use one
  mysql database for sessionmanagement for both webservers.

 Not exactly true, since if they jump to another server, you can make the
 assumption they have a session cookie if they referrer is given, or if you
 set their session ID in the URL. This however breaks down if they don't
 click to the second site but go there without using the first as a jump
 point. A sneakier, but more effective solution IMHO, is to bury an
invisible
 1x1 pixel in the first site which is located on the second server and vice
 versa in the second site. This 1x1 pixel should actually be a PHP script
and
 you pass it the newly generated session ID, or permanent cookie ID, so
that
 the second site can synch up on the same ID, which is only really useful
if
 they use a shared database :)

 Cheers,
 Rob.
 --
 .-.
 | Robert Cummings |
 :-`.
 | Webdeployer - Chief PHP and Java Programmer  |
 :--:
 | Mail  : mailto:[EMAIL PROTECTED] |
 | Phone : (613) 731-4046 x.109 |
 :--:
 | Website : http://www.webmotion.com   |
 | Fax : (613) 260-9545 |
 `--'

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Date-format

2002-09-18 Thread Support @ Fourthrealm.com

Reformatting before an inserting/updating is one option, but how would we 
change the mySQL database to accept the other format?

Peter


At 04:18 PM 9/12/2002 +0800, Jacob Miller wrote:
Why can't you just reformat it before inserting it into the db?

 $date = 31.12.2002;

 $parts = split(\., $date);
 echo $parts[2].-.$parts[1].-.$parts[0];

- jacob

At 16:13 09/12/2002, Tommi Virtanen wrote:
Well, insert format in wrong, but in Finland enter format is dd.mm.,
so I cannot use other insert format (it have to do other way).

gustavus

 It looks to me like the database is interpreting your date
 incorrectly.  Try changing the format you use to insert, -mm-dd



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Sessions /Cross Domain

2002-09-18 Thread James E Hicks III

Have a look at this php.ini setting, I think it will help you!

; The domain for which the cookie is valid.
session.cookie_domain =


James


-Original Message-
From: David Buerer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 1:39 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Sessions /Cross Domain


Are sessions domain specific?
 
What I mean is this.
 
Suppose I have two websites:
secure.web.com
www.web.com http://www.web.com 
and both web sites point to the same set of data.
 
If I looking at web page http://www.web.com/index.html
http://www.web.com/index.html  and have a set of session variables defined
and then I call the page https://secure.web.com/index.html
https://secure.web.com/index.html  do I still have access to the same
session variables?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Date-format

2002-09-18 Thread Jacob Miller

 From http://www.mysql.com/doc/en/Using_DATE.html

quote
The format of a DATE value is '-MM-DD'. According to ANSI SQL, no other 
format is allowed. You should use this format in UPDATE expressions and in 
the WHERE clause of SELECT statements. For example:

mysql SELECT * FROM tbl_name WHERE date = '1997-05-05';
/quote

- Jacob

At 02:28 09/19/2002, Support @ Fourthrealm.com wrote:
Reformatting before an inserting/updating is one option, but how would we 
change the mySQL database to accept the other format?

Peter


At 04:18 PM 9/12/2002 +0800, Jacob Miller wrote:
Why can't you just reformat it before inserting it into the db?

 $date = 31.12.2002;

 $parts = split(\., $date);
 echo $parts[2].-.$parts[1].-.$parts[0];

- jacob

At 16:13 09/12/2002, Tommi Virtanen wrote:
Well, insert format in wrong, but in Finland enter format is dd.mm.,
so I cannot use other insert format (it have to do other way).

gustavus

 It looks to me like the database is interpreting your date
 incorrectly.  Try changing the format you use to insert, -mm-dd



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Conditionally include file based on document location

2002-09-18 Thread Eric C. Pollitt

Thanks for the insight, but I'm not clear on how to implement this. Here is
what I have so far:

?php
switch ($DOCUMENT_URI) {
case '/home/globalhemp/www/':
include(/home/globalhemp/www/includes/apple.inc);
break;
case '/home/globalhemp/www/Archives/':
include(/home/globalhemp/www/includes/quicktime.inc);
break;
case '/home/globalhemp/www/Archives/Essays/':
include(/home/globalhemp/www/includes/quicktime_download.inc);
break;
}
?

Perhaps $DOCUMENT_URI is not correct...perhaps it should be $PATH_INFO? Or
should I have some sort of return or print statement?

TEST URL: http://globalhemp.phpwebhosting.com/switch.php

Thanks,

Eric C. Pollitt, Founder
401 E. Illinois Ave.
Peoria, IL 61603
Global Hemp - Portal to the hemp community
http://www.globalhemp.com/

Hemp is of first necessity to commerce and marine, in other words, to the
wealth and protection of the country.
-- Thomas Jefferson

 From: Marek Kilimajer [EMAIL PROTECTED]
 Date: Wed, 18 Sep 2002 10:59:46 +0200
 To: PHP [EMAIL PROTECTED]
 Subject: Re: [PHP] Conditionally include file based on document location
 
 switch($DOCUMENT_URI) {
   case '/':
   include( watch you want);
   break;
   case 
 
 }
 
 Eric C. Pollitt wrote:
 
 I would like to know how to conditionally included a file based on the
 document location.
 
 The purpose is for placement of location-specific navigation menus.
 
 I'm not interested in DHTML hierarchical drop-down menus, rather inserting
 ready made HTML files using perhaps (?) DOCUMENT_URI (?) and error checking
 logic.
 
 
 EXAMPLE
 
 If DOCUMENT_URI is / (home) then the following file included:
 
 URL: http://www.globalhemp.com/includes/apple.html
 
 If DOCUMENT_URI is /quicktime/ then the following file included:
 
 URL: http://www.globalhemp.com/includes/quicktime.html
 
 If DOCUMENT_URI is /quicktime/download/ then the following file included:
 
 URL: http://www.globalhemp.com/includes/quicktime_download.html
 
 
 The error checking logic would be for child directories that don't have
 their own include file and thus would use a parent directory include file.
 If a parent directory file doesn't exist, it would include the top-level
 (home) include file.
 
 The closest PHP example that I have found thus far follows:
 
 
 [INCOMPLETE] PHP CONDITIONAL INCLUDE EXAMPLE
 Extracted from: http://www.jwweb.com/20010629.html
 
 ?php
 if ($location == quicktime) {
 include(quicktime.inc);
 if ($location == quicktime/download) {
 include(download.inc);
 } else {
 include(home.inc);
 }
 ?
 
 
 THANKS!
 
 Eric C. Pollitt, Founder
 401 E. Illinois Ave.
 Peoria, IL 61603
 Global Hemp - Portal to the hemp community
 http://www.globalhemp.com/
 
 Create like a god.  Command like a king.  Work like a slave!
 -- Constantin Brancusi
 
 
  
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP4 Oracle SELECT statement ERROR

2002-09-18 Thread notoriousvic_ca

Hi I am a programmer and I just started using PHP4.

I created a view in Oracle (code below) and I added an underscore to the end
of one of the column names (id_number_).

When I use asp code to select from this view I have to write a select
statement like so:
Select * from view_specimen_details where id_number_=1

However when I use PHP4 with OCI8 I get an error when I try to execute the
above statement. Although if I remove the underscore of the variable in the
where clause everything works.

Select * from view_specimen_details where id_number=1

I cannot change the view. Does anyone have a workaround for this problem?

Thanks in Advance

-- Create view
create or replace view view_specimen_details
 as SELECT   a.ID_NUMBERid_number_,
  FROM  catalogue



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Installation

2002-09-18 Thread Sascha Braun

All these installation docs are just driving me crazy.

How am I installing PHP 4 any version on my RedHat 7.3 Server.

Isn't it done by an RPM easily?

Bye

Sascha



RE: [PHP] Date-format

2002-09-18 Thread Chuck Payne


I know everyone love to quote read the manual and forget that we[newbies]
are only asking here because we need help...so here you go...

You can do the following...

DATE_FORMAT IS THE MySQL Command

And let say you want to format your date as the following mm-dd-yy(US) or
dd-mm-yy(the rest of the world).

By the way this are format keys

%m the month in numbers,
%d the days in numbers,
%y the year in number
%M spells out the month
%D gives the date with th, rd, nd all that
%Y gives all four numbers

So you do the following sql statement...

SELECT DATE_FORMAT(yourdate, '%m-%d-%y') as youwanttocallit FROM yourtable;

So in your php code you can do this from your MySQL statement...

$youwantcallit = $myrow[youwanttoit];

? echo $youwanttocallit; ?

Advance note

then if you don't want to show 00-00-00 you can do this...

if ($youwanttocallit == 00-00-00) {
  $youwanttocallit = nbsp;;
}

that way you don't have a bunch of 00-00-00 showing up.

I hope that helps, because that is what the maillisting is for and not to
always quote Read the Book.

Chuck Payne
Magi Design and Support



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Large uploads

2002-09-18 Thread Paul Nicholson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey,
You might want to check the archives..I know this came up before.
Anyway, you didn't say if you checked your memory limitthat has to be 
larger than the post_max_size.
HTH!
~Pauly

On Wednesday 18 September 2002 11:54 am, you wrote:
 Hi again,

 Is there anyone in this group that has successfully uploaded a file large
 than 10 MB?

 Regards, Rickard.


 Rickard Dahlstrand [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

  Hi,
 
  I have been trying to upload files using PHP 4.1.2. Everything works OK
  until the filesize gets above 10MB. I have set all the paramaters upload
  filesize and max postsize in PHP and Apache ini-files but it still
  doesn't work. The server seems to just drop the connection since IE just
  tells me that the server didn't respond.
 
  Please help.
 
  Rickard.

- -- 
~Paul Nicholson
Design Specialist @ WebPower Design
The webthe way you want it!
[EMAIL PROTECTED]

It said uses Windows 98 or better, so I loaded Linux!
Registered Linux User #183202 using Register Linux System # 81891
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9iM1yDyXNIUN3+UQRAgDXAJ9HFJ0GCINrupusBPM/Eq+LkyRCNQCcCAIc
A5PpKLPaYaRVEb2SHPqmzms=
=Ou2V
-END PGP SIGNATURE-


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Unserialize stopped working after php db upgrade

2002-09-18 Thread Paul Nicholson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey,
There must be an error in the serialized stringswould you mind posting 
one for us to look at? How about posting some code?
~Pauly

On Wednesday 18 September 2002 02:02 pm, you wrote:
 Hi folks

 Bit of a major panic - any help MUCH appreciated.

 I have been storing serialized arrays in MySQL Gemini tables without
 any problems.

 But with Gemini looking more and more like a dead duck, I decided to
 take the server down and port from Gemini to InnoDB. I also took the
 opportunity to upgrade from php 4.1 to php 4.2.2

 Now, when I run unserialize( ) on the serialized arrays, the strings
 are being returned unchanged. No error - they are simply passing
 through unserialize( ) without being altered.

 It is not a backslash issue, as there are no escaped characters in the
 strings affected, nor are the strings urlencoded.

 I have no idea how to go about fixing this and I am under serious
 pressure to get the server back up ASAP - so I am very much hoping
 that to get a response from the list.

- -- 
~Paul Nicholson
Design Specialist @ WebPower Design
The webthe way you want it!
[EMAIL PROTECTED]

It said uses Windows 98 or better, so I loaded Linux!
Registered Linux User #183202 using Register Linux System # 81891
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9iM4vDyXNIUN3+UQRAmhGAJ9jAX88mO1F7MvFPTy/cB0jNf5d0ACeIaDb
jOLego6+k2mIcplJ3y9uUNs=
=a4Br
-END PGP SIGNATURE-


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




  1   2   >