[PHP] Forms issues..

2002-10-11 Thread Simon Taylor

I am having difficulty managing forms. for example I have a table builder
class which builds me a table of a query with all the bells and whistles to
make it editable etc. so it creates it's own form to build itself on,
then I have a dateselector class which builds a nice little graphic date
selector, this also uses it's own form as it is not always in a table - it
can be anywhere - as far as I know you can't have a form in a form so I am
cheating a bit at the moment and only creating the dateselector after the
table on a div then moving it into place..
This is working for me, but being a relative newbie I am sure there is a
better way to handling forms.
Any ideas, comments appreciated.
Thanks
_
Simon Taylor
AfriTol (Pty) Ltd.
?  [EMAIL PROTECTED]
Å+27 12 361 3303 ext 257
Å+27 72 471 1833
Æ+27 12 365 3810
 

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




[PHP] MSSQL_RESULT Problem

2002-10-11 Thread Francky

i have some trouble with mssql_result cause it will return me a result
limitted at 255 char max.

in my php.ini i set this value :
mssql.textsize=65536
mssql.textlimit=65536

and in SQLSERVER my field type is VARCHAR(2048)

can you help me please ???



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




[PHP] Download problems..

2002-10-11 Thread Archibald Zimonyi


I am having problems downloading files using PHP. The download part
works correctly but when I try to browse other links (using IE only,
Netscape works fine) they get stuck. I am using frames. It all works
fine when I reload the page from where I download files.

Is there any way to split up content using PHP? One part gets downloaded
while another part is displayed in the resulting frame.

I have read an RFC and it should work but none of the browsers do as I
want them to so I am doing something wrong. Does anyone have an example?

Archie

---
Archibald Zimonyi
[EMAIL PROTECTED]

"There is no logic like no logic"


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




[PHP] Compiling PHP against net-snmp 5.0.6

2002-10-11 Thread Peter Hicks

Hi everyone

I'm having terrible trouble compiling PHP with net-snmp:

  /bin/sh /usr/local/src/php-4.2.3/libtool --silent --mode=compile gcc  -I.
  -I/usr/local/src/php-4.2.3/ext/snmp -I/usr/local/src/php-4.2.3/main
  -I/usr/local/src/php-4.2.3 -I/usr/local/apache/include
  -I/usr/local/src/php-4.2.3/Zend -I/usr/local/include
  -I/usr/local/mysql/include/mysql -I/usr/local/pdflib/include
  -I/usr/local/snmp/include -I/usr/local/src/php-4.2.3/ext/xml/expat
  -DLINUX=22 -DMOD_SSL=208111 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT
  -I/usr/local/src/php-4.2.3/TSRM -g -O2 -prefer-pic  -c snmp.c
  snmp.c:62: asn1.h: No such file or directory
  snmp.c:63: snmp_api.h: No such file or directory
  snmp.c:64: snmp_client.h: No such file or directory
  snmp.c:65: snmp_impl.h: No such file or directory
  snmp.c:66: snmp.h: No such file or directory
  snmp.c:67: parse.h: No such file or directory
  snmp.c:68: mib.h: No such file or directory
  snmp.c:69: version.h: No such file or directory

These missing .h files are in a subdirectory called 'include/net-snmp/library'
on net-snmp 5.0.6, but on ucd-snmp 4.2.6, 'include/ucd-snmp/library'.

I'm no great coder, so when I tried hacking the .c file to point to the
location of the new headers, I came up against unresolved symbols whilst
compiling.

Has anybody successfuly compiled php with net-snmp? Can anybody help me track
down the problem and hopefully come up with a patch?

Best wishes,


Peter.


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




[PHP] Updating session variables values during session

2002-10-11 Thread Stéphane Pinel

Hi,

PHP 4.1.X

I'm trying, during the session time, to change the value of 2 session
variables:

My first attempt was simply like this:

$sess_client = $theClient;
$sess_ref_clientFact = $theRefClient;

...but following pages still get old values from the session variables.

Then I tried this:

session_unregister("sess_client");
session_unregister("sess_ref_clientFact");
$sess_client = $ClientName;
$sess_ref_clientFact = $ClientRef;
session_register("sess_client");
session_register("sess_ref_clientFact");

Same, following pages get old values from these 2 session variables...

I would appreciate if I could get some help ?

Thanks.

---
Stéphane Pinel
[EMAIL PROTECTED]
iChat : [EMAIL PROTECTED]


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




RE: [PHP] Updating session variables values during session

2002-10-11 Thread Simon Taylor

Hiya,
Try using $_SESSION['variablename']
To refer to session variables.
Cheers
Simon

-Original Message-
From: Stéphane Pinel [mailto:[EMAIL PROTECTED]] 
Sent: 11 October 2002 11:16
To: [EMAIL PROTECTED]
Subject: [PHP] Updating session variables values during session


Hi,

PHP 4.1.X

I'm trying, during the session time, to change the value of 2 session
variables:

My first attempt was simply like this:

$sess_client = $theClient;
$sess_ref_clientFact = $theRefClient;

...but following pages still get old values from the session variables.

Then I tried this:

session_unregister("sess_client");
session_unregister("sess_ref_clientFact");
$sess_client = $ClientName;
$sess_ref_clientFact = $ClientRef;
session_register("sess_client");
session_register("sess_ref_clientFact");

Same, following pages get old values from these 2 session variables...

I would appreciate if I could get some help ?

Thanks.

---
Stéphane Pinel
[EMAIL PROTECTED]
iChat : [EMAIL PROTECTED]


-- 
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] Updating session variables values during session

2002-10-11 Thread Stéphane Pinel

Same problem...

Thanks.

---
Stéphane Pinel
[EMAIL PROTECTED]
iChat : [EMAIL PROTECTED]



Le 11/10/02 11:26, « Simon Taylor » <[EMAIL PROTECTED]> a écrit :

> Hiya,
> Try using $_SESSION['variablename']
> To refer to session variables.
> Cheers
> Simon
> 
> -Original Message-
> From: Stéphane Pinel [mailto:[EMAIL PROTECTED]]
> Sent: 11 October 2002 11:16
> To: [EMAIL PROTECTED]
> Subject: [PHP] Updating session variables values during session
> 
> 
> Hi,
> 
> PHP 4.1.X
> 
> I'm trying, during the session time, to change the value of 2 session
> variables:
> 
> My first attempt was simply like this:
> 
> $sess_client = $theClient;
> $sess_ref_clientFact = $theRefClient;
> 
> ...but following pages still get old values from the session variables.
> 
> Then I tried this:
> 
>   session_unregister("sess_client");
>   session_unregister("sess_ref_clientFact");
>   $sess_client = $ClientName;
>   $sess_ref_clientFact = $ClientRef;
>   session_register("sess_client");
>   session_register("sess_ref_clientFact");
> 
> Same, following pages get old values from these 2 session variables...
> 
> I would appreciate if I could get some help ?
> 
> Thanks.
> 
> ---
> Stéphane Pinel
> [EMAIL PROTECTED]
> iChat : [EMAIL PROTECTED]
> 


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




RE: [PHP] Updating session variables values during session

2002-10-11 Thread Simon Taylor

Have you tried it like this?
 $_SESSION['sess_client'] = $ClientName;
 $_SESSION['sess_ref_clientFact'] = $ClientRef;

If it still gives you the old vars I would look at where the $ClientName and
$ClientRef are coming from.
-Original Message-
From: Stéphane Pinel [mailto:[EMAIL PROTECTED]] 
Sent: 11 October 2002 11:32
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Updating session variables values during session


Same problem...

Thanks.

---
Stéphane Pinel
[EMAIL PROTECTED]
iChat : [EMAIL PROTECTED]



Le 11/10/02 11:26, « Simon Taylor » <[EMAIL PROTECTED]> a écrit :

> Hiya,
> Try using $_SESSION['variablename']
> To refer to session variables.
> Cheers
> Simon
> 
> -Original Message-
> From: Stéphane Pinel [mailto:[EMAIL PROTECTED]]
> Sent: 11 October 2002 11:16
> To: [EMAIL PROTECTED]
> Subject: [PHP] Updating session variables values during session
> 
> 
> Hi,
> 
> PHP 4.1.X
> 
> I'm trying, during the session time, to change the value of 2 session
> variables:
> 
> My first attempt was simply like this:
> 
> $sess_client = $theClient;
> $sess_ref_clientFact = $theRefClient;
> 
> ...but following pages still get old values from the session 
> variables.
> 
> Then I tried this:
> 
>   session_unregister("sess_client");
>   session_unregister("sess_ref_clientFact");
>   $sess_client = $ClientName;
>   $sess_ref_clientFact = $ClientRef;
>   session_register("sess_client");
>   session_register("sess_ref_clientFact");
> 
> Same, following pages get old values from these 2 session variables...
> 
> I would appreciate if I could get some help ?
> 
> Thanks.
> 
> ---
> Stéphane Pinel
> [EMAIL PROTECTED]
> iChat : [EMAIL PROTECTED]
> 


-- 
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] mysql stored procedures

2002-10-11 Thread electroteque

when is this being implemented ?



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




Re: [PHP] Re: site path

2002-10-11 Thread @ Edwin

Hmm, I was expecting that. ;)

Looking back, when you said that this code

>echo("Go home");
> ?>

would obviously create a trailing slash problem, I should have just said
that it's true IF you code it that way. I should have just said that there's
an ALTERNATIVE way of coding that wouldn't create that problem--that way,
this thread wouldn't even be this long.

As I have already mentioned, I agree that this is shorter

> echo("Go home");

but I'd still write this way

  echo 'Go home';

since, at least for me, this is easier to read. Besides, for consistency, at
my workplace we use double quotes for the (html) values.

- E

On Friday, October 11, 2002 4:10 PM
Bogdan Stancescu wrote:

> If you really need to get picky, then I shall... well, point out the
> obvious:
>
> echo "Go to some folder";
>
> And since we got into this, there are some servers where you don't have
> control over http config, so you shouldn't want to link to directories
> at all - you'd want to specify the exact file to link to, as in
>
> echo "Go to some folder";
>
> Bogdan
>
> @ Edwin wrote:
> > Well, I agree about what you said
> >
> >
> >>IMHO, the second comes more natural to write, is easier to understand at
> >>a glance, is less prone to errors and, well, it's shorter!
> >
> >
> > but remember the topic is about whether the trailing slash would create
a
> > problem or not.
> >
> > I think you're aware that there are some servers are not configured to
> > understand that
> >
> >   http://www.domain.com/somefolder
> >
> > is equal to http://www.domain.com/somefolder/ . So, NOT having the
trailing
> > slash might even create some problems.
> >
> > So, it's a matter of opinion (and use) whether adding a trailing slash
would
> > create a problem or not. So imagine how this code will work:
> >
> >   echo "Go to some folder";
> >
> > - E
> >
> > On Friday, October 11, 2002 2:28 PM
> > Bogdan Stancescu wrote:
> >
> >>Ok, then I honestly don't understand why anyone would rather write this
> >>
> >>echo "Go home";
> >>
> >>instead of this
> >>
> >>echo "Go home";
> >>
> >>IMHO, the second comes more natural to write, is easier to understand at
> >>a glance, is less prone to errors and, well, it's shorter!
> >>
> >>Bogdan
> >>
> >>@ Edwin wrote:
> >>
> >>>Not exactly. Single quotes are fine. I missed the fact that the single
> >>>quotes here
> >>>
> >>>
> >>>
> >echo("Go home");
> >>>
> >>>
> >>>will be included in the source--sorry about that.
> >>>
> >>>Well, then, to rewrite the code earlier,
> >>>
> >>>
> >>>
> echo 'Go home';
> >>>
> >>>
> >>>this way:
> >>>
> >>>  echo "Go home";
> >>>
> >>>that would still not give you the "trailing slash" problem. In other
> >
> > words,
> >
> >>>it's just a matter of how you write the code... ;)
> >>>
> >>>- E
> >>>
> >>>On Friday, October 11, 2002 1:06 AM
> >>>Bogdan Stancescu wrote:
> >>>
> >>>
> >>>
> I'm not sure exactly what you're trying to point out - does XHTML
> require double quotes?
> 
> Bogdan
> 
> @ Edwin wrote:
> 
> 
> >Just a thought...
> >
> >If you're going to write an XHTML compatible code, you wouldn't
really
> >>>
> >>>have
> >>>
> >>>
> >this problem -->
> >
> >> echo("Go home");
> >
> >
> >since you'll probably write something like this:
> >
> > echo 'Go home'; >
> >Of course, I didn't mean that you can't do that with HTML...
> >>>
> >>>[snip]
> >>
> >>
> >>--
> >>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] Win nt logon user how to ?

