|
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 Aug 03 2001 - 11:38:40 CDT
php-general Digest 3 Aug 2001 16:38:40 -0000 Issue 794
Topics (messages 61043 through 61154):
(//// <=== huh??)
61043 by: Gerard Samuel
61045 by: David Robley
61046 by: ReDucTor
huh??
61044 by: Gerard Samuel
61095 by: Renze Munnik
Re: html parsing question
61047 by: mike cullerton
61075 by: Richard Lynch
61089 by: Dave
How to create session??
61048 by: Balaji Ankem
61097 by: elias
61098 by: Renze Munnik
Re: Adopt A Newbie (ME)
61049 by: B. van Ouwerkerk
61050 by: Tyrone Mills
Re: Get when it should be Post
61051 by: Richard Lynch
Re: Multiple search options...
61052 by: Richard Lynch
Re: PHP Extension Documentation?
61053 by: Richard Lynch
Re: detecting mysql
61054 by: Richard Lynch
Re: SQL syntax error in PHP script. dunno what's wrong
61055 by: Richard Lynch
61103 by: Werner Stuerenburg
61126 by: mike cullerton
61136 by: Werner Stuerenburg
Re: newbie question - apache-win2K-authentication
61056 by: Richard Lynch
Re: php_value and virtualhost
61057 by: Richard Lynch
Re: shtml or php ??
61058 by: Richard Lynch
61069 by: Richard Lynch
61119 by: Dave.O
Re: How to Compare dates?
61059 by: Richard Lynch
61062 by: Richard Lynch
Re: mail - sendmail
61060 by: Richard Lynch
Re: Emailing the results of form entry NOT working
61061 by: Richard Lynch
Re: Mysql join and aliasing with mysql_fetch_object()
61063 by: Richard Lynch
Re: Syntax
61064 by: Richard Lynch
61153 by: BRACK
Re: <----- BEING AN ASS CLICK HERE NOT ABOVE!!!!!
61065 by: Richard Lynch
Re: can't get gettext() to work!
61066 by: Richard Lynch
61139 by: Colin Viebrock
Re: Best way to use ocilogoff and ocifreestatement?
61067 by: Richard Lynch
Re: UDP Port listening, can it be done?
61068 by: Richard Lynch
Re: PHPTriad users
61070 by: Richard Lynch
Re: Hiding Folder Directories from public while still...
61071 by: Richard Lynch
Re: ULTIMATE TUTORIAL? (where)
61072 by: Richard Lynch
Re: timing functions / debug
61073 by: Richard Lynch
Re: ? about PHP includes
61074 by: Richard Lynch
61090 by: Christian Reiniger
Re: GET/POST "name=value" query var convention?
61076 by: Richard Lynch
Re: Phone Number #s Only?
61077 by: Richard Lynch
61102 by: James Holloway
61133 by: mike cullerton
Re: Netscape Enterprise Server
61078 by: Richard Lynch
Re: New lists (was [PHP] Attitude of B van Ouwerkerk)
61079 by: Richard Lynch
61083 by: Richard Lynch
61146 by: mike cullerton
61149 by: George Pitcher
Re: another REGEX question
61080 by: Richard Lynch
61088 by: Christian Reiniger
Re: php
61081 by: Richard Lynch
Re: PHP_SELF
61082 by: Richard Lynch
61129 by: Chris Worth
Re: Hmmm?
61084 by: Richard Lynch
61092 by: Dave
Re: Replacing template variables with values?
61085 by: Richard Lynch
Re: YA Session Problem
61086 by: Richard Lynch
61143 by: Thomas Deliduka
Re: MySql help #1
61087 by: elias
Re: web traffic report
61091 by: Tim
61138 by: Andreas D. Landmark
Retriving data from http request,
61093 by: Huston
Messevorbereitung - Übersetzungen
61094 by: Die Übersetzer
Re: Oh and one more thing
61096 by: elias
References: & in front of functionnames
61099 by: Rolf Rensaa
61106 by: Tim
Re: Light bulbs (was attitude of ....)
61100 by: Jon Haworth
Re: mySQL Autoincrement Field
61101 by: Werner Stuerenburg
Re: How to add an excel file directly to MySQL database using PHP?
61104 by: James Holloway
61134 by: Chris Lee
61140 by: James Holloway
mail the contents of an array
61105 by: Geoffrey Makstutis
61109 by: Werner Stuerenburg
61110 by: Tim
61116 by: B. van Ouwerkerk
61117 by: Geoffrey Makstutis
61118 by: Tim
Re: FAQ
61107 by: Werner Stuerenburg
Re: Very strange problem with session files
61108 by: Jarek
stop a file called foo.bar
61111 by: void
61112 by: Tim
61127 by: Matt Greer
PHP Manual in PDF Format
61113 by: Pere Vineta
61137 by: Andreas D. Landmark
61142 by: Augusto Cesar Castoldi
61145 by: George Pitcher
bind() function always reporting Invalid argument.
61114 by: William Bailey
61122 by: William Bailey
PHP Grammar Definition
61115 by: José León Serna
Re: How can I make a Loading... screen?
61120 by: Renze Munnik
[php] undefined offset?
61121 by: Johnny Nguyen
61130 by: Chris Lee
again
61123 by: Eduardo Kokubo
61125 by: Miles Thompson
61132 by: Eduardo Kokubo
PHP developers needed
61124 by: Jack Sameron
Re: How to compile PHP with IMAP option?
61128 by: Christopher Cheng
Minutes between tow dates
61131 by: Augusto Cesar Castoldi
PayFlow Pro Problems
61135 by: Graham Wooden
php date bug ?
61141 by: Steve Brett
61144 by: Johnny Nguyen
61147 by: Steve Brett
61148 by: Johnny Nguyen
61152 by: Tom Carter
Error using databases
61150 by: Jorge Fernando Tamez Seceñas
61151 by: Steve Brett
Left Join extremely slow (MySQL)
61154 by: James Crowley
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:
In my script that puts out a form I have a drop down list which include ==>
echo "<option>$Education</option>\n";
echo "<option>Bachelor's Degree</option>\n";
It uses a $PHP_SELF target. After the form is submitted, on the new
page, in the textbox I have Bachelor\\\'s Degree getting outputed by
$Education and the more I submit the form the more "\" I get.
Any ideas as to how to clean this up?
Thanks
attached mail follows:
On Fri, 3 Aug 2001 14:07, Gerard Samuel wrote:
> In my script that puts out a form I have a drop down list which include
> ==> echo "<option>$Education</option>\n";
> echo "<option>Bachelor's Degree</option>\n";
>
> It uses a $PHP_SELF target. After the form is submitted, on the new
> page, in the textbox I have Bachelor\\\'s Degree getting outputed by
> $Education and the more I submit the form the more "\" I get.
>
> Any ideas as to how to clean this up?
> Thanks
Stripslashes()
Also see the magic_quotes_gpc setting in your ini file
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIASkiier: Someone who pays an arm and a leg to break them.
attached mail follows:
$var = stripslashes($var);
----- Original Message -----
From: "Gerard Samuel" <trini0
optonline.net>
To: "PHP" <php-general
lists.php.net>
Sent: Friday, August 03, 2001 2:37 PM
Subject: [PHP] (//// <=== huh??)
> In my script that puts out a form I have a drop down list which include
==>
> echo "<option>$Education</option>\n";
> echo "<option>Bachelor's Degree</option>\n";
>
> It uses a $PHP_SELF target. After the form is submitted, on the new
> page, in the textbox I have Bachelor\\\'s Degree getting outputed by
> $Education and the more I submit the form the more "\" I get.
>
> Any ideas as to how to clean this up?
> Thanks
>
>
>
> --
> 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:
In my script that puts out a form I have a drop down list which include ==> echo "<option>$Education</option>\n"; echo "<option>Bachelor's Degree</option>\n";
It uses a $PHP_SELF target. After the form is submitted, on the new page, in the textbox I have Bachelor\\\'s Degree getting outputed by $Education and the more I submit the form the more "\" I get.
Any ideas as to how to clean this up? Thanks
attached mail follows:
On Fri, Aug 03, 2001 at 12:47:29AM -0400, Gerard Samuel wrote:
> In my script that puts out a form I have a drop down list which include ==>
> echo "<option>$Education</option>\n";
> echo "<option>Bachelor's Degree</option>\n";
>
> It uses a $PHP_SELF target. After the form is submitted, on the new
> page, in the textbox I have Bachelor\\\'s Degree getting outputed by
> $Education and the more I submit the form the more "\" I get.
>
> Any ideas as to how to clean this up?
> Thanks
>
>
>
>
> --
> 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
stripslashes(...);
http://www.php.net/manual/en/function.stripslashes.php
--* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renze
datalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««
attached mail follows:
on 8/2/01 5:30 PM, Chuck Barnett at xobyte
bellsouth.net wrote:
> Hi I have a question about parsing a page on another server to grab some > headlines. > > I want to search down the page until I find a string "-headlines-" then I > want to grab everything between the next pair of <table></table> tags. > > Anyone have a quick solution?
i would check out http://php.net/strpos
> > Thanks, > Chuck > >
-- mike cullerton
attached mail follows:
> Hi I have a question about parsing a page on another server to grab some > headlines. > > I want to search down the page until I find a string "-headlines-" then I > want to grab everything between the next pair of <table></table> tags.
<?php # Untested code: $url = 'http://www.php.net', 'r'; $http = fopen($url, 'r') or die("$url not available."); $html = ''; while (!feof($http)){ $html .= fread($http, 1000000); } $parts = explode('-headlines-', $html); $headlines = $parts[1]; $parts = explode('<table>', $headlines); $table = $parts[1]; $parts = explode('</table>', $table); $table = $parts[0]; echo htmlentities($table); ?>
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
below is a snippet from a larger code used to capture a daily output graphic file from a site... I put your requirements into it and removed a lot of superfluous stuff, but it is not set to capture text spanning more than one line, but you should be able to modify it accordingly if you can follow the logic.
>on 8/2/01 5:30 PM, Chuck Barnett at xobyte
bellsouth.net wrote:
>
>> Hi I have a question about parsing a page on another server to grab some
>> headlines.
>>
>> I want to search down the page until I find a string "-headlines-" then I
>> want to grab everything between the next pair of <table></table> tags.
>>
>> Anyone have a quick solution?
>
>i would check out http://php.net/strpos
>
<?PHP /* HTML Content Grabber
no copyright */ $file_url = "http://www.somewhere.com/"; $grabbed_file = file($file_url); if ($grabbed_file[0]) { for ($i = 0; $i <= count($grabbed_file) - 1; $i++) { if($returnstr = strstr ($grabbed_file[$i], '-headlines-')) { $trim = substr ($returnstr, strpos($returnstr, '<table>')+7,strpos($returnstr, '</table>')-(strpos($returnstr, '<table>')+7)); }else{ # not in this line, keep searching } } } else { # Something went wrong } ?>
attached mail follows:
Hi! dearest friend, how to create session while login and hoe to end session after pressing logout button.
Thanks in advance.
Regards -Balaji
- text/plain attachment: Wipro_Disclaimer.txt
attached mail follows:
Please post in text format.
session_start();
if (isset($login)) { session_register("name", "pwd"); $name=.... $pwd = .... } else if (isset($logout)) { session_unregister("name"); session_unregister("pwd"); }
-
"Balaji Ankem" <balaji.ankem
wipro.com> wrote in message
news:00db01c11be2$57e26c20$1702910a
wipro.com...
Hi! dearest friend,
how to create session while login and hoe to end session after pressing
logout button.
Thanks in advance.
Regards -Balaji
attached mail follows:
On Fri, Aug 03, 2001 at 11:35:48AM +0530, Balaji Ankem wrote: > Hi! dearest friend, > how to create session while login and hoe to end session after pressing logout button. > > Thanks in advance. > > Regards > -Balaji
> --
> 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
The manual will answer all of your questions. At least these ones. Eg. take a look at:
http://www.php.net/manual/en/function.session-start.php http://www.php.net/manual/en/function.session-destroy.php (http://www.php.net/manual/en/function.session-end.php)
And for the overall impression:
http://www.php.net/manual/en/ref.session.php
This should be enough to get you started.
--* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renze
datalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««
attached mail follows:
>I've was helping him offlist with php/mysql yesterday - he seems to have it >installed now. All he needs to do now is learn php, and mysql, and >courtesy. > >Shouldn't take more than another thousand or two messages on the list...
He might run to the closest bookstore (like Amazon) and order the book "MySQL" written by Paul DuBois.. it's a great book to learn how to use MySQL and connect to it using PHP.. Perl.. and other ways.. Tutorial included..
Bye,
B.
attached mail follows:
I agree, IMHO that is the best MySQL book there is. That and the manual are all you are likely to need.
-----Original Message-----
From: B. van Ouwerkerk [mailto:bvo
atz.nl]
Sent: Thursday, August 02, 2001 10:55 PM
To: php-general
lists.php.net
Subject: RE: [PHP] Adopt A Newbie (ME)
>I've was helping him offlist with php/mysql yesterday - he seems to have it >installed now. All he needs to do now is learn php, and mysql, and >courtesy. > >Shouldn't take more than another thousand or two messages on the list...
He might run to the closest bookstore (like Amazon) and order the book "MySQL" written by Paul DuBois.. it's a great book to learn how to use MySQL and connect to it using PHP.. Perl.. and other ways.. Tutorial included..
Bye,
B.
-- 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:
Is it maybe one of those where you mix&match your GET/POST?
<FORM ACTION=foo.php?x=1 METHOD=POST>
Try moving the ACTION before the METHOD. No, it shouldn't matter...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Christian <c_hope
smartchat.net.au> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Wednesday, August 01, 2001 1:00 PM Subject: Get when it should be Post
> Hi PHPers, > > I've been having a problem of late that some of my forms > which are set to method=post are not submitting by post by via get. > $REQUEST_METHOD reads get > $HTTP_POST_VARS is not set but $HTTP_GET_VARS is .. > > What could be causing this ?? > > Thanx, > Christian >
attached mail follows:
> Now I can do one or two of these seperate but can anyone suggest a logic to > take to allow someone to say: I'd like to search for Computer Programmers > between 1 and 3 years experience in Kitchener and that have these keywords. > > But the next person may come and say I want Computer Programmers with 2 > years experience in any city and any keywords...
MySQL: create table programmer( programmer_id int(11) auto_increment not null primary key, category int(4), experience int(2), location varchar(255), name text, email text );
create table category( category_id int(11) auto_increment not null primary key, category varchar(255) ); insert into category(category) values('Computer Programmer');
insert into programmer(category, experience, location, name, email)
values(1, 5, 'Chicago', 'Richard Lynch', 'ceo
l-i-e.com');
create table skill( skill_id int(11) auto_increment not null primary key, skill varchar(255) ); insert into skill(skill) values('PHP'); insert into skill(skill) values('MySQL'); insert into skill(skill) values('PostgreSQL');
create table programmer_skill( programmer_id int(11), skill_id int(11) ); insert into programmer_skill(programmer_id, skill_id) values(1, 1); insert into programmer_skill(programmer_id, skill_id) values(1, 2); insert into programmer_skill(programmer_id, skill_id) values(1, 3);
PHP: $query = "select id, name, email, (0 "; if (isset($category)){ $query .= " + category = $category "; } if (isset($experience)){ $query .= " + experience between $experience[0] and $experience[1] "; } if (isset($location)){ $query .= " + location = '$location' "; } if (isset($skills)){ $query .= " + count(skills.id) "; } $query .= ") as score "; $query .= " from programmer, programmer_skill "; $query .= " where programmer.programmer_id = programmer_skill.programmer_id "; $query .= " and score > 0 "; $query .= " order by score desc ";
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
Some of Rasmus' talks run through creating your own extension one step at a time...
If that wasn't what he did at TLUG, check here: http://conf.php.net
There used to be a apidoc.txt file or somesuch in the distro that 'splained how to add C functions to PHP. May or may not still be there, may or may not be out of date. YMMV.
You could always post specific questions here. Then I'll learn from your mistakes :-)
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Darryl Sokoloski <darryl
elesi.org> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Thursday, August 02, 2001 1:53 AM Subject: PHP Extension Documentation?
> I'm working on a custom PHP extension in C were I work which is going well > but I can't seem to find any documentation about the subject
php.net. > Anyone know of such a manual? A PHP/Zend C API document of some sort - from > an extension developer's point-of-view? > > I've tried searching news.php.net, but the search is down - sorry if this > question has already been asked. > > Rasmus r0x! (saw you
TLUG) Learned many PHP "secrets"... Thanx! > > Darryl. > >
attached mail follows:
> > Does anybody here know how to detect with php whether mysql is installed > or > > not.. ? Thanks, I haven't been able to get anything from the other lists..
$mysql_installed = function_exists('mysql_connect');
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> insert into test values (0,''; DELETE FROM test; ',1); > > and got this error > > ERROR 1064: You have an error in your SQL syntax near '' at line 1 > > trying other variations either caused similar errors or added rows to my > table. > > is it possible to sneak in a command in this manner?
I believe: Earlier versions of PHP/MySQL would do this? Other databases (Oracle?) would do this?
I was messing with the same question with PostgreSQL yesterday (?) and couldn't hack it either...
YMMV
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
>> insert into test values (0,''; DELETE FROM test; ',1); >> ERROR 1064: You have an error in your SQL syntax near '' at line 1
what about
insert into test values (0,'\'; DELETE FROM test; ',1);
the character ' is used to denote the beginning and the end of a field value. If you have this character within the value, you will have to escape it. It's as simple as that.
-- Herzlich Werner Stuerenburg_________________________________________________ ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409 http://pferdezeitung.de
attached mail follows:
on 8/3/01 2:49 AM, Werner Stuerenburg at ws
art-quarter.com wrote:
>>> insert into test values (0,''; DELETE FROM test; ',1); >>> ERROR 1064: You have an error in your SQL syntax near '' at line 1 > > what about > > insert into test values (0,'\'; DELETE FROM test; ',1);
nope. this just adds a row to the table with
'; DELETE FROM test;
in the 2nd field
-- mike cullerton
attached mail follows:
mike cullerton schrieb am Freitag, 3. August 2001, 15:59:03:
> on 8/3/01 2:49 AM, Werner Stuerenburg at ws
art-quarter.com wrote:
>>>> insert into test values (0,''; DELETE FROM test; ',1); >>>> ERROR 1064: You have an error in your SQL syntax near '' at line 1 >> insert into test values (0,'\'; DELETE FROM test; ',1);
> nope. this just adds a row to the table with
> '; DELETE FROM test;
> in the 2nd field
I thought that's what you wanna do. It certainly is what you issue in sql.
INSERT INTO table VALUES (...);
So you wanna do first
insert into test values (0,'');
and then
DELETE FROM test WHERE id = 1;
or what? Leaves me puzzled as to what you want.
-- Herzlich Werner Stuerenburg_________________________________________________ ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409 http://pferdezeitung.de
attached mail follows:
If you are not using ISAPI, you are using "CGI" -- and you are using Action in your httpd.conf file.
The CGI version simply cannot do HTTP authentication from within PHP.
You'll have to do your HTTP authentication using .htaccess files.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Shari Fletcher <sfletcher
terrace.com> Newsgroups: php.general To: PHP List <php-general
lists.php.net> Sent: Thursday, August 02, 2001 9:42 AM Subject: newbie question - apache-win2K-authentication
> Hi all --- > > I'm having some trouble getting basic authentication working. Either that > or my privileges are screwed up, or something. > > I am running Apache on Windows 2000 and PHP4. I've searched newsgroups, > this mailing list, various FAQs and the manual, I think my eyes are > crossing. I've got a feeling either its so simple I can't see it, or its > not possible. I'm hoping someone has a quick idea about what's going on. > > Here's my story: > > My authentication script is from this example. > > If I leave it as is, I can authenticate and I receive the error: > > malformed = header from script. Bad header=3DHTTP/1.0 401 Unauthorized: > =e:/php/php.exe > > If I change the unauthorized header to this: header("Status: 401 > Unauthorized"); I cannot authenticate, though the user id and password is > correct. > > > Thanks in advance ! > Shari > > > My script: > > if (!isset($PHP_AUTH_USER)) { > > // If empty, send header causing dialog box to appear > header('WWW-Authenticate: Basic realm="securedf"'); > header('HTTP/1.0 401 Unauthorized'); > echo 'Authorization Required.'; > exit; > } > > // If not empty, display values for variables > > else { > > echo " > <P>You have entered this username: $PHP_AUTH_USER<br> > You have entered this password: $PHP_AUTH_PW<br> > The authorization type is: $PHP_AUTH_TYPE</p> > "; > } >
attached mail follows:
> i make several virtualhost in my httpd.conf > in each one, i put include_path, auto_preppend_file and auto_append_file > directive. > these directives are differents for each virtualhost. > > My trouble, is that when i try to see an HTML page, PHP try to parse it and > to add preppend and append_file which are made in PHP.
You probably have something not unlike one of these:
AddType application/x-httpd-php htm
in your httpd.conf file
That runs all .htm files through PHP. If you don't want that, get rid of the htm bit
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> Which is the best language to use, php or shtml, I use only a couple of SSI
Well, SSI has like, 5 things it can do, and PHP has about 50,000.
I guess you have to decide which is better for yourself.
> in one of my shtml i use the <!--#exec cgi="my.cgi"--> command, but how do > I run an external .cgi script from php, I have looked at many of the > commands such as include(), system(), passthru() , but cant find away to do > it. Can someone help ??
exec('/full/path/to/my.cgi', $results, $errorcode); while (list(,$line) = each($results)){ echo $line, "<BR>\n"; } if ($errorcode){ echo "OS Error: $errorcode. Usually path/permissions. Use 'man errno' to check<BR>\n"; }
> Is it best for me to leave it in shtml as I have also discovered that SSI > will not parse inside an html section in php.
When Apache gets a request, it looks at the extension to figure out to whom to hand it off. It can't hand it off to both PHP and SSI at once. Allegedly Apache 2.0 would allow "stacked handlers" where PHP would process the file, then SSI could process the output from that, then Apache gets the answer back...
> Which of these shtml, or php > uses more resources on the server ?
PHP probably uses more resources for its 50,000 functions than SSI for its 5.
Your biggest expense though is firing up my.cgi with exec() in either case, and I'm willing to bet that you could eventually re-code whatever is inside of my.cgi using just PHP with no exec() and then you'd be using less resources.
> Which is the best solution to my > problem ??
PHP does everything SSI does, and 49,995 things more. :-)
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> Can anyone help me with this, I am using apache and assume that this virtual > command should work, am I best to leave it in shtml or should I change to > php as I am using php more and more ??? Please can somebody help me
There's using Apache with PHP as a Module, and there's using Apache with PHP as a CGI.
If your httpd.conf file has something like: AddModule php LoadModule php Handler application/x-httpd-php php (and not with comment character # in front of them) you are using Module
Conversely, if you httpd.conf file has stuff like: Action application/x-httpd-php php Alias php /path/to/php in it, you are using CGI.
Actually, I'm betting <?php phpinfo();?> will tell you if you are using PHP as Module or CGI.
If it's CGI, virtual will not work, as Rasmus said.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
I know the virtual command works on my hosting company, and yes it appears that my php is run as a cgi. Can I get php as a module on my windows based development machine so that I can fully test scripts ??
I also found that when using the virtual command on my host that the perl script didnt work properly, where as under SSI it does. Still no wiser at the moment
Dave
----- Original Message -----
From: "Richard Lynch" <ceo
l-i-e.com>
To: <php-general
lists.php.net>
Sent: Friday, August 03, 2001 4:01 AM
Subject: Re: [PHP] shtml or php ??
> > Can anyone help me with this, I am using apache and assume that this
> virtual
> > command should work, am I best to leave it in shtml or should I change
to
> > php as I am using php more and more ??? Please can somebody help me
>
> There's using Apache with PHP as a Module, and there's using Apache with
PHP
> as a CGI.
>
> If your httpd.conf file has something like:
> AddModule php
> LoadModule php
> Handler application/x-httpd-php php
> (and not with comment character # in front of them)
> you are using Module
>
> Conversely, if you httpd.conf file has stuff like:
> Action application/x-httpd-php php
> Alias php /path/to/php
> in it, you are using CGI.
>
> Actually, I'm betting <?php phpinfo();?> will tell you if you are using
PHP
> as Module or CGI.
>
> If it's CGI, virtual will not work, as Rasmus said.
>
> --
> WARNING richard
zend.com address is an endangered species -- Use
> ceo
l-i-e.com
> Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
>
>
>
> --
> 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:
> if ( ( mysql_result($db_result,$db_record,'order_date')==0) ) ) {
I count three ('s and four )'s
That's a parse error. Your ( and ) have to "match up"
> Parse error is the result in all these attempts...with quotes, single or double, > no quotes, zero or multiple zeros...by the way the timestamp returns all those > zeros so I was being specific....
The quotes and 0's are irrelevant until you get the ()'s right.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> Can someone tell me how to properly compare the value returned from the > db to see if it is blank ?
Depending on how you got it in there, I suspect the value from the db could be:
NULL 0000-00-00 00:00:00 0
You may need to test if the value is == '' to catch the NULL case.
Everything else has already been covered, I think.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> I wanted to use the full SMTP-Protocol including "MAIL FROM:" and "RCPT > TO:", and therefore I can't use mail().
Okay.
> I have written a perl-script, I call from PHP, that connects to the
You could have done this from PHP you know...
Using PHP to fire up Perl is not real efficient.
Also, there are innumerable PHP SMTP scripts out there you could just steal instead of writing your own...
Manuel Lemos' UppderDesign.com class object repository has one that's popular.
Even does attachments for you.
> SMTP-server directly and this worked fine - until a server went down, and my > ISP's-SMTP-Server told my perl-script, that the emailaddress is not routable. > If the mail had been in a mailqueue, no problem - after a few hours it would > be up again!
I think there's some command you can send to SMTP just like MAIL FROM: and RCPT TO: that tells it to queue stuff instead of doing it now. I have no idea what it is that you have to send though... If you find out, tell me. I need it to. :-)
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> <html> > </html> > > <? > if(!$submit) { > header("Location: http://www.imsltd.com/feedback.html");
Why redirect? That's just going to infinitely send you back to the FORM above, no?...
Just put exit; here.
> }
> $to = "support
imsltd.com";
> $subject = "Feedback";
> $mail_body = "Feedback From Your Site\n";
> $mail_body .= "Sender's Name: $name\n";
> $mail_body .= "Sender's E-Mail: $email\n";
> $mail_body .= "Feedback: $feedback\n\n";
> $mail_headers = "From: My Web Site <> \n";
> $mail_headers .= "Reply-To: $sender_email\n\n";
> mail($mail_to, $mail_subject, $mail_body, $mail_headers);
Everywhere you have \n you should have \r\n to be RFC-compliant. Most Un*x boxes won't care. Windows boxes will puke on you.
Your subject is $subject, not $mail_subject as well, and B. already pointed out to/mail_to
attached mail follows:
> select tableA.*, tableB.* from tableA, > left join tableB ON tableA.keyfield = tableB.keyfield > > When I then try to access the column "keyfield", after using
select tableA.keyfield as mykeyfield, tableA.*, tableB.* ...
Unless you actually need *EVERY* field, do *NOT* use tableA.*, tableB.*
Every piece of data you ask for takes time and resources in MySQL and PHP.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> if (isset(...)) { > .. > } > else if (isset(...)) { > .. > } > else if (isset(...)) { > .. > }
No.
That is very different from his original logic.
I also am betting that there is a missing quote/apostrophe/paren or other in the code the first time with {}, as the original code was fine -- what bits were shown.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
Thank you everyone who replied on my treat "Syntax" There was just a typo and problem is solved
Youri <>< <>< <>< <>< God is our provider ><> ><> ><> ><> http://www.body-builders.org
attached mail follows:
http://www.stupeedstudios.f2s.com/probs.gif
You turned on browscap, but didn't snag a valid browscap.ini file anywhere, and the default one with PHP is blank (I think) or maybe you just didn't configure php.ini to find the good browscap.ini file where you put it...
Or, wait...
Line 8206 is a pretty big browscap.ini file. What's on line 8206 of browscap.ini, and why is it broken is what you should be asking yourself right about now.
PS Did you really need to make that a GIF instead of typing in the error message for us?...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> setlocale(LC_ALL, '');
> putenv('LANG=fr'); /* <<< changed here */ > setlocale(LC_ALL, '');
WILD GUESS ALERT!
My gut says you need setlocale(LC_ALL, 'fr') or similar in the French one...
And maybe even 'en' for the English one.
Even if the docs say you don't.
There was another thread recently about setlocale() and the second argument and what it had to look like depending on some /etc file...
Search in the past three days for 'fr_FR' and it'll come up.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
"Richard Lynch" <ceo
l-i-e.com> wrote in message
news:050001c11be5$c93a81c0$6401a8c0
Lynchux100...
> > setlocale(LC_ALL, '');
>
> > putenv('LANG=fr'); /* <<< changed here */
> > setlocale(LC_ALL, '');
>
> WILD GUESS ALERT!
>
> My gut says you need setlocale(LC_ALL, 'fr') or similar in the French
one...
After much fiddling, I found that, for some reason, I always need to use the "long" version of the language codes. "LANG=fr" didn't work, but "LANG=fr_FR" did.
I then need to pass '' or 'fr_FR' to setlocale(), and all is working.
Thanks for the guess, though. :)
- Colin
attached mail follows:
> functions that have many multiple exit points
This is your real problem. Don't do that.
Re-structure the logic to have one, and only one, exit point to the function at the bottom.
Non-local exit (exit points not at the end of a function) should be reserved for truly disastrous situations that are never, ever supposed to happen... Even then, you can usually code it better with an if/else or a flag or an error-accumulator or...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> I'm currently just playing around with a few things and want to > write a script that will listen on a UDP port and then log/process the > information. The problem i have it that i don't know if php can do this. I > know that you can connect to a UDP port but can you listen on one? And if > you cant then does anybody know if this is planned in a future version?
Never done it, but have you read:
http://php.net/manual/en/ref.sockets.php http://php.net/manual/en/function.socket.php 'Valid arguments for the protocol argument are "tcp" and "udp"' http://php.net/manual/en/function.bind.php http://php.net/manual/en/function.listen.php
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
Then jump over to WebMonkey and run through their tutorial.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Kyle Smith <dbzno1fan
hotmail.com> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Thursday, August 02, 2001 1:20 PM Subject: PHPTriad users
Could someone please help me sort out a database on this so i can find out if php works, OR could you people please send me any scripts you have cause i just got php working on my pc and i wanna know what its capable of.
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509 MSN: dbzno1fan
hotmail.com AIM: legokiller666
attached mail follows:
> magicphppage.php I don't want the public to be able to simply type > www.mysite.com/php/ and have all of my php files show up on a funky > "virtual directory".
In httpd.conf, there are settings like Allow SymLink and Deny All and suchlike.
One of them, whose name I forget, means "let people dig around in side my directories".
You want Deny XXXXXXXX for whatever that one is.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
>There has to be an ultimate php tutorial out there which goes from start to finish being easy >on the brain..... if someone finds a tutorial this good, i may be forced to post less on this >list..... and i wouldnt like that
Try the WebMonkey and the DevShed ones, I think... Or just try the first three pages of each tutorial you can find, and follow all the way through the first one that makes sense to you.
To a large extent, it depends on what you want to *DO* with PHP.
MySQL, PostgreSQL, Oracle, MS-SQL, or all of the above? Do you need GD? How about high-precision mathematics with BC_MATH? Super-fast but low-featured "database" action? LDAP is your buddy. Need to retrieve Email and News in a web page? Find a PHP/IMAP HowTo.
There can't be an ultimate PHP tutorial from start to finish because, like, unless you actually need LDAP or YP or HyperWave or any of the other rather esoteric extensions there's not much point in forcing them into a tutorial.
You'd be looking at an encyclopedia before you were done with every extension. Hell, by the time somebody wrote the damn thing, somebody else will have come up with another extension.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> Does anyone know of any functions / tools / utilities / whatever that can be > used to provide a timing of the execution of each line of a php program? I'm > guessing this would probably be a test harness or a debug app or something. > > I've used timing functions to record the execution of blocks of code or > entire scripts, but I'm interested in taking it this one step further.
What you describe is called a "profiler".
AFAIK, there aren't any for PHP at this time.
The odds on somebody writing one within the next six months now that there are a half-dozen IDEs: A virtual certainty.
Meanwhile, some rules of thumb:
Your biggest time-sink is your xxx_connect() to the database. Use xxx_pconnect(). P is for 'P'ersistent. The Persistence is on the *database* side, *NOT* in PHP. Usual Stumbling Block: Your database has to be configured to have more possible connections than the number of httpd processes. Stress-test on a development box to be sure you configured everything properly, or be prepared to weep.
If you can do it in SQL instead of PHP, do it in SQL. SQL has been optimized to hell and back for decades. PHP is fast, but it's designed to be easy as well, not to rip through a million records in minimal time.
If it's something you'd expect somebody else to have needed a whole lot, PHP probably has a built-in custom function for it that will beat the pants off anything you can write in PHP.
The previous statements really are not arguable. The next two will undoubtably draw the ire of about 70% of this list. Tough $#!^
[asbestos mode on] Over-engineering your site with forty-leven Object-Oriented class include files is a Bad Idea. Unless you can afford the Zend Cache, in which case you don't care.
Over-engineering your site with a Template system so your graphic designer can easily change GREEN to BLUE, but if they want to add a column you have to re-code the damn PHP anyway is stupid. Either re-educate your Graphic Designers to grok a minimal amount of PHP, or have them edit PHP files using an editor that won't screw up your PHP and you can re-edit it after to re-integrate their static HTML as dynamic or have them edit a static sample page and you re-integrat it or design the parts that you just know the Graphic Designer will want to change as a non-PHP include file or... Just about anything other than a Template library is going to end up being lower TCO in the long run. Ditto on the Zend Cache. [/asbestos]
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> I just discovered PHP this week. I'm reading about include statements. If I > have a text file 2000 characters in length that I want to include, I would > do this to include to whole file: > > <?php > include ("file.txt"); > ?>
http://php.net/fopen http://php.net/fread
<?php $path = "file.txt"; $file = fopen($path, 'r') or die("Could not open $path. Try full path or something."); $data = fread($file, 250); echo $data; ?>
Note that include not only includes a text file, but also executes any <?php ?> tags within it.
So it's not ideal for sucking in a whole plain text file anyway.
Check out http://php.net/readfile
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
On Friday 03 August 2001 05:59, Craig Westerman wrote:
> <?php > $txtfile = fopen("text.txt", "r"); > > while (!feof($filePointer))
$txtfile instead of $filePointer
> { > $line = fgets($txtfile, 250);
fgets reads a line (i.e. up to a newline) with at most the specified numbers of characters. So you read the entire file, line by line. Use $Text = fread ($txtfile, 250); instead.
> print $line; > } > > close($txtfile);
fclose
-- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/)"Software is like sex: the best is for free" -- Linus Torvalds
attached mail follows:
>Does anyone know of a more-or-less authoritative source that states that the common >convention for HTTP GET/POST queries is a series of "name=value" pairs joined by "&" >characters? I know I'm not just making this up, but I need to persuade someone that it is a >commonly-accepted practice. Before you look... it's not in the HTTP RFCs.
The W3C weenies and/or some other HTTP specification committee has decided that it should be & or ; or somesuch.
Reality-check: Every damn browser on the planet uses &name=value
Why they make these standards up in the first place I dunno.
I'd sure appreciate it if they'd focus on putting pressure (or at least nagging) IE and Netscape to agree on a few things that haven't worked properly cross-platform for years now.
Of course, PHP will let you use any damn character you please in php.ini and you can always get the full URL passed in (see <?php phpinfo();?> output) and tear it apart in any way you see fit.
YMMV.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> Is there a routine out there to strip all characters from a phone > number except the numbers? I was going to write my own but > figured there must already be one out there I can use. Thanks.
While the solution given will work, consider the following perfectly valid phone numbers:
312-555-1234x1001 1-800-MY-STUFF
Also, once you strip out all the spaces and dashes, nobody but a computer can use it...
Do you *really* want to make it difficult for humans to use?
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> > Is there a routine out there to strip all characters from a phone > > number except the numbers? I was going to write my own but > > figured there must already be one out there I can use. Thanks. > > While the solution given will work, consider the following perfectly valid > phone numbers: > > 312-555-1234x1001 > 1-800-MY-STUFF > > Also, once you strip out all the spaces and dashes, nobody but a computer > can use it... > > Do you *really* want to make it difficult for humans to use?
True, but there are situations where it's handy to convert things like this purely into numbers.. I use PHP to retrieve telephone numbers from a DB and display them in a wml file... so that when a user finds an entry in the db that they like, they've an option to hit the 'call' link, the phone automatically disconnects the user from the net and dials up the business' number.
Unfortunately, there are a number of pitfalls with this... some of the telephone numbers in the db were entered with the area code, some weren't.. so some replacements there were required..
then there's the fact that you can only call the businesses when in the UK - I didn't get around to converting the numbers into anything other than valid numbers for calls within the UK.
Another downside is the fact that mobiles work differently from one another - so the "hangup from the net and dial the telephone number" button only seemed to work on Nokia phones.
Luckily, we don't use the letters in telephone numbers in the UK - which was one less headache. Though all of the other problems with what I was working on has meant that it never got past alpha testing ;)
James.
attached mail follows:
on 8/2/01 9:55 PM, Richard Lynch at ceo
l-i-e.com wrote:
> While the solution given will work, consider the following perfectly valid > phone numbers: > > 312-555-1234x1001 > 1-800-MY-STUFF > > Also, once you strip out all the spaces and dashes, nobody but a computer > can use it... > > Do you *really* want to make it difficult for humans to use?
good point richard. i never really considered the 1-800-MY-STUFF case. most of my customers seem to want numbers only..
anyway, assuming numbers only and no extensions (you can change this to add extensions pretty easily)...
in a form where i want a phone number, i have 3 separate fields of length 3,3,4 respectively. when the form is submitted, i check to make sure there are only numbers. (actually, on some sites i use javascript to check this as well)
i have two functions--phone_from_3() and phone_to_3(). i use phone_from_3() to set $phone = $phone1 . $phone2 . $phone3. i then put $phone in the db. when i want to display the phone number somewhere, i use phone_to_3() to turn $phone into $phone1, $phone2, $phone3. i can then format the phone number making it easy to read.
hope this helps, mike
-- mike cullerton
attached mail follows:
>Any body there with experience setting up Netscape Enterprise Web Server with PHP as CGI >binary. I need to know how to configure Netscape Web Server.
If Netscape Enterprise Web Server has a HowTo for setting up Perl as a CGI binary, do PHP exactly the same way.
Except for the Perl->PHP bit, of course. :-)
As far as the web server is concerned, Perl CGI and PHP CGI are the same thing spelled differently.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> selecting behavior possible. Currenty all questions go to php-general. If > there were, say, a php-newuser and a php-questions list then perhaps > php-general could be used for slightly higher level discussions. Actually
This paricular can of worms has been discussed *WAY* too often already.
Check the archives.
We've already split off a half-dozen lists, to varying degress of success...
For sure, there are far too many INSTALL and WINDOWS questions here in GENERAL, when there's perfectly good lists for those questions!
What *DOES* work well in my limited experience is regional lists set up by PHP User Groups... Anybody else experience this or have an alternate experience? Respond off-list please. I'll summarize.
Frequent Posters of questions that are in the manual usually figure out how to work the manual sooner or later.
If you can't handle the volume, consider using news://news.php.net or set up some filters in your email client to weed out the crap.
PS Once upon a time, a long time ago, I was just as bad as the people being publicly berated. Cut them some slack, email them off-line to explain how to work the system to their advantage, and let's get back to work :-)
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> Maybe the problem is a poor educational system; some people are just too > lazy to do research / properly phrase a query for a search engine / > experiment a bit before posting?
They've been trained by Microsoft and other commercial software vendors whose documentation sucks, whose help systems cost hundreds of $$$ and...
It takes time for people to realize that OpenSource software and documentation must be approached in a different way.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
on 8/2/01 11:54 PM, Richard Lynch at ceo
l-i-e.com wrote:
>> Maybe the problem is a poor educational system; some people are just too >> lazy to do research / properly phrase a query for a search engine / >> experiment a bit before posting? > > They've been trained by Microsoft and other commercial software vendors > whose documentation sucks, whose help systems cost hundreds of $$$ and... > > It takes time for people to realize that OpenSource software and > documentation must be approached in a different way.
let's not forget, that people don't all learn the same way, and that not everyone started programming and using the internet back in the 1980's. some folks don't yet have a good feel for the bigger picture, and don't know that all these problems really boil down to a smaller number of classic problems. or, how to go about picking this stuff up. that's what mentors are for.
i'm guessing, that everyone on this list knows something that no one else on this list groks, yes, even kyle. so, are you stupid for not knowing how to rebuild the engine in my vw bus, or how to maintain the 2 dozen rose bushes i have, or how to play the guitar, or what stupid rat creatures are, or who wrote _rosencrantz and guildenstern are dead_, or how to make panang curry (with chicken)?
did i get everyone :)
oh ya, and some folks are just socially challenged.
have a day, mike
-- mike cullerton
attached mail follows:
Mike,
I did all of those things last night after work!
I joined this lsit cos i thought PHP stood for potted house plants!
;^)
George in Edinburgh
----- Original Message -----
From: mike cullerton <php-l
bakednotfried.com>
To: <php-general
lists.php.net>
Sent: Friday, August 03, 2001 4:32 PM
Subject: Re: [PHP] New lists (was [PHP] Attitude of B van Ouwerkerk)
> on 8/2/01 11:54 PM, Richard Lynch at ceo
l-i-e.com wrote:
>
> >> Maybe the problem is a poor educational system; some people are just
too
> >> lazy to do research / properly phrase a query for a search engine /
> >> experiment a bit before posting?
> >
> > They've been trained by Microsoft and other commercial software vendors
> > whose documentation sucks, whose help systems cost hundreds of $$$
and...
> >
> > It takes time for people to realize that OpenSource software and
> > documentation must be approached in a different way.
>
> let's not forget, that people don't all learn the same way, and that not
> everyone started programming and using the internet back in the 1980's.
some
> folks don't yet have a good feel for the bigger picture, and don't know
that
> all these problems really boil down to a smaller number of classic
problems.
> or, how to go about picking this stuff up. that's what mentors are for.
>
> i'm guessing, that everyone on this list knows something that no one else
on
> this list groks, yes, even kyle. so, are you stupid for not knowing how to
> rebuild the engine in my vw bus, or how to maintain the 2 dozen rose
bushes
> i have, or how to play the guitar, or what stupid rat creatures are, or
who
> wrote _rosencrantz and guildenstern are dead_, or how to make panang curry
> (with chicken)?
>
> did i get everyone :)
>
> oh ya, and some folks are just socially challenged.
>
> have a day,
> mike
>
> -- mike cullerton
>
>
>
> --
> 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
_________________________________________________________
Do You Yahoo!?
Get your free
yahoo.com address at http://mail.yahoo.com
attached mail follows:
Y'all should also be aware that there is a http://php.net/strip_tags function to rip out all the HTML tags except a select few you want to allow...
> Preg functions are faster, though. And, if you're interested in > little speed tweaks, use single quotes - ' - rather than double > quotes - " - here. With double quotes, PHP searches the quoted string > for variables or escape characters to replace.
Somebody measured this speed difference once, and I think the difference came out to be so small that the inherent error in the measurement was higher...
PHP still has to search 'string' for \' and \\, so I guess it just isn't that different.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
On Thursday 02 August 2001 23:39, Julian Simpson wrote: > hahah that had two interesting effects the first was that it left the < > > and the second was that it turned off all the highlighting in my > editor due to the "?>" > > any idea how to include the braces in the match and perhaps not using > the ?> string for the sake of convenience :)
> >$str = preg_replace("<p.*?>", " ",$str);
$str = preg_replace ('/<p.*>/iU', ' ', $str);
-- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/)"Software is like sex: the best is for free" -- Linus Torvalds
attached mail follows:
>I'm still trying to compress an entire directory on a linux server to be decompressed >probably in windows client. I'm trying to use exec command and tar (compressor for linux), >but I don't know how to do it. Can anybody pleeeaase help me?
So, like, do they download it later, or is your PHP program supposed to return the compressed archive?...
Let's assume the latter, cuz that's more fun :-)
Use a URL like this: http://yourserver.com/whatever.php/whatever.tgz
Your PHP file is whatever.php That bogus-looking whatever.tgz on the end is because [BLEEP]ing IE 3.mumble ignores MIME-Type and goes by the URL ending to decide what kind of file you are returning. MS sucks. Or is it Netscape that does that? Netscape sucks too.
<?php $path = "/path/you/want/to/compress/*"; exec("tar -cz $path", $results, $errorcode); if ($errorcode){ echo "<HTML><BODY>\n"; echo "OS Error: $errorcode. Usually path/permissions. Use 'man errno' to look up this number if it makes you feel good.<BR>\n"; # Hmmmmmm. You might need a " 2S|" or similar after the $path above # to get stderr to redirect to stdout so PHP can get error messages from tar... # Any gurus want to comment on how that works, and if " 2S| " is the right mojo? # I hate Un*x some days. :-) echo "Here's what tar had to say, if anything:<BR>\n"; while (list(,$line) = each($results)){ echo $line, "<BR>\n"; } } else{ header("Content-type: application/octet-stream"); # Force download header("Content-disposition: filename=whatever.tgz"); # Is strlen() binary safe?... If not, this next line will mess you up... # But without it, the browser can't do that nifty progress meter during download. header("Content-length: " . strlen($results)); # There's probably more headers you want... echo $results; } ?>
>I know I should test these, but sending a message is easier. :) >If a connect the server using ftp_connect and ftp_login, when I try to create a directory >using mkdir or ftp_mkdir or a file using fopen, will they belong to me or to nobody???
They will belong to whomever you connected to the FTP server as, assuming that user can even create files in the first place...
mkdir() and fopen() in your local server will belong to whomever PHP (Apache) runs as, which is usually "nobody", but could have been configred in httpd.conf to be "www" or any valid user, including "root" if you were incredibly stupid, or, if you run PHP as a CGI and wrap it in suExec, it would be whatever user suExec is configured to run PHP as, which might be your real login, or might not. Didja follow all that? :-) http://php.net/chown et al may or may not be of use...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> if(!$Age) { echo "Please enter your age"; } > elseif(!$Email){ echo "Please enter your email"; } > else > echo "Thanks for your submission"; > // continue processing... > }
*ACTUALLY*, it's rather annoying to have a web-site tell you one field at a time what you have filled in wrong as you click Submit over and over and over... *ESPECIALLY* if they don't pre-inform you of what is/isn't valid input!
Sidebar: If you're going to restrict what input is acceptable, inform the user in fine print what's allowed! This includes claiming Zip+4 is invalid, you goofs.
Sidebar: For a username, could you at *LEAST* let me use my email for a username so (A) it will be not "already used" and (B) I have a *CHANCE* of remembering it when I come back?! I have to run through 20 different possiblities for some sites I use semi-regularly when I log in. Other sites I never use simply because I know I can't remember my username for that site.
Here's a slightly better design:
<?php $message = ''; if (isset($submit)){ # The NAME= from your TYPE=SUBMIT button if (!$Age){ $message .= "You must enter a valid age in years<BR>\n"; } if (!$Email){ $message .= "You must enter a valid email<BR>\n"; } } if (!$message){ # Process valid input } else{ ?> <FORM ... > <?php echo "<FONT COLOR=FF0000>$message</FONT>";?> Age: <INPUT NAME=Age ...> . . . </FORM>
Sidebar: You could go a lot further in validating the $Email. You could even type in a three (3) page Regular Expression from the back of the Camel book and be completely RFC-compliant... If you didn't mind the fact that it will probably be dog-slow and very RAM-intensive. There are a bazillion email-checking Regexes posted to the 'Net. Many of them will reject perfectly valid emails :-( You need one that will maybe let a bad email slip by, but will *NOT* reject any valid addresses. Good luck finding one. No, I don't know where one is. You could also use some PHP functions (SNMP?) to look up the MX record for the domain name of the email, and ask that MX server if it accepts that email as valid... Only some MX servers will just say "Yeah, sure" for invalid emails, and some will refuse to answer at all, and some will just plain out-and-out lie and say an email is invalid when it's fine. So, bottom line, if you *really* care about having a valid email, you have to send a secret randomly-generated unique registration code required to complete the registration to the address to force the user to provide a working email. Of course, there's nothing to stop them from creating a Yahoo (et al) email and checking it only once to get the registration code, and never, ever, ever using that email address again for anything. So, in the end, there's really not a whole lot of point to doing all that, is there?... It boils down to: "How important is it to you that they give you an email that might only be valid for a few hours? Maybe you shouldn't require it at all." YMMV.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
You make some good points richard,
I like the email as username, for just the reasons you mention :)
On Fri, 3 Aug 2001 00:42:30 -0500, Richard Lynch wrote:
>> if(!$Age) { echo "Please enter your age"; }
>> elseif(!$Email){ echo "Please enter your email"; }
>> else
>> echo "Thanks for your submission";
>> // continue processing...
>> }
>
>*ACTUALLY*, it's rather annoying to have a web-site tell you one field at a
>time what you have filled in wrong as you click Submit over and over and
>over... *ESPECIALLY* if they don't pre-inform you of what is/isn't valid
>input!
>
>Sidebar:
>If you're going to restrict what input is acceptable, inform the user in
>fine print what's allowed! This includes claiming Zip+4 is invalid, you
>goofs.
>
>Sidebar:
>For a username, could you at *LEAST* let me use my email for a username so
>(A) it will be not "already used" and (B) I have a *CHANCE* of remembering
>it when I come back?! I have to run through 20 different possiblities for
>some sites I use semi-regularly when I log in. Other sites I never use
>simply because I know I can't remember my username for that site.
>
>Here's a slightly better design:
>
><?php
> $message = '';
> if (isset($submit)){ # The NAME= from your TYPE=SUBMIT button
> if (!$Age){
> $message .= "You must enter a valid age in years<BR>\n";
> }
> if (!$Email){
> $message .= "You must enter a valid email<BR>\n";
> }
> }
> if (!$message){
> # Process valid input
> }
> else{
>?>
><FORM ... >
> <?php echo "<FONT COLOR=FF0000>$message</FONT>";?>
> Age: <INPUT NAME=Age ...>
>.
>.
>.
></FORM>
>
>Sidebar:
>You could go a lot further in validating the $Email. You could even type in
>a three (3) page Regular Expression from the back of the Camel book and be
>completely RFC-compliant... If you didn't mind the fact that it will
>probably be dog-slow and very RAM-intensive. There are a bazillion
>email-checking Regexes posted to the 'Net. Many of them will reject
>perfectly valid emails :-( You need one that will maybe let a bad email
>slip by, but will *NOT* reject any valid addresses. Good luck finding one.
>No, I don't know where one is. You could also use some PHP functions
>(SNMP?) to look up the MX record for the domain name of the email, and ask
>that MX server if it accepts that email as valid... Only some MX servers
>will just say "Yeah, sure" for invalid emails, and some will refuse to
>answer at all, and some will just plain out-and-out lie and say an email is
>invalid when it's fine. So, bottom line, if you *really* care about having
>a valid email, you have to send a secret randomly-generated unique
>registration code required to complete the registration to the address to
>force the user to provide a working email. Of course, there's nothing to
>stop them from creating a Yahoo (et al) email and checking it only once to
>get the registration code, and never, ever, ever using that email address
>again for anything. So, in the end, there's really not a whole lot of point
>to doing all that, is there?... It boils down to: "How important is it to
>you that they give you an email that might only be valid for a few hours?
>Maybe you shouldn't require it at all." YMMV.
>
>--
>WARNING richard
zend.com address is an endangered species -- Use
>ceo
l-i-e.com
>Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
>Volunteer a little time: http://chatmusic.com/volunteer.htm
>
>
>
>--
>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:
> Why you ppl. do this: > if ($condition) { > file://action 1 > file://action 2 > file://action 3 > > }
Because they have been saved.
> instead of this: > if ($condition) > { > file://action 1 > file://action 2 > file://action 3 > }
Because they are damned to hell.
:-)
Bottom line: You'll never, ever, ever get a majority vote on this one. Use the one you like, and deal with it when somebody else uses the other one.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
>From: Richard Lynch [mailto:ceo
l-i-e.com]
>> Why you ppl. do this:
>> if ($condition) {
>> file://action 1
>> file://action 2
>> file://action 3
>>
>> }
>
>Because they have been saved.
have to agree with you there
>> instead of this: >> if ($condition) >> { >> file://action 1 >> file://action 2 >> file://action 3 >> } > >Because they are damned to hell.
and there :)
>Bottom line: You'll never, ever, ever get a majority vote on this one. Use >the one you like, and deal with it when somebody else uses the other one.
additionally I also tend to always provide an alternative, especially if dealing with nested ifs or loops, even if just a comment... call it habit (from where I don't know).
if($condition){ do this }else{ # oops, $condition didn't exist }
saves a hell of alot of time when going back through the code 6 months later trying to remember what was being done where. personal opinion mind you
Dave
attached mail follows:
> The e-mail script is for administration, so it's password protected. Do > you still see a problem? Do you have any better ideas?
Password-protected for only TRUSTED people to get to it should be "okay" risk.
If a hacker cracks that password, though, the penalties are a little higher than average.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> --------- file 1 -----------
What filename is this?...
> <? > > session_start(); > > if (!isset($var1)) { > session_register("var1"); > session_register("var2"); > header("location: index.php");
That should be Location with a capital 'L'. It matters.
If you are using Cookies for sessions, then this page is sending both Cookie headers and Location headers in the same exchange, since you've got session_start() (and/or session_register()).
You can't do that.
Some browsers do the headers in reverse order, some do them in forward order, and thus there will always be some browsers that won't ever see the Cookies, since they did the Location first, so they never get the Cookie with the PHPSESSID in it, cuz they jumped off to index.php like you told them to in that Location header.
Move the session_register("var1") and session_register("var2") to index.php, so that at least those will get done at some point.
Whether the session_start() sets the first Cookie here and/or in index.php is not so important... Walk through it step-by-step and you'll see what I mean.
Ooooooh. If this file *IS* index.php, you've got BIG logic problems...
You are checking if $var1 is set, registering it, and then going back to index.php.
Well, you may be registering it, but are you SETTING it to a value?...
Now maybe session_register() will give it some value, just to register it... Or, maybe not. I sure wouldn't expect it to be SET just cuz I registered it. If you want to be *sure*, you'll need to set $var1 = 'something'; after the session_register("var1") and before the Location header...
But you still have the whole Cookie/Location dichotomy problem.
Basically, you *CANNOT* require a variable to be set on your homepage unless you expect every single person who ever links to your site to use:
http://www.fromtheduke.com/session/index.php?var1=foo
You might be able to get away with it if you do:
header("Location: index.php?var1=foo&var2=bar");
That way, after they visit your page, you'll redirect with some GET vars to force them to have values... Not sure how useful that is in the Real World though... You may want to try to start doing a more realistic example of what you want to use Sessions for, because I think you've abstracted it to the point that you're trying to do something you'll never really need to do...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
On 8/3/2001 2:25 AM this was written:
>> --------- file 1 ----------- > > What filename is this?...
Index.php is the filename.
>> <? >> >> session_start(); >> >> if (!isset($var1)) { >> session_register("var1"); >> session_register("var2"); >> header("location: index.php"); > > That should be Location with a capital 'L'. It matters.
I have probably 400+ scripts under my belt. I would say a good 150 of those pages use header("location: ..") without it being capitalized. They work perfectly fine. What is the difference?
> If you are using Cookies for sessions >
I am using cookies.
>, then this page is sending both Cookie > headers and Location headers in the same exchange, since you've got > session_start() (and/or session_register()). > > You can't do that.
I can't start the session for the first time and register a variable? Isn't that what most people do?
> Ooooooh. If this file *IS* index.php, you've got BIG logic problems...
I see what you mean concerning the issset($var1) this code I have here is almost identically copied from an install script that was created by the Mambo OpenSource project. And like I said, on my Mac, it would redirect about 5 times before the browser decided it was in a loop and stopped.
...
Okay, I have re-written my code for index.php to say this: (see below for analysis)
------------ <?
session_start();
session_register("var1"); session_register("var2");
$var1 = "My var 1"; $var2 = "My var 2";
?><HTML> <HEAD> <TITLE>Session Page 1</TITLE> </HEAD>
<BODY BGCOLOR=#FFFFFF>
PHPSESSID: <? echo $PHPSESSID; ?><BR> Var1: <? echo $var1; ?><BR> Var2: <? echo $var2; ?><BR>
<FORM ACTION="index2.php" METHOD="POST"> VAR 3: <INPUT TYPE=TEXT VALUE="My Var 3" NAME="myvar3"> <INPUT TYPE=SUBMIT VALUE="go"><BR> </FORM>
</BODY> </HTML> ------------
IE 5 for the Mac: When I hit ths page first (real page at: http://www.fromthduke.com/session/) the echo of $PHPSESSID does not show up; it's not echoed to the screen.
The echo of var 1 and var 2 work fine. Then the form, of course is there.
So, if $PHPSESSID isn't there, that leads me to believe that the cookie was not set. So, I go check (making sure that before this test the cookie was not present before.) Low and behold, the cookie is there in my cookies list and it's got a value.
Then I click submit...
The PHPSESSID is echoed as the same value that is in the cookie: d5184618d558ffe038a28e9e1adbdf26 Myvar 1 and 2 are blank Myvar 3 is there. (posted from previous form)
I look on the server, there is an additional session file on the server: sess_e78835fbbf62c0ddc77d46b6ff95e0cc It contains the Myvar 3 information.
Okay, perhaps it's a Mac thing, so I went to IE 5 for the PC:
Same results.
Well, perhaps it's a IE thing... Let's try netscape on both platforms:
Same Results.
So, it's not a browser thing, it must be a server thing. Perhaps the way I have Sessions setup in the .ini file? I think I have all the defaults, but here is the section echoed:
---------- [Session] session.save_handler = files session.save_path = /tmp session.use_cookies = 1 session.name = PHPSESSID session.auto_start = 0 session.cookie_lifetime = 3600 session.cookie_path = / session.cookie_domain = session.serialize_handler = php session.gc_probability = 1 session.gc_maxlifetime = 1440 session.referer_check = 0 session.entropy_length = 0 session.entropy_file = ; session.entropy_length = 16 ; session.entropy_file = /dev/urandom session.cache_limiter = nocache session.cache_expire = 180 ----------
Perhaps it's the 'nocache' directive?
Now I have given you all I can without giving you root access to my server. Here is the location of my test (as above):
http://www.fromtheduke.com/session/
--Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/
attached mail follows:
Miles,
The LIMIT works great with UPDATE too.
"Miles Thompson" <milesthompson
ns.sympatico.ca> wrote in message
news:5.0.2.1.0.20010802111104.02605080
pop1.ns.sympatico.ca...
>
> Come on, you're pushing SQL in directions it's not supposed to go! It is
> set oriented after all.
> So it's experimentation time. I've never tried, but as LIMIT works on a
> SELECT, try it on an update. And let us know what happened.
> Miles
>
> At 10:30 AM 8/2/01 +0200, elias wrote:
> >How can I update only N fields from the database?
> >
> >usually we do:
> >
> >UPDATE table1 SET field='VALUE' WHERE condition1
> >
> >now I want to update fields with a certain condition but only X fields
out N
> >total fields.
> >
> >ie:
> >
> >id value
> >--- -------
> >1 a
> >2 b
> >3 c
> >4 d
> >5 e
> >
> >how can i update such like:
> >UPDATE table1 SET {only 2 records} value='aa'
> >so I have any two fields now have the 'aa' value
> >
> >
> >
> >
> >
> >--
> >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'm rather fond of Webalizer (www.mrunix.net/webalizer).
- Tim
On 03 Aug 2001 10:18:27 -0500, Jack wrote:
> Hi people,
> Is anyone has any advice about what should be the very good web traffic report software? I need to use that to track all statistic data on my sites, including all clicks on image links and hyperlinks.
> Jack
> jacky
activelifestyle.com
> "Love your enemies, it will drive them nuts"
attached mail follows:
At 03.08.2001 04:44, mike cullerton wrote: >another vote for analog.
Dunno what this has got to do with php, but my vote is for webalyzer... fast and easy to use...
--
Andreas D Landmark / noXtension
Real Time, adj.:
Here and now, as opposed to fake time, which only occurs there
and then.
attached mail follows:
How do I get the raw data from a http request?
i.e. in a post request, the content that will be submitted is followed after the request header and the request header contains the CONTENT-LENGTH specifying the length of the data. I know PHP will parse the submitted content so that each "key=value" pair will become variable name $key holding value. Now my question is, is there a way in PHP that I can just get those "non-parse" content from the request only? I have found the documentation it seems that there is no obivous to do so, get the env. variable "QUERY_STRING" seems match my needs but it only work for GET/string appended in the URL only.
I need to do so since I need to handle the such post request that don't use "key=value" pair.
Thanks a lot
attached mail follows:
Sehr geehrte Damen und Herren,
Sie benötigen regelmäßig Übersetzungen von Fachtexten und Webseiten - und das am besten in Stunden, und nicht in Tagen?
In nur 60 Sekunden können Sie sich hier umfassend über unseren innovativen B2B Übersetzungsdienst informieren: http://www.eubylon.de/html/de.eubylonx.html
Wenn sie auch Informationen über weitere interessante Dienstleistungen erhalten bekommen möchten, klicken Sie hier:
mailto:info
eubylon.de
Falls Sie keine weiteren Informationen wünschen dann klicken Sie bitte hier:
mailto:uninfo
60sec.de
Mit freundlichen Grüßen
Klaus Neumann Kundenbetreuung
www.dieuebersetzer.de wir überwinden Barrieren
ein Service der:
Eubylon GmbH
Ackerstraße 14-15
10115 Berlin
info
eubylon.de
T: +49-30-280 94 010
F: +49-30-280 94 008
- - - - - - - - - - - - - - - -
Ladies and Gentlemen,
Do you regularly need translations of your product descriptions or services in hours and not in days?
The www.translate-b2b.com, provides innovative B2B online translation services for enterprises of the IT and E-Commerce industry.
You need just 60 seconds to find out right now how our service works. Click here: www.eubylon.de/html/en.eubylonx.html
Simply test us and discover that our services will convince you!
If you would like more information about our services, click here:
mailto:info
eubylon.de
If you do not require further information please click here:
mailto:uninfo
60sec.de
Your online translation team
Klaus Neumann Customer service
Eubylon GmbH
Ackerstrasse 14-15
10115 Berlin
T: +49-30-280 94 010
F: +49-30-280 94 008
mailto:neumann
eubylon.de
attached mail follows:
I guess you mean by "extra functions" the what so called extensions.
Actually mail() and date() are builtin but if you want extra functions you have to install extra extensions.
"Kyle Smith" <dbzno1fan
hotmail.com> wrote in message
news:OE22SftM9HHFB9hga940000111e
hotmail.com...
How do i set up extra functions on my computer like mail() and date()????
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
attached mail follows:
Hello.
I've read a book, PHP DEVELOPER'S COOKBOOK, with great interest and it's a great contribution to my bookcollection :-) There is something I would like to know though....I have searched through all my books and sites on PHP, but didn't find the answer....
In chapter 16 (Creating a Database-Independent API with PHP) there are some functions written with a & in front of them. Ex. in DB/standard.php; function &db_fetchall($args=array()){ ...
I've seen and used the pass by reference syntax on function parameters but not on functionnames. What effect does reference (&) have when used in front of the functionname??
It would help me a lot to get a fast answer.
Kind regards Rolf Håkon Rensaa Norway
attached mail follows:
The function return value is by reference.
http://www.php.net/manual/en/language.references.php
- Tim
> Ex. in DB/standard.php; function &db_fetchall($args=array()){ ... > > I've seen and used the pass by reference syntax on function parameters but > not on functionnames. > What effect does reference (&) have when used in front of the functionname??
attached mail follows:
> When on mailing lists such discussion get longer and longer, like > 'Attitude of B van Ouwerkerk', I always remember of this email. Could > everyone give a moment of thought and get back to the purpose of this list? > I know that this includes myself too, which I apologize for my behavior: > > Q: How many mailing list subscribers does it take to change a light bulb? > A: Thousands! > > <snip highly amusing and exceptionally detailed breakdown>
Awwwww, you forgot the final phase.
1 person to compare people who change light bulbs to Hitler 1 person to say "you lose" and post a link to the jargon file.
http://www.tuxedo.org/~esr/jargon/html/entry/Godwin's-Law.html
Cheers Jon
attached mail follows:
mike cullerton schrieb am Freitag, 3. August 2001, 05:43:22:
> on 8/2/01 9:01 PM, Ralph Guzman at raguzman
netraiser.com wrote:
>> In mySQL, how do I set an auto increment field to start at a certain >> number-let's say 10000? Do I just insert the first record with the desired >> number I wish to start with? >>
> it appears to depend on the table type. i believe you are ok with MyISAM or > InnoDB tables. check out the docs on table creation and column types at > mysql.com.
Also, don't get confused on the use of auto increment fields. They are not meant to be counters. If you need a counter, define one separately. auto increment fields have a very specific meaning to table design and should be used only in this context.
-- Herzlich Werner Stuerenburg_________________________________________________ ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409 http://pferdezeitung.de
attached mail follows:
Hi,
phpMyAdmin allows you to import comma separated files into your mysql tables (dunno about .csv but certainly .txt files)..
http://phpwizard.net/projects/phpMyAdmin/
Also read up on this:
http://www.mysql.com/doc/L/O/LOAD_DATA.html
as you may eventually need to set up something to enable a client to import data like this..
James
"Yeong Cn" <tzeen
lycos.com> wrote in message
news:NOHGBPFPOJEABAAA
mailcity.com...
> How can I add an excel file with *.xls extension
> directly into MySQL database..is it possible to do or
> I need to convert it into *.csv format or *.txt format
> first?
>
>
>
> Get 250 color business cards for FREE!
> http://businesscards.lycos.com/vp/fastpath/
attached mail follows:
I dont mean to be picky but .. ".. allows you to import comma separated files .. dunno about .csv .."
csv = comma seperated values
so yes mysql can import csv using the LOAD DATA func or user writen php func :) sorry about pointing that out.
--Chris Lee lee
mediawaveonline.com
"James Holloway" <james
towntalk.co.uk> wrote in message news:20010803085646.4242.qmail
pb1.pair.com... > Hi, > > phpMyAdmin allows you to import comma separated files into your mysql tables > (dunno about .csv but certainly .txt files).. > > http://phpwizard.net/projects/phpMyAdmin/ > > Also read up on this: > > http://www.mysql.com/doc/L/O/LOAD_DATA.html > > as you may eventually need to set up something to enable a client to import > data like this.. > > James > > "Yeong Cn" <tzeen
lycos.com> wrote in message > news:NOHGBPFPOJEABAAA
mailcity.com... > > How can I add an excel file with *.xls extension > > directly into MySQL database..is it possible to do or > > I need to convert it into *.csv format or *.txt format > > first? > > > > > > > > Get 250 color business cards for FREE! > > http://businesscards.lycos.com/vp/fastpath/ > >
attached mail follows:
> I dont mean to be picky but .. ".. allows you to import comma separated > files .. dunno about .csv .." > > csv = comma seperated values > > so yes mysql can import csv using the LOAD DATA func or user writen php func > :) sorry about pointing that out.
I couldn't have had enough caffeine in me when I wrote that. ;)
James.
attached mail follows:
Hi,
I'm sure that I'm missing something obvious (probably sleep), but how can I take the contents of several arrays and send them via email? I'd like to take each value from the arrays and include them in the message portion of a mail() command.
Any help would be greatly appreciated.
Geoffrey
-- Geoffrey Makstutis <gmak51pct.com>
51% Studios Architecture + Design 1-5 Clerkenwell Road London EC1M 5PA
www.51pct.com
attached mail follows:
Geoffrey Makstutis schrieb am Freitag, 3. August 2001, 11:00:04:
> I'm sure that I'm missing something obvious (probably sleep), > but how can I take the contents of several arrays and send them > via email? I'd like to take each value from the arrays and > include them in the message portion of a mail() command.
I don't think there could possibly be a general solution to this problem. What I do in these cases is take the input, format it so that the recipient will be happy with it and then send it along.
This process can be abstracted a lot, so you don't have to reinvent the wheel for every form.
-- Herzlich Werner Stuerenburg_________________________________________________ ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409 http://pferdezeitung.de
attached mail follows:
You could use the implode() function to convert the arrays to strings and then pass the concatenated strings to the mail() function.
- Tim
On 03 Aug 2001 09:00:04 +0000, Geoffrey Makstutis wrote: > I'm sure that I'm missing something obvious (probably sleep), but how can I take the contents of several arrays and send them via email? I'd like to take each value from the arrays and include them in the message portion of a mail() command.
attached mail follows:
Just a thought.. Like other vars..
Depends all a bit on what you want to do..
Bye,
B.
At 09:00 3-8-01 +0000, Geoffrey Makstutis wrote: >Hi, > >I'm sure that I'm missing something obvious (probably sleep), but how can >I take the contents of several arrays and send them via email? I'd like to >take each value from the arrays and include them in the message portion of >a mail() command.
attached mail follows:
My problem problem is that I have 2-dimensional arrays, so I don't see how I can concatenate them using:
$msg = implode($array1, "\n") . implode($array2, "\n");
I can implode using:
$count = count($item); $x=0; while ($x<$count){ $pieces = implode(" - ", $item[$x]); $x++; }
But then I've still got to step through $pieces.
Any ideas?
Tim (infoz
earthlink.net) wrote:
>
>$msg = implode($array1, "\n") . implode($array2, "\n");
>On 03 Aug 2001 10:04:23 +0000, Geoffrey Makstutis wrote:
>> I can get the strings via implode(), but then how do I concatenate them?
>>
>> Thanks
>>
>> Tim (infoz
earthlink.net) wrote:
>> >
>> >You could use the implode() function to convert the arrays to strings
>> >and then pass the concatenated strings to the mail() function.
>> >
>> >- Tim
>> >
>> >On 03 Aug 2001 09:00:04 +0000, Geoffrey Makstutis wrote:
>> >> I'm sure that I'm missing something obvious (probably sleep), but how can I
take
>> the contents of several arrays and send them via email? I'd like to take each
value
>> from the arrays and include them in the message portion of a mail() command.
>> >
>> >
>> >
>> >
>> >
>>
>> --
>> Geoffrey Makstutis
>> <gmak
51pct.com>
>>
>> 51% Studios
>> Architecture + Design
>> 1-5 Clerkenwell Road
>> London EC1M 5PA
>>
>> www.51pct.com
-- Geoffrey Makstutis <gmak51pct.com>
51% Studios Architecture + Design 1-5 Clerkenwell Road London EC1M 5PA
www.51pct.com
attached mail follows:
Ah, you didn't say you had 2-D arrays initially.
Something along the lines of:
$msg = ""; while (list(,$row) = each($myArray)) { $msg .= implode("\n", $row); }
might work.
- Tim
On 03 Aug 2001 10:48:58 +0000, Geoffrey Makstutis wrote:
> My problem problem is that I have 2-dimensional arrays, so I don't see how I can
> concatenate them using:
>
> $msg = implode($array1, "\n") . implode($array2, "\n");
>
> I can implode using:
>
> $count = count($item);
> $x=0;
> while ($x<$count){
> $pieces = implode(" - ", $item[$x]);
> $x++;
> }
>
> But then I've still got to step through $pieces.
>
> Any ideas?
>
>
> Tim (infoz
earthlink.net) wrote:
> >
> >$msg = implode($array1, "\n") . implode($array2, "\n");
> >On 03 Aug 2001 10:04:23 +0000, Geoffrey Makstutis wrote:
> >> I can get the strings via implode(), but then how do I concatenate them?
> >>
> >> Thanks
> >>
> >> Tim (infoz
earthlink.net) wrote:
> >> >
> >> >You could use the implode() function to convert the arrays to strings
> >> >and then pass the concatenated strings to the mail() function.
> >> >
> >> >- Tim
> >> >
> >> >On 03 Aug 2001 09:00:04 +0000, Geoffrey Makstutis wrote:
> >> >> I'm sure that I'm missing something obvious (probably sleep), but how can I
> take
> >> the contents of several arrays and send them via email? I'd like to take each
> value
> >> from the arrays and include them in the message portion of a mail() command.
> >> >
> >> >
> >> >
> >> >
> >> >
> >>
> >> --
> >> Geoffrey Makstutis
> >> <gmak
51pct.com>
> >>
> >> 51% Studios
> >> Architecture + Design
> >> 1-5 Clerkenwell Road
> >> London EC1M 5PA
> >>
> >> www.51pct.com
>
> --
> Geoffrey Makstutis
> <gmak
51pct.com>
>
> 51% Studios
> Architecture + Design
> 1-5 Clerkenwell Road
> London EC1M 5PA
>
> www.51pct.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:
> If I am talking to non geeky types, and they bother to ask, I > go with "Professional Hypertext Processor".
Now that's a good one I will keep in mind!
-- Herzlich Werner Stuerenburg_________________________________________________ ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409 http://pferdezeitung.de
attached mail follows:
I changed session.save_path to c:\php but it does not make any difference. I tried change it in different ways.
I suppose, the problem is more sophisticated. Now, I can connect and work with those scripts BUT nobody else (sic!) can work. All (except me) receive the message "Failed to write session data..". We all work in the same intranet. We all have the same user rights to change contents of c:\temp on the server.
More. SOME scripts at the same server CAN work. They deal with sessions in the same way like others. But, some others scripts do not want to work, they cannot write session data (the same error msg).
Sometimes I could not work, sometimes I could. Yesterday I could not. Today I can. Others not. Even admin receives error "Failed to write session data...". Is it not strange?
-- Jarek> ----- Original Message ----- > Hi, > I think the prlbem is that /tmp is not a valid path under WinNT > Try chaning session.save_path to c:\php\tmp or c:\temp or any other > windows directory. > Best wishes, > Andras.
> ----- Original Message ----- > From: "Jarek" <programisci
murator.com.pl> > To: <php-general
lists.php.net> > Sent: Thursday, August 02, 2001 12:29 PM > Subject: [PHP] Very strange problem with session files
>> I have WindowsNT4 Serv & PHP 4.0.6/CGI >> >> My php.ini includes: >> (...) >> session.save_handler = files >> session.save_path = /tmp >> session.use_cookies = 1 >> (...) >> >> Problem: When I run PHP script which uses sessions (commands like > session_start() >> etc.) the session file IS created in /tmp BUT cannot be received and >> added to my URL. My browser (IE5.5PL SP1) receives message: >> >> Warning: Failed to write session data (files). Please verify that >> the current setting of session.save_path is correct (/tmp) in >> I:\(...)\test.php on line 0 >> >> I checked. The session data was created! I CAN read them directly by >> another script also in PHP: >> >> (...) >> <? >> $fd = fopen("$path/$filename", "r") or die("<h3>Cannot read > $path/$filename</h3>"); >> print fread($fd, filesize("$path/$filename")); >> fclose($fd); >> ?> >> >> It seams very strange. PHP do create session data but display error >> "Failed to write". What can be incorrect with session.save_path? I >> checked, the session data is created correctly. I can read that file. >> What is goin' on? Anybody can help? >> -- >> Jarek
attached mail follows:
stop a file called foo.bar from being downloaded with a web server ?
Say you'r web site's name is foobar.net.
..and...
Script-kiddy Johny knows that, but also knows that you'r secret file is called foo.bar and it is saved in the root dir. of you'r web site.
in a http browser little Johny can simply type in http://www.foobar.net/foo.bar" to download it, since the web server (i am on) will trigger the clients download box to open, because its not a wrapped extension, or php, or htm, or so .
I have looked into the .htaccess file and added the directive IndexIgnore *.* there'r millions of directives and i am looking at them now,
But please tell me if there IS NOT a directive I can add to the htacces file to keep "little Johny" from downloading the file. Because then i might just look the whole day long for nothing !
Thanx a lot for your time
Ben
enjoy the day :-)
attached mail follows:
See:
http://httpd.apache.org/docs/mod/core.html#files
- Tim
On 03 Aug 2001 11:22:06 +0200, void wrote: > stop a file called foo.bar from being downloaded with a web server ?
attached mail follows:
on 8/3/01 4:22 AM, void at ben
hvc.co.za wrote:
> stop a file called foo.bar from being downloaded with a web server ? > > Say you'r web site's name is foobar.net. > > ..and... > > Script-kiddy Johny knows that, > but also knows that you'r secret file is called foo.bar > and it is saved in the root dir. of you'r web site.
Does it need to be in the website's root directory? If you stick it off to the side, no one will be able to access it via http. If you need this file for php stuff, use an include to stick it in there.
I know that's not what you asked, but it's worth a try.
Matt
attached mail follows:
Dear friends,
Any one of you know when PHP Manual in PDF Format will be available?
Thanks
Pere
attached mail follows:
At 03.08.2001 10:36, Pere Vineta wrote: >Dear friends, > >Any one of you know when PHP Manual in PDF Format will be available? > >Thanks
Probably when Adobe stops picking on innocent cryptographers pointing out weaknesses in their software and stops hiding the source for what they forced through as the defacto standard for document distribution...
;-)
--
Andreas D Landmark / noXtension
Real Time, adj.:
Here and now, as opposed to fake time, which only occurs there
and then.
attached mail follows:
You can get here:
http://monica.inf.ufsc.br/Docs/MySQL.pdf
see you.
Augusto
On Fri, 3 Aug 2001, Andreas D. Landmark wrote:
> At 03.08.2001 10:36, Pere Vineta wrote:
> >Dear friends,
> >
> >Any one of you know when PHP Manual in PDF Format will be available?
> >
> >Thanks
>
> Probably when Adobe stops picking on innocent cryptographers pointing out
> weaknesses in their software and stops hiding the source for what they forced
> through as the defacto standard for document distribution...
>
> ;-)
>
>
> --
> Andreas D Landmark / noXtension
> Real Time, adj.:
> Here and now, as opposed to fake time, which only occurs there
> and then.
>
>
> --
> 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:
Er, that's a MySQL manual and it doesn't have much in terms of php coding i n it, IIRC.
GP
----- Original Message -----
From: Augusto Cesar Castoldi <castoldi
inf.ufsc.br>
To: Andreas D. Landmark <andreas.landmark
noxtension.com>
Cc: <php-general
lists.php.net>
Sent: Friday, August 03, 2001 3:51 PM
Subject: Re: [PHP] PHP Manual in PDF Format
> You can get here:
>
> http://monica.inf.ufsc.br/Docs/MySQL.pdf
>
> see you.
>
> Augusto
>
> On Fri, 3 Aug 2001, Andreas D. Landmark wrote:
>
> > At 03.08.2001 10:36, Pere Vineta wrote:
> > >Dear friends,
> > >
> > >Any one of you know when PHP Manual in PDF Format will be available?
> > >
> > >Thanks
> >
> > Probably when Adobe stops picking on innocent cryptographers pointing
out
> > weaknesses in their software and stops hiding the source for what they
forced
> > through as the defacto standard for document distribution...
> >
> > ;-)
> >
> >
> > --
> > Andreas D Landmark / noXtension
> > Real Time, adj.:
> > Here and now, as opposed to fake time, which only occurs there
> > and then.
> >
> >
> > --
> > 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
_________________________________________________________
Do You Yahoo!?
Get your free
yahoo.com address at http://mail.yahoo.com
attached mail follows:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
I can't seem to get the bind() socket function to work. Every time i try to bind a socket i get 'Invalid argument'.
I know that the manual says that this module is EXPERIMENTAL and that ANYTHING can change WITHOUT NOTICE. But hopefully somebody will know what i have to do to get it to work :-)
I have attached the code that i'm currently using so that you can see what is going on.
Thanks, William.
-----BEGIN PGP SIGNATURE----- Version: PGPfreeware 5.0i for non-commercial use Charset: noconv
iQA/AwUBO2pxra39EoU2VrU1EQKTnwCfQo63BKgPaup4aEphTrwgsY/0+/MAoMfC N/QVSnNYzLoIDMRcDg2360gB =qTnU -----END PGP SIGNATURE-----
- TEXT/PLAIN attachment: cw.php
attached mail follows:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello again.
Just been lookng at the php bug list and there is indeed a problem with bind() under freeBSD. It does however state that you can not specify what port you want it to listen on and than it will then bind to the next port available, so what i need to know is how do i find out what port it is bound to?
Thanks, William.
-----BEGIN PGP SIGNATURE----- Version: PGPfreeware 5.0i for non-commercial use Charset: noconv
iQA/AwUBO2qd5a39EoU2VrU1EQKqfQCgm3NOtcvKf65s82lB36GWjo38mhUAoOd3 2lMqcrs1vjpx/fiv+L37HmP7 =Xf+J -----END PGP SIGNATURE-----
attached mail follows:
Hello: I'm looking for the formal grammar definition for PHP, Do you know where I can find it? I'm trying to make a parser for it.
Best Regards. ------------------------------------------------ QaDRAM, RAD development for the WEB http://www.qadram.com
VCLCrawler.com, your VCL search engine http://www.vclcrawler.com
W2Kwm, Windows 2000 interface for XWindow http://www.vclcrawler.com/w2kwm/index.htm
delphi.deeuropa.net, enlaces revisados sobre Delphi http://delphi.deeuropa.net
ebnoud.com, El Boletín No Oficial de Usuarios de Delphi http://www.ebnoud.com
attached mail follows:
On Wed, Aug 01, 2001 at 01:01:14PM -0500, Michael Champagne wrote:
> I have a popup window that populates a table with rows from a database and it
> normally takes about 15 to 20 seconds to load. Does anyone know how I can
> display a 'Loading... Please Wait.' that will disappear once the data comes
> up?
>
> Thanks in advance for any responses,
> Mike
>
> --
> 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
Hi,
Here's the code that I use... Works in both IE and NS:
============[ code ]============ <HTML> ...<header and stuff>... <BODY onload=" if (IE) { wait.style.display = 'none'; } else { document.layers['wait'].visibility='hidden'; }"> <DIV style="position: absolute; left: 0; top: 0; width: 100%; height: 100%; cursor: wait;" id="wait"> <TABLE border="0" width="100%" height="100%"> <TR> <TD width="100%" valign="middle" align="center"> One moment please... <BR> <BR> <BR> Loading directory listing </TD> </TR> </TABLE> </DIV> ...<the rest of the page (reason of wait screen) >... </BODY> </HTML>
==========[ end code ]==========
NOTE: You should change 'if (IE)' to something usefull. If you just copy/paste this code, you'll get a javascript-error because IE isn't defined (it is on my site, :-)).
Hope you can use this!
--* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renze
datalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««
attached mail follows:
Can somebody explain to me the undefined offset warning?
Warning: Undefined offset: 8 in D:\filepath\CalendarClass.php on line 387
It was working fine on linux, but when i moved to iis 5.0 running php i got this error.
Regards, Johnny Nguyen
attached mail follows:
<?php $test[0] = 0; $test[1] = 1; echo $test[8]; ?>
you never defined test[8] thats why its undeined. more likley then not check in your php.ini file, i bet you have
warning = ~E_WARNINGS E_ALL; in your linux box and warning = E_ALL; in your win box.
I like all warnings and errors showing, personal opinion.
--Chris Lee lee
mediawaveonline.com
"Johnny Nguyen" <johnny
zugara.com> wrote in message news:MLEOIBNOMCMGHDKJLMCAGEAHCBAA.johnny
zugara.com... > Can somebody explain to me the undefined offset warning? > > Warning: Undefined offset: 8 in D:\filepath\CalendarClass.php on line 387 > > It was working fine on linux, but when i moved to iis 5.0 running php i got > this error. > > Regards, > Johnny Nguyen >
attached mail follows:
I'm still trying to transfer a directory form one server to another but with no results. I have the username and password of the ftp account source and I know I'll have to ask for the username and password of the destination. I can't simply upload or copy the directory, but there must have an alternative way. I know I have been asking a lot of questions and I already asked this one, but I'm new with php and we can't learn everything from books, so...
attached mail follows:
Message-Id: <5.0.2.1.0.20010803105839.0263eae0
pop1.ns.sympatico.ca>
Date: Fri, 03 Aug 2001 11:01:48 -0300
To: "Eduardo Kokubo" <kokubo
inf.univali.br>,<php-general
lists.php.net>
From: Miles Thompson <milesthompson
ns.sympatico.ca>
Cc: "Eduardo Kokubo" <kokubo
inf.univali.br>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; formatowed
Subject: Re: [PHP] again
Eduardo,
Are you trying to do this in PHP or interactively? If with PHP I won't be much help, as the I've not used its FTP functions. Otherwise it's a straightforward FTP operation.
There may be a problem doing it from within PHP as the webserver is probably running as "nobody", who usually, and properly, has zilch for permissions.
Not much help - Miles
At 10:11 AM 8/3/01 -0300, Eduardo Kokubo wrote: >I'm still trying to transfer a directory form one server to another but >with no results. >I have the username and password of the ftp account source and I know I'll >have to ask for the username and password of the destination. I can't >simply upload or copy the directory, but there must have an alternative >way. I know I have been asking a lot of questions and I already asked this >one, but I'm new with php and we can't learn everything from books, so...
attached mail follows:
I'm trying to it using PHP. I tried to use ftp_nlist to know the names of the files and transfer them, but I think I need more than just the names and locations of the files. Besides, I have to transfer the name of the subdirectory too.
> Eduardo,
>
> Are you trying to do this in PHP or interactively? If with PHP I won't be
> much help, as the I've not used its FTP functions. Otherwise it's a
> straightforward FTP operation.
>
> There may be a problem doing it from within PHP as the webserver is
> probably running as "nobody", who usually, and properly, has zilch for
> permissions.
>
> Not much help - Miles
>
> At 10:11 AM 8/3/01 -0300, Eduardo Kokubo wrote:
> >I'm still trying to transfer a directory form one server to another but
> >with no results.
> >I have the username and password of the ftp account source and I know
I'll
> >have to ask for the username and password of the destination. I can't
> >simply upload or copy the directory, but there must have an alternative
> >way. I know I have been asking a lot of questions and I already asked
this
> >one, but I'm new with php and we can't learn everything from books, so...
>
>
> --
> 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 need PHP developers for potential big project. The site is extremely big with ecommerce, membership areas...
If you're interested, please reply to me with a plaintext resume and the URLs of sites you've built in PHP. Also, I'd like to know your rate.
Thanks, Jack.
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
attached mail follows:
./configure --with-imap --with-sybase=/opt/sybase -with-apxs -with-mysql --w ith-kerberos --with-imap-ssl --enable-track-vars --enable-force-cgi-redirect --with-gettext
I added the kerberos option to it. This time it comes up with a message that the c-client.a does not support SSL....
How do I recompile c-client.a to support SSL?
"Adrian D'Costa" <adrian
pcsadvt.com> wrote in message
news:Pine.LNX.4.21.0108021304210.2328-100000
pcs.pcsadvt.com...
> From your mail it seems to install properly. Find out where libphp4.so is
> and set the exact path. In my case /etc/httpd/modules. I had the same
> problem once I set the path it works.
>
> Adrian
>
> On Wed, 1 Aug 2001, Christopher Cheng wrote:
>
> > I am new to using PHP with IMAP?
> > As I recompile PHP, I use
> >
> > rm config.cache
> >
./configure --enable-track-vars --enable-force-cgi-redirect --with-gettext -
> > -with-mysql --with-sybase=/opt/sybase --with-apxs --with-imap
> > make
> > make install
> >
> > After I restart Apache, it says that
> > Cannot load /www/libexec/libphp4.so into server:
/www/libexec/libphp4.so:
> > undefined symbol: gss_mech_krb5
> >
> > Does it mean that I miss the DIR option after "--with-imap"? I am using
> > Redhat 6.2, what should it always be?
> >
> >
> >
>
attached mail follows:
Hi.
I'm using the timestamp format (AAMMDDHHMMSS) on my session.
how can I know the minutes between two dates.
I'm doing:
$date = $row_secao['date']; $date_now=date("ymdHis"); $x=$date_atual-$date; if ($x > 1000) { echo "Session expired."; }
but I have a problem when turns the hour, like this:
date=010803105958 date_now=010803110518
the sub is 4500 (45 minutes!), but in fact, the real time between is 6 minutes...
thanks.
Augusto
attached mail follows:
RedHat 6.2 / Apache 1.3.14 w/ matching modssl and openssl 0.9.6b Latest SDK (3.0?) for Linux.
---- Hello all!Problem is this: PHP compiles just fine with "--with-pfpro=shared,/home/verisign/payflowpro/linux" ... but I keep getting "Fatal error: Call to undefined function: pfpro_init()" when trying to initialize or "pfpro_version()" when I try to call it's version function.
I know something's working during the compile since it adds the "bin" to the end of my include statement ... "-I/home/verisign/payflowpro/linux/bin", and I see the make process go in and make a couple of things in the "ext/pfpro" directory.
Output from configure: "checking whether to include Verisign Payflow Pro support... yes, shared" .
Inside the 'linux' directory of payflowpro, the header and the lib file is there as well as it being in their respective lib and bin directory.
I also copied the header file in /usr/local/include and the library in /usr/local/lib, with adding /usr/local/lib in /etc/ld.so.conf and reran ldconfig.
What I am doing wrong here? I can execute a shell script and authorize just fine, so I *think* the ENV variables are ok.
Is this right? "--with-pfpro=shared,/home/verisign/payflowpro/linux" ??
Thanks and I appreciate any help out there!
----- Graham Wooden, R.H.C.E. Systems Engineer | Web Services/Development graham
tridia.com | 770.428.5000 Tridia Corp | www.tridia.com
attached mail follows:
hi,
i've got a calendar and i produce a month sort of outlook / filofax view that shows the user's appointments for that month.
the way i was building it was but defining ADAY in the following manner:
define("ADAY", (60*60*24) );
once i'd done evrything i needed to do i incremented the timestamp for the day by ADAY.
all seemed ok but then one of the users pointed out that October 28th appeared twice and then month had 32 days in for this year.
after a bit of head scratching we realised that the clocks go forward (any foreign readers please excuse the rediculous way the british time system works) and technicallay i guess october 24th has 25 hours. thus the time was incremented to a stamp within the same day.
redfining the stamp as
$start3=mktime(0,0,0,$dayArray[mon],$dayArray[mday]+1,$dayArray[year]);
does work however ?
is it php or the server that's at fault ?
Steve
attached mail follows:
I'm in the exact same position. It's definitely not a PHP problem.
The problem with the way you're redefining your timestamp is that you may get January 32, June 31st, etc.
I'm tempted to simply check for spring-forward and fallback before I advance the timestep, but that's one extra if statement as much as 31 times in one month. 1000 people generating the calendar would create 31000 extra if statements, unless I get a Cache solution. There should definitely be a PHP function for getNextDay(), but until then, I'm going to use the extra if statement.
regards, Johnny Nguyen
-----Original Message-----
From: Steve Brett [mailto:steve.brett
e-mis.com]
Sent: Friday, August 03, 2001 7:56 AM
To: php-general
lists.php.net
Subject: [PHP] php date bug ?
hi,
i've got a calendar and i produce a month sort of outlook / filofax view that shows the user's appointments for that month.
the way i was building it was but defining ADAY in the following manner:
define("ADAY", (60*60*24) );
once i'd done evrything i needed to do i incremented the timestamp for the day by ADAY.
all seemed ok but then one of the users pointed out that October 28th appeared twice and then month had 32 days in for this year.
after a bit of head scratching we realised that the clocks go forward (any foreign readers please excuse the rediculous way the british time system works) and technicallay i guess october 24th has 25 hours. thus the time was incremented to a stamp within the same day.
redfining the stamp as
$start3=mktime(0,0,0,$dayArray[mon],$dayArray[mday]+1,$dayArray[year]);
does work however ?
is it php or the server that's at fault ?
Steve
-- 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:
as far as i know adding 1 day to the day value of the timestamp will increment the month as well.
adding i day to july 31st will give august 1st.
if you need it i'll send you my code whihc now works.
i think gmmktime() would also have worked.
Steve
"Johnny Nguyen" <johnny
zugara.com> wrote in message
news:MLEOIBNOMCMGHDKJLMCAOEALCBAA.johnny
zugara.com...
> I'm in the exact same position. It's definitely not a PHP problem.
>
> The problem with the way you're redefining your timestamp is that you may
> get January 32, June 31st, etc.
>
> I'm tempted to simply check for spring-forward and fallback before I
advance
> the timestep, but that's one extra if statement as much as 31 times in one
> month. 1000 people generating the calendar would create 31000 extra if
> statements, unless I get a Cache solution. There should definitely be a
PHP
> function for getNextDay(), but until then, I'm going to use the extra if
> statement.
>
> regards,
> Johnny Nguyen
>
> -----Original Message-----
> From: Steve Brett [mailto:steve.brett
e-mis.com]
> Sent: Friday, August 03, 2001 7:56 AM
> To: php-general
lists.php.net
> Subject: [PHP] php date bug ?
>
>
> hi,
>
> i've got a calendar and i produce a month sort of outlook / filofax view
> that shows the user's appointments for that month.
>
> the way i was building it was but defining ADAY in the following manner:
>
> define("ADAY", (60*60*24) );
>
> once i'd done evrything i needed to do i incremented the timestamp for the
> day by ADAY.
>
> all seemed ok but then one of the users pointed out that October 28th
> appeared twice and then month had 32 days in for this year.
>
> after a bit of head scratching we realised that the clocks go forward (any
> foreign readers please excuse the rediculous way the british time system
> works) and technicallay i guess october 24th has 25 hours. thus the time
was
> incremented to a stamp within the same day.
>
> redfining the stamp as
>
> $start3=mktime(0,0,0,$dayArray[mon],$dayArray[mday]+1,$dayArray[year]);
>
> does work however ?
>
> is it php or the server that's at fault ?
>
> Steve
>
>
>
> --
> 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 wasn't sure if mktime(0,0,0,1,32,2001) would work.
BUT!!! I stand corrected. you are absolutely right. PHP is smart enough to know that January 32nd is really February first. :)
Next Time I'll test the code before i respond.
Johnny Nguyen
-----Original Message-----
From: Steve Brett [mailto:steve.brett
e-mis.com]
Sent: Friday, August 03, 2001 8:33 AM
To: php-general
lists.php.net
Subject: Re: [PHP] php date bug ?
as far as i know adding 1 day to the day value of the timestamp will increment the month as well.
adding i day to july 31st will give august 1st.
if you need it i'll send you my code whihc now works.
i think gmmktime() would also have worked.
Steve
"Johnny Nguyen" <johnny
zugara.com> wrote in message
news:MLEOIBNOMCMGHDKJLMCAOEALCBAA.johnny
zugara.com...
> I'm in the exact same position. It's definitely not a PHP problem.
>
> The problem with the way you're redefining your timestamp is that you may
> get January 32, June 31st, etc.
>
> I'm tempted to simply check for spring-forward and fallback before I
advance
> the timestep, but that's one extra if statement as much as 31 times in one
> month. 1000 people generating the calendar would create 31000 extra if
> statements, unless I get a Cache solution. There should definitely be a
PHP
> function for getNextDay(), but until then, I'm going to use the extra if
> statement.
>
> regards,
> Johnny Nguyen
>
> -----Original Message-----
> From: Steve Brett [mailto:steve.brett
e-mis.com]
> Sent: Friday, August 03, 2001 7:56 AM
> To: php-general
lists.php.net
> Subject: [PHP] php date bug ?
>
>
> hi,
>
> i've got a calendar and i produce a month sort of outlook / filofax view
> that shows the user's appointments for that month.
>
> the way i was building it was but defining ADAY in the following manner:
>
> define("ADAY", (60*60*24) );
>
> once i'd done evrything i needed to do i incremented the timestamp for the
> day by ADAY.
>
> all seemed ok but then one of the users pointed out that October 28th
> appeared twice and then month had 32 days in for this year.
>
> after a bit of head scratching we realised that the clocks go forward (any
> foreign readers please excuse the rediculous way the british time system
> works) and technicallay i guess october 24th has 25 hours. thus the time
was
> incremented to a stamp within the same day.
>
> redfining the stamp as
>
> $start3=mktime(0,0,0,$dayArray[mon],$dayArray[mday]+1,$dayArray[year]);
>
> does work however ?
>
> is it php or the server that's at fault ?
>
> Steve
>
>
>
> --
> 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:
Just to throw one more unwelcome cat amongst the pigeons..
Different countries/time zones have summer time, I think almost all countries do, but the actual days when they switch vary from country (yes I know, bloody nusiance isn't it?)
I know as an example of this theres about three weeks of the year where new york is 6 hours behing UK, and the rest its only 5.
HTH
----- Original Message -----
From: "Johnny Nguyen" <johnny
zugara.com>
To: "Steve Brett" <steve.brett
e-mis.com>; <php-general
lists.php.net>
Sent: Friday, August 03, 2001 4:25 PM
Subject: RE: [PHP] php date bug ?
> I'm in the exact same position. It's definitely not a PHP problem.
>
> The problem with the way you're redefining your timestamp is that you may
> get January 32, June 31st, etc.
>
> I'm tempted to simply check for spring-forward and fallback before I
advance
> the timestep, but that's one extra if statement as much as 31 times in one
> month. 1000 people generating the calendar would create 31000 extra if
> statements, unless I get a Cache solution. There should definitely be a
PHP
> function for getNextDay(), but until then, I'm going to use the extra if
> statement.
>
> regards,
> Johnny Nguyen
>
> -----Original Message-----
> From: Steve Brett [mailto:steve.brett
e-mis.com]
> Sent: Friday, August 03, 2001 7:56 AM
> To: php-general
lists.php.net
> Subject: [PHP] php date bug ?
>
>
> hi,
>
> i've got a calendar and i produce a month sort of outlook / filofax view
> that shows the user's appointments for that month.
>
> the way i was building it was but defining ADAY in the following manner:
>
> define("ADAY", (60*60*24) );
>
> once i'd done evrything i needed to do i incremented the timestamp for the
> day by ADAY.
>
> all seemed ok but then one of the users pointed out that October 28th
> appeared twice and then month had 32 days in for this year.
>
> after a bit of head scratching we realised that the clocks go forward (any
> foreign readers please excuse the rediculous way the british time system
> works) and technicallay i guess october 24th has 25 hours. thus the time
was
> incremented to a stamp within the same day.
>
> redfining the stamp as
>
> $start3=mktime(0,0,0,$dayArray[mon],$dayArray[mday]+1,$dayArray[year]);
>
> does work however ?
>
> is it php or the server that's at fault ?
>
> Steve
>
>
>
> --
> 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:
Hi:
I'm coding my first programs in PHP using MySQL in Windows. I instaled the Xitami Web Server for Windows.
I have a simple table "catalog" that includes 3 fields and one php script that insert records into the table "catalog" using a the label <FORM> and it works ok.
I have another php script that print a the records in a table of HTML and it doesn't work correctly. The fisrt time I run this code works Ok, but then I go to add a new record using the fisrt code and then return to scrip that print the table and it doesn´t consider the last records I added. I make the consult in mysql.exe and effectively there are the new records. I have to suthdown the server and start again and the second script work correclty.
I have been locking how to solve this problem by myself but a couldn´t. I think that it's a basic problem but I'm beginning in this programs.
If somebody can help me i would be thankful.
Thanks. George Tamez
attached mail follows:
Message-ID: <20010803160359.42167.qmail
pb1.pair.com>
To: php-general
lists.php.net
From: "Steve Brett" <steve.brett
e-mis.com>
Date: Fri, 3 Aug 2001 17:02:21 +0100
Subject: Re: Error using databases
check the cache settings in IE and change to check for new version always.
sounds like you're reading a cached version of your page.
Steve
<Jorge Fernando Tamez Seceñas> wrote in message
news:AD884EB95C9AD4118EC100D0B7BA33E204CE84BB
mtypr01.banorte.gfnorte...
Hi:
I'm coding my first programs in PHP using MySQL in Windows. I instaled the Xitami Web Server for Windows.
I have a simple table "catalog" that includes 3 fields and one php script that insert records into the table "catalog" using a the label <FORM> and it works ok.
I have another php script that print a the records in a table of HTML and it doesn't work correctly. The fisrt time I run this code works Ok, but then I go to add a new record using the fisrt code and then return to scrip that print the table and it doesn´t consider the last records I added. I make the consult in mysql.exe and effectively there are the new records. I have to suthdown the server and start again and the second script work correclty.
I have been locking how to solve this problem by myself but a couldn´t. I think that it's a basic problem but I'm beginning in this programs.
If somebody can help me i would be thankful.
Thanks. George Tamez
attached mail follows:
Hi, I had been using an INNER JOIN statement for a MySQL query, which worked fine. However, my new ISP does not have the latest version of MySQL. The version they have does not support conditions for Inner Join statements, so I have tried switching to a Left Join instead. However, the Left Join query takes 12.15 sec (which is obviously far too slow). The Inner join statement, meanwhile, completed the query in 0.04. Any idea why??
Here are the two statements (fast):
SELECT i.id, i.title, i.description FROM dir_items i INNER JOIN dir_assoc a ON a.itemid=i.id WHERE a.parentid=59 AND a.ex=0
Here are the two statements (slow):
SELECT i.id, i.title, i.description FROM dir_items i LEFT JOIN dir_assoc a ON a.itemid=i.id WHERE a.parentid=59 AND a.ex=0
Regards,
- James
Editor, VB Web
==================
Web - http://www.vbweb.co.uk
Email - james
vbweb.co.uk
ICQ# - 60612011
Fax - +44(0)8707052859
==================
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]