Re: [PHP] image retrival from db?

2001-06-19 Thread Ethan Schroeder

You need to set the content type.  eg: echo Content-type: image/gif; echo
$row[image];

Ethan
- Original Message - 
From: Steve [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 18, 2001 3:56 PM
Subject: [PHP] image retrival from db?


 Anyone have a pointer to a script or documentation on how to retrieve an
 image that is stored in a database?
 
 I can insert the image, but unable to display the image once retieved, i
 apparently am missing something.
 
 
 Thanks
 
 Steve
 




Re: [PHP] image retrival from db?

2001-06-19 Thread Ethan Schroeder

I meant to say Header(Content-type: image/gif);

- Original Message - 
From: Steve [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 18, 2001 3:56 PM
Subject: [PHP] image retrival from db?


 Anyone have a pointer to a script or documentation on how to retrieve an
 image that is stored in a database?
 
 I can insert the image, but unable to display the image once retieved, i
 apparently am missing something.
 
 
 Thanks
 
 Steve
 




Re: [PHP] INSERT problem with MySQL/PHP

2001-06-19 Thread Ethan Schroeder

replace $result = mysql_db_query('item_db', $sql_query, $connection_id);
with $result = mysql_db_query('item_db', $sql, $connection_id); or just
mysql_query($sql);


- Original Message -
From: Todd A. Jacobs [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Monday, June 18, 2001 4:11 PM
Subject: [PHP] INSERT problem with MySQL/PHP


 PHP: 4.0.4pl1
 MySQL: 3.23.36-1

 I have the following code fragment, which uses the same connection
 parameters elsewhere to *successfully* to retrieve data from a database,
 so this doesn't appear to be a permissions problem with MySQL.

 However, nothing happens with inserts; no rows are added at all. All I get
 is a message form mysql_error() saying Query was empty.

 Can anyone tell me what might be wrong?

 $user_idx  = 1;
 $objective = 1;
 $question  = 'Foo';
 $question_type = 'singular';

 $connection_id = mysql_connect ('192.168.1.1', 'php', 'password')
 or die (No connection.\n);

 $sql = INSERT INTO question VALUES (NULL, $user_idx, $objective,
 '$question', '$question_type', NULL, NULL);

 $result = mysql_db_query('item_db', $sql_query, $connection_id);

 echo pre;
 echo \nDebugging output:\n;
 echo \tSQL: $sql\n;
 echo \tError: , mysql_error(), \n;
 echo \tLast insert ID: , mysql_insert_id(), \n;
 echo \tResult: $result\n;
 echo /pre\n;

 --
 Todd A. Jacobs
 CodeGnome Consulting, LTD





[PHP] Pie Charts Bar Charts Line Charts...

2001-06-19 Thread Karl J. Stubsjoen

Hey Guys,

Anyone have any good starting points for delivering charts on the web?

Thanks a bunch.


Karl J. Stubsjoen
www.iexcelinlife.com
[EMAIL PROTECTED]
Phone:  602.447



Re: [PHP] INSERT problem with MySQL/PHP

2001-06-19 Thread Todd A. Jacobs

On Mon, 18 Jun 2001, Todd A. Jacobs wrote:

 $sql = INSERT INTO question VALUES (NULL, $user_idx, $objective,
   '$question', '$question_type', NULL, NULL);

 $result = mysql_db_query('item_db', $sql_query, $connection_id);

Thanks to all who answered. It was a simple mistake, but hard for the eye
to catch: I needed the query to use $sql, not $sql_query.

The program now works properly. Thank you.

-- 
Todd A. Jacobs
CodeGnome Consulting, LTD




Re: [PHP] Solution to headers already sent error.

2001-06-19 Thread Ethan Schroeder

(PHP4) In your php.ini file: output_buffering = On
Now you can send header calls and session calls whenever you want.  Also,
take a look at: http://www.php.net/manual/en/ref.outcontrol.php

Ethan

- Original Message -
From: Alexander Wagner [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 18, 2001 3:54 PM
Subject: Re: [PHP] Solution to headers already sent error.


 Hiho,

 Merio, Quinn wrote:
  So, during the time the lists were down, i was banging my head over a
  seemingly impossible error message.
 
  Warning: Cannot send session cache limiter - headers already sent
 
  What?! I exlaimed.. the first line in my page registered the session
  variable i was using, so what was the deal.  I turned out to be one
measly
  little space in front of my ?php tag.

 Well, reading the complete message should have helped, which goes like
this:

 Warning: Cannot add header information - headers already sent by (output
 started at /foo/foo.php3:2) in /foo/bar.php3 on line 399

 The message tells you in which file and on which line the output was
started.
 With PHP 4 it does, anyway.

  Figured i would share that nugget, cus man did it ever drive me nuts,
and i
  saw no reference to it at all in the manuals.

 Not in the session-section, no. But the description of the
header()-function
 (http://php.net/header) contains this paragraph:

 Remember that the header() function must be called before any actual
output
 is sent, either by normal HTML tags blank lines in a file, or from PHP. It
is
 a very common error to read code with include(), or require(), functions,
or
 another file access function, and have spaces or empty lines that will
output
 before header() is called. The same problem exists when using a single
 PHP/HTML file.

 Of course, this is hard to find when you're browsing through the
 session-functions. A link might be useful. Something like This function
 needs to send a HTTP-Header, so you ... as with the header()-function.

 regards
 Wagner

 --
 Isn't it strange? The same people who laugh at gypsy fortune tellers take
 economists seriously.
  - Cincinnati Enquirer





[PHP] upload on Win9x

2001-06-19 Thread Christian Dechery

I can't get file uploads to work on my Windows 98Me running Apache+PHP4.05...

I did everything correctly according to the script I found on phpbuilder...

it simply won't go... the error message is something like can't open 
c:\file.ext for reading... it's like it thinks it's a local file... this 
is the code...
pre
$upload_dir=c:\\apache\\htdocs\\mydir\\;
$upload_tmp_path=ini_get(upload_tmp_dir); // this returns the correct 
path BTW

$file=stripslashes($file);
$newfile=$upload_dir.file.tmp; // just for debugging, but it still 
doesn't work...

chdir($upload_tmp_path);
if(!copy($file,$newfile))
echo pfont face=tahoma size=2bError uploading 
$newfile./b/font/p;
else
process_file($newfile);
/pre

. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer




[PHP] yes! it's back

2001-06-19 Thread Jacky



I've been waiting for this time.
Jack[EMAIL PROTECTED]"There 
is nothing more rewarding than reaching the goal you've set for 
yourself"


[PHP] test

2001-06-19 Thread [EMAIL PROTECTED]

test
Jack
[EMAIL PROTECTED]
There is nothing more rewarding than reaching the goal you've set for
yourself




RE: [PHP] HTTP_POST_VARS not picking up checkboxes that are unchecked

2001-06-19 Thread Jason Murray

 Subject: [PHP] HTTP_POST_VARS not picking up checkboxes that are unchecked

That's right - if the checkbox isn't checked the browser doesn't send it. 

Jason



Re[2]: [PHP] variables in a e-mail

2001-06-19 Thread Richard Kurth

Hello Alexander,
This is pretty much what I want to do. I want to have a e-mail script
in my application and have it so the user can customize the e-mail that
is sent out in a configure file. Say he wants to send a recurring bill
to his customers and he wants it to look a certain way. He would design
the e-mail using placeholders and the it would be processed and the data
would be filled in. Do you know of any examples of this in any program
that is out there. I do better when I can see complete examples to be
able to get the full picture

Monday, June 18, 2001, 4:01:45 PM, you wrote:

Alexander Wagner Hiho,

Alexander Wagner Richard Kurth wrote:
 How can I add a variable to an e-mail on the fly. Say I have a form on
 my page that the user fells in with data. but when he fills in the
 message things like Hello,$Variable are added before it is sent. Does
 this make sence

Alexander Wagner Of course it does.
Alexander Wagner However, variables are not the way to go. The mails are not parsed, 
so 
Alexander Wagner variables won't do you any good. You'll have to use Placeholders. 
Something 
Alexander Wagner like this:

Alexander Wagner $mail_template = 
Alexander Wagner Hi ##firstname## ##lastname##,
Alexander Wagner how are you...;

Alexander Wagner Now you can continue with str_replace():
Alexander Wagner $mail_content = str_replace('##firstname##',$fname,$mail_template);
Alexander Wagner $mail_content = str_replace('##lastname##',$lname,$mail_content);

Alexander Wagner regards
Alexander Wagner Wagner




-- 
Best regards,
 Richard  
mailto:[EMAIL PROTECTED]




Re: [PHP] Multipe Tables, Single Query Problem

2001-06-19 Thread Chris Aitken

At 01:57 PM 6/06/2001, you wrote:
Hi all,

I have three tables in my (mysql) database:

videos - ID, title, description, etc..
links - ID, videoID, actorID
actors - ID, name, dateofbirth, gender, etc...

what i need to do is return a particular video and all it's staring actors
with just one query returning just one row, ie. with all the actor names in
one field... is this possible? or do i have to get the video data first and
then the actors separately?


$count=0;
$query = select actors.*, videos.* from actors, videos where videos.ID = 
'$ID' and videos.ID=actors.actorID order by actors.name;
$result=mysql_query($query);
while (mysql_fetch_array($result)) {
if ($count0) echo Movie Title: $display[title] - $display[desc]P;
echo Actor: $display[name] - DOB: $display[dateofbirth] etc etcBR;
$count++;
}



This is how I do it anyway. Make an incrementing value, and the if 
($count0) line basically says to display the title once, and skip it for 
every other entry. Chances are the query would need tweaking but the 
principle is there to get data from all needed tables in 1 query, then set 
the loop to display the needed data from the 1 query.

There is probebly a more efficient way of doing it, but thats how I do it 
anyway.



Chris




[PHP] Re: Lists are back up

2001-06-19 Thread Rasmus Lerdorf

 More seriously ...

 Can we get a report on what happened?

 If this happens in the future, is there some way of putting an alternative
 in place quickly? For example, could phpbuilder take up the slack?

 Could this outage lend fuel to the Who do you sue? and Open Source is
 unreliable schools. Having said that, I recognize that PHP-based sites
 around the world kept running, as did php.net itself.

The explanation is simple and has been on the php.net web site for a
while.

Having an alternative place to move the lists to is something we can look
at, but it isn't overly simple to do, and I personally don't consider the
mailing lists mission critical.  The web site and cvs server are more
critical.

-Rasmus




[PHP] test

2001-06-19 Thread Jacky



test
Jack[EMAIL PROTECTED]"There 
is nothing more rewarding than reaching the goal you've set for 
yourself"


Re: [PHP] Re: Lists are back up

2001-06-19 Thread David VanHorn

At 12:01 AM 6/19/01 +0200, Alexander Skwar wrote:
So sprach Clayton Dukes am Mon, Jun 18, 2001 at 05:38:26PM -0400:
  Why not just set your filter to look for [EMAIL PROTECTED] in 
 the to
  or cc line?

Because not all filters support that, and it makes reading mails eg. via
webmail interfaces easier?

Eudora can't filter on CC lines.
I've dropped one subscription to another group because the members insisted 
on sending emails to each other individually, and CCing the group.


--
Dave's Engineering Page: http://www.dvanhorn.org

I would have a link to http://www.findu.com/cgi-bin/find.cgi?KC6ETE-9 here 
in my signature line, but due to the inability of sysadmins at TELOCITY to 
differentiate a signature line from the text of an email, I am forbidden to 
have it.





RE: [PHP] email forms

2001-06-19 Thread Jason Murray

Hi tim,

Change this:

   mail($toaddress, $subject, $mailcontent, $fromaddress);

mail ($toaddress, $subject, $mailcontent,
  From: Real Name $fromaddress\nReply-to: $fromaddress\n);

 I've spoken to the hosting company, they say they will not provide any 
 assistance to PHP script related problems.  They are running on Solaris 
 servers with PHP 3.0.16.

1) Get a new hosting service, since they seem uninterested in your 
   continued business.
2) Tell them to use a PHP that was built *after* the fall of the Roman 
   Empire. 3.0.16 is old. It's not even the last PHP3 build. (And if they
   say its hard, well gee, we have PHP4.0.5 running on Solaris).

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
What'll Scorpy use wormhole technology for?
'Faster pizza delivery.'



Re: [PHP] Apache/PHP4 Question

2001-06-19 Thread Rasmus Lerdorf

 I have a Server Running Apache 1.3.14 and it has PHP4 running
 as a module. For our customers we require that they use .cgi
 for all of their scripts and so if a user wants to run a php4
 script on our server they use www.blah.com/myphpfile.cgi with
 of course the first line being #!/usr/local/bin/php4, then our
 server runs the php4 script as the user rather than running
 as the server username.

 I noticed a security whole if a customer stuck a .htaccess
 file in the Directory and then added the following, it would
 allow them to stick .php files in their home directory and have
 it run as the server and be parsed automatically. Is there a way
 to make it so that they can't do this and me not have to disable
 the AllowOverride FileInfo, cause right now I have to disable that
 feature cause of the security problem that it allowed to happen.

 Anyone have any idea of what I can do?

If you are running PHP only as a CGI, why is it built into the server?
Remove the PHP server module and people can't do that.  Or alternatively,
disable it selectively in the directories you want to use the module
version by turning it off by default:

in your php.ini:

engine = Off

And in your httpd.conf in the appropriate VirtualHost or Directory blocks:

php_admin_flag engine On

-Rasmus




Re: [PHP] HTTP_POST_VARS not picking up checkboxes that are unchecked

2001-06-19 Thread Rasmus Lerdorf

 The problem is that if a checkbox is not checked, when it's not required, I
 don't get a blank entry in my tab file for the checkbox input. I'm imploding
 my HTTP_POST_VARS variable like so;

This has nothing to do with PHP.  Your browser sends nothing for an
unchecked checkbox.  You would have to work around this either by knowing
in your code the complete list of checkboxes, or perhaps adding hidden
fields in your HTML.

-Rasmus




[PHP] [php]using sendmail with php

2001-06-19 Thread Chris Cocuzzo

hey-
i noticed a recent post about the weird email that someone was getting from
a script that emails form data. I was curious on whether or not I could use
sendmail with php, to possibly get around this problem(I've run into it
myself). How might i do this?...

chris




[PHP] php bug reporting

2001-06-19 Thread akhil chugh

Dear Sir
 i am getting a bug in php where by i can't pass the values of the data
entered by the user into the database 
 pls help
 --akhil


Get free email and a permanent address at http://www.netaddress.com/?N=1



[PHP] Shortest route between 2 cities

2001-06-19 Thread Vahan Yerkanian

Greetings All!

I'm looking for a code which will find the shortest route between 2 cities, with
data being stored in SQL tables listed below. Anyone has coded such a task ever?
The most know algorithm for this is called Dijkstra's algoritm.

Is there anyone with math skills enough to code this? This will be sure a big
asset for our PHP community as any site dealing with some shippment/ticket/route
problems will require such code.

I'm including the structure of tables used.

CREATE TABLE Cities (
  cityID int(4) unsigned NOT NULL auto_increment,
  cityName varchar(20) NOT NULL,
  PRIMARY KEY (cityID),
  UNIQUE cityID (cityID, cityName)
);

INSERT INTO Cities VALUES ( '1', 'A');
INSERT INTO Cities VALUES ( '2', 'B');
INSERT INTO Cities VALUES ( '3', 'C');
INSERT INTO Cities VALUES ( '4', 'D');
INSERT INTO Cities VALUES ( '5', 'E');
INSERT INTO Cities VALUES ( '6', 'F');
INSERT INTO Cities VALUES ( '7', 'G');
INSERT INTO Cities VALUES ( '8', 'H');
INSERT INTO Cities VALUES ( '9', 'I');

CREATE TABLE CityMatrix (
  matrixID int(4) unsigned NOT NULL auto_increment,
  SourceCityID int(4) unsigned DEFAULT '0' NOT NULL,
  DestinationCityID int(4) unsigned DEFAULT '0' NOT NULL,
  Distance int(5) unsigned DEFAULT '0' NOT NULL,
  Fare int(4) unsigned DEFAULT '0' NOT NULL,
  PRIMARY KEY (matrixID),
  UNIQUE matrixID (matrixID)
);

# Dumping data for table 'CityMatrix'
INSERT INTO CityMatrix VALUES ( '1', '1', '4', '5', '10');
INSERT INTO CityMatrix VALUES ( '2', '3', '4', '50', '5');
INSERT INTO CityMatrix VALUES ( '4', '5', '7', '85', '8');
INSERT INTO CityMatrix VALUES ( '5', '1', '3', '70', '4');
INSERT INTO CityMatrix VALUES ( '6', '9', '6', '39', '6');
INSERT INTO CityMatrix VALUES ( '7', '8', '4', '10', '1');


-- 
Vahan Yerkanian[EMAIL PROTECTED]
Vice President, Design  Development  Website @ http://www.abideweb.com/
AbideWeb Technologies, LLC  Phone +3741 238650 | Mobile +3749 416358



Re: [PHP] Templates??

2001-06-19 Thread Attila Strauss

Hi,


 What the true advantage of using templates 
Abstraction between PHP and HTML.

where can I get info on using them?
have a look at the well-known php sites like:

http://www.phpbuilder.com/
http://www.phpdeveloper.org/
http://www.newbienetwork.net/
http://www.evilwalrus.com/






Re: [PHP] Multipe Tables, Single Query Problem

2001-06-19 Thread Christopher Ostmo

Simon Kimber pressed the little lettered thingies in this order...

 Hi all,
 
 I have three tables in my (mysql) database:
 
 videos - ID, title, description, etc..
 links - ID, videoID, actorID
 actors - ID, name, dateofbirth, gender, etc...
 

You need to be able to tie at least one field from each table to one other 
field in another table, and then you can have a query like:

SELECT videos.*, links.*, actors.*
FROM videos, links, actors
WHERE videos.VideoID = '$VideoID' AND
links.VideoID = videos.VideoID
actors.ActorID = links.ActorID

You should consider picking up the book called MySQL. It covers this 
sort of thing rather well.

Good luck...

Christopher Ostmo
a.k.a. [EMAIL PROTECTED]
AppIdeas.com
Meeting cutting edge dynamic
web site needs

For a good time,
http://www.AppIdeas.com/



Re: [PHP] Templates??

2001-06-19 Thread Les Neste

The template defines the look and feel for a class of pages.  The advantage
is in allowing you to change one file -- the template file -- and have your
changes be reflected in all the individual pages that use the template
WITHOUT having to individually edit all of those pages.  

For smaller sites, this may not be a big deal, but, for sites with
thousands of pages, you clearly want to avoid hand-edits if at all possible.

I'm personally reworking my online portfolio, and I'm now using templates
so I can present a different look and feel to suit different potential
clients.

FYI, at the last ThunderLizard web design conference, a presenter speaking
about content management tools said that most sites only need 6 or so
templates ... that there are usually only 6 categories of pages.



At 05:48 PM 6/18/2001 -0700, Daniel Guerrier wrote:
What the true advantage of using templates and where
can I get info on using them?

__
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/



Les Neste  678-778-0382  http://www.lesneste.com



[PHP] Passing Array through URL

2001-06-19 Thread Reuben D Budiardja


Hello,
I have one-dimensional array with a very a lot elements (say, about 300). 
What is the best way to pass it through URL? do I use something like implode 
the whole thing and then pass it, or do I use something like serialize, or 
any other way?

Thanks for any reply.
Reuben D. Budiarjda



[PHP] YES -- THIS SERVER IS BACK UP!

2001-06-19 Thread Jason Caldwell

T H A N K  Y O U !

Jason





RE: [PHP] INSERT problem with MySQL/PHP

2001-06-19 Thread Jason Murray

 Can anyone tell me what might be wrong?
 
 $user_idx  = 1;
 $objective = 1;
 $question  = 'Foo';
 $question_type = 'singular';
 
 $connection_id = mysql_connect ('192.168.1.1', 'php', 'password')
   or die (No connection.\n);
 
 $sql = INSERT INTO question VALUES (NULL, $user_idx, $objective,
   '$question', '$question_type', NULL, NULL);
 
 $result = mysql_db_query('item_db', $sql_query, $connection_id);
  ^^

I daresay this will be the problem since the SQL is in $sql.

Jason



RE: [PHP] image retrival from db?

2001-06-19 Thread Ray Hilton

I thought this one was quite good to get you up to speed:

http://www.phpbuilder.net/columns/florian19991014.php3

Thing is, although very technically nice, it isnt really very practical,
as your database increases in size rapidly, and data retrival takes
longer and longer. I would recommend you still do stuff like thumbnail
generation on the upload and then store the paths to the file in the
database.

Ray Hilton
-
[EMAIL PROTECTED]
http://rayh.co.uk

-Original Message-
From: Steve [mailto:[EMAIL PROTECTED]]
Sent: 19 June 2001 00:57
To: [EMAIL PROTECTED]
Subject: [PHP] image retrival from db?


Anyone have a pointer to a script or documentation on how to retrieve an
image that is stored in a database?

I can insert the image, but unable to display the image once retieved, i
apparently am missing something.


Thanks

Steve






RE: [PHP] What is the deal with cookies

2001-06-19 Thread Ray Hilton

Well, when you set a cookie, it is sent in the headers, so the browser
isnt going to send the cookie back to the server until a refresh, the
best way is to either cash the userlog on details in the log in
function, so you need not refresh, or simply use a header(Location:
/); or something to force the browser to reload the page.

-Original Message-
From: Richard Kurth [mailto:[EMAIL PROTECTED]]
Sent: 18 June 2001 23:28
To: [EMAIL PROTECTED]
Subject: [PHP] What is the deal with cookies


I have a script that authorizes the user and sets a cookie but when I
run the script it takes the username and password sets the cookie.
Verifies the cookie is set and then runs the rest of the code on the
page. except it does not pass on the user name. I have to do a manual
refresh to get it to pull the data from the database using the username
furnished by the cookie. Look at the code below. how can I overcome this
refresh problem.

 This is the script that calls the userauth.php file look at the
userauth.php file below

include(../inc/dataconf.inc);
include(userauth.php);
include(../inc/function.inc);
conf();
 $username =  $user_name;
$db = MYSQL_CONNECT($roothostname,$rootusername, $rootpassword) OR
DIE(Unable to connect to database);
$query = Select * from customers,datsubd,plans where datsubd.id =
customers.id and customers.cusername='$username'and
plans.planno=customers.plan; $result=mysql_db_query($dbName,$query);
$row = mysql_fetch_array($result);

?
? include(top.inc);?
table width=100% border=0 cellspacing=0 cellpadding=0
align=center tr
td colspan=3/td
/tr
tr
td width=25% align=left valign=top?php
include(left.inc);? /td


td width=100% align=center valign=top

 #
Userauth.php

 function query($query)
 {
   Global $roothostname,$rootusername, $rootpassword,$dbName;
   // Connect to DB
if (!$link = @MYSQL_CONNECT($roothostname,$rootusername,
$rootpassword))
{
$result = 0;
die(db connect error);
}
else
{
// Select DB
if (!@mysql_select_db($dbName, $link))
{
$result = 0;
die(db select error);
}
else
{
// Execute query
if (!$result = @mysql_query($query, $link))
{
$result = 0;
die(db query error);
}
}
}
 @mysql_close($link);
return $result;
  }
  function login_user($user_name, $password)


// Form our sql query
   $result = query(SELECT * FROM customers WHERE cusername
='$user_name');
   $row = mysql_fetch_array($result);
  if (($row[cusername] == $user_name) AND ($row[cpassword] ==
$password) AND ($user_name != ))


// User has been authenticated, send a cookie
$user_id = $row[cusername];
$encryptedpassword = md5($password);
SetCookie(LoginCookie, $user_id-$encryptedpassword, time()+50);
// 3600 expires one hour from now you can increse this if you what it to
last longer
$success = 1;
} else

  $success = 0;
   }
  return $success;
 }
  function verify_auth($cookie)


   // Split the cookie up into userid and password
   $auth = explode(-, $cookie);
   $query = query(SELECT * FROM customers WHERE cusername =
'$auth[0]');
   $row = mysql_fetch_array($query);
   $encryptedpassword = md5($row[cpassword]);
   if (($row[cusername] == $auth[0]) AND ($encryptedpassword ==
$auth[1]) AND ($auth[0] != ))


 $success = 1;
   } else

