RE: [PHP] Variables
That's IMPOSIBLE! -Original Message- From: James Bartlett [mailto:[EMAIL PROTECTED]] Sent: 11 iulie 2001 05:27 To: [EMAIL PROTECTED] Subject: Re: [PHP] Variables I have tried that also...it still does not want to work... - Original Message - From: Dallas K. To: James Bartlett ; [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 5:43 AM Subject: Re: [PHP] Variables don't use the quotes if($test1 == $test2) {echo True; } else {echo False; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] What the heck is this
I've done quite a bit of php coding in the past few months but never had the need to use this and therefore never learned anything about it. It's hard to ask about it because i have NO idea what it is at all. Is it to give spanning values? I was woundering if anyone knew specifically what it did. -Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: MAIL to a Bcc: ???
How do I change the value of the TO: in a mail() function to a value of Bcc: ? Or at least trick the mail to a Bcc:So the recipients emails aren't shown? if you use a database to manage the emails to be sent to, perhaps you could create a repeating statement that sends mail to each person seperatly? ?php $mail = mysql_query(SELECT user_email FROM mailing_list); while ($mailarray = mysql_fetch_array($mail)) { mail($mailarray[user_email], $subject, $content); } ? something like that? -Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] What the heck is this
When all else fails, check the mainual; http://www.php.net/manual/en/language.oop.php appears to be an instance reference (not sure that is the term). Warren Vail -Original Message- From: Adam [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 11:35 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] What the heck is this I've done quite a bit of php coding in the past few months but never had the need to use this and therefore never learned anything about it. It's hard to ask about it because i have NO idea what it is at all. Is it to give spanning values? I was woundering if anyone knew specifically what it did. -Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Ann: New QaDRAM Release! B342
QaDRAM 1.0 FIELD TEST 1 BUILD 342 Hello: I proud to announce the next release of QaDRAM! You can download it from http://www.qadram.com in the Downloads section. In a few days I will publish some samples I have made on the usage of each object. Feel free to send me any question you have. The main changes in this release are: *06/09/2001 - Added a new component TVSShape *06/10/2001 - Added a new component TVSSysData *06/11/2001 - Component List added *06/14/2001 - Added a new component, TVSSpeedButton *06/14/2001 - New component added, TVSBevel *06/15/2001 - Added a new component, RadioGroup *06/15/2001 - Added a new property to HTMLPage, Actions *06/16/2001 - Added a new component, BitBtn *06/16/2001 - Added a new component, DrawGrid *06/25/2001 - Added a new component, StringGrid *06/25/2001 - Added a new component, Timer *06/30/2001 - A basic online help added, just select a component on the palette or in the designer and press F1 *07/02/2001 - Added multi database support on PHP using ADODB *07/04/2001 - Added almost complete DWS support DWS Support- Now I support DelphiWebScript, a wonderful scripting language from http://www.dwscript.com Best Regards. QaDRAM, RAD development for the WEB http://www.qadram.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to fetch a group by Query?
Couldn't you just do something like: ? $rows = mysql_query(SELECT * FROM table ORDER BY category, title); while ($row = mysql_fetch_array($rows)) { if ($row[title] $last) print b$row[category]/bbr\r\n; print li$row[title]/libr\r\n; $last = $row[title]; } ? /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Tim Ward [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Frédéric Mériot [EMAIL PROTECTED]; PHP General List [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 4:00 AM Subject: RE: [PHP] How to fetch a group by Query? this is the sort of thing I usually do ... $result = mysql_query($db, SELECT * FROM filename...) while ($array = mysql_fetch_array($result)) $category[$array[category]][] = $array[title]; foreach ($category as $cat=$title_array) { echo(Category $catbr); foreach ($title_array as $title) echo( - $titlebr); } a lot simpler and you don't have to worry about any start and end conditions. This can also be extrapolated to more complex situations, e.g. where $title contains more than just a name you can do sub totals of title quantities by category, or whatever. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html -Original Message- From: David Robley [mailto:[EMAIL PROTECTED]] Sent: 11 July 2001 02:17 To: Frédéric Mériot; PHP General List Subject: Re: [PHP] How to fetch a group by Query? On Tue, 10 Jul 2001 22:10, Frédéric Mériot wrote: Hello (again) I've got a query which extract titles and categories with a group by on the categorie. Is there a simple way to display rows like this (without doing a second query ): Categorie A -titi -toto -tutu Categorie B -bibi -nini -fififi Categorie C -titi -toto -tutu ... etc With cold fusion (for those who know) I want to do the same as CFOUTPUT QUERY=myquery GROUP=categorie Thanks Select category, description from table where whatever order by category, description Then when you display the rows, keep track of the current and previous value of $description; if it changes, print the new value. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Don't stop posting, a good laugh breaks up my day nicely -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] need help on system()
I run the php script as following: ?php //test.php system(/usr/bin/sudo /usr/bin/quota -v test) ? php test.php - I can get the output in the browser: http://localhost/test.php - I cannot see any output However, ?php system(finger); ? I can both get the output in the console and browser. Does anybody know the reasons? Thank you very much! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Object oriented if statements
Problem solved, thanks to Lasse. (There was white space in the field, and trim sorted it out) Thanks very much for your help. --- Regards John Patterson Patterson Liddle Bath phone fax +44 1225 426722 [EMAIL PROTECTED] www.pattersonliddle.com
[PHP] Re: exec(), system() and :(
Thank for your reply BUT the solution you proposed me does NOT apply, because eval() is for evaluating strings as if they were codes, moreover the somescript.php would have to be readapted : please note that the script takes the arguments via argc (commandline arguments). Eval() is not suitable for running external (and may be big) script file which takes in input the arguments via $HTTP_SERVER_VARS['argv']; otherwise I would have used include() !! The problem is open: the behaviour that I stated below is very strange... could not understand why... Siva To: [EMAIL PROTECTED] From: elias [EMAIL PROTECTED] Date: Tue, 10 Jul 2001 08:45:51 -0700 Subject: Re: exec(), system() and Hmm... why don't try to use eval() read the PHP file from within your PHP script and eval the read file, Siva Subraj [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Dear list, I have a strange problem with the weird behaviour of exec() or system() When I do: exec('/usr/local/bin/php somescript.php if=infile.txt of=outfile.txt out_somescript '); in a script invoked by apache, it works perfectly - the somescript processes 'infile.txt' and produces 'outfile.txt' . BUT, if I take off the ampersand '' (ie I want to exec it and to wait for it to finish before going ahead), it does NOT work. I find an empty file 'out_somescript' and no 'outfile.txt' at all. I recompiled php (ELF binary in /usr/local/bin) without --enable-force-cgi-redirect --enable-safe-mode --enable-discard-path All files have universal read permission, the directory is writable by apache group. There is suExec module. I also tried system() to make a shell invocation. The problem persists: with it's ok, meanwhile without it doesn't execute the script. What is wrong? Please help me, thanks!! Siva -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: http referer
[EMAIL PROTECTED] (Jack) wrote: 1. (*) text/plain Dear folks I was told that http referer can tell me where the user come from. But it does not work all the time, is there anything else that work better than this? Jack [EMAIL PROTECTED] Love your I should work if the user have a referer, a user has only a referer if the user comes from another page to your page, because it dont work might be because the user entered your page directly? -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] re: Object oriented if statements
Problem solved, thanks to Lasse. (There was white space in the field, and trim sorted it out) Thanks very much for your help --- Regards John Patterson Patterson Liddle Bath phone fax +44 1225 426722 [EMAIL PROTECTED] www.pattersonliddle.com
[PHP] Sessions are so buggie in PHP ???
I have a problem with session thing. I have one script for logging into some user pages. But many users tell me that the script is... lossing the session_variables which are set. It's very strange because this is not for certain users, or browsers. It's very randomly. Today this happent for me also, I mean I was going into those pages, and one time the server lost the session_variables and the script told me that I'm not even logged. Why is this happening ? it's very very randomly, but its happening and not one time a day... some users reported me that they have to close totally the browser and then try to login again and this is not happening again. This problem is happening with any browser... any idea ? Plz help ! :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Newbie: how to upload files in safe mode?
Hello! My ISP is running PHP 4.0.1pl2 and it is set in safe mode. I want to have a form to upload images from any browser, but the safe mode restrictions seems to deny this. I have tried many different scripts, but no luck so far. PS. I checked the configuration with phpinfo() and here is the listing: './configure' '--with-apache=../apache_1.3.12' '--with-config-file-path=/usr/local/php' '--disable-debug' '--enable-safe-mode' '--enable-magic-quotes' '--with-zlib' '--with-gd=/usr/local' '--with-jpeg-dir=/usr' '--with-mysql=/usr/local' '--enable-sysvsem' '--enable-sysvshm' '--enable-memory-limit' Thanks AH -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Sessions are so buggie in PHP ???
For who knows about bugs with session in PHP, I have: PHP Version 4.0.4pl1 Marian [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a problem with session thing. I have one script for logging into some user pages. But many users tell me that the script is... lossing the session_variables which are set. It's very strange because this is not for certain users, or browsers. It's very randomly. Today this happent for me also, I mean I was going into those pages, and one time the server lost the session_variables and the script told me that I'm not even logged. Why is this happening ? it's very very randomly, but its happening and not one time a day... some users reported me that they have to close totally the browser and then try to login again and this is not happening again. This problem is happening with any browser... any idea ? Plz help ! :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: http referer
On 11-Jul-01 Henrik Hansen wrote: [EMAIL PROTECTED] (Jack) wrote: 1. (*) text/plain Dear folks I was told that http referer can tell me where the user come from. But it does not work all the time, is there anything else that work better than this? Jack [EMAIL PROTECTED] Love your I should work if the user have a referer, a user has only a referer if the user comes from another page to your page, because it dont work might be because the user entered your page directly? You wont get a referer on: 1. Header redirect 2. Direct entry (as above) 3. anonymous proxy filters out the headers 4. user install Privacy-protect software 5. The browser doesn't support it. From one of my larger sites: mysql select count(*) from stat; +--+ | count(*) | +--+ | 1391545 | +--+ 1 row in set (0.00 sec) mysql select count(*) from stat where urlid=5343192248684061102; +--+ | count(*) | +--+ | 348162 | +--+ 1 row in set (1.69 sec) mysql select (348162 / 1391545) *100.0; +---+ | (348162 / 1391545) *100.0 | +---+ | 25.02 | +---+ 1 row in set (0.00 sec) mysql select conv(PASSWORD('[NO REFERRING URL]'),16,10); ++ | conv(PASSWORD('[NO REFERRING URL]'),16,10) | ++ | 5343192248684061102| ++ 1 row in set (0.00 sec) So 25% of my traffic is not sending HTTP_REFERER ... YMMV. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] MAIL to a Bcc: ???
At 18:02 Uhr -0700 10.07.2001, Marcus James Christian wrote: Hello, How do I change the value of the TO: in a mail() function to a value of Bcc: ? Or at least trick the mail to a Bcc:So the recipients emails aren't shown? Hi Marcus, $headers=Bcc:[EMAIL PROTECTED]\n; $headers.=Subject: Your Subject\n; $msg=The Message; mail([EMAIL PROTECTED],Subject, will be overwritten...,$msg,$headers); BTW, You could have found that in the manual... best, Sebastian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] How to select a line from a web page source?
The simplest way I could think of would be to use a regex: /^(.*Jim.*)$/g (g=global) and then using $1 (the content of the parenthesis), this would give you the whole line containing Jim. Greets, remo ps: is perl syntax, needs to be adjusted for php... Hi there: I wanna select a line from a table which is in a php page resulted of a mysql_query So far what i have is a way to search the text from only line and then limit the characters in substr ( ) Thats a really wierd way to do it, i think, and my problem its the page im trying to do its a template wich gives me a difentent line depending of $user i choose. The code i have so far its this: $filename = http://localhost/all.php;; $fcontents = join('', file ($filename)); $first = strstr ($fcontents, $user); $rest = substr ($first, 0, 108); wich works for example if $user = guessit , but if I use $user = Jim doenst work anymore cause jim its a word smaller than guessit, and the limit 108 will give in that case characters of next line heres part of the source of the page where im trying to grab lines : trtdcow/tdtd align=center1/tdtd align=center54/tdtd align=center23/tdtd align=center77/td/tr trtdmer/tdtd align=center2/tdtd align=center44/tdtd align=center0/tdtd align=center44/td/tr trtdluis/tdtd align=center3/tdtd align=center40/tdtd align=center0/tdtd align=center40/td/tr trtdFlix/tdtd align=center4/tdtd align=center38/tdtd align=center7/tdtd align=center45/td/tr trtdRulerman/tdtd align=center5/tdtd align=center35/tdtd align=center0/tdtd align=center35/td/tr trtdJim/tdtd align=center6/tdtd align=center35/tdtd align=center13/tdtd align=center48/td/tr trtdguessit/tdtd align=center7/tdtd align=center35/tdtd align=center24/tdtd align=center59/td/tr trtdwomo/tdtd align=center8/tdtd align=center34/tdtd align=center23/tdtd align=center57/td/tr trtdjay/tdtd align=center9/tdtd align=center4/tdtd align=center4/tdtd align=center8/td/tr As u can see, guessit line is 4 characters longer than jim and the 108 limit wil give me in case of jim line 4 chars of next line. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: http referer
this is why I want to know if there is anyone know the better way than http_referer? Jack [EMAIL PROTECTED] Love your enemies, it will drive them nuts - Original Message - From: Maxim Maletsky [EMAIL PROTECTED] To: 'Henrik Hansen' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 5:00 AM Subject: RE: [PHP] Re: http referer ...or the site uses frames, ...or browser does not support HTTP_REFERER ...or... HTTP_REFERER is VERY unreliable. It is not server-side anymore, it is the data sent to you by browser in person, and with all the variety of browsers and the ways to navigate - it becomes uncontrollable. Maxim Maletsky -Original Message- From: Henrik Hansen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 5:55 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: http referer [EMAIL PROTECTED] (Jack) wrote: 1. (*) text/plain Dear folks I was told that http referer can tell me where the user come from. But it does not work all the time, is there anything else that work better than this? Jack [EMAIL PROTECTED] Love your I should work if the user have a referer, a user has only a referer if the user comes from another page to your page, because it dont work might be because the user entered your page directly? -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Joining a number of tables in a MySQL query
Hello, I'm trying to relate four tables within a single query and am running into difficulties. Heck, I don't even know if it is possible. Most of the explainations I see are for two tables, not four... So I'm trying to do something like this: SELECT address.city, address.state, bib.publisher, bib.title, bib.publicationDate, profile.firstName, profile.lastName, profile.organization, country.languageName FROMWLPbib bib JOIN ON WLPprofile profile USING (profileID) JOIN ON WLPaddress address USING (publisherID) JOIN ON WLPcountry country USING (countryID) I don't know how to express the following relationship in the query above: The tables WLPbib WLPprofile share the value profileID WLPbib and WLPaddress share the value publisherID WLPaddress and WLPcountry share the value countryID I also used JOIN ON, but didn't know if any of these others would be more appropriate: Cross Join select c.name, o.cid from orders o, clients c where o.cid = acm-042; equijoin select p.os, c.name from orders o, pcs p, clients c where p.pid=o.pid and o.pid = 1 and o.cid=c.cid; non-equijoin SELECT p.os, o.pid from orders o, pcs p where o.pid p.pid; Left Join select * from orders left join pcs on orders.pid = pcs.pid; select * from orders left join pcs on pcs.pid = 3 and orders.pid = pcs.pid; Using Option SELECT * from clients join on orders where clients.cid = orders.cid; SELECT * from clients join on orders using (cid); -- Mike Gifford, OpenConcept Consulting, http://openconcept.ca Offering everything your organization needs for an effective web site. Abolish Nuclear Weapons Now!: http://pgs.ca/petition/ It is a miracle that curiosity survives formal education. - A Einstein -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Getting the title of a web page
Hi, when I open a web page within my php-script with fopen(...) I only want to get back the title of the page. How can I do this? Heiko -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Newbie: how to upload files in safe mode?
I'm afraid you'll have to run your upload script as a cgi. try adding this to the top of your page: #!/usr/bin/php you'll probably have to change the file extention to .cgi and put the script in your cgi-bin (not sure about that). you should change ISP ,unless it's a free one you're using. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: http referer
[EMAIL PROTECTED] (Don Read) wrote: On 11-Jul-01 Henrik Hansen wrote: [EMAIL PROTECTED] (Jack) wrote: 1. (*) text/plain Dear folks I was told that http referer can tell me where the user come from. But it does not work all the time, is there anything else that work better than this? Jack [EMAIL PROTECTED] Love your I should work if the user have a referer, a user has only a referer if the user comes from another page to your page, because it dont work might be because the user entered your page directly? You wont get a referer on: 1. Header redirect 2. Direct entry (as above) 3. anonymous proxy filters out the headers 4. user install Privacy-protect software 5. The browser doesn't support it. I though every browser supported it, do you have an example on one that does not? -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Getting the title of a web page
? $f = fopen($fileName, 'r'); $s = fread($f, 1024); fclose($f); $pageTitle = eregi_replace('.*title', '', eregi_replace('/title.*', '', $s)); ? -Original Message- From: Heiko Wilms [mailto:[EMAIL PROTECTED]] Sent: 11 iulie 2001 13:32 To: [EMAIL PROTECTED] Subject: [PHP] Getting the title of a web page Hi, when I open a web page within my php-script with fopen(...) I only want to get back the title of the page. How can I do this? Heiko -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Getting the title of a web page
?preg_match(/\title\(.*)\\/title\/i, implode(, file(http://www.php.net/;)), $title);? ?=$title[1]? /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Heiko Wilms [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 6:32 AM Subject: [PHP] Getting the title of a web page Hi, when I open a web page within my php-script with fopen(...) I only want to get back the title of the page. How can I do this? Heiko -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Joining a number of tables in a MySQL query
SELECT WLPaddress.city, WLPaddress.state, WLPbib.publisher, WLPbib.title, WLPbib.publicationDate, WLPprofile.firstName, WLPprofile.lastName, WLPprofile.organization, WLPcountry.languageName FROM WLPbib LEFT JOIN WLPprofile ON WLPprofile.profileID = WLPbib.profileID LEFT JOIN WLPaddress ON WLPaddress.publisherID = WLPbib.publisherID LEFT JOIN WLPcountry ON WLPcountry.countryID = WLPaddress.countryID /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Mike Gifford [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 6:40 AM Subject: [PHP] Joining a number of tables in a MySQL query | Hello, | | I'm trying to relate four tables within a single query and am running into | difficulties. Heck, I don't even know if it is possible. Most of the | explainations I see are for two tables, not four... | | So I'm trying to do something like this: | | SELECT address.city, |address.state, | bib.publisher, | bib.title, | bib.publicationDate, | profile.firstName, | profile.lastName, | profile.organization, | country.languageName | FROM WLPbib bib | JOIN ON WLPprofile profile USING (profileID) | JOIN ON WLPaddress address USING (publisherID) | JOIN ON WLPcountry country USING (countryID) | | I don't know how to express the following relationship in the query above: |The tables WLPbib WLPprofile share the value profileID |WLPbib and WLPaddress share the value publisherID |WLPaddress and WLPcountry share the value countryID | | I also used JOIN ON, but didn't know if any of these others would be more | appropriate: | | Cross Join | select c.name, o.cid from orders o, clients c where o.cid = acm-042; | | equijoin | select p.os, c.name from orders o, pcs p, clients c where p.pid=o.pid and o.pid | = 1 and o.cid=c.cid; | | non-equijoin | SELECT p.os, o.pid from orders o, pcs p where o.pid p.pid; | | Left Join | select * from orders left join pcs on orders.pid = pcs.pid; | select * from orders left join pcs on pcs.pid = 3 and orders.pid = pcs.pid; | | Using Option | SELECT * from clients join on orders where clients.cid = orders.cid; | SELECT * from clients join on orders using (cid); | -- | Mike Gifford, OpenConcept Consulting, http://openconcept.ca | Offering everything your organization needs for an effective web site. | Abolish Nuclear Weapons Now!: http://pgs.ca/petition/ | It is a miracle that curiosity survives formal education. - A Einstein | | | -- | PHP General Mailing List (http://www.php.net/) | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | To contact the list administrators, e-mail: [EMAIL PROTECTED] | | | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: http referer
I though every browser supported it, do you have an example on one that does not? I Opera the user can choose to disable the use of referer /Soeren -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Reading the content.
Hi tere, Imagine that someone does the following post: ---8- POST /bla.php HTTP/1.0 host: bla.com content-type: text/xml content-length: ## ?xml blabla? bla /bla ---8- With what function, variable, server variable or whatever do I have access to that XML? I'm not concerned with the parsing, that is quite simple, I'm concerned with the access to that content!!! Gustavo Carreno -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: http referer
[EMAIL PROTECTED] (Soeren Nielsen) wrote: I though every browser supported it, do you have an example on one that does not? I Opera the user can choose to disable the use of referer ohh I did not know that, maybe be because I never tried it :) now i know :) -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] File upload content type problem
Hi all. This is the first time I write something to newsgroups. I've this problem: After upgrading PHP3 -PHP4 and changing the variables to array ($file_type - $HTTP_POST_FILES['file']['type'] ) The variables that are automatically created when uploading a $file have all worked properly exept the HTTP_POST_FILES['file']['type']. Also I've noticed that PHP is adding content type "image/gif" or "image/jpg" at the beginning of the binary data of uploaded files. I'm using PHP4 from php-4.0.4pl1-3.i386.rpm package. (excuse my poor english) -- Bye Prokop URL http://www.aki.cz/prokop/ e-mail mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Reading the content.
As far as I know, you don't. :-( /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Gustavo Carreno [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 6:54 AM Subject: [PHP] Reading the content. | Hi tere, | | Imagine that someone does the following post: | | ---8- | POST /bla.php HTTP/1.0 | host: bla.com | content-type: text/xml | content-length: ## | | ?xml blabla? | bla | /bla | ---8- | | With what function, variable, server variable or whatever do I have access | to that XML? | I'm not concerned with the parsing, that is quite simple, I'm concerned with | the access to | that content!!! | | Gustavo Carreno | | | | | | -- | PHP General Mailing List (http://www.php.net/) | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | To contact the list administrators, e-mail: [EMAIL PROTECTED] | | | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: examples of using PHP to control .htaccess
Once I was looking for a similar solution and found none enough powerful to my needs. Anyway this was the only satisfactory that I found: http://php.vamsi.net/show_source.php?url=htpasswd_admin.php Also if you have Perl/CGI, you can use this one (much better, including admin interface, and still free): http://www.awtrey.com/support/scripts/htpass.php There are tons more written in Perl, but they are paid. I made a search on hotscripts.com, lots of results and prices aroound 30 dollars: http://www.awtrey.com/support/scripts/htpass.php -- Julio Nobrega. Yes, another 'Portal-System': http://sourceforge.net/projects/toca Kurt Lieber [EMAIL PROTECTED] wrote in message 1b4301c109b7$bcaffd80$[EMAIL PROTECTED]">news:1b4301c109b7$bcaffd80$[EMAIL PROTECTED]... does anyone have/know of any existing code that allows PHP to control htaccess files? I'm aware of SPHPAT on sourceforge, but I'm looking for something a little more mature. I don't really have a set of requirements other than what I've already stated -- I'm just looking for some examples to help me roll my own. Thanks. --kurt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Newbie: how to upload files in safe mode?
I asked the ISP if I could do that, but they said: nope... Life is hard (and then you die). AH Adrian Murphy [EMAIL PROTECTED] wrote in message 003101c109f5$4b6f2fe0$02646464@ade">news:003101c109f5$4b6f2fe0$02646464@ade... I'm afraid you'll have to run your upload script as a cgi. try adding this to the top of your page: #!/usr/bin/php you'll probably have to change the file extention to .cgi and put the script in your cgi-bin (not sure about that). you should change ISP ,unless it's a free one you're using. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] need help on system()
I would do it this way . ? $quota = `/usr/bin/sudo /usr/bin/quota -v test`; // please mind that the command is between backtics and not quotes echo $quota; // It probably doesn't produce a nice looking output but you can change that yourself // This doesn't work when you have safe mode on in your php.ini file, because then // it doesn't allow commands to be run within backtics. ? Marc van Duivenvoorde At 04:21 PM 7/11/2001 +0800, you wrote: I run the php script as following: ?php //test.php system(/usr/bin/sudo /usr/bin/quota -v test) ? php test.php - I can get the output in the browser: http://localhost/test.php - I cannot see any output However, ?php system(finger); ? I can both get the output in the console and browser. Does anybody know the reasons? Thank you very much! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Question
Hi All, I have an e-mail message stored in the var $message How can I grep for say the From lines and such in $message using PHP. I tried using preg_grep, but I could not seem to get it to work. Thanks Jim G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] need help on system()
hhhm, I played around a little and found another solution which you might find usefull ? exec(/bin/ls -al /home/marcd,$ls); Array($ls); $max = sizeof($ls); $num = 0; while ($num = $max) { echo $quota[$num],br\n; $num++; } ? This way you can execute any command and put the output to an array, in the while loop you can print any line in the array. Marc van Duivenvoorde At 01:38 PM 7/11/2001 +0200, Marc van Duivenvoorde wrote: I would do it this way . ? $quota = `/usr/bin/sudo /usr/bin/quota -v test`; // please mind that the command is between backtics and not quotes echo $quota; // It probably doesn't produce a nice looking output but you can change that yourself // This doesn't work when you have safe mode on in your php.ini file, because then // it doesn't allow commands to be run within backtics. ? Marc van Duivenvoorde At 04:21 PM 7/11/2001 +0800, you wrote: I run the php script as following: ?php //test.php system(/usr/bin/sudo /usr/bin/quota -v test) ? php test.php - I can get the output in the browser: http://localhost/test.php - I cannot see any output However, ?php system(finger); ? I can both get the output in the console and browser. Does anybody know the reasons? Thank you very much! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Downloading Data from Database
I am adding a feature to my site where members can download their information from the database. What is the best way to accomplish this? Create a text file every time a member wants to download their info?I thought about this ..how would I handle deleting the text files when I was finished and what would prevent others from downloading the file? I read somewhere that files can be created on the fly or dynamically anytime a download takes place. This sounds like a good idea cause there wouldn't be any files on the server. Any idea where I can get more info on that? Thanks Randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Gettin' User Name
Is there a function that returns me the name of the user that is logged in the operating system? I wanaa put in my database the users name when he try to login thee application. thanks a lot Thiago ___ Mensagem enviada com Global Wide Webmail - www.globalwide.com.br -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: GetImageSize
Here is the function, but there is nothing wrong with the function I don't think. Here is the function: function GetURLImageSize($urlpic) { return GetImageSize($urlpic); } Here is how we call it: GetURLImageSize (http://www.domainname.com/admin/showimg.php?s=17type=categoryimage=70;); We did write the function like that for a reason... before PHP 4.0.x we used GetURLImageSize because GetImageSize didn't exist yet. blah blah blah... you know what I mean. ~matt Adam [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... For some reason, at random and without warning, the function just seems to stop working and does nothing but wait and timeout at 80 seconds. When you go to the page say www.somedomain.com it just waits and does not load anything for 80 seconds, and when it does, the images that use GetImageSize do not load. Example of the code perhaps? I've never had a problem with that function. -Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Cookie Expiry Dates?
I'd like to set a cookie that never expires or at least one that lasts a month, how can I set it? Does it have to be with time? I am using SetCookie. Jeff
RE: [PHP] Cookie Expiry Dates?
int setcookie (string name [, string value [, int expire [, string path [, string domain [, int secure]) expire = time() + 3600*24*30; Note that 'expire' is the client relative to GMT time. So, if the client has the local time set to 01/01/1985, your cookie will be born dead ;) -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: 11 iulie 2001 15:54 To: [EMAIL PROTECTED] Subject: [PHP] Cookie Expiry Dates? I'd like to set a cookie that never expires or at least one that lasts a month, how can I set it? Does it have to be with time? I am using SetCookie. Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Cookie Expiry Dates?
Hi Jeff, Yes, use time() Example 86400 seconds in a day. 3600 in an hour. Use some basic maths: $cookie_expire = time() * 86400 * 365; // Sets cookie for a year (365 days). James. Jeff Lewis [EMAIL PROTECTED] wrote in message 006101c10a08$874f93c0$76a1a8c0@LEWISJCIT">news:006101c10a08$874f93c0$76a1a8c0@LEWISJCIT... I'd like to set a cookie that never expires or at least one that lasts a month, how can I set it? Does it have to be with time? I am using SetCookie. Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] gettext functions
Hy, i would like to use the gettext functions but i have no hint, where i have to put the locale files and how to tell php where they are. Is ther any sample implementation available for this? Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: Cookie Expiry Dates?
you probably mean $cookie_expire = time() + 86400 * 365; -Original Message- From: James Holloway [mailto:[EMAIL PROTECTED]] Sent: 11 iulie 2001 16:02 To: [EMAIL PROTECTED] Subject: [PHP] Re: Cookie Expiry Dates? Hi Jeff, Yes, use time() Example 86400 seconds in a day. 3600 in an hour. Use some basic maths: $cookie_expire = time() * 86400 * 365; // Sets cookie for a year (365 days). James. Jeff Lewis [EMAIL PROTECTED] wrote in message 006101c10a08$874f93c0$76a1a8c0@LEWISJCIT">news:006101c10a08$874f93c0$76a1a8c0@LEWISJCIT... I'd like to set a cookie that never expires or at least one that lasts a month, how can I set it? Does it have to be with time? I am using SetCookie. Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Cookie Not Setting..
Ok, I've used cookies before and have never had a problem with them but for some reason this doesn't seem to be setting! Here is the start of the file called after logging in to my site. In another file I have echo $wwblCookie and have also tried echo $HTTP_COOKIE_VARS[wwblCookie] but no luck. ? // include function files for this application require_once(wwbl_functions.php); session_start(); if ($fuserID $fpassword) // they have just tried logging in { if (login($fuserID, $fpassword)) { // if they are in the database register the user id $CookieString = $fuserID; SetCookie (wwblCookie,PLEASE, time() + 86400 * 365);
[PHP] Re: include nubie question - need help
Thanks Rehuel: Yes I guess that is the name has not been typed the $user_name will be empty and the line is if($HTTP_POST_VARS[user_name]) { do something... } but I received this error Warning: Undefined index: user_name in H:\tenjo\public_html\sales\login.php on line 98 for the if line! i.e. if($HTTP_POST_VARS[user_name]) This is what is strange and I cannot undertand... Ivo Rehuel Lobato De Mesquita [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hey Ivo When PHP find an empty string, it returns this message In this case no one has logged in, so, it doesnot find user_name Include: Make sure the path of the file within the () is correct. So if the file is in the same directory, this might be good, but if it's in a different folder, you would need to specify that! Say it would be in /users, then It would be include(/users/login.htm); Try that, might work Rehuel Ivo Stoykov [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello I migrated to php 4.0.5 under windows IIS 5/win2000 AS The following line - if($HTTP_POST_VARS['user_name']) { ... WHATEVER ..} - returns me following error with and without global $HTTP_POST_VARS Warning: Undefined index: user_name in E:\10ioWebSite\sales\login.php on line 99 and the line - include (login.htm); returns following: Warning: Failed opening 'login.htm' for inclusion (include_path='.') in E:\10ioWebSite\sales\login.php on line 131 the php.ini sais: include_path = . both files are in the same dir. Any ideas? thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Undefined index?
Hi everybody Does anybody knows what means Undefined index error? I couldn't find it in docs neither in php online doc site. Thank you Ivo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] ODBC Function equivalent to MySql_Fetch_Array
Bob, Why doesn't odbc_fetch_into give you what you want? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Bob Horton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 1:23 AM To: [EMAIL PROTECTED] Subject: [PHP] ODBC Function equivalent to MySql_Fetch_Array Hi, I'm trying to write a function (see below) that will provide equivalent functionality between ODBC and MySQL for mysql_fetch_array based upon a preset variable. I've written something that works but A) I'm afraid it might be quite slow; and B) I'm hoping that there is an existing function to do it that I just didn't see! If there isn't an existing function ... how do I go about requesting it for a future release? One of the key things I was looking for was the field names in the associative array (Note: I already had ... and commented out ... the odbc_fetch_into function ... nice but not quite what I was wanting) Thanks. - function db_fetch_array($result) { global $db_type, $db_connection; if ($db_type == 1) : return mysql_fetch_array($result); else: $i = 0; $fCount = odbc_num_fields($result); $result_array = array(); if (odbc_fetch_row($result)) : while ($i $fCount) $i++; $fName = odbc_field_name($result, $i); $result_array[$fName] = odbc_result($result, $i); } // odbc_fetch_into ($conn, $result_array); return $result_array; else: return false; endif; endif; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] XSLT - sablot - 4.0.6
I have been looking around for this for all day, now I need your help. I just compiled php 4.0.6 with those extension: ./configure --enable-track-vars --with-gd=../gd-1.8.3 --with-swf=../php4-swf --with-mysql --enable-xslt --with-xslt-sablot=../Sablot-0.60 --with-apxs --enable-sablot-errors-descriptive Then by trying to use the stuff that I was working on before that, since the beginning of one of the first sablot extension, it doesn't work out, the function that I was using xslt_process seen to not work anymore, well not as I want. So I look around and find this from Sebastian Bergmann Coordinate with Sterling, but here you go: ext/sablotron is no longer beeing worked on and ext/xslt is the 'next generation' at http://marc.theaimsgroup.com/?l=php-devm=99454710008416w=2. Then I look in the CVS to see what I can find and I find README.XSLT-BACKENDS in /php4/ext/xslt/ I look at your stuff, well the README and find some help in this: $args = array(/_xml = $xml, /_xsl = $xsl); $xh = xslt_create(); $data = xslt_process($xh, arg:/_xml, arg:/_xsl, NULL, $args); xslt_free($xh); print( The results of the transformation were\n ); print( br\nhr\nbr ); print( $data ); print( br\nhr\nbr ); But it still doesn't work it get me my data, but it print out the xml document first and then my parse result, how come? First, what did I didn't understand? Second, how can I use sablotron as before with the new version, the backend stuff? Well OK, I can live with the change to have more then a XSLT parser, it's good for me, but how do I choose the one that I want, I didn't see any news about this (search around, deja, php site and zend, not much in mailing list except the stuff below), I guess I will have to subscribe to devel mailing list. And is this scary for me This function is EXPERIMENTAL. That means, that the behaviour of this function, this function name, in concreto ANYTHING documented here can change in a future release of PHP WITHOUT NOTICE. Be warned, and use this function at your own risk. I though that with sablot, it was near production, but it didn't seen so now. Thanks you. -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Cookie Not Setting..
Actually, nevermind. I got it. I was calling a function and sent the variable with the function so it worked :) - Original Message - From: Jeff Lewis [EMAIL PROTECTED] To: Magnus Hammar [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 9:38 AM Subject: Re: [PHP] Cookie Not Setting.. Still no luck. Do I have to read a cookie before any HTML is sent as well? I know to set it before it is sent but reading? Jeff - Original Message - From: Magnus Hammar [EMAIL PROTECTED] To: Jeff Lewis [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 9:30 AM Subject: Re: [PHP] Cookie Not Setting.. Try this: $cookie_name= wwblCookie; $value = PLEASE; $exp= time() + (86400 * 365); $server = www.domain.com; // Or IP-address will also do fine // the domain must cuntain three . // as in .somedomain.com $secure = 0; setcookie($cookie_name, $value, $exp, /, $server,$secure); /Magnus Hammar -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] deletion of temp files
How do you associate a temp file with a session so PHP automatically deletes it when garbage collection occurs -Original Message- From: Chris Lambert - WhiteCrown Networks [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 11:36 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] deletion of temp files Sessions support garbage removal, where the temp files will be deleted at a random time after the user has left. /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Anurag Bhalla [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 09, 2001 3:14 AM Subject: [PHP] deletion of temp files Hi list In my application,I need to generate some files for each user who comes to my site.These files need to be deleted once the user logs off. Pls suggest some way to delete these files once the user logs off ; perhaps with the use of sessions Regards Anurag -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Cookie Not Setting..
Some things to keep in mind: 1. The cookie can't be read untill the next time you access a page. 2. The cookie can only be red in the same level as it is set (I guess), that means that if you set a cookie in /my/pages/index.php you can't read the cookie from a page in /my/index.php. 3. To really see if the cookie is set you can use Netscape and let it warn you before accepting a cookie, in that way you will see the cookiename and it's value and then you can be sure the cookie is set. 4. You can do the same thing with IE. /Magnus Hammar - The cookiemonster? =) -- Still no luck. Do I have to read a cookie before any HTML is sent as well? I know to set it before it is sent but reading? Jeff - Original Message - From: Magnus Hammar [EMAIL PROTECTED] To: Jeff Lewis [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 9:30 AM Subject: Re: [PHP] Cookie Not Setting.. Try this: $cookie_name= wwblCookie; $value = PLEASE; $exp= time() + (86400 * 365); $server = www.domain.com; // Or IP-address will also do fine // the domain must cuntain three . // as in .somedomain.com $secure = 0; setcookie($cookie_name, $value, $exp, /, $server,$secure); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: http referer [ stats !!! ]
Statistics, hard data - yeah! Thanks, Don! Kirk -Original Message- From: Don Read [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 3:54 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Re: http referer [ stats !!! ] mysql select conv(PASSWORD('[NO REFERRING URL]'),16,10); ++ | conv(PASSWORD('[NO REFERRING URL]'),16,10) | ++ | 5343192248684061102| ++ 1 row in set (0.00 sec) So 25% of my traffic is not sending HTTP_REFERER ... YMMV. Regards, -- Don Read -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP Conference in California
Does it cost money to participate in the Microsoft vs RedHat Open Source Debate and other events, or is the entrance free? I am also interested in participating in this event. I would also like to participate in the entire conference, but the prices are so high... Just the General Conference Fee is $1095 (Early Bird Prices are over), and that's even not including the tutorials. I am not a millionaire, And no company will pay for me (I have my own business). Uri. Aaron Bennett wrote: Well the exhibit hall is free... So if you're in town, and have a day or two sick-leave stored up, you might want to go... I'm still unclear if exhibit passes get you into any of the keynotes, but there will be a (heated) debate with MS sr. VP Craig Mundie and RedHat's Michael Tiemann... (http://conferences.oreillynet.com/cs/os2001/view/e_sess/1834) Unless your company will spring for it, i'd skip the PHP seminar.. at $895, its no cheap vacation... I personally live in the area, and am just going to the exhibit.. I'd like to talk with those ActiveState and ArsDigita guys.. I'd also like to see what Roadsend.com is doing with their PHP-SiteManager.. (www.roadsend.com). Jabber.com is also going to be there, and (from what i hear) they're doing some stuff with XML exchanges... -- Aaron - Original Message - From: Uri Even-Chen [EMAIL PROTECTED] To: Aaron Bennett [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 2:43 PM Subject: Re: [PHP] PHP Conference in California Is it worth going there for the exhibit hall only? I am also interested in the sessions tutorials, but it looks quite expensive to participate in them. By the way, do you live in San Diego? Uri. Aaron Bennett wrote: Well, exhibit hall is free... I'll be there.. of course, its only 10 minutes away. *grin* -- Aaron - Original Message - From: Uri Even-Chen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 9:11 AM Subject: [PHP] PHP Conference in California I have heard about the PHP Conference O'Reilly Open Source Convention in San Diego, California. Do you think it is worth being there? I saw the prices and it's quite expensive. Not to mention the cost to get there... http://conferences.oreilly.com/oscon/ Thanks, Uri Even-Chen Speedy Software Raanana, Israel. Welcome to Speedy Net (In Hebrew): http://www.speedy.co.il/ Speedy Dating (In Hebrew): http://dating.speedy.co.il/ Speedy Composer (In English): http://www.speedy.co.il/composer/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Mcrypt fails to run
Hi, Try upgrading to 4.0.6. I think there are known pb with 4.0.4 and mcrypt. Regards, --Gildas. -- /-*-\ | Systèmes Technologies | Tél: +33 2 96438787 | | Informatiques du Ponant | Fax: +33 2 96438788 | | 27, rue Auguste Brizeux | email: [EMAIL PROTECTED] | | 22200 Guingamp - France | web: http://www.stip.fr | \-*-/ Dixie Flatline [EMAIL PROTECTED] a écrit dans le message news: [EMAIL PROTECTED] Greetings! I'm running Debian Potato 2.2.19 with php 4.0.4-pl1. I'd recently compiled an Mcrypt.so module, then added the extension line into my php.ini file. After reloading Apache and trying to run any php script which includes ANY mcrypt related function, the code immediately halts and no output is given. There aren't any errors in my log files, so I don't know what could be the problem :(. I'm using libmcrypt 2.4.15 and MCrypt 2.5.7. Best Regards, Dixie Flatline -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Easy question...grabbing variables...
Um, been using PHP for awhile now and don' even know how to grab these: http://wwbl.hyrum.net/send_email.php?to=4;from=25 I have usually only passed one variable before so all I've need to do is $toID=$to but how do I get from? I know I should know this but I am either having a major brain fart or missed this in PHP 101 ;) Jeff
Re: [PHP] Reading the content.
Chris Lambert - Whitecrown Networks [EMAIL PROTECTED] wrote in message 000b01c109fc$1857cb60$6401a8c0@server">news:000b01c109fc$1857cb60$6401a8c0@server... As far as I know, you don't. :-( And as far as you know, you are wrong :)) If there is no variables on the post the whole content of the post is held on $HTTP_RAW_POST_DATA Gustavo Carreno -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Reading the content.
To my knowledge you *only* get $HTTP_POST_RAW_DATA when the content-type is unknown. Not if there are nor vars in the POST (which is possible as empty vars are not being send) Bolke -Oorspronkelijk bericht- Van: Gustavo Carreno [mailto:[EMAIL PROTECTED]] Verzonden: Wednesday, July 11, 2001 4:23 PM Aan: [EMAIL PROTECTED] Onderwerp: Re: [PHP] Reading the content. Chris Lambert - Whitecrown Networks [EMAIL PROTECTED] wrote in message 000b01c109fc$1857cb60$6401a8c0@server">news:000b01c109fc$1857cb60$6401a8c0@server... As far as I know, you don't. :-( And as far as you know, you are wrong :)) If there is no variables on the post the whole content of the post is held on $HTTP_RAW_POST_DATA Gustavo Carreno -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] MAIL to a Bcc: ???
Sebastian, Thanks and do you know of a place where I can get a printed book of the actual PHP manual, already printed? I hate printing out those huge PDF files and I can't stand reading on screen directions while trying to learn them. Thanks, Marcus Sebastian Wenleder wrote: At 18:02 Uhr -0700 10.07.2001, Marcus James Christian wrote: Hello, How do I change the value of the TO: in a mail() function to a value of Bcc: ? Or at least trick the mail to a Bcc:So the recipients emails aren't shown? Hi Marcus, $headers=Bcc:[EMAIL PROTECTED]\n; $headers.=Subject: Your Subject\n; $msg=The Message; mail([EMAIL PROTECTED],Subject, will be overwritten...,$msg,$headers); BTW, You could have found that in the manual... best, Sebastian -- Marcus James Christian - UNLIMITED - Multimedia Internet Design http://mjchristianunlimited.com Proudly presents the music of CHROMATICUS at http://chromaticus.com and http://artists.mp3s.com/artists/275/chromaticus.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] File Download Mouse Behavior
When using PHP to generate a download file, the PHP program generates the headers and the actual text content of the file and this all works just fine. However, after the file download is complete, positioning the mouse anywhere over the browser (still showing the previous page) it appears as an hour glass, even though the mouse is active and still allows further clicks on the page. Has anyone come up with a method of cleaning up this behavior? Browser is IE on NT. Warren Vail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] ODBC Function equivalent to MySql_Fetch_Array
odbc_fetch_into gives me an array but it doesn't give the column names. While many might consider that a small point I find that it helps substantially in making my code self documenting. $row[2] is much less readable than $row[Name] -Original Message- Bob, Why doesn't odbc_fetch_into give you what you want? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- Hi, I'm trying to write a function (see below) that will provide equivalent functionality between ODBC and MySQL for mysql_fetch_array based upon a preset variable. I've written something that works but A) I'm afraid it might be quite slow; and B) I'm hoping that there is an existing function to do it that I just didn't see! If there isn't an existing function ... how do I go about requesting it for a future release? One of the key things I was looking for was the field names in the associative array (Note: I already had ... and commented out ... the odbc_fetch_into function ... nice but not quite what I was wanting) Thanks. - function db_fetch_array($result) { global $db_type, $db_connection; if ($db_type == 1) : return mysql_fetch_array($result); else: $i = 0; $fCount = odbc_num_fields($result); $result_array = array(); if (odbc_fetch_row($result)) : while ($i $fCount) $i++; $fName = odbc_field_name($result, $i); $result_array[$fName] = odbc_result($result, $i); } // odbc_fetch_into ($result, $result_array); return $result_array; else: return false; endif; endif; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Easy question...grabbing variables...
If you want to pass more than one variable via GET, you need to use an ampersand () character for the variables after the first one (still using a question mark for the first). So in your case, you can have this: http://wwbl.hyrum.net/send_email.php?to=4from=25 Then within your send_email.php script, you can access $from which will have the value 25 upon entry to your script. HTH Sam Masiello Software Quality Assurance Engineer Synacor (716) 853-1362 x289 [EMAIL PROTECTED] -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 10:22 AM To: [EMAIL PROTECTED] Subject:[PHP] Easy question...grabbing variables... Um, been using PHP for awhile now and don' even know how to grab these: http://wwbl.hyrum.net/send_email.php?to=4;from=25 I have usually only passed one variable before so all I've need to do is $toID=$to but how do I get from? I know I should know this but I am either having a major brain fart or missed this in PHP 101 ;) Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] mkstemp
I see mkstemp() mentioned in the tempnam page in the online manual but cannot find it anywhere? Where is the docs for this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] File Download IE behavior
When generating a download file from PHP to IE (Netscape is not used by my client base) the browser prompts with an option to download the file or open the file where it is. Opening the file fails and I am forced to download the file to my local drive before receiving another prompt to open the file where the second Open works just fine. Is there a way to allow this first open to work, or cause the open option on the first download window to be removed? Warren Vail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] ODBC Function equivalent to MySql_Fetch_Array
Bob, Perhaps use odbc_field_name or even odbc_specialcolumns with odbc_fetch_into? I do agree that mysql_fetch_array is quite useful. Dan - what do you think? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Bob Horton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 10:39 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] ODBC Function equivalent to MySql_Fetch_Array odbc_fetch_into gives me an array but it doesn't give the column names. While many might consider that a small point I find that it helps substantially in making my code self documenting. $row[2] is much less readable than $row[Name] -Original Message- Bob, Why doesn't odbc_fetch_into give you what you want? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- Hi, I'm trying to write a function (see below) that will provide equivalent functionality between ODBC and MySQL for mysql_fetch_array based upon a preset variable. I've written something that works but A) I'm afraid it might be quite slow; and B) I'm hoping that there is an existing function to do it that I just didn't see! If there isn't an existing function ... how do I go about requesting it for a future release? One of the key things I was looking for was the field names in the associative array (Note: I already had ... and commented out ... the odbc_fetch_into function ... nice but not quite what I was wanting) Thanks. - function db_fetch_array($result) { global $db_type, $db_connection; if ($db_type == 1) : return mysql_fetch_array($result); else: $i = 0; $fCount = odbc_num_fields($result); $result_array = array(); if (odbc_fetch_row($result)) : while ($i $fCount) $i++; $fName = odbc_field_name($result, $i); $result_array[$fName] = odbc_result($result, $i); } // odbc_fetch_into ($result, $result_array); return $result_array; else: return false; endif; endif; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] ODBC Function equivalent to MySql_Fetch_Array
Bob, Perhaps use odbc_field_name or even odbc_specialcolumns with odbc_fetch_into? I do agree that mysql_fetch_array is quite useful. Dan - what do you think? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Bob Horton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 10:39 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] ODBC Function equivalent to MySql_Fetch_Array odbc_fetch_into gives me an array but it doesn't give the column names. While many might consider that a small point I find that it helps substantially in making my code self documenting. $row[2] is much less readable than $row[Name] -Original Message- Bob, Why doesn't odbc_fetch_into give you what you want? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- Hi, I'm trying to write a function (see below) that will provide equivalent functionality between ODBC and MySQL for mysql_fetch_array based upon a preset variable. I've written something that works but A) I'm afraid it might be quite slow; and B) I'm hoping that there is an existing function to do it that I just didn't see! If there isn't an existing function ... how do I go about requesting it for a future release? One of the key things I was looking for was the field names in the associative array (Note: I already had ... and commented out ... the odbc_fetch_into function ... nice but not quite what I was wanting) Thanks. - function db_fetch_array($result) { global $db_type, $db_connection; if ($db_type == 1) : return mysql_fetch_array($result); else: $i = 0; $fCount = odbc_num_fields($result); $result_array = array(); if (odbc_fetch_row($result)) : while ($i $fCount) $i++; $fName = odbc_field_name($result, $i); $result_array[$fName] = odbc_result($result, $i); } // odbc_fetch_into ($result, $result_array); return $result_array; else: return false; endif; endif; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Rename a File?
How do I rename a file on Linux in PHP? Thanks Randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] ODBC Function equivalent to MySql_Fetch_Array
Well, if you noticed the function I wrote and included as part of my original post ... it already uses odbc_field_name but I'm not sure how I would use it in connection with odbc_fetch_into. My 2 key questions were: 1) Is there some function that I missed that does the equivalent of mysql_fetch_array? and 2) Is there any way to get the function I wrote to be more efficient? Bob, Perhaps use odbc_field_name or even odbc_specialcolumns with odbc_fetch_into? I do agree that mysql_fetch_array is quite useful. Dan - what do you think? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Bob Horton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 10:39 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] ODBC Function equivalent to MySql_Fetch_Array odbc_fetch_into gives me an array but it doesn't give the column names. While many might consider that a small point I find that it helps substantially in making my code self documenting. $row[2] is much less readable than $row[Name] -Original Message- Bob, Why doesn't odbc_fetch_into give you what you want? Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- Hi, I'm trying to write a function (see below) that will provide equivalent functionality between ODBC and MySQL for mysql_fetch_array based upon a preset variable. I've written something that works but A) I'm afraid it might be quite slow; and B) I'm hoping that there is an existing function to do it that I just didn't see! If there isn't an existing function ... how do I go about requesting it for a future release? One of the key things I was looking for was the field names in the associative array (Note: I already had ... and commented out ... the odbc_fetch_into function ... nice but not quite what I was wanting) Thanks. - function db_fetch_array($result) { global $db_type, $db_connection; if ($db_type == 1) : return mysql_fetch_array($result); else: $i = 0; $fCount = odbc_num_fields($result); $result_array = array(); if (odbc_fetch_row($result)) : while ($i $fCount) $i++; $fName = odbc_field_name($result, $i); $result_array[$fName] = odbc_result($result, $i); } // odbc_fetch_into ($result, $result_array); return $result_array; else: return false; endif; endif; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] how to hide dbconnect file if its in published directory?
try putting an .htaccess file into that directory. or (as someone else already suggested) tell apache to disallow access to *.inc files (or to the entire directory) -Original Message- From: Noah Spitzer-Williams [mailto:[EMAIL PROTECTED]] Subject: [PHP] how to hide dbconnect file if its in published directory? Hey guys, I come for advice once again. Say i have a file dbconnect.inc which connects to my database. Now if this file is located in a directory accessible for to the web is there anyway that if someone types in that file i can detect it being accessed, instead of included, and redirect them elsewhere? Thanks guys! - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Rename a File?
mv filename newfilename - Original Message - From: Randy Johnson [EMAIL PROTECTED] To: Randy Johnson [EMAIL PROTECTED]; Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 13, 2001 12:53 PM Subject: [PHP] Rename a File? How do I rename a file on Linux in PHP? Thanks Randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Undefined index?
If one has : $arr = array('a','b','c'); And calls upon the following : $arr[b] (as opposed to $arr['b']) Then the following will result : Warning: Use of undefined constant b - assumed 'b' in ./tmp.php on line 13 Warning: Undefined index: b in ./tmp.php on line 13 Always use quotes around the keys/indexes within associative arrays otherwise the constant is looked for first and unexpected results are possible. Now if we have (which you most likely did) : $arr['d'] Then we get the following as index 'd' does not exist within the array : Warning: Undefined index: d in ./tmp.php on line 13 A similar error is created when doing this : echo $iamnotset; if ($iamnotset) { Which results in : Warning: Undefined variable: iamnotset in ./tmp.php on line 11 Using something similar to isset() helps combat that : if (isset($iamnotset)) { All of the above errors (Notices) are of the E_NOTICE type. If E_NOTICE is turned on within the error_reporting setting within php.ini (or via a call to the error_reporting() function or ...), then you'll see it otherwise you will not. I'm not sure why Notices say Warning: ... but they do :-) Typically one turns errors up during development, and down during production use. And, it's not uncommon to see this question come about within various support forums/lists for various PHP applications. Regards, Philip -Original Message- From: Ivo Stoykov [mailto:[EMAIL PROTECTED]] Sent: 11 iulie 2001 17:21 To: [EMAIL PROTECTED] Subject: [PHP] Undefined index? Hi everybody Does anybody knows what means Undefined index error? I couldn't find it in docs neither in php online doc site. Thank you Ivo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Rename a File?
[EMAIL PROTECTED] (Randy Johnson) wrote: How do I rename a file on Linux in PHP? you mean using a php function? php.net/rename -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Authentication
Ideally I could just have php do the info gathering and send the input, user and pass, to apache for authenticating them. But I really don't know what is best. If I set up an index file to ask for a password that still does not secure (or at least ask for a password) anything else in the directory. But it looks like mod_auth does do that, if only I could use php as a gatherer for mod_auth. Can anyone suggest how to do this or maybe a better way. Do I need php authentication in every file on the site? Please help. -Dave Baldwin -Original Message- From: David Baldwin Sent: Tuesday, July 10, 2001 2:36 PM To: Jack Dempsey; [EMAIL PROTECTED] Subject: RE: [PHP] Authentication I am using htpasswd files for the passwords but I took all the htaccess or mod_auth directives out of httpsd.conf. I guess I could learn mysql (yeay, maybe later), and infact, that looks like a real good idea, but I think the double prompting is due to the fact that I have the following in the beginning of the index.php file that the login.php script redirects to: ?php session_start(); if ( ( !isset( $PHP_AUTH_USER )) || (!isset($PHP_AUTH_PW)) || ( $PHP_AUTH_USER != 'user' ) || ( $PHP_AUTH_PW != 'pass' ) ) { Header( 'HTTP/1.0 401 Unauthorized' ); Header( 'WWW-Authenticate: Basic Realm=Users info' ); echo 'Authorization Required.'; exit; } else { echo 'You are in users page.'; phpinfo(); } ? This works with a windows browser but not with UNIX/Netscape. It seems that for some reason the session is not carrying over with session_register and session_start from the login.php script, but only with the UNIX/Netscape browser. The login.php script looks like this; ?php session_register(PHP_AUTH_USER); session_register(PHP_AUTH_PW); $auth = false; if (isset ( $PHP_AUTH_USER ) isset ($PHP_AUTH_PW)) { $filename = '/usr/local/apache/conf/htpasswd'; $fp = fopen( $filename, 'r' ); $file_contents = fread( $fp, filesize( $filename ) ); fclose( $fp ); $lines = explode ( \n, $file_contents ); foreach ( $lines as $line ) { list ( $username, $password ) = explode( ':', $line ); if ( $username == $PHP_AUTH_USER ) { $salt = substr( $password , 0 , 2 ); $enc_pw = crypt( $PHP_AUTH_PW, $salt ); if ( $password == $enc_pw ) { $auth = true; break; } } } } if ( ! $auth ) { header( 'WWW-Authenticate: Basic realm=User Area' ); header( 'HTTP/1.0 401 Unauthorized' ); echo 'Authorization Required.'; exit; } else { header( Location: https://192.168.124.219/users/$user/; ); } ? I just want the login.php to setup the PHP_AUTH_USER and PHP_AUTH_PW and then the index.php to read those values, compare them to static requirements and depending on the values set up in login.php to either allow or deny. Any suggestions are appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] What the heck is this
mockAck! The travesty! Opportunities for OOP are literally everywhere! = = Ben -Original Message- From: Adam [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 12:26 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] What the heck is this ahh so it's for classes, then i'm fine because i haven't fount a use for that yet. -Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Reading the content.
Are you sure? I tested posting to a script which simply did a print_r($GLOBAL), and didn't see the posted data listed. /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Gustavo Carreno [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 10:22 AM Subject: Re: [PHP] Reading the content. | Chris Lambert - Whitecrown Networks [EMAIL PROTECTED] wrote in | message 000b01c109fc$1857cb60$6401a8c0@server">news:000b01c109fc$1857cb60$6401a8c0@server... | As far as I know, you don't. :-( | | And as far as you know, you are wrong :)) | If there is no variables on the post the whole content of the post is held | on $HTTP_RAW_POST_DATA | | Gustavo Carreno | | | | | -- | PHP General Mailing List (http://www.php.net/) | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | To contact the list administrators, e-mail: [EMAIL PROTECTED] | | | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Reading the content.
Are you sure? I tested posting to a script which simply did a print_r($GLOBAL), and didn't see the posted data listed. Yeaps, if the content-type is known the $HTTP_RAW_POST_DATA is empty and does not show on the $GLOBALS. Try this C program in Linux and you'll get surprised: -- httppost.c -- #include unistd.h #include string.h #include sys/types.h #include sys/socket.h #include netinet/in.h #include errno.h int main(void) { int sockfd, connfd, error; socklen_t len; struct sockaddr_in sa, csa; char line[1025]; if ((sockfd=socket(AF_INET, SOCK_STREAM, 0))0) { printf(error in socket()\n); exit(1); } bzero(sa, sizeof(sa)); sa.sin_family=AF_INET; if (inet_aton(194.79.65.203,sa.sin_addr)0) { printf(error on inet_aton\n); exit(1); } sa.sin_port=htons(80); if (connect(sockfd, sa, sizeof(sa))0) { printf(error on connect\n); exit(1); } sprintf(line,POST /dl_bulk.php HTTP/1.0\r\n); printf(Sending: %s,line); write(sockfd, line, strlen(line)); sprintf(line,Host: test.datascan.c3im.pt\r\n); printf(Sending: %s,line); write(sockfd, line, strlen(line)); sprintf(line,Content-type: text/xml\r\n); printf(Sending: %s,line); write(sockfd, line, strlen(line)); sprintf(line,Content-length: 38\r\n\r\n); printf(Sending: %s,line); write(sockfd, line, strlen(line)); sprintf(line,?xml version=\1.0\?\r\nbla\r\n/bla\r\n); printf(Sending: %s,line); write(sockfd, line, strlen(line)); printf(Reading:\n); while(read(sockfd, line, 2048)) { line[strlen(line)+1]=0; printf(%s,line); } close(sockfd); } -- httppost.c -- and this is the dl_bulk.php contents: -- dl_bulk.php ? header(Content-type: text/xml); print($HTTP_RAW_POST_DATA); ? -- dl_bulk.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Duplication Results When LEFT JOIN is Used Between Multiple Tables
Hello, I'm making some headway on joining three MySQL tables. (Thanks to responses from this list early this morning) However, when I run this query: mysql_query(SELECT WLPbib.bibID, WLPbib.title, WLPbib.publisher, WLPbib.publicationDate, WLPaddress.city, WLPaddress.state, WLPprofile.firstName, WLPprofile.lastName, WLPprofile.organization, WLPcountry.languageName FROM WLPbib LEFT JOIN WLPprofile ON WLPprofile.profileID = WLPbib.profileID LEFT JOIN WLPaddress ON WLPaddress.publisherID = WLPbib.publisherID LEFT JOIN WLPcountry ON WLPcountry.countryID = WLPaddress.countryID); I now get results in triplicate. ie. I'm getting three copies of the same title, firstName, organization, etc I somehow suspected that this should be the result with LEFT JOIN, but I'm not sure how to return a query without duplication. This is far better than what I had this morning (which was no response from the server). Thanks. I'm new to joining tables... Mike -- Mike Gifford, OpenConcept Consulting, http://openconcept.ca Offering everything your organization needs for an effective web site. Abolish Nuclear Weapons Now!: http://pgs.ca/petition/ It is a miracle that curiosity survives formal education. - A Einstein -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Duplication Results When LEFT JOIN is Used Between Multiple Tables
not to give you the solution, but there's something you can simplify in your query: USING(field) mysql_query(SELECT WLPbib.bibID, WLPbib.title, WLPbib.publisher, WLPbib.publicationDate, WLPaddress.city, WLPaddress.state, WLPprofile.firstName, WLPprofile.lastName, WLPprofile.organization, WLPcountry.languageName FROM WLPbib LEFT JOIN WLPprofile USING(profileID) LEFT JOIN WLPaddress USING(publisherID) LEFT JOIN WLPcountry USING(countryID)); simplier, right? as of your problem, let me think, I had the same problem couple month ago. I'll look int omy codes. -Maxim Maletsky -Original Message- From: Mike Gifford [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 12, 2001 1:04 AM To: [EMAIL PROTECTED] Subject: [PHP] Duplication Results When LEFT JOIN is Used Between Multiple Tables Hello, I'm making some headway on joining three MySQL tables. (Thanks to responses from this list early this morning) However, when I run this query: mysql_query(SELECT WLPbib.bibID, WLPbib.title, WLPbib.publisher, WLPbib.publicationDate, WLPaddress.city, WLPaddress.state, WLPprofile.firstName, WLPprofile.lastName, WLPprofile.organization, WLPcountry.languageName FROM WLPbib LEFT JOIN WLPprofile ON WLPprofile.profileID = WLPbib.profileID LEFT JOIN WLPaddress ON WLPaddress.publisherID = WLPbib.publisherID LEFT JOIN WLPcountry ON WLPcountry.countryID = WLPaddress.countryID); I now get results in triplicate. ie. I'm getting three copies of the same title, firstName, organization, etc I somehow suspected that this should be the result with LEFT JOIN, but I'm not sure how to return a query without duplication. This is far better than what I had this morning (which was no response from the server). Thanks. I'm new to joining tables... Mike -- Mike Gifford, OpenConcept Consulting, http://openconcept.ca Offering everything your organization needs for an effective web site. Abolish Nuclear Weapons Now!: http://pgs.ca/petition/ It is a miracle that curiosity survives formal education. - A Einstein -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] File Download IE behavior
If you want it to automatically be saved to disk, send the header(Content-type: octet/stream); If there is a problem with the open I would think its on the client side since theres nothing mor the server can do but specify a content type. -Original Message- From: Warren Vail [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 7:50 AM To: [EMAIL PROTECTED] Subject: [PHP] File Download IE behavior When generating a download file from PHP to IE (Netscape is not used by my client base) the browser prompts with an option to download the file or open the file where it is. Opening the file fails and I am forced to download the file to my local drive before receiving another prompt to open the file where the second Open works just fine. Is there a way to allow this first open to work, or cause the open option on the first download window to be removed? Warren Vail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Any banner system?
On Tue, 10 Jul 2001, Robert V. Zwink wrote: http://www.phpwizard.net/ has something called phpAds. Seems to cover your requests. on my italian portal I'm using phpAdsNew. It's cool... on sourceforge.com bye -- Il 50% della vita e' cercare la giusta domanda... l'altro 50% e' non trovare la risposta. -- Michel ZioBudda Morelli [EMAIL PROTECTED] ICQ UIN: 58351764 PR of Linux in Italy http://www.ziobudda.net http://www.linuxlab.it -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Bit-flags in tables?
Ok, after a lot of R'ing TFM, I'm more confused than I was before... Seems MySQL plays pretty loose with most datatypes and stores half the numeric types as strings, so I want e.g. a 16 bit field where I can use the individual bits for various flags. How should I set the MySQL datatype and attributes? Also, are there any other caveats I should know about? (e.g. PHP's handling of integers) Back in the good ol' 680x0 ASM days this was so easy! :-) TIA -- Lasse -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Duplication Results When LEFT JOIN is Used Between MultipleTables
Mike Gifford wrote: However, when I run this query: mysql_query(SELECT WLPbib.bibID, WLPbib.title, WLPbib.publisher, WLPbib.publicationDate, WLPaddress.city, WLPaddress.state, WLPprofile.firstName, WLPprofile.lastName, WLPprofile.organization, WLPcountry.languageName FROM WLPbib LEFT JOIN WLPprofile ON WLPprofile.profileID = WLPbib.profileID LEFT JOIN WLPaddress ON WLPaddress.publisherID = WLPbib.publisherID LEFT JOIN WLPcountry ON WLPcountry.countryID = WLPaddress.countryID); I now get results in triplicate. ie. I'm getting three copies of the same title, firstName, organization, etc I somehow suspected that this should be the result with LEFT JOIN, but I'm not sure how to return a query without duplication. This is far better than what I had this morning (which was no response from the server). Thanks. I'm new to joining tables... Mike -- Maybe SLECT DISTINCT ... could help you. Kamil -- -- [EMAIL PROTECTED] -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Duplication Results When LEFT JOIN is Used Between Multiple Tables
Hi Max, Maxim Maletsky wrote: not to give you the solution, but there's something you can simplify in your query: USING(field) I like the idea of using USING... however I've run into some problems. mysql_query(SELECT WLPbib.bibID, WLPbib.title, WLPbib.publisher, WLPbib.publicationDate, WLPaddress.city, WLPaddress.state, WLPprofile.firstName, WLPprofile.lastName, WLPprofile.organization, WLPcountry.languageName FROM WLPbib LEFT JOIN WLPprofile USING(profileID) LEFT JOIN WLPaddress USING(publisherID) LEFT JOIN WLPcountry USING(countryID)); simplier, right? Simpler yes, however it produces this error: MySQL Error: 1054 (Unknown column 'WLPprofile.publisherID' in 'on clause') Because although WLPbib is linked to WLPprofile WLPaddress it is not linked to WLPcountry. WLPaddress needs to be linked to WLPcountry. How does one specify that? as of your problem, let me think, I had the same problem couple month ago. I'll look int omy codes. I hear ya.. Somewhere, within which project lies the answer (likely).. Now which one? :) Thanks for looking into it. Mike -Original Message- From: Mike Gifford [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 12, 2001 1:04 AM To: [EMAIL PROTECTED] Subject: [PHP] Duplication Results When LEFT JOIN is Used Between Multiple Tables Hello, I'm making some headway on joining three MySQL tables. (Thanks to responses from this list early this morning) However, when I run this query: mysql_query(SELECT WLPbib.bibID, WLPbib.title, WLPbib.publisher, WLPbib.publicationDate, WLPaddress.city, WLPaddress.state, WLPprofile.firstName, WLPprofile.lastName, WLPprofile.organization, WLPcountry.languageName FROM WLPbib LEFT JOIN WLPprofile ON WLPprofile.profileID = WLPbib.profileID LEFT JOIN WLPaddress ON WLPaddress.publisherID = WLPbib.publisherID LEFT JOIN WLPcountry ON WLPcountry.countryID = WLPaddress.countryID); I now get results in triplicate. ie. I'm getting three copies of the same title, firstName, organization, etc I somehow suspected that this should be the result with LEFT JOIN, but I'm not sure how to return a query without duplication. This is far better than what I had this morning (which was no response from the server). Thanks. I'm new to joining tables... Mike -- Mike Gifford, OpenConcept Consulting, http://openconcept.ca Offering everything your organization needs for an effective web site. Abolish Nuclear Weapons Now!: http://pgs.ca/petition/ It is a miracle that curiosity survives formal education. - A Einstein -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Mike Gifford, OpenConcept Consulting, http://openconcept.ca Offering everything your organization needs for an effective web site. Abolish Nuclear Weapons Now!: http://pgs.ca/petition/ It is a miracle that curiosity survives formal education. - A Einstein -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Wierd cookie behiavor
I have a logout page that sends this cookie setcookie(membership) So that membership shoud be empty. However, if you login so that the cookie membership is created, and then try to logout without restarting the browser, it wont delete the cookie. But if you restart the browser and try to logout, it will work fine any ideas? -David
[PHP] About fasttemplate class and templates
Hi, I have a problem with fasttemplate class. I am doing a list page which contains dynamic block to list the rows from my db. Everything is ok until there are no records on my db. If there are no records on my db, fasttemplate class doesn't delete the dynamic block and it remains like this: {fieldname1} | {fieldname2} | {fieldname3} Is there any way to delete dynamic blocks and it's inside from template while parsing? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Bit-flags in tables?
On 11-Jul-01 Lasse wrote: Ok, after a lot of R'ing TFM, I'm more confused than I was before... Seems MySQL plays pretty loose with most datatypes and stores half the numeric types as strings, so I want e.g. a 16 bit field where I can use the individual bits for various flags. How should I set the MySQL datatype and attributes? SMALLINT UNSIGNED also look at SET Also, are there any other caveats I should know about? (e.g. PHP's handling of integers) 32bit signed (should be ok). Back in the good ol' 680x0 ASM days this was so easy! :-) M6502, 8080 , sticks rocks for ones zeros. Funny, i don't feel like an old fart (yet). Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] counter using PHP or Javascript?
Hi, Is there a way to create a counter to count the number of accesses for a apecific page using PHP or Javascript? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] date change for unix platforms on sept 9th
Has anybody heard if this will affect PHP in any way? Copied from the Unix Guru mailing list: -=-=-=-=-=-=-=-=-=-=-=- The unix time() value becomes 10 digits for the first time on Sun Sep 9 01:46:40 2001 For the first time in modern computer history, the timestamp will be something besides 9 digits. That could break things. -=-=-=-=-=-=-=-=-=-=-=- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Wierd cookie behiavor
if you dont specify an expiration time, the cookie will hang around in memory until the browser is closed... even if it's an empty cookie. (AFAIK) if you really want it deleted, when the user logs out setcookie(membership, , time()-1); that'll set the expire time to one second in the past, which (in theory :) will delete the cookie ASAP. -Original Message- From: david jarvis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 12:38 PM To: [EMAIL PROTECTED] Subject: [PHP] Wierd cookie behiavor I have a logout page that sends this cookie setcookie(membership) So that membership shoud be empty. However, if you login so that the cookie membership is created, and then try to logout without restarting the browser, it wont delete the cookie. But if you restart the browser and try to logout, it will work fine any ideas? -David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Speed of loding PHP pages
Hi, Has anyone tries any test loading PHP pages into IE 5.x and Netscape 4.7x? As an experiment, I have a page that issues a phpinfo(). WIth I.E. 5.5, it takes about 3 seconds. With Netscape 4.77, it takes almost 20 seconds. Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] counter using PHP or Javascript?
of course ;) try this method: link to the counter with an IMG from your page IMG SRC=counter.php?name=pagename have counter.php increment a log file and output an image showing the current number of hits that pagename has gotten, so that the IMG SRC will be digits. (although, this is like reinventing the wheel, there are plenty of good free counter programs out there) check this one out: http://www.muquit.com/muquit/software/Count/Count.html -Original Message- From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 12:42 PM To: [EMAIL PROTECTED] Subject: [PHP] counter using PHP or Javascript? Hi, Is there a way to create a counter to count the number of accesses for a apecific page using PHP or Javascript? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] counter using PHP or Javascript?
http://www.devshed.com/ClipScripts/results/l_2/c_6/ -Original Message- From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 9:42 AM To: [EMAIL PROTECTED] Subject: [PHP] counter using PHP or Javascript? Hi, Is there a way to create a counter to count the number of accesses for a apecific page using PHP or Javascript? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Speed of loding PHP pages
Netscape is notoriously slug-like when it comes to loading large tables (i.e. the output of phpinfo()). - Tim As an experiment, I have a page that issues a phpinfo(). WIth I.E. 5.5, it takes about 3 seconds. With Netscape 4.77, it takes almost 20 seconds. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Variable Next To Variable?
Sorry if this has been brought up 100 times. I want to do this: $y = 1; while ($y = $Number_Children) { if (!$C_Last_Name$y) { error stuff; $y++; } } The form submitting information to this code has field name like C_Last_Name1 C_Last_Name2 depending on how many Children are signing up for something. So I need $y to represent the number. Hope that makes sense. Thanks for any help. Jeff Oien -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Variable Next To Variable?
if (!$C_Last_Name$y) { The form submitting information to this code has field name like C_Last_Name1 C_Last_Name2 depending on how many Children are signing up for something. So I need $y to represent the number. You want this: if (!{$C_Last_Name}{$y}) { The {} surrounding the variable name tells PHP that those are unique entities/variables. For example, you could use the following: echo Hello, {$userInfo-printFirstName()}; to interpolate a class' method call within a string... Chris
RE: [PHP] Variable Next To Variable?
you should change the form field names to $Children_Last[1], $Children_Last[2] instead of hardcoding $Children_Last1 to make iteration thru the form easier and handling of the data easier... you can handle it all like this: $Number_Children = 5; $i = $Number_Children; while ($i--) { if (! $Children_Last[$i]) { // code } } -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED]] Subject: [PHP] Variable Next To Variable? Sorry if this has been brought up 100 times. I want to do this: $y = 1; while ($y = $Number_Children) { if (!$C_Last_Name$y) { error stuff; $y++; } } The form submitting information to this code has field name like C_Last_Name1 C_Last_Name2 depending on how many Children are signing up for something. So I need $y to represent the number. Hope that makes sense. Thanks for any help. Jeff Oien -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Variable Next To Variable?
You could use an array: like input type=text name=C_Last_Name[1] Way better this way and you oculd do: $y=1; while($ycount($C_Last_Name)){ if(!$C_Last_Name[$y]){ error stuff; y++; } } Jeff Oien wrote: Sorry if this has been brought up 100 times. I want to do this: $y = 1; while ($y = $Number_Children) { if (!$C_Last_Name$y) { error stuff; $y++; } } The form submitting information to this code has field name like C_Last_Name1 C_Last_Name2 depending on how many Children are signing up for something. So I need $y to represent the number. Hope that makes sense. Thanks for any help. Jeff Oien -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Wierd cookie behiavor
are you setting the cookie expire time and blanking out the cookie's value properly when the user logs off? even if you have the user logged in, to the browser, it's just another webpage, and the browser shouldnt handle cookies any differently no matter what type of HTML you give it... -Original Message- From: david jarvis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 12:54 PM To: scott [gts] Subject: Re: [PHP] Wierd cookie behiavor hmm, still no luck. The problem isnt that the cookie in in memory, the problem is that its still on the hard drive. for example: User Logs On, User Logs off = cookie still on hd (even if you close the browser) example2: User restarts browser, User does not log on (cookie info still on hd), User logs off = works fine. any ideas? - Original Message - From: scott [gts] [EMAIL PROTECTED] To: php [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 12:39 PM Subject: RE: [PHP] Wierd cookie behiavor if you dont specify an expiration time, the cookie will hang around in memory until the browser is closed... even if it's an empty cookie. (AFAIK) if you really want it deleted, when the user logs out setcookie(membership, , time()-1); that'll set the expire time to one second in the past, which (in theory :) will delete the cookie ASAP. -Original Message- From: david jarvis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 12:38 PM To: [EMAIL PROTECTED] Subject: [PHP] Wierd cookie behiavor I have a logout page that sends this cookie setcookie(membership) So that membership shoud be empty. However, if you login so that the cookie membership is created, and then try to logout without restarting the browser, it wont delete the cookie. But if you restart the browser and try to logout, it will work fine any ideas? -David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Wierd Cookies
hmm, still no luck. The problem is not that the cookie in in memory, the problem is that its still on the hard drive. for example: User Logs On, User Logs off = cookie still on hd (even if you close the browser) example2: User restarts browser, User does not log on (cookie info still on hd), User logs off = works fine. any ideas? - Original Message - From: scott [gts] [EMAIL PROTECTED] To: php [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 12:39 PM Subject: RE: [PHP] Wierd cookie behiavor if you dont specify an expiration time, the cookie will hang around in memory until the browser is closed... even if it's an empty cookie. (AFAIK) if you really want it deleted, when the user logs out setcookie(membership, , time()-1); that'll set the expire time to one second in the past, which (in theory :) will delete the cookie ASAP. -Original Message- From: david jarvis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 12:38 PM To: [EMAIL PROTECTED] Subject: [PHP] Wierd cookie behiavor I have a logout page that sends this cookie setcookie(membership) So that membership shoud be empty. However, if you login so that the cookie membership is created, and then try to logout without restarting the browser, it wont delete the cookie. But if you restart the browser and try to logout, it will work fine any ideas? -David
Re: [PHP] Speed of loding PHP pages
Don wrote: Has anyone tries any test loading PHP pages into IE 5.x and Netscape 4.7x? This is in no way related to PHP. It's just the old Netscape taking lots of time for +rendering large pages, especially with nested tables. regards Wagner -- Madness takes its toll. Please have exact change. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Function call from a hyperlink
Hi, Does someone know how I can call a function in a PHP script using a hyperlink with A HREF=.text/A The function is in the same PHP script as the link. Many thanks, Geer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]