[PHP] Scheduler, Staff Directory, Work tracker

2002-08-12 Thread Paul Dionne

Good morning everyone!

Our organization is in need of a Scheduling program for meeting rooms.  The 
program doesn't need to be very complicated...five or six rooms, outputs a 
list of rooms available for the time the user enters.  We would put it on 
our intranet.

We could also use a basic staff directory program: Outputs Name, Extension, 
email, position... maybe even a picture.  We would put it on our web site.

Lastly, we could use something to keep track of our workflow program 
otherwise referred to as a strategic plan.  

Does anyone have some code laying around or know where I could find some.  
I see no need to recreate something that I am confident many organizations 
have.

Thanks in advance,
Paul

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




[PHP] Installin PHP as a module

2002-08-12 Thread Carl Brandenburg

Hello everyone,

First off, I've tried every option to get this working I could find in the
past few days. I am trying to use the php4apache2.dll as a module in apache.
I've tried changing the quotations and the direction of the slashes on the
LoadModule line in the httpd.conf file. I've also tried copying the
php4apache2.dll into the \apache2\modules\ directory and changing the
httpd.conf file appropriately. Still no joy. What pisses me off is I have
the same setup at my workstation at work and everything is fine. The only
difference is that everything is loaded on the C drive. Is that what is
causing the problem by chance?
Any help would be greatly appreciated.

Versions:
Windows 2000 SP2
PHP 4.2.2
Apache 2.0.40

The error message I get is as follows:
D:\Program Files\Apache Group\Apache2\binapache -t
Syntax error on line 173 of D:/Program Files/Apache
Group/Apache2/conf/httpd.conf:
Cannot load D:/php/sapi/php4apache2.dll into server: The specified procedure
could not be found.

My install paths are:
PHP:d:\php\
Apache: d:\program files\apache group\apache2\

I've added the following lines in my httpd.conf file:
LoadModule php4module d:/php/sapi/php4apache2.dll
AddModule mod_php.c
AddType application/x-httpd-php .php

I've also put the php.ini and php4ts.dll files in c:\winnt.



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




RE: [PHP] Installin PHP as a module

2002-08-12 Thread RPS Internet

I have had the sam problem in the past and have found out that it was a
space in the path to the file. Try renameing the folder to apache_groups and
see if that helps. My problem wasen't exactly the same as yours it did deal
with another module that I was installing.

Josh Thomas
RPS Internet Services

-Original Message-
From: Carl Brandenburg [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 2:12 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Installin PHP as a module


Hello everyone,

First off, I've tried every option to get this working I could find in the
past few days. I am trying to use the php4apache2.dll as a module in apache.
I've tried changing the quotations and the direction of the slashes on the
LoadModule line in the httpd.conf file. I've also tried copying the
php4apache2.dll into the \apache2\modules\ directory and changing the
httpd.conf file appropriately. Still no joy. What pisses me off is I have
the same setup at my workstation at work and everything is fine. The only
difference is that everything is loaded on the C drive. Is that what is
causing the problem by chance?
Any help would be greatly appreciated.

Versions:
Windows 2000 SP2
PHP 4.2.2
Apache 2.0.40

The error message I get is as follows:
D:\Program Files\Apache Group\Apache2\binapache -t
Syntax error on line 173 of D:/Program Files/Apache
Group/Apache2/conf/httpd.conf:
Cannot load D:/php/sapi/php4apache2.dll into server: The specified procedure
could not be found.

My install paths are:
PHP:d:\php\
Apache: d:\program files\apache group\apache2\

I've added the following lines in my httpd.conf file:
LoadModule php4module d:/php/sapi/php4apache2.dll
AddModule mod_php.c
AddType application/x-httpd-php .php

I've also put the php.ini and php4ts.dll files in c:\winnt.



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



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




[PHP] Form variables not passed: register_globals = On

2002-08-12 Thread Petre Agenbag

Hi
I have posted here about session problems etc, but I think I found the
problem:
My Form variables are not passed at all!

Look at this:

index.php

form action=page2.php method=POST enctype=multipart/form-data
  input type=text name=testinput type=submit name=submit
/form


page2.php

?php
echo  HTTP_POST_VARS :.$_HTTP_POST_VARS[test].br;
echo  POST_VARS: .$_POST[test].br;
echo  normal test :.$test.br;
?

I have installed a everything RedHat 7.3 installation, and changed
NOTHING to the default php.ini...


Can anyone help?





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




Re: [PHP] Scheduler, Staff Directory, Work tracker

2002-08-12 Thread Justin French

on 12/08/02 5:59 PM, Paul Dionne ([EMAIL PROTECTED]) wrote:

 Good morning everyone!
 
 Our organization is in need of a Scheduling program for meeting rooms.  The
 program doesn't need to be very complicated...five or six rooms, outputs a
 list of rooms available for the time the user enters.  We would put it on
 our intranet.

see below

 We could also use a basic staff directory program: Outputs Name, Extension,
 email, position... maybe even a picture.  We would put it on our web site.

This is just a modification of a contact database.  Nearly every PHP  MySQL
beginners tutorial starts with a simple contact database which you can
modify to suit.

I'd really advise actually learning a bit of this stuff, rather than
grabbing something pre-built.  End of the day, nothing will have *exactly*
the features you need (now, or the future), and learning a little about the
two languages will help you build the meeting room program, which no harder
to build than the contact database.

I think phpbuilder.net, sitepoint.com, phpbeginner.com and a few others are
bound to have something you should use as a starting point.


 Lastly, we could use something to keep track of our workflow program
 otherwise referred to as a strategic plan.

Workflow IS a more complex application.


Have a look around at places like sourceforge.net for simular applications.
Again, having a little bit of knowledge from your work with contact database
and meeting room schedules will help you to modify these apps to suit.



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




php-general Digest 12 Aug 2002 09:21:24 -0000 Issue 1520

2002-08-12 Thread php-general-digest-help


php-general Digest 12 Aug 2002 09:21:24 - Issue 1520

Topics (messages 112050 through 112103):

Re: Pictures and sound in MySQL and access via PHP
112050 by: danny
112056 by: David Freeman
112058 by: RPS Internet
112061 by: danny

Re: Cookie array
112051 by: Maxim Maletsky

Re: Best way to read file
112052 by: Maxim Maletsky
112053 by: Pushkar Pradhan
112055 by: Maxim Maletsky

Re: why true?
112054 by: Maxim Maletsky

Hacker?
112057 by: RPS Internet
112059 by: Tyler Longren
112060 by: RPS Internet
112064 by: Tyler Longren
112088 by: Julio Nobrega

mkdate error?
112062 by: jc
112063 by: RPS Internet
112065 by: chyunj.uci.edu
112066 by: Bas Jobsen
112069 by: chyunj.uci.edu

Free 'search engine' code
112067 by: Edgard Berendsen
112070 by: Justin French
112071 by: Pushkar Pradhan
112072 by: Edgard Berendsen
112074 by: salamander

Re: creating files in OS X
112068 by: David Rice

Re: Random mirrors and download quota
112073 by: Julio Nobrega
112079 by: B.C. Lance

Case Sensitivity
112075 by: Rich Hutchins
112076 by: Andrew Brampton
112080 by: Rasmus Lerdorf
112084 by: Bogdan Stancescu

Re: Newbie question about UNIX command-line directives
112077 by: Al
112081 by: Rasmus Lerdorf

Stoopid Question - PHP.ini path?
112078 by: Wee Keat

Re: passing an array in a link
112082 by: Bogdan Stancescu

mysql_fetch_array problem
112083 by: Jonni
112086 by: Bogdan Stancescu

POST fields through CURL
112085 by: Mike Mannakee
112087 by: Bogdan Stancescu
112090 by: Jonathan Rosenberg
112092 by: Bogdan Stancescu

Please someone help me!
112089 by: Gandalf
112094 by: Rasmus Lerdorf
112096 by: Rasmus Lerdorf

including a php file in an html doc
112091 by: Alexander Ross
112093 by: Bogdan Stancescu

Re: use data-ba_se
112095 by: David Robley

Re: Win PHP Editor...
112097 by: Lord Loh.

Scheduler, Staff Directory, Work tracker
112098 by: Paul Dionne
112103 by: Justin French

Installin PHP as a module
112099 by: Carl Brandenburg
112100 by: RPS Internet

Form variables not passed: register_globals = On
112101 by: Petre Agenbag

Form variables not passing: globals IS on
112102 by: Petre Agenbag

Administrivia:

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

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

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


--

---BeginMessage---

thank you for your answer

How do you make a link in MySQL?

I tried following code were the field geluid contains a link to a mp3
format of field geluid = varchar(250). The problem is that i just get plain
text instead of a link to the MP3. Even better would be to have a button to
clicjk if you want to hear the sound.


echo  table width=\90%\ border=1trtd;
echo Nederlands/tdtdOostends/tdtdUitleg/td/tr;

while ($row=mysql_fetch_array($result))
{
echo trtd;
echo $row[woord_nl]. /tdtd
. $row[woord_ost]. /tdtd
. $row[betekenis_nl]. /tdtd
. $row[geluid];
echo /td/tr;
}

Danny
Rodolfo Gonzalez [EMAIL PROTECTED] schreef in berichtnieuws
[EMAIL PROTECTED]
 On Sat, 10 Aug 2002, lallous wrote:
   I'm making a on-line dictionary. I use PHP and a MySQL Database.
   Now I want to add audio-streaming (MP3) and pictures (JPG) to the
database
   and retrieve it true PHP. Can sombody help me out with a little

 If the files are not secret or for members only, you should better
 store them somewhere under your http document tree, and store *only* their
 filenames in the database, then you could provide a link to the file. I
 think this would be the faster. Or if you want to protect the files, you
 could place them outside your document tree, and then use fileread or
 something similar to read them. But I'd suggest you to keep only the
 filenames on the database, and store the files in the filesystem, it'd
 better for the performance and integrity of the files.

 Good luck.






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


  How do you make a link in MySQL?
  
  I tried following code were the field geluid contains a 
  link to a mp3

  while ($row=mysql_fetch_array($result))
  {
  echo trtd;
  echo $row[woord_nl]. /tdtd
  . $row[woord_ost]. /tdtd
  . $row[betekenis_nl]. /tdtd
  . $row[geluid];
  echo /td/tr;
  }

I'd do something like this:

  . a href=\ . $row[geluid] . \ . $row[geluid] . /a

To get you link - basically, just put your link into the appropriate
html tags.  If you prefer a button or something else then apply the html
you'd use and go with it.

CYA, Dave




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

The way I always store links in 

[PHP] Can PHP convert word to PDF

2002-08-12 Thread Jack

Dear all
Can PHP be able to convert a Word Document to PDF?


--
Thx a lot!
Jack
[EMAIL PROTECTED]



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




Re: [PHP] Can PHP convert word to PDF

2002-08-12 Thread Justin French

on 12/08/02 7:36 PM, Jack ([EMAIL PROTECTED]) wrote:

 Dear all
 Can PHP be able to convert a Word Document to PDF?

With enough work :)

Although I wouldn't want to have to dig into Word's document structure!

But since Adobe Acrobat can do it, and there are web-based tools available
on adobe.com do do just this, it IS possible.

MASSIVE amounts of work though... think about it -- tables, graphic objects,
pictures, clip art, formatting, text etc etc all need to be analysed and
converted to PDF.


Justin


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




[PHP] Loading Extension...

2002-08-12 Thread Brian McGarvie

OK Help

I always seem to have trouble installing extensions... what am I doing
wrong? (trying to get PDFLib working).

I copied the DLL to c:\php\extensions\php_pdf.dll

However when I try to run a simple example I get:

Fatal error: Call to undefined function: pdf_new() in
C:\Inetpub\wwweloanshop\dev\test\hello.php on line 4

Anyone...



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




[PHP] postgresql - image - php

2002-08-12 Thread Hafiz Malik

anyone know how to store an image to postgresql and load it back using php?



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




[PHP] progress bar

2002-08-12 Thread Serdar Sokmen

Hi,

I would like to add a progress bar to an installtion program I'm writing in
PHP. I basically have one function that I call, it takes about 30 seconds or
so to finish executing... I haven't done such a thing before. Can anyone
plese suggest me some ideas...

Many Thanks

Serdar



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




[PHP] Re: Loading Extension...

2002-08-12 Thread lallous

;extension=php_pdf.dll

you have to uncomment that line above inside php.ini

Elias

