php-general Digest 30 Mar 2001 07:32:53 -0000 Issue 597

Topics (messages 46141 through 46237):

sessions broken when redirected?
        46141 by: elists.elliston.net
        46142 by: Jon Rosenberg
        46144 by: KPortsmout.aol.com
        46235 by: Derek Sivers

Pattern Replacing
        46143 by: Sterling
        46151 by: Sterling
        46152 by: Boget, Chris
        46153 by: Sterling
        46160 by: Philip Olson

version????
        46145 by: Scott Fletcher
        46146 by: Kurth Bemis

php error code.
        46147 by: Scott Fletcher
        46150 by: Johnson, Kirk
        46154 by: KPortsmout.aol.com
        46155 by: Pierre-Yves Lemaire

Re: Comparing Times
        46148 by: John Huggins

NEW JOBS LIST
        46149 by: Michael Kimsal

problem uploading big (50MB) file
        46156 by: Gilles-Eric Descamps
        46158 by: Clayton Dukes
        46159 by: Gilles-Eric Descamps
        46162 by: Brandon Orther

show mysql_query_result with php
        46157 by: Denis Mettler
        46165 by: Tobias Talltorp

Re: Giving my script the power!
        46161 by: Sebastien Roy
        46164 by: Javier Muniz

SHOPPING CART SHIPPING MODULE ...ANYONE???
        46163 by: Craig Cameron

weird isset problem
        46166 by: Matthew Hanna
        46174 by: Johnson, Kirk
        46177 by: Philip Olson

Better way (if...elseif...else)
        46167 by: Ashley M. Kirchner
        46168 by: John Guynn
        46169 by: Jack Dempsey
        46172 by: Jason Lotito
        46176 by: Morgan Curley
        46178 by: Jason Lotito
        46207 by: Stephan Ahonen
        46211 by: Jason Lotito

Re: [ANSWER] problem uploading big (50MB) file
        46170 by: Gilles-Eric Descamps

PHP and .htaccess
        46171 by: Les Neste
        46173 by: Philip Olson
        46204 by: Michael J. Seely

Php sessions and flash
        46175 by: abraxas.zaratustra.ulatina.ac.cr

Help!
        46179 by: Clayton Dukes
        46180 by: Clayton Dukes
        46183 by: Johnson, Kirk
        46188 by: Clayton Dukes
        46192 by: Clayton Dukes
        46199 by: David Robley
        46201 by: Clayton Dukes

javascript to php
        46181 by: cam k
        46182 by: Jack Dempsey

Re: split string value again
        46184 by: Steve Werby

PHP vs Perl
        46185 by: David Hynes
        46189 by: Michael Kimsal
        46190 by: Jack Dempsey

Re: Super User Script?
        46186 by: Nuno Silva

Re:javascript to php
        46187 by: cam k
        46191 by: Jack Dempsey
        46193 by: cam k
        46194 by: Jack Dempsey

Re: This PHP list
        46195 by: Stuart J. Browne
        46215 by: CC Zona
        46218 by: Stuart J. Browne

Re: [PHP-DB] ALTER TABLE - code not working.
        46196 by: David Robley

Image Resizing in PHP
        46197 by: YoBro
        46198 by: Jack Dempsey
        46200 by: Jason Murray
        46202 by: Jack Dempsey
        46203 by: Scott Brown
        46208 by: Pablo

Subsidies, Grants, Loans, Financing
        46205 by: Les Éditions M.G. Publishing

Re: rewrite one line in file
        46206 by: David Robley

Re: How to create user account?
        46209 by: Stuart J. Browne

Maintaining state
        46210 by: David Hynes
        46212 by: Jeff Oien

Re: saving uploaded image as file Vs. directly to database
        46213 by: Stuart J. Browne

Regexp
        46214 by: David Balatero
        46217 by: CC Zona

Re: [PHP-DB] Best way to check if a query succeeded
        46216 by: Stuart J. Browne

MS SQL errors...
        46219 by: Christian Dechery
        46220 by: Jason Lotito

strip_tags()
        46221 by: David Balatero

mod_auth_mysql 2.20 won't compile with newer Apache and alloc.h vs ap_alloc.h
        46222 by: Daevid Vincent

Passing by reference deprecated?
        46223 by: CC Zona

apache_lookup_uri problem
        46224 by: Chris Cochella

regex help...again
        46225 by: David Balatero

Parsing XML CDF format in PHP3 - Stumbling over <?
        46226 by: Mike Gifford
        46227 by: David Robley

TEmp File
        46228 by: Randy Johnson
        46236 by: David Robley

Running a script without flowing
        46229 by: Jonathan Chum

Re: PHP takes over UltraEdit
        46230 by: Sebastian Bergmann

W2000 Domain UserName
        46231 by: Jon

Re: Php extension for Ultradev available now !
        46232 by: Ovidiu EFTIMIE

Disk Quota Through web
        46233 by: pnp

initialize session module
        46234 by: Rol

Compile .php file is possible ?
        46237 by: Marian Vasile

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]


----------------------------------------------------------------------


I've searched the archives and relevant web sites to no avail, so as a 
last resort I'm turning to this knowledgeable group of people.

I'm working to set up a user authentication system using native PHP 4 
sessions on a box running Apache, mod_perl, mod_ssl, PHP (the lastest), 
etc.

PHP was compiled with the following options:

'./configure' '--with-sybase-ct=/usr/local/freetds' 
'--with-config-file-path=/usr/local/lib' '--with-
apache=../apache_1.3.19' '--enable-track-vars' '--enable-memory-
limit=yes'