$success = 0;
   }
  return $success;
}
 function display_loginform()
 {
   global $SCRIPT_URL,$user_name;
   ?
  table width=400 border=1 align=center
form name=login action=?$SCRIPT_URL? method=post
trtd bgcolor=blackfont face=Arial color=white
size=2bLoginb/font/td/tr
trtdfont face=Arial color=black size=2Name input
name=user_name value= size=10 Password input name=password
type=password value= size=10/font/td/tr trtdfont
face=Arial color=black size=2 input type=submit value=Login
input type=reset value=Clear/font/td/tr /form /table  ?
   exit;
 }
 script entry point here
$SCRIPT_URL=getenv(SCRIPT_NAME);
 if($LoginCookie) // if cookie exists, check authenticity
 {
  $authenticated=verify_auth($LoginCookie);
  if($authenticated==0) display_loginform();
 } else {
$login=login_user($user_name,$password);
if($login==0) display_loginform();
}
 // if user has logged in, the script carries on here $cookie_var =
split(-, $LoginCookie); // this variable contains who the user is
logged in as!
   $username = $cookie_var[0];












Best regards,
 Richard
mailto:[EMAIL PROTECTED]






RE: [PHP] send data to a file composed of frames

2001-06-19 Thread Ray Hilton

The only real way I see you maintaining a session like that is to use
cookies or some sort of client identifier so you can keep trak of that
user and if ther are logged in or not.  Then you just have some sort of
flag that determines the course of action for your site.