Brian McGarvie [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 OK Help

 I always seem to have trouble installing extensions... what am I doing
 wrong? (trying to get PDFLib working).

 I copied the DLL to c:\php\extensions\php_pdf.dll

 However when I try to run a simple example I get:

 Fatal error: Call to undefined function: pdf_new() in
 C:\Inetpub\wwweloanshop\dev\test\hello.php on line 4

 Anyone...





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




[PHP] Re: add options to select in ather page

2002-08-12 Thread lallous

oh well,

it is done via javascript:

script
existingSelectBox[existingSelectBox.length] = new Option(display text,
item value, false);
/script

replace the display text , item value from the popup's selected field
value/text

good luck,

Wakan [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,
 I've listbox with some categories in a page.
 When I find that there isn't the category I want, clicking on a link,
 I enter in the category managment page.
 After adding new categories, whenI close that window,
 I'd like to dinamically reload the select on the opener page, without
 reload all the page.
 This because there are other field before the category list.
 If the user has already filled other field and I reload, he have to refill
 that field again.
 Thanks, Carlo





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




[PHP] CURL's different Options values and their format

2002-08-12 Thread lallous

As you can see that every Option (parameter) when calling curl_Setopt
requires a different mixed value format.

where can i find a full description of how to use each of curl's options ?


I mainly want to login to a page via curl
have curl maintain the cookies
post some fields while logged in
then log off.

but i still need to learn how to use each of the options used  in PHP.

can anyone recommend a good site?

Thank you.



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




Re: [PHP] progress bar

2002-08-12 Thread Justin French

Unless you can break the process up into a series of smaller process' (and
use meta refresh's or javascript redirects to step through each process),
you're out of luck... because the browser can't possibly know what's
happening in the background on the server.

For a cheap and nasty solution, how about an animated GIF that lasts about
40 or 50 seconds? It can start empty, and animate up to full... as long as
the process finishes before the GIF, all will be well.


Justin French



on 12/08/02 8:05 PM, Serdar Sokmen ([EMAIL PROTECTED]) wrote:

 Hi,
 
 I would like to add a progress bar to an installtion program I'm writing in
 PHP. I basically have one function that I call, it takes about 30 seconds or
 so to finish executing... I haven't done such a thing before. Can anyone
 plese suggest me some ideas...
 
 Many Thanks
 
 Serdar
 
 


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




RE: [PHP] progress bar

2002-08-12 Thread Tom Kohnen

Hi!
Well i suppose flush() is useful in your case, flush out the output whenever
it is called, and not when the page is fully generated (the usual case)!
Sou you might to sth like this:

- Print 1/4 of the progress bar
- flush
- wait some time
- print 2/4 of the progress bar
- flush


i don't know if it works, but that's the way it'd do it ;)

- Tom

-Original Message-
From: Serdar Sokmen [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 12:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP] progress bar


Hi,

I would like to add a progress bar to an installtion program I'm writing in
PHP. I basically have one function that I call, it takes about 30 seconds or
so to finish executing... I haven't done such a thing before. Can anyone
plese suggest me some ideas...

Many Thanks

Serdar



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


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




Re: [PHP] can i use --with-unixODBC instead of --with-ibm-db2?

2002-08-12 Thread Doug Smith

Dan,

thank you for asking, i can actually connect to db2 via command line no
problem, i can even connect to the database via TCP/IP using the IBM DB2
Run-Time Client on a Win32 machine. Just having a problem with PHP
seemingly.

it's possible that i can't connect because it doesn't seem that i have
the DB2 Connect software installed according to ./db2setup could
that be possible?


__ connecting via CLP
[auser@ndn auser]$ su db2inst1
Password:
[db2inst1@ndn auser]$ db2 connect to thedb
   Database Connection Information

 Database server= DB2/LINUX 7.2.0
 SQL authorization ID   = DB2INST1
 Local database alias   = THEDB

thanks again,

-Doug



Dan Vande More [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Doug, can you log in via plain db2 in linux (sorry if you said you could, I
didnt read that far back).

Heres what I do:


*
[root@somelinuxbox /root]# su - db2inst1
[db2inst1@somelinuxbox db2inst1]$ /usr/IBMdb2/V7.1/bin/db2
(c) Copyright IBM Corporation 1993,2001
Command Line Processor for DB2 SDK 7.2.0

You can issue database manager commands and SQL statements from the command
prompt. For example:
db2 = connect to sample
db2 = bind sample.bnd

For general help, type: ?.
For command help, type: ? command, where command can be
the first few keywords of a database manager command. For example:
 ? CATALOG DATABASE for help on the CATALOG DATABASE command
 ? CATALOG  for help on all of the CATALOG commands.

To exit db2 interactive mode, type QUIT at the command prompt. Outside
interactive mode, all commands must be prefixed with 'db2'.
To list the current command option settings, type LIST COMMAND OPTIONS.

For more detailed help, refer to the Online Reference Manual.

db2 = CONNECT TO MYDB2DB user MICHAEL
Enter current password for MICHAEL:

   Database Connection Information

 Database server= OS/400 4.4.0
 SQL authorization ID   = MICHAEL
 Local database alias   = CMSFIL

db2 =

**

Names changed to protect my network!:)

Can you do that?


Thanks

Dan
-Original Message-
From: Doug Smith [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 09, 2002 7:02 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] can i use --with-unixODBC instead of --with-ibm-db2?


Matt,

I wish you were my boss :) I love MySQL and would want to use it instead
of db2 (seeing i could probably have had it working with php last week ;) )
but Somehow my boss loves to waste money on IBM products... and then
hires on people who don't know how to use them well (i.e. me!). My
philosophy is: don't waste money on it, if you can use some open source --
for example he wanted to use IBM WAS (websphere application server) but, PHP
will do everything we need to do, and is a lot easier to deal with than the
bulky WAS.

Anyways.

I had seen the IBM document that you referenced about connecting DB2 to
PHP, in fact, it's the main document i used to start attempting to get PHP
to work with DB2. The second doc you referenced from phpbuilder.net was
definately a good find -- had a couple ideas that i hadn't tried (i.e.
catalogging the db, running apache as db2inst1 [still trying to get that to
work, db2inst1 doesn't have the priviledges that root has, and henceforth
can't access all the files needed by apache])

Matt, thanks again for all your help!

-Doug

Matt [EMAIL PROTECTED] wrote in message
047001c23f46$f7707c40$[EMAIL PROTECTED]">news:047001c23f46$f7707c40$[EMAIL PROTECTED]...
 It seems way too difficult to configure db2 on linux. Let alone trying to
do
 it on freebsd, which I hope to tackle that next week.

 I tell you though, I really love mysql, it's so easy to use, and
configure.
 mysql just works. mysql's performance on a table I have that has roughly
 250,000 rows of address entries, beats our as/400 with db2 by orders of
 magnitude  and  mytest box is a  Celeron 300.

 Anyway, this is where I found the solution to the gibberish line that I
put
 in my doc (see step 3) :

http://www7b.boulder.ibm.com/dmdd/library/techarticle/scott/0614_scott.html

 You may find this of help:
 http://www.phpbuilder.com/mail/php-db/2001011/0076.php

 Oh, did you call your instance db2inst1?





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




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




RE: [PHP] progress bar

2002-08-12 Thread Dan Hardiker

To make it look that little bit nicer, you could use flash to display the
bar... but I think that make take a little longer than you'd like for
development.

 Hi!
 Well i suppose flush() is useful in your case, flush out the output
 whenever it is called, and not when the page is fully generated (the
 usual case)! Sou you might to sth like this:

 - Print 1/4 of the progress bar
 - flush
 - wait some time
 - print 2/4 of the progress bar
 - flush
 

 i don't know if it works, but that's the way it'd do it ;)

 - Tom

 -Original Message-
 From: Serdar Sokmen [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 12, 2002 12:06 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] progress bar


 Hi,

 I would like to add a progress bar to an installtion program I'm writing
 in PHP. I basically have one function that I call, it takes about 30
 seconds or so to finish executing... I haven't done such a thing before.
 Can anyone plese suggest me some ideas...

 Many Thanks

 Serdar



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


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


-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software  Systems Engineer
First Creative Ltd



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




Re: [PHP] progress bar

2002-08-12 Thread lallous

I agree with the flush() solution.

In addition, output a javascript code to update the display in the
browser...
for example:
scriptdocumeny.theform.progressPercent.value++/script

Elias
Tom Kohnen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi!
 Well i suppose flush() is useful in your case, flush out the output
whenever
 it is called, and not when the page is fully generated (the usual case)!
 Sou you might to sth like this:

 - Print 1/4 of the progress bar
 - flush
 - wait some time
 - print 2/4 of the progress bar
 - flush
 

 i don't know if it works, but that's the way it'd do it ;)

 - Tom

 -Original Message-
 From: Serdar Sokmen [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 12, 2002 12:06 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] progress bar


 Hi,

 I would like to add a progress bar to an installtion program I'm writing
in
 PHP. I basically have one function that I call, it takes about 30 seconds
or
 so to finish executing... I haven't done such a thing before. Can anyone
 plese suggest me some ideas...

 Many Thanks

 Serdar



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




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




[PHP] image function

2002-08-12 Thread NoWhErEMan

I want to use the image functions listed in www.php.net to manipulate
images. My server is Apache 2.0.x.x with PHP 4.2.2 , built on windows
platform. Is it uncomment the ;extension=php_gd.dll in php.ini enough to
enable such functions?

NoWhErEMaN



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




RE: [PHP] image function

2002-08-12 Thread Jay Blanchard

[snip]
I want to use the image functions listed in www.php.net to manipulate
images. My server is Apache 2.0.x.x with PHP 4.2.2 , built on windows
platform. Is it uncomment the ;extension=php_gd.dll in php.ini enough to
enable such functions?
[/snip]

Not on Apache. You will need to compile/install the GD library
(http://www.php.net/manual/en/ref.image.php) and maybe jpeg-6b. There may be
other extensions that you will need, for instance if you want to use True
Type fonts in your images. There is plenty of documentation on installation
and set up.

HTH!

Jay



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




RE: [PHP] image function

2002-08-12 Thread Tom Kohnen

Hi!
Well you have to uncomment it AND restart apache afterwards!
Plus, i assume that your extensions dir in the php.ini is correct, if not,
apache will give you an error message ;)

Have a nice day,
- Tom

-Original Message-
From: NoWhErEMan [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 2:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP] image function


I want to use the image functions listed in www.php.net to manipulate
images. My server is Apache 2.0.x.x with PHP 4.2.2 , built on windows
platform. Is it uncomment the ;extension=php_gd.dll in php.ini enough to
enable such functions?

NoWhErEMaN



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




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




RE: [PHP] image function

2002-08-12 Thread Jay Blanchard

[snip]
I known i need to install a lot of staffs to get all the functions works(GD
Lib, FreeType Lib, libjpeg, libpng, zlibetc etc).
But i only need a few of them, so if i just load the php_gd.dll, what
functions included?? I canr found any information about that.
And one more, does php_gd2.dll also a GD lib?
[/snip]

The DLL is a Windows library AFAIR, and contains the GD functions when
included on a Windows server. You do not have to enable this extension on an
Apache server (unless it is Apache on Windows). You just have to make sure
that PHP is compiled with all of the proper libraries for your use of GD.

As for the second DLL, I am not sure. I haven't done a lot of Windows GD
installations, it does not look familiar.

HTH!

Jay



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




Re: [PHP] image function

2002-08-12 Thread NoWhErEMan

Thank you Jay, Yup my apache is on Windows : )
Let's me try first.
Jay Blanchard [EMAIL PROTECTED] ¼¶¼g©ó¶l¥ó·s»D
:002301c24201$b28caf00$[EMAIL PROTECTED]
 [snip]
 I known i need to install a lot of staffs to get all the functions
works(GD
 Lib, FreeType Lib, libjpeg, libpng, zlibetc etc).
 But i only need a few of them, so if i just load the php_gd.dll, what
 functions included?? I canr found any information about that.
 And one more, does php_gd2.dll also a GD lib?
 [/snip]

 The DLL is a Windows library AFAIR, and contains the GD functions when
 included on a Windows server. You do not have to enable this extension on
an
 Apache server (unless it is Apache on Windows). You just have to make sure
 that PHP is compiled with all of the proper libraries for your use of GD.

 As for the second DLL, I am not sure. I haven't done a lot of Windows GD
 installations, it does not look familiar.

 HTH!

 Jay





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




[PHP] problem with array and session

2002-08-12 Thread Ricky

Hello everybody I'd like to make a page in which the results shown can 
be bookmarked by clicking a button aside each of them.
Actually first it should check if the session is open already ... Then 
if that item(that comes from a query to a MySQL table) has been 
registered already, finally it registers all the variables in a 
multidimensional array.

this is the code:

session_start();
  
if(!session_is_registered(bkmks))
  
{session_register(bkmks)||die(WE GOT PROBLEMS MAN);
$bkmks = array(array(tab=$tab, id=$id, url=$url, nome=$nome, 
ind=$ind, com=$com, pv=$pv, tel=$tel, chi=$chi));

print htmlbody Your choice has been 
stored/body/html;   
  
  }
  
  else
  
  {

  
foreach($bkmks as $v)
  
  {
   
if(($v[tab]==$tab)($v[id]==$id)){
print htmlbody You have already chosen this item/body/html;exit;
  
  }
  
  }
  
$bkmks[][tab]=$tab;
  
$bkmks[][id]=$id;
  
$bkmks[][url]=$url;
  
$bkmks[][nome]=$nome;
  
$bkmks[][ind]=$ind;
  
$bkmks[][com]=$com;
  
$bkmks[][pv]=$pv;
  
$bkmks[][tel]=$tel;
  
$bkmks[][chi]=$chi;
 print htmlbodyYour choice has been 
stored/body/html;  
  
  }

It doesn't work! I can't figure out why.
It starts storing fine and then it seems messing up with values so it 
recognises as already stored only the variables of my first choice (the 
value stored at bkmks[0])... I tried to print values stored in the 
array: the output is a mess I don't know why!

Thanks a lot !
Bye.


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




Re: [PHP] Newbie question about UNIX command-line directives

2002-08-12 Thread Al

I wasn't clear before.  The problem I'm having, and most of the others 
folks who commented, with include is really with include_path.

A good bit of the problem seems to be my virtual host's environment. 
Most things I've tried with directives in an htaccess don't work and the 
  error log says not allowed etc.

I appreciate your help.

Rasmus Lerdorf wrote:
 What does include have to do with DirectoryIndex?  And what exactly is
 your problem with include?  The only trick is setting the include_path
 which doesn't seem all that obtuse to me.
 
 -Rasmus
 
 On Sun, 11 Aug 2002, Al wrote:
 
 
The problem may be due to the fact that my environment is Apache Unix.

I spent about two hours today pouring over the php on-line manual
include spec and trying dozens of combinations.
http://www.php.net/manual/en/function.include.php

There must be at least 20 user contributed notes at the bottom.

It is incredible that such a basic php function should be so obtuse and
ill defined.

I'm going to give your other suggestion a try tomorrow.

Thanks again

Analysis  Solutions wrote:

On Sun, Aug 11, 2002 at 12:33:55PM -0400, Al wrote:


The .htaccess approach appears to fit my situation best; but, I've not
been able to get it to work.


I wondered about the DirectoryIndex directive's ability to utilize files
in other directories, so did a little test, which is what you indicated
you tried in your initial email:

   DirectoryIndex ../index.htm

Worked fine.  Apache 1.3.26.  Windows NT.

So, your problem could be a web server configuration thing, as Rasmus
hinted at.

Beyond the things already discussed, I'm at a loss.

Good luck,

--Dan



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

 
 


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




RE: [PHP] Re: including a php file in an html doc

2002-08-12 Thread Alexander Ross

So is there any way to accomplish what I want to using php without
naming the files *.php??

-Original Message-
From: Brian V Bonini [mailto:[EMAIL PROTECTED]] 
Sent: Monday, August 12, 2002 10:11 AM
To: Alexander Ross; [EMAIL PROTECTED]
Subject: RE: [PHP] Re: including a php file in an html doc