2002-10-11 Thread Daniel Masson

Hey everyone, id like to know how to get the logon user in my NT domain,
i know that this can be done in ASP:
Request.Servervariables("LOGON_USER"), and gets the logged user of the
client machine, i need to do that with PHP, ... im affraid this is not
possible because, runing phpinfo() ... this variable is not on
enviroment list.
 
is it possible what i want to do ??
 
Thanks every1 !!
 
Regards
Daniel.
 



-Mensaje original-
De: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Enviado el: viernes, 11 de octubre de 2002 8:49
Para: Cole Tuininga
CC: [EMAIL PROTECTED]
Asunto: Re: [PHP] Raw HTTP data


See your php.ini file:

; Always populate the $HTTP_RAW_POST_DATA variable.
;always_populate_raw_post_data = On

On 11 Oct 2002, Cole Tuininga wrote:

>
> Quick question - is there an equivalent to QUERY_STRING for POSTs?  I 
> need the deata to essentially be in the same format as for GETs.  If 
> the answer is "build it myself" from $_POST, so be it.  I was hoping 
> there was a more elegant solution though.  8)
>
> -Cole Tuininga
> [EMAIL PROTECTED]
>
>
>
>
> --
> 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] slow form / server problem

2002-10-11 Thread Marek Kilimajer

If you suspect your SQL server is slow, try the submit without 
inserting/selecting, just throw the data away, and maybe print out some 
static data.

Omar Campos wrote:

>Hi. I run php in win2k server, IIS and MS SQL Server 2k.
>I've created some data bases and tables. On the beginning, sending a php
>form (through the intranet) was quick. Now, it spends 32 seconds (sometimes
>less) to send a form.
>I've tried on a empty data base but it's still slow. I don´t have a clue
>about what could it be?
>Maybe the HDD of the server, maybe the SQL Server
>Could you help me.
>
>Thank you so much.
>
>
>
>  
>


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




RE: [PHP] Updating session variables (resolced: shame on me)

2002-10-11 Thread Simon Taylor

Hehe - no prob - you can also set it to always start in php.ini if it suits
your needs.
Cheers
Simon

-Original Message-
From: Stéphane Pinel [mailto:[EMAIL PROTECTED]] 
Sent: 11 October 2002 12:10
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Updating session variables (resolced: shame on me)



1) I wake up too early this morning
2) I've lost my glasses
3) I forgot... Session_start()

...shame on me...

Thanks to all.

Regards.

---
Stéphane Pinel
[EMAIL PROTECTED]
iChat : [EMAIL PROTECTED]


-- 
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] [Slightly OT] Using Mozilla? Here!

2002-10-11 Thread Bogdan Stancescu

Just created a Mozilla keyword for the php manual, after being too lazy 
for too long, so here it is, in case anyone else finds it useful:

http://www.php.net/search.php?show=quickref&pattern=%s

The keyword is obviously php (at least in my case). Since I already 
spammed you with this, here are a couple of others I use:

Dictionary
http://dictionary.com/search?q=%s

Google Feeling Lucky
http://www.google.com/search?btnI=1&q=%s

And, in case you don't know about bookmarklets, here's a link: 
http://www.squarefree.com/bookmarklets/

Hope this helps somebody...

Bogdan


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




php-general Digest 11 Oct 2002 10:27:24 -0000 Issue 1637

2002-10-11 Thread php-general-digest-help


php-general Digest 11 Oct 2002 10:27:24 - Issue 1637

Topics (messages 119588 through 119624):

Re: MS SQL server TEXT column
119588 by: John W. Holmes

Re: Calling PHP (cgi) from a perl script and passsing parameters
119589 by: Sascha Cunz
119592 by: Jim Carey
119593 by: Jim Carey

Re: Refresh my Memory
119590 by: Omar Campos

Redhat 8.0 / php-cvs - /usr/lib/httpd/build/instdso.sh: No such file or directory
119591 by: Robert Mena

Re: MySQL back up
119594 by: Ken

Re: PDF to PHP (code)
119595 by: Ken

Re: displaying fixed number of records
119596 by: DoL

Best way to put layout, code on pages?
119597 by: Leif K-Brooks
119598 by: Jule Slootbeek

Re: site path
119599 by: Bogdan Stancescu
119603 by: . Edwin
119611 by: Bogdan Stancescu

Re: Animation in PHP
119600 by: Noodle Snacks

Working with dates in PHP
119601 by: James Purser
119604 by: Tom Rogers
119612 by: David Freeman

Re: Capitalizing names ... needs the final touch...
119602 by: -<[ Rene Brehmer ]>-

Fatal error:  Cannot use [] for reading
119605 by: Leif K-Brooks
119606 by: Leif K-Brooks
119607 by: Bogdan Stancescu
119608 by: Leif K-Brooks
119609 by: Bogdan Stancescu
119610 by: Bogdan Stancescu

Forms issues..
119613 by: Simon Taylor

MSSQL_RESULT Problem
119614 by: Francky

Download problems..
119615 by: Archibald Zimonyi

Compiling PHP against net-snmp 5.0.6
119616 by: Peter Hicks

Updating session variables values during session
119617 by: Stéphane Pinel
119618 by: Simon Taylor
119619 by: Stéphane Pinel
119620 by: Simon Taylor
119622 by: Stéphane Pinel

Re: Updating session variables (resolced: shame on me)
119621 by: Stéphane Pinel
119623 by: Simon Taylor

[Slightly OT] Using Mozilla? Here!
119624 by: Bogdan Stancescu

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]


--

--- Begin Message ---

Make sure you're using POST as your form method and not GET. 

---John Holmes...

> -Original Message-
> From: Vail, Warren [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 10, 2002 5:04 PM
> To: php
> Subject: [PHP] MS SQL server TEXT column
> 
> Encountered the following problem with the Microsoft SQL Server
interface.
> I am not sure where the problem exists, but I am looking for a
workaround.
> 
> I inserted a row into a table that contained a text column, and
inserted
> over 5kb string into the text field.  On retrieving the row the server
> returned the column values truncated to 4096 bytes exactly.  Tried to
code
> SET TEXTSIZE nnn into my query string, the query refused to return
> anything
> at all.  Then I tried coding SET TEXTSIZE as a separate query on the
same
> connection, just prior to my data query, both appeared to be
successful,
> but
> still only got 4096 bytes of data.
> 
> select DATALENGTH(availabilitySample) from mftsmainframeavailability
where
> availabilityID = 1
> 
> using the MSSQL 7 Query analyzer returns;
> 
> ---
> 5242
> 
> (1 row(s) affected)
> 
> This shows that my text was stored, I just can't seem to get the
server
> (or
> the interface) to give me back more than 4096 bytes.
> 
> any clues would be greatly appreciated.
> thanks in advance,
> 
> Warren Vail
> Tools, Metrics & Quality Processes
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php




--- End Message ---
--- Begin Message ---

What you're referring is CLI, not CGI Version of PHP.

Anyway, i assume, you're using a PHP version 4.2 or higher.
Have a look at the $_SERVER['argc'] and $_SERVER['argv'].

Sascha

Am Donnerstag, 10. Oktober 2002 23:57 schrieb Jim Carey:
> Hi,
> 
> have been having problems passing parameters to a PHP script from a Perl
> script . I call the PHP script using (as an example):
 
> $a=`/home/ozbcoz/http/testphp.php fred=testing`; 
> print "$a"; 
> 
> 
> then I have a PHP script showing: 
> 
> #!/usr/local/php/bin/php -q 
>   
> print "count=$argc"; 
> print "0=$argv[0]"; 
> print "1=$argv[1]"; 
> print "2=$argv[2]"; 
> phpinfo(); 
> ?> 
> 
> the outout comes out as: 
> 
> count=0 
> 0= 
> 1= 
> 2= 
> plus the phpinfo bumpf - which shows argc as 0 and an empty array for argv
> 
> sny clues anyone ?
> 
> Jim Carey
> www.OZbcoz.com discount domain registration
> 


--- End Message ---
--- Begin Message ---

yes - am using 4.2.1

output from phpinfo() shows:

_SERVER["argv"] Array
(
)
  
_SERVER["argc"] 0  

which agrees with the $argc and $argv output.

details on the build include:

Build Date Jul 18 2002 08:29:02 
Configure Comman

Re: [PHP] Object-relational mapping and PHP

2002-10-11 Thread @ Edwin

Hello,

Have you tried http://www.phpclasses.org/ ?

-E

On Friday, October 11, 2002 11:31 PM
Subject: [PHP] Object-relational mapping and PHP
Juhan Kundla wrote:

[snip]
> 
> I would rather not reinvent the wheel here, so it would be nice, if
> anybody could share her/his experience or suggest some PHP-code for
> this. I have searched web and found nothing very useful so far.
> 
[/snip]

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




[PHP] Raw HTTP data

2002-10-11 Thread Cole Tuininga


Quick question - is there an equivalent to QUERY_STRING for POSTs?  I
need the deata to essentially be in the same format as for GETs.  If the
answer is "build it myself" from $_POST, so be it.  I was hoping there
was a more elegant solution though.  8)

-Cole Tuininga
[EMAIL PROTECTED]




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




Re: [PHP] Raw HTTP data

2002-10-11 Thread Rasmus Lerdorf

See your php.ini file:

; Always populate the $HTTP_RAW_POST_DATA variable.
;always_populate_raw_post_data = On

On 11 Oct 2002, Cole Tuininga wrote:

>
> Quick question - is there an equivalent to QUERY_STRING for POSTs?  I
> need the deata to essentially be in the same format as for GETs.  If the
> answer is "build it myself" from $_POST, so be it.  I was hoping there
> was a more elegant solution though.  8)
>
> -Cole Tuininga
> [EMAIL PROTECTED]
>
>
>
>
> --
> 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] Updating session variables (resolced: shame on me)

2002-10-11 Thread Stéphane Pinel


1) I wake up too early this morning
2) I've lost my glasses
3) I forgot... Session_start()

...shame on me...

Thanks to all.

Regards.

---
Stéphane Pinel
[EMAIL PROTECTED]
iChat : [EMAIL PROTECTED]


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




[PHP] Accessing serial ports from PHP

2002-10-11 Thread José León Serna

Hello:
   I would like to read and write to serial ports from PHP, is possible? 
if so, how?

Regards.


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




[PHP] Re: private and public in class objects

2002-10-11 Thread electroteque

can anyone answer this ?

"Electroteque" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi i was wondering when this was or is going to be implemented into class
> objects ? i have the syntax for it ie setting a private function
_function()
> and private var $_var, it doesnt seem to be working in PHP 4.2.2 ?
>
>



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