I am not entirely sure what you mean by not being able to go back to the
previous page, this is perfectly possible, unless im missing the point

Ray Hilton
-
[EMAIL PROTECTED]
http://rayh.co.uk

-Original Message-
From: kaab kaoutar [mailto:[EMAIL PROTECTED]]
Sent: 15 June 2001 12:25
To: [EMAIL PROTECTED]
Subject: [PHP] send data to a file composed of frames


Hi guys!
I have a login in my site, some pictures and links are differents
depending
on being logged or not!
I thought of using sessions in the whole site, but the disadvantage is
that,
we can never go back in a the previous page, when using sessions. i
thought of using a hidden input in each page but some or rather almost
all
my pages are composed of frames and therefore the frames don't receive
the
login status!
Can u please help ?
THanks

_
Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.






[PHP] Re: Lists are back up

2001-06-19 Thread Adrian D'Costa

Hi Rasmus,

I was home sick with out this mailing list ;-)  I found that this is the
only list that can get quick responses (most of the times).

I am glad it is up

Adrian

On Mon, 18 Jun 2001, Rasmus Lerdorf wrote:

 We have re-enabled the PHP mailing lists.  They are now running from a
 temporary machine sitting on the floor of my spare bedroom.  A more
 permanent home is in the works.
 
 -Rasmus
 
 




RE: [PHP] Multipe Tables, Single Query Problem

2001-06-19 Thread Ray Hilton

Something like:

SELECT name, title, description from videos, actors, links where
actors.ID = links.ID and videos.ID=videoID, and videos.ID = 20; ?

But in just want one row?  You could return all the names in one row (I
think) using MySQL (I assume?) string functions...  I have a funny
feeling you need a sub select, which mysql doesn’t support...

Ray Hilton
-
[EMAIL PROTECTED]
http://rayh.co.uk

-Original Message-
From: Simon Kimber [mailto:[EMAIL PROTECTED]]
Sent: 06 June 2001 14:57
To: [EMAIL PROTECTED]
Subject: [PHP] Multipe Tables, Single Query Problem


Hi all,

I have three tables in my (mysql) database:

videos - ID, title, description, etc..
links - ID, videoID, actorID
actors - ID, name, dateofbirth, gender, etc...

what i need to do is return a particular video and all it's staring
actors with just one query returning just one row, ie. with all the
actor names in one field... is this possible? or do i have to get the
video data first and then the actors separately?

Simon Kimber
Funny.co.uk - The Comedy Portal
http://www.funny.co.uk/

Now Incorporating: The UK Live Comedy Directory
FREE promotion for UK Comedy Acts and Venues
http://www.funny.co.uk/uklive/

eml. [EMAIL PROTECTED]
icq. 16156911







Re: [PHP] upload on Win9x

2001-06-19 Thread Andrew Halliday

Have you set the content type of the form to be multipart MIME ?  That
screws me every time...

AndrewH

- Original Message -
From: Christian Dechery [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 19, 2001 11:16 AM
Subject: [PHP] upload on Win9x


 I can't get file uploads to work on my Windows 98Me running
Apache+PHP4.05...

 I did everything correctly according to the script I found on
phpbuilder...

 it simply won't go... the error message is something like can't open
 c:\file.ext for reading... it's like it thinks it's a local file... this
 is the code...
 pre
 $upload_dir=c:\\apache\\htdocs\\mydir\\;
 $upload_tmp_path=ini_get(upload_tmp_dir); // this returns the correct
 path BTW

 $file=stripslashes($file);
 $newfile=$upload_dir.file.tmp; // just for debugging, but it still
 doesn't work...

 chdir($upload_tmp_path);
 if(!copy($file,$newfile))
 echo pfont face=tahoma size=2bError uploading
 $newfile./b/font/p;
 else
 process_file($newfile);
 /pre
 
 . Christian Dechery (lemming)
 . http://www.tanamesa.com.br
 . Gaita-L Owner / Web Developer





[PHP] simulate form submission

2001-06-19 Thread Pascal Polleunus

Hi,

Does someone know how to simulate a form submission?
I guess I need to do something like
header(Location: http://www.mysite.com;);
header($PostVarsData);
where $PostVarsData must contains the header informations to send the post vars

but what are these header informations?
how can I handle that?

Thanks,
Pascal




RE: [PHP] email forms

2001-06-19 Thread Jon Haworth

 $fromaddress = [EMAIL PROTECTED];
 mail($toaddress, $subject, $mailcontent, $fromaddress);

Should probably be:

$fromaddress = From: [EMAIL PROTECTED];
mail($toaddress, $subject, $mailcontent, $fromaddress);

Splitting hairs a bit, a more accurate name for $fromadress would be
$headers - in the future, you may want to add bounce headers or whatever, as
well as a from address.

HTH
Jon




**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**



Re: [PHP] Pie Charts Bar Charts Line Charts...

2001-06-19 Thread Richard Stockley

There is a very fine OO Graphing Class that has been written that supports,
scatter, pie, 3dpie, bar etc...

just needs gd support to work

http://www.aditus.nu/jpgraph/


 Hey Guys,

 Anyone have any good starting points for delivering charts on the web?

 Thanks a bunch.


 Karl J. Stubsjoen
--
Richard Stockley: - [EMAIL PROTECTED]
Procopia Ltd






[PHP] PHP with JAVA support

2001-06-19 Thread Robert Vetter

Hello,

I'm trying to run PHP with Java support and don't get it to work. First
I compiled PHP '--with-java=/usr/local/jdk1.2.2/'. Then I added this to
the PHP.ini file:

[Java]
java.home=/usr/local/jdk1.2.2
java.class.path=/usr/local/lib/php/extensions/php_java.jar:/usr/local/jdk1.2.2/src.jar
java.library.path=/usr/local/lib:/usr/local/jdk1.2.2/jre/lib/i386:/usr/local/jdk1.2.2/jre/lib/i386/classic:/usr/local
/jdk1.2.2/jre/lib/i386/native_threads
java.library=/usr/local/jdk1.2.2/jre/lib/i386/libjava.so
java.extension=/usr/local/lib/php/extensions/libphp_java.so


Now, when I try to instantiate a JAVA class I get this error: Fatal
error: Cannot instantiate non-existent class: java in
/usr/local/apache/htdocs/index.php on line 3.

Does anybody have expirience with running JAVA with PHP? I don't know
why it doesn't work. I use PHP 4.05 on a Debian Linux machine. Thanks.

Robert



SV: [PHP] Re: Lists are back up

2001-06-19 Thread Mattias Segerdahl

For all those that's seeking support for php, there are two options,
zend.com sells SOS, you could also join #php on efnet for help..

// bad2da

-Ursprungligt meddelande-
Fran: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Skickat: den 19 juni 2001 05:31
Till: Miles Thompson
Kopia: [EMAIL PROTECTED]
Amne: [PHP] Re: Lists are back up


 More seriously ...

 Can we get a report on what happened?

 If this happens in the future, is there some way of putting an alternative
 in place quickly? For example, could phpbuilder take up the slack?

 Could this outage lend fuel to the Who do you sue? and Open Source is
 unreliable schools. Having said that, I recognize that PHP-based sites
 around the world kept running, as did php.net itself.

The explanation is simple and has been on the php.net web site for a
while.

Having an alternative place to move the lists to is something we can look
at, but it isn't overly simple to do, and I personally don't consider the
mailing lists mission critical.  The web site and cvs server are more
critical.

-Rasmus




[PHP] SetCookie weirdness

2001-06-19 Thread Tomaz Kovacic

Hi!

Last night I've found some interesting cookie behavior. I was testing some
script on my local server, so
I used short version of domain ( http://www ) to reach local webserver. My
script stopped working, so I started to investigate a little bit what's goin
on..

I've managed to get my script working only when i user SetCookie command
with only 3 parameters:

SetCookie (mycookie, $cookie, time()+1200);

My usual form of setting cookie is with all 6 arguments like:
SetCookie(mycookie, $cookie, time()+1200, /, .domain.com, 0);

But if I use longer form if domain: www.local (same as www.somedomaing.com)
my longer form of  setting cookie started to work again.

Weird.

Anyone experianced similar problems?

Tomaz




[PHP] PHP Interact with DreamWaver

2001-06-19 Thread Jack

Dear All
I'm fresh on the php, but i just want to ask what should i do to let my
existing Dreamwaver Made homepage to interact with Php, which means i had
used dreamwave to draw the layout, using firework for the image, then i want
to provide some function for the user like forms input, which i knew php can
handle these things well, so i want to let the php to interact with the
Dreamwaver!

Is there anything i got to set on the Dreamwaver or the php side?

Thx

--
Jack
[EMAIL PROTECTED]





[PHP] [Announce]Rasmus Lerdorf to speak at New England PHP User Group meeting

2001-06-19 Thread TomHenry


[PHPUGNE] PHP User Group of New England

Inaugural meeting set for 7:00 p.m. on Tuesday June 26th, 2001

Rasmus Lerdorf to speak at New England PHP User Group Inaugural Meeting!

We are pleased to invite you to attend the inaugural meeting of the New 
England PHP User Group

Rasmus Lerdorf, the founding father/ creator/ developer of PHP, will be the 
featured speaker at this meeting.

We are grateful to NuSphere, Inc. especially Patrick Lannigan, for 
supporting PHPUGNE and in particular for sponsoring Rasmus' appearance at 
this meeting, providing the meeting location, and for refreshments ;-)

The meeting is being held at:
NuSphere Corporation
14 Oak Park
Bedford, Massachusetts 01730 USA

For detailed directions visit http://phpugne.businesswebs.com/

Volunteers are needed to assist in the organization of PHPUGNE - please 
contact me offlist or through the link below.

Sincerely,
Tom Henry - for PHPUGNE http://phpugne.businesswebs.com/




RE: [PHP] [php]using sendmail with php

2001-06-19 Thread Jamie Thompson

What is this problem you speak of? I have never come across any problems
with mail().maybe i'm not trying hard enough ;)

-Original Message-
From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]]
Sent: 19 June 2001 05:04
To: PHP General List (E-mail)
Subject: [PHP] [php]using sendmail with php