Here's the problem:
The browser is redirected by Apache (in the current setup, which for 
other reasons won't be changed) from a URL like 
http://somebody.com/foo/bar to a URL like https://somebody.com/bar.

I have had no luck getting sessions, session ids, HTTP_POST_VARS, etc to 
successfully survive the redirect when the user moves between pages in 
the site. (passing variables through the url works, but we need 
something more secure than that).

My feeling is that I'm missing something obvious. Cookies are enabled 
and working. I can start sessions and store variables, but only within 
one page. Once the user goes through a redirect (to the same server), 
everything is lost. It doesn't _seem_ like this should be a limitation 
of PHP, but maybe it is.

Can anyone help clarify this?

Thanks,
Andrew Elliston





I don't know 100& for sure, but I believe since it is going to an https
link, it considers it a new domain(or something) and that's why the sessions
aren't persisting.  The same thing happens if you redirect from say
www.domain.com to www2.domain.com.  I odn't know any way around it, except
encoding, passing in URL and decoding on the other side.

jon


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Php-General@Lists. Php. Net" <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 2:57 PM
Subject: [PHP] sessions broken when redirected?


> I've searched the archives and relevant web sites to no avail, so as a
> last resort I'm turning to this knowledgeable group of people.
>
> I'm working to set up a user authentication system using native PHP 4
> sessions on a box running Apache, mod_perl, mod_ssl, PHP (the lastest),
> etc.
>
> PHP was compiled with the following options:
>
> './configure' '--with-sybase-ct=/usr/local/freetds'
> '--with-config-file-path=/usr/local/lib' '--with-
> apache=../apache_1.3.19' '--enable-track-vars' '--enable-memory-
> limit=yes'
>
> Here's the problem:
> The browser is redirected by Apache (in the current setup, which for
> other reasons won't be changed) from a URL like
> http://somebody.com/foo/bar to a URL like https://somebody.com/bar.
>
> I have had no luck getting sessions, session ids, HTTP_POST_VARS, etc to
> successfully survive the redirect when the user moves between pages in
> the site. (passing variables through the url works, but we need
> something more secure than that).
>
> My feeling is that I'm missing something obvious. Cookies are enabled
> and working. I can start sessions and store variables, but only within
> one page. Once the user goes through a redirect (to the same server),
> everything is lost. It doesn't _seem_ like this should be a limitation
> of PHP, but maybe it is.
>
> Can anyone help clarify this?
>
> Thanks,
> Andrew Elliston
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Hi Andrew,

I`m not sure if switching from http to https will count as a *new* domain, 
but here is a link to some information which may solve your problem. 

http://phpbuilder.com/columns/chriskings20001128.php3

HTH 
Ade




I had this same problem and it constantly broke our whole site.
So I tried a different approach and this has been working great:

Instead of <? header ("Location: sometoherpage.php"); ?>

Consider:  <? include "someotherpage.php"; ?>

It works flawlessly, always, and maintains your session.

Because my site ( a shopping cart/store ) is so dependent on sessions, I 
stopped using redirects and "Location: " functions entirely.

We just use <? include "..." ?> now and all sessions work 
wonderfully.  Even without cookies, etc.







H-

Well here's a pattern replace issue which I've been working on without
success hence the post. 8^) 

I have a variable that has stuff in it (tree, bird, nest, )(yes there is
a trailing space)

What I'd like to do is strip off the last ', ' and replace it with a
single space so that I have 
(tree, bird, nest )

I thought I had it with a simple substr_replace but it only returned my
replace character. 

I thought that ereg_replace would work but got infinitly lost with the
[]\s(.) stuff. 

If I was in perl I'd do something like (s/,.$/ /ig). I think. Never
fully grasped the pattern stuff anyway. 8^/

But anywhoo... if anyone has any ideas send them along. Any help would
be greatly appreciated. 

Thanks. 
-Sterling




H-

Thanks to those that emailed. 

$query = "tree, bird, nest, ";
$new = substr($query,0,2);

Doesn't seem to work. It returns "tr". 

I think maybe I should also mention that to get this variable I have an
array that is placed through a for loop 
// file://loop through array
 for($i = 0;$i <$num;$i++){
   print $fields[$i] . "<br>";
   $query .= "$fields[$i], ";
  }

That's where I get $query from. It's been returned from a multiple
select via a web form. 
I want to format this selected data into a query string so I can plug it
into a SQL statement. 

Thanks for the input and if any one has any thoughts on the subject
appreciate the assistance. 
-Sterling



Sterling wrote:
> 
> H-
> 
> Well here's a pattern replace issue which I've been working on without
> success hence the post. 8^)
> 
> I have a variable that has stuff in it (tree, bird, nest, )(yes there is
> a trailing space)
> 
> What I'd like to do is strip off the last ', ' and replace it with a
> single space so that I have
> (tree, bird, nest )
> 
> I thought I had it with a simple substr_replace but it only returned my
> replace character.
> 
> I thought that ereg_replace would work but got infinitly lost with the
> []\s(.) stuff.
> 
> If I was in perl I'd do something like (s/,.$/ /ig). I think. Never
> fully grasped the pattern stuff anyway. 8^/
> 
> But anywhoo... if anyone has any ideas send them along. Any help would
> be greatly appreciated.
> 
> Thanks.
> -Sterling
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




> That's where I get $query from. It's been returned from a multiple
> select via a web form. I want to format this selected data into a query 
> string so I can plug it into a SQL statement. 
> Thanks for the input and if any one has any thoughts on the subject
> appreciate the assistance. 

If this is the case, then all you need is this:

$query .= implode( ", ", $fields );

This will do exactly what you want...

Chris




H-

Thanks for the emails and reply. 

Someone mentioned substr and after first failing with the attempt I went
to the PHP site and looked it up. 

Here's code that works for what I'm trying to do. 
$test = "tree, bird, nest, ";
$new = substr($test, 0, strlen($test)-2);
$new = "$new ";

Appreciate nudges in the right directions. 
-Sterling




Also consider something like :

<?php
  $var = 'a,b,c,';

  $var[strrpos($var,',')] = ' ';

  print $var;             // 'a,b,c '
?>

The idea behind it is similar to this :

<?php
  $s = 'abcabc';          // define our string

  $s[1] = 'z';            // change second character in $s to 'z'

  print $s;               // azcabc

  $key = strrpos($s,'c'); // 5 (pos of last 'c' in string $s)

  print $s[$key];         // c

  $s[$key] = 'z';         // change sixth character in $s to z

  print $s;               // azcabz
?>

Info to know :

  strrpos()  : Find position of last occurrence of a char in a string 

  strpos()   : Find position of first occurrence of a char in a string 

Looks like you found substr() , it helps out for these sorts of things
too :)  If anyone has more information on this subject, please post.


Regards,

Philip


On Thu, 29 Mar 2001, Sterling wrote:

> H-
> 
> Thanks for the emails and reply. 
> 
> Someone mentioned substr and after first failing with the attempt I went
> to the PHP site and looked it up. 
> 
> Here's code that works for what I'm trying to do. 
> $test = "tree, bird, nest, ";
> $new = substr($test, 0, strlen($test)-2);
> $new = "$new ";
> 
> Appreciate nudges in the right directions. 
> -Sterling
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 






Hi!

    Can anyone tell me what the difference with those PHP version?  I see
the version, "PHP 4.0.4pl1" with a "pl1" and some other version, "PHP 4.0.4"
without a "pl1".  Does either of these version had to do with php.ini file?

Thanks,
 Scott






At 03:03 PM 3/29/2001, Scott Fletcher wrote:

pl refers to patch level.  thus 4.0.4.pl1 is newer and more current then 4.0.4

:-)

~kurth

>Hi!
>
>     Can anyone tell me what the difference with those PHP version?  I see
>the version, "PHP 4.0.4pl1" with a "pl1" and some other version, "PHP 4.0.4"
>without a "pl1".  Does either of these version had to do with php.ini file?
>
>Thanks,
>  Scott
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]





Hi!

  When the website have a script error, it display the error message (sort
of a debugging error).  What I don't like about that error message is that
it display the include_path comments.

Warning: Failed opening '../dp_banner_menu_final1_support.php' for inclusion
(include_path='.:/usr/local/lib/php.ini') in
/home/website/test_knowledge_base/support/tech_support.php on line 10

  The comment with "(include_path='.:/usr/local/lib/php.ini')".  It would
tell people where the the php.ini file is and would encourage somebody to
hack into it.

  What can I do about it?

  Would I be better off with using the PHP x.xx.xx pl1???? instead of PHP
x.xx.xx?

Thanks,
 Scott







If you have permission to modify php.ini, see the setting "display_errors"
and the attached comments. You can tell PHP to write these error messages to
a log file instead of to the browser.

Kirk

> -----Original Message-----
> From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 1:07 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] php error code.
> 
> 
> Hi!
> 
>   When the website have a script error, it display the error 
> message (sort
> of a debugging error).  What I don't like about that error 
> message is that
> it display the include_path comments.
> 
>   What can I do about it?
> 
>   Would I be better off with using the PHP x.xx.xx pl1???? 
> instead of PHP
> x.xx.xx?
> 
> Thanks,
>  Scott




In a message dated 29/03/2001 21:42:57 GMT Daylight Time, 
[EMAIL PROTECTED] writes:

<< If you have permission to modify php.ini, see the setting "display_errors"
 and the attached comments. You can tell PHP to write these error messages to
 a log file instead of to the browser.
 
 Kirk >>


If I make a change to my php.ini file, once I re-upload it do I need to 
restart the server or something as none of my changes are taking place?

Ade




Yes, the php.ini files is read when apache start.
py

At 03:53 PM 3/29/01 -0500, you wrote:
>In a message dated 29/03/2001 21:42:57 GMT Daylight Time,
>[EMAIL PROTECTED] writes:
>
><< If you have permission to modify php.ini, see the setting "display_errors"
>  and the attached comments. You can tell PHP to write these error messages to
>  a log file instead of to the browser.
>
>  Kirk >>
>
>
>If I make a change to my php.ini file, once I re-upload it do I need to
>restart the server or something as none of my changes are taking place?
>
>Ade
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ======================
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ======================





You need to convert all the times you are comparing into a number such as
seconds since the Unix epoch (Jan 1, 1970 I think).  Then you can use the
usual programming syntax to do what you want.

Look here for more ideas:

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

John

> -----Original Message-----
> From: Brian C. Doyle [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 1:57 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Compairing Times
>
>
> Hello All,
>
> how do I compare 2 times.
> What i want to do is
> $time=date("H:i:s",mktime(0,1,03,0,0,0));
> IF ($time > 00:00:35) { echo "Too High"};
>
> when I do this all i ever get is
> Too High no matter what the value of time is
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Hello all.

We've set up a moderated email group at Yahoo! to be a PHP jobs
resource.
This list is primarily intended to be a place for employers or people
with PHP projects
to post their requirements with contact info.  It will be moderated to
prevent
spam and other extraneous emails and keep the focus of the group on PHP
jobs.

I invite you all to join up at

http://groups.yahoo.com/group/phpjobs/

Thanks!

Michael Kimsal
http://www.tapinternet.com/
734-480-9961






Hi,
 
I'm using IE 5.01 to upload a big (~50MB) file to a form.
 
The form works well for small files.
If I try a big file, IE timeout after 30 seconds
saying "cannot find server or DNS error"
This same exact php code works for small files...
 
I've modified php.ini to
max_execution_time = 120
memory_limit = 104857600                ; Maximum amount of memory a script
may consume (100MB)
post_max_size = 100M
upload_tmp_dir  =        /tmp               ; temporary directory for HTTP
uploaded files (will use system default if not specified)
/tmp has 1GB free
upload_max_filesize = 104857600       ; 100 Meg default limit on file
uploads

I've verified this through the php info function.
 
I'm running Apache/1.3.9 (Unix) PHP/4.0.3pl1 on a Solaris 2.6 sparc server.
 
MS Internet Explorer 5.01 keeps timing out after 30 seconds...
 
Any ideas ?

--
Gilles-Eric DESCAMPS,   Voice: (408) 545-1130
SILICON ACCESS NETWORKS   Fax: (419) 844-7467
<        Enabling the Future Internet       >
211 River Oaks Parkway  - San Jose, CA, 95134
mailto:[EMAIL PROTECTED]
"Sed quis custodiet ipsos custodes ?"

 




This is set by max_execution_time, did you restart apache to re-read your
php.ini file?



Clayton Dukes
---------------------------------------------------------------------
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net







----- Original Message -----
From: "Gilles-Eric Descamps" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 4:06 PM
Subject: [PHP] problem uploading big (50MB) file


> Hi,
>
> I'm using IE 5.01 to upload a big (~50MB) file to a form.
>
> The form works well for small files.
> If I try a big file, IE timeout after 30 seconds
> saying "cannot find server or DNS error"
> This same exact php code works for small files...
>
> I've modified php.ini to
> max_execution_time = 120
> memory_limit = 104857600                ; Maximum amount of memory a
script
> may consume (100MB)
> post_max_size = 100M
> upload_tmp_dir  =        /tmp               ; temporary directory for HTTP
> uploaded files (will use system default if not specified)
> /tmp has 1GB free
> upload_max_filesize = 104857600       ; 100 Meg default limit on file
> uploads
>
> I've verified this through the php info function.
>
> I'm running Apache/1.3.9 (Unix) PHP/4.0.3pl1 on a Solaris 2.6 sparc
server.
>
> MS Internet Explorer 5.01 keeps timing out after 30 seconds...
>
> Any ideas ?
>
> --
> Gilles-Eric DESCAMPS,   Voice: (408) 545-1130
> SILICON ACCESS NETWORKS   Fax: (419) 844-7467
> <        Enabling the Future Internet       >
> 211 River Oaks Parkway  - San Jose, CA, 95134
> mailto:[EMAIL PROTECTED]
> "Sed quis custodiet ipsos custodes ?"
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]






  Hi Clayton,

  As I was writing, I confirmed every variable change
by a phpinfo() page.

  Yes, to enforce changes in the php.ini file,
I stop and start the whole apache...


> -----Original Message-----
> From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 1:18 PM
> To: Gilles-Eric Descamps; [EMAIL PROTECTED]
> Subject: Re: [PHP] problem uploading big (50MB) file
> 
> 
> This is set by max_execution_time, did you restart apache to 
> re-read your
> php.ini file?




Hello,

You can use set_time_limit(); at the top of your script to set the max time
limit.  set_time_limit(0); will let it go forever, as I do not recommend
this until you test the script and know the it doesn't have an endless loop
or what not.

example:
<?

set_time_limit(0);
echo "test";

?>

-----Original Message-----
From: Gilles-Eric Descamps
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 1:18 PM
To: [EMAIL PROTECTED]
Cc: 'Clayton Dukes'
Subject: RE: [PHP] problem uploading big (50MB) file



  Hi Clayton,

  As I was writing, I confirmed every variable change
by a phpinfo() page.

  Yes, to enforce changes in the php.ini file,
I stop and start the whole apache...


> -----Original Message-----
> From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 1:18 PM
> To: Gilles-Eric Descamps; [EMAIL PROTECTED]
> Subject: Re: [PHP] problem uploading big (50MB) file
>
>
> This is set by max_execution_time, did you restart apache to
> re-read your
> php.ini file?

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





Hi,

i have a mysql table with the fields name and categorie.
on my page search.php is a search mask where the visitor
can insert a miscellaneous keyword.

this keyword should be the categorie.

basicly, how can i handle the problem,
that the visitors keyword shows an output with all
the entrys in the database where the keyword=categorie or
how can i make links to defined categories?

i know how i can make simple queries in php but i couldn't find anything in
the web
for making this.

thanks in advance.
denis





What is the layout of your table, the names of fields etc.

By the way, is it just one table?

If you provide me with this information, I think I will be able to solve
your problem...

// Tobias

""Denis Mettler"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> i have a mysql table with the fields name and categorie.
> on my page search.php is a search mask where the visitor
> can insert a miscellaneous keyword.
>
> this keyword should be the categorie.
>
> basicly, how can i handle the problem,
> that the visitors keyword shows an output with all
> the entrys in the database where the keyword=categorie or
> how can i make links to defined categories?
>
> i know how i can make simple queries in php but i couldn't find anything
in
> the web
> for making this.
>
> thanks in advance.
> denis
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hi,

I'm doing the exact same thing as you and I got the exact same problem. After
getting almost crazy with trying everything possible to run a script as root,
someone told me that I'm limited to the server permission. So I decided to
simply create a java deamon wich run as root. This deamon wait on a port for
commands (encrypted) to be executed.via fsockopen(...).  Surprisly, it was
easy and it work prety well...

Hope it helps

Sebastien Roy
[EMAIL PROTECTED]


Brandon Orther wrote:

> Hello,
>
> I am trying to make a script that can add users and multiple things to a
> linux box.  I have all teh programming issues solved except I need to make
> this script root, or make it able to run anyhting it want to.  Is there a
> way to make my php script liek a super user?
>
> INFO: Redhat 7 Apache1.?
>
> Thanks
> Brandon Orther
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





I do a similar thing on my machines, only instead of having a java daemon
that runs as root I chose to create a database that the php script can
insert user and other information into, then a perl script that is called
from cron that fetches from the database and does the necessary user adds.

This is a nice system for adding users to many systems at once for a network
that is not running NIS, as all of the linux machines on my network can
fetch data from the database and add the users as necessary.

I don't, however, trust the security of this implementation, and only use it
on our internal network that sits behind a firewall.   I'd recommend that
you take the same precaution.

-jm

-----Original Message-----
From: Sebastien Roy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 1:28 PM
To: Brandon Orther
Cc: PHP User Group
Subject: Re: [PHP] Giving my script the power!


Hi,

I'm doing the exact same thing as you and I got the exact same problem.
After
getting almost crazy with trying everything possible to run a script as
root,
someone told me that I'm limited to the server permission. So I decided to
simply create a java deamon wich run as root. This deamon wait on a port for
commands (encrypted) to be executed.via fsockopen(...).  Surprisly, it was
easy and it work prety well...

Hope it helps

Sebastien Roy
[EMAIL PROTECTED]


Brandon Orther wrote:

> Hello,
>
> I am trying to make a script that can add users and multiple things to a
> linux box.  I have all teh programming issues solved except I need to make
> this script root, or make it able to run anyhting it want to.  Is there a
> way to make my php script liek a super user?
>
> INFO: Redhat 7 Apache1.?
>
> Thanks
> Brandon Orther
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




 

 


555 W. University Suite 2, Mesa, Arizona 85205

 

 

 

Hi,

 

I’m looking for a shipping model that we can use to integrate into our shopping cart. Does anyone know of any?

 

Thanks

 

 

 

 

Craig Cameron

-----------------------------------------

Apex Digital

Phone: (480) 219-1728

Email: [EMAIL PROTECTED]

Web: apexdigital.net

------------------------------------------

 





Hi!  I have this weird thing happening here and I just can't see the problem.
Can someone look at this and tell me if you see what is wrong?
Below is a code snippet I am using and the output from the code.  As can
be seen in the output all the $config[*] stuff are set.  The if statement still
gets executed though as if one or more $config[*] isn't set.  Inside of the
if statement I checked again and sure enough, they are still set even though
the program makes it into the if statement.
I am so confused.

Thanks in advance!
Matthew Hanna
[EMAIL PROTECTED]

----  Code ----
     print isset($config["harvester_list"]) ."\n1\n";
    print isset($config["download_list"]) . "\n2\n";
    print isset($config["linkchecker_list"]) . "\n3\n";
    print isset($config["offline_list"]) . "\n4\n";
    print isset($config["spider_list"]) . "\n5\n";
    if (!isset($config["havester_list"]) || !isset($config["download_list"]) ||
        !isset($config["linkchecker_list"]) || !isset($config["offline_list"]) ||
        !isset($config["spider_list"])) {
       print "-----------------------------\n";
     print isset($config["harvester_list"]) ."\n1\n";
    print isset($config["download_list"]) . "\n2\n";
    print isset($config["linkchecker_list"]) . "\n3\n";
    print isset($config["offline_list"]) . "\n4\n";
    print isset($config["spider_list"]) . "\n5\n";
       
      die("Agent Automated System Lists Not Found!\n");
}

---- Output -----
1
1
1
2
1
3
1
4
1
5
-----------------------------
1
1
1
2
1
3
1
4
1
5
Agent Automated System Lists Not Found!




I see one typo, is that the problem?

Kirk


> Hi!  I have this weird thing happening here and I just can't 
> see the problem.
> Can someone look at this and tell me if you see what is wrong?

> ----  Code ----
>      print isset($config["harvester_list"]) ."\n1\n";
>     print isset($config["download_list"]) . "\n2\n";
>     print isset($config["linkchecker_list"]) . "\n3\n";
>     print isset($config["offline_list"]) . "\n4\n";
>     print isset($config["spider_list"]) . "\n5\n";


##### harvester is misspelled in the next line ########

>     if (!isset($config["havester_list"]) || 


> !isset($config["download_list"]) ||
>         !isset($config["linkchecker_list"]) || 
> !isset($config["offline_list"]) ||
>         !isset($config["spider_list"])) {
>        print "-----------------------------\n";
>      print isset($config["harvester_list"]) ."\n1\n";
>     print isset($config["download_list"]) . "\n2\n";
>     print isset($config["linkchecker_list"]) . "\n3\n";
>     print isset($config["offline_list"]) . "\n4\n";
>     print isset($config["spider_list"]) . "\n5\n";
>        
>       die("Agent Automated System Lists Not Found!\n");
> }
> 





What are you wanting to print?  Here's a set of examples that may help
understand what's happening with your code.  In short, isset() is not
being used properly.

// if $var is set, this will return 1. if not set then it will return 0.
// essentially, you don't want to print this directly as you've seen, it
// gives us 1 or 0.
isset($var)

// these checks check for true.
  if ( isset($var) == true ) {
      print 'this is set';
  }

  if ( isset($var) == 1 ) {
      print 'this is set';
  }

  if ( isset($var) ) {
      print 'this is set';
  }

// these checks check for false.
  if ( isset($var) == false ) {
      print 'this is not set';
  }

  if ( isset($var) == 0 ) {
      print 'this is not set';
  }

  if ( !isset($var) ) {
      print 'this is not set';  
  }

// This will check whether $var is empty but this way causes error if
// error_reporting setting E_NOTICE is on (undefined variable)
  if ($var) {
      print 'this is set';
  }

Which brings us to empty(), empty is similar to isset, here's an example
of difference :

  $var = 0;

  if ( empty($var) ) {
      print 'this will print if $var is not set,0, or empty "" ';
  }

  if ( isset($var) ) {
      print 'this is set, could be set to anything, including 0 or "" ';
  }

Wow this got long, hopefully it makes sense :)

regards,
philip


On Thu, 29 Mar 2001, Matthew Hanna wrote:

> Hi!  I have this weird thing happening here and I just can't see the problem.
> Can someone look at this and tell me if you see what is wrong?
> Below is a code snippet I am using and the output from the code.  As can
> be seen in the output all the $config[*] stuff are set.  The if statement still
> gets executed though as if one or more $config[*] isn't set.  Inside of the
> if statement I checked again and sure enough, they are still set even though
> the program makes it into the if statement.
> I am so confused.
> 
> Thanks in advance!
> Matthew Hanna
> [EMAIL PROTECTED]
> 
> ----  Code ----
>      print isset($config["harvester_list"]) ."\n1\n";
>     print isset($config["download_list"]) . "\n2\n";
>     print isset($config["linkchecker_list"]) . "\n3\n";
>     print isset($config["offline_list"]) . "\n4\n";
>     print isset($config["spider_list"]) . "\n5\n";
>     if (!isset($config["havester_list"]) || !isset($config["download_list"]) ||
>         !isset($config["linkchecker_list"]) || !isset($config["offline_list"]) ||
>         !isset($config["spider_list"])) {
>        print "-----------------------------\n";
>      print isset($config["harvester_list"]) ."\n1\n";
>     print isset($config["download_list"]) . "\n2\n";
>     print isset($config["linkchecker_list"]) . "\n3\n";
>     print isset($config["offline_list"]) . "\n4\n";
>     print isset($config["spider_list"]) . "\n5\n";
>        
>       die("Agent Automated System Lists Not Found!\n");
> }
> 
> ---- Output -----
> 1
> 1
> 1
> 2
> 1
> 3
> 1
> 4
> 1
> 5
> -----------------------------
> 1
> 1
> 1
> 2
> 1
> 3
> 1
> 4
> 1
> 5
> Agent Automated System Lists Not Found!
> 







    Is there a better way to write the following snippet:

    if ($priority == "000") {
      $fcol="high";
      $pstr .= "<option value=\"000\" selected>High\n";
      $pstr .= "<option value=\"050\">Medium\n";
      $pstr .= "<option value=\"100\">Low\n";
    } elseif ($priority == "050") {
      $fcol="med";
      $pstr .= "<option value=\"000\">High\n";
      $pstr .= "<option value=\"050\" selected>Medium\n";
      $pstr .= "<option value=\"100\">Low\n";
    } else {
      $fcol="low";
      $pstr .= "<option value=\"000\">High\n";
      $pstr .= "<option value=\"050\">Medium\n";
      $pstr .= "<option value=\"100\" selected>Low\n";
    }

    I just hate having to repeat pieces of code.  This piece here just
generates a drop down list of items, with the current one being the
selected one.

    AMK4

--
W |
  |  I haven't lost my mind; it's backed up on tape somewhere.
  |____________________________________________________________________
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Ashley M. Kirchner <mailto:[EMAIL PROTECTED]>   .   303.442.6410 x130
  SysAdmin / Websmith                           .     800.441.3873 x130
  Photo Craft Laboratories, Inc.             .        eFax 248.671.0909
  http://www.pcraft.com                  .         3550 Arapahoe Ave #6
  .................. .  .  .     .               Boulder, CO 80303, USA






One thing I would do different is:

switch ($fcol){

case 000:

break;

case 050:

break;

default:

break;
}

To me the switch/case code is easier to read/maintain.

I know that doesn't actually solve your repetition problem but it will make
it a little easier to look at.

John Guynn

This email brought to you by RFCs 821 and 1225.


-----Original Message-----
From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]]


    Is there a better way to write the following snippet:

    if ($priority == "000") {
      $fcol="high";
      $pstr .= "<option value=\"000\" selected>High\n";
      $pstr .= "<option value=\"050\">Medium\n";
      $pstr .= "<option value=\"100\">Low\n";
    } elseif ($priority == "050") {
      $fcol="med";
      $pstr .= "<option value=\"000\">High\n";
      $pstr .= "<option value=\"050\" selected>Medium\n";
      $pstr .= "<option value=\"100\">Low\n";
    } else {
      $fcol="low";
      $pstr .= "<option value=\"000\">High\n";
      $pstr .= "<option value=\"050\">Medium\n";
      $pstr .= "<option value=\"100\" selected>Low\n";
    }

    I just hate having to repeat pieces of code.  This piece here just
generates a drop down list of items, with the current one being the
selected one.




you can use switch statements:

switch($priority){
        case 000:
                code here
                break;
        case med:
                more code
                break;
        default:
                in case none match use default

}

-jack

"Ashley M. Kirchner" wrote:
> 
>     Is there a better way to write the following snippet:
> 
>     if ($priority == "000") {
>       $fcol="high";
>       $pstr .= "<option value=\"000\" selected>High\n";
>       $pstr .= "<option value=\"050\">Medium\n";
>       $pstr .= "<option value=\"100\">Low\n";
>     } elseif ($priority == "050") {
>       $fcol="med";
>       $pstr .= "<option value=\"000\">High\n";
>       $pstr .= "<option value=\"050\" selected>Medium\n";
>       $pstr .= "<option value=\"100\">Low\n";
>     } else {
>       $fcol="low";
>       $pstr .= "<option value=\"000\">High\n";
>       $pstr .= "<option value=\"050\">Medium\n";
>       $pstr .= "<option value=\"100\" selected>Low\n";
>     }
> 
>     I just hate having to repeat pieces of code.  This piece here just
> generates a drop down list of items, with the current one being the
> selected one.
> 
>     AMK4
> 
> --
> W |
>   |  I haven't lost my mind; it's backed up on tape somewhere.
>   |____________________________________________________________________
>   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   Ashley M. Kirchner <mailto:[EMAIL PROTECTED]>   .   303.442.6410 x130
>   SysAdmin / Websmith                           .     800.441.3873 x130
>   Photo Craft Laboratories, Inc.             .        eFax 248.671.0909
>   http://www.pcraft.com                  .         3550 Arapahoe Ave #6
>   .................. .  .  .     .               Boulder, CO 80303, USA
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]







> -----Original Message-----
> From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 1:56 PM
> To: PHP-General List
> Subject: [PHP] Better way (if...elseif...else)
>
>
>
>     Is there a better way to write the following snippet:
>
>     if ($priority == "000") {
>       $fcol="high";
>       $pstr .= "<option value=\"000\" selected>High\n";
>       $pstr .= "<option value=\"050\">Medium\n";
>       $pstr .= "<option value=\"100\">Low\n";
>     } elseif ($priority == "050") {
>       $fcol="med";
>       $pstr .= "<option value=\"000\">High\n";
>       $pstr .= "<option value=\"050\" selected>Medium\n";
>       $pstr .= "<option value=\"100\">Low\n";
>     } else {
>       $fcol="low";
>       $pstr .= "<option value=\"000\">High\n";
>       $pstr .= "<option value=\"050\">Medium\n";
>       $pstr .= "<option value=\"100\" selected>Low\n";
>     }
>
>     I just hate having to repeat pieces of code.  This piece here just
> generates a drop down list of items, with the current one being the
> selected one.


$val = array("000","050","100");
$val_name = array("Low","Medium","High");
$count = count($val);
$counter = 0;
while ($counter < $count)
{
        if ($val[$counter] == $priority)
        {
                $selected = " selected";
        }
        echo "<option
value=\"$val[$counter]\"$selected>$val_name[$counter]</option>";
        $counter++;
}





Make sure you reset $selected at the end of the while loop.

if HTML readability is a concern you can also do something like the 
following( for static lists I find it easier this way ):

<?php $priority_selected[$priority] = 'SELECTED'; ?>
<SELECT NAME="priority">
         <OPTION VALUE="000" <?php echo($priority_selected['000'])?>>Low
         <OPTION VALUE="050" <?php echo($priority_selected['050'])?>>Medium
         <OPTION VALUE="100" <?php echo($priority_selected['100'])?>>High
</SELECT>

morgan

At 05:30 PM 3/29/2001 -0800, Jason Lotito wrote:



> > -----Original Message-----
> > From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, March 29, 2001 1:56 PM
> > To: PHP-General List
> > Subject: [PHP] Better way (if...elseif...else)
> >
> >
> >
> >     Is there a better way to write the following snippet:
> >
> >     if ($priority == "000") {
> >       $fcol="high";
> >       $pstr .= "<option value=\"000\" selected>High\n";
> >       $pstr .= "<option value=\"050\">Medium\n";
> >       $pstr .= "<option value=\"100\">Low\n";
> >     } elseif ($priority == "050") {
> >       $fcol="med";
> >       $pstr .= "<option value=\"000\">High\n";
> >       $pstr .= "<option value=\"050\" selected>Medium\n";
> >       $pstr .= "<option value=\"100\">Low\n";
> >     } else {
> >       $fcol="low";
> >       $pstr .= "<option value=\"000\">High\n";
> >       $pstr .= "<option value=\"050\">Medium\n";
> >       $pstr .= "<option value=\"100\" selected>Low\n";
> >     }
> >
> >     I just hate having to repeat pieces of code.  This piece here just
> > generates a drop down list of items, with the current one being the
> > selected one.
>
>
>$val = array("000","050","100");
>$val_name = array("Low","Medium","High");
>$count = count($val);
>$counter = 0;
>while ($counter < $count)
>{
>         if ($val[$counter] == $priority)
>         {
>                 $selected = " selected";
>         }
>         echo "<option
>value=\"$val[$counter]\"$selected>$val_name[$counter]</option>";
>         $counter++;
>}
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]






> -----Original Message-----
> From: Morgan Curley [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 2:52 PM
> To: PHP-General List
> Subject: RE: [PHP] Better way (if...elseif...else)
>
>
> Make sure you reset $selected at the end of the while loop.
>

OoPs!  Yes, reset $selected, haha.

> if HTML readability is a concern you can also do something like the
> following( for static lists I find it easier this way ):
>
> <?php $priority_selected[$priority] = 'SELECTED'; ?>
> <SELECT NAME="priority">
>          <OPTION VALUE="000" <?php echo($priority_selected['000'])?>>Low
>          <OPTION VALUE="050" <?php
> echo($priority_selected['050'])?>>Medium
>          <OPTION VALUE="100" <?php echo($priority_selected['100'])?>>High
> </SELECT>
>
> morgan
>
> At 05:30 PM 3/29/2001 -0800, Jason Lotito wrote:
>
>
>
> > > -----Original Message-----
> > > From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, March 29, 2001 1:56 PM
> > > To: PHP-General List
> > > Subject: [PHP] Better way (if...elseif...else)
> > >
> > >
> > >
> > >     Is there a better way to write the following snippet:
> > >
> > >     if ($priority == "000") {
> > >       $fcol="high";
> > >       $pstr .= "<option value=\"000\" selected>High\n";
> > >       $pstr .= "<option value=\"050\">Medium\n";
> > >       $pstr .= "<option value=\"100\">Low\n";
> > >     } elseif ($priority == "050") {
> > >       $fcol="med";
> > >       $pstr .= "<option value=\"000\">High\n";
> > >       $pstr .= "<option value=\"050\" selected>Medium\n";
> > >       $pstr .= "<option value=\"100\">Low\n";
> > >     } else {
> > >       $fcol="low";
> > >       $pstr .= "<option value=\"000\">High\n";
> > >       $pstr .= "<option value=\"050\">Medium\n";
> > >       $pstr .= "<option value=\"100\" selected>Low\n";
> > >     }
> > >
> > >     I just hate having to repeat pieces of code.  This piece here just
> > > generates a drop down list of items, with the current one being the
> > > selected one.
> >
> >
> >$val = array("000","050","100");
> >$val_name = array("Low","Medium","High");
> >$count = count($val);
> >$counter = 0;
> >while ($counter < $count)
> >{
> >         if ($val[$counter] == $priority)
> >         {
> >                 $selected = " selected";
> >         }
> >         echo "<option
> >value=\"$val[$counter]\"$selected>$val_name[$counter]</option>";
> >         $counter++;
> >}
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





> $val = array("000","050","100");
> $val_name = array("Low","Medium","High");
> $count = count($val);
> $counter = 0;
> while ($counter < $count)
> {
> if ($val[$counter] == $priority)
> {
> $selected = " selected";
> }
> echo "<option
> value=\"$val[$counter]\"$selected>$val_name[$counter]</option>";
> $counter++;
> }

Not quite... You need to reset $selected so that you don't end up with them
all being selected when $priority="000". It's a pretty clever idea, though.

I've rearranged stuff a bit to make it look prettier, and to match the
original functionality closer. Nothing personal, but I can't stand it when
people use while for stuff that looks prettier as a for. =)

$val = array("000","050","100");
$val_name = array("High","Medium","Low");
$fcol_name = array("high","med","low");
$count = count($val);
for ($counter = 0; $counter < $count; $counter++) {
 $selected = "";
 if ($val[$counter] == $priority) {
  $selected = " selected";
  $fcol = fcol_name[$counter];
 } //if
 $pstr .= "<option
value=\"$val[$counter]\"$selected>$val_name[$counter]</option>\r\n";
} //while

Sig for a Day
Stephan Ahonen, ICQ 491101
"That's very funny Scotty, now beam down my clothes!"
Come back tomorrow for a different sig!
Backspace a single "s" to reply by email





> -----Original Message-----
> From: Stephan Ahonen [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 5:20 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Better way (if...elseif...else)
>
>
> > $val = array("000","050","100");
> > $val_name = array("Low","Medium","High");
> > $count = count($val);
> > $counter = 0;
> > while ($counter < $count)
> > {
> > if ($val[$counter] == $priority)
> > {
> > $selected = " selected";
> > }
> > echo "<option
> > value=\"$val[$counter]\"$selected>$val_name[$counter]</option>";
> > $counter++;
> > }
>
> Not quite... You need to reset $selected so that you don't end up
> with them
> all being selected when $priority="000". It's a pretty clever
> idea, though.
>

Yeah, someone mentioned that after I posted it, then I took a shotgun to my
foot..haha.  Yeah, well, hey, I release that code as a Beta Version anyways!
=)

Yes, good ole' for, though I have been so inundated with while() that it
just comes naturally.  Hey, at least I don't printf() people to death!

=)

> I've rearranged stuff a bit to make it look prettier, and to match the
> original functionality closer. Nothing personal, but I can't stand it when
> people use while for stuff that looks prettier as a for. =)
>
> $val = array("000","050","100");
> $val_name = array("High","Medium","Low");
> $fcol_name = array("high","med","low");
> $count = count($val);
> for ($counter = 0; $counter < $count; $counter++) {
>  $selected = "";
>  if ($val[$counter] == $priority) {
>   $selected = " selected";
>   $fcol = fcol_name[$counter];
>  } //if
>  $pstr .= "<option
> value=\"$val[$counter]\"$selected>$val_name[$counter]</option>\r\n";
> } //while
>
> Sig for a Day
> Stephan Ahonen, ICQ 491101





> -----Original Message-----
> From: Philip Hallstrom [mailto:[EMAIL PROTECTED]] 
> Subject: Re: [PHP] problem uploading big (50MB) file

> Try replacing "100M" with it's byte equivalent.  Or maybe it's
> kilobytes.  One on of my systems they had "2M" and it wouldn't upload
> anything cause it didn't parse it right. 
> In other words, set that value to what you had with say php4.0.1
> good luck!

  replaced 100M by 104857600,
  and it WORKED !

  two days I was stuck on this 

  Thanks,



--
Gilles-Eric DESCAMPS,   Voice: (408) 545-1130
SILICON ACCESS NETWORKS   Fax: (419) 844-7467
<        Enabling the Future Internet       >
211 River Oaks Parkway  - San Jose, CA, 95134
mailto:[EMAIL PROTECTED]
"Sed quis custodiet ipsos custodes ?"



> -----Original Message-----
> From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 1:18 PM
> To: Gilles-Eric Descamps; [EMAIL PROTECTED]
> Subject: Re: [PHP] problem uploading big (50MB) file
> 
> 
> This is set by max_execution_time, did you restart apache to 
> re-read your
> php.ini file?
> 
> 
> 
> Clayton Dukes
> ---------------------------------------------------------------------
> Download Free Essays, Term Papers and Cisco Training from 
> http://www.gdd.net
> 
> 
> 
> 
> 
> 
> 
> ----- Original Message -----
> From: "Gilles-Eric Descamps" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, March 29, 2001 4:06 PM
> Subject: [PHP] problem uploading big (50MB) file
> 
> 
> > Hi,
> >
> > I'm using IE 5.01 to upload a big (~50MB) file to a form.
> >
> > The form works well for small files.
> > If I try a big file, IE timeout after 30 seconds
> > saying "cannot find server or DNS error"
> > This same exact php code works for small files...
> >
> > I've modified php.ini to
> > max_execution_time = 120
> > memory_limit = 104857600                ; Maximum amount of memory a
> script
> > may consume (100MB)
> > post_max_size = 100M
> > upload_tmp_dir  =        /tmp               ; temporary 
> directory for HTTP
> > uploaded files (will use system default if not specified)
> > /tmp has 1GB free
> > upload_max_filesize = 104857600       ; 100 Meg default 
> limit on file
> > uploads
> >
> > I've verified this through the php info function.
> >
> > I'm running Apache/1.3.9 (Unix) PHP/4.0.3pl1 on a Solaris 2.6 sparc
> server.
> >
> > MS Internet Explorer 5.01 keeps timing out after 30 seconds...
> >
> > Any ideas ?
> >
> > --
> > Gilles-Eric DESCAMPS,   Voice: (408) 545-1130
> > SILICON ACCESS NETWORKS   Fax: (419) 844-7467
> > <        Enabling the Future Internet       >
> > 211 River Oaks Parkway  - San Jose, CA, 95134
> > mailto:[EMAIL PROTECTED]
> > "Sed quis custodiet ipsos custodes ?"
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 




Hi all,

We're all familiar with the skanky little box the web browser pops up to
get your username/password in response to a 401 from the web server.  What
I want is the same functionality, except through a login web page instead.

I know how cookie-based or session-based logging in works with PHP, but I
would actually prefer (since it's more general) an HTML-only solution if
there is one.  Or maybe there's something I can do to configure the server
(Apache) to redirect to a login page if a 401 is generated.  

Anyt thoughts?  Help would be much appreciated.



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




this tutorial may help :

  http://zend.com/zend/tut/authentication.php

regards,
philip

On Thu, 29 Mar 2001, Les Neste wrote:

> Hi all,
> 
> We're all familiar with the skanky little box the web browser pops up to
> get your username/password in response to a 401 from the web server.  What
> I want is the same functionality, except through a login web page instead.
> 
> I know how cookie-based or session-based logging in works with PHP, but I
> would actually prefer (since it's more general) an HTML-only solution if
> there is one.  Or maybe there's something I can do to configure the server
> (Apache) to redirect to a login page if a 401 is generated.  
> 
> Anyt thoughts?  Help would be much appreciated.
> 
> 
> 
> ............................................................................
> Les Neste  678-778-0382  http://www.lesneste.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 





HI
    I have a directory that works like this.
The owner of each listing in the directory clicks on a little box 
that appears before their name and info in the directory.
An Enter User Name and Password page is shown ( a simple form, can 
look as you like)
    The imbedded listing number is used to find their data record. The 
input user name and password is compared to the saved versions - if 
they match, an edit form is opened. If not, "Try again".
It works well. No magic.
    p.s. the test looks for a match of a 'master' user name and 
password first. If this is used, the refresh shows the related 
specific user name and password in the input boxes. This provide an 
easy look-up function.


>Hi all,
>
>We're all familiar with the skanky little box the web browser pops up to
>get your username/password in response to a 401 from the web server.  What
>I want is the same functionality, except through a login web page instead.
>
>I know how cookie-based or session-based logging in works with PHP, but I
>would actually prefer (since it's more general) an HTML-only solution if
>there is one.  Or maybe there's something I can do to configure the server
>(Apache) to redirect to a login page if a 401 is generated. 
>
>Anyt thoughts?  Help would be much appreciated.
>
>
>
>............................................................................
>Les Neste  678-778-0382  http://www.lesneste.com
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>
Michael Seely        [EMAIL PROTECTED]        408-777-9949






I'm having a problem with using cookies and flash.

When I pointed that the problem was _with_ cookie and flash, is when I
resolv the same program using a pure HTML interface.

The exact problem, is that the session number, keep on changing when
working with the flash interfase. This flash interfase, is not realising
that it already has a session, a cookie, and a couple of varibles; and
keep on creating again them every time it returns to the php code.

Using a short example, lets say that I have a Flash that calls a php that
executes a "print $session" when the user clicks on a flash button. Every
time that the user clicks on the flash, the session variable keeps on
changing.

What I would like to know, if is some has had a similar problem, or point
me in some direction where I can get some more information about working
with cookie & flash.

--
Rodrigo Castro
Universidad Latina de CR








Arrrgh,
 
Something went haywire with my site a little while ago, can somebody tell me why I'm getting:
 
Warning: Failed opening 'themes/JET/theme.php' for inclusion (include_path='.:/etc/httpd/conf/php:/home/www/web:/home/www/websites/acxiom/phonebook/phplib/php:/home/www/web/plug-ins/phpweather') in /home/www/web/header.php on line 46
 
I don't know why it doesn't see the file, it's there.
I tried putting it in the include path even, no such luck.
 
I'm dying here, please help asap :-)
 
 
Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Internetwork Solutions Engineer
Internetwork Management Engineer
Thrupoint, Inc.
Tampa, FL
(c) 904.477.7825
(h) 904.292.1881




Heh,
Thanks.

Btw, the web site I'm trying so frantically to fix has all the study materials for the 
Cisco Certs, free of course :-)

http://www.gdd.net


Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Internetwork Solutions Engineer
Internetwork Management Engineer
Thrupoint, Inc.
Tampa, FL
(c) 904.477.7825
(h) 904.292.1881

  ----- Original Message ----- 
  From: Kath 
  To: Clayton Dukes 
  Sent: Thursday, March 29, 2001 6:13 PM
  Subject: Re: [PHP] Help!


  > CCNA, CCDA, CCDP, CCNP

  Wow, those are some credentials!  

  I'm taking CCNA semester 2 right now...

  (Sorry I couldn't be of help, just wanted to tell you how 
  impressed I was)

  - Kath
    ----- Original Message ----- 
    From: Clayton Dukes 
    To: [EMAIL PROTECTED] 
    Cc: [EMAIL PROTECTED] 
    Sent: Thursday, March 29, 2001 6:06 PM
    Subject: [PHP] Help!


    Arrrgh,

    Something went haywire with my site a little while ago, can somebody tell me why 
I'm getting:

    Warning: Failed opening 'themes/JET/theme.php' for inclusion 
(include_path='.:/etc/httpd/conf/php:/home/www/web:/home/www/websites/acxiom/phonebook/phplib/php:/home/www/web/plug-ins/phpweather')
 in /home/www/web/header.php on line 46


    I don't know why it doesn't see the file, it's there.
    I tried putting it in the include path even, no such luck.

    I'm dying here, please help asap :-)


    Clayton Dukes
    CCNA, CCDA, CCDP, CCNP
    Internetwork Solutions Engineer
    Internetwork Management Engineer
    Thrupoint, Inc.
    Tampa, FL
    (c) 904.477.7825
    (h) 904.292.1881



----------------------------------------------------------------------------


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




Did the permissions get changed to something that nobody can no longer read?

Kirk

>     ----- Original Message ----- 
>     From: Clayton Dukes 
>     To: [EMAIL PROTECTED] 
>     Cc: [EMAIL PROTECTED] 
>     Sent: Thursday, March 29, 2001 6:06 PM
>     Subject: [PHP] Help!
> 
> 
>     Arrrgh,
> 
>     Something went haywire with my site a little while ago, 
> can somebody tell me why I'm getting:
> 
>     Warning: Failed opening 'themes/JET/theme.php' for 
> inclusion 
> (include_path='.:/etc/httpd/conf/php:/home/www/web:/home/www/w
> ebsites/acxiom/phonebook/phplib/php:/home/www/web/plug-ins/php
> weather') in /home/www/web/header.php on line 46
> 
> 
>     I don't know why it doesn't see the file, it's there.
>     I tried putting it in the include path even, no such luck.
> 
>     I'm dying here, please help asap :-)> 




Yes,
I've got it now.

Scared the crap out of me....
I must have typo'd on a perm change, man that'll ruin your friggin day!


Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Internetwork Solutions Engineer
Internetwork Management Engineer
Thrupoint, Inc.
Tampa, FL
(c) 904.477.7825
(h) 904.292.1881

----- Original Message -----
From: "Johnson, Kirk" <[EMAIL PROTECTED]>
To: "'Clayton Dukes'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 6:24 PM
Subject: RE: [PHP] Help!


> Did the permissions get changed to something that nobody can no longer
read?
>
> Kirk
>
> >     ----- Original Message -----
> >     From: Clayton Dukes
> >     To: [EMAIL PROTECTED]
> >     Cc: [EMAIL PROTECTED]
> >     Sent: Thursday, March 29, 2001 6:06 PM
> >     Subject: [PHP] Help!
> >
> >
> >     Arrrgh,
> >
> >     Something went haywire with my site a little while ago,
> > can somebody tell me why I'm getting:
> >
> >     Warning: Failed opening 'themes/JET/theme.php' for
> > inclusion
> > (include_path='.:/etc/httpd/conf/php:/home/www/web:/home/www/w
> > ebsites/acxiom/phonebook/phplib/php:/home/www/web/plug-ins/php
> > weather') in /home/www/web/header.php on line 46
> >
> >
> >     I don't know why it doesn't see the file, it's there.
> >     I tried putting it in the include path even, no such luck.
> >
> >     I'm dying here, please help asap :-)>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





So, I went back through my command line history and found the culprit, if
anyone's interested....

I typed:
chmod 666 file.php *

When I should have typed
chmod 666 file.php*

Damn, I love Unix :-)


Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Internetwork Solutions Engineer
Internetwork Management Engineer
Thrupoint, Inc.
Tampa, FL
(c) 904.477.7825
(h) 904.292.1881

---------------------------------------------------------------------
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net



----- Original Message -----
From: "Clayton Dukes" <[EMAIL PROTECTED]>
To: "Johnson, Kirk" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 6:28 PM
Subject: Re: [PHP] Help!


> Yes,
> I've got it now.
>
> Scared the crap out of me....
> I must have typo'd on a perm change, man that'll ruin your friggin day!
>
>
> Clayton Dukes
> CCNA, CCDA, CCDP, CCNP
> Internetwork Solutions Engineer
> Internetwork Management Engineer
> Thrupoint, Inc.
> Tampa, FL
> (c) 904.477.7825
> (h) 904.292.1881
>
> ----- Original Message -----
> From: "Johnson, Kirk" <[EMAIL PROTECTED]>
> To: "'Clayton Dukes'" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Thursday, March 29, 2001 6:24 PM
> Subject: RE: [PHP] Help!
>
>
> > Did the permissions get changed to something that nobody can no longer
> read?
> >
> > Kirk
> >
> > >     ----- Original Message -----
> > >     From: Clayton Dukes
> > >     To: [EMAIL PROTECTED]
> > >     Cc: [EMAIL PROTECTED]
> > >     Sent: Thursday, March 29, 2001 6:06 PM
> > >     Subject: [PHP] Help!
> > >
> > >
> > >     Arrrgh,
> > >
> > >     Something went haywire with my site a little while ago,
> > > can somebody tell me why I'm getting:
> > >
> > >     Warning: Failed opening 'themes/JET/theme.php' for
> > > inclusion
> > > (include_path='.:/etc/httpd/conf/php:/home/www/web:/home/www/w
> > > ebsites/acxiom/phonebook/phplib/php:/home/www/web/plug-ins/php
> > > weather') in /home/www/web/header.php on line 46
> > >
> > >
> > >     I don't know why it doesn't see the file, it's there.
> > >     I tried putting it in the include path even, no such luck.
> > >
> > >     I'm dying here, please help asap :-)>
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





On Fri, 30 Mar 2001 09:20, Clayton Dukes wrote:
> So, I went back through my command line history and found the culprit,
> if anyone's interested....
>
> I typed:
> chmod 666 file.php *
>
> When I should have typed
> chmod 666 file.php*
>
> Damn, I love Unix :-)

Be thankful it was chmod, not something interesting like, say, rm -r :-)

And imagine if you were also superuser, in the / directory :-) :-)

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




I think I would have just killed myself if that were the case, I spent way
too long building this puppy to let it go so quickly :-)


Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Internetwork Solutions Engineer
Internetwork Management Engineer
Thrupoint, Inc.
Tampa, FL
(c) 904.477.7825
(h) 904.292.1881

---------------------------------------------------------------------
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net


----- Original Message -----
From: "David Robley" <[EMAIL PROTECTED]>
To: "Clayton Dukes" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 7:44 PM
Subject: Re: [PHP] Help!


> On Fri, 30 Mar 2001 09:20, Clayton Dukes wrote:
> > So, I went back through my command line history and found the culprit,
> > if anyone's interested....
> >
> > I typed:
> > chmod 666 file.php *
> >
> > When I should have typed
> > chmod 666 file.php*
> >
> > Damn, I love Unix :-)
>
> Be thankful it was chmod, not something interesting like, say, rm -r :-)
>
> And imagine if you were also superuser, in the / directory :-) :-)
>
> --
> David Robley                        | WEBMASTER & Mail List Admin
> RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
> AusEinet                            | http://auseinet.flinders.edu.au/
>             Flinders University, ADELAIDE, SOUTH AUSTRALIA





does anyone know how to pass values in javascript variables to php
variables?? Or a workaround if no direct solution...






what exactly are you trying to do? pass variables to a php script? then
use a form with POST or GET...not that simple? describe better what
you're doing then...

-jack

cam k wrote:
> 
> does anyone know how to pass values in javascript variables to php
> variables?? Or a workaround if no direct solution...
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




"Jacky" <[EMAIL PROTECTED]> wrote:
> I have a vairable that stores email address value. I need to break it so
> that I will only get the dmain name bit to store in another variable so
> that
> I can redirect user to that domain, like if user email is [EMAIL PROTECTED]
> then I would like to break that and take only foo.com bit to use for
> navigation.

I don't think any of the responses you got took into account email addresses
like [EMAIL PROTECTED]  If you truely just want domain.tld it's a little
more complex.  I happened to have written a script a few months ago that
does what you want.  Even if you don't need something this complex in your
case, my code uses 5 or 6 string functions and arrays so it's a pretty good
example of how to manipulate strings in PHP.

<?php
// Expecting a properly formatted email address.
$string_in = '[EMAIL PROTECTED]';

// strpos() finds position of '@' character.
// substr() returns portion of email address to the
// right of '@' (the host).
$string_tmp = substr( $string_in, strpos( $string, '@' ) + 1 );

// substr_count() returns the # of occurrences of '.' within the host.
$dot_count = substr_count( $string_tmp, '.' );

// If only one dot was found, we're done.
if ( $dot_count == 1 )
{
    $string_out = $string_tmp;
}
// If more than one dot was found, there's more to do.
else
{
// explode() splits the host into elements of an array.
// The elements are the portions of the string between the dots.
$parts = explode( '.', $string_tmp );

// count() returns the number of elements.  We want the
// last 2 elements.  Since the array elements begin at 0, not 1,
// we need to get elements n-2 and n-1, not n-1 and n, which
// might normally be expected.
$string_out = $parts[count( $parts ) - 2] . '.' . $parts[count( $parts ) -
1];
}

// print the desired output.
echo $string_out;
?>

--
Steve Werby
President
Befriend Internet Services LLC
Tel: 804-355-WEBS
http://www.befriend.com/





Hi,

I'm new to PHP (well I used it years ago), and have been using Perl ever
since.

Someone told me that PHP is a lot more efficient than Perl, is this true ? I
am developing a fairly large website using a MySQL database running on a
cobalt RAQ3 server and so the speed of the scripts must be kept to a
minimum.  I have already started the site using Perl, but would it benefit
me to change to PHP4.

Thanks,
David.

-----------------------
Fed202 Solutions
www.fed202solutions.com
Mobile : 07779 293368
-----------------------







David Hynes wrote:

> Hi,
>
> I'm new to PHP (well I used it years ago), and have been using Perl ever
> since.
>
> Someone told me that PHP is a lot more efficient than Perl, is this true ? I
> am developing a fairly large website using a MySQL database running on a
> cobalt RAQ3 server and so the speed of the scripts must be kept to a
> minimum.  I have already started the site using Perl, but would it benefit
> me to change to PHP4.

Normally we try to keep our speeds to a maximum, which is why we use PHP.  :)

It would not benefit you to change if you already know perl and have your
project
done in it.  If it's a real project with a deadline, just do it with what you
know best.
That's probably the best route.  BUT... if you've time, dig into PHP4.  Maybe it

can help on this, or maybe it'll help in the future.  It really just depends on
what
you want to do, and what you're comfortable with.







someone recently posted a link to a benchmark test that was
done...there's never an absolute, but i do remember php w/zend as pretty
much whipping the competition...search the mailing list for the link if
you want to see for yourself...

-jack

David Hynes wrote:
> 
> Hi,
> 
> I'm new to PHP (well I used it years ago), and have been using Perl ever
> since.
> 
> Someone told me that PHP is a lot more efficient than Perl, is this true ? I
> am developing a fairly large website using a MySQL database running on a
> cobalt RAQ3 server and so the speed of the scripts must be kept to a
> minimum.  I have already started the site using Perl, but would it benefit
> me to change to PHP4.
> 
> Thanks,
> David.
> 
> -----------------------
> Fed202 Solutions
> www.fed202solutions.com
> Mobile : 07779 293368
> -----------------------
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




hi,

the best way to do this from a webserver (apache module) is to make php 
write some script that crond later executes as root (or some other user).

anyway, you should triple check everything for security bugs... and 
three times isn't enough :)

regards,
Nuno Silva

Brandon Orther wrote:

> Hello,
> 
>       Is there anyway I can have my script turn super user at the beginning when
> it runs?
> 
> Brandon





what exactly are you trying to do? pass variables to a php script? then
use a form with POST or GET...not that simple? describe better what
you're doing then...

-jack

cam k wrote:

ok, I'll explain this a little better, bear with me.  I have several forms
in different frames and one particular form being filled out many times. I
want to be able to submit all the data at once to the database to tie it to
a unique invoice number generated only on submission.  So I need to somehow
store the data until ready to submit. I was thinking of using javascript or
arrays as session variables...

not sure though






You could use sessions with arrays...there's been a discussion recently
about arrays in sessions, and some good sample code...checkout the list
archives...
if you didn't want to use sessions you could just keep passing one large
array to your different php scripts and then passing that into your
database at the end when you're done...

-jack

cam k wrote:
> 
> what exactly are you trying to do? pass variables to a php script? then
> use a form with POST or GET...not that simple? describe better what
> you're doing then...
> 
> -jack
> 
> cam k wrote:
> 
> ok, I'll explain this a little better, bear with me.  I have several forms
> in different frames and one particular form being filled out many times. I
> want to be able to submit all the data at once to the database to tie it to
> a unique invoice number generated only on submission.  So I need to somehow
> store the data until ready to submit. I was thinking of using javascript or
> arrays as session variables...
> 
> not sure though
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




thanks, I found the discussions.  How do I pass one large array?? As a
hidden input type on a form?
"Jack Dempsey" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You could use sessions with arrays...there's been a discussion recently
> about arrays in sessions, and some good sample code...checkout the list
> archives...
> if you didn't want to use sessions you could just keep passing one large
> array to your different php scripts and then passing that into your
> database at the end when you're done...
>
> -jack
>
> cam k wrote:
> >
> > what exactly are you trying to do? pass variables to a php script? then
> > use a form with POST or GET...not that simple? describe better what
> > you're doing then...
> >
> > -jack
> >
> > cam k wrote:
> >
> > ok, I'll explain this a little better, bear with me.  I have several
forms
> > in different frames and one particular form being filled out many times.
I
> > want to be able to submit all the data at once to the database to tie it
to
> > a unique invoice number generated only on submission.  So I need to
somehow
> > store the data until ready to submit. I was thinking of using javascript
or
> > arrays as session variables...
> >
> > not sure though
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






i know for multiple type values you can pass an array of info like this:
<input type="text" name="array[]">
someone also recently posted something about this and passing an array;
try a search for that...
the other possibility is to just pass a long string with | as separators
then explode it later on before you submit...
like perl, TMTOWTDI

-jack

cam k wrote:
> 
> thanks, I found the discussions.  How do I pass one large array?? As a
> hidden input type on a form?
> "Jack Dempsey" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > You could use sessions with arrays...there's been a discussion recently
> > about arrays in sessions, and some good sample code...checkout the list
> > archives...
> > if you didn't want to use sessions you could just keep passing one large
> > array to your different php scripts and then passing that into your
> > database at the end when you're done...
> >
> > -jack
> >
> > cam k wrote:
> > >
> > > what exactly are you trying to do? pass variables to a php script? then
> > > use a form with POST or GET...not that simple? describe better what
> > > you're doing then...
> > >
> > > -jack
> > >
> > > cam k wrote:
> > >
> > > ok, I'll explain this a little better, bear with me.  I have several
> forms
> > > in different frames and one particular form being filled out many times.
> I
> > > want to be able to submit all the data at once to the database to tie it
> to
> > > a unique invoice number generated only on submission.  So I need to
> somehow
> > > store the data until ready to submit. I was thinking of using javascript
> or
> > > arrays as session variables...
> > >
> > > not sure though
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




> > I wouldn't expect a programmer to walk in off the street and try to do
> > graphic design without having any concept of graphic design.
>
> ack!  i do this very thing!  one reason i rely on css and tables rather
> then graphics, that and it means less hits on my server :-)
>
> regarding this thread, the list is full of all kinds.  from the "how i
> make php databasss" to core php developers, php-general is the great
> melting pot of php goodness!  let's cherish this fact.

After being eye-ball deep in documentation 8 hrs a day trying to learn how
to do things with MySQL, Interbase, PHP, and CSS.. This list certinaly is a
god-send.  Not only do questions that are posted GET ANSWERED (questions
i've asked in other groups have a tendancy to go un-answered *pout*), but
the diversity of people give many possible soltutions.

Only problem I have is the 103,000 messages in the group on the news server
*cringe*..

bkx






In article <9a0jpq$9bg$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Stuart J. Browne") wrote:

> After being eye-ball deep in documentation 8 hrs a day trying to learn how
> to do things with MySQL, Interbase, PHP, and CSS.. This list certinaly is a
> god-send.  Not only do questions that are posted GET ANSWERED (questions
> i've asked in other groups have a tendancy to go un-answered *pout*), but
> the diversity of people give many possible soltutions.
> 
> Only problem I have is the 103,000 messages in the group on the news server
> *cringe*..

Shhh!  Don't complain about that or someone will start thinking it's a good 
idea to start expiring the old messages like other news admins do (wow is 
that a terrific archive of links, solutions, ideas, examples, and much 
other useful know-how).

-- 
CC




> > After being eye-ball deep in documentation 8 hrs a day trying to learn
how
> > to do things with MySQL, Interbase, PHP, and CSS.. This list certinaly
is a
> > god-send.  Not only do questions that are posted GET ANSWERED (questions
> > i've asked in other groups have a tendancy to go un-answered *pout*),
but
> > the diversity of people give many possible soltutions.
> >
> > Only problem I have is the 103,000 messages in the group on the news
server
> > *cringe*..
>
> Shhh!  Don't complain about that or someone will start thinking it's a
good
> idea to start expiring the old messages like other news admins do (wow is
> that a terrific archive of links, solutions, ideas, examples, and much
> other useful know-how).

I'm not complaining that they are all there, I use the news reader to search
through 'em all.

Just complaining that my lil 'ol PII in the office takes 3-4 minutes to load
the darn things :)

bkx






On Thu, 29 Mar 2001 21:18, Martin E. Koss wrote:
> I have been trying to get a new column added to a table (vips) via a
> PHP script, but having exhausted all the things I can find, I'm still
> struggling. I've referred to TFM for all those who just can't wait to
> tell me
> to do so, and I believe my SQL statement is correct:
>
> $NewCol = $Prod_Code;
> $defaultvalue = "0.00";
> // make usual connection
> $conID = mysql_pconnect ("localhost","admin","mek1233");
> mysql_select_db("FocusDynamics", $conID);
> // set the query
> // According to the mySQL manual:
> // ALTER TABLE vips ADD column_name FLOAT (11,2) DEFAULT '0.00'
> // So I used:
> $AddColQuery = "ALTER TABLE vips ADD $NewCol FLOAT (11,2) DEFAULT
> '0.00'"; $result = mysql_query ($AddColQuery,$conID);
> // now set the default value for all rows in vips table
> $SetDefault = "UPDATE TABLE vips SET $NewCol=$defaultvalue";
> $result = mysql_query ($SetDefault,$conID);
>
> It is NOT adding the column, and obviously not setting the default.
>
> Any help would be great, thanks.
>
> Martin.

Two things come to mind: echo your $AddColQuery to ensure you are getting 
what you hope you are getting :-) and use mysql_error() after you run 
mysql_query on your query, to see if there is an error message being 
returned.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




Hello,

Is it possible to have PHP resize an image on the server?

Example.
If I upload a JPG file at about 40KB at 600x480 Resolution, but I only want
to display it as a small thumbnail. But if clicking the thumbnail it then
opens in a new window the full size version.

I have seen a auction site that I use, which is ASP and when I upload an
image to sell, i notice that it gives the thumbnail and the full size
images. How is this possible?

Any links to sites on this subject would excellent.

--
Regards,


YoBro
-------------------------------------------------------------
DO NOT REPLY TO THIS VIA EMAIL
PLEASE USE THE NEWSGROUP
All emails sent to this address are automatically deleted.
This is to avoid SPAM!
-------------------------------------------------------------






Perhaps i'm not following what you're trying to do, but why not
manipulate the height/width img tag attributes to make it look like a
thumbnail, but then when displaying it for real, take them out? there
definitely have been posts about this (as usual, check the archives) and
i'm sure a little searching through google will turn up some good
stuff...try the php sites too (phpbuilder, etc)

-jack

YoBro wrote:
> 
> Hello,
> 
> Is it possible to have PHP resize an image on the server?
> 
> Example.
> If I upload a JPG file at about 40KB at 600x480 Resolution, but I only want
> to display it as a small thumbnail. But if clicking the thumbnail it then
> opens in a new window the full size version.
> 
> I have seen a auction site that I use, which is ASP and when I upload an
> image to sell, i notice that it gives the thumbnail and the full size
> images. How is this possible?
> 
> Any links to sites on this subject would excellent.
> 
> --
> Regards,
> 
> YoBro
> -------------------------------------------------------------
> DO NOT REPLY TO THIS VIA EMAIL
> PLEASE USE THE NEWSGROUP
> All emails sent to this address are automatically deleted.
> This is to avoid SPAM!
> -------------------------------------------------------------
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




> Perhaps i'm not following what you're trying to do, but why not
> manipulate the height/width img tag attributes to make it look like a
> thumbnail, but then when displaying it for real, take them out?

Because then you have to download the entire large image. 

Large images are bigger. :)

Jason




ok, so then read the image in using php's image functions, and use
imagecopyresized...you'll even find a post about thumbnails...

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

-jack

Jason Murray wrote:
> 
> > Perhaps i'm not following what you're trying to do, but why not
> > manipulate the height/width img tag attributes to make it look like a
> > thumbnail, but then when displaying it for real, take them out?
> 
> Because then you have to download the entire large image.
> 
> Large images are bigger. :)
> 
> Jason
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




Using a GD that has GIF support, you can do this....

<?php

// we expect $scale and $image to be defined, having been passed to us via
// query string, e.g. http://www.foo.com/img.php3?image=test.gif&scale=4

// create an image object from the source file
$srcImg = imagecreatefromgif($DOCUMENT_ROOT . $image);

// create a (blank) smaller image object
$srcSize = getimagesize($DOCUMENT_ROOT . $image);
$dstImg = imagecreate($srcSize[0]/$scale, $srcSize[1]/$scale);

// copy and resize from the source image object to the smaller blank one
imagecopyresized($dstImg, $srcImg, 0, 0, 0, 0,
                  $srcSize[0]/$scale, $srcSize[1]/$scale,
                  $srcSize[0], $srcSize[1]);

// send the smaller image object to the browser
header( "Content-Type: image/gif");
imagegif($dstImg);

// clean up
imagedestroy($scrImg);
imagedestroy($dstImg);

?>

> -----Original Message-----
> From: Jason Murray [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 7:49 PM
> To: 'Jack Dempsey'; YoBro
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] Image Resizing in PHP
> 
> 
> > Perhaps i'm not following what you're trying to do, but why not
> > manipulate the height/width img tag attributes to make it 
> look like a
> > thumbnail, but then when displaying it for real, take them out?
> 
> Because then you have to download the entire large image. 
> 
> Large images are bigger. :)
> 
> Jason
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 




Where can I find a GD with GIF support (the new one only supports JPEG and
PNG)

Regards,
Pablo


""YoBro"" <[EMAIL PROTECTED]> escribió en el mensaje
9a0k9b$hdp$[EMAIL PROTECTED]">news:9a0k9b$hdp$[EMAIL PROTECTED]...
> Hello,
>
> Is it possible to have PHP resize an image on the server?
>
> Example.
> If I upload a JPG file at about 40KB at 600x480 Resolution, but I only
want
> to display it as a small thumbnail. But if clicking the thumbnail it then
> opens in a new window the full size version.
>
> I have seen a auction site that I use, which is ASP and when I upload an
> image to sell, i notice that it gives the thumbnail and the full size
> images. How is this possible?
>
> Any links to sites on this subject would excellent.
>
> --
> Regards,
>
>
> YoBro
> -------------------------------------------------------------
> DO NOT REPLY TO THIS VIA EMAIL
> PLEASE USE THE NEWSGROUP
> All emails sent to this address are automatically deleted.
> This is to avoid SPAM!
> -------------------------------------------------------------
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>







MG PUBLISHING
4865 HWY 138,R.R 1
ST-ANDREWS WEST 
ONTARIO, KOC 2A0
1-800-301-8093
http://www.mgpublishing.net


PRESS RELEASE

CANADIAN SUBSIDY DIRECTORY YEAR 2001 EDITION
Legal Deposit-National Library of Canada
ISBN 2-922870-01-4..............................................49.95

M.G. Publishing is offering to the public a revised edition of the 
Canadian Subsidy Directory, a guide containing more than 2300 direct and 
indirect financial subsidies, grants and loans offered by government 
departments and agencies, foundations, associations and organizations.  In 
this new 2001 edition all programs are well described.

The Canadian Subsidy Directory is the most comprehensive tool to start up 
a business, improve existent activities, set up a business plan, or obtain 
assistance from experts in fields such as: Industry, transport, 
agriculture, communications, municipal infrastructure, education, import-
export, labor, construction and renovation, the service sector, hi-tech 
industries, research and development, joint ventures, arts, cinema, 
theatre, music and recording industry, the self employed, contests, and 
new talents.
Assistance from and for foundations and associations, guidance to prepare 
a business plan, market surveys, computers, and much more!
To obtain the Canadian Subsidy Directory call 1-800-301-8093.

Consult our web site at: http:// www.mgpublishing.net

To remove your e-mail address from our mailing list, please choose one of 
the following options:
If the link bellow is all on the same line, simply click on it. 
http://www.mgpublishing.net/r.asp?[EMAIL PROTECTED]
Reply to this email with  ' Remove ' in the subject
Use the form at the link bellow
http://www.mgpublishing.net/retrait.asp






On Thu, 29 Mar 2001 23:35, Peter Van Dijck wrote:
> How do I rewrite 1 line in a file? I got the filename and the
> linenumber. i was playing around with fwrite but to find the line I had
> to do all sorts of gymnastics, I'm sure there must be a more elegant
> way...
> thanks for any hints!
> Peter

In a nutshell, you load the file into an array containing one line per 
element of the array.

You then work through the array until you find the line you want - if you 
know how many lines into the file it is you can of course directly 
reference the element (no_of_line -1 because the first array element is 
0).

Change the info you want.

Write the changed array back to the file. Coding is left as an exercise 
for the student :-)

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




> How can I use exec() to create user account?
> I try to use exec("useradd testusr");
> but nothing happens,
> I have set the permission of useradd to 7777 (chmod 7777 useradd) but
still
> can't do the desired operation!!

Are you sure the user who is trying to create the user has permissions to
all the necessary files ( /etc/{passwd,group,shadow} ) etc. ?  Given that it
appears your on a linux box, are you using a kernel version that supposed
set{u,g}id apps?

few issues..

some more details as to how you are trying to use PHP would be helpful..






What is the best method for tracking a user through a website ?

I want to assign a username to a user which I can call up at anytime.
Should I use htaccess files and the systems environment variables, or
cookies ?

Cheers,
David.

-----------------------
Fed202 Solutions
www.fed202solutions.com
Mobile : 07779 293368
-----------------------





Try this:
http://hotwired.lycos.com/webmonkey/00/05/index2a.html

Jeff Oien
PHP >start here
http://www.webdesigns1.com/php/

> What is the best method for tracking a user through a website ?
> 
> I want to assign a username to a user which I can call up at anytime.
> Should I use htaccess files and the systems environment variables, or
> cookies ?
> 
> Cheers,
> David.
> 
> -----------------------
> Fed202 Solutions
> www.fed202solutions.com
> Mobile : 07779 293368
> -----------------------
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 




> I would use filesystem if I need performance and if I don't worry about
> management.
> I would use database if I need to manage lots of them and if images have
> attributes.
>
> Some older databases have really poor performance when LOB is used. If it
is the
> case, you might want to use combination of these. (i.e. Use database for
> management and use filesystem to store files)
>
> > what's the difference between them, i mean for effectiveness and
performance
> > ?


We use the second model mentioned above.  Use the database to store paths
and file names, attributes and details of the files, but store the files on
the file-system.

Makes queries and searches simple (database calls), and only pull the data
fromt he file when needed.

The fact that the files happen to be gzipped to save disk usage is just a
side note..

bkx






I am reading in a comments file from a Perl program I have been using, and I
will be converting the comments' text files into a MySQL database...but that
is unimportant. In the files, I have something (after i strip_tags()) like
this:

##################
$file = "
       # 4


        Name:
      Vigilante


        E-mail:
        [EMAIL PROTECTED]



        Date:
        Monday, July 24, 2000, 5:28 PM


      ip:
      Hidden



        Comment


        Hmm. Even that link doesn't work anymore. Looks like they took that
comic down (booo). Anyone save it?


       # 3


        Name:
      Anonymous Unregistered


        E-mail:
        [EMAIL PROTECTED]



        Date:
        Monday, July 24, 2000, 8:57 AM


      ip:
      209.181.217.205



        Comment


        http://www.pvponline.com/archive.php3?archive=20000723

          The URL changed because it was yesterday's comic :)
";
###################

What I want to do is break it down so it looks like this (NOTE: "``````x"
would be the break between comments)

################

$file = "
# 4
Name: Vigilante
E-mail:[EMAIL PROTECTED]
Date:Monday, July 24, 2000, 5:28 PM
ip:Hidden
Comment:Hmm. Even that link doesn't work anymore. Looks like they took that
comic down (booo). Anyone save it?
``````x
# 3
Name:Anonymous Unregistered
E-mail:[EMAIL PROTECTED]
Date:Monday, July 24, 2000, 8:57 AM
ip:209.181.217.205
Comment:http://www.pvponline.com/archive.php3?archive=20000723<br>The URL
changed because it was yesterday's comic :)
";

#################

Then I could parse it easier. So, I guess i need a regexp to remove all the
\n and :space: chars.

Thanks,
David Balatero





In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("David Balatero") wrote:

> So, I guess i need a regexp to remove all the
> \n and :space: chars.

Here are some ideas:

$out=preg_replace("/\s+/","",$in); //strip whitespace

or

$out=preg_replace("/\s+/"," ",$in); //replace whitespace with single space

Note that you requested is different from your example, in which it looks 
like you are simply condensing multiple newlines down into a single 
newline.  For that, something like this might be more appropriate:

$out=preg_replace("/(\n|\r|\r\n)+/","\n",$in);

Play around with 'em. <g>

-- 
CC




> > Doesn't the command return 1 or 0 in success or failure?
>
> Not 1 or 0.  It returns 0 or some other value.  Almost the same,
> but not quite.
>
> > You may not have a result
> > Probably wrong but something like
> > if (mysql_query($query)) {
> > } else {
> > }
> > or you could die out mysql_query($query) or die ........
>
> You could do that.  But once you run the query, that's it.  You'll
> have nothing to use with any of the other mysql functions because
> you need to pass to them the value that mysql() returns.  So while
> the above might tell you whether or not the query succeeded, that's
> all you would get out of it.

Wouldn't doing it like this however be ok:

    if ($result = mysql_query($query)) {
        ; success, have $result
        if (mysql_num_rows($result) > 0) {
            ; have data to play with
        } else {
            ; dont
        }
    } else {
        ; wasn't successful, don't have result
    }

?






why do MS SQL reports errors so poorly on PHP?

you can do anything with those errors, they're useless... and the worse 
part is the actual important part of the error is in the warning, and not 
on the contents of mssql_get_last_message(), where they should be...

and, worse... mssql_query() returns false even when they query ran ok...

I have a script that runs a lot of queries that loads several 'alter 
tables' into mssql to create FKs... for some reason when the query is run 
it generates a warning like this: " Context changed to database 'LIQUID' ", 
which is not really an error, and the query is executed... but returns 
false... I don't consider this to be a bug... but there's certainly 
something wrong about error handling in mssql_db_functions*()...
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer







> -----Original Message-----
> From: Christian Dechery [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 6:23 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] MS SQL errors...
>
>
> why do MS SQL reports errors so poorly on PHP?
>
> you can do anything with those errors, they're useless... and the worse
> part is the actual important part of the error is in the warning, and not
> on the contents of mssql_get_last_message(), where they should be...
>
> and, worse... mssql_query() returns false even when they query ran ok...
>
> I have a script that runs a lot of queries that loads several 'alter
> tables' into mssql to create FKs... for some reason when the query is run
> it generates a warning like this: " Context changed to database
> 'LIQUID' ",
> which is not really an error, and the query is executed... but returns
> false... I don't consider this to be a bug... but there's certainly
> something wrong about error handling in mssql_db_functions*()...
> ____________________________
> . Christian Dechery (lemming)
> . http://www.tanamesa.com.br
> . Gaita-L Owner / Web Developer

PHP mFAQ

Addition # 32: why do MS SQL reports errors so poorly on PHP?

Because that is the way it is coded.  If something is wrong, fix it, or
report it to the right channels, but this is not the place to ask these
questions.





I have a document with <!--ktalk newpost--> in it, which I want to KEEP in
the document. (it's being read into $fp). How can I use strip_tags() to
remove all tags, but keep <!--ktalk newpost--> in the document? I tried

$filedata = strip_tags($filedata, "<!--ktalk newpost-->");

Then re-writing it to the file, but it still takes out the <!--ktalk
newpost--> tag! Please help!

Thanks,
David Balatero





trying to get Apache to compile with this keeps failing, complaining about
"alloc.h" it seems. I notice that apache calls it "ap_alloc.h" now, but the
only reference in mod_auth _mysql is in:

apMakefile.tmpl: $(INCDIR)/alloc.h $(INCDIR)/buff.h \

but changing that doesn't fix the problem...

this has been going on since like apache 1.3.1x and there is no newer
mod_auth_mysql that I've found. I fixed this before, but I can't remember
what I did. Could you please tell me how to fix this, and then put up a
fixed version of mod_auth_mysql so other's don't run into this problem?

apache 1.3.19, linux RH6.2, mysql, mod_auth_mysql 2.20:

===> src/modules/auth_mysql
make[4]: *** No rule to make target `../../include/alloc.h', needed by
`mod_auth_mysql.o'.  Stop.
make[3]: *** [all] Error 1
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/data/usr/src/WT_Apache_Setup/apache_1.3.19/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/data/usr/src/WT_Apache_Setup/apache_1.3.19'
make: *** [build] Error 2







set_value(&$variable,$value)
   {
   $variable=value;
   }

"Warning: Call-time pass-by-reference has been deprecated - argument passed 
by value; If you would like to pass it by reference, modify the declaration 
of [runtime function name](). If you would like to enable call-time 
pass-by-reference, you can set allow_call_time_pass_reference to true in 
your INI file. However, future versions may not support this any longer. "

When did passing by reference get deprecated? The documentation at 
<http://php.net/manual/en/language.references.pass.php> doesn't suggest 
what to do instead--in fact, it uses an example like the syntax above.  So 
my next question is: would using a return value or declaring a global be 
the (only) other options?

TIA

-- 
CC




I am using the apache_lookup_uri function and I am having a problem.

I have PHP4 as an Apache module.

If I give the command:


$link = "http://www.mysite.com/";

$lookup_results = apache_lookup_uri($link);


And I output:

echo $lookup_results->uri;
echo $lookup_results->status;

I get:

/http://www.mysite.com

(that is if the page that has the script is in document root)
and
a status of:

200


Even if the link is bad I get a status of 200.

Why is there a leading "/"?
Am I forming the the URI incorrectly and that is causing a prepend to the
link?

Any help would be great.  I have scanned the archives and various script
archives with no results.

Thanks in advance.

Chris





Ok, i have a text file with lines that looks like this:

14```value```value2`````value3

This would be fine, except...there are sometimes more ```` than in other
columns, so id like it to be

14``value``value2``value3

So I can explode() it into a mysql database. Can anyone offer a regexp for
this?

Thanks!
David Balatero





Hello,

For some reason I am now having real difficulties removing and parsing some XML
files.  I think that if I can just strip out the <? & ?> that I should be able
to parse the XML (.CDF) file.  This should do it:
        $pagetext = eregi_replace('<?','',$pagetext);
        $pagetext = eregi_replace('?>','',$pagetext);

I've attached the whole CDF file at the bottom of this message.  However, I
think that the following should strip out the offending part as well:
        $pagetext = eregi_replace('.*/TITLE>','',$pagetext);

Unfortunately, for some reason it just isn't working for me.  I have other
scripts working just fine using similar code (on the same page).  However, this
just isn't working for me today.  

Any suggestions on what I'm overlooking would be great.

Mike

<?xml version="1.0"?>
<CHANNEL HREF="http://cbc.ca/business/">
<TITLE> CBC News </TITLE>
<ITEM
HREF="http://cbc.ca/cgi-bin/templates/view.cgi?/news/2001/03/29/stocksopen_010329">
 <TITLE>TSE at lowest close in 16 months</TITLE>
 <ABSTRACT>
More negative news from the technology sector helped drive the TSE 300  to its
lowest close in 16 months Thursday. And the tech-heavy Nasdaq  closed at its
lowest level since November 1998. 
 </ABSTRACT>
</ITEM>
<ITEM
HREF="http://cbc.ca/cgi-bin/templates/view.cgi?/news/2001/03/29/OSCfakescam_010329">
 <TITLE>OSC sets up fake Web site to show online investing dangers </TITLE>
 <ABSTRACT>
A phoney Internet site that promised investors high returns with low  risk drew
thousands of visitors during an investigation run by the  Ontario Securities
Commission. 
 </ABSTRACT>
</ITEM>
<ITEM
HREF="http://cbc.ca/cgi-bin/templates/view.cgi?/news/2001/03/28/cdnx010328">
 <TITLE>Canadian Venture Exchange approves TSE takeover plan</TITLE>
 <ABSTRACT>
The boards of directors of both the Toronto Stock Exchange and the  Canadian
Venture Exchange (CDNX) have both voted in principle to approve  the takeover of
the CDNX by the TSE. 
 </ABSTRACT>
</ITEM>
</CHANNEL>

-- 
Mike Gifford, OpenConcept Consulting, http://openconcept.ca
Offering everything your organization needs for an effective web site.
Featured Client: http://www.aboriginalrightscoalition.ca/
If a book doesn't make us better, then what on earth is it for? - Alice Walker




On Fri, 30 Mar 2001 14:34, Mike Gifford wrote:
> Hello,
>
> For some reason I am now having real difficulties removing and parsing
> some XML files.  I think that if I can just strip out the <? & ?> that
> I should be able to parse the XML (.CDF) file.  This should do it:
>       $pagetext = eregi_replace('<?','',$pagetext);
>       $pagetext = eregi_replace('?>','',$pagetext);
>
> I've attached the whole CDF file at the bottom of this message. 
> However, I think that the following should strip out the offending part
> as well: $pagetext = eregi_replace('.*/TITLE>','',$pagetext);
>
> Unfortunately, for some reason it just isn't working for me.  I have
> other scripts working just fine using similar code (on the same page). 
> However, this just isn't working for me today.
>
> Any suggestions on what I'm overlooking would be great.
>
> Mike

I'm no regex guru but isn't the ? a special character? Try using 
str_replace instead; it should be quicker also.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




Here is the scenario:

I want to let my users download their history of transactions from a mysql
database.  I have that part working...they click a link a csv file is
created for them to download.  now here is my question.

Is there a way to have the file delete after they have downloaded it?  Also
is there a way to have the file download as filename.csv but have the
actually file that is create named a random name of numbers and letters
i.e. 2s3d4f5g6h.csv

My concern is to have the file be deleted after download and/or make it so
no other users could guess the url and download someone else's history.

Any Advice is much appreciated.

thanks

randy






On Fri, 30 Mar 2001 15:10, Randy Johnson wrote:
> Here is the scenario:
>
> I want to let my users download their history of transactions from a
> mysql database.  I have that part working...they click a link a csv
> file is created for them to download.  now here is my question.
>
> Is there a way to have the file delete after they have downloaded it? 
> Also is there a way to have the file download as filename.csv but have
> the actually file that is create named a random name of numbers and
> letters i.e. 2s3d4f5g6h.csv
>
> My concern is to have the file be deleted after download and/or make it
> so no other users could guess the url and download someone else's
> history.
>
> Any Advice is much appreciated.
>
> thanks
>
> randy

Why not create the information and download it on-the-fly? That way no 
files are created, no evidence left laying around, etc. I've attached 
(for Randy, won't get to the list) something I use to do this with output 
as a tab delimited file. 

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA
<?php
/* This little routine will produce a tab delimited file of the contents of the expertise and people
   tables from the injdirect database - that's the one that runs the Directory of Injury Personnel.
   The tab delimited file is sent as an application/octetstream file to force saving to file, to be used for
   producing some kind of mailout. 
	 We can't use CSV because someone decided to put "s in the data ;-( */

header("Content-disposition: filename=maillist.dat");
header("Content-type: application/octetstream");
header("Pragma: no-cache");
header("Expires: 0");
// doing some DOS-CRLF magic...
$client=getenv("HTTP_USER_AGENT");
if (ereg('[^(]*\((.*)\)[^)]*',$client,$regs)):
    $os = $regs[1];
    // this looks better under WinX
    if (eregi("Win",$os)):
      $crlf="\r\n";
    else:
      $crlf="\n";
    endif;			/* OS = WIN */
endif;			/* ereg $client */
$database = "xxxxxxxxx";
//<Build query here>
$sep="\t";

$result = mysql_db_query($database, $query);
if (mysql_errno() != 0):
 echo "ERRNUM: ".mysql_errno()." - ".mysql_error()."\n";
endif;

/* Dump a header line showing field order */
echo "title $sep surname $sep fname $sep position $sep section $sep division $sep orgname $sep mail1 $sep mail2 $sep city $sep ";
echo "state $sep postcode $sep phone $sep mobile $sep fax $sep email $sep exp1 $sep exp2 $sep exp3 $sep exp4 $sep exp5 $sep description";
echo $crlf;
while($row=mysql_fetch_array($result)){
extract($row);
echo stripslashes($title) . $sep;
echo stripslashes($surname) . $sep;
echo stripslashes($fname) . $sep;
echo stripslashes($position) . $sep;
echo stripslashes($section) . $sep;
echo stripslashes($division) . $sep;
echo stripslashes($orgname) . $sep;
echo stripslashes($mail1) . $sep;
echo stripslashes($mail2) . $sep;
echo $city . $sep;
echo $state . $sep;
echo $postcode . $sep;
echo $phone . $sep;
echo $mobile . $sep;
echo $fax . $sep;
echo $email . $sep;
echo $expertise[intval($exp1)] . $sep;
echo $expertise[intval($exp2)] . $sep;
echo $expertise[intval($exp3)] . $sep;
echo $expertise[intval($exp4)] . $sep;
echo $expertise[intval($exp5)] . $sep;
$description = stripslashes($description);
echo str_replace("\n", " ",$description);
echo $crlf;
}

?>




I'm not sure of the exact term, but what I want todo is run a function
in a loop so that it doesn't wait for the function to finish and goes
ahead and executes the next in loop.

For example:

<?

for($i=1; $i>5; $i++) {

run_this();

}

?>

run_this may contain some long mathematical computations that takes a
while, but I want the script to go ahead and continue with the script
while the script computates...

or better yet, executes a shell script that runs in the bg, but the
PHP can safely quit without waiting for results of the shell script.
Any ideas?




Philip Olson wrote:
> This place :
>    http://www.ultraedit.com/downloads/additional.html
> 
> Has very weak PHP representation.

  I know, that's why I started working on a new wordfile.txt, based upon
one of theirs.

> Want to round up some ideas and upgrade this section as a hole?

  Hm, why make it on their site? I'm just thinking about creating a
SourceForge Account for a "PHP Mode for UltraEdit" project. This way we
could update it ASAP, when needed. We can give UltraEdit the link (or
the files, too), though. But I don't think they're willing to update the
files in their download section everytime a function is added to PHP,
for instance.

> 0. Create new uberWord file (yours with aditions) and upon submittion,
>    remove all current word files.

  My current wordfile.txt is definetly just a start from where we need
to go further - but it already contains all function names, as of
yesterday's state od the CVS.

> 1. Create a tag list.  Coordinate tag/word file co-mingling in
>    intelligent manner.

  Yup.

  PS: I'm not subscribed to [EMAIL PROTECTED], so please CC me 
      in your replies.

-- 
 sebastian bergmann                            [EMAIL PROTECTED]
                                       http://www.sebastian-bergmann.de

 bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de





I am using Apache 1.3.19 for Win32 and PHP 4.04 as a module. I would like to
retrieve, as a variable, the user name loged in the W2000 domain. Running
PHPINFO() function e it does not display USERNAME variable so I do not know
how to accomplish this task

Thanks










I like it because is a very fast developement environement.
Ultradev = Dreamweaver + database and scripting capabilities (ASP,JSP,CFLM)
and now with this extension PHP (which uses Adodb
http://php.weblogs.com/ADODB)


Ovidiu

> -----Original Message-----
> From: Yasuo Ohgaki [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 12:18 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Php extension for Ultradev available now !
>
>
> Timely post for me. I am considering upgrading Dreamweaver and Fireworks.
>
> How and why do you like Ultradev?
> Why PHP user should use it?
>
> --
> Yasuo Ohgaki
>
>
> ""Ovidiu EFTIMIE"" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > For those working with ultradev  :
> > http://www.udzone.com/showDetail.asp?TypeId=4&NewsId=488
> >
> >
> > Ovidiu
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Hi All There

I am new to this mailing list

I had virtual domain hosted on my server with No. of users

With control panel of mine,I want to add Quota feature to my panel

By which users can check for there quota Through web for the amount of

space they are using

I am a baby for php so please help me out from scratch

Thanks

Regards




Hello

What causes this error message is there a place to read a bit more about
session module?

Failed to initialize session module


Thank you








I need a method to compile my php files to give them to a customer.

The main problem is that this customer have an account on a shared hosting
service and (I think) he can't install a compiler or something new on that
server.

Is it possible to encrypt my files ?

Plz HELP ASAP

Yours,
Marian




Reply via email to