Re: [PHP] Accessing serial ports from PHP

2002-10-11 Thread Marco Tabini

If you're using UNIX, you can try reading and writing to/from /dev/ttyS*
or /dev/ttyS/*

On Fri, 2002-10-11 at 06:34, José León Serna wrote:
> Hello:
>I would like to read and write to serial ports from PHP, is possible? 
> if so, how?
> 
> Regards.
> 
> 
> -- 
> 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] Function to remember costs.

2002-10-11 Thread Steve Jackson

I am having difficulty passing details to a form. 
I need to somehow pass a variable cost to a form. 
The cost is made up of items in a cart (details taken from a Mysql DB)
and a shipping cost. I then have a function written to display the
credit card form (which needs to be passed to a secure server below the
final cost  (ie cost plus shipping). I have tried without success most
of this morning to pass the final cost plus shipping to the form hidden
field (which is on the same html page!) Here is the section of code I am
having problems with. I will supply the rest of the functions to anyone
who thinks they can help but it's a lot of code.
 
 
 

  
  Shipping
   
  TOTAL INCLUDING SHIPPING
  ˆ

  
  

  
 
  
  
  
  
  
  
  
  
  
  
  
  
  
  Credit Card Details
  
Type
VISAMasterCard
  
  
Number

  
  
AMEX code (if required)

  
  
Expiry Date
Month 010203040506<
option>070809101112
Year 0001020304050607080910
  
  
Name on Card

  
  

  If you press purchase your credit card details will be
transmitted via a secure
   server, your details processed and then you will be redirected to our
site.
 

  
  
  
 
 to the amount hidden
field in the form.
Any ideas?
This is not all my code which is why I am having problems.

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com  
[EMAIL PROTECTED]
Mobile +358 50 343 5159



 



[PHP] Object-relational mapping and PHP

2002-10-11 Thread Juhan Kundla

Hey, gang!

I am planning to write a small web application using PHP. The
application has several business classes, which store their persistent data
in relational database. I don't like the idea of embedding the SQL and
other data access related code into my classes, so i am looking for a
abstraction layer, which takes care of the dirty work and my classes
have only simple methods like save, retrieve and delete.

I would rather not reinvent the wheel here, so it would be nice, if
anybody could share her/his experience or suggest some PHP-code for
this. I have searched web and found nothing very useful so far.

TIA,
Juhan

-- 
Vastus: Sest inimene loeb suunaga ülevalt alla.
Küsimus: Miks ülalpool vastamine on halb?

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




RE: [PHP] Function to remember costs.[Scanned]

2002-10-11 Thread Michael Egan

Steve,

I've only had a quick glance at this but from the code you've posted you don't seem to 
be associating a variable with the hidden field you're referring to in the 
display_form function.

You need to store the amount in a variable and then refer to the variable in the value 
attribute of the hidden field.

Michael Egan

-Original Message-
From: Steve Jackson [mailto:[EMAIL PROTECTED]]
Sent: 11 October 2002 11:47
To: PHP General
Subject: [PHP] Function to remember costs.[Scanned]


I am having difficulty passing details to a form. 
I need to somehow pass a variable cost to a form. 
The cost is made up of items in a cart (details taken from a Mysql DB)
and a shipping cost. I then have a function written to display the
credit card form (which needs to be passed to a secure server below the
final cost  (ie cost plus shipping). I have tried without success most
of this morning to pass the final cost plus shipping to the form hidden
field (which is on the same html page!) Here is the section of code I am
having problems with. I will supply the rest of the functions to anyone
who thinks they can help but it's a lot of code.
 
 
 

  
  Shipping
   
  TOTAL INCLUDING SHIPPING
  ˆ

  
  

  
 
  
  
  
  
  
  
  
  
  
  
  
  
  
  Credit Card Details
  
Type
VISAMasterCard
  
  
Number

  
  
AMEX code (if required)

  
  
Expiry Date
Month 010203040506<
option>070809101112
Year 0001020304050607080910
  
  
Name on Card

  
  

  If you press purchase your credit card details will be
transmitted via a secure
   server, your details processed and then you will be redirected to our
site.
 

  
  
  
 
 to the amount hidden
field in the form.
Any ideas?
This is not all my code which is why I am having problems.

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com  
[EMAIL PROTECTED]
Mobile +358 50 343 5159



 

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




Re: [PHP] MSSQL_RESULT Problem

2002-10-11 Thread Marco Tabini

Hi!

This is actually a limitation of the sql libraries used by PHP (I assume
you're using Windows). Try using a cast to a text field:

Select Cast(Field As Text) As Field

This should (and I say should because I can't test it right now :) take
care of the problem, although it might make your db a bit slower.

On Thu, 2002-10-10 at 10:19, Francky wrote:
> i have some trouble with mssql_result cause it will return me a result
> limitted at 255 char max.
> 
> in my php.ini i set this value :
> mssql.textsize=65536
> mssql.textlimit=65536
> 
> and in SQLSERVER my field type is VARCHAR(2048)
> 
> can you help me please ???
> 
> 
> 
> -- 
> 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] Temp dir

2002-10-11 Thread Evandro Sestrem


Sorry if is a newbie question...

 but how I discover where is the php temp dir?


Thanks!!

Evandro Sestrem



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




RE: [PHP] Win nt logon user how to ?

2002-10-11 Thread John W. Holmes

It's there...

$_ENV['LOGON_USER']

You may have to turn on some NT setting in IIS for that directory...if
you're using IIS.

---John Holmes...

> -Original Message-
> From: Daniel Masson [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 11, 2002 9:55 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Win nt logon user how to ?
> 
> Hey everyone, id like to know how to get the logon user in my NT
domain,
> i know that this can be done in ASP:
> Request.Servervariables("LOGON_USER"), and gets the logged user of the
> client machine, i need to do that with PHP, ... im affraid this is not
> possible because, runing phpinfo() ... this variable is not on
> enviroment list.
> 
> is it possible what i want to do ??
> 
> Thanks every1 !!
> 
> Regards
> Daniel.
> 
> 
> 
> 
> -Mensaje original-
> De: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Enviado el: viernes, 11 de octubre de 2002 8:49
> Para: Cole Tuininga
> CC: [EMAIL PROTECTED]
> Asunto: Re: [PHP] Raw HTTP data
> 
> 
> See your php.ini file:
> 
> ; Always populate the $HTTP_RAW_POST_DATA variable.
> ;always_populate_raw_post_data = On
> 
> On 11 Oct 2002, Cole Tuininga wrote:
> 
> >
> > Quick question - is there an equivalent to QUERY_STRING for POSTs?
I
> > need the deata to essentially be in the same format as for GETs.  If
> > the answer is "build it myself" from $_POST, so be it.  I was hoping
> > there was a more elegant solution though.  8)
> >
> > -Cole Tuininga
> > [EMAIL PROTECTED]
> >
> >
> >
> >
> > --
> > 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: private and public in class objects

2002-10-11 Thread John W. Holmes

Whenever Zend Engine 2.0 is used. Try doing some reading on the PHP
site.

---John Holmes...

> -Original Message-
> From: electroteque [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 11, 2002 9:49 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: private and public in class objects
> 
> can anyone answer this ?
> 
> "Electroteque" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > hi i was wondering when this was or is going to be implemented into
> class
> > objects ? i have the syntax for it ie setting a private function
> _function()
> > and private var $_var, it doesnt seem to be working in PHP 4.2.2 ?
> >
> >
> 
> 
> 
> --
> 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: Temp dir

2002-10-11 Thread Evandro Sestrem


Discover in my code..

Ex: I want create a file in the php temp dir.

$tempdir = getPHPTempDir();
fopen($tempdir . "test.txt", w+);

"Evandro Sestrem" <[EMAIL PROTECTED]> escreveu na mensagem
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Sorry if is a newbie question...
>
>  but how I discover where is the php temp dir?
>
>
> Thanks!!
>
> Evandro Sestrem
>
>



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




[PHP] how to configure with ldap?

2002-10-11 Thread Jody Cleveland

Hello,

I'm trying to configure php with ldap support. Looking at ./configure
--help, I noticed that when I configure it, I need to put this in:
./configure --with-ldap=[dir]

My question is, where is ldap? I'm running Redhat 7.3 with Apache 2.

My ultimate goal is, I'm running Squirrelmail, and I want to connect to an
Exchange global address list.

Any help would be greatly appreciated.

Thank you.

-Jody Cleveland

Winnefox Library System
Computer Support Specialist
[EMAIL PROTECTED]

"I thought I had an appetite for destruction, when all I really wanted was a
club sandwich."
- Homer -

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




RE: [PHP] Best way to put layout, code on pages?

2002-10-11 Thread John W. Holmes

>  include("include.php"); //This contains the database connection
code
> and whatever other global code, as well as the layout functions.
> doheader(); //This function contains the top of the layout.
> //Do whatever the page does
> dofooter(); //This function contains the bottom of the layout
> ?>
> 
> There are still problems with this, though.  No way to use global code
> at the bottom of the page, for one thing.  I've also considered
> something like:

What do you mean you can't "use global code at the bottom of the page"??
Maybe output buffering could solve your problem. 

---John Holmes...



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




[PHP] =.jpg from another URL with PHP=

2002-10-11 Thread Anthony Ritter

The following script picks up single .jpg image of a doppler weather map
from another URL:
...
http://image.weather.com/web/radar/us_har_closeradar_medium_usen.jp
g";
if(!($fp=fopen($theURL, "r")))
 {
  print("Could not open the URL.");
  exit;
 }
$contents=fread($fp,100);
print($contents);
fclose($fp);
?>
..

However, when I try to insert the HTML tages into the script like:

..



This is a map.
http://image.weather.com/web/radar/us_har_closeradar_medium_usen.jp
g";
if(!($fp=fopen($theURL, "r")))
 {
  print("Could not open the URL.");
  exit;
 }
$contents=fread($fp,100);
print($contents);
fclose($fp);
?>


..

I get the following:
ÿØÿàJFIFÿþ 1034364214ÿÛC
2!=,.$2I@LKG@FEPZsbPUmVEFd^emw{,N`-O}-s~|ÿÛC;!!;|SFS
||ÿÀ)¸"ÿÄ
ÿÄH!1A"Qaq#2'¡BR±ÁÑ3áð$brñ45CSs'
"DTt,cf²ÂÒÿÄÿÄ*!1AQ"aq2B'¡ÑðáÿÚ
?óz_Yª_§L{M2Iý©Ô3¡q£!
etc. etc...

I would like to insert additional text copy with this map - is this
possible.

Thanking all in advance.
Tony Ritter




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




Re: [PHP] how to configure with ldap?

2002-10-11 Thread Marco Tabini

You need an LDAP package like OpenLDAP:

http://www.openldap.org/

On Fri, 2002-10-11 at 10:37, Jody Cleveland wrote:
> Hello,
> 
> I'm trying to configure php with ldap support. Looking at ./configure
> --help, I noticed that when I configure it, I need to put this in:
> ./configure --with-ldap=[dir]
> 
> My question is, where is ldap? I'm running Redhat 7.3 with Apache 2.
> 
> My ultimate goal is, I'm running Squirrelmail, and I want to connect to an
> Exchange global address list.
> 
> Any help would be greatly appreciated.
> 
> Thank you.
> 
> -Jody Cleveland
> 
> Winnefox Library System
> Computer Support Specialist
> [EMAIL PROTECTED]
> 
> "I thought I had an appetite for destruction, when all I really wanted was a
> club sandwich."
> - Homer -
> 
> -- 
> 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] =.jpg from another URL with PHP=

2002-10-11 Thread Daniel Kushner

Save your first bit of code in a file (e.g.: image.php)

Your HTML file should look like this:

...


.







Regards,
Daniel Kushner
_
Need hosting? http://thehostingcompany.us

-Original Message-
From: Anthony Ritter [mailto:[EMAIL PROTECTED]] 
Sent: Friday, October 11, 2002 11:53 AM
To: [EMAIL PROTECTED]
Subject: [PHP] =.jpg from another URL with PHP=


The following script picks up single .jpg image of a doppler weather map from another 
URL: ...
http://image.weather.com/web/radar/us_har_closeradar_medium_usen.jp
g";
if(!($fp=fopen($theURL, "r")))
 {
  print("Could not open the URL.");
  exit;
 }
$contents=fread($fp,100);
print($contents);
fclose($fp);
?>
..

However, when I try to insert the HTML tages into the script like:

..



This is a map.
http://image.weather.com/web/radar/us_har_closeradar_medium_usen.jp
g";
if(!($fp=fopen($theURL, "r")))
 {
  print("Could not open the URL.");
  exit;
 }
$contents=fread($fp,100);
print($contents);
fclose($fp);
?>

 ..

I get the following:
״אJFIF‏ 1034364214C 
2!=,.$2I@LKG@FEPZsbPUmVEFd^emw{,N`-O}-s~|C;!!;|SFS
||ְ)¸"ִ
ִH !1A"Qaq#2'¡BR±ֱׁ3בנ$brס45CSs'
"DTt,cf²ֲׂִִ*!1AQ"aq2B'¡ׁנב
?ףz_Y×_§L{M2I‎©װ3¡q£!
etc. etc...

I would like to insert additional text copy with this map - is this possible.

Thanking all in advance.
Tony Ritter




-- 
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: =.jpg from another URL with PHP=

2002-10-11 Thread Dimitris Kossikidis

First of all you have to open this file  as a binary
e.g. fopen("myfile.jpg","rb");

then you shound send the apropriate html headers to display the image
e.g. header("Contet-type: image/jpeg");


"Anthony Ritter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> The following script picks up single .jpg image of a doppler weather map
> from another URL:
> ...
> 
$theURL="http://image.weather.com/web/radar/us_har_closeradar_medium_usen.jp
> g";
> if(!($fp=fopen($theURL, "r")))
>  {
>   print("Could not open the URL.");
>   exit;
>  }
> $contents=fread($fp,100);
> print($contents);
> fclose($fp);
> ?>
> ..
>
> However, when I try to insert the HTML tages into the script like:
>
> ..
> 
> 
> 
> This is a map.
> 
$theURL="http://image.weather.com/web/radar/us_har_closeradar_medium_usen.jp
> g";
> if(!($fp=fopen($theURL, "r")))
>  {
>   print("Could not open the URL.");
>   exit;
>  }
> $contents=fread($fp,100);
> print($contents);
> fclose($fp);
> ?>
> 
> 
> ..
>
> I get the following:
> ÿØÿàJFIFÿþ 1034364214ÿÛC
>
2!=,.$2I@LKG@FEPZsbPUmVEFd^emw{,N`-O}-s~|ÿÛC;!!;|SFS
>
||ÿÀ)¸"ÿÄ
> ÿÄH!1A"Qaq#2'¡BR±ÁÑ3áð$brñ45CSs'
> "DTt,cf²ÂÒÿÄÿÄ*!1AQ"aq2B'¡ÑðáÿÚ
> ?óz_Yª þyè¢Ñ7þ?©ø¶®xbÒÛ°ó,Ï}`Òç!W-ü$g®NÕ&³jIº'×ZTÔѶ«SðD
> Qö-yÕ+Q>_§L{M2Iý©Ô3¡q£!
> etc. etc...
>
> I would like to insert additional text copy with this map - is this
> possible.
>
> Thanking all in advance.
> Tony Ritter
>
>
>



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




Re: [PHP] mysql stored procedures

2002-10-11 Thread John S. Huggins

On Fri, 11 Oct 2002, electroteque wrote:

>-when is this being implemented ?

Perhaps in version 4.1 of the MySQL server.

Have a look near the bottom of this page...

  MySQL 4.1, the following development release
  http://www.mysql.com/products/mysql-4.0/index.html



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

**

John Huggins
VANet

[EMAIL PROTECTED]
http://www.va.net/

**


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




RE: [PHP] =.jpg from another URL with PHP=

2002-10-11 Thread John W. Holmes

Make another file that has your code in it and sends an image/jpeg
header. Then insert the image like any other image:



Hope you're not violating any copyrights...

---John Holmes...

> -Original Message-
> From: Anthony Ritter [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 11, 2002 11:53 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] =.jpg from another URL with PHP=
> 
> The following script picks up single .jpg image of a doppler weather
map
> from another URL:
> ...
> 
$theURL="http://image.weather.com/web/radar/us_har_closeradar_medium_use
n.
> jp
> g";
> if(!($fp=fopen($theURL, "r")))
>  {
>   print("Could not open the URL.");
>   exit;
>  }
> $contents=fread($fp,100);
> print($contents);
> fclose($fp);
> ?>
> ..
> 
> However, when I try to insert the HTML tages into the script like:
> 
> ..
> 
> 
> 
> This is a map.
> 
$theURL="http://image.weather.com/web/radar/us_har_closeradar_medium_use
n.
> jp
> g";
> if(!($fp=fopen($theURL, "r")))
>  {
>   print("Could not open the URL.");
>   exit;
>  }
> $contents=fread($fp,100);
> print($contents);
> fclose($fp);
> ?>
> 
> 
> ..
> 
> I get the following:
> ÿØÿàJFIFÿþ 1034364214ÿÛC
> 
> 
> 2!=,.$2I@LKG@FEPZsbPUmVEFd^emw{,N`-O}-
> s~|ÿÛC;!!;|SFS
>
||ÿÀ)¸"ÿÄ

> 
> ÿÄH
!1A"Qaq#2'¡BR±ÁÑ3áð$brñ45CSs'
> "DTt,cf²ÂÒÿÄÿÄ*!1AQ"aq2B'¡ÑðáÿÚ
> ?óz_Yª þyè¢Ñ7þ?©ø¶®xbÒÛ°ó,Ï}`Òç!W-ü$g®NÕ&³jIº'×ZTÔѶ«SðD
> Qö-yÕ+Q>_§L{M2Iý©Ô3¡q£!
> etc. etc...
> 
> I would like to insert additional text copy with this map - is this
> possible.
> 
> Thanking all in advance.
> Tony Ritter
> 
> 
> 
> 
> --
> 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] Updating session variables values during session

2002-10-11 Thread Stéphane Pinel

Le 11/10/02 11:39, « Simon Taylor » <[EMAIL PROTECTED]> a écrit :

> Have you tried it like this?
> $_SESSION['sess_client'] = $ClientName;
> $_SESSION['sess_ref_clientFact'] = $ClientRef;

Yes...but it doesn't work.

> 
> If it still gives you the old vars I would look at where the $ClientName and
> $ClientRef are coming from.

At first view, $ClientName and $ClientRef come from a link in the previous
page:

togglecl.php?ClientName=A&ClientRef=B

Then $ClientName is different than session variable $sess_client . That's
why I'm trying to put the $ClientName value to $sess_client session
variable.

Again, Thanks.

---
Stéphane Pinel
[EMAIL PROTECTED]
iChat : [EMAIL PROTECTED]

> -Original Message-
> From: Stéphane Pinel [mailto:[EMAIL PROTECTED]]
> Sent: 11 October 2002 11:32
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Updating session variables values during session
> 
> 
> Same problem...
> 
> Thanks.
> 
> ---
> Stéphane Pinel
> [EMAIL PROTECTED]
> iChat : [EMAIL PROTECTED]
> 
> 
> 
> Le 11/10/02 11:26, « Simon Taylor » <[EMAIL PROTECTED]> a écrit :
> 
>> Hiya,
>> Try using $_SESSION['variablename']
>> To refer to session variables.
>> Cheers
>> Simon
>> 
>> -Original Message-
>> From: Stéphane Pinel [mailto:[EMAIL PROTECTED]]
>> Sent: 11 October 2002 11:16
>> To: [EMAIL PROTECTED]
>> Subject: [PHP] Updating session variables values during session
>> 
>> 
>> Hi,
>> 
>> PHP 4.1.X
>> 
>> I'm trying, during the session time, to change the value of 2 session
>> variables:
>> 
>> My first attempt was simply like this:
>> 
>> $sess_client = $theClient;
>> $sess_ref_clientFact = $theRefClient;
>> 
>> ...but following pages still get old values from the session
>> variables.
>> 
>> Then I tried this:
>> 
>>   session_unregister("sess_client");
>>   session_unregister("sess_ref_clientFact");
>>   $sess_client = $ClientName;
>>   $sess_ref_clientFact = $ClientRef;
>>   session_register("sess_client");
>>   session_register("sess_ref_clientFact");
>> 
>> Same, following pages get old values from these 2 session variables...
>> 
>> I would appreciate if I could get some help ?
>> 
>> Thanks.
>> 
>> ---
>> Stéphane Pinel
>> [EMAIL PROTECTED]
>> iChat : [EMAIL PROTECTED]
>> 
> 




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




RE: [PHP] how to configure with ldap?

2002-10-11 Thread Jody Cleveland

Hi Marco,

Do I need to configure openldap to point to my Exchange server? If so, how?

Jody

> -Original Message-
> From: Marco Tabini [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 11, 2002 9:38 AM
> To: Jody Cleveland
> Cc: Php-General (E-mail)
> Subject: Re: [PHP] how to configure with ldap?
> 
> 
> You need an LDAP package like OpenLDAP:
> 
> http://www.openldap.org/
> 
> On Fri, 2002-10-11 at 10:37, Jody Cleveland wrote:
> > Hello,
> > 
> > I'm trying to configure php with ldap support. Looking at 
> ./configure
> > --help, I noticed that when I configure it, I need to put this in:
> > ./configure --with-ldap=[dir]
> > 
> > My question is, where is ldap? I'm running Redhat 7.3 with Apache 2.
> > 
> > My ultimate goal is, I'm running Squirrelmail, and I want 
> to connect to an
> > Exchange global address list.
> > 
> > Any help would be greatly appreciated.
> > 
> > Thank you.
> > 
> > -Jody Cleveland
> > 
> > Winnefox Library System
> > Computer Support Specialist
> > [EMAIL PROTECTED]
> > 
> > "I thought I had an appetite for destruction, when all I 
> really wanted was a
> > club sandwich."
> > - Homer -
> > 
> > -- 
> > 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] mysql stored procedures

2002-10-11 Thread Jon Haworth

Hi,

> when is this being implemented ?

Go and ask on the MySQL list. Version 5 was the last I heard.

Cheers
Jon

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




RE: [PHP] mysql stored procedures

2002-10-11 Thread electroteque

it has 4.1 down here i'm upgrading to 4.04 Pro beta to check it out

-Original Message-
From: Jon Haworth [mailto:[EMAIL PROTECTED]]
Sent: Saturday, October 12, 2002 1:09 AM
To: 'electroteque'; [EMAIL PROTECTED]
Subject: RE: [PHP] mysql stored procedures


Hi,

> when is this being implemented ?

Go and ask on the MySQL list. Version 5 was the last I heard.

Cheers
Jon

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




[PHP] PHP in crontab job

2002-10-11 Thread Sharat Hegde

Hello,

I am having a problem at my ISP relating to execution of PHP commands from 
the crontab command. My ISP told me to have a look at the following URL, but 
despite following these instructions, the crontab job is not being executed.
http://www.htmlcenter.com/tutorials/tutorials.cfm/155/PHP/

The crontab command line works from the shell prompt and I am able to 
execute the php command from the command line as well as the lynx command - 
no problems with that.

Any ideas on how to get the crontab to execute the PHP commands?

Regards,
Sharat


_
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




RE: [PHP] Win nt logon user how to ?

2002-10-11 Thread Daniel Masson

Thanks, im just wondering ... There are some ASP scripts in this same
server and they get the variable perfetcly, the directories have the
same config, i dont know whats wrong with this, maybe beacuse the
gateway is CGI ???

Cordialmente
Daniel Massón => Ingeniero de desarollo
[EMAIL PROTECTED]
www.imagine.com.co
Tels: (57)(1) 2182064 - 6163218
Bogotá - Colombia

- Soluciones web para internet e intranet
- Asesoría y Soporte Técnico
- Licenciamiento de Software 
 



-Mensaje original-
De: John W. Holmes [mailto:[EMAIL PROTECTED]] 
Enviado el: viernes, 11 de octubre de 2002 9:29
Para: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Asunto: RE: [PHP] Win nt logon user how to ?


It's there...

$_ENV['LOGON_USER']

You may have to turn on some NT setting in IIS for that directory...if
you're using IIS.

---John Holmes...

> -Original Message-
> From: Daniel Masson [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 11, 2002 9:55 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Win nt logon user how to ?
> 
> Hey everyone, id like to know how to get the logon user in my NT
domain,
> i know that this can be done in ASP: 
> Request.Servervariables("LOGON_USER"), and gets the logged user of the

> client machine, i need to do that with PHP, ... im affraid this is not

> possible because, runing phpinfo() ... this variable is not on 
> enviroment list.
> 
> is it possible what i want to do ??
> 
> Thanks every1 !!
> 
> Regards
> Daniel.
> 
> 
> 
> 
> -Mensaje original-
> De: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Enviado el: viernes, 11 de octubre de 2002 8:49
> Para: Cole Tuininga
> CC: [EMAIL PROTECTED]
> Asunto: Re: [PHP] Raw HTTP data
> 
> 
> See your php.ini file:
> 
> ; Always populate the $HTTP_RAW_POST_DATA variable. 
> ;always_populate_raw_post_data = On
> 
> On 11 Oct 2002, Cole Tuininga wrote:
> 
> >
> > Quick question - is there an equivalent to QUERY_STRING for POSTs?
I
> > need the deata to essentially be in the same format as for GETs.  If

> > the answer is "build it myself" from $_POST, so be it.  I was hoping

> > there was a more elegant solution though.  8)
> >
> > -Cole Tuininga
> > [EMAIL PROTECTED]
> >
> >
> >
> >
> > --
> > 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP in crontab job

2002-10-11 Thread John S. Huggins

On Fri, 11 Oct 2002, Sharat Hegde wrote:

>-Hello,
>-
>-I am having a problem at my ISP relating to execution of PHP commands from 
>-the crontab command. My ISP told me to have a look at the following URL, but 
>-despite following these instructions, the crontab job is not being executed.
>-http://www.htmlcenter.com/tutorials/tutorials.cfm/155/PHP/
>-
>-The crontab command line works from the shell prompt and I am able to 
>-execute the php command from the command line as well as the lynx command - 
>-no problems with that.
>-
>-Any ideas on how to get the crontab to execute the PHP commands?

Ensure you have specified the php program in the first line, I am sure you
did this but here is how I do it.

#!/usr/local/bin/php -q


Make sure it is a fully specified pathname to the php executable.  Crontab
all too often does not have knowledge of your path environment so may get
lost if you just say "php."

Make sure you really do have a php executable.  This is what will compile
if you do not specify any configuration directives during the ./configure
process.

Tell us how you do.


>-
>-Regards,
>-Sharat
>-
>-
>-_
>-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
>-

**

John Huggins
VANet

[EMAIL PROTECTED]
http://www.va.net/

**


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




Re: [PHP] PHP in crontab job

2002-10-11 Thread Marek Kilimajer

try using full path in your cron job, like
* * * * * /usr/local/bin/php /path/to/your/cron.php

Sharat Hegde wrote:

> Hello,
>
> I am having a problem at my ISP relating to execution of PHP commands 
> from the crontab command. My ISP told me to have a look at the 
> following URL, but despite following these instructions, the crontab 
> job is not being executed.
> http://www.htmlcenter.com/tutorials/tutorials.cfm/155/PHP/
>
> The crontab command line works from the shell prompt and I am able to 
> execute the php command from the command line as well as the lynx 
> command - no problems with that.
>
> Any ideas on how to get the crontab to execute the PHP commands?
>
> Regards,
> Sharat
>
>
> _
> 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] Multiple Form Submit Buttons

2002-10-11 Thread Jonathan Rosenberg

I have been digging through the documentation for a while, but I can't find
the answer to this ...

If I have a form with multiple submit buttons, how can I tell in PHP which
button was clicked?

--
JR



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




[PHP] Re: Multiple Form Submit Buttons

2002-10-11 Thread Johannes Janson

Hi,

Jonathan Rosenberg wrote:
> I have been digging through the documentation for a while, but I can't find
> the answer to this ...
> 
> If I have a form with multiple submit buttons, how can I tell in PHP which
> button was clicked?

just give them different names e.g. submit1, submit2 ... and then do
what you want with an if clause and $_POST["submit1"] on the action
page.

hope it helps
Johannes

> 
> --
> JR
> 
> 


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




RE: [PHP] Multiple Form Submit Buttons

2002-10-11 Thread Jay Blanchard

[snip]

I have been digging through the documentation for a while, but I can't find
the answer to this ...

If I have a form with multiple submit buttons, how can I tell in PHP which
button was clicked?
[/snip]

Use a switch/case statement;

switch($action)
{
case "Save":
// query to insert saved elements only
$qsave = "UPDATE tblArticle ";
$qsave .= "SET title = '$title', ";
$qsave .= "teaser = '$teaser', ";
$qsave .= "body = '$body' ";
$qsave .= "WHERE ID = '$aid' ";

if(!($dbsave = mysql_query($qsave, $dbconnect))){
print("MySQL reports: " . mysql_error() . "\n");
exit();
}

break;

case "Submit Article":
//query to submit article
$qsubmit = "UPDATE tblArticle ";
$qsubmit .= "SET title = '$title', ";
$qsubmit .= "teaser = '$teaser', ";
$qsubmit .= "body = '$body', ";
$qsubmit .= "type = '$type' ";
$qsubmit .= "WHERE ID = '$aid' ";

if(!($dbsubmit = mysql_query($qsubmit, $dbconnect))){
print("MySQL reports: " . mysql_error() . "\n");
exit();
}

Each of the buttons is named "action" and based on the value the script
processes accordingly.

HTH!

Jay



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




Re: [PHP] running slow on Win2k

2002-10-11 Thread Support @ Fourthrealm.com

More details on this...
As I pay more attention to when it is sluggish or not, I notice that it 
seems to run fine on a typical page, with or without mySQL connections.

But... the slowdown comes whenever I'm into my frame-based Admin, where 2-3 
frames are typically loading at the same time.  The same Admin structure 
written in another language is quick, but the PHP version seems slow.

I hope this can spark some new suggestions...

Thanks in advance...
Peter



At 11:19 AM 10/7/2002 -0400, you wrote:
>Hi everyone,
>I notice that my PHP runs really slow on Win2k Server w/ IIS 5, and even 
>slower when accessing a mySQL database.  It's a PIII-800 with 256MB 
>RAM.  It is otherwise a great machine, and fast.
>
>Any suggestions?
>
>Peter
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

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


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




RE: [PHP] Win nt logon user how to ?

2002-10-11 Thread John W. Holmes

Yeah, maybe. The version I've seen it work on all had PHP installed as a
module in IIS.

---John Holmes...

> -Original Message-
> From: Daniel Masson [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 11, 2002 11:23 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: [PHP] Win nt logon user how to ?
> 
> Thanks, im just wondering ... There are some ASP scripts in this same
> server and they get the variable perfetcly, the directories have the
> same config, i dont know whats wrong with this, maybe beacuse the
> gateway is CGI ???
> 
> Cordialmente
> Daniel Massón => Ingeniero de desarollo
> [EMAIL PROTECTED]
> www.imagine.com.co
> Tels: (57)(1) 2182064 - 6163218
> Bogotá - Colombia
>

> - Soluciones web para internet e intranet
> - Asesoría y Soporte Técnico
> - Licenciamiento de Software
> 
> 
> 
> 
> -Mensaje original-
> De: John W. Holmes [mailto:[EMAIL PROTECTED]]
> Enviado el: viernes, 11 de octubre de 2002 9:29
> Para: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Asunto: RE: [PHP] Win nt logon user how to ?
> 
> 
> It's there...
> 
> $_ENV['LOGON_USER']
> 
> You may have to turn on some NT setting in IIS for that directory...if
> you're using IIS.
> 
> ---John Holmes...
> 
> > -Original Message-
> > From: Daniel Masson [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, October 11, 2002 9:55 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Win nt logon user how to ?
> >
> > Hey everyone, id like to know how to get the logon user in my NT
> domain,
> > i know that this can be done in ASP:
> > Request.Servervariables("LOGON_USER"), and gets the logged user of
the
> 
> > client machine, i need to do that with PHP, ... im affraid this is
not
> 
> > possible because, runing phpinfo() ... this variable is not on
> > enviroment list.
> >
> > is it possible what i want to do ??
> >
> > Thanks every1 !!
> >
> > Regards
> > Daniel.
> >
> >
> >
> >
> > -Mensaje original-
> > De: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> > Enviado el: viernes, 11 de octubre de 2002 8:49
> > Para: Cole Tuininga
> > CC: [EMAIL PROTECTED]
> > Asunto: Re: [PHP] Raw HTTP data
> >
> >
> > See your php.ini file:
> >
> > ; Always populate the $HTTP_RAW_POST_DATA variable.
> > ;always_populate_raw_post_data = On
> >
> > On 11 Oct 2002, Cole Tuininga wrote:
> >
> > >
> > > Quick question - is there an equivalent to QUERY_STRING for POSTs?
> I
> > > need the deata to essentially be in the same format as for GETs.
If
> 
> > > the answer is "build it myself" from $_POST, so be it.  I was
hoping
> 
> > > there was a more elegant solution though.  8)
> > >
> > > -Cole Tuininga
> > > [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> > > --
> > > 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Urgent help with Sessions and Cookies

2002-10-11 Thread Jadiel Flores

I have a very, very little site for a client, I have to set a username and 
password to admin some data they publish, the problem is that in my server 
the cookies and sessions work excellent, but when I publish the same code 
in my client's server it doesn't work, the cookie is deleted immediately, 
and sessions dissapear too, I have other sections in the same server using 
cookies and session and work fine, but in this specific directory it 
doesn't work.

Any idea???


Jadiel Flores
-
http://www.abargon.com
[EMAIL PROTECTED]
(52-55) 52-29-80-34



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




[PHP] Dreaded expecting `T_VARIABLE' or... Error -- long post

2002-10-11 Thread Verdon Vaillancourt

Hi Apologies if this question has been answered before and I can't find it.
I have searched and although finding similar issues, I haven't been able to
fix. 

I have a file that creates a search for and then is supposed to post to
itself to retriev results. When I add the first function (the search form)
everything seems OK. The page renders, the select menus are populated from
my mySQL db. 

When I add the second function (the results). I start getting an error that
refers to a line number in my initial function that was previously OK. I
gather the error has something to do with syntax, but I can't find it.

I'll show some examples and then detail the error.

My intial code that creates the search form and works is:


PHP:



// Handles session initialization

include("open_session.php");

if(!isset($mainfile))

{
  include("mainfile.php");
}

// Global configuration data
include("config.php");

// Generates page header
include ("header.php");

function sform() {

include("config.php");

$box_title = "Search Form";

$box_stuff = "";

$box_stuff .= "Search hints can go
here";

$box_stuff .= "



Search for:

CompanyCategoryCity



\n";


$cat_result = mysql_query("select cat, catkey, cattext, count(cat) AS
num_type FROM " . $table_prefix."users LEFT JOIN
" . $table_prefix."users_cat ON cat=catkey GROUP BY cattext ORDER BY
cattext");

$categories = mysql_fetch_array($cat_result);

if ($categories) {

while ($c2 = mysql_fetch_array($cat_result)) {

$num_type = $c2[num_type];

$box_stuff .= "$c2[cattext] (
$num_type)";

}

}

$box_stuff .= "







\n";



$city_result = mysql_query("select city, count(city) AS num_type FROM
" . $table_prefix."users GROUP BY city ORDER BY city");

$cities = mysql_fetch_array($city_result);

if ($cities) {

while ($c3 = mysql_fetch_array($city_result)) {

$num_type3 = $c3[num_type];

$box_stuff .= "$c3[city] ($num
_type3)";

}

}

$box_stuff .= "\n";



$box_stuff .= "

 Note: searching for all can produce a large
page!



";



thememainbox($box_title, $box_stuff);

include("footer.php");

}



switch($op) {

case "search":

search();

break;



default:

sform();

break;

  }






Now, when I add anything for the function search() , even a simple message
printed to the page such as:


PHP:



function search()

{

include('config.php');

global ;

$box_title = "Search Results";

$box_stuff .= "Results here";

thememainbox($box_title, $box_stuff);

include("footer.php");

}





I get the error: Parse error: parse error, expecting `T_VARIABLE' or `'$''
in /Library/WebServer/Documents/phpwebsite/search_users.php on line 45

BTW... line 45 is part of the initial funtion that was working before:


PHP:


$cat_result = mysql_query("select cat, catkey, cattext, count(cat) AS
num_type FROM " . $table_prefix."users LEFT JOIN
" . $table_prefix."users_cat ON cat=catkey GROUP BY cattext ORDER BY
cattext");

$categories = mysql_fetch_array($cat_result);

if ($categories) {

while ($c2 = mysql_fetch_array($cat_result)) {

$num_type = $c2[num_type];

$box_stuff .= "$c2[cattext] (
$num_type)";

}  //THIS IS LINE 45

}




I feel that if I can get past this, I can likely get my actual search to
work. If you're curious, the following code is what I actually have in mind
for the search function. I just can't get far enough along to even test it.
I would surely appreciate any advice that anyone can extend.:


PHP:


function search() {

include("config.php");

global $company, $cat, $city, $catkey, $cattext, Order;

$box_title = "Search Results";

if ($cat>0) {

$classreq="AND catkey=$cat";

}

  if (!$Order) {

$Order="company";

}

$query = "SELECT company, city, cat, catkey, cattext FROM
" . $table_prefix."users LEFT JOIN
" . $table_prefix."users_cat ON cat=catkey WHERE company LIKE '%$company%' A
ND city LIKE '%$city%' AND cat LIKE '%$cat%' $classreq ORDER BY $Order";

$result = mysql_query($query);


$box_stuff = "";

$box_stuff .= "";

if ($result){

if ($r = mysql_fetch_array($result)){

do {

$box_stuff .="

CompanyCatego
ryCity

$r[company]$r
[cattext]$r[city]";

} while ($r = mysql_fetch_array($result));

} else {

$box_stuff .= "Search Failed";

}

}


$box_stuff .= "";

thememainbox($box_title, $box_stuff);

include("footer.php");

}





Thanks 

[PHP] Job offerings - Where?

2002-10-11 Thread Iván Vega Rivera

Hello everybody, 

I started a web development firm with a friend of mine, and although
we've had success in our endeavour, we're having a hard time trying to
find qualified developers in our country. 

We specialize in developing custom web-based solutions using PHP and
MySQL, ranging from Intranets for schools to e-commerce sites and
portals. 

We're located in Mexico City, Mexico. As you may expect, we may not be
able to match rates from people living in well developed countries. 

Now, on to the request. We're looking to outsource some of our work, so
we need a PHP/MySQL developer. Additional positions/freelance
opportunities may be available in the foreseeable future. 

Advanced HTML/DHTML and JavaScript knowledge is desired, though not
required. Spanish language knowledge is also a plus. 

I'm the kind of developer that loves to do his stuff, and often
"forgets" to eat or sleep when exploring new technologies, or developing
interesting stuff. These kind of developers are what we're looking for
(we don't ask you not to sleep, just to love what you do ). 

If you're interested please e-mail me your resumé along with your
expectancies. 

Finally, if you think this is not the place for this kind of post, would
you point me in the right direction? Be aware that we currently aren't
able to use a specialized job site because of the posting rates. 

Best regards, 
Ivan Vega R. <[EMAIL PROTECTED]> 
CEO 
iSolutions de Mexico 
http://i-sol.biz/ 

PS: We expect to offer great grow opportunities.



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




RE: [PHP] Dreaded expecting `T_VARIABLE' or... Error -- long post

2002-10-11 Thread John W. Holmes

If you're going to use an array in a string, you have to surround it
with braces.

echo "value is {$c2[something]} okay?";

Or, exit out of the string:

echo "value is " . $c2['something'] . " okay?";

If you use it outside of the string, you need the single/double quotes
around the key so you don't get an undefined constant warning.

That looks like your problem.

---John Holmes...

> -Original Message-
> From: Verdon Vaillancourt [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 11, 2002 12:34 PM
> To: PHP-General
> Subject: [PHP] Dreaded expecting `T_VARIABLE' or... Error -- long post
> 
> Hi Apologies if this question has been answered before and I can't
find
> it.
> I have searched and although finding similar issues, I haven't been
able
> to
> fix.
> 
> I have a file that creates a search for and then is supposed to post
to
> itself to retriev results. When I add the first function (the search
form)
> everything seems OK. The page renders, the select menus are populated
from
> my mySQL db.
> 
> When I add the second function (the results). I start getting an error
> that
> refers to a line number in my initial function that was previously OK.
I
> gather the error has something to do with syntax, but I can't find it.
> 
> I'll show some examples and then detail the error.
> 
> My intial code that creates the search form and works is:
> 
> 
> PHP:
>

> 
> 
> // Handles session initialization
> 
> include("open_session.php");
> 
> if(!isset($mainfile))
> 
> {
>   include("mainfile.php");
> }
> 
> // Global configuration data
> include("config.php");
> 
> // Generates page header
> include ("header.php");
> 
> function sform() {
> 
> include("config.php");
> 
> $box_title = "Search Form";
> 
> $box_stuff = "";
> 
> $box_stuff .= "Search hints can go
> here";
> 
> $box_stuff .= "
> 
> 
> 
> Search for:
> 
> Company align=\"left\">Category align=\"left\">City
> 
>  align=\"left\" valign=\"top\">
> 
> \n";
> 
> 
> $cat_result = mysql_query("select cat, catkey, cattext, count(cat) AS
> num_type FROM " . $table_prefix."users LEFT JOIN
> " . $table_prefix."users_cat ON cat=catkey GROUP BY cattext ORDER BY
> cattext");
> 
> $categories = mysql_fetch_array($cat_result);
> 
> if ($categories) {
> 
> while ($c2 = mysql_fetch_array($cat_result)) {
> 
> $num_type = $c2[num_type];
> 
>
$box_stuff .= "$c2[cattex
t]
>  (
> $num_type)";
> 
> }
> 
> }
> 
> $box_stuff .= "
> 
> 
> 
> 
> 
> 
> 
> \n";
> 
> 
> 
> $city_result = mysql_query("select city, count(city) AS num_type FROM
> " . $table_prefix."users GROUP BY city ORDER BY city");
> 
> $cities = mysql_fetch_array($city_result);
> 
> if ($cities) {
> 
> while ($c3 = mysql_fetch_array($city_result)) {
> 
> $num_type3 = $c3[num_type];
> 
>
$box_stuff .= "$c3[city] (
$n
> um
> _type3)";
> 
> }
> 
> }
> 
> $box_stuff .= "\n";
> 
> 
> 
> $box_stuff .= "
> 
>  value=\"Search\"> Note: searching for all can produce a large
> page!
> 
> 
> 
> ";
> 
> 
> 
> thememainbox($box_title, $box_stuff);
> 
> include("footer.php");
> 
> }
> 
> 
> 
> switch($op) {
> 
> case "search":
> 
> search();
> 
> break;
> 
> 
> 
> default:
> 
> sform();
> 
> break;
> 
>   }
> 
> 
> 
>

> 
> 
> Now, when I add anything for the function search() , even a simple
message
> printed to the page such as:
> 
> 
> PHP:
>

> 
> 
> function search()
> 
> {
> 
> include('config.php');
> 
> global ;
> 
> $box_title = "Search Results";
> 
> $box_stuff .= "Results here";
> 
> thememainbox($box_title, $box_stuff);
> 
> include("footer.php");
> 
> }
> 
> 
>

> 
> 
> I get the error: Parse error: parse error, expecting `T_VARIABLE' or
`'$''
> in /Library/WebServer/Documents/phpwebsite/search_users.php on line 45
> 
> BTW... line 45 is part of the initial funtion that was working before:
> 
> 
> PHP:
>

> 
> $cat_result = mysql_query("select cat, catkey, cattext, count(cat) AS
> num_type FROM " . $table_prefix."users LEFT JOIN
> " . $table_prefix."users_cat ON cat=catkey GROUP BY cattext ORDER BY
> cattext");
> 
> $categories = mysql_fetch_array($cat_result);
> 
> if ($categories) {
> 
> while ($c2 = mysql_fetch_array($cat_result)) {
> 
> $num_type = $c2[num_type];
> 
>
$box_stuff .= "$c2[cattex
t]
>  (
> $num_type)";
> 
> }  //THIS IS LINE 45
> 
> }
> 
>

> 
> 
> I feel that if I can get past this, I can likely get my actual search
to
> work. If you're curious, the following code is what I actually have in
> mind
> for the search function. I just can't get far enough alon

[PHP] Re: Multiple Form Submit Buttons

2002-10-11 Thread Dimitris Kossikidis

Suppose that form's buttons are







That's all

"Jonathan Rosenberg" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have been digging through the documentation for a while, but I can't
find
> the answer to this ...
>
> If I have a form with multiple submit buttons, how can I tell in PHP which
> button was clicked?
>
> --
> JR
>
>



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




Re: [PHP] Dreaded expecting `T_VARIABLE' or... Error -- long post

2002-10-11 Thread Marek Kilimajer

the line
global ;
should be
global $some_variable;
or delete it

Verdon Vaillancourt wrote:

>Hi Apologies if this question has been answered before and I can't find it.
>I have searched and although finding similar issues, I haven't been able to
>fix. 
>
>I have a file that creates a search for and then is supposed to post to
>itself to retriev results. When I add the first function (the search form)
>everything seems OK. The page renders, the select menus are populated from
>my mySQL db. 
>
>When I add the second function (the results). I start getting an error that
>refers to a line number in my initial function that was previously OK. I
>gather the error has something to do with syntax, but I can't find it.
>
>I'll show some examples and then detail the error.
>
>My intial code that creates the search form and works is:
>
>
>PHP:
>
>
>
>// Handles session initialization
>
>include("open_session.php");
>
>if(!isset($mainfile))
>
>{
>  include("mainfile.php");
>}
>
>// Global configuration data
>include("config.php");
>
>// Generates page header
>include ("header.php");
>
>function sform() {
>
>include("config.php");
>
>$box_title = "Search Form";
>
>$box_stuff = "";
>
>$box_stuff .= "Search hints can go
>here";
>
>$box_stuff .= "
>
>
>
>Search for:
>
>Companyalign=\"left\">Categoryalign=\"left\">City
>
>align=\"left\" valign=\"top\">
>
>\n";
>
>
>$cat_result = mysql_query("select cat, catkey, cattext, count(cat) AS
>num_type FROM " . $table_prefix."users LEFT JOIN
>" . $table_prefix."users_cat ON cat=catkey GROUP BY cattext ORDER BY
>cattext");
>
>$categories = mysql_fetch_array($cat_result);
>
>if ($categories) {
>
>while ($c2 = mysql_fetch_array($cat_result)) {
>
>$num_type = $c2[num_type];
>
>$box_stuff .= "$c2[cattext] (
>$num_type)";
>
>}
>
>}
>
>$box_stuff .= "
>
>
>
>
>
>
>
>\n";
>
>
>
>$city_result = mysql_query("select city, count(city) AS num_type FROM
>" . $table_prefix."users GROUP BY city ORDER BY city");
>
>$cities = mysql_fetch_array($city_result);
>
>if ($cities) {
>
>while ($c3 = mysql_fetch_array($city_result)) {
>
>$num_type3 = $c3[num_type];
>
>$box_stuff .= "$c3[city] ($num
>_type3)";
>
>}
>
>}
>
>$box_stuff .= "\n";
>
>
>
>$box_stuff .= "
>
>value=\"Search\"> Note: searching for all can produce a large
>page!
>
>
>
>";
>
>
>
>thememainbox($box_title, $box_stuff);
>
>include("footer.php");
>
>}
>
>
>
>switch($op) {
>
>case "search":
>
>search();
>
>break;
>
>
>
>default:
>
>sform();
>
>break;
>
>  }
>
>
>
>
>
>
>Now, when I add anything for the function search() , even a simple message
>printed to the page such as:
>
>
>PHP:
>
>
>
>function search()
>
>{
>
>include('config.php');
>
>global ;
>
>$box_title = "Search Results";
>
>$box_stuff .= "Results here";
>
>thememainbox($box_title, $box_stuff);
>
>include("footer.php");
>
>}
>
>
>
>
>
>I get the error: Parse error: parse error, expecting `T_VARIABLE' or `'$''
>in /Library/WebServer/Documents/phpwebsite/search_users.php on line 45
>
>BTW... line 45 is part of the initial funtion that was working before:
>
>
>PHP:
>
>
>$cat_result = mysql_query("select cat, catkey, cattext, count(cat) AS
>num_type FROM " . $table_prefix."users LEFT JOIN
>" . $table_prefix."users_cat ON cat=catkey GROUP BY cattext ORDER BY
>cattext");
>
>$categories = mysql_fetch_array($cat_result);
>
>if ($categories) {
>
>while ($c2 = mysql_fetch_array($cat_result)) {
>
>$num_type = $c2[num_type];
>
>$box_stuff .= "$c2[cattext] (
>$num_type)";
>
>}  //THIS IS LINE 45
>
>}
>
>
>
>
>I feel that if I can get past this, I can likely get my actual search to
>work. If you're curious, the following code is what I actually have in mind
>for the search function. I just can't get far enough along to even test it.
>I would surely appreciate any advice that anyone can extend.:
>
>
>PHP:
>
>
>function search() {
>
>include("config.php");
>
>global $company, $cat, $city, $catkey, $cattext, Order;
>
>$box_title = "Search Results";
>
>if ($cat>0) {
>
>$classreq="AND catkey=$cat";
>
>}
>
>  if (!$Order) {
>
>$Order="company";
>
>}
>
>$query = "SELECT company, city, cat, catkey, cattext FROM
>" . $table_prefix."users LEFT JOIN
>" . $table_prefix."users_cat ON cat=catkey WHERE company LIKE '%$company%' A
>ND city LIKE '%$city%' AND cat LIKE '%$cat%' $classreq ORDER BY $Order";
>
>$result = mysql_query($query);
>
>
>$box_stuff = "";
>
>$box_stuff .= "";
>
>if ($r

[PHP] Uploading in stages

2002-10-11 Thread Randum Ian

Hi,
 
I am trying to upload a big file on dialup to my server but it keeps
timing out. Is there a way I can split it and then piece it together
online like winzip but with tar?
 
Randum Ian
[EMAIL PROTECTED]
DJ / Reviewer / Webmaster, DancePortal (UK) Limited 
DancePortal.co.uk - Global dance music media
 



[PHP] Trouble wirh < in a string

2002-10-11 Thread Christian Ista

Hello,

I have a small problem a string I have for example : $myvar= "hellhttp://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] fgetcsv or other

2002-10-11 Thread Bryan Koschmann - GKT

Hi,

I need to read from a csv file (with quotes). I use the example from the
manual, and it does spit it out how I want it, but I need to access one of
the fields and pass that data to something else.

So it's like this, I need my csv file to be displayed in a table, but the
last column will contain an image generate using data from the first
column.

Does anyone have any examples? I've been searching the net, but haven't
really found much.

Thanks!

Bryan


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




RE: [PHP] Trouble wirh < in a string

2002-10-11 Thread Brian V Bonini

Try 

$myvar = 'hell From: Christian Ista [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 11, 2002 12:56 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Trouble wirh < in a string
> 
> 
> Hello,
> 
> I have a small problem a string I have for example : $myvar= "hell friend";  
> When I display the content of $myvar with echo I see "hell" and not the
> rest.
> 
> I suppose the problem come from the < how solve the problem ?
> 
> Bye
> 
> 
> -- 
> 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] Trouble wirh < in a string

2002-10-11 Thread John W. Holmes

> I have a small problem a string I have for example : $myvar= "hell friend";
> When I display the content of $myvar with echo I see "hell" and not
the
> rest.
> 
> I suppose the problem come from the < how solve the problem ?

You're putting that string in HTML and it's being evaluated by the
browser. It sees the < as the beginning of a tag, so it's looking for a
tag to follow. Tags that the browser doesn't recognize are just not
shown. Try to put  in your HTML and it won't show up (may depend on
browser). 

What you want to do is use an HTML entity for the <, > and other
characters. < would be <, > is >. You can also use the
htmlentities() or htmlspecialchars() function in PHP to do the
conversion for you automatically.

---John Holmes...



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




[PHP] Interesting results with date()

2002-10-11 Thread Joshua E Minnie

Hey all,
I am having some interesting, but confusing results when I use date().
What is confusing me is that when I use date with only the first argument, I
get some interesting results with the timezone.

i.e.


You would expect to see something like this:

Fri, 11 Oct 2002 13:24:53 -0500 Eastern Standard Time

But instead everything is off by an hour while still keeping the current
timezone:

Fri, 11 Oct 2002 13:24:53 -0400 Eastern Standard Time (notice the -0400
instead of -0500)

Is there something I can do to fix this problem, a setting in the php.ini
file perhaps.  The machine that is running the server is set to the proper
timezone (-0500 EST).

I am running W2K, IIS5 with PHP 4.2.3.

Thanks,


  _
 / Joshua Minnie\
++---+
| Advantage Computer Services, LLC   |
| Senior Project Manager |
| [EMAIL PROTECTED]|
||
| Tel : 269.276.9690 |
| Fax : 269.342.8750 |
++



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




Re: [PHP] PHP in crontab job

2002-10-11 Thread Sharat Hegde

Hello John,

Thanks for the help. I was able to solve this. Thanks Marek for your help 
too in giving the same solution.

The problem was with the crontab command not having the full path to php. 
Silly that a command line on the shell script should work but crontab is 
unable to find the same path.

Thanks again,
Sharat


>From: "John S. Huggins" <[EMAIL PROTECTED]>
>To: Sharat Hegde <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: Re: [PHP] PHP in crontab job
>Date: Fri, 11 Oct 2002 15:35:41 + (UTC)
>
>On Fri, 11 Oct 2002, Sharat Hegde wrote:
>
> >-Hello,
> >-
> >-I am having a problem at my ISP relating to execution of PHP commands 
>from
> >-the crontab command. My ISP told me to have a look at the following URL, 
>but
> >-despite following these instructions, the crontab job is not being 
>executed.
> >-http://www.htmlcenter.com/tutorials/tutorials.cfm/155/PHP/
> >-
> >-The crontab command line works from the shell prompt and I am able to
> >-execute the php command from the command line as well as the lynx 
>command -
> >-no problems with that.
> >-
> >-Any ideas on how to get the crontab to execute the PHP commands?
>
>Ensure you have specified the php program in the first line, I am sure you
>did this but here is how I do it.
>
>#!/usr/local/bin/php -q
>
>
>Make sure it is a fully specified pathname to the php executable.  Crontab
>all too often does not have knowledge of your path environment so may get
>lost if you just say "php."
>
>Make sure you really do have a php executable.  This is what will compile
>if you do not specify any configuration directives during the ./configure
>process.
>
>Tell us how you do.
>
>
> >-
> >-Regards,
> >-Sharat
> >-
> >-
> >-_
> >-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
> >-
>
>**
>
>John Huggins
>VANet
>
>[EMAIL PROTECTED]
>http://www.va.net/
>
>**




_
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




Re: [PHP] PHP in crontab job

2002-10-11 Thread Marek Kilimajer

The problem is crontab doesn't heve enviroment, there is no $PATH, $USER ...

Sharat Hegde wrote:

> Hello John,
>
> Thanks for the help. I was able to solve this. Thanks Marek for your 
> help too in giving the same solution.
>
> The problem was with the crontab command not having the full path to 
> php. Silly that a command line on the shell script should work but 
> crontab is unable to find the same path.
>
> Thanks again,
> Sharat
>
>
>> From: "John S. Huggins" <[EMAIL PROTECTED]>
>> To: Sharat Hegde <[EMAIL PROTECTED]>
>> CC: [EMAIL PROTECTED]
>> Subject: Re: [PHP] PHP in crontab job
>> Date: Fri, 11 Oct 2002 15:35:41 + (UTC)
>>
>> On Fri, 11 Oct 2002, Sharat Hegde wrote:
>>
>> >-Hello,
>> >-
>> >-I am having a problem at my ISP relating to execution of PHP 
>> commands from
>> >-the crontab command. My ISP told me to have a look at the following 
>> URL, but
>> >-despite following these instructions, the crontab job is not being 
>> executed.
>> >-http://www.htmlcenter.com/tutorials/tutorials.cfm/155/PHP/
>> >-
>> >-The crontab command line works from the shell prompt and I am able to
>> >-execute the php command from the command line as well as the lynx 
>> command -
>> >-no problems with that.
>> >-
>> >-Any ideas on how to get the crontab to execute the PHP commands?
>>
>> Ensure you have specified the php program in the first line, I am 
>> sure you
>> did this but here is how I do it.
>>
>> #!/usr/local/bin/php -q
>>
>>
>> Make sure it is a fully specified pathname to the php executable. 
>> Crontab
>> all too often does not have knowledge of your path environment so may 
>> get
>> lost if you just say "php."
>>
>> Make sure you really do have a php executable. This is what will compile
>> if you do not specify any configuration directives during the 
>> ./configure
>> process.
>>
>> Tell us how you do.
>>
>>
>> >-
>> >-Regards,
>> >-Sharat
>> >-
>> >-
>> >-_
>> >-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
>> >-
>>
>> **
>>
>> John Huggins
>> VANet
>>
>> [EMAIL PROTECTED]
>> http://www.va.net/
>>
>> **
>
>
>
>
>
> _
> 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




RE: [PHP] how to configure with ldap?

2002-10-11 Thread Jody Cleveland

Hello,

Well, I installed openldap, and it tests out good. Now, I want to configure
php to work with it. My question now is, where exactly is ldap located? I
tried a few paths:
./configure --with-mysql --with-apxs2=/www/bin/apxs
--with-ldap=/usr/local/etc/openldap
./configure --with-mysql --with-apxs2=/www/bin/apxs
--with-ldap=/usr/local/libexec

And, I get this error:
checking for LDAP support... yes
configure: error: Cannot find ldap.h

So, I searched for ldap.h and used that path:
./configure --with-mysql --with-apxs2=/www/bin/apxs --with-ldap=/usr/include

Same thing, cannot find.

Any ideas?

Thanks!

Jody

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




[PHP] sometimes I get session write failure

2002-10-11 Thread Josh Bauguss

I've searched this mailing list and couldn't find anybody with a similar
problem.

I am seeing periodic session write failures on my server.  I get the classic

PHP Warning:  Failed to write session data (files). Please verify that the
current setting of session.save_path is correct
(/home/t-shirtking.com/session_data) in Unknown on line 0

Of course I checked the permissions.  Everything is fine there.  Garbage
collection runs well.  The directory doesn't get real big.

The thing I couldn't find on this mailing list is that sessions work.  I
can't duplicate the message.  So I only sometimes get the error.

I added the session write close command in an include file that gets
appended to every page.

Why in the world would I only sometimes get this error?

Thanks,
Josh Bauguss
[EMAIL PROTECTED]




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




RE: [PHP] sometimes I get session write failure

2002-10-11 Thread John W. Holmes

You just have one server, right? Is there any kind of load-balancing
going on that uses several servers?

---John Holmes...

> -Original Message-
> From: Josh Bauguss [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 11, 2002 2:04 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] sometimes I get session write failure
> 
> I've searched this mailing list and couldn't find anybody with a
similar
> problem.
> 
> I am seeing periodic session write failures on my server.  I get the
> classic
> 
> PHP Warning:  Failed to write session data (files). Please verify that
the
> current setting of session.save_path is correct
> (/home/t-shirtking.com/session_data) in Unknown on line 0
> 
> Of course I checked the permissions.  Everything is fine there.
Garbage
> collection runs well.  The directory doesn't get real big.
> 
> The thing I couldn't find on this mailing list is that sessions work.
I
> can't duplicate the message.  So I only sometimes get the error.
> 
> I added the session write close command in an include file that gets
> appended to every page.
> 
> Why in the world would I only sometimes get this error?
> 
> Thanks,
> Josh Bauguss
> [EMAIL PROTECTED]
> 
> 
> 
> 
> --
> 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] Converting audio files and display/play in browser

2002-10-11 Thread Thomas Nilsen

Anyone got any ideas as to how I can solve the following in PHP?

I want to be able to select a file, and convert it from sox format to MP3 or
WAV, and then play it in the requestors browser? Can this be achieved in an
easy way?

The problem I have is to be able to call  up lame/sox or similar tools on
the linux web server, and once the newly converted file is available, throw
it at the requesting browser as a file download?

Regards, Thomas



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




RE: [PHP] Converting audio files and display/play in browser

2002-10-11 Thread Timothy J Hitchens

Why don't you call your converter then pipe out to a file... the then
send headers for that type
of file and readfile to the browser..


Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Thomas Nilsen [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, 12 October 2002 4:22 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Converting audio files and display/play in browser


Anyone got any ideas as to how I can solve the following in PHP?

I want to be able to select a file, and convert it from sox format to
MP3 or WAV, and then play it in the requestors browser? Can this be
achieved in an easy way?

The problem I have is to be able to call  up lame/sox or similar tools
on the linux web server, and once the newly converted file is available,
throw it at the requesting browser as a file download?

Regards, Thomas



-- 
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] Converting audio files and display/play in browser

2002-10-11 Thread John W. Holmes

> Anyone got any ideas as to how I can solve the following in PHP?
> 
> I want to be able to select a file, and convert it from sox format to
MP3
> or
> WAV, and then play it in the requestors browser? Can this be achieved
in
> an
> easy way?
> 
> The problem I have is to be able to call  up lame/sox or similar tools
on
> the linux web server, and once the newly converted file is available,
> throw
> it at the requesting browser as a file download?

Use exec or backticks to execute your program that does the conversion
and writes the new file, then send the mp3,wav, etc headers and send the
data from the newly created file. 

Depending on how long the conversion takes, you may want to redirect the
user to the file after a certain amount of time and let the browser
handle it. 

---John Holmes...



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




[PHP] Login Info not being remembered

2002-10-11 Thread Justoman


After putting up the latest version of PHP (4.2.3 I think) I've had nothin
but problems with my scripts.

One of those problems is the script not remembering my login information.

Has anyone else experienced this, or know anything about this problem?

Thanks,
-Justin



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




RE: [PHP] Login Info not being remembered

2002-10-11 Thread John W. Holmes

I'm sure it's all related to the register_global and error_reporting
settings in php.ini...

Enjoy.

---John Holmes...

> -Original Message-
> From: Justoman [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 11, 2002 3:17 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Login Info not being remembered
> 
> 
> After putting up the latest version of PHP (4.2.3 I think) I've had
nothin
> but problems with my scripts.
> 
> One of those problems is the script not remembering my login
information.
> 
> Has anyone else experienced this, or know anything about this problem?
> 
> Thanks,
> -Justin
> 
> 
> 
> --
> 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] Converting audio files and display/play in browser

2002-10-11 Thread Thomas Nilsen

It's the part sending the header back to the browser with the correct info
I'm not sure about. I can handle the conversion of the audio file, but I'm
not sure how to get the browser to read the converted file once it's ready.


"Timothy J Hitchens" <[EMAIL PROTECTED]> wrote in message
005301c27159$483dc170$0500a8c0@BAMBINO">news:005301c27159$483dc170$0500a8c0@BAMBINO...
> Why don't you call your converter then pipe out to a file... the then
> send headers for that type
> of file and readfile to the browser..
>
>
> Timothy Hitchens (HITCHO)
> [EMAIL PROTECTED]
>
> HITCHO has Spoken!
>
>
>
>
>
>
> -Original Message-
> From: Thomas Nilsen [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, 12 October 2002 4:22 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Converting audio files and display/play in browser
>
>
> Anyone got any ideas as to how I can solve the following in PHP?
>
> I want to be able to select a file, and convert it from sox format to
> MP3 or WAV, and then play it in the requestors browser? Can this be
> achieved in an easy way?
>
> The problem I have is to be able to call  up lame/sox or similar tools
> on the linux web server, and once the newly converted file is available,
> throw it at the requesting browser as a file download?
>
> Regards, Thomas
>
>
>
> --
> 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] Converting audio files and display/play in browser

2002-10-11 Thread Timothy J Hitchens

Easy...




What this does it sends a header then the file is read from disk to
standard out.

Please note you may need to get your include/paths correct...




Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Thomas Nilsen [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, 12 October 2002 6:05 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Converting audio files and display/play in browser


It's the part sending the header back to the browser with the correct
info I'm not sure about. I can handle the conversion of the audio file,
but I'm not sure how to get the browser to read the converted file once
it's ready.


"Timothy J Hitchens" <[EMAIL PROTECTED]> wrote in message
005301c27159$483dc170$0500a8c0@BAMBINO">news:005301c27159$483dc170$0500a8c0@BAMBINO...
> Why don't you call your converter then pipe out to a file... the then 
> send headers for that type of file and readfile to the browser..
>
>
> Timothy Hitchens (HITCHO)
> [EMAIL PROTECTED]
>
> HITCHO has Spoken!
>
>
>
>
>
>
> -Original Message-
> From: Thomas Nilsen [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, 12 October 2002 4:22 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Converting audio files and display/play in browser
>
>
> Anyone got any ideas as to how I can solve the following in PHP?
>
> I want to be able to select a file, and convert it from sox format to 
> MP3 or WAV, and then play it in the requestors browser? Can this be 
> achieved in an easy way?
>
> The problem I have is to be able to call  up lame/sox or similar tools

> on the linux web server, and once the newly converted file is 
> available, throw it at the requesting browser as a file download?
>
> Regards, Thomas
>
>
>
> --
> 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] Converting audio files and display/play in browser

2002-10-11 Thread Thomas Nilsen

Excellent! Works like a charm.

Thanks for your speedy help Timothy.

Regards, Thomas


"Timothy J Hitchens" <[EMAIL PROTECTED]> wrote in message
005f01c27162$0804c820$0500a8c0@BAMBINO">news:005f01c27162$0804c820$0500a8c0@BAMBINO...
> Easy...
>
> 
> header('Content-Type: audio/mpeg');
> readfile('xxx.mp3');
>
> ?>
>
>
>



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




[PHP] upgrade problems

2002-10-11 Thread abw

This week we upgraded our solaris 8 server using apache 1.3.27 from php 
4.1.2 to 4.2.3, and it seemed to install fine. The strange thing is that 
most all php web pages appear, but the code does not work. For example, our 
support section heavily uses php, and nothing at all was changed on it, yet 
clicking any link takes you right back to the main page instead of the 
appropriate support page.
Also, a customer that has a php page calling a mysql database suddently quit 
working. These all worked fine before the upgrade, and like I say, none of 
the web pages have been changed at all. 

I didn't find anything in the archives. 

Has anybody else experienced this? I assumed 4.1.2 to 4.2.3 should be a 
seamless upgrade for all web pages, but apparently not. 

I can't find anything helpful in the log files either. 

Suggestions? 

Aaron

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




RE: [PHP] Converting audio files and display/play in browser

2002-10-11 Thread Timothy J Hitchens

You are welcome... anytime..

Also you can add an attachment dispos... if you want and it will get
them to save to disk instead..



Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Thomas Nilsen [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, 12 October 2002 6:31 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Converting audio files and display/play in browser


Excellent! Works like a charm.

Thanks for your speedy help Timothy.

Regards, Thomas


"Timothy J Hitchens" <[EMAIL PROTECTED]> wrote in message
005f01c27162$0804c820$0500a8c0@BAMBINO">news:005f01c27162$0804c820$0500a8c0@BAMBINO...
> Easy...
>
> 
> header('Content-Type: audio/mpeg');
> readfile('xxx.mp3');
>
> ?>
>
>
>



-- 
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] upgrade problems

2002-10-11 Thread Brad Bonkoski

This should be a FAQ!
I would say it would point to register globals being turned off in php.ini for
the newer versions of php.

check this pages for more information:
http://www.php.net/manual/en/security.registerglobals.php
-Brad

abw wrote:

> This week we upgraded our solaris 8 server using apache 1.3.27 from php
> 4.1.2 to 4.2.3, and it seemed to install fine. The strange thing is that
> most all php web pages appear, but the code does not work. For example, our
> support section heavily uses php, and nothing at all was changed on it, yet
> clicking any link takes you right back to the main page instead of the
> appropriate support page.
> Also, a customer that has a php page calling a mysql database suddently quit
> working. These all worked fine before the upgrade, and like I say, none of
> the web pages have been changed at all.
>
> I didn't find anything in the archives.
>
> Has anybody else experienced this? I assumed 4.1.2 to 4.2.3 should be a
> seamless upgrade for all web pages, but apparently not.
>
> I can't find anything helpful in the log files either.
>
> Suggestions?
>
> Aaron
>
> --
> 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