Because your trying to put PHP directives in an html file. Your web
server
does not know to parse html files as php files unless you tell it to do
so.



 -Original Message-
 From: Alexander Ross [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 12, 2002 9:50 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: including a php file in an html doc


 I still seem to be missing something.  I guess the easiest thing for
me to
 do is just show you my code.  All I want is to be able to reference
the
 $hotspots array from any .html page oon my site.  I thought I
 could include
 hotspot.php and then reference the array using ?= ? syntax.
 What should I
 do?  The one requirement is that I cannot make all my pages PHP. They
must
 be html.

 HTML PAGE (test.html):
 html
 head
 titleUntitled Document/title
 ? include(hotspot.php); ?
 meta http-equiv=Content-Type content=text/html;
charset=iso-8859-1
 /head

 body
 ?=$hotspots['kitten']?
 /body
 /html

 PHP PAGE (hotspot.php):
 ?
 include_once(../board/db_fns.php);

 echo hotspot = .$hotspots;

 if (!isset $hotspots){
   $connect = connect_to_db();
   $query = SELECT * FROM hotspots;
   $result = mysql_query($query);
   $count = mysql_numrows($result);

   $hotspots = array();
   for($i=0;$i$count;$i++)
   {
 $hotspot = mysql_fetch_assoc($result);
  $hotspots[$hotspot['hotspot']]=$hotspot['val'];
   }
   print_r($hotspots);
 }
 ?


 Bogdan Stancescu [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi Alexander!
 
  You're missing the distinction between a server-side script (PHP)
and a
  client-side script (JavaScript, VB etc). When you use the syntax you
  used, the browser attempts to download the src and execute it - and
it
  can't do that, because in the best case the php code runs on the
server
  and returns test (your echo()) and then it tries to run that as
php
  code, which again it doesn't know how. It does work for JavaScript
  however, because it downloads the JavaScript file (which is plain
text)
  and then executes the code (because it knows how to execute
JavaScript).
 
  What you should do would be write
  ? include(hotspot.php); ?
  instead of script language... etc.
 
  Bogdan
 
  Alexander Ross wrote:
   I have a .php file whose purpose, ultimately, is to set one
variable;
   $hotspot.  Now I want to include that var in a bunch of places in
my
 html
   page (it must remain html).  So this was my thought.  In the
head
 include
   the following:
  
   script language=php src=hotspot.php/script
  
   and then anywhere in the html doc I want to print the value
 of $hotspot
 I
   type:
  
   ?=$hotspot?
  
   but it doesn't work.  I have a feeling I cant include a php
 script that
 way
   because in trying to debug the problem I made the first line of
 hotspot.php
   = echo test; and the word test never shows.  What am I missing?
  
   Thnks
   Alex
  
  
  
  
 



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




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




RE: [PHP] Re: including a php file in an html doc

2002-08-12 Thread Brian V Bonini

Because your trying to put PHP directives in an html file. Your web server
does not know to parse html files as php files unless you tell it to do so.



 -Original Message-
 From: Alexander Ross [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 12, 2002 9:50 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: including a php file in an html doc


 I still seem to be missing something.  I guess the easiest thing for me to
 do is just show you my code.  All I want is to be able to reference the
 $hotspots array from any .html page oon my site.  I thought I
 could include
 hotspot.php and then reference the array using ?= ? syntax.
 What should I
 do?  The one requirement is that I cannot make all my pages PHP. They must
 be html.

 HTML PAGE (test.html):
 html
 head
 titleUntitled Document/title
 ? include(hotspot.php); ?
 meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
 /head

 body
 ?=$hotspots['kitten']?
 /body
 /html

 PHP PAGE (hotspot.php):
 ?
 include_once(../board/db_fns.php);

 echo hotspot = .$hotspots;

 if (!isset $hotspots){
   $connect = connect_to_db();
   $query = SELECT * FROM hotspots;
   $result = mysql_query($query);
   $count = mysql_numrows($result);

   $hotspots = array();
   for($i=0;$i$count;$i++)
   {
 $hotspot = mysql_fetch_assoc($result);
  $hotspots[$hotspot['hotspot']]=$hotspot['val'];
   }
   print_r($hotspots);
 }
 ?


 Bogdan Stancescu [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi Alexander!
 
  You're missing the distinction between a server-side script (PHP) and a
  client-side script (JavaScript, VB etc). When you use the syntax you
  used, the browser attempts to download the src and execute it - and it
  can't do that, because in the best case the php code runs on the server
  and returns test (your echo()) and then it tries to run that as php
  code, which again it doesn't know how. It does work for JavaScript
  however, because it downloads the JavaScript file (which is plain text)
  and then executes the code (because it knows how to execute JavaScript).
 
  What you should do would be write
  ? include(hotspot.php); ?
  instead of script language... etc.
 
  Bogdan
 
  Alexander Ross wrote:
   I have a .php file whose purpose, ultimately, is to set one variable;
   $hotspot.  Now I want to include that var in a bunch of places in my
 html
   page (it must remain html).  So this was my thought.  In the head
 include
   the following:
  
   script language=php src=hotspot.php/script
  
   and then anywhere in the html doc I want to print the value
 of $hotspot
 I
   type:
  
   ?=$hotspot?
  
   but it doesn't work.  I have a feeling I cant include a php
 script that
 way
   because in trying to debug the problem I made the first line of
 hotspot.php
   = echo test; and the word test never shows.  What am I missing?
  
   Thnks
   Alex
  
  
  
  
 



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



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




[PHP] Pairing algorithm?

2002-08-12 Thread Chad Day

Has anyone written any sort of pairing algorithm for a round robin sports
schedule, or something similar?  I couldn't find anything in the archives
surprisingly, and I'm looking around google and not turning up much except
some PDFs and white papers addressing the mathmatical complications of it.

Thanks,
Chad


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




Re: [PHP] SQL ?

2002-08-12 Thread Analysis Solutions

On Mon, Aug 12, 2002 at 02:15:23PM +, Tyler Durdin wrote:
 SELECT *, IF (answer = 'a', TRUE, FALSE) AS  Answer-A
 What does the As Answer-A mean and what does it do?

Why not examine the manual for the answer to such a basic question, 
especially one that is off topic for the list you posted to?

Assuming you're using MySQL read http://www.mysql.com/doc/en/SELECT.html 
and you'll quickly come across the meaning of AS.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




RE: [PHP] Re: including a php file in an html doc

2002-08-12 Thread vic

You must have a space between ? And your code EX: ? Blah blah ? you
can also write ?php blah blah ? which might be easier to follow. And
you have to include ALL your php code between these tags (you may use as
many pairs as you wish in your page). And don't forget to name you file
.php not .htm or .html

- Vic


-Original Message-
From: Alexander Ross [mailto:[EMAIL PROTECTED]] 
Sent: Monday, August 12, 2002 9:50 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: including a php file in an html doc

I still seem to be missing something.  I guess the easiest thing for me
to
do is just show you my code.  All I want is to be able to reference the
$hotspots array from any .html page oon my site.  I thought I could
include
hotspot.php and then reference the array using ?= ? syntax.  What
should I
do?  The one requirement is that I cannot make all my pages PHP. They
must
be html.

HTML PAGE (test.html):
html
head
titleUntitled Document/title
? include(hotspot.php); ?
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head

body
?=$hotspots['kitten']?
/body
/html

PHP PAGE (hotspot.php):
?
include_once(../board/db_fns.php);

echo hotspot = .$hotspots;

if (!isset $hotspots){
  $connect = connect_to_db();
  $query = SELECT * FROM hotspots;
  $result = mysql_query($query);
  $count = mysql_numrows($result);

  $hotspots = array();
  for($i=0;$i$count;$i++)
  {
$hotspot = mysql_fetch_assoc($result);
 $hotspots[$hotspot['hotspot']]=$hotspot['val'];
  }
  print_r($hotspots);
}
?


Bogdan Stancescu [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi Alexander!

 You're missing the distinction between a server-side script (PHP) and
a
 client-side script (JavaScript, VB etc). When you use the syntax you
 used, the browser attempts to download the src and execute it - and it
 can't do that, because in the best case the php code runs on the
server
 and returns test (your echo()) and then it tries to run that as
php
 code, which again it doesn't know how. It does work for JavaScript
 however, because it downloads the JavaScript file (which is plain
text)
 and then executes the code (because it knows how to execute
JavaScript).

 What you should do would be write
 ? include(hotspot.php); ?
 instead of script language... etc.

 Bogdan

 Alexander Ross wrote:
  I have a .php file whose purpose, ultimately, is to set one
variable;
  $hotspot.  Now I want to include that var in a bunch of places in my
html
  page (it must remain html).  So this was my thought.  In the head
include
  the following:
 
  script language=php src=hotspot.php/script
 
  and then anywhere in the html doc I want to print the value of
$hotspot
I
  type:
 
  ?=$hotspot?
 
  but it doesn't work.  I have a feeling I cant include a php script
that
way
  because in trying to debug the problem I made the first line of
hotspot.php
  = echo test; and the word test never shows.  What am I missing?
 
  Thnks
  Alex
 
 
 
 




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

__ 
Post your ad for free now! http://personals.yahoo.ca

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




[PHP] Maximum in SQL query?

2002-08-12 Thread Tim Stoop

Hi people,

It seems that MySQL only accepts queries that are 470 characters or smaller 
when I use PHP. Is this a known thing? Can I change it somehow? I printed 
the query:

Query: REPLACE INTO foto (ID, titel, fotograaf, origineel_formaat_x, 
origineel_formaat_y, datum_invoering, datum_wijziging, plaats_opname, 
datum_opname, file_thumb, file_large, url_thumb, url_large, thumb_hoogte, 
thumb_breedte, large_hoogte, large_breedte, fine_art_print, 
digitaal_formaat) VALUES (0001, Eva, Jasper, 1024, 768, now(), 
now(), Brunssum, , / var/www/html/foto/0/0/0/0/0001.thumb.jpg, 
/var/www/html/foto/0/0/0/0/0001.jpg, /foto/0/0/0/0/0001.thumb.jpg, / 
foto/0/0/0/0/0001.jpg, 200, 150, 500, 375, FALSE, Array)

Database error: You have an error in your SQL syntax near ' 
/var/www/html/foto/0/0/0/0/0001.thumb.jpg, /var/www/html/ 
foto/0/0/0/0/0001.j' at line 1

-- 
Kind regards,
Tim

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




Re: [PHP] SQL ?

2002-08-12 Thread Tyler Durdin

Why not just let such a simple question go then? Especially since your reply 
is also off topic? Also, the question I asked was part of a reply from a 
previous topic. Thanks to all who answered my simple question. It is 
greatly appreciated.


From: Analysis  Solutions [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Subject: Re: [PHP] SQL ?
Date: Mon, 12 Aug 2002 10:26:55 -0400

On Mon, Aug 12, 2002 at 02:15:23PM +, Tyler Durdin wrote:
  SELECT *, IF (answer = 'a', TRUE, FALSE) AS  Answer-A
  What does the As Answer-A mean and what does it do?

Why not examine the manual for the answer to such a basic question,
especially one that is off topic for the list you posted to?

Assuming you're using MySQL read http://www.mysql.com/doc/en/SELECT.html
and you'll quickly come across the meaning of AS.

--Dan

--
PHP classes that make web design easier
 SQL Solution  |   Layout Solution   |  Form Solution
 sqlsolution.info  | layoutsolution.info |  formsolution.info
  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




RE: [PHP] Maximum in SQL query?

2002-08-12 Thread Jay Blanchard

[snip]
It seems that MySQL only accepts queries that are 470 characters or smaller
when I use PHP. Is this a known thing? Can I change it somehow? I printed
the query:

Query: REPLACE INTO foto (ID, titel, fotograaf, origineel_formaat_x,
origineel_formaat_y, datum_invoering, datum_wijziging, plaats_opname,
datum_opname, file_thumb, file_large, url_thumb, url_large, thumb_hoogte,
thumb_breedte, large_hoogte, large_breedte, fine_art_print,
digitaal_formaat) VALUES (0001, Eva, Jasper, 1024, 768, now(),
now(), Brunssum, , / var/www/html/foto/0/0/0/0/0001.thumb.jpg,
/var/www/html/foto/0/0/0/0/0001.jpg, /foto/0/0/0/0/0001.thumb.jpg, /
foto/0/0/0/0/0001.jpg, 200, 150, 500, 375, FALSE, Array)

Database error: You have an error in your SQL syntax near '
/var/www/html/foto/0/0/0/0/0001.thumb.jpg, /var/www/html/
foto/0/0/0/0/0001.j' at line 1
[/snip]

I believe the error is a space prior to 'var'

Brunssum, , / var/

try

Brunssum, , /var/

I consistantly use queries in PHP that are far longer than 470 characters
(not to mention that 470 would be an odd choice for a limit of this type.).

HTH!

Jay



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




[PHP] Re: problem with array and session

2002-08-12 Thread B.C. Lance

try this instead:

session_start();
.
.
.
if (mysql_num_rows($_query)) {
   $_rec = mysql_fetch_array($_query);

   if (!isset($_SESSION[bkmks]) ||
   !in_array($_rec, $_SESSION[bkmks]) {
 $_SESSION[bkmks][] = $_rec;
   }
   else {
 echo Already exist.;
   }
}


to test:

echo pre;
print_r($_SESSION[bkmks]);
echo /pre;

p.s. assuming you are using php 4.1 or above


Ricky wrote:
 Hello everybody I'd like to make a page in which the results shown can 
 be bookmarked by clicking a button aside each of them.
 Actually first it should check if the session is open already ... Then 
 if that item(that comes from a query to a MySQL table) has been 
 registered already, finally it registers all the variables in a 
 multidimensional array.
 
 this is the code:
 
 session_start();
  
 if(!session_is_registered(bkmks))
  
{session_register(bkmks)||die(WE GOT PROBLEMS MAN);
 $bkmks = array(array(tab=$tab, id=$id, url=$url, nome=$nome, 
 ind=$ind, com=$com, pv=$pv, tel=$tel, chi=$chi));
 
 print htmlbody Your choice has been 
 stored/body/html;   
  
  }
  
  else
  
  {
 
  
 foreach($bkmks as $v)
  
  {
   
 if(($v[tab]==$tab)($v[id]==$id)){
 print htmlbody You have already chosen this item/body/html;exit;
  
  }
  
  }
  
 $bkmks[][tab]=$tab;
  
 $bkmks[][id]=$id;
  
 $bkmks[][url]=$url;
  
 $bkmks[][nome]=$nome;
  
 $bkmks[][ind]=$ind;
  
 $bkmks[][com]=$com;
  
 $bkmks[][pv]=$pv;
  
 $bkmks[][tel]=$tel;
  
 $bkmks[][chi]=$chi;
 print htmlbodyYour choice has been 
 stored/body/html;  
  
  }
 
 It doesn't work! I can't figure out why.
 It starts storing fine and then it seems messing up with values so it 
 recognises as already stored only the variables of my first choice (the 
 value stored at bkmks[0])... I tried to print values stored in the 
 array: the output is a mess I don't know why!
 
 Thanks a lot !
 Bye.
 


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




RE: [PHP] Re: including a php file in an html doc

2002-08-12 Thread Paul Colcutt

you could make a Flash movie that just contains a text field and fills
it with the output of your php page by using Flash's loadvariables() function

[snip]
So is there any way to accomplish what I want to using php without
naming the files *.php??
[/snip]


-- 
===
Paul Colcutt
http://www.paulcolcutt.co.uk

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




Re: [PHP] Newbie question about UNIX command-line directives

2002-08-12 Thread Rasmus Lerdorf

As mentioned a couple of times on that include page, you can just use
ini_set() directly in your application to set include_path.

eg.

?
ini_set(include_path,.:..:../..:/usr/local/lib/php);
include foo.inc;
?


That will run through each directory listed in your include path.  That
is, it will check for:

 ./foo.inc
 ../foo.inc
 ../../foo.inc
 /usr/local/lib/php/foo.inc

in that order.

-Rasmus

On Mon, 12 Aug 2002, Al wrote:

 I wasn't clear before.  The problem I'm having, and most of the others
 folks who commented, with include is really with include_path.

 A good bit of the problem seems to be my virtual host's environment.
 Most things I've tried with directives in an htaccess don't work and the
   error log says not allowed etc.

 I appreciate your help.

 Rasmus Lerdorf wrote:
  What does include have to do with DirectoryIndex?  And what exactly is
  your problem with include?  The only trick is setting the include_path
  which doesn't seem all that obtuse to me.
 
  -Rasmus
 
  On Sun, 11 Aug 2002, Al wrote:
 
 
 The problem may be due to the fact that my environment is Apache Unix.
 
 I spent about two hours today pouring over the php on-line manual
 include spec and trying dozens of combinations.
 http://www.php.net/manual/en/function.include.php
 
 There must be at least 20 user contributed notes at the bottom.
 
 It is incredible that such a basic php function should be so obtuse and
 ill defined.
 
 I'm going to give your other suggestion a try tomorrow.
 
 Thanks again
 
 Analysis  Solutions wrote:
 
 On Sun, Aug 11, 2002 at 12:33:55PM -0400, Al wrote:
 
 
 The .htaccess approach appears to fit my situation best; but, I've not
 been able to get it to work.
 
 
 I wondered about the DirectoryIndex directive's ability to utilize files
 in other directories, so did a little test, which is what you indicated
 you tried in your initial email:
 
DirectoryIndex ../index.htm
 
 Worked fine.  Apache 1.3.26.  Windows NT.
 
 So, your problem could be a web server configuration thing, as Rasmus
 hinted at.
 
 Beyond the things already discussed, I'm at a loss.
 
 Good luck,
 
 --Dan
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 


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



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




Re: [PHP] SQL ?

2002-08-12 Thread DL Neil

Now then, let's all play nicely together!

Dan: relevance
It is a PHP question because whereas the SQL query SELECT fred FROM tbl
produces an array element back in PHP such as $row[ fred ], this
convention/mapping comes well unstuck if you submit something like SELECT IF
( answer = 'a', TRUE, FALSE )... or even SELECT fred+barney... Accordingly
the need to create an alias column name (Answer-A) and thereafter in PHP to
access the returned data with something like $row[ Answer-A ].

Tyler: appreciation and politeness
I thought this looked familiar, and it is part of something I sent to you 36
hours ago to perform cross-totalling on a survey or exam results type
database. Since then there has been no comment from you, except to others.
If the suggestion doesn't work, please have the courtesy to come back to me,
at least by cc:, for correction or amplification. NB If you had tested it at
the MySQL (?) command line or using a management tool (recommended testing
procedure before implementing in PHP), then you would have observed the
result.

Dan is often here, being helpful. Did you really mean to irritate two people
by thoughtlessness if not deed, during the course of a single conversation?
=dn


 Why not just let such a simple question go then? Especially since your
reply
 is also off topic? Also, the question I asked was part of a reply from a
 previous topic. Thanks to all who answered my simple question. It is
 greatly appreciated.

 On Mon, Aug 12, 2002 at 02:15:23PM +, Tyler Durdin wrote:
   SELECT *, IF (answer = 'a', TRUE, FALSE) AS  Answer-A
   What does the As Answer-A mean and what does it do?
 
 Why not examine the manual for the answer to such a basic question,
 especially one that is off topic for the list you posted to?
 
 Assuming you're using MySQL read http://www.mysql.com/doc/en/SELECT.html
 and you'll quickly come across the meaning of AS.



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




[PHP] e-mail to mysql database?

2002-08-12 Thread Frank Schellenberg

In Short: What I need is a php script that reads an email file and split its
data to a mysql file.
A bit longer if you are still interested

For the following project:
http://www.crossing-africa.com, a journey I am going to make on a bike.
What are the plans:

I am taking a satilite phone and SMS my possition with GPS coordinates like:
N50.34.234 E006.45.34 on 23-feb-2003
I already have a script that translates that sms to an e-mail that looks the
same.
Then what:
This e-mail needs to be split up like this:
N50.34.234
E006.45.34
23-feb-2003
and then be insterted into a mysql database.
The result then is that my exact location is know everyday and will be
plotted on the web.

The website runs on a cobalt server

As my php knowledge is very limited and I searched the web for a script to
do so I havent found it, could any of you help, as it must be out there!
Thanks for any helpfull contribution.

Frank Schellenberg



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




Re: [PHP] checkbox = POST = array??

2002-08-12 Thread Brent Baisley

I'm doing something very similar on a project I'm working on, except I'm 
using radio buttons. I'm not quite sure what are using the ID for (for 
style sheets or a data ID). If you are using it as a data ID, then you 
can make it part of the topic[] array. So it would look like this:
input type='checkbox' name=topic['45'] value='a value'

Then to process the array, you would do something like this:
while (list($checkboxID,$checkboxValue) = each $topic) {
// Your process code
}

Each check box is then referenced by the two variables $checkboxID and 
$checkboxValue. There are a number of ways ou can do this, really any 
way you would process and array (i.e. foreach). I prefer this way 
because I can give logical names to the array elements I am using.


On Saturday, August 10, 2002, at 02:56 PM, PeterV wrote:

 I,
 I don't have my books here and it's been a while since I did PHP, and 
 google isn't helping:
 How do I code a bunch of checkboxes with id's, and then loop trough the 
 result as an array after POSTing it?
 What I have now:
 input type='checkbox' id='45' name='topic[]' value='45'
 doesn't return an array $topic??
 Thanks,
 Peter

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


--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


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




[PHP] Re: e-mail to mysql database?

2002-08-12 Thread Jome

 In Short: What I need is a php script that reads an email file and split
its
 data to a mysql file.
 A bit longer if you are still interested

 For the following project:
 http://www.crossing-africa.com, a journey I am going to make on a bike.
 What are the plans:

 I am taking a satilite phone and SMS my possition with GPS coordinates
like:
 N50.34.234 E006.45.34 on 23-feb-2003
 I already have a script that translates that sms to an e-mail that looks
the
 same.
 Then what:
 This e-mail needs to be split up like this:
 N50.34.234
 E006.45.34
 23-feb-2003
 and then be insterted into a mysql database.
 The result then is that my exact location is know everyday and will be
 plotted on the web.

 The website runs on a cobalt server

 As my php knowledge is very limited and I searched the web for a script to
 do so I havent found it, could any of you help, as it must be out there!
 Thanks for any helpfull contribution.

Hi Frank,

if you got the above in a string, your best shoot is to use explode, for
example like below:

?
$string = N50.34.234 E006.45.34 on 23-feb-2003;

$data = explode( ,$string);

mysql_query(INSERT INTO table (n,e,this_date)
VALUES('.$data[0].','.$data[1].','.$data[3].'));
?

Read more on php.net/explode, there's also plenty of other string functions
there that may help.

Regards,

Jome



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




[PHP] security login

2002-08-12 Thread Pag


Well, first off sory for a very basic question, but i really dont know 
where else to look for the answer. Heres my dilemma:

I need to code a backend for this site i am building, the backend will 
manage the news for the front page. The database stuff is pretty straight 
forward (so far!), but i need to validate who does the managing, i mean, 
some sort of login for only a few people. I am thinking of using 
username/pass from a table and all that but the thing is, how do i do the 
validating itself? Sure i know how to check for valid user/pass, but then 
what happens for the rest of the pages inside the backend, how do i keep 
the user validated and make sure only he can browse inside that secure 
mini site?
Dont know if i am explaining things right, hmm, ok, any of you guys are 
familiar with gryematter? It validates the user at the start and then we 
can do whatever we want inside. I want to prevent users from skipping the 
login and just typing the other page url and go on from there.
I use sessions, cookies? what? can you provide me with some urls for my 
research, or at least what to look for?
Thanks a lot, really appreciate all the help.

Pag



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




[PHP] Re: Form variables not passing: globals IS on

2002-08-12 Thread Steve Clay

Monday, August 12, 2002, 4:57:36 AM, Petre wrote:
PA to the default php.ini, and have checked it and register_global = On

PHP settings can be altered outside of php.ini (using Apache .htaccess files
for example)  Add this line to page2.php to see the run-time setting:

echo  register_globals is : .ini_get('register_globals');

Something might be wrong with your PHP install if it's a recent
version and $_POST isn't there..  Try print_r($_POST);

PA echo  HTTP_POST_VARS :.$_HTTP_POST_VARS[test].br;

The deprecated POST array is $HTTP_POST_VARS (no preceding underscore).

Steve
-- 
[EMAIL PROTECTED] ** http://mrclay.org


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




Re: [PHP] SQL ?

2002-08-12 Thread Tyler Durdin

My question as to what the AS statement did was just that, a question. It 
works perfectly, but I was curious if I was not completely understanding of 
what it did or if I could make better use of it. As for my reply i feel it 
was completely justified in that my post was on topic. I understand that Dan 
is on here alot just trying to be helpful, but in this case he had no 
intention of being helpful when he posted his reply. The fact is the message 
was on topic and if he had no useful information he should not have posted 
at all. It was never my intention to irritate anyone, just defend my post as 
it was a justified. If we have nothing nice or helpful to post to one 
another, then we should post nothing at all.


From: DL Neil [EMAIL PROTECTED]
To: Tyler Durdin [EMAIL PROTECTED],[EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] SQL ?
Date: Mon, 12 Aug 2002 15:49:45 +0100

Now then, let's all play nicely together!

Dan: relevance
It is a PHP question because whereas the SQL query SELECT fred FROM tbl
produces an array element back in PHP such as $row[ fred ], this
convention/mapping comes well unstuck if you submit something like SELECT 
IF
( answer = 'a', TRUE, FALSE )... or even SELECT fred+barney... Accordingly
the need to create an alias column name (Answer-A) and thereafter in PHP to
access the returned data with something like $row[ Answer-A ].

Tyler: appreciation and politeness
I thought this looked familiar, and it is part of something I sent to you 
36
hours ago to perform cross-totalling on a survey or exam results type
database. Since then there has been no comment from you, except to others.
If the suggestion doesn't work, please have the courtesy to come back to 
me,
at least by cc:, for correction or amplification. NB If you had tested it 
at
the MySQL (?) command line or using a management tool (recommended testing
procedure before implementing in PHP), then you would have observed the
result.

Dan is often here, being helpful. Did you really mean to irritate two 
people
by thoughtlessness if not deed, during the course of a single conversation?
=dn


  Why not just let such a simple question go then? Especially since your
reply
  is also off topic? Also, the question I asked was part of a reply from a
  previous topic. Thanks to all who answered my simple question. It is
  greatly appreciated.

  On Mon, Aug 12, 2002 at 02:15:23PM +, Tyler Durdin wrote:
SELECT *, IF (answer = 'a', TRUE, FALSE) AS  Answer-A
What does the As Answer-A mean and what does it do?
  
  Why not examine the manual for the answer to such a basic question,
  especially one that is off topic for the list you posted to?
  
  Assuming you're using MySQL read 
http://www.mysql.com/doc/en/SELECT.html
  and you'll quickly come across the meaning of AS.



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




_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




[PHP] How to post from a php script

2002-08-12 Thread Rick Horrix

I want to POST variables from one php page to another without any user
interaction.
I can achieve this using header( Location ...?var1=xxvar2=yy ) passing
the vars like a GET, but I don't want the vars to be visible to the user in
the browser address field. Is it possible to do this.

TIA
smartbloke



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




RE: [PHP] Maximum in SQL query?

2002-08-12 Thread Tim Stoop

Hi Jay,

Jay Blanchard wrote:

 I believe the error is a space prior to 'var'
 
 Brunssum, , / var/
 
 try
 
 Brunssum, , /var/

Nope, that wasn't the error, but the error was in there... it's the , , 
in there :) An empty value... Thanks for the quick reply!

-- 
Kind regards,
Tim

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




[PHP] exec / mkdir question

2002-08-12 Thread Javier Montserat

i'm using the following code to create a directory :-

$temp = exec(mkdir $path);

it doesn't work...

i've validated the $path var which is correct.  i suspect it is a 
permissions issue.

what should i look for to resolve this?

thanks,

javier



_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




RE: [PHP] exec / mkdir question

2002-08-12 Thread Daniel Kushner

Try using the mkdir function:
http://www.php.net/manual/en/function.mkdir.php

Daniel Kushner
[EMAIL PROTECTED]

Need hosting? http://www.thehostingcompany.us/


 -Original Message-
 From: Javier Montserat [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 12, 2002 11:29 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] exec / mkdir question
 
 
 i'm using the following code to create a directory :-
 
 $temp = exec(mkdir $path);
 
 it doesn't work...
 
 i've validated the $path var which is correct.  i suspect it is a 
 permissions issue.
 
 what should i look for to resolve this?
 
 thanks,
 
 javier
 
 
 
 _
 Send and receive Hotmail on your mobile device: http://mobile.msn.com
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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




RE: [PHP] security login

2002-08-12 Thread Cal Evans

If it's simple security then you might want to use an .htaccess file instead
of coding something.

More complex solutions involve asking the user for credentials, validating
those credentials and then storing something in the $_SESSION that indicates
that this user has been validated.

It can be something as simple as $_SESSION['isOK'] = true; to creating a
Person object with various credentialling information and storing it.
$_SESSION['currentMember'] = new Person();
$_SESSION['currentMember']-setLogin('myUserName');
$_SESSION['currentMember']-setPassword('someSillyPassword');
$_SESSION['currentMember']-load();
if !$_SESSION['currentMember']-isA('SYSADMIN){
die(Begone form here you freakin' script-kiddie!);
} // if !$_SESSION['currentMember']-isA('SYSADMIN)

// normal code goes here.

In the above example it is assumed that you have created a Person object to
deal with everything.

HTH,

=C=

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


-Original Message-
From: Pag [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 10:12 AM
To: [EMAIL PROTECTED]
Subject: [PHP] security login



Well, first off sory for a very basic question, but i really dont know
where else to look for the answer. Heres my dilemma:

I need to code a backend for this site i am building, the backend will
manage the news for the front page. The database stuff is pretty straight
forward (so far!), but i need to validate who does the managing, i mean,
some sort of login for only a few people. I am thinking of using
username/pass from a table and all that but the thing is, how do i do the
validating itself? Sure i know how to check for valid user/pass, but then
what happens for the rest of the pages inside the backend, how do i keep
the user validated and make sure only he can browse inside that secure
mini site?
Dont know if i am explaining things right, hmm, ok, any of you guys are
familiar with gryematter? It validates the user at the start and then we
can do whatever we want inside. I want to prevent users from skipping the
login and just typing the other page url and go on from there.
I use sessions, cookies? what? can you provide me with some urls for my
research, or at least what to look for?
Thanks a lot, really appreciate all the help.

Pag



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



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




[PHP] Re: How to post from a php script

2002-08-12 Thread Kai Hinkelmann

Create a form only with hidden-fields (your values) and no visible fields or
buttons. The action= is set to the next file, the method ist set to POST
(of course). Don't use php-header to redirect but javasript. If you want to
redirect immediately you can write onLoad=document.forms[0].submit() in
the body tag. Else start a timer at onLoad and call submit() in the
timer-function.

Good luck

Kai


Rick Horrix [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I want to POST variables from one php page to another without any user
 interaction.
 I can achieve this using header( Location ...?var1=xxvar2=yy ) passing
 the vars like a GET, but I don't want the vars to be visible to the user
in
 the browser address field. Is it possible to do this.

 TIA
 smartbloke





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




Re: [PHP] Executing a file with rtf-extension

2002-08-12 Thread Adam Voigt

My guess would be that this is a browser issue, with the
browser associating .rtf with a word doc (or Rich Text to be
more accurate) and if this is the case, there's not much you
can do except not name your PHP files .rtf. Since, each person
who comes to your site will most likely have .rtf set as
a Rich Text Document and will try and interpret it.

Adam Voigt
[EMAIL PROTECTED]

On Mon, 2002-08-12 at 11:44, Kai Hinkelmann wrote:
 Hi,
 
 I want to execute a php-script, which file-extension ist .rtf. Though I
 entered .rtf in the mmc-iis-configuration as a fileextension for php.exe
 %s %s (and restarted the service) the server doesn't start php but sending
 the script uninterpreted back to client (in this case: ms-word).
 
 When I start php from the comandline like php myfile.rtf everything works
 fine and I get the wanted output (on the comandline).
 
 Simple question: where else to enter the fileextension?
 
 Thanks
 
 Kai
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



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




Re: [PHP] SQL ?

2002-08-12 Thread Analysis Solutions

Hi Tyler:

On Mon, Aug 12, 2002 at 02:32:57PM +, Tyler Durdin wrote:

 Why not just let such a simple question go then?

I was being helpful by pointing you to the manual where you could find the
answer to this particular question AND a means of figuring out answers to
future questions.

I was terse because you seemed to have hit on a pet peeve of mine: people
not wanting to figure things out for themselves.  While, of course, I
could be mistaken, your post gave no indication of such efforts.

Now on to a separate pet peeve...

A: No.
Q: Is it okay to top post and not snip out unrelated parts of prior
   posts (let alone the signature lines, etc)?

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] Executing a file with rtf-extension

2002-08-12 Thread Phil Driscoll

On Monday 12 August 2002 3:52 pm, Adam Voigt wrote:
 My guess would be that this is a browser issue, with the
 browser associating .rtf with a word doc (or Rich Text to be
 more accurate) and if this is the case, there's not much you
 can do except not name your PHP files .rtf. Since, each person
 who comes to your site will most likely have .rtf set as
 a Rich Text Document and will try and interpret it.

There may be an issue about what the browser chooses to do with the .rtf 
extension, however if the web server was correctly configured, the php source 
of the .rtf file would not be sent by the server, but would have at least 
been interpreted by php, which would then have sent out the correct mime type 
header to give the browser a chance of interpreting the data as html.

Maybe the iis script mapping configuration is being overridden somewhere in 
the tree by a child node?

Cheers
-- 
Phil Driscoll

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




Re: [PHP] Executing a file with rtf-extension

2002-08-12 Thread Kai Hinkelmann

Yes, that is the intention! The browser SHOULD open WORD (or Wordpad or what
else) and the script should generate the content on the server, independent
from the client.

The problem must lie within IIS- oder PHP-Configuration.

But I don't know, where.

Adam Voigt [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 My guess would be that this is a browser issue, with the
 browser associating .rtf with a word doc (or Rich Text to be
 more accurate) and if this is the case, there's not much you
 can do except not name your PHP files .rtf. Since, each person
 who comes to your site will most likely have .rtf set as
 a Rich Text Document and will try and interpret it.

 Adam Voigt
 [EMAIL PROTECTED]

 On Mon, 2002-08-12 at 11:44, Kai Hinkelmann wrote:
  Hi,
 
  I want to execute a php-script, which file-extension ist .rtf. Though I
  entered .rtf in the mmc-iis-configuration as a fileextension for
php.exe
  %s %s (and restarted the service) the server doesn't start php but
sending
  the script uninterpreted back to client (in this case: ms-word).
 
  When I start php from the comandline like php myfile.rtf everything
works
  fine and I get the wanted output (on the comandline).
 
  Simple question: where else to enter the fileextension?
 
  Thanks
 
  Kai
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 





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




Re: [PHP] Executing a file with rtf-extension

2002-08-12 Thread Kai Hinkelmann

Thanks

but since this one is a testserver there is only one webnode and the script
runs (or runs not :-( ) in this node.

Bye

Kai

Phil Driscoll [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Monday 12 August 2002 3:52 pm, Adam Voigt wrote:
 My guess would be that this is a browser issue, with the
 browser associating .rtf with a word doc (or Rich Text to be
 more accurate) and if this is the case, there's not much you
 can do except not name your PHP files .rtf. Since, each person
 who comes to your site will most likely have .rtf set as
 a Rich Text Document and will try and interpret it.

There may be an issue about what the browser chooses to do with the .rtf
extension, however if the web server was correctly configured, the php
source
of the .rtf file would not be sent by the server, but would have at least
been interpreted by php, which would then have sent out the correct mime
type
header to give the browser a chance of interpreting the data as html.

Maybe the iis script mapping configuration is being overridden somewhere in
the tree by a child node?

Cheers
--
Phil Driscoll



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




Re: [PHP] SQL ?

2002-08-12 Thread Rasmus Lerdorf

I know many people hate top-posts, but when you get 1400+ emails every day
and answer 50+, it sure does speed things up.  Having the relevant text
right up front means I don't have to scroll down to find it.  If I don't
understand the reply and need more context, that's when I scroll down to
see what the reply was all about.  If all I see on my screen when I scan a
message is a bunch of 's I tend to just skip them.  If you want me to
consider a message you need to get to your point really really quickly or
it is an automatic delete for me.

-Rasmus

On Mon, 12 Aug 2002, Analysis  Solutions wrote:

 Hi Tyler:

 On Mon, Aug 12, 2002 at 02:32:57PM +, Tyler Durdin wrote:
 
  Why not just let such a simple question go then?

 I was being helpful by pointing you to the manual where you could find the
 answer to this particular question AND a means of figuring out answers to
 future questions.

 I was terse because you seemed to have hit on a pet peeve of mine: people
 not wanting to figure things out for themselves.  While, of course, I
 could be mistaken, your post gave no indication of such efforts.

 Now on to a separate pet peeve...

 A: No.
 Q: Is it okay to top post and not snip out unrelated parts of prior
posts (let alone the signature lines, etc)?

 --Dan

 --
PHP classes that make web design easier
 SQL Solution  |   Layout Solution   |  Form Solution
 sqlsolution.info  | layoutsolution.info |  formsolution.info
  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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



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




Re: [PHP] Executing a file with rtf-extension

2002-08-12 Thread Adam Voigt

Oh, I think see what your saying now. Why not try
leaving it named a .php file and simply setting the
content disposition to word/rtf or whatever the
appropriate type is? I do that with PDF's, so that
the page you goto is named .php but it auto-loads the
PDF plugin because it see's the content disposition.

Adam Voigt
[EMAIL PROTECTED]

On Mon, 2002-08-12 at 11:56, Kai Hinkelmann wrote:
 Yes, that is the intention! The browser SHOULD open WORD (or Wordpad
or what
 else) and the script should generate the content on the server,
independent
 from the client.
 
 The problem must lie within IIS- oder PHP-Configuration.
 
 But I don't know, where.
 
 Adam Voigt [EMAIL PROTECTED] schrieb im Newsbeitrag
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  My guess would be that this is a browser issue, with the
  browser associating .rtf with a word doc (or Rich Text to be
  more accurate) and if this is the case, there's not much you
  can do except not name your PHP files .rtf. Since, each person
  who comes to your site will most likely have .rtf set as
  a Rich Text Document and will try and interpret it.
 
  Adam Voigt
  [EMAIL PROTECTED]
 
  On Mon, 2002-08-12 at 11:44, Kai Hinkelmann wrote:
   Hi,
  
   I want to execute a php-script, which file-extension ist .rtf.
Though I
   entered .rtf in the mmc-iis-configuration as a fileextension for
 php.exe
   %s %s (and restarted the service) the server doesn't start php
but
 sending
   the script uninterpreted back to client (in this case: ms-word).
  
   When I start php from the comandline like php myfile.rtf
everything
 works
   fine and I get the wanted output (on the comandline).
  
   Simple question: where else to enter the fileextension?
  
   Thanks
  
   Kai
  
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 




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




RE: [PHP] dates greater than 2002-01-18 create error

2002-08-12 Thread Jay Blanchard

[snip]
Anytime I try to add a day to the date 2002-01-18, I get a
Warning: unexpected error in date()
error.
Can anyone shed some light on this.
[/snip]

If you'll shed some code on this, we'll shed some help :^]

Jay


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




[PHP] Thanks - got it

2002-08-12 Thread Kai Hinkelmann

Hi, Phil,

Excuse me, you was right. I changed the mapping for the server but not for
the directory. Now everything works fine.

Thanks again.

Bye

Kai

Phil Driscoll [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Monday 12 August 2002 3:52 pm, Adam Voigt wrote:
 My guess would be that this is a browser issue, with the
 browser associating .rtf with a word doc (or Rich Text to be
 more accurate) and if this is the case, there's not much you
 can do except not name your PHP files .rtf. Since, each person
 who comes to your site will most likely have .rtf set as
 a Rich Text Document and will try and interpret it.

There may be an issue about what the browser chooses to do with the .rtf
extension, however if the web server was correctly configured, the php
source
of the .rtf file would not be sent by the server, but would have at least
been interpreted by php, which would then have sent out the correct mime
type
header to give the browser a chance of interpreting the data as html.

Maybe the iis script mapping configuration is being overridden somewhere in
the tree by a child node?

Cheers
--
Phil Driscoll



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




[PHP] Php lib?

2002-08-12 Thread John Wards

Anyone got any handy hints on how to convert scripts running on PHP3 and
PHPlib?

Its doing my head in!

John Wards
SportNetwork.net


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




[PHP] Re: [PHP-WIN] PDF Files...

2002-08-12 Thread Chris Boget

 Any advice as to which of the above is possible/not possible and if
 not any ways to *mimic* anything.

One thing you can look into is HTMLDoc.  It turns any (well formed)
HTML into a PDF file.  We've been using it for about 6 months and
it works for exactly what we needed it to do.

Chris



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




RE: [PHP] dates greater than 2002-01-18 create error

2002-08-12 Thread Jay Blanchard

[snip]
?
$day = 2038-01-19;

$day_temp = date(d, strtotime($day));
$month_temp = date(m, strtotime($day));
$year_temp = date(Y, strtotime($day));
$temp_date = mktime (0,0,0,$month_temp  ,$day_temp+1 ,$year_temp);
echo date (Y-m-d, $temp_date);

?
[/snip]

I take out '+1' and the result is 1969-12-31
I put in the '+1' and the result is 1970-01-01

I change '2038-01-19' to '2002-01-19' and it works. Which is what the
subject of your message was, not  [PHP] dates greater than 2038-01-18 create
error

HTH!

Jay



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




RE: [PHP] dates greater than 2002-01-18 create error

2002-08-12 Thread Adam Voigt

Dude, did you read the PHP Date manual page?

I quote:

Note:  The valid range of a timestamp is typically from Fri, 13 Dec 1901
20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that
correspond to the minimum and maximum values for a 32-bit signed
integer). On windows this range is limited from 01-01-1970 to
19-01-2038. 

Adam Voigt
[EMAIL PROTECTED]

On Mon, 2002-08-12 at 12:23, Jay Blanchard wrote:
 [snip]
 ?
 $day = 2038-01-19;
 
 $day_temp = date(d, strtotime($day));
 $month_temp = date(m, strtotime($day));
 $year_temp = date(Y, strtotime($day));
 $temp_date = mktime (0,0,0,$month_temp  ,$day_temp+1 ,$year_temp);
 echo date (Y-m-d, $temp_date);
 
 ?
 [/snip]
 
 I take out '+1' and the result is 1969-12-31
 I put in the '+1' and the result is 1970-01-01
 
 I change '2038-01-19' to '2002-01-19' and it works. Which is what the
 subject of your message was, not  [PHP] dates greater than 2038-01-18 create
 error
 
 HTH!
 
 Jay
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



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




Re: [PHP] dates greater than 2002-01-18 create error

2002-08-12 Thread John Wards

right am i missing something or is that not just an other Y2K bug waiting
to happen?

Not that I plan to be coding php in 2038 but my kids might be.:-P

John
- Original Message -
From: Adam Voigt [EMAIL PROTECTED]
To: Jay Blanchard [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, August 12, 2002 5:26 PM
Subject: RE: [PHP] dates greater than 2002-01-18 create error


 Dude, did you read the PHP Date manual page?

 I quote:

 Note:  The valid range of a timestamp is typically from Fri, 13 Dec 1901
 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that
 correspond to the minimum and maximum values for a 32-bit signed
 integer). On windows this range is limited from 01-01-1970 to
 19-01-2038.

 Adam Voigt
 [EMAIL PROTECTED]

 On Mon, 2002-08-12 at 12:23, Jay Blanchard wrote:
  [snip]
  ?
  $day = 2038-01-19;
 
  $day_temp = date(d, strtotime($day));
  $month_temp = date(m, strtotime($day));
  $year_temp = date(Y, strtotime($day));
  $temp_date = mktime (0,0,0,$month_temp  ,$day_temp+1 ,$year_temp);
  echo date (Y-m-d, $temp_date);
 
  ?
  [/snip]
 
  I take out '+1' and the result is 1969-12-31
  I put in the '+1' and the result is 1970-01-01
 
  I change '2038-01-19' to '2002-01-19' and it works. Which is what the
  subject of your message was, not  [PHP] dates greater than 2038-01-18
create
  error
 
  HTH!
 
  Jay
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 



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


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




[PHP] Simple date question

2002-08-12 Thread Dave Leather

I hope this is a simple date question

I am using an MSSQL database, and have a datetime field called start_date
and end_date.  When I use query analyser and do a

SELECT start_date from CF_#orders

The format is
2002-08-11 12:13:44.000

In Php - my code is

?
$qry = Select start_date from CF_#orders;
$rs = mssql_query($qry) or die(Could not query);
$datarow = mssql_fetch_object($rs);

print $datarow-start_date;
?

The format is now
Aug 12 2002 11:14AM

I NEED those seconds to appear in my variable HOW can I get the TRUE
date and time from the sql table into my variable?  Is there a php.ini
variable I need to set... is there some sort of magical command

Please help Thanks VERY much in advance!
Dave




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




[PHP] html parser

2002-08-12 Thread Curtis A. Weyant

Does anyone know of a good PHP HTML parser out there that I can use?

Thanks,
Curtis.


Is your boss reading your email? Probably
Keep your messages private by using Lycos Mail.
Sign up today at http://mail.lycos.com

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




[PHP] Compiling External Modules

2002-08-12 Thread MET

Does anyone know how to build the first_module example shown at Zend
(http://www.zend.com/apidoc/) ?  I'd like to start coding extensions
(preferably not directly into the PHP binary because of my hosting
situation) but just don't understand the explanation of compiling them.

Any one know how?

~ Matthew

 
/**
 
  Matthew Metnetsky
 
  [EMAIL PROTECTED]
 
**/


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




[PHP] picture upload error!

2002-08-12 Thread Djurovski Dejan

I can't upload picture to MySQL database:
What is wrong with my script:
I use PHP  MySQL database.
After submiting form my script says that everything is OK, but in database I
see that a picture is not uploaded.(date, size, name, type are inputed, but
data is not!).

Table:

CREATE TABLE pictures (
picture_id int(11) DEFAULT '0' NOT NULL,
name varchar(30) NOT NULL,
date datetime DEFAULT '-00-00 00:00:00' NOT NULL,
pic_data mediumblob NOT NULL,
pic_size int(11) DEFAULT '0' NOT NULL,
pic_type varchar(30) NOT NULL,
PRIMARY KEY (picture_id)
);



My PHP page:


?php
include_once(db_mysql.php);
class pictures_db extends DB_Sql
{
var $Host=localhost;
var $Database=sajt;
var $User=root;
var $Password=;
}
$aErrors=False;
if (!empty($PicFile_name))
{
if ( ($PicFile_type == image/gif) ||
($PicFile_type == image/pjpeg) ||
($PicFile_type == image/jpeg))
{
$aFile=fopen($PicFile, rb);
$aFileContents=addslashes(fread($aFile, filesize($PicFile)));
fclose($aFile);
$aDB=new pictures_db();
$aSQL=select(max(picture_id) + 1) as new_id from pictures;
$aDB-query($aSQL);
if ($aDB-next_record() )
{
$aNewID=$aDB-f(new_id);
}
if(empty($aNewID) == True)
{
$aNewID=1;
}
$aSQL=insert into pictures (picture_id, name, .
date, pic_data, ;
$aSQL .=pic_size, pic_type) values ($aNewID, .
'$PicName', ;
$aSQL .= NOW(), '$aFileContents', '$PicFile_size', .
'$PicFile_type' );
print($aSQL);
$aDB-query($aSQL);
if ($aDB-Errno != 0)
{
$aErrors = True;
}
}
else
{
$aErrors= True;
}
}
else
{
$aErrors = True;
}
if ($aErrors == False)
{
print(OK);
}
else
{
print(ERROR!!!);
}
?


 -
 -
 Ðurovski Dejan
   [EMAIL PROTECTED]




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




[PHP] proba

2002-08-12 Thread Djurovski Dejan

proba



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




[PHP] Re: How to post from a php script

2002-08-12 Thread Rick Horrix

Thanks for your reply, but I can see a couple of potential problems with
this ;-
1) This relies on the user having javascript enabled in their browser
settings.
2) The page has to be fully loaded in the client browser before the redirect
takes place, this means it will perform more slowly than a server side
redirect.

Is this the only solution or are there other work-arounds ?

Thanks
Rick

Kai Hinkelmann [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Create a form only with hidden-fields (your values) and no visible fields
or
 buttons. The action= is set to the next file, the method ist set to POST
 (of course). Don't use php-header to redirect but javasript. If you want
to
 redirect immediately you can write onLoad=document.forms[0].submit() in
 the body tag. Else start a timer at onLoad and call submit() in the
 timer-function.

 Good luck

 Kai


 Rick Horrix [EMAIL PROTECTED] schrieb im Newsbeitrag
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I want to POST variables from one php page to another without any user
  interaction.
  I can achieve this using header( Location ...?var1=xxvar2=yy )
passing
  the vars like a GET, but I don't want the vars to be visible to the user
 in
  the browser address field. Is it possible to do this.
 
  TIA
  smartbloke
 
 





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




RE: [PHP] Pairing algorithm?

2002-08-12 Thread Chad Day

I found a pairing algorithm finally via Google in C that I've been trying to
translate over into PHP, with no success (seemingly creates an infinite
loop).  I'm also surprised I haven't seen it in PHP yet.. thought someone
would have done it by now.

http://www.devenezia.com/downloads/round-robin/

And the source for that:

http://www.devenezia.com/downloads/round-robin/schedule-source.html

I'm still mucking around with it, but I don't know C very well, so I'm sure
there's a few bugs in my translation of it that's causing the infinite loop
in PHP, I'm just still trying to track it down..

Here's the code I very quickly tried to translate over, surely to be
littered with errors:

?

$teams = 10;
$MaxTeams = 50;

$combinations = ($teams/2 * ($teams-1));

$m = 1;
for ($a = 1; $a  $teams; $a++) {
for ($b = ($a+1); $b = $teams; $b++) {
$clist[$m][one] = $a;
$clist[$m][two] = $b;
$m++;
}
}

$roundcount = 1;
$index = 1;


while ($roundcount = $teams-1) {
$matchcount = 1;
$round_set = 0;
for ($i = 0; $i = $MaxTeams/2; $i++) {
$mlist[$i] = 0;
}

$startC = $roundcount;
while ($matchcount = $teams/2) {
$c = ($combinations + 1);
while ($c  $combinations) {
$c = $startC;
while (($c = $combinations)  ($round_set  (1  
$clist[$c][one])) ||
($round_set  (1  $clist[$c][two])) || ($cused[$c])) 
{
$c++;
}

if ($c  $combinations) {
do {
$mlist[$matchcount] = 0;
$matchcount--;
$index--;

$round_set = ~(1  
$cList[$mList[$matchCount]][one]);
$round_set = ~(1  
$cList[$mList[$matchCount]][two]);

$cUsed[$mList[$matchCount]] = FALSE;

$tourn[$index][one] = 0;
$tourn[$index][two] = 0;

} while ($clist[$mlist[$matchcount]][one] !=
$clist[$mlist[$matchcount]+1][one]);

$startc = $mlist[$matchcount] + 1;
}

}
$tourn[$index] = $clist[$c];
$totalchecks++;
if (($totalchecks % 1000) == 0) {
}

$cused[$c] = TRUE;
$mlist[$matchcount] = $c;

$startc = 1;

$round_set |= (1  $clist[$c][one]);
$round_set |= (1  $clist[$c][two]);

$index++;
$matchcount++;
}
$roundcount++;
}

?



-Original Message-
From: Bas Jobsen [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 12:19 PM
To: Chad Day
Subject: Re: [PHP] Pairing algorithm?


Hi

Never Seen it in php. There are many variants, mostly depending on your
needs.
Do you have the algorithm you want in pseudo code?




Op maandag 12 augustus 2002 16:24, schreef Chad Day:
 Has anyone written any sort of pairing algorithm for a round robin sports
 schedule, or something similar?  I couldn't find anything in the archives
 surprisingly, and I'm looking around google and not turning up much except
 some PDFs and white papers addressing the mathmatical complications of it.

 Thanks,
 Chad


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




[PHP] Strip PHP tags

2002-08-12 Thread Remy Dufour

Hi all,

Is there an easy way to remove ?php...? tag from a string ?
Ive got this script and i want it to output only html...
I know i can do this with regular expression but i wonder if there are some
native function to do the job.

?php
$out = implode(\n, file ($_SERVER['PATH_TRANSLATED']));
echo function_to_remove_php_tags($out);
exit();
?
html
head
titleTest/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head
body bgcolor=#FF text=#00
Hello !!!
/body
/html

Regards !

Rémy Dufour


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




Re: [PHP] Re: How to post from a php script

2002-08-12 Thread Jason Wong

On Tuesday 13 August 2002 01:11, Rick Horrix wrote:
 Thanks for your reply, but I can see a couple of potential problems with
 this ;-
 1) This relies on the user having javascript enabled in their browser
 settings.
 2) The page has to be fully loaded in the client browser before the
 redirect takes place, this means it will perform more slowly than a server
 side redirect.

 Is this the only solution or are there other work-arounds ?

Archives - post from php

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
A mushroom cloud has no silver lining.
*/


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




[PHP] Some questions.

2002-08-12 Thread mintbaggio

Hello
I'm a Chinese university student,I want to ask some questions about session.
These days I'm build a website for my university with PHP, But I meet a 
question when I develop the part of User Management: After I have log out 
from a user page(I use session_unset() and session_destroy()),I can 
return to the page again by click the button Backto that pagea and refresh 
it, the user page can be shown again. This is unsafe.
So I want to ask that the function session_unset and session_destroy() will
destroy session immediately or there is a life-time for session. In my memory,
I think that there is a life-time for session and the life-time can be configured.

Another question:
If the user log page is main.php,the page for authenticate the user is login.php
I use session to store the infomation of user such as :
session_register($userid);
But if the variables in the session are unfortunately be known by somebody else.
and he can visit others' information bye the url:login.php?userid=***,how can solve
these problem? use a ugly but difficult session varable?

Just two questions.
Thanks a lot.
Wish back soon!
Best wishes




Re: [PHP] SQL ?

2002-08-12 Thread Jason Wong

On Monday 12 August 2002 23:53, Analysis  Solutions wrote:
 Hi Tyler:

 On Mon, Aug 12, 2002 at 02:32:57PM +, Tyler Durdin wrote:
  Why not just let such a simple question go then?

It was clearly a question that had nowt to do with PHP. Even your subsequent 
posts defending your position insisting that was a continuation of an earlier 
thread does not change the fact that it is a non-PHP question.

This is a pretty high volume list. It only works if people like Dan graciously 
give up their time to read the list and help where possible. If the list was 
full of off-topic posts then I'm pretty sure that the experienced users would 
be pretty p*ssed off and leave the list. 

 I was being helpful by pointing you to the manual where you could find the
 answer to this particular question AND a means of figuring out answers to
 future questions.

Some people like their answers on a plate -- you should've copied and pasted 
the relevant section/chapter from the manual. 

sarcasm
  Now _that_ is being helpful 
/sarcasm

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
No one can have a higher opinion of him than I have, and I think he's a
dirty little beast.
-- W.S. Gilbert
*/


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




Re: [PHP] SQL ?

2002-08-12 Thread Jason Wong

On Tuesday 13 August 2002 00:03, Rasmus Lerdorf wrote:
 I know many people hate top-posts, but when you get 1400+ emails every day
 and answer 50+, it sure does speed things up.  

It probably depends.

 Having the relevant text
 right up front means I don't have to scroll down to find it.  

Having the relevant text AND the context up front is even more useful.

 If I don't
 understand the reply and need more context, that's when I scroll down to
 see what the reply was all about.  

IMHO that wastes even more time.

 If all I see on my screen when I scan a
 message is a bunch of 's I tend to just skip them.  

I contend that if people trim, quote and reply properly then in most cases all 
the info and context will be available in the first screenful of the 
message.



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




Re: [PHP] SQL ?

2002-08-12 Thread Rasmus Lerdorf

If I have to do that for every reply then I will only reply to half as
many messages each day.

On Tue, 13 Aug 2002, Jason Wong wrote:

 On Tuesday 13 August 2002 00:03, Rasmus Lerdorf wrote:
  I know many people hate top-posts, but when you get 1400+ emails every day
  and answer 50+, it sure does speed things up.

 It probably depends.

  Having the relevant text
  right up front means I don't have to scroll down to find it.

 Having the relevant text AND the context up front is even more useful.

  If I don't
  understand the reply and need more context, that's when I scroll down to
  see what the reply was all about.

 IMHO that wastes even more time.

  If all I see on my screen when I scan a
  message is a bunch of 's I tend to just skip them.

 I contend that if people trim, quote and reply properly then in most cases all
 the info and context will be available in the first screenful of the
 message.



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



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




RE: [PHP] exec / mkdir question

2002-08-12 Thread Simon Ritchie

  i'm using the following code to create a directory :-
 
  $temp = exec(mkdir $path);
 
  it doesn't work...
 
  i've validated the $path var which is correct.  i suspect it is a
  permissions issue.
 
  what should i look for to resolve this?


 Try using the mkdir function:


That is good practice, but if the problem is with the  permissions, the
program will just be better written when it fails.

A note of the error message and some information about the host environment
would help.  However ...

The user running the PHP script needs to be able to create the file.  If
this is a UNIX system and the web server is run by the user nobody, then
that user needs write access to the directory which will contain the file.
To grant that access, your user (the one you, er, use to connect to the
server) must own the directory

The worst case is when your user and the web server user are not in the same
group.  In that case, you will need to grant write access to all users.
This introduces potential security risks - any user can also remove or
rename files in that directory.

Simon Ritchie

Download my introduction to PHP for $25:
http://merrowinternet.com/downloads?source=ml


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




RE: [PHP] exec / mkdir question

2002-08-12 Thread Brian V Bonini

Just curious, any reason you don't use the mkdir function/

mkdir (/path/to/my/dir, 0700);

-Brian

 -Original Message-
 From: Simon Ritchie [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 12, 2002 2:50 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] exec / mkdir question


   i'm using the following code to create a directory :-
  
   $temp = exec(mkdir $path);
  
   it doesn't work...
  
   i've validated the $path var which is correct.  i suspect it is a
   permissions issue.
  
   what should i look for to resolve this?

 
  Try using the mkdir function:


 That is good practice, but if the problem is with the  permissions, the
 program will just be better written when it fails.

 A note of the error message and some information about the host
 environment
 would help.  However ...

 The user running the PHP script needs to be able to create the file.  If
 this is a UNIX system and the web server is run by the user nobody, then
 that user needs write access to the directory which will contain the file.
 To grant that access, your user (the one you, er, use to connect to the
 server) must own the directory

 The worst case is when your user and the web server user are not
 in the same
 group.  In that case, you will need to grant write access to all users.
 This introduces potential security risks - any user can also remove or
 rename files in that directory.

 Simon Ritchie

 Download my introduction to PHP for $25:
 http://merrowinternet.com/downloads?source=ml


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



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




Re: [PHP] Some questions.

2002-08-12 Thread Daniel Massón

hi there

1= session_unset ans session_destroy do destroy all data of a session but 
they do not destroy the cookie stored in the browser, you have two chioces:

-alter the option session.cookie_lifetime en php.ini the default is '0' 
seconds.
-after using session_unset(); and session_destroy(); use this:
setcookie(PHPSESSID,,,/);


2= you can use the session_id() as a GET parameter and compare with the 
real session_id() like this main.php?login=danielses=*** , the session 
id is always a long string containing alphanumeric characters and you can 
compare like this

if ($_GET[login] == $registered_login  $_GET[ses] == session_id())
// ok autenticated
else
// error: not autenticated



From: mintbaggio [EMAIL PROTECTED]
To: 
Subject: [PHP] Some questions.
Date: Tue, 13 Aug 2002 01:42:55 +0800

Hello
I'm a Chinese university student,I want to ask some questions about 
session.
These days I'm build a website for my university with PHP, But I meet a
question when I develop the part of User Management: After I have log out
from a user page(I use session_unset() and session_destroy()),I can
return to the page again by click the button Backto that pagea and 
refresh
it, the user page can be shown again. This is unsafe.
So I want to ask that the function session_unset and session_destroy() 
will
destroy session immediately or there is a life-time for session. In my 
memory,
I think that there is a life-time for session and the life-time can be 
configured.

Another question:
If the user log page is main.php,the page for authenticate the user is 
login.php
I use session to store the infomation of user such as :
session_register($userid);
But if the variables in the session are unfortunately be known by somebody 
else.
and he can visit others' information bye the url:login.php?userid=***,how 
can solve
these problem? use a ugly but difficult session varable?

Just two questions.
Thanks a lot.
Wish back soon!
Best wishes






Daniel

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




[PHP] $HTTP_SESSION_VARS vs $_SESSION

2002-08-12 Thread Petre Agenbag

Hi
Me again

Still having problems with forms not sending variables, and session
variables dissapearing.

I have 2 systems, one older 4.0.3 PHP which is my main webserver, so all
scripts must comply with it...
And the other my development server with the latest 4.1.2

So, I'm trying to write scripts that will happily work on both, and I
understand that I must use HTTP_POST_VARS and HTTP_SESSION_VARS in order
to comply with 4.0.3.

register_globals and track_vars as well as trans_sid are enabled on
both.

Now, take a look at the example below:
index.php

form action=page2.php method=POST 
  input type=text name=testinput type=submit name=submit
/form


page2.php

?php
session_start();
echo ' HTTP_POST_VARS :'.$HTTP_POST_VARS[test].'br';
echo ' POST_VARS: '.$_POST[test].'br';
echo ' normal test :'.$test.'br';
echo 'Session Value (only for
re-entry):'.$HTTP_SESSION_VARS[testing].'br';

if ($HTTP_POST_VARS[test]) {
$HTTP_SESSION_VARS[testing] = $HTTP_POST_VARS[test];
}
echo 'a href=page3.phpClick/a';
?

page3.php

?php
session_start();
echo 'Session Variable:'.$HTTP_SESSION_VARS[testing].'br';
echo 'a href=page4.phpForward to test sess var further/abr';
echo 'a href=page2.phpBack to test sess var/abr';
?

page4.php

?php
session_start();
echo 'Session Variable:'.$HTTP_SESSION_VARS[testing].'br';
echo 'a href=page3.phpBack to page 3 to test sess var
further/abr';
echo 'a href=page2.phpBack to page 2 to test sess var/abr';
?

This small test works 100% on my newer system, and I was under the
impression that I coded it to be backwards compatible with my older
system, BUT, 

look here: http://www.linuxhelp.co.za/session_test to see what it does
on my working server. The scripts are identical.

Please can you point out my mistakes in reasoning?

Also, I want these scripts to work regardless of cookies, so if you see
something that might cause problems when ppl disable cookies, plz
advise.



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




Re: [PHP] Whois...

2002-08-12 Thread Peter J. Schoenster

On 12 Aug 2002 at 20:48, Christian Ista wrote:

 Hello,
 
 I'd like to implement on my web site an whois to know the information
 about a domain name (.com, org, )
 
 Could you tell me how to do that ?


http://promoxy.mirrors.phpclasses.org/search.html?words=whoisgo_search=1

http://promoxy.mirrors.phpclasses.org/browse.html/package/360.html

 The Whois class uses one simple method for looking up almost all domain
 names accross the globe

There you go. Register with phpclasses.org, costs nothing for now. Take a look at how 
the guy did his. If it works, be happy. If you 
reckon it could be better you might want to enter into a dialogue with the author. Try 
to avoid spinning your own wheels when others 
have already done so.

And here is another one:

http://pear.php.net/package-info.php?pacid=13


 The PEAR::Net_Whois class provides a tool for querying Whois Servers



Peter






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




Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION

2002-08-12 Thread Rasmus Lerdorf

If register_globals is known to be on, why are you worrying about
the $HTTP_* arrays?

On 12 Aug 2002, Petre Agenbag wrote:

 Hi
 Me again

 Still having problems with forms not sending variables, and session
 variables dissapearing.

 I have 2 systems, one older 4.0.3 PHP which is my main webserver, so all
 scripts must comply with it...
 And the other my development server with the latest 4.1.2

 So, I'm trying to write scripts that will happily work on both, and I
 understand that I must use HTTP_POST_VARS and HTTP_SESSION_VARS in order
 to comply with 4.0.3.

 register_globals and track_vars as well as trans_sid are enabled on
 both.

 Now, take a look at the example below:
 index.php

 form action=page2.php method=POST 
   input type=text name=testinput type=submit name=submit
 /form


 page2.php

 ?php
 session_start();
 echo ' HTTP_POST_VARS :'.$HTTP_POST_VARS[test].'br';
 echo ' POST_VARS: '.$_POST[test].'br';
 echo ' normal test :'.$test.'br';
 echo 'Session Value (only for
 re-entry):'.$HTTP_SESSION_VARS[testing].'br';

 if ($HTTP_POST_VARS[test]) {
 $HTTP_SESSION_VARS[testing] = $HTTP_POST_VARS[test];
 }
 echo 'a href=page3.phpClick/a';
 ?

 page3.php

 ?php
 session_start();
 echo 'Session Variable:'.$HTTP_SESSION_VARS[testing].'br';
 echo 'a href=page4.phpForward to test sess var further/abr';
 echo 'a href=page2.phpBack to test sess var/abr';
 ?

 page4.php

 ?php
 session_start();
 echo 'Session Variable:'.$HTTP_SESSION_VARS[testing].'br';
 echo 'a href=page3.phpBack to page 3 to test sess var
 further/abr';
 echo 'a href=page2.phpBack to page 2 to test sess var/abr';
 ?

 This small test works 100% on my newer system, and I was under the
 impression that I coded it to be backwards compatible with my older
 system, BUT,

 look here: http://www.linuxhelp.co.za/session_test to see what it does
 on my working server. The scripts are identical.

 Please can you point out my mistakes in reasoning?

 Also, I want these scripts to work regardless of cookies, so if you see
 something that might cause problems when ppl disable cookies, plz
 advise.



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



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




[PHP] erwt

2002-08-12 Thread Djurovski Dejan

trerter



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




RE: [PHP] Whois...

2002-08-12 Thread Steven

The tutorial at DevShed should provide the answers your looking for

http://www.devshed.com/Server_Side/PHP/whois/page1.html

-Original Message-
From: Christian Ista [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 12:08 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Whois...


 http://www.easydns.com/~markjr/whois2/

Hello Steven,

Thanks,

But I don't understand wich files I have to use. In the FAQ, they talk
about a package, I don't see it.

Christian, 





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




Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION

2002-08-12 Thread Petre Agenbag

You lost me there...
Are you saying I don't need to access those variable in that way?
Can I simply use $variable in successive pages then?
Surely I MUST use that notation to assign values then right?, specially
to the session vars, right?

But, just out of curiosity, why does it work fine on my newer system?

Thanks

On Mon, 2002-08-12 at 21:17, Rasmus Lerdorf wrote:
 If register_globals is known to be on, why are you worrying about
 the $HTTP_* arrays?
 
 On 12 Aug 2002, Petre Agenbag wrote:
 
  Hi
  Me again
 
  Still having problems with forms not sending variables, and session
  variables dissapearing.
 
  I have 2 systems, one older 4.0.3 PHP which is my main webserver, so all
  scripts must comply with it...
  And the other my development server with the latest 4.1.2
 
  So, I'm trying to write scripts that will happily work on both, and I
  understand that I must use HTTP_POST_VARS and HTTP_SESSION_VARS in order
  to comply with 4.0.3.
 
  register_globals and track_vars as well as trans_sid are enabled on
  both.
 
  Now, take a look at the example below:
  index.php
 
  form action=page2.php method=POST 
input type=text name=testinput type=submit name=submit
  /form
 
 
  page2.php
 
  ?php
  session_start();
  echo ' HTTP_POST_VARS :'.$HTTP_POST_VARS[test].'br';
  echo ' POST_VARS: '.$_POST[test].'br';
  echo ' normal test :'.$test.'br';
  echo 'Session Value (only for
  re-entry):'.$HTTP_SESSION_VARS[testing].'br';
 
  if ($HTTP_POST_VARS[test]) {
  $HTTP_SESSION_VARS[testing] = $HTTP_POST_VARS[test];
  }
  echo 'a href=page3.phpClick/a';
  ?
 
  page3.php
 
  ?php
  session_start();
  echo 'Session Variable:'.$HTTP_SESSION_VARS[testing].'br';
  echo 'a href=page4.phpForward to test sess var further/abr';
  echo 'a href=page2.phpBack to test sess var/abr';
  ?
 
  page4.php
 
  ?php
  session_start();
  echo 'Session Variable:'.$HTTP_SESSION_VARS[testing].'br';
  echo 'a href=page3.phpBack to page 3 to test sess var
  further/abr';
  echo 'a href=page2.phpBack to page 2 to test sess var/abr';
  ?
 
  This small test works 100% on my newer system, and I was under the
  impression that I coded it to be backwards compatible with my older
  system, BUT,
 
  look here: http://www.linuxhelp.co.za/session_test to see what it does
  on my working server. The scripts are identical.
 
  Please can you point out my mistakes in reasoning?
 
  Also, I want these scripts to work regardless of cookies, so if you see
  something that might cause problems when ppl disable cookies, plz
  advise.
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 


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




Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION

2002-08-12 Thread Petre Agenbag

Oh, almost forgot,
I *think* the reason why I'm still worrying about the $HTTP_* arrays are
because I *think* that it is the correct way to work with the vars once
register_globals is turned off ( which is where things are moving to
right?), and I don't want to re-code my scripts... 
Am I making sense?

On Mon, 2002-08-12 at 21:17, Rasmus Lerdorf wrote:
 If register_globals is known to be on, why are you worrying about
 the $HTTP_* arrays?
 
 On 12 Aug 2002, Petre Agenbag wrote:
 
  Hi
  Me again
 
  Still having problems with forms not sending variables, and session
  variables dissapearing.
 
  I have 2 systems, one older 4.0.3 PHP which is my main webserver, so all
  scripts must comply with it...
  And the other my development server with the latest 4.1.2
 
  So, I'm trying to write scripts that will happily work on both, and I
  understand that I must use HTTP_POST_VARS and HTTP_SESSION_VARS in order
  to comply with 4.0.3.
 
  register_globals and track_vars as well as trans_sid are enabled on
  both.
 
  Now, take a look at the example below:
  index.php
 
  form action=page2.php method=POST 
input type=text name=testinput type=submit name=submit
  /form
 
 
  page2.php
 
  ?php
  session_start();
  echo ' HTTP_POST_VARS :'.$HTTP_POST_VARS[test].'br';
  echo ' POST_VARS: '.$_POST[test].'br';
  echo ' normal test :'.$test.'br';
  echo 'Session Value (only for
  re-entry):'.$HTTP_SESSION_VARS[testing].'br';
 
  if ($HTTP_POST_VARS[test]) {
  $HTTP_SESSION_VARS[testing] = $HTTP_POST_VARS[test];
  }
  echo 'a href=page3.phpClick/a';
  ?
 
  page3.php
 
  ?php
  session_start();
  echo 'Session Variable:'.$HTTP_SESSION_VARS[testing].'br';
  echo 'a href=page4.phpForward to test sess var further/abr';
  echo 'a href=page2.phpBack to test sess var/abr';
  ?
 
  page4.php
 
  ?php
  session_start();
  echo 'Session Variable:'.$HTTP_SESSION_VARS[testing].'br';
  echo 'a href=page3.phpBack to page 3 to test sess var
  further/abr';
  echo 'a href=page2.phpBack to page 2 to test sess var/abr';
  ?
 
  This small test works 100% on my newer system, and I was under the
  impression that I coded it to be backwards compatible with my older
  system, BUT,
 
  look here: http://www.linuxhelp.co.za/session_test to see what it does
  on my working server. The scripts are identical.
 
  Please can you point out my mistakes in reasoning?
 
  Also, I want these scripts to work regardless of cookies, so if you see
  something that might cause problems when ppl disable cookies, plz
  advise.
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 


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




[PHP] Exploding Zip Codes! (Using PHP's explode function)

2002-08-12 Thread Keith Posehn

I have a huge block of zip codes I need to seperate into their constituent
parts for a query of a database. The block looks like this (in part):

|  36310  ABBEVILLE  |
|  35440  ABERNANT  |
|  35005  ADAMSVILLE  |
|  35540  ADDISON  |
|  35006  ADGER  |
|  35441  AKRON  |

I need to use eplode (probably) to seperate this all out into two arrays,
one of codes, the other of names--presumably named $zips[] and $cities[]
with the rest of the data dumped.

I have gone and looked at the various functions docs at php.net, but they
haven't really helped to answer my question as much as I would like. Any
information is appreciated.

Thanks



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




[PHP] Re: Some questions.

2002-08-12 Thread Mitja Stepan

Perhaps this might help: http://www.php.net/manual/en/function.ini-set.php


  session.save_path /tmp PHP_INI_ALL
  session.name PHPSESSID PHP_INI_ALL
  session.save_handler files PHP_INI_ALL
  session.auto_start 0 PHP_INI_ALL
  session.gc_probability 1 PHP_INI_ALL
  session.gc_maxlifetime 1440 PHP_INI_ALL
  session.serialize_handler php PHP_INI_ALL
  session.cookie_lifetime 0 PHP_INI_ALL
  session.cookie_path / PHP_INI_ALL
  session.cookie_domain  PHP_INI_ALL
  session.cookie_secure  PHP_INI_ALL
  session.use_cookies 1 PHP_INI_ALL
  session.use_only_cookies 0 PHP_INI_ALL
  session.referer_check  PHP_INI_ALL
  session.entropy_file  PHP_INI_ALL
  session.entropy_length 0 PHP_INI_ALL
  session.cache_limiter nocache PHP_INI_ALL
  session.cache_expire 180 PHP_INI_ALL
  session.use_trans_sid 1 PHP_INI_ALL
  session.encode_sources globals track



Use ini_set to modify these settings...

Regards,
Mitja



Mintbaggio [EMAIL PROTECTED] wrote in message
000801c24227$b4d1c7c0$[EMAIL PROTECTED]">news:000801c24227$b4d1c7c0$[EMAIL PROTECTED]...
 Hello
 I'm a Chinese university student,I want to ask some questions about
session.
 These days I'm build a website for my university with PHP, But I meet a
 question when I develop the part of User Management: After I have log out
 from a user page(I use session_unset() and session_destroy()),I can
 return to the page again by click the button Backto that pagea and
refresh
 it, the user page can be shown again. This is unsafe.
 So I want to ask that the function session_unset and session_destroy()
will
 destroy session immediately or there is a life-time for session. In my
memory,
 I think that there is a life-time for session and the life-time can be
configured.

 Another question:
 If the user log page is main.php,the page for authenticate the user is
login.php
 I use session to store the infomation of user such as :
 session_register($userid);
 But if the variables in the session are unfortunately be known by somebody
else.
 and he can visit others' information bye the
url:login.php?userid=***,how can solve
 these problem? use a ugly but difficult session varable?

 Just two questions.
 Thanks a lot.
 Wish back soon!
 Best wishes





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




RE: [PHP] exec / mkdir question

2002-08-12 Thread vic

// Create user directory
/* $user-id is a variable that contains the use name from a form field,
that's how I name my new directories, u can use whateve u want*/
mkdir ( /path/to/dir/$user_id, 0755 )
or die ( Could not create custom user directory. );

- Vic


-Original Message-
From: Simon Ritchie [mailto:[EMAIL PROTECTED]] 
Sent: Monday, August 12, 2002 2:50 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] exec / mkdir question

  i'm using the following code to create a directory :-
 
  $temp = exec(mkdir $path);
 
  it doesn't work...
 
  i've validated the $path var which is correct.  i suspect it is a
  permissions issue.
 
  what should i look for to resolve this?


 Try using the mkdir function:


That is good practice, but if the problem is with the  permissions, the
program will just be better written when it fails.

A note of the error message and some information about the host
environment
would help.  However ...

The user running the PHP script needs to be able to create the file.  If
this is a UNIX system and the web server is run by the user nobody, then
that user needs write access to the directory which will contain the
file.
To grant that access, your user (the one you, er, use to connect to the
server) must own the directory

The worst case is when your user and the web server user are not in the
same
group.  In that case, you will need to grant write access to all users.
This introduces potential security risks - any user can also remove or
rename files in that directory.

Simon Ritchie

Download my introduction to PHP for $25:
http://merrowinternet.com/downloads?source=ml


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

__ 
Post your ad for free now! http://personals.yahoo.ca

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




Re: [PHP] PHPS on apache 2

2002-08-12 Thread FileCop

I found out, that phps isn't supported for apache 2 before php 4.3.x or so
Analysis  Solutions [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Sat, Aug 10, 2002 at 07:38:05PM +0200, FileCop wrote:
 
  I have installed apache 2.0.39 and php 4.2.2 on a windows maschine (yes
I
  know that sucks). I have added the AddType
application/x-httpd-php-source
  .phps line to my httpd.conf file, but .phps does not work.

 Did you add the corresponding Action and ScriptAlias lines to the
 configuration file as well?  If so, what do you have in there for them?

 --Dan

 --
PHP classes that make web design easier
 SQL Solution  |   Layout Solution   |  Form Solution
 sqlsolution.info  | layoutsolution.info |  formsolution.info
  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409



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




Re: [PHP] passing an array in a form element

2002-08-12 Thread David T-G

Mark, et al --

...and then Mark Charette said...
% 
% I use
% 
% $data=base64_encode(serialize($array_name));
% 
% to send and
% 
% $array_name=unserialize(base64_decode($data));
% 
% to receive.

Aha!  Yes, that works nicely; thanks.  Now to go and see how they work to
see if I need the base64 stuff; that sounds safest to me.


% 
% $data can be passed via a hidden INPUT field.

Right.


Thanks, all; I'll be sure to poke at the other ideas as well.

:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg75153/pgp0.pgp
Description: PGP signature


Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION

2002-08-12 Thread Rasmus Lerdorf

No, you don't need to use HTTP_SESSION_VARS for anything if
register_globals is on.  Sessions are very simple.  You start a session,
and you register variables to be part of that session.  Like this:

 session_start();
 session_register('a');
 session_register('b');

If you have that at the top of the first page, then whatever values $a and
$b have by the time the script finishes is what will be written to the
session backend.

So, on a subsequent page you just do:

 session_start();

This will see the session ID that the browser passed to it either via a
cookie or in the URL and it will go and restore the variables from the
session backend.  That means that at this point you can just do:

 echo $a;
 echo $b;

At no point is there any need for $HTTP_SESSION_VARS nor $_SESSION if you
are sure that register_globals will always be on.

Now, if you want it to work with register_globals off, you still don't
need to use $HTTP_SESSION_VARS when setting the variables, you only need
to use it when retrieving them.  So, instead of echo $a and echo $b you
would have:

 echo $HTTP_SESSION_VARS['a'];
 echo $HTTP_SESSION_VARS['b'];

Or, of course in newer PHP's you can use $_SESSION['a'].

Your stuff probably didn't work because you were setting the session vars
via the $HTTP_SESSION_VARS array.  That works now, but it probably didn't
use to as it is a bit of a weird way to do it.

-Rasmus

On 12 Aug 2002, Petre Agenbag wrote:

 You lost me there...
 Are you saying I don't need to access those variable in that way?
 Can I simply use $variable in successive pages then?
 Surely I MUST use that notation to assign values then right?, specially
 to the session vars, right?

 But, just out of curiosity, why does it work fine on my newer system?

 Thanks

 On Mon, 2002-08-12 at 21:17, Rasmus Lerdorf wrote:
  If register_globals is known to be on, why are you worrying about
  the $HTTP_* arrays?
 
  On 12 Aug 2002, Petre Agenbag wrote:
 
   Hi
   Me again
  
   Still having problems with forms not sending variables, and session
   variables dissapearing.
  
   I have 2 systems, one older 4.0.3 PHP which is my main webserver, so all
   scripts must comply with it...
   And the other my development server with the latest 4.1.2
  
   So, I'm trying to write scripts that will happily work on both, and I
   understand that I must use HTTP_POST_VARS and HTTP_SESSION_VARS in order
   to comply with 4.0.3.
  
   register_globals and track_vars as well as trans_sid are enabled on
   both.
  
   Now, take a look at the example below:
   index.php
  
   form action=page2.php method=POST 
 input type=text name=testinput type=submit name=submit
   /form
  
  
   page2.php
  
   ?php
   session_start();
   echo ' HTTP_POST_VARS :'.$HTTP_POST_VARS[test].'br';
   echo ' POST_VARS: '.$_POST[test].'br';
   echo ' normal test :'.$test.'br';
   echo 'Session Value (only for
   re-entry):'.$HTTP_SESSION_VARS[testing].'br';
  
   if ($HTTP_POST_VARS[test]) {
   $HTTP_SESSION_VARS[testing] = $HTTP_POST_VARS[test];
   }
   echo 'a href=page3.phpClick/a';
   ?
  
   page3.php
  
   ?php
   session_start();
   echo 'Session Variable:'.$HTTP_SESSION_VARS[testing].'br';
   echo 'a href=page4.phpForward to test sess var further/abr';
   echo 'a href=page2.phpBack to test sess var/abr';
   ?
  
   page4.php
  
   ?php
   session_start();
   echo 'Session Variable:'.$HTTP_SESSION_VARS[testing].'br';
   echo 'a href=page3.phpBack to page 3 to test sess var
   further/abr';
   echo 'a href=page2.phpBack to page 2 to test sess var/abr';
   ?
  
   This small test works 100% on my newer system, and I was under the
   impression that I coded it to be backwards compatible with my older
   system, BUT,
  
   look here: http://www.linuxhelp.co.za/session_test to see what it does
   on my working server. The scripts are identical.
  
   Please can you point out my mistakes in reasoning?
  
   Also, I want these scripts to work regardless of cookies, so if you see
   something that might cause problems when ppl disable cookies, plz
   advise.
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 



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




[PHP] Re: picture upload error!

2002-08-12 Thread Bogdan Stancescu

Hi!

Have you tried echoing $aFileContents in the same script? Does it 
actually contain anything? You may have a problem with reading from the 
upload file...

Bogdan

Djurovski Dejan wrote:
 I can't upload picture to MySQL database:
 What is wrong with my script:
 I use PHP  MySQL database.
 After submiting form my script says that everything is OK, but in database I
 see that a picture is not uploaded.(date, size, name, type are inputed, but
 data is not!).
 
 Table:
 
 CREATE TABLE pictures (
 picture_id int(11) DEFAULT '0' NOT NULL,
 name varchar(30) NOT NULL,
 date datetime DEFAULT '-00-00 00:00:00' NOT NULL,
 pic_data mediumblob NOT NULL,
 pic_size int(11) DEFAULT '0' NOT NULL,
 pic_type varchar(30) NOT NULL,
 PRIMARY KEY (picture_id)
 );
 
 
 
 My PHP page:
 
 
 ?php
 include_once(db_mysql.php);
 class pictures_db extends DB_Sql
 {
 var $Host=localhost;
 var $Database=sajt;
 var $User=root;
 var $Password=;
 }
 $aErrors=False;
 if (!empty($PicFile_name))
 {
 if ( ($PicFile_type == image/gif) ||
 ($PicFile_type == image/pjpeg) ||
 ($PicFile_type == image/jpeg))
 {
 $aFile=fopen($PicFile, rb);
 $aFileContents=addslashes(fread($aFile, filesize($PicFile)));
 fclose($aFile);
 $aDB=new pictures_db();
 $aSQL=select(max(picture_id) + 1) as new_id from pictures;
 $aDB-query($aSQL);
 if ($aDB-next_record() )
 {
 $aNewID=$aDB-f(new_id);
 }
 if(empty($aNewID) == True)
 {
 $aNewID=1;
 }
 $aSQL=insert into pictures (picture_id, name, .
 date, pic_data, ;
 $aSQL .=pic_size, pic_type) values ($aNewID, .
 '$PicName', ;
 $aSQL .= NOW(), '$aFileContents', '$PicFile_size', .
 '$PicFile_type' );
 print($aSQL);
 $aDB-query($aSQL);
 if ($aDB-Errno != 0)
 {
 $aErrors = True;
 }
 }
 else
 {
 $aErrors= True;
 }
 }
 else
 {
 $aErrors = True;
 }
 if ($aErrors == False)
 {
 print(OK);
 }
 else
 {
 print(ERROR!!!);
 }
 ?
 
 
  -
  -
  Ðurovski Dejan
[EMAIL PROTECTED]
 
 
 



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




[PHP] Re: Php lib?

2002-08-12 Thread Bogdan Stancescu

What do you need exactly? Phplib does a lot of things, and I don't think 
anyone can answer your question without some specifics (or without 
rewriting the phplib documentation, that is).

Bogdan

John Wards wrote:
 Anyone got any handy hints on how to convert scripts running on PHP3 and
 PHPlib?
 
 Its doing my head in!
 
 John Wards
 SportNetwork.net
 



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




Re: [PHP] E-commerce site issue?

2002-08-12 Thread The Gabster

Thanks again, Justin...

Any suggestions on how to store/transmit the credit cards securely?  And how
do I process them manually?  How do I get set up to accept credit cards?

Thanks,
gab.



Justin French [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 on 10/08/02 12:05 AM, The Gabster ([EMAIL PROTECTED]) wrote:

  Thanks a lot...
  Hmm... I gues for the beginning I would go and process the purchases
  manually. Later on if the purchases increase, than I would opt for
  proccesing credit cards via the server.

 So initially you would just store/transmit the credit cards securely (a
 whole other can of worms!!), and process them manually offline.  I'd
 recommend this for any start-up e-commerce site, because it cuts down some
 development, start up costs and saves the margins that an online
credit-card
 merchant takes.

 When and if you decide to automate the credit card process (authorising
and
 charging the card), it's done through a merchant.  This will totally
depend
 on your circumstances and budget, but you basically pass the details to a
 third party that specialises in this stuff, like authorise.net (and
hundreds
 of other similar business'), a bank or financial institution etc etc.

 All of them will have different procedures and code, but you basically
pass
 them the details, they pass back a success or failure, charge the
credit
 card, take their % cut (everything from a flat fee like $1, through to 3%
or
 5%), and pass on the rest to you.

 There are further options above and beyond this, but they'd be out of
 reach/budget of almost any small-medium e-comm site.








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




[PHP] Re: Simple date question

2002-08-12 Thread Bogdan Stancescu

Hi!

I never used MSSQL myself, but you should be able to find some SQL 
command to format the date in the MSSQL documentation - that's generally 
the way to retrieve specific date/time elements.

HTH

Bogdan

Dave Leather wrote:
 I hope this is a simple date question
 
 I am using an MSSQL database, and have a datetime field called start_date
 and end_date.  When I use query analyser and do a
 
 SELECT start_date from CF_#orders
 
 The format is
 2002-08-11 12:13:44.000
 
 In Php - my code is
 
 ?
 $qry = Select start_date from CF_#orders;
 $rs = mssql_query($qry) or die(Could not query);
 $datarow = mssql_fetch_object($rs);
 
 print $datarow-start_date;
 ?
 
 The format is now
 Aug 12 2002 11:14AM
 
 I NEED those seconds to appear in my variable HOW can I get the TRUE
 date and time from the sql table into my variable?  Is there a php.ini
 variable I need to set... is there some sort of magical command
 
 Please help Thanks VERY much in advance!
 Dave
 
 
 



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




[PHP] Garbage .html via HTTP/1.0 or Proxy

2002-08-12 Thread Kelvin Lawson

Hi All,

When connecting to my site from certain clients, the .html returned contains a large 
block of non-standard characters.

Running it locally and from various other places, the site looks normal. But when I 
connect from work, the .html file returned is corrupted. At work we have a web proxy, 
and I also noticed from my Apache logs that HTTP/1.0 is used for the request. Has 
anyone experienced problems due to those two reasons ?

This seems weird to me because PHP is generated on my server, so I assumed all clients 
would see exactly the same. But this isn't the case here. Either the html generated is 
different for these clients, or the returned page is getting corrupted somewhere along 
the way.

Does anyone know why this might happen ?

I'm using WinXP Apache 2.0.39 with PHP 4.2.1. There are no errors in the Apache logs. 
Also the corruption doesn't happen on all pages.

Thanks for any tips,
Kelvin.



[PHP] include require directive

2002-08-12 Thread Huy

If I use either the include or require statement, PHP will generate some
lines in the browser. For example, I want the first line is Hello There..
echo (Hello There); but the line happens to be the third line after some
blank lines. So how do I turn that off??



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




[PHP] test - please ignore

2002-08-12 Thread eriol

testing php.general list


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




  1   2   >