hey-
i noticed a recent post about the weird email that someone was getting from
a script that emails form data. I was curious on whether or not I could use
sendmail with php, to possibly get around this problem(I've run into it
myself). How might i do this?...

chris




[PHP] PHP Hosting in The UK

2001-06-19 Thread Jamie Thompson

Just a quickieDoes anyone know of any cheap but reliable (i.e. they know
at least something about PHP) Hosting companies in the UK?

By cheap i mean about £10 a month. Speed isn't an issue as long as were not
talking a snails pace.

Cheers

Jamie Funkdaddy Thompson




Re: [PHP] Re: Lists are back up

2001-06-19 Thread Jon A

I use Eudora, and it works fine for me, filtering on Cc lines.

what I do:

To: contains : [EMAIL PROTECTED]

or

Cc: contains : [EMAIL PROTECTED]

transfer to: I/want/it/here

Hope it helps

Jon A

At 22:43 18-06-01 -0500, David VanHorn wrote:
At 12:01 AM 6/19/01 +0200, Alexander Skwar wrote:
So sprach Clayton Dukes am Mon, Jun 18, 2001 at 05:38:26PM -0400:
  Why not just set your filter to look for [EMAIL PROTECTED] in 
 the to
  or cc line?

Because not all filters support that, and it makes reading mails eg. via
webmail interfaces easier?

Eudora can't filter on CC lines.
I've dropped one subscription to another group because the members 
insisted on sending emails to each other individually, and CCing the group.


--
Dave's Engineering Page: http://www.dvanhorn.org

I would have a link to http://www.findu.com/cgi-bin/find.cgi?KC6ETE-9 here 
in my signature line, but due to the inability of sysadmins at TELOCITY to 
differentiate a signature line from the text of an email, I am forbidden 
to have it.





[PHP] Payflo Pro and credit cards

2001-06-19 Thread Tobias Talltorp

I have a few questions regarding credit cards and the Payflo Pro function in
PHP.
Currently I only need to check that the creditcard is valid, no actual
payment is needed right now.

1)
How do I perform this check against Payflo Pro?

2)
How and where should I save the credit card numbers? In a file outside the
webroot that I can crypt, in a database that I can crypt (can MySQL do
this)?

Thanks in advance,
// Tobias Talltorp





RE: [PHP] php bug reporting

2001-06-19 Thread Jon Haworth

I think perhaps a bit more detail is needed :-)

What's the error, can we see your code, what database are you using, etc.

Cheers
Jon


-Original Message-
From: akhil chugh [mailto:[EMAIL PROTECTED]]
Sent: 19 June 2001 05:30
To: [EMAIL PROTECTED]
Subject: [PHP] php bug reporting


Dear Sir
 i am getting a bug in php where by i can't pass the values of the data
entered by the user into the database 
 pls help
 --akhil


**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**



[PHP] Turning Off Headers

2001-06-19 Thread Meles Meles

Is there any way to tell PHP to NOT produce a Mime Header?

None, none at all... Not a Content-type:, nothing...

Badger[EMAIL PROTECTED]
---






[PHP] WebMail client

2001-06-19 Thread Rosen

Hi,
I want to find some Web Mail script in PHP with possibilities to
create mail accounts directly on Linux Mail server.

Thanks
Rosen Marinov







Re: [PHP] Re: Lists are back up

2001-06-19 Thread Andreas D. Landmark

At 19.06.2001 04:43, you wrote:
Eudora can't filter on CC lines.
I've dropped one subscription to another group because the members 
insisted on sending emails to each other individually, and CCing the group.

Wrong!

Eudora can filter on CC lines, Header CC: contains lists.php.net
and filter that however you like it.

Perhaps you need to look at upgrading your Eudora or swapping it
if your version doesn't support it... Eud5 certainly supports CC: filtering,
and you could always use anywhere-in-header contains lists.php.net as
that would do the same thing.


-- 
Andreas D Landmark / noXtension
Real Time, adj.:
 Here and now, as opposed to fake time, which only occurs there
and then.




Re: [PHP] php bug reporting

2001-06-19 Thread Andreas D. Landmark

At 19.06.2001 05:29, you wrote:
Dear Sir
  i am getting a bug in php where by i can't pass the values of the data
entered by the user into the database
  pls help
  --akhil

Show us your code, as more than 9 out of 10 times the error is in chair-screen
section aka. operator/user and not in the source for php itself.


-- 
Andreas D Landmark / noXtension
Real Time, adj.:
 Here and now, as opposed to fake time, which only occurs there
and then.




RE: [PHP] HTTP_POST_VARS not picking up checkboxes that are unchecked

2001-06-19 Thread John Monfort



   I had some issues with that recently. It turns out that PHP will not
   pick up the checkboxes, unless you use the GET method.

   You can then access your vars with HTTP_GET_VARS.

   This was discovered on
WIN98+ PHP 4.03pl1 + Apache 1.3++
 
WIN ME + PHP 4.03pl1 + Apache 1.3++

   If someone had a different experience, then I would like to hear about
   it. Please share.

__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
The world is waiting, are you ready?
-+___+-

On Tue, 19 Jun 2001, Jason Murray wrote:

  Subject: [PHP] HTTP_POST_VARS not picking up checkboxes that are unchecked

 That's right - if the checkbox isn't checked the browser doesn't send it.

 Jason





RE: [PHP] email forms

2001-06-19 Thread Andreas D. Landmark

At 19.06.2001 04:45, you wrote:
Hi tim,

Change this:

mail($toaddress, $subject, $mailcontent, $fromaddress);

mail ($toaddress, $subject, $mailcontent,
   From: Real Name $fromaddress\nReply-to: $fromaddress\n);

  I've spoken to the hosting company, they say they will not provide any
  assistance to PHP script related problems.  They are running on Solaris
  servers with PHP 3.0.16.

1) Get a new hosting service, since they seem uninterested in your
continued business.

Not really, if some of my users contact me and blame me for their scripts
failing, I usually ignore it unless they back it up with error messages or 
similar
to show that the error is in my software/hardware rather than in their php/perl
capabilities...

It's kinda harsh to call them uninterested, most serveradmins have more things
to do than to debug scripts/code that they didn't write... and are not 
going to use...


-- 
Andreas D Landmark / noXtension
Real Time, adj.:
 Here and now, as opposed to fake time, which only occurs there
and then.




RE: Re[2]: [PHP] variables in a e-mail

2001-06-19 Thread Bruin, Bolke de

Use templates

instead of sending it to the webbrowser send it as an email...

http://www.phpbuilder.com for more info



-Oorspronkelijk bericht-
Van: Richard Kurth [mailto:[EMAIL PROTECTED]]
Verzonden: Tuesday, June 19, 2001 4:51 AM
Aan: [EMAIL PROTECTED]; Alexander Wagner
Onderwerp: Re[2]: [PHP] variables in a e-mail


Hello Alexander,
This is pretty much what I want to do. I want to have a e-mail script
in my application and have it so the user can customize the e-mail that
is sent out in a configure file. Say he wants to send a recurring bill
to his customers and he wants it to look a certain way. He would design
the e-mail using placeholders and the it would be processed and the data
would be filled in. Do you know of any examples of this in any program
that is out there. I do better when I can see complete examples to be
able to get the full picture

Monday, June 18, 2001, 4:01:45 PM, you wrote:

Alexander Wagner Hiho,

Alexander Wagner Richard Kurth wrote:
 How can I add a variable to an e-mail on the fly. Say I have a form on
 my page that the user fells in with data. but when he fills in the
 message things like Hello,$Variable are added before it is sent. Does
 this make sence

Alexander Wagner Of course it does.
Alexander Wagner However, variables are not the way to go. The mails are
not parsed, so 
Alexander Wagner variables won't do you any good. You'll have to use
Placeholders. Something 
Alexander Wagner like this:

Alexander Wagner $mail_template = 
Alexander Wagner Hi ##firstname## ##lastname##,
Alexander Wagner how are you...;

Alexander Wagner Now you can continue with str_replace():
Alexander Wagner $mail_content =
str_replace('##firstname##',$fname,$mail_template);
Alexander Wagner $mail_content =
str_replace('##lastname##',$lname,$mail_content);

Alexander Wagner regards
Alexander Wagner Wagner




-- 
Best regards,
 Richard  
mailto:[EMAIL PROTECTED]



[PHP] PHP with JAVA support

2001-06-19 Thread Robert Vetter

Hello,

I'm trying to run PHP with Java support and don't get it to work. First
I compiled PHP '--with-java=/usr/local/jdk1.2.2/'. Then I added this to
the PHP.ini file:

[Java]
java.home=/usr/local/jdk1.2.2
java.class.path=/usr/local/lib/php/extensions/php_java.jar:/usr/local/jdk1.2.2/src.jar
java.library.path=/usr/local/lib:/usr/local/jdk1.2.2/jre/lib/i386:/usr/local/jdk1.2.2/jre/lib/i386/classic:/usr/local
/jdk1.2.2/jre/lib/i386/native_threads
java.library=/usr/local/jdk1.2.2/jre/lib/i386/libjava.so
java.extension=/usr/local/lib/php/extensions/libphp_java.so


Now, when I try to instantiate a JAVA class I get this error: Fatal
error: Cannot instantiate non-existent class: java in
/usr/local/apache/htdocs/index.php on line 3.

Does anybody have expirience with running JAVA with PHP? I don't know
why it doesn't work. I use PHP 4.05 on a Debian Linux machine. Thanks.

Robert



[PHP] Re: PHP version?

2001-06-19 Thread Andreas D. Landmark

At 15.06.2001 10:29, you wrote:
Hi
Guys,

I wonder if you can help. One of our
servers has migrated to php V 4.05 from V 4.04. Unfortunately part
of the site that accesses a MySQL database no longer functions. I
have checked pretty much everything and it seems OK. Is there any changes
in the version which could be causing these problems?

Thanks very much.
I'd put my money on that who ever compiled 4.04 forgot to include support
for mysql...
sounds more likely than difference in source on a 
tiny-rollback.

-- 
Andreas D Landmark / noXtension
Real Time, adj.:
Here and
now, as opposed to fake time, which only occurs there
and then.



[PHP] Starting session

2001-06-19 Thread Rosen

Hi,
I'm creating a WEB portal  with PHP.
I want to give possibility the users to register on my site and to use some
features on it.
I want to use sessions and to start session only if user login.
How can I understand ot my other pages on site, thath the user has logged in
my site.
i.e. to startsession only if user has logged in ?

Thanks,
Rosen Marinov








[PHP] Starting session

2001-06-19 Thread Rosen

Hi,
I'm creating a WEB portal  with PHP.
I want to give possibility the users to register on my site and to use some
features on it.
I want to use sessions and to start session only if user login.
How can I understand ot my other pages on site, thath the user has logged in
my site.
i.e. to startsession only if user has logged in ?

Thanks,
Rosen Marinov








[PHP] Starting session

2001-06-19 Thread Rosen

Hi,
I'm creating a WEB portal  with PHP.
I want to give possibility the users to register on my site and to use some
features on it.
I want to use sessions and to start session only if user login.
How can I understand ot my other pages on site, thath the user has logged in
my site.
i.e. to startsession only if user has logged in ?

Thanks,
Rosen Marinov








Re: [PHP] Apache/PHP4 Question

2001-06-19 Thread tony . mccrory


Sounds like you could remove the mime type for php in httpd.conf :

AddType application/x-httpd-php .php

Tony
--
Tony McCrory
IT, Trinity Mirror group (Ireland)
(028) 9068 0168
[EMAIL PROTECTED]















   

Devin 

Atencio To: [EMAIL PROTECTED]   

dreamboy@arocc:   

s.net   Subject: [PHP] Apache/PHP4 Question   

   

06/14/2001 

04:45 PM   

   

   






I have a Server Running Apache 1.3.14 and it has PHP4 running
as a module. For our customers we require that they use .cgi
for all of their scripts and so if a user wants to run a php4
script on our server they use www.blah.com/myphpfile.cgi with
of course the first line being #!/usr/local/bin/php4, then our
server runs the php4 script as the user rather than running
as the server username.

I noticed a security whole if a customer stuck a .htaccess
file in the Directory and then added the following, it would
allow them to stick .php files in their home directory and have
it run as the server and be parsed automatically. Is there a way
to make it so that they can't do this and me not have to disable
the AllowOverride FileInfo, cause right now I have to disable that
feature cause of the security problem that it allowed to happen.

Anyone have any idea of what I can do?

   /'^'\
  ( o o )
--oOOO--(_)--OOOo
Devin Atencio
ArosNet Systems Administration .oooO
EMail: [EMAIL PROTECTED]   (   )   Oooo.
\ ((   )-
 \_)) /
   (_/



IMPORTANT NOTICE  The information in this e-mail is confidential and should
only be read by those persons to whom it is addressed and is not intended
to be relied upon by any person without subsequent written confirmation of
its contents.  Furthermore, the content of this e-mail is the personal view
of the sender and does not represent the advice, views or opinion of our
company.  Accordingly, our company disclaim all responsibility and accept
no liability (including in negligence) for the consequences of any person
acting, or refraining from acting, on such information prior to the receipt
by those persons of subsequent written confirmation.  In particular (but
not by way of limitation) our company disclaims all responsibility and
accepts no liability for any e-mails which are defamatory, offensive,
racist or in any other way are in breach of any third party's rights,
including breach of confidence, privacy or other rights.  If you have
received this e-mail message in error, please notify me immediately by
telephone.  Please also destroy and delete the message from your computer.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and/or publication of this e-mail message is strictly
prohibited.  Trinity Mirror plc is the holding company for the Trinity
Mirror group of companies and is registered in England No. 82548, with its
address at Kingsfield Court, Chester Business Park, Chester CH4 9RE.




Re: [PHP] WebMail client

2001-06-19 Thread Greg K

Try squirremail at http://www.squirrelmail.org


Rosen [EMAIL PROTECTED] wrote in message
9gnf7f$dsk$[EMAIL PROTECTED]">news:9gnf7f$dsk$[EMAIL PROTECTED]...
 Hi,
 I want to find some Web Mail script in PHP with possibilities to
 create mail accounts directly on Linux Mail server.

 Thanks
 Rosen Marinov






[PHP] Performance with encoded files

2001-06-19 Thread Berthold Tenhumberg

Hi!

I've testet the performance on plain code and encoded code.
Both done with the optimizer 1.1.0 on the same maschine.

The encoded skript needs 30 % more time to execute!
Is that ok?
-- 
B Tenhumberg
 
(live long and prosper...)



RE: [PHP] [php]using sendmail with php

2001-06-19 Thread Ray Hilton

I assume you could do it like in perl:

Open(MAIL, |/usr/lib/sendmail);
Print MAIL OUTPUT;
To: ray [EMAIL PROTECTED]
From: someone [EMAIL PROTECTED]
Subject: blah blah

Note the line break before the body, blah blah blah
OUTPUT
Close(MAIL)

I have no idea how you would do this in php, but I hope its at least
points you in the right direction...  Im not sure if php allows you to
open a pipe to another program.

Ray Hilton
-
[EMAIL PROTECTED]
http://rayh.co.uk

-Original Message-
From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]]
Sent: 19 June 2001 06:04
To: PHP General List (E-mail)
Subject: [PHP] [php]using sendmail with php


hey-
i noticed a recent post about the weird email that someone was getting
from a script that emails form data. I was curious on whether or not I
could use sendmail with php, to possibly get around this problem(I've
run into it myself). How might i do this?...

chris






Re: [PHP] input type=image name=done value=done doesnt work as expected

2001-06-19 Thread Chris Lee

ok. to anser my own questions. oi. type=image name=done then the var will
not be $done but $done_x and $done_y

--

  Chris Lee
  [EMAIL PROTECTED]



Chris Lee [EMAIL PROTECTED] wrote in message
9ehgvu$s2b$[EMAIL PROTECTED]">news:9ehgvu$s2b$[EMAIL PROTECTED]...
 ?php
  echo 
  $done1br
  $done2br

 form action='$PHP_SELF' method='post'
 input type='submit' name='done1' value='done1'
 input type='image' src='image/done.gif' name='done2' value='done2'
 /form
  ;
 ?

 ok, type='submit' works like it should, the headers

 Packet ID (from_IP.port-to_IP.port): 208.181.210.98.3830-209.52.174.206.80
  E . . . . . @ . . . ' . . . . b . 4 . . . . . P G . z . F . . k P . C P I
%
  . . P O S T   / t e s t 2 . p h p   H T T P / 1 . 1 . . U s e r - A g e n
t
  :   M o z i l l a / 4 . 0   ( c o m p a t i b l e ;   M S I E   5 . 0 ;
W
  i n d o w s   2 0 0 0 )   O p e r a   5 . 1 1 [ e n ] . . H o s t :
m
  e d i a w a v e o n l i n e . c o m . . A c c e p t :   t e x t / h t m l
,
i m a g e / p n g ,   i m a g e / j p e g ,   i m a g e / g i f ,   i m
a
  g e / x - x b i t m a p ,   * / * . . A c c e p t - L a n g u a g e :   e
n
  . . A c c e p t - E n c o d i n g :   d e f l a t e ,   g z i p ,   x - g
z
  i p ,   i d e n t i t y ,   * ; q = 0 . . R e f e r e r :   h t t p : / /
m
  e d i a w a v e o n l i n e . c o m / t e s t 2 . p h p . . C o n n e c t
i
  o n :   K e e p - A l i v e ,   T E . . T E :   d e f l a t e ,   g z i p
,
c h u n k e d ,   i d e n t i t y ,   t r a i l e r s . . C o n t e n
t -
  t y p e :   a p p l i c a t i o n / x - w w w - f o r m - u r l e n c o d
e
  d . . C o n t e n t - l e n g t h :   1 8 . . . . d o n e 1 = d o n e d o
n
  e d o n e

 are sent correct. and the var $done1 is set with the correct value.

 but type='image' does not work, the headers are correct though

 Packet ID (from_IP.port-to_IP.port): 208.181.210.98.3831-209.52.174.206.80
  E . . . . . @ . . . ' . . . . b . 4 . . . . . P G . . P G } . . P . C P 9
.
  . . P O S T   / t e s t 2 . p h p   H T T P / 1 . 1 . . U s e r - A g e n
t
  :   M o z i l l a / 4 . 0   ( c o m p a t i b l e ;   M S I E   5 . 0 ;
W
  i n d o w s   2 0 0 0 )   O p e r a   5 . 1 1 [ e n ] . . H o s t :
m
  e d i a w a v e o n l i n e . c o m . . A c c e p t :   t e x t / h t m l
,
i m a g e / p n g ,   i m a g e / j p e g ,   i m a g e / g i f ,   i m
a
  g e / x - x b i t m a p ,   * / * . . A c c e p t - L a n g u a g e :   e
n
  . . A c c e p t - E n c o d i n g :   d e f l a t e ,   g z i p ,   x - g
z
  i p ,   i d e n t i t y ,   * ; q = 0 . . R e f e r e r :   h t t p : / /
m
  e d i a w a v e o n l i n e . c o m / t e s t 2 . p h p . . C o n n e c t
i
  o n :   K e e p - A l i v e ,   T E . . T E :   d e f l a t e ,   g z i p
,
c h u n k e d ,   i d e n t i t y ,   t r a i l e r s . . C o n t e n
t -
  t y p e :   a p p l i c a t i o n / x - w w w - f o r m - u r l e n c o d
e
  d . . C o n t e n t - l e n g t h :   2 1 . . . . d o n e 2 . x = 3 9  d
o
  n e 2 . y = 1 7

 but the var $done2 is not set. any ideas ? this a php bug? I cant see it
 being a browser error or a apache error, the headers are all right.

 --

   Chris Lee
   [EMAIL PROTECTED]





 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]






Re: [PHP] Passing Array through URL

2001-06-19 Thread Christian Reiniger

On Tuesday 19 June 2001 07:51, Reuben D Budiardja wrote:
 Hello,
 I have one-dimensional array with a very a lot elements (say, about
 300). What is the best way to pass it through URL? do I use something
 like implode the whole thing and then pass it, or do I use something
 like serialize, or any other way?

* Write it to the database (using serialize())
* Pass the record ID via URL
* Read from the DB in the receiving script

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

void sleep(){for(long int sheep=0;!asleep();sheep++);}



[PHP] apache and php ate up all my memory :-[

2001-06-19 Thread Sebastian Stadtlich

Hi all

Probably some Apache/mysql/php-Admin gurus can give me a hint :
i just moved a website to it's own server ( my first one).
now apache had eaten up all physical and virtual memory
some httpd had allocated 45MB of RAM, memory ran out myqsl crashed...

php is compiled in to apache 
Apache/1.3.19 (Unix) PHP/4.0.4pl1 
these are the relevant entries is my  httpd.conf
Timeout 300
KeepAlive On
MaxKeepAliveRequests 500
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 20
StartServers 20
MaxClients 150
MaxRequestsPerChild 500

in the php.ini

memory_limit = 8M 
( but i think that has nothing to do with it)

i can't find anything in the logfiles exept that some httpd were already
killed by itself, because
there was no memory left that they could eat
needless to say that my site does NOT get that much traffic that the
server was at the edge
of it's capacity.
HELP...

Sebastian 



Re: [PHP] Re: Lists are back up

2001-06-19 Thread Alexander Skwar

So sprach Wico de Leeuw am Tue, Jun 19, 2001 at 01:09:49PM +0200:
 I don't know which ancient version you are using but version 5+ can filter 
 on cc:

Don't know about Eudora, but filters in webmailers (like gmx.de) cannot
filter on CC, nor can Lotus Notes 4.x filter reliably on CC.  Those are both
products I use regularly.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 23 hours 18 minutes



[PHP] simple messageboard released!

2001-06-19 Thread sunny AT wde

hi all!

firstly a BIG thanks to rasmus for bringing the mailing lists back up
:)

