|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Fri Mar 30 2001 - 01:32:53 CST
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:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
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
attached mail follows:
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: <elists
elliston.net>
To: "Php-General
Lists. Php. Net" <php-general
lists.php.net>
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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
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
attached mail follows:
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.
attached mail follows:
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
attached mail follows:
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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
> 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
attached mail follows:
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
attached mail follows:
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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
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
attached mail follows:
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: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
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
attached mail follows:
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:scott
abcoa.com]
> Sent: Thursday, March 29, 2001 1:07 PM
> To: php-general
lists.php.net
> 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
attached mail follows:
In a message dated 29/03/2001 21:42:57 GMT Daylight Time,
kjohnson
zootweb.com 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
attached mail follows:
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,
>kjohnson
zootweb.com 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: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
+ ======================
+ Pierre-Yves Lem
ire
+ E-MedHosting.com
+ (514) 729-8100
+ pylem
sympatico.ca
+ ======================
attached mail follows:
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:bcdoyle
mindspring.com]
> Sent: Thursday, March 29, 2001 1:57 PM
> To: php-general
lists.php.net
> 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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
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
attached mail follows:
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:Gilles-Eric.DescampsSiliconAccess.com "Sed quis custodiet ipsos custodes ?"
attached mail follows:
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" <Gilles-Eric.Descamps
SiliconAccess.com>
To: <php-general
lists.php.net>
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:Gilles-Eric.Descamps
SiliconAccess.com
> "Sed quis custodiet ipsos custodes ?"
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
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:cdukes
cdukes.com]
> Sent: Thursday, March 29, 2001 1:18 PM
> To: Gilles-Eric Descamps; php-general
lists.php.net
> 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?
attached mail follows:
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:Gilles-Eric.Descamps
SiliconAccess.com]
Sent: Thursday, March 29, 2001 1:18 PM
To: php-general
lists.php.net
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:cdukes
cdukes.com]
> Sent: Thursday, March 29, 2001 1:18 PM
> To: Gilles-Eric Descamps; php-general
lists.php.net
> 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: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
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
attached mail follows:
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"" <taipan
netcologne.de> wrote in message
news:AEENKNGKOFKHKMJFIEGJKEOCCNAA.taipan
netcologne.de...
> 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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
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
sroy
galeasec.com
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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
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:sroy
galeasec.com]
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
sroy
galeasec.com
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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
_____
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: craig
apexdigital.net
Web: apexdigital.net
------------------------------------------
attached mail follows:
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
hanna
clemson.edu
---- 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!
attached mail follows:
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"); > } >
attached mail follows:
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
> hanna
clemson.edu
>
> ---- 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!
>
attached mail follows:
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:ashleypcraft.com> . 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
attached mail follows:
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:ashley
pcraft.com]
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.
attached mail follows:
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:ashley
pcraft.com> . 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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
> -----Original Message-----
> From: Ashley M. Kirchner [mailto:ashley
pcraft.com]
> 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++; }
attached mail follows:
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:ashley
pcraft.com]
> > 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: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
> -----Original Message-----
> From: Morgan Curley [mailto:mcurley
e4media.com]
> 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:ashley
pcraft.com]
> > > 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: php-general-unsubscribe
lists.php.net
> >For additional commands, e-mail: php-general-help
lists.php.net
> >To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
> $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
attached mail follows:
> -----Original Message-----
> From: Stephan Ahonen [mailto:analogy
wheezebucket.com]
> Sent: Thursday, March 29, 2001 5:20 PM
> To: php-general
lists.php.net
> 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
attached mail follows:
> -----Original Message-----
> From: Philip Hallstrom [mailto:philip
adhesivemedia.com]
> 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:Gilles-Eric.DescampsSiliconAccess.com "Sed quis custodiet ipsos custodes ?"
> -----Original Message----- > From: Clayton Dukes [mailto:cdukes
cdukes.com] > Sent: Thursday, March 29, 2001 1:18 PM > To: Gilles-Eric Descamps; php-general
lists.php.net > 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" <Gilles-Eric.Descamps
SiliconAccess.com> > To: <php-general
lists.php.net> > 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:Gilles-Eric.Descamps
SiliconAccess.com > > "Sed quis custodiet ipsos custodes ?" > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > > For additional commands, e-mail: php-general-help
lists.php.net > > To contact the list administrators, e-mail: > php-list-admin
lists.php.net >
attached mail follows:
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
attached mail follows:
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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
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: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
-->'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'>'> Michael Seely mseely
cimworld.com 408-777-9949
attached mail follows:
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
attached mail follows:
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
attached mail follows:
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 :-)
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: php-general
lists.php.net
Cc: phpwebsite
tux.appstate.edu
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: php-general-unsubscribe
lists.php.net
For additional commands, e-mail: php-general-help
lists.php.net
To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Did the permissions get changed to something that nobody can no longer read?
Kirk
> ----- Original Message -----
> From: Clayton Dukes
> To: php-general
lists.php.net
> Cc: phpwebsite
tux.appstate.edu
> 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 :-)>
attached mail follows:
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" <kjohnson
zootweb.com>
To: "'Clayton Dukes'" <cdukes
cdukes.com>
Cc: <php-general
lists.php.net>
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: php-general
lists.php.net
> > Cc: phpwebsite
tux.appstate.edu
> > 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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
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" <cdukes
cdukes.com>
To: "Johnson, Kirk" <kjohnson
zootweb.com>
Cc: <php-general
lists.php.net>
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" <kjohnson
zootweb.com>
> To: "'Clayton Dukes'" <cdukes
cdukes.com>
> Cc: <php-general
lists.php.net>
> 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: php-general
lists.php.net
> > > Cc: phpwebsite
tux.appstate.edu
> > > 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: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
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
attached mail follows:
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" <huntsman
www.nisu.flinders.edu.au>
To: "Clayton Dukes" <cdukes
cdukes.com>; <php-general
lists.php.net>
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
attached mail follows:
does anyone know how to pass values in javascript variables to php variables?? Or a workaround if no direct solution...
attached mail follows:
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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
"Jacky" <jacky
activelifestyle.com> 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 test
foo.com.
> 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 user
host.domain.tld. 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 = 'steve
mail.richmond.va.us';
// 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/
attached mail follows:
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 -----------------------
attached mail follows:
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.
attached mail follows:
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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
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
attached mail follows:
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
attached mail follows:
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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
thanks, I found the discussions. How do I pass one large array?? As a
hidden input type on a form?
"Jack Dempsey" <dempsejn
georgetown.edu> wrote in message
news:3AC3C980.51957E70
georgetown.edu...
> 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: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
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" <dempsejn
georgetown.edu> wrote in message
> news:3AC3C980.51957E70
georgetown.edu...
> > 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: php-general-unsubscribe
lists.php.net
> > > For additional commands, e-mail: php-general-help
lists.php.net
> > > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
> > 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
attached mail follows:
In article <9a0jpq$9bg$1
toye.p.sourceforge.net>,
stuart
promed.com.au ("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
attached mail follows:
> > 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
attached mail follows:
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
attached mail follows:
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! -------------------------------------------------------------
attached mail follows:
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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
> 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
attached mail follows:
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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
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:Jason.Murray
melbourneit.com.au]
> Sent: Thursday, March 29, 2001 7:49 PM
> To: 'Jack Dempsey'; YoBro
> Cc: php-general
lists.php.net
> 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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
attached mail follows:
Where can I find a GD with GIF support (the new one only supports JPEG and PNG)
Regards, Pablo
""YoBro"" <nospam
brochures.co.nz> escribió en el mensaje
news:9a0k9b$hdp$1
toye.p.sourceforge.net...
> 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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
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.
lists.php.net">http://www.mgpublishing.net/r.asp?Email=php-general
lists.php.net
Reply to this email with ' Remove ' in the subject
Use the form at the link bellow
http://www.mgpublishing.net/retrait.asp
attached mail follows:
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