|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help_at_lists.php.net
Date: Mon Sep 09 2002 - 09:31:11 CDT
php-general Digest 9 Sep 2002 14:31:11 -0000 Issue 1575
Topics (messages 115697 through 115744):
Re: How to program very basic chat on PHP?
115697 by: M
115698 by: Justin French
115708 by: M
Problems with GD 2.0.1
115699 by: Ville Mattila
Re: turn register_globals on
115700 by: Tom Rogers
115702 by: Jome
115703 by: Steve Yates
Re: Upload Progress
115701 by: Jed Verity
115723 by: Luke Welling
115725 by: Erwin
Re: HTTP_SERVER_VARS not working. Please help
115704 by: Steve Yates
best way to turn a text file into tables in PHP
115705 by: Peter
115706 by: Justin French
Re: Upgrading PHP on Redhat
115707 by: ing.Martin Prásek
Re: imagecopyresized problems
115709 by: joakim.andersson.cybercom.se
Re: combine 2 integer
115710 by: Meltem Demirkus
115711 by: Meltem Demirkus
115712 by: mhe.ruc.dk
115713 by: Zak Greant
115714 by: Marek Kilimajer
115715 by: Scott Houseman
Re: checkbox question
115716 by: Marek Kilimajer
115728 by: Craig Donnelly
115744 by: Alex Shi
file upload > 2 MB
115717 by: andy
115720 by: Erwin
115724 by: Paul Nicholson
Load / Stress Testing
115718 by: Dan Hardiker
115730 by: Leonid Mamtchenkov
select box
115719 by: Meltem Demirkus
115729 by: Craig Donnelly
115738 by: Support . Fourthrealm.com
date question
115721 by: Meltem Demirkus
115722 by: Erwin
115726 by: Rudolf Visagie
POST form variables not being sent to destination page
115727 by: Howard Roscoe
115735 by: . Edwin
115736 by: . Edwin
115739 by: Erwin
Re: Calculating Totals from table columns without a second query to the DB
115731 by: Jay Blanchard
Re: Troubles Inserting into MYSQL
115732 by: Jay Blanchard
115737 by: bbonkosk.tampabay.rr.com
PHP web mail forward feature
115733 by: Santosh Pasi
Re: help me regarding redirecting a page
115734 by: Support . Fourthrealm.com
Session problem
115740 by: John Wards
115741 by: John Wards
Weird fileupload problem
115742 by: Trond Arve Nordheim
Moduli per sablot
115743 by: Agnoletto Christian
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:
Gerhard Hoogterp wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> > Hello Phil, your idea is interesting. I am evaluating it because it is not
> > a true 'chat' (if user doesnt load any page he will never see incoming
> > msg), but your idea is the only thing I have to this time.
>
> But with a frame or iframe and a little javascript the reloading can be
> automated..
>
> gerhard
Hello Gerhard, I had an idea, and would like you say to me if it is possible or
not. I program little javascript, and I think there is a timer function into JS.
My question is: what if some timer start every nn seconds a function to read
stored msgs table?
My doubt is: how to start a function in JS to read a table?. Remember PHP and
Mysql are server-sided operations, while JS is cliente side op.
Maybe your idea is JS start a new window embedded into iframe, and this window
then would exec a PHP script to check msgs table.
Is this true?
Thanks
Mig
attached mail follows:
An extremely basic chat would be a frame or iframe which has a meta tag
refresh (or javascript refresh) of a plain HTML page every 10-20 seconds.
As far as the flash stuff goes, have a look at macromedia.com or the 1000's
of flash sites... I'm positive you'll find some development tools for a
pre-built chat room that you can modify. I'm certain I got one of
macromedia.com a few years back (flash 4 days i think).
Justin
on 09/09/02 12:37 PM, M (meu
meucat.com) wrote:
> Gerhard Hoogterp wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>>> Hello Phil, your idea is interesting. I am evaluating it because it is not
>>> a true 'chat' (if user doesnt load any page he will never see incoming
>>> msg), but your idea is the only thing I have to this time.
>>
>> But with a frame or iframe and a little javascript the reloading can be
>> automated..
>>
>> gerhard
>
> Hello Gerhard, I had an idea, and would like you say to me if it is possible
> or
> not. I program little javascript, and I think there is a timer function into
> JS.
>
> My question is: what if some timer start every nn seconds a function to read
> stored msgs table?
>
> My doubt is: how to start a function in JS to read a table?. Remember PHP and
> Mysql are server-sided operations, while JS is cliente side op.
>
> Maybe your idea is JS start a new window embedded into iframe, and this window
> then would exec a PHP script to check msgs table.
>
> Is this true?
>
> Thanks
>
> Mig
>
>
attached mail follows:
Justin French wrote:
> An extremely basic chat would be a frame or iframe which has a meta tag
> refresh (or javascript refresh) of a plain HTML page every 10-20 seconds.
>
> As far as the flash stuff goes, have a look at macromedia.com or the 1000's
> of flash sites... I'm positive you'll find some development tools for a
> pre-built chat room that you can modify. I'm certain I got one of
> macromedia.com a few years back (flash 4 days i think).
>
> Justin
Hello Justin
Ok, you are right, I know it is possible to get complete chat services at free (just
install it in your page).
I think I forgot mention something. The reason I don't want use these services is
because I want people be able to retrieve info of my database when chatting.
Since I have profiles and pictures of people stored in databases, I want people
instantly getting these info through chat services.
For instance, when presenting list of chatters, just with a click you can see
picture and profile of that person.
This connection is impossible to stablish when using predefined chats, thats the
reason I want to make my own chat.
Thanks
Mig
attached mail follows:
Hello everyone,
I should get GD 2.0.1 installed to my PHP 4.2.2 binary running as a module
in the Apache 1.3. The box is RedHat 7.3. There is a previous version of GD
(1.8.4) installed as a default and it seems that I can't even get ereased it
due to depencies. Anyway, I'd need that GD 2.0.1 due to some functions
previous versions of GD don't have at all.
I explored the PHP manual and found this little help:
http://www.php.net/~rasmus/gd.html. Wonderful, or not! I followed those
items in the Rasmus' file step by step, but still without results. I tried
to build PHP with make clean (that was only way when the configure changes
really affected to the configure command on phpinfo() -function) and then
all steps. But no... My PHP script is still shouting "Warning:
imagecreatetruecolor(): requires GD 2.0 or later". Grr...
My current PHP build is configured with following string:
'./configure' '--with-mysql' '--with-apxs=/etc/httpd/bin/apxs' '--with-curl'
'--with-gd=/usr/local/gd-2.0.1' '--with-xml' '--enable-ftp'
'--enable-sockets' '--with-freetype-dir=/usr' '--enable-gd-native-ttf'
'--enable-gd-imgstrttf' '--with-zlib' '--with-jpeg-dir=/usr'
'--with-png-dir=/usr'
Well. Any ideas?
Ville
attached mail follows:
Hi,
Monday, September 9, 2002, 3:42:44 AM, you wrote:
A> Hello I am working on a PHP server which has register_globals off. In my
A> script is there anyway to turn it on, just for my script?
By the time your script is read register_globals has already done it's
checking so it is too late and won't have any effect. The only way is
by .htaccess if you have apache.
-- regards, Tom
attached mail follows:
> So, is this allowable to set in user scripts? Or is the dosumentation > correct in saying it cannot?
My bad, you (and the documentation) are correct. :-)
Jome
attached mail follows:
> Anup wrote: > > Hello I am working on a PHP server which has register_globals off. In my > > script is there anyway to turn it on, just for my script?
One trick for using old PHP code is to use
extract($HTTP_POST_VARS);
...at the beginning of your script. That will autocreate all the POST variables for you. Works for GET and others, too.
- Steve Yates - Psychology: the study of the id by the odd.
~ Do you like my taglines? Add them to your messages and ~ laugh through hundreds more by downloading Taglinator ~ at www.srtware.com today!
attached mail follows:
Yikes, I sort of lied. It's been awhile...
Clients uploaded files from an intranet server to an external servier via their browser and ftp_put. It wasn't local machine to remote server.
Sorry! Best of luck, Jed
P.S. I wonder, though, if there isn't some way to execute a script with exec() to get the info through the file system. There was some talk awhile back about using flush(), too. If you haven't already, check the archives for that one...
On the threshold of genius, Jacob Miller wrote:
> I was considering this option earlier but I couldn't figure out how to > determine the tmp file name of the file being uploaded (in cases where > there is more than one upload in progress at a time). How did you go about > determining the name of the tmp file? > > thanks > > - Jacob > > At 01:29 09/09/2002, you wrote: >> There really isn't a great solution for this, that I know of. It's one of >> the few things that makes an argument for ASP over PHP, as far as I'm >> concerned (if you have the luxury of choosing). Below is what I did once to >> try to get around the problem. It worked *okay*. >> >> The bummer is that I had to ask people to enter the size of their file in a >> field. (Rough estimates were okay.) Then, as soon as somebody hit the submit >> button on my form, I popped up a small, modal, progress bar sized window >> that was actually two frames. I passed the file size value from the form >> field to the top frame. In the bottom frame, JavaScript created a bordered >> <div> equal in pixel length to the number of MB of the file being uploaded. >> The top frame, a PHP doc, would then refresh every three seconds, executing >> a filesize() on the uploaded file, converting it to MB, rounding up, and >> then using DHTML to resize the width of a blue-gradient gif contained in the >> <div> of the bottom frame of the progress bar window. >> >> Typically, this worked okay for me. It wasn't the prettiest progress bar in >> the world, but it did the trick for most people. >> >> HTH! >> Jed >> >> >> On the threshold of genius, Jacob Miller wrote: >> >>> Everything I've read says that there is no way to display the progress of a >>> file upload (via a form) using PHP. >>> >>> I'm currently working on a site which will regularly be accepting very >>> large uploads, anywhere from 10 to 250+ mb and I really need a way to >>> display the progress of the upload so that it doesn't appear as if the >>> browser has frozen for a few hours. >>> >>> Any suggestions for a solution? >>> >>> thanks >>> -jacob >>> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php > >
attached mail follows:
"Jed Verity" <jed
veritys.com> wrote:
> There really isn't a great solution for this, that I know of. It's one of
> the few things that makes an argument for ASP over PHP, as far as I'm
> concerned (if you have the luxury of choosing).
How is this an argument for ASP? HTTP has no way of tracking file upload progress, no matter what scripting language you are using.
Luke Welling.
-- PHP and MySQL Web Development by Luke Welling and Laura Thomson http://www.amazon.com/exec/obidos/ASIN/0672317842/tangledwebdesign
attached mail follows:
> How is this an argument for ASP? HTTP has no way of tracking file > upload progress, no matter what scripting language you are using.
Asp has some nice upload components (ATL/COM), which handle the upload progress. Therefor they will be able to put nice upload dialogs to the user. On the other side, the ASP solution is kind of the same as Jed's, so you are right, it isn't an argument.
Grtz Erwin
attached mail follows:
"Cirstoiu Aurel Sorin" <csorin
interakt.ro> wrote in message
news:20020906100433.67662.qmail
pb1.pair.com...
> I tried to use $HTTP_SERVER_VARS['HTTP_HOST'] but the result is null.
I believe your web server has to set that variable. Does phpinfo() show a value for it?
- Steve Yates - Friends don't let friends drive naked.
~ Do you like my taglines? Add them to your messages and ~ laugh through hundreds more by downloading Taglinator ~ at www.srtware.com today!
attached mail follows:
Hi, I have 'test_file.txt' with the contents:
label1 label2 label3 comments name1 name2 name3 name4 name5 name6 This is a comment ...
How can I turn this into a table using PHP?
Thanks, -Peter
attached mail follows:
So, you have a text file with tab delimited values, one row per line yes?
---
<TABLE>
<?
$file = 'path/to/your/file.txt';
$fp = fopen ($file,"r");
$row = 0;
while ($myrow = fgetcsv ($fp, 1000, "\t"))
{
echo "<TR>";
foreach($myrow as $k => $v)
{
if($row == 0) { $v = "<B>{$v}</B>"; }
echo "<TD>{$v}</TD>";
}
echo "</TR>\n";
$row++;
}
fclose ($fp);
?>
</TABLE>
---
Notes:
1. untested code, but should be fine
2. if you're not using a tab to separate your column values, it won't work
3. I'm wrapping the first rows values in <B>tags</B> to give some sort of
heading, hence the need for the $row++ stuff...
4. for more information on it all, check out all the functions used in the
manual, in particular fgetcsv()
Enjoy!
Justin French
on 09/09/02 4:29 PM, Peter (rpete
hotmail.com) wrote:
> Hi,
> I have 'test_file.txt' with the contents:
>
> label1 label2 label3 comments
> name1 name2 name3
> name4 name5 name6 This is a comment
> ...
>
> How can I turn this into a table using PHP?
>
>
> Thanks,
> -Peter
>
>
attached mail follows:
----- Original Message -----
From: "David Yee" <david
coolcomputing.com>
To: <php-general
lists.php.net>
Sent: Sunday, September 08, 2002 10:59 PM
Subject: [PHP] Upgrading PHP on Redhat
> Hi all. What's the correct procedure to upgrade PHP (in this case 4.0.6) on > a Red Hat system? Usually I just get the PHP tarball compile it myself but > for this particular machine I just want to upgrade the Redhat PHP that's on > the system. As you guys know Redhat puts its PHP (and Apache) files in > different locations- e.g. php.ini is in /etc. I looked for some RPMs but I > kept getting failed dependencies when trying to install them- e.g.: > > # rpm -Uvh php-4.1.2-7.2.4.i386.rpm > error: failed dependencies: > php = 4.0.6-15 is needed by php-manual-4.0.6-15 > php = 4.0.6-15 is needed by php-imap-4.0.6-15 > php = 4.0.6-15 is needed by php-ldap-4.0.6-15 > php = 4.0.6-15 is needed by php-mysql-4.0.6-15 > php = 4.0.6-15 is needed by php-odbc-4.0.6-15 > php = 4.0.6-15 is needed by php-pgsql-4.0.6-15 > > I'm not an expert in using rpm so I'm probably doing something completely > wrong??? > > David > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
This is a small script with step by step guide to recompile php from php source tarball, to be full suitable for your distribution (RH 7.3 in my case)
------------ cut here ------- # config_php.sh
# This is simple 11 step guide to recompile PHP from tarball,suitable # for your distro (RedHat 7.3 im my case, users of other distributions/versions should follow steps in comment and create your own script... ) # # (assuming, you have php tarball installed, of course,and that you read the small notes on the end of this file) # # 1: Get you PHP configuration .... Create script, that calls phpinfo() and see its output # in the 3rd line you could see "Configure command". Copy it all down to your clipboard # 2: create shell script config_php.sh, insert there content of prevoiusly stored clipboard, # remove all apostrofs ( ' ), make sure, that everything is on one single line. # (Yes, this is the way, how this script was created) # 3: get your distro CDs, ie that contain RPMs # 4: copy the script config_php.sh in the top level of your php sourcecode tree and run it. # 5: If you see any error like "extension blabla not found" you have to chose if you need it or not # 6: if you need it, just get your distros CD and instal blablabla-devel.versionnumer.machine.rpm # Maybe you should install some other rpms too, to solve the dependencies, # probably it take a lot of disk space # 7: if you don't need the particular extension , edit your config_php.sh script , # deleting from ./configure line "--with-blabla=something" and run your script config_php.sh again # 8: once script ended with no errors, you can do a standard MAKE procedure # 9: make # 10: make install # 11 restart your system.... or just the affected things (db engines, web servers etc) # and finito. This is called ZAVES (zadny velky srani) in czech.... #
# A small note 1. Sometimes make_install may not overwrite your old extensions and create other directory # whwere extensions lives. You must copy the extensions where they should be manually . ie # /usr/lib/2002xxx contain something like extension_name.so and all content of that directory # MUST be copied by hand to /usr/lib/php4
# A small note 2: You MUST have apache-devel installed to have core feature - "apxs", # that allow you to recompile PHP (and any other apache modules) without recompilling apache itself
echo "Redhat PHP configconfig "
./configure i386-redhat-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --included ir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localsta tedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir =/usr/share/info --prefix=/usr --with-config-file-path=/etc --enable-f orce-cgi-redirect --disable-debug --enable-dbg=shared --with-dbg-profi ler --enable-pic --disable-rpath --enable-inline-optimization --with -bz2 --with-db3 --with-curl --with-dom=/usr --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --with-gd --enable-gd- native-ttf --with-ttf --with-gdbm --with-gettext --with-ncurses -- with-gmp --with-iconv --with-jpeg-dir=/usr --with-mm --with-openssl --with-png --with-pspell --with-regex=system --with-xml --with-exp at-dir=/usr --with-zlib --with-layout=GNU --enable-bcmath --enable-d ebugger --enable-exif --enable-ftp --enable-magic-quotes --enable-sa fe-mode --enable-sockets --enable-sysvsem --enable-sysvshm --enable- discard-path --enable-track-vars --enable-trans-sid --enable-yp --en able-wddx --without-oci8 --with-imap=shared --with-imap-ssl --with-k erberos=/usr/kerberos --with-ldap=shared --with-mysql=shared,/usr --wi th-pgsql=shared --with-snmp=shared,/usr --with-snmp=shared --enable-uc d-snmp-hack --with-unixODBC=shared --enable-memory-limit --enable-bcma th --enable-shmop --enable-versioning --enable-calendar --enable-dbx --enable-dio --enable-mcal --enable-mbstring --enable-mbstr-enc-tra ns --with-apxs=/usr/sbin/apxs
-------- cut here ----
I used described steps for my server and it works well and i hope, that it may be useful for somebody else. No warranthy of any kind.
--- Odchozí zpráva neobsahuje viry. Zkontrolováno antivirovým systémem AVG (http://www.grisoft.cz). Verze: 6.0.385 / Virová báze: 217 - datum vydání: 4.9.2002
attached mail follows:
Hi,
> imagejpeg($dst_img);
This actually outputs the image, so your result is not unexpected. Try this instead: imagejpeg($dst_img, "/path/and/filename/to/newfile.jpg");
Regards Joakim Andersson
attached mail follows:
> Hi, > > I want to add one integer to the end of another , which function can I > use?.. > > thanks > > meltem >
attached mail follows:
Hi,
I want to add one integer to the end of another , which function can I use?..
thanks
meltem
attached mail follows:
I'm not shure what you mean, but is it something like this...
$var1 = $var1 + $var2;
regards
Martin Hjort Eriksen
attached mail follows:
On September 9, 2002 03:38, Meltem Demirkus wrote: > Hi, > > I want to add one integer to the end of another , which function can I > use?..
Hi Meltem,
You can use the concatenation operator (.)
<? echo 2 . 4; ?>
Cheers! --zak
attached mail follows:
$string = $int1 . $int2
Meltem Demirkus wrote:
>Hi, > >I want to add one integer to the end of another , which function can I >use?.. > >thanks > >meltem > > > >
attached mail follows:
Hi there.
You could join the two using a period(.) this will concatenate the two strings.
$a = 1; $b = 2; $together = $a.$b; // $together == '12'
regards
-|Scott
> -----Original Message-----
> From: Meltem Demirkus [mailto:mdemirkus
momentum-dmt.com]
> Sent: Monday, September 09, 2002 11:39 AM
> To: php-general
lists.php.net
> Subject: [PHP] combine 2 integer
>
>
> Hi,
>
> I want to add one integer to the end of another , which function can I
> use?..
>
> thanks
>
> meltem
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
If you cannot use square brackets, get the values yourself from $_SERVER['QUERY_STRING']
Alex Shi wrote:
>How to ontain data from a group of checkbox using same name? >For example, in a form there're 6 checkboxes and all named as >"Interesting_Area". I know if put a pairs of square brackets at the >end of the name then in php all the values of them can be ontained. >However, for some reason I cannot use square brackets. Please >help me out if anyone know how to do the trick. THanks! > >Alex > > > >
attached mail follows:
Why cant you use square brackets??
call all your checkboxes the following:
interesting_area[]
Then post it to whatever page, now all the checkboxes that were checked are held in a array (interesting_area)
To see what is contained in the array, do the following:
<?php echo "<pre>"; print_r($_POST[interesting_area]); echo "</pre>"; ?>
From here it depends on what you want to do with the data..
You can loop through the array, using for(), foreach() or while(), or alternatively write a function to manipulate the data.
Hope that helps,
Craig
"Alex Shi" <chpshi
eol.ca> wrote in message
news:20020909001408.28821.qmail
pb1.pair.com...
> How to ontain data from a group of checkbox using same name?
> For example, in a form there're 6 checkboxes and all named as
> "Interesting_Area". I know if put a pairs of square brackets at the
> end of the name then in php all the values of them can be ontained.
> However, for some reason I cannot use square brackets. Please
> help me out if anyone know how to do the trick. THanks!
>
> Alex
>
>
> --
> ---------------------------
> TrafficBuilder Network:
> http://www.bestadv.net/index.cfm?ref=7029
>
attached mail follows:
Thanks for your reply!
I tested $_SERVER['QUERY_STRING']. Seems like it only return the string for get method but not for post. Any idea?
Alex
"Marek Kilimajer" <kilimajer
webglobe.sk> wrote in message
news:3D7C7824.2000004
webglobe.sk...
> If you cannot use square brackets, get the values yourself from
> $_SERVER['QUERY_STRING']
>
> Alex Shi wrote:
>
> >How to ontain data from a group of checkbox using same name?
> >For example, in a form there're 6 checkboxes and all named as
> >"Interesting_Area". I know if put a pairs of square brackets at the
> >end of the name then in php all the values of them can be ontained.
> >However, for some reason I cannot use square brackets. Please
> >help me out if anyone know how to do the trick. THanks!
> >
> >Alex
> >
> >
> >
> >
>
attached mail follows:
Hi there,
I am trying to configure php inside the httpd.conf to allow file uploads inside a special directory with more than 2 MB.
Somehow the syntax is wrong, since I do get the errormsg that there are 2 arguments required. Here is the code:
# special settings for webmailer <Directory "/home/email"> php_flag upload_max_filesize = 50M </Directory>
Does anybody has an idea?
Thanx for any help,
Andy
attached mail follows:
Andy wrote: > Hi there, > > I am trying to configure php inside the httpd.conf to allow file > uploads inside a special directory with more than 2 MB. > > Somehow the syntax is wrong, since I do get the errormsg that there > are 2 arguments required. Here is the code: > > # special settings for webmailer > <Directory "/home/email"> > php_flag upload_max_filesize = 50M > </Directory>
Remove the = and use php_value
php_value upload_max_filesize 2M
HTH Erwin
attached mail follows:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hey, I have not tested this but I think the correct syntax is: php_value upload_max_filesize 50M If the above doesn't work my next bet would be: php_admin_value upload_max_filesize 50M Hope that helps! ~Pauly
On Monday 09 September 2002 07:04 am, andy wrote: > Hi there, > > I am trying to configure php inside the httpd.conf to allow file uploads > inside a special directory with more than 2 MB. > > Somehow the syntax is wrong, since I do get the errormsg that there are 2 > arguments required. Here is the code: > > # special settings for webmailer > <Directory "/home/email"> > php_flag upload_max_filesize = 50M > </Directory> > > Does anybody has an idea? > > Thanx for any help, > > Andy
- --
~Paul Nicholson
Design Specialist
WebPower Design
"The web....the way you want it!"
paul
webpowerdesign.net
"It said uses Windows 98 or better, so I loaded Linux!" Registered Linux User #183202 using Register Linux System # 81891 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org
iD8DBQE9fIZdDyXNIUN3+UQRAjNTAJ47ByGezeKHW/C+wuNEljOyzgMO8QCfU85S saMM2bBQORm8ReXS/K+kIu0= =DqKb -----END PGP SIGNATURE-----
attached mail follows:
Hi All,
I have a CPU intensive PHP application, and would like to stress test it to find out the number of concurrent connections I can have before the response rate from my script is 5 seconds or more.
The tests will initally take place over a 100mbs LAN.
The following are in use: PHP 4.2.3 (using APXS) [also v4.3.0-dev will be tested] Apache 1.3 MySQL 3.23 FreeBSD 4.6-STABLE
Ive thought of writting a load testing script, but Im not after reinventing the wheel.
-- Dan Hardiker [dhardikerstaff.firstcreative.net] ADAM Software & Systems Engineer First Creative Ltd
attached mail follows:
Dear Dan Hardiker,
Once you wrote about "[PHP] Load / Stress Testing": DH> I have a CPU intensive PHP application, and would like to stress test it DH> to find out the number of concurrent connections I can have before the DH> response rate from my script is 5 seconds or more. DH> DH> The tests will initally take place over a 100mbs LAN. DH> DH> The following are in use: DH> PHP 4.2.3 (using APXS) [also v4.3.0-dev will be tested] DH> Apache 1.3 DH> MySQL 3.23 DH> FreeBSD 4.6-STABLE DH> DH> Ive thought of writting a load testing script, but Im not after DH> reinventing the wheel.
There is a benchmarking utlity that comes with apache, called ab.
HTH.
-- Best regards, Leonid Mamtchenkov, RHCE System Administrator Francoudi & Stephanou Ltd.BOFH excuse #159:
Stubborn processes
attached mail follows:
Hi,
Can I put the "selected" option of select box later by using php?
thanks
attached mail follows:
Can you be a bit more clearer with your question?
"Meltem Demirkus" <mdemirkus
momentum-dmt.com> wrote in message
news:011c01c257f0$c4499780$55000083
hiborya...
> Hi,
>
> Can I put the "selected" option of select box later by using php?
>
> thanks
>
>
attached mail follows:
If you want to put the SELECTED option into your select list while you are building the page, use an if statement in the <option...> ... something like this:
<OPTION VALUE=1 <?php if ($this==$that) {echo "SELECTED"; } ?>> Option 1 <OPTION VALUE=2 <?php if ($this==$that2) {echo "SELECTED"; } ?>> Option 2
Peter
At 02:05 PM 9/9/2002 +0300, you wrote: >Hi, > >Can I put the "selected" option of select box later by using php? > >thanks > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php
- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
pbechard
fourthrealm.com
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -
attached mail follows:
Hi,
Is there any function which returns the day , month or year of a date ?
thanks meltem
attached mail follows:
Meltem Demirkus wrote: > Hi, > > Is there any function which returns the day , month or year of a > date ?
You need two functions actually ;-))
use the date() function to generate the day, month or year from a timestamp use the strtotime() function to generate a timestamp from a date
For example
<? echo date( 'd', strtotime( '2002-03-26' ) ); // prints 26 ?>
HTH Erwin
attached mail follows:
Hi Meltem,
The PHP manual is at http://www.php.net/manual/en (mirror sites as well).
-----Original Message-----
From: Meltem Demirkus [mailto:mdemirkus
momentum-dmt.com]
Sent: Monday, September 09, 2002 1:30 PM
To: php-general
lists.php.net
Subject: [PHP] date question
Hi,
Is there any function which returns the day , month or year of a date ?
thanks meltem
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hi all,
I'm assuming this is an installation error, hence the posting to this group.
I've got an html form but when I use the POST method the form variables don't make it to the destination page, when I use the GET method, there's no problem. I've uploaded the test pages to our web servers and the POST and GET methods both work fine, therefore I'm assuming it's a problem with my installation, which is;
PHP 4.2.2 Apache 2.0.40 on Windows XP Pro with as many MS patches as I can find !!.
I've tried this with and without the register_globals, I've also tried setting the "always_populate_raw_post_data" to on by way of a stab in the dark.
The only thing I can think of is something to do with the Apache configuration, but I can't find anythnin in there re this.
The test PHP is;
Form Page:
<html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head>
<form action="b.php" method=post name="bb"> <input name="aa" type="text" value="12" size="10"><br> <input name="a1" type="submit"> </form> <body>
</body> </html>
Target Page:
<html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <?php
echo "POSTED :".$_POST["aa"]."<br>"; echo "GET :".$_GET["aa"]."<br>";
?> <body>
</body> </html>
Any help / pointers will be much appreciated as this is starting to drive me nuts.
Thanks, Howard
attached mail follows:
Hi there,
I don't really see any "serious" problem in your code except that your opening <body> tag is in the wrong place :).
Since I don't have php/apache running on my XP I cannot really tell if this is an installation problem. Anyway, I have php/apache (4.2.2/1.3.26) on Linux and (4.2.2/2.0.40) on Windows 2000 Pro. Your code works whether it's GET or POST.
So, one thing that you might want to try is to install the latest version of PHP. Esp., as the php.net site says that the latest version (4.2.3) is "recommended update for all users of PHP, and Windows users in particular ".
Also, you may want to check previous posts regarding 4.2.2/2.0.40 combination--doesn't look so stable on XP(?)...
- E
"Howard Roscoe" <Howard.Roscoe
databank-uk.com> wrote in message
news:20020909113639.60078.qmail
pb1.pair.com...
> Hi all,
>
> I'm assuming this is an installation error, hence the posting to this
group.
>
> I've got an html form but when I use the POST method the form variables
> don't make it to the destination page, when I use the GET method, there's
no
> problem. I've uploaded the test pages to our web servers and the POST and
> GET methods both work fine, therefore I'm assuming it's a problem with my
> installation, which is;
>
> PHP 4.2.2
> Apache 2.0.40 on Windows XP Pro with as many MS patches as I can find
> !!.
>
> I've tried this with and without the register_globals, I've also tried
> setting the "always_populate_raw_post_data" to on by way of a stab in the
> dark.
>
> The only thing I can think of is something to do with the Apache
> configuration, but I can't find anythnin in there re this.
>
> The test PHP is;
>
> Form Page:
>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
>
> <form action="b.php" method=post name="bb">
> <input name="aa" type="text" value="12" size="10"><br>
> <input name="a1" type="submit">
> </form>
> <body>
>
> </body>
> </html>
>
>
>
> Target Page:
>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
> <?php
>
> echo "POSTED :".$_POST["aa"]."<br>";
> echo "GET :".$_GET["aa"]."<br>";
>
> ?>
> <body>
>
> </body>
> </html>
>
>
> Any help / pointers will be much appreciated as this is starting to drive
me
> nuts.
>
> Thanks,
> Howard
>
>
>
>
>
attached mail follows:
Hi there,
I don't really see any "serious" problem in your code except that your opening <body> tag is in the wrong place :).
Since I don't have php/apache running on my XP I cannot really tell if this is an installation problem. Anyway, I have php/apache (4.2.2/1.3.26) on Linux and (4.2.2/2.0.40) on Windows 2000 Pro. Your code works whether it's GET or POST.
So, one thing that you might want to try is to install the latest version of PHP. Esp., as the php.net site says that the latest version (4.2.3) is "recommended update for all users of PHP, and Windows users in particular ".
Also, you may want to check previous posts regarding 4.2.2/2.0.40 combination--doesn't look so stable on XP(?)...
- E
"Howard Roscoe" <Howard.Roscoe
databank-uk.com> wrote in message
news:20020909113639.60078.qmail
pb1.pair.com...
>Hi all, > >I'm assuming this is an installation error, hence the posting to this group. > >I've got an html form but when I use the POST method the form variables >don't make it to the destination page, when I use the GET method, there's no >problem. I've uploaded the test pages to our web servers and the POST and >GET methods both work fine, therefore I'm assuming it's a problem with my >installation, which is; > > PHP 4.2.2 > Apache 2.0.40 on Windows XP Pro with as many MS patches as I can find >!!. > >I've tried this with and without the register_globals, I've also tried >setting the "always_populate_raw_post_data" to on by way of a stab in the >dark. > >The only thing I can think of is something to do with the Apache >configuration, but I can't find anythnin in there re this. > >The test PHP is; > >Form Page: > ><html> ><head> ><title>Untitled Document</title> ><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ></head> > ><form action="b.php" method=post name="bb"> ><input name="aa" type="text" value="12" size="10"><br> ><input name="a1" type="submit"> ></form> ><body> > ></body> ></html> > > > >Target Page: > ><html> ><head> ><title>Untitled Document</title> ><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ></head> ><?php > > echo "POSTED :".$_POST["aa"]."<br>"; > echo "GET :".$_GET["aa"]."<br>"; > >?> ><body> > ></body> ></html> > > >Any help / pointers will be much appreciated as this is starting to drive me >nuts. > >Thanks, >Howard > > > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________ $B%-%c%j%"%"%C%W$rL\;X$9$"$J$?$N%J%S%2!<%?!<(B MSN $B="?&!&E>?&(B http://career.msn.co.jp/
attached mail follows:
> I've got an html form but when I use the POST method the form > variables don't make it to the destination page, when I use the GET > method, there's no problem. I've uploaded the test pages to our web > servers and the POST and GET methods both work fine, therefore I'm > assuming it's a problem with my installation, which is; > The test PHP is; > > Form Page: > > <html> > <head> > <title>Untitled Document</title> > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859- > 1"> </head> > > <form action="b.php" method=post name="bb"> > <input name="aa" type="text" value="12" size="10"><br> > <input name="a1" type="submit"> > </form> > <body>
Try adding another <input name...etc>. We've had a problem where we *always* lost the first POST variable.
Grtz Erwin
attached mail follows:
[snip]
I would like to be able to sum up a collumns values already in
MySQL. The following query will sum up all values of the column
'id':
SELECT
idsum:=(IFNULL(
idsum, id)+id), id FROM yourtable;
Now a question to the PHP/MySQL experienced: Why does this type of query not work in combination with PHP? I am using query above as $query and do the following standard procedure: [/snip]
Good point! Now as to your question, try this...
SELECT
idsum:=(IFNULL(
idsum, id)+id) AS idsum, id FROM yourtable;
When you output your query info output the value as $row->idsum;
HTH!
Jay
attached mail follows:
[snip] if ($update_type == update_Williams) { mysql_query("INSERT INTO events ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES (\'$cookiewho\', \'$add_Williams\',\'\',\'$row_num\',\'$last_update\')", $sql4) or die ("could not do update"); } [/snip]
Try this
if ($update_type == update_Williams) { mysql_query("INSERT INTO events (user, detaildesc, index, reference, date_added) VALUES ('" . $cookiewho . "', '" . $add_Williams . "', '', '" . $row_num . "', '" . $last_update . "')", $sql4) or die ("could not do update"); }
First of all, seems there is extra stuff in the query that shouldn't be there (what is $sql4?) and you may have parentheses out of place.
HTH!
Jay
attached mail follows:
If you read: http://www.php.net/manual/en/function.mysql-query.php You will see what $sql4 can be.
My guess would be he is connected to 2 or more different databases, and this is specifiying which one to execute the query on. -Brad
> [snip] > if ($update_type == update_Williams) { > mysql_query("INSERT INTO events ('user', 'detaildesc', 'index', 'reference', > 'date_added') VALUES (\'$cookiewho\', > \'$add_Williams\',\'\',\'$row_num\',\'$last_update\')", $sql4) > or die ("could not do update"); > } > [/snip] > > Try this > > if ($update_type == update_Williams) { > mysql_query("INSERT INTO events (user, detaildesc, index, reference, > date_added) > VALUES ('" . $cookiewho . "', '" . $add_Williams . "', '', '" . $row_num . > "', '" . $last_update . "')", $sql4) > or die ("could not do update"); > } > > First of all, seems there is extra stuff in the query that shouldn't be > there (what is $sql4?) and you may have parentheses out of place. > > HTH! > > Jay > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
Hi,
I need suggestion regarding handling multipart/mixed mail with attachment and embedded image, I need to forward this mail using php, what can be best and safe way !!!
Is there any class, example on the net !!!
Thanks in advance ....
Regards, Santosh Pasi
attached mail follows:
Anjali,
Use a BUTTON type element, and some javascript:
<INPUT TYPE="button" VALUE="Cancel & Return to menu" ONCLICK="self.location=menu.ihtml'">
Peter
At 01:57 PM 9/8/2002 -0700, you wrote: >hello, > >i dont know how to redirect a page... i mean i want to >have the effect of submit button without clicking on >the submit button. > >thank you >anjali > >__________________________________________________ >Do You Yahoo!? >Yahoo! Finance - Get real-time stock quotes >http://finance.yahoo.com > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php
- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
pbechard
fourthrealm.com
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -
attached mail follows:
I am having problems with my sessions.
This function registered my username password and userid in the session no problem.
function login_chk($username, $password){ global $user_id; $user_res = mysql_query("SELECT * FROM fan_users WHERE name = '$username' and password ='$password'") or die("Line 21 ".mysql_error()); $count = mysql_num_rows($user_res); if($count ==1){ $user_data = mysql_fetch_row($user_res); $user_id = $user_data[0]; if(!session_is_registered("user_id")) session_register("user_id"); if(!session_is_registered("username")) session_register("username"); if(!session_is_registered("password")) session_register("password"); $ok = 2; } else $ok =1;
return $ok; }//E-OF login_chk()
But this function will not register the details in the session. It registeres the variable but puts an ! before it.
function get_data($user_id){ global $user_id; $data_res = mysql_query("SELECT t.*, l.* FROM fan_teams as t, fan_league as l WHERE t.league_id = l.lid AND user_id =$user_id") or die("Line 93 ".mysql_error()); $count = mysql_num_rows($data_res); if($count != 1){ setup_team_html($user_id); exit(); } else{ $data = mysql_fetch_row($data_res); if(!session_is_registered("data")) session_register("data"); }
}//E-OF get_data($user_id)
The $data array is definatly an array as I have done foreach echo tests and it dumps the information i am needing. but it won't put it in the session.
Would it have anything to do with me testing it on my windoze box?
Cheers John Wards SportNetwork.net
attached mail follows:
hmmmm I dunno why but if I returned $data from my function and registered it out side the function it works fine and yes my session_start() is above my function
John
> I am having problems with my sessions. > > This function registered my username password and userid in the session no > problem. > > function login_chk($username, $password){ > global $user_id; > $user_res = mysql_query("SELECT * FROM fan_users WHERE name = '$username' > and password ='$password'") or die("Line 21 ".mysql_error()); > $count = mysql_num_rows($user_res); > if($count ==1){ > $user_data = mysql_fetch_row($user_res); > $user_id = $user_data[0]; > if(!session_is_registered("user_id")) session_register("user_id"); > if(!session_is_registered("username")) session_register("username"); > if(!session_is_registered("password")) session_register("password"); > $ok = 2; > } > else $ok =1; > > return $ok; > }//E-OF login_chk() > > But this function will not register the details in the session. It > registeres the variable but puts an ! before it. > > function get_data($user_id){ > global $user_id; > $data_res = mysql_query("SELECT t.*, l.* FROM fan_teams as t, fan_league as > l WHERE t.league_id = l.lid AND user_id =$user_id") or die("Line 93 > ".mysql_error()); > $count = mysql_num_rows($data_res); > if($count != 1){ > setup_team_html($user_id); > exit(); > } > else{ > $data = mysql_fetch_row($data_res); > if(!session_is_registered("data")) session_register("data"); > } > > }//E-OF get_data($user_id) > > The $data array is definatly an array as I have done foreach echo tests and > it dumps the information i am needing. but it won't put it in the session. > > Would it have anything to do with me testing it on my windoze box? > > Cheers > John Wards > SportNetwork.net > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hi!
I'm working on a simple file upload form here, where the user can upload large zip files containing images to be added to the selected image gallery...
However, uploading large files seems to be a little problem.. Whenever I upload large files (the file I'm experimenting with is about 8MB) both the $_POST and the $_FILES-arrays become completely empty.
In my post form I have POST_MAX set to 107374182400, and in a .htaccess-file placed in the same directory as the upload scripts I have the following lines; php_flag upload_max_filesize 107374182400 php_flag max_file_size 107374182400 php_flag post_max_size 107374182400
...so, uploading small files works perfectly, but large files just empties the superglobal arrays... Is there any other settings I have to change for this to work?
-- Trond Arve Nordheim - "This message is ROT13-encrypted twice for extra security."
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org
iD8DBQE9fKnwkxDy2DdgOLoRAoY3AJwNcyWAtHMkXMlHE+2egCuh9FLs4gCdF8pI tRXjhD8sPGSFnQTv6cXri5k= =J0JN -----END PGP SIGNATURE-----
attached mail follows:
I need the sablot extension Can someone send me the dll file? sablot.dll & LIBEXPAT.dll Thank's
I can't log in Internet so please send me by email
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]