secondly, seeing as there is always a big demand here and lot of
questions asked about available PHP message boards / forums, I
thought I'd point mine out.

Wrote this one myself, very simple to configure and install. And it
works quite well as a messageboard too :

Uses Mysql, and is free! 

http://www.wde.org/me/php/

/sunny


Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie



[PHP] auto index in Apache

2001-06-19 Thread Zhu George-CZZ010


  Please excuse me to post this Apache related question here, but I think most of you 
might be very familiar with Apache web sever and I couldn't find a Apache forum.

  In Apache, The index of a directory can come from one of two sources: 
   1. A file written by the user, typically called index.html. 

   2. A listing generated by the server. The other directives control the format of 
this listing. 

  My question is: if I am using the second method (i.e. using the listing generated by 
the server), how can I increase the maximum length of the displaying names for the 
files?  We have some files with long names, and the displaying names (not the URL) 
will get truncated if we use the second method.  So, is there a way to increase the 
length for the displaying names?

   Thank you very much in advance.

George



[PHP] php and flash 5 books?

2001-06-19 Thread Jay Paulson

Anyone know of any good books that actually deal with php interfacing with
flash 5?  I've found one book but just curious if there are others out
there...

thanks,
jay




Re: [PHP] Pie Charts Bar Charts Line Charts...

2001-06-19 Thread Andrew Halliday

For basic bars, use tables with divs whose width is set to a percentage of
the table cell size using the style attribute eg:
table
tr
tdnumber of unemployed/td
tddiv style=background-color: red; width:4.7%/div/td
/tr
/table

For XY scatters, PHPs dynamic graphic producing capabilities are excellent.
See attached image for what ive done with it (plotting handwriting based on
xy points taken from a writing tablet in a database).

For pies anything 3d, forget anything easy like this.  Youre looking at
professional graphing plugins probably.

AndrewH

- Original Message -
From: Karl J. Stubsjoen [EMAIL PROTECTED]
To: PHP Mailing List [EMAIL PROTECTED]
Sent: Wednesday, June 13, 2001 1:15 AM
Subject: [PHP] Pie Charts  Bar Charts  Line Charts...


 Hey Guys,

 Anyone have any good starting points for delivering charts on the web?

 Thanks a bunch.


 Karl J. Stubsjoen
 www.iexcelinlife.com
 [EMAIL PROTECTED]
 Phone:  602.447

attachment: Image2.jpg

RE: [PHP] HTTP_POST_VARS not picking up checkboxes that are unche cked

2001-06-19 Thread Merio, Quinn


This is how i get around it.

On the form page:

input type=checkbox name=SUBSCRIBE value=YES checked


On the submission page:

if (empty($SUBSCRIBE)) { 
$SUBSCRIBE = NO;
}

hth,
quinn merio
www.vr2a.com




-Original Message-
From: John Monfort [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 19, 2001 6:20 AM
To: Jason Murray
Cc: 'Tom Beidler'; [EMAIL PROTECTED]
Subject: RE: [PHP] HTTP_POST_VARS not picking up checkboxes that are
unche cked




   I had some issues with that recently. It turns out that PHP will not
   pick up the checkboxes, unless you use the GET method.

   You can then access your vars with HTTP_GET_VARS.

   This was discovered on
WIN98+ PHP 4.03pl1 + Apache 1.3++
 
WIN ME + PHP 4.03pl1 + Apache 1.3++

   If someone had a different experience, then I would like to hear about
   it. Please share.

__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
The world is waiting, are you ready?
-+___+-

On Tue, 19 Jun 2001, Jason Murray wrote:

  Subject: [PHP] HTTP_POST_VARS not picking up checkboxes that are
unchecked

 That's right - if the checkbox isn't checked the browser doesn't send it.

 Jason




[PHP] unsubscribe php-general

2001-06-19 Thread Michael Roark

unsubscribe php-general




Re: [PHP] simulate form submission

2001-06-19 Thread Gyozo Papp

Hello,

an article was posted to Zend a few weeks ago its title was:

Mimic form submissions in PHP by John Coggeshall

Learn how you can use PHP to simulate GET and POST form submissions from
within your PHP scripts.

and the URL:
http://www.zend.com/zend/spotlight/mimocsumissions.php 

hope this helps.

Papp Gyozo 
- [EMAIL PROTECTED]

- Original Message - 
From: Pascal Polleunus [EMAIL PROTECTED]
To: _PHP [EMAIL PROTECTED]
Sent: 2001. június 19. 10:35
Subject: [PHP] simulate form submission


 Hi,
 
 Does someone know how to simulate a form submission?
 I guess I need to do something like
 header(Location: http://www.mysite.com;);
 header($PostVarsData);
 where $PostVarsData must contains the header informations to send the post vars
 
 but what are these header informations?
 how can I handle that?
 
 Thanks,
 Pascal
 





Re: [PHP] Re: Lists are back up

2001-06-19 Thread Wico de Leeuw

At 22:43 18-6-2001 -0500, David VanHorn wrote:
At 12:01 AM 6/19/01 +0200, Alexander Skwar wrote:
So sprach Clayton Dukes am Mon, Jun 18, 2001 at 05:38:26PM -0400:
  Why not just set your filter to look for [EMAIL PROTECTED] in 
 the to
  or cc line?

Because not all filters support that, and it makes reading mails eg. via
webmail interfaces easier?

Eudora can't filter on CC lines.
I've dropped one subscription to another group because the members 
insisted on sending emails to each other individually, and CCing the group.


I don't know which ancient version you are using but version 5+ can filter 
on cc:

Greetz,

Wico

--
Dave's Engineering Page: http://www.dvanhorn.org

I would have a link to http://www.findu.com/cgi-bin/find.cgi?KC6ETE-9 here 
in my signature line, but due to the inability of sysadmins at TELOCITY to 
differentiate a signature line from the text of an email, I am forbidden 
to have it.






Re: [PHP] Starting session

2001-06-19 Thread Julie Tsai

Hi Rosen,

Put your

session_start();
session_unregister(var1, var2);

functions at the beginning of your login page, but then destroy the session if login 
is false and on logout.

session_unregister($var1);
session_unregister($var2);
session_destroy();

Finally, on subsequent pages that the user can access after login, put the 
session_start(); function at the top.

hth,
Julie

Quoting Rosen ([EMAIL PROTECTED]):

 Hi,
 I'm creating a WEB portal  with PHP.
 I want to give possibility the users to register on my site and to use some
 features on it.
 I want to use sessions and to start session only if user login.
 How can I understand ot my other pages on site, thath the user has logged in
 my site.
 i.e. to startsession only if user has logged in ?
 
 Thanks,
 Rosen Marinov
 
 
 
 
 



Re: [PHP] PHP Interact with DreamWaver

2001-06-19 Thread rm

I used to use DW 3.x and it would mangle the php code.
 I tried a demo version of DW 4.0 and it makes
allowances for php code.  To my knowledge there is no
way to fix DW 3.x to properly work with php code. I've
since changed to Homesite, after you get the hang ot
it, it's better than dreamweaver.  I understand there
are some extensions at DW home page for php...but I'm
not 100% sure, also supposedly some docs about using
php and DW 4.0...again I'm not 100% sure.

KB

--- Jack [EMAIL PROTECTED] wrote:
 Dear All
 I'm fresh on the php, but i just want to ask what
 should i do to let my


__
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/



Re: [PHP] WebMail client

2001-06-19 Thread Andreas D. Landmark

At 19.06.2001 14:56, you wrote:
Try squirremail at http://www.squirrelmail.org


Rosen [EMAIL PROTECTED] wrote in message
9gnf7f$dsk$[EMAIL PROTECTED]">news:9gnf7f$dsk$[EMAIL PROTECTED]...
  Hi,
  I want to find some Web Mail script in PHP with possibilities to
  create mail accounts directly on Linux Mail server.
 
  Thanks
  Rosen Marinov
 

Doesn't really do what he wants to, as he wants to _create_ accounts,
sounds like you're looking at a script specific for the server software you
are running...

And that is way-OT for this list, check with the .com or .org of your 
mailserver.




-- 
Andreas D Landmark / noXtension
Real Time, adj.:
 Here and now, as opposed to fake time, which only occurs there
and then.




Re: [PHP] Starting session

2001-06-19 Thread Chris Lee

why do you want todo it this way ? to tell if a user is logged in I assign a
valid people_id (session_var) if the var has a valid id, then they are
logged in, else they are not.

--

  Chris Lee
  [EMAIL PROTECTED]



Rosen [EMAIL PROTECTED] wrote in message
9gnhvd$8qh$[EMAIL PROTECTED]">news:9gnhvd$8qh$[EMAIL PROTECTED]...
 Hi,
 I'm creating a WEB portal  with PHP.
 I want to give possibility the users to register on my site and to use
some
 features on it.
 I want to use sessions and to start session only if user login.
 How can I understand ot my other pages on site, thath the user has logged
in
 my site.
 i.e. to startsession only if user has logged in ?

 Thanks,
 Rosen Marinov






RE: [PHP] HELP problems running PHP4 script in CRON

2001-06-19 Thread scott [gts]

try using full paths to your files.


 -Original Message-
 From: Splashy [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 19, 2001 9:29 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] HELP problems running PHP4 script in CRON
 
 
 Hi,
 
 Please find script below and hopefully tell me why when I run it over the
 web it works perfectly but when I run it using cron or in a telnet session
 it errors saying no such file or directory.
 
 THIS IS THE ERROR
 /*
 ./fetch_news.php: ?: No such file or directory
 ./fetch_news.php: syntax error near unexpected token
 `fetchnews($mysourcefile,$m
 youtputfile,$myflashvar)'
 */
 
 THIS IS THE SCRIPT
 ?
 #Requires 3 Params
 #$mysourcefile = path to content source html file
 #$myoutputfile = path to content output html file
 #$myflashvar  = Flash variable you wish to assign the content to eg:mynews,
 mytechnology
 
 function fetchnews($mysourcefile,$myoutputfile,$myflashvar)
 {
  $mysource=fopen($mysourcefile,r) or die (Couldn't open the Source
 file);
  $myoutput=fopen($myoutputfile,w) or die (Couldn't open the Output
 file);;
  fwrite($myoutput,$myflashvar);
  while (!feof($mysource))
   {
$myline=fgets($mysource, 1024);
$stripquotes=eregi_replace(#039,`,$myline);
$stripcolors=eregi_replace(COLOR=\#.*\,,$myline);
if (eregi('^a.*\/abr',$stripcolors))
 
 {
  $newanchor=eregi_replace(br,,$stripcolors);
  fwrite($myoutput,$newanchorbr);
 }
   }
  fclose($myoutput);
  fclose($mysource);
 }
 ?
 ?
 fetchnews(http://www.moreover.com/cgi-local/page?c=Graphics%20industry%20ne
 wso=html,graphicsnews.php,mynews=);
 ?
 
 All help and advise is as always gratefully received!
 Splashy.
 
 



[PHP] validate phone numbers

2001-06-19 Thread Richard Kurth

I am using this script to validate for phone numbers and it work just
perfect for US phone numbers. But it rejects some European and
Australian numbers what do I need to do to make it validate all phone
numbers

if (($WPHONE_NO) || ($wphone_no)) {
   $wphone_no = trim($wphone_no);
   if ($WPHONE_NO)
  $phone_no = trim($WPHONE_NO);
   if (!ereg((^(.*)[0-9]{3})(.*)([0-9]{3})(.*)([0-9]{4}$), $wphone_no)) {
  print_error(your bphone number/b is invalid);
   }
}











Best regards,
 Richard  
mailto:[EMAIL PROTECTED]




RE: [PHP] php bug reporting

2001-06-19 Thread scott [gts]

akhil, do you have a database server installed ?

 -Original Message-
 From: Andreas D. Landmark [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 19, 2001 1:18 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] php bug reporting
 
 
 At 19.06.2001 05:29, you wrote:
 Dear Sir
   i am getting a bug in php where by i can't pass the values of the data
 entered by the user into the database
   pls help
   --akhil
 
 Show us your code, as more than 9 out of 10 times the error is in chair-screen
 section aka. operator/user and not in the source for php itself.
 
 
 -- 
 Andreas D Landmark / noXtension
 Real Time, adj.:
  Here and now, as opposed to fake time, which only occurs there
 and then.
 



Re: [PHP] .htaccess and secure image directory

2001-06-19 Thread Hugh Bothwell

(shrug) disable directory browsing.  That should prabably be your default
anyway.

bill [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 If I upload images to a web directory using PHP, how can I prevent a web
 browser from getting a file list of the directory while still allowing
 it to be polled for specific images?






Re: [PHP] image code

2001-06-19 Thread Hugh Bothwell

Seems pretty straightforward, actually; I would write a script that takes as
parameters the name and desired size of a graphic, resizes it, and returns
the thumbnail ( look at ImageJPEG() ).  Then I would write a script that
iterates through the files in the directory and, for each, gets a thumbnail.

The only problem is that this is a fair bit of work; if it's called at all
frequently, you might be better to create a static version.  But that of
course does away with the 'self-updating' bit.

A possible fix would be to write master page:
check how long since the page has been updated; if necessary, create and
save an updated version of the imagelist.  Then forward the user to the
saved static version.  This would let you have the page update itself on a
delayed basis, ie hourly.

David L. Walgamotte Jr. [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...

 Can anyone send me sample code or point me in the right direction.  I'm
 looking for a php script that will index and thumbnail a directory of
images.
 So when I drop an image in this directory the web page will update
automaticly.






Re: [PHP] Multipe Tables, Single Query Problem

2001-06-19 Thread Hugh Bothwell

SELECT video.id, video.title, video.description, actor.name
FROM ( video INNER JOIN link ON link.videoID = video.id )
  JOIN actor ON actor.id = link.actorID
WHERE video.title LIKE $searchstr

What you'll get is one query returning a bunch of rows, one for each actor.
Then concatenate the actors using PHP for your final output.

if ($res = mysql_query( $dbase, $query )) {

$id = 0;
$title = ;
$description = ;
$actors = ;

while ($row = mysql_fetch_array($res)) {
if ($id == 0) {// first result
$id = $row[id];
$title = $row[title];
$description = $row[description];
}
else {// consecutive results
$actors .= , ;
}

$actors .= $row[name];
}

echo Movie: $title [$description]  Starring: $actors.;
}
else {
// query failed... what now, Einstein?
}



Simon Kimber [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi all,

 I have three tables in my (mysql) database:

 videos - ID, title, description, etc..
 links - ID, videoID, actorID
 actors - ID, name, dateofbirth, gender, etc...

 what i need to do is return a particular video and all it's staring actors
 with just one query returning just one row, ie. with all the actor names
in
 one field... is this possible? or do i have to get the video data first
and
 then the actors separately?






RE: [PHP] apache and php ate up all my memory :-[

2001-06-19 Thread scott [gts]

it could be a bunch of different reasons, ranging
from software to hardware/OS errors

how much total memory is in the machine??


 -Original Message-
 From: Sebastian Stadtlich [mailto:[EMAIL PROTECTED]]
 Subject: [PHP] apache and php ate up all my memory :-[
 
 Hi all
 
 Probably some Apache/mysql/php-Admin gurus can give me a hint :
 i just moved a website to it's own server ( my first one).
 now apache had eaten up all physical and virtual memory
 some httpd had allocated 45MB of RAM, memory ran out myqsl crashed...
 
 php is compiled in to apache 
 Apache/1.3.19 (Unix) PHP/4.0.4pl1 
 these are the relevant entries is my  httpd.conf
 Timeout 300
 KeepAlive On
 MaxKeepAliveRequests 500
 KeepAliveTimeout 15
 MinSpareServers 5
 MaxSpareServers 20
 StartServers 20
 MaxClients 150
 MaxRequestsPerChild 500
 
 in the php.ini
 
 memory_limit = 8M 
 ( but i think that has nothing to do with it)
 
 i can't find anything in the logfiles exept that some httpd were already
 killed by itself, because
 there was no memory left that they could eat
 needless to say that my site does NOT get that much traffic that the
 server was at the edge
 of it's capacity.
 HELP...
 
 Sebastian 
 



Re: [PHP] Shortest route between 2 cities

2001-06-19 Thread Dave Mariner

This is quite a well-researched AI problem...normally discussed in relation
to the travelling salesman problem. (the complexity of the search increasing
exponentially (I think) with the number of interconnected nodes), as most
strategy games need to address this problem. Probably the most commonly used
solution is the A* algorithm. If you are interested, have a look at the
pathfinding section at www.gameai.com - there you will find links to a
number of implementations; sadly none in php. I would port one of them, but
sadly don't have the time (sorry!).

On another note, can anyone tell me how to read command line parameters
passed to a script (I'm running 4.0.6 under NT)?

Cheers,

Dave Mariner.


[EMAIL PROTECTED]
www.medlab-group.com




- Original Message -
From: Vahan Yerkanian [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 19, 2001 7:44 AM
Subject: [PHP] Shortest route between 2 cities


 Greetings All!

 I'm looking for a code which will find the shortest route between 2
cities, with
 data being stored in SQL tables listed below. Anyone has coded such a task
ever?
 The most know algorithm for this is called Dijkstra's algoritm.

 Is there anyone with math skills enough to code this? This will be sure a
big
 asset for our PHP community as any site dealing with some
shippment/ticket/route
 problems will require such code.

 I'm including the structure of tables used.

 CREATE TABLE Cities (
   cityID int(4) unsigned NOT NULL auto_increment,
   cityName varchar(20) NOT NULL,
   PRIMARY KEY (cityID),
   UNIQUE cityID (cityID, cityName)
 );

 INSERT INTO Cities VALUES ( '1', 'A');
 INSERT INTO Cities VALUES ( '2', 'B');
 INSERT INTO Cities VALUES ( '3', 'C');
 INSERT INTO Cities VALUES ( '4', 'D');
 INSERT INTO Cities VALUES ( '5', 'E');
 INSERT INTO Cities VALUES ( '6', 'F');
 INSERT INTO Cities VALUES ( '7', 'G');
 INSERT INTO Cities VALUES ( '8', 'H');
 INSERT INTO Cities VALUES ( '9', 'I');

 CREATE TABLE CityMatrix (
   matrixID int(4) unsigned NOT NULL auto_increment,
   SourceCityID int(4) unsigned DEFAULT '0' NOT NULL,
   DestinationCityID int(4) unsigned DEFAULT '0' NOT NULL,
   Distance int(5) unsigned DEFAULT '0' NOT NULL,
   Fare int(4) unsigned DEFAULT '0' NOT NULL,
   PRIMARY KEY (matrixID),
   UNIQUE matrixID (matrixID)
 );

 # Dumping data for table 'CityMatrix'
 INSERT INTO CityMatrix VALUES ( '1', '1', '4', '5', '10');
 INSERT INTO CityMatrix VALUES ( '2', '3', '4', '50', '5');
 INSERT INTO CityMatrix VALUES ( '4', '5', '7', '85', '8');
 INSERT INTO CityMatrix VALUES ( '5', '1', '3', '70', '4');
 INSERT INTO CityMatrix VALUES ( '6', '9', '6', '39', '6');
 INSERT INTO CityMatrix VALUES ( '7', '8', '4', '10', '1');


 --
 Vahan Yerkanian
[EMAIL PROTECTED]
 Vice President, Design  Development  Website @
http://www.abideweb.com/
 AbideWeb Technologies, LLC  Phone +3741 238650 | Mobile +3749
416358





[PHP] HELP problems running PHP4 script in CRON

2001-06-19 Thread Splashy

Hi,

Please find script below and hopefully tell me why when I run it over the
web it works perfectly but when I run it using cron or in a telnet session
it errors saying no such file or directory.

THIS IS THE ERROR
/*
./fetch_news.php: ?: No such file or directory
./fetch_news.php: syntax error near unexpected token
`fetchnews($mysourcefile,$m
youtputfile,$myflashvar)'
*/

THIS IS THE SCRIPT
?
#Requires 3 Params
#$mysourcefile = path to content source html file
#$myoutputfile = path to content output html file
#$myflashvar  = Flash variable you wish to assign the content to eg:mynews,
mytechnology

function fetchnews($mysourcefile,$myoutputfile,$myflashvar)
{
 $mysource=fopen($mysourcefile,r) or die (Couldn't open the Source
file);
 $myoutput=fopen($myoutputfile,w) or die (Couldn't open the Output
file);;
 fwrite($myoutput,$myflashvar);
 while (!feof($mysource))
  {
   $myline=fgets($mysource, 1024);
   $stripquotes=eregi_replace(#039,`,$myline);
   $stripcolors=eregi_replace(COLOR=\#.*\,,$myline);
   if (eregi('^a.*\/abr',$stripcolors))

{
 $newanchor=eregi_replace(br,,$stripcolors);
 fwrite($myoutput,$newanchorbr);
}
  }
 fclose($myoutput);
 fclose($mysource);
}
?
?
fetchnews(http://www.moreover.com/cgi-local/page?c=Graphics%20industry%20ne
wso=html,graphicsnews.php,mynews=);
?

All help and advise is as always gratefully received!
Splashy.





[PHP] exec, backticks Co.

2001-06-19 Thread Matthieu Paindavoine

Hello,

I have a problem with a php script which contains an exec (same problem
with backticks and similar operators).
Some programs are simply not executed.
For example, having a simple 'hello world' program in c++ will work
fine, but having a program that writes 'hello world' to a file won't
work.

My question is What are the requirements a binary much match to be
correctly executed?
I assume there are some stuff about 
- permissions...

- location in the directory tree...

- ??...

I don't know where to find this information, so if anyone has
suggestions or pointers, I would really appreciate. Thank you.

Cheers, 

Matt



Re: [PHP] Templates??

2001-06-19 Thread py

FYI, at the last ThunderLizard web design conference, a presenter speaking
about content management tools said that most sites only need 6 or so
templates ... that there are usually only 6 categories of pages.

Salut,
do you know where we could get more info about that conference? What are his
6 categories of pages?
I am focusing on Templating my sites now and I am interested in what was
said there.
py



- Original Message -
From: Les Neste [EMAIL PROTECTED]
To: Daniel Guerrier [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, June 19, 2001 6:29 AM
Subject: Re: [PHP] Templates??


 The template defines the look and feel for a class of pages.  The
advantage
 is in allowing you to change one file -- the template file -- and have
your
 changes be reflected in all the individual pages that use the template
 WITHOUT having to individually edit all of those pages.

 For smaller sites, this may not be a big deal, but, for sites with
 thousands of pages, you clearly want to avoid hand-edits if at all
possible.

 I'm personally reworking my online portfolio, and I'm now using templates
 so I can present a different look and feel to suit different potential
 clients.

 FYI, at the last ThunderLizard web design conference, a presenter speaking
 about content management tools said that most sites only need 6 or so
 templates ... that there are usually only 6 categories of pages.



 At 05:48 PM 6/18/2001 -0700, Daniel Guerrier wrote:
 What the true advantage of using templates and where
 can I get info on using them?
 
 __
 Do You Yahoo!?
 Spot the hottest trends in music, movies, and more.
 http://buzz.yahoo.com/
 



 Les Neste  678-778-0382  http://www.lesneste.com




RE: [PHP] Multipe Tables, Single Query Problem

2001-06-19 Thread Simon Kimber


Christopher Wrote...
 You need to be able to tie at least one field from each table to
 one other
 field in another table, and then you can have a query like:

 SELECT videos.*, links.*, actors.*
 FROM videos, links, actors
 WHERE videos.VideoID = '$VideoID' AND
 links.VideoID = videos.VideoID
 actors.ActorID = links.ActorID


Thanks Christopher,

but wouldn't this return a separate row for each actor?  I'm pretty sure i
need something more than a simple join :o(

Here's my original question again: what i need to do is return a particular
video and all it's staring actors with just one query returning just one
row, ie. with all the actor names in one field



Ray Wrote...
 Something like:

 SELECT name, title, description from videos, actors, links where
 actors.ID = links.ID and videos.ID=videoID, and videos.ID = 20; ?

 But in just want one row?  You could return all the names in one row (I
 think) using MySQL (I assume?) string functions...  I have a funny
 feeling you need a sub select, which mysql doesn’t support...


Ray,  I have a funny feeling you could be right :o(

Cheers

Simon Kimber
Funny.co.uk - The Comedy Portal
http://www.funny.co.uk/

Now Incorporating: The UK Live Comedy Directory
FREE promotion for UK Comedy Acts and Venues
http://www.funny.co.uk/uklive/

eml. [EMAIL PROTECTED]
icq. 16156911





[PHP] Spread Extension for PHP

2001-06-19 Thread George Schlossnagle



For those interested, I have a beta-quality wrapper 
extension for the Spread (http://www.spread.org/) group communication 
toolkit. This is designed to complement existing extensions for perl, 
javaand ruby. Sources available at http://www.omniti.com/~george/php_spread/php_spread-0.1.tar.gzCurrently 
compiles and runs on Linux, should compile and trun fine on BSD with no 
problems.

George

--George Schlossnagle1024D/1100A5A0 
1370 F70A 9365 96C9 2F5E 56C2 B2B9 262F 1100 
A5A0


[PHP] connecting to a particular newsgroup (usenet)

2001-06-19 Thread Steph

Hi everyone! I'm trying to create a script to download posts into a mySQL db
from a particular newsgroup with certain keywords. I'm reading an article on
sockets at phpbuilder.com which has been a useful start. Can any of you
recommend any other articles that may assist me with my project. This is my
first exposure to sockets so anything could be beneficial.

Thanks, Steph





Re: [PHP] simulate form submission

2001-06-19 Thread Meir kriheli

On Tuesday 19 June 2001 11:35, Pascal Polleunus wrote:
 Hi,

 Does someone know how to simulate a form submission?
 I guess I need to do something like
   header(Location: http://www.mysite.com;);
   header($PostVarsData);
 where $PostVarsData must contains the header informations to send the post
 vars

 but what are these header informations?
 how can I handle that?

 Thanks,
 Pascal

You can use the http class from Manuel Lemos, see:

http://phpclasses.upperdesign.com/browse.html/package/3

-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd



Re: [PHP] upload on Win9x

2001-06-19 Thread Christian Dechery

yes... it goes like form enctype=multipart/form-data method=post.

this is correct right?

At 17:17 19/6/2001 +0930, Andrew Halliday wrote:
Have you set the content type of the form to be multipart MIME ?  That
screws me every time...

AndrewH

- Original Message -
From: Christian Dechery [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 19, 2001 11:16 AM
Subject: [PHP] upload on Win9x


  I can't get file uploads to work on my Windows 98Me running
Apache+PHP4.05...
 
  I did everything correctly according to the script I found on
phpbuilder...
 
  it simply won't go... the error message is something like can't open
  c:\file.ext for reading... it's like it thinks it's a local file... this
  is the code...
  pre
  $upload_dir=c:\\apache\\htdocs\\mydir\\;
  $upload_tmp_path=ini_get(upload_tmp_dir); // this returns the correct
  path BTW
 
  $file=stripslashes($file);
  $newfile=$upload_dir.file.tmp; // just for debugging, but it still
  doesn't work...
 
  chdir($upload_tmp_path);
  if(!copy($file,$newfile))
  echo pfont face=tahoma size=2bError uploading
  $newfile./b/font/p;
  else
  process_file($newfile);
  /pre
  
  . Christian Dechery (lemming)
  . http://www.tanamesa.com.br
  . Gaita-L Owner / Web Developer
 


. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer




RE: [PHP] image code

2001-06-19 Thread Sitkei Pl

http://dougiamas.com/photoframe

-Original Message-
From: David L. Walgamotte Jr. [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 18, 2001 9:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] image code



Can anyone send me sample code or point me in the right direction.  I'm
looking for a php script that will index and thumbnail a directory of
images.
So when I drop an image in this directory the web page will update
automaticly.

--
Thanks,
David




[PHP] Store PHP Code in MySQL?

2001-06-19 Thread Joseph Koenig

I've been playing a little bit trying to store some PHP code in MySQL
and get it to execute. However, it behaves just like expected in that it
just displays the code, and doesn't execute it. Essentially, i want to
do this:

?
while($data = mysql_fetch_array($result)) {
echo $data[text];
}
?

With $data[text] containing:
?
echo $var;
?

Anybody know a way to actually make this work? Thanks,

Joe



Re: [PHP] auto index in Apache

2001-06-19 Thread DAve Goodrich

on 6/19/01 9:03 AM, Zhu George-CZZ010 at [EMAIL PROTECTED] wrote:

 
 Please excuse me to post this Apache related question here, but I think most
 of you might be very familiar with Apache web sever and I couldn't find a
 Apache forum.
 
 In Apache, The index of a directory can come from one of two sources:
 1. A file written by the user, typically called index.html.
 
 2. A listing generated by the server. The other directives control the format
 of this listing. 
 
 My question is: if I am using the second method (i.e. using the listing
 generated by the server), how can I increase the maximum length of the
 displaying names for the files?  We have some files with long names, and the
 displaying names (not the URL) will get truncated if we use the second method.
 So, is there a way to increase the length for the displaying names?
 
 Thank you very much in advance.
 
 George
 

IfModule mod_autoindex.c

IndexOptions NameWidth=30

/IfModule 

That works, just tried it and got 30 characters. Provided you have
autoIndexing turned on.

DAve 
--
Dave Goodrich
Director of Interface Development
Reality Based Learning Company
9521 NE Willows Road, Suite 100
Redmond, WA 98052 
Toll Free 1-877-869-6603 ext. 237
Fax (425) 558-5655 
[EMAIL PROTECTED] 
http://www.rblc.com





[PHP] Reminder: International PHP Conference 2001, Europe

2001-06-19 Thread Björn Schotte

Dear PHP enthusiasts,

I just wanted to remind you about one of the faboulous events
this year (besides ApacheCon, O'Reilly OnLamp, German LinuxTag
etc.): the International PHP Conference 2001, 11/05-11/07/2001
at Frankfurt/Main, Germany.

Our website went online just a few days ago, for English
speaking people it is accessible via

   http://www.php-kongress.de/2001/index_en.php

French speaking people please use

   http://www.php-kongress.de/2001/index_fr.php

and German speaking people use

   http://www.php-kongress.de/2001/

Translations to Spanish and Danish will come soon in a few
days.

Are you doing a PHP project, big or not so big, in your company
or private? Did you made long term researches on special subjects?
Made an online game with PHP? Or something else? Evangelizing people
with PEAR? :) Then come and give sessions about it:

   http://www.php-kongress.de/2001/cfp.php   (German)
   http://www.php-kongress.de/2001/cfp_en.php(English)
   http://www.php-kongress.de/2001/cfp_fr.php(French)

Remember, when giving two sessions, travel expenses and lodging
costs will be covered by us. If you want to give only one session,
please drop a note inside your abstract, we'll then see what we
can do for you with covering the costs by us.

And, another note: if you don't want to give a session but you
want to subscribe for attending the conference, please be patient
for a few weeks: after we've chosen the program, it will be possible
to subscribe.

Hope to see you soon on the conference,
  Björn Schotte.
-- 
PHP Schulungen und | International PHP Conference
Schulungsmaterial: | 05. - 07.11.2001
   |  Astron Hotel, Frankfurt
http://thinkphp.de/|  http://www.php-kongress.de/



[PHP] Printing Webpages--bypassing dialog box

2001-06-19 Thread John Monfort


 Hello All,

 It's good to have this list up again. Thank you, to all involved.

 Question:

  Printing a webpage (from the browser) and bypassing the print dialog
box.

I have a portable survey (laptop) that let's the user print the
results...via with windows.print(). By default, when a print request
is sent, Windows will present the Print Dialog Box. I want to
bypassing that and go straight to the printer. That is, when the user
click on 'print', (s)he should not see the dialog box. Instead, the
document should be sent directly to printer.

Has anyone done something similar? Can someone point me in the right
direction? I'm currently looking at using socket connections to
connect directly to the printer. However, I'm not fluent in sockets,
so I can use some guidance.






__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
The world is waiting, are you ready?
-+___+-

On Tue, 19 Jun 2001, [iso-8859-1] sunny AT wde wrote:

 hi all!

 firstly a BIG thanks to rasmus for bringing the mailing lists back up
 :)

 secondly, seeing as there is always a big demand here and lot of
 questions asked about available PHP message boards / forums, I
 thought I'd point mine out.

 Wrote this one myself, very simple to configure and install. And it
 works quite well as a messageboard too :

 Uses Mysql, and is free!

 http://www.wde.org/me/php/

 /sunny

 
 Do You Yahoo!?
 Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
 or your free @yahoo.ie address at http://mail.yahoo.ie





Re: [PHP] Store PHP Code in MySQL?

2001-06-19 Thread J Smith

Try looking at the eval() function. It's pretty similar to the eval keyword
in perl.

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

J Smith
code, dba and linux guy
Tutorbuddy Inc.
The Magic Lantern Group
mailto:[EMAIL PROTECTED]



Joseph Koenig [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I've been playing a little bit trying to store some PHP code in MySQL
 and get it to execute. However, it behaves just like expected in that it
 just displays the code, and doesn't execute it. Essentially, i want to
 do this:

 ?
 while($data = mysql_fetch_array($result)) {
 echo $data[text];
 }
 ?

 With $data[text] containing:
 ?
 echo $var;
 ?

 Anybody know a way to actually make this work? Thanks,

 Joe






  1   2   >