Re: [PHP] How to hide url on a php link NOT post...
On Jul 10, 2003, Joey claimed that: |How can I hide this link so value can't be changed? |I don't want to change anything at the server level, and its not from a |form so I cant do a post -vs- a get. | |http://www.abcd.com/popup_SearchRepSet.php?searchby=cust_nosearch=1value=WOR032 | |Thanks ! | #1) [Not PHP] Make it a post that looks like a link. See previous posting at http://marc.theaimsgroup.com/?l=php-generalm=105597453308214w=2 #2) [Not PHP] If the values will never change, try http://tinyurl.com. If you're keeping track of referrals, it might mess up your statistics. #3) [Not PHP] Make that link inside a frame. One frameset would be invisible, the other would be the link. -- Registered Linux user #304026. lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED Responses to this message should conform to RFC 1855. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What did I do wrong to cause a parse error?
Hi there, On Thu, 2003-07-10 at 21:53, Phil Powell wrote: foreach ($profileArray[$i][attributes] as $key = $val) { ^^ You should quote the word 'attributes': http://www.php.net/manual/en/language.types.array.php#language.types.array.donts Sorry...that link might wrap. Anyway, I doubt that's the problem... $singleProfileHTML .= $key . =\ . str_replace(', '#039;', str_replace('', 'quot;', $val)) . \\n; } No idea. All I did was copy-paste your code and add a test definition for the other vars, and I just got this: [Script] ?php error_reporting(E_ALL); ini_set('display_errors', true); ini_set('html_errors', true); $profileArray = array('1' = array('attributes' = array('height' = '168 cm', 'weight' = '\'65\' kg'))); $singleProfileHTML = ''; $i = 1; foreach ($profileArray[$i][attributes] as $key = $val) { $singleProfileHTML .= $key . =\ . str_replace(', '#039;', str_replace('', 'quot;', $val)) . \\n; } print_r($singleProfileHTML); ? [Output] Notice: Use of undefined constant attributes - assumed 'attributes' in /home/torben/public_html/phptest/__phplist.html on line 36 height=168 cm weight='65' kg The parsing error occurs in the $singleProfileHTML.. line. I'm completely don't get it; I see absolutely nothing wrong with this, what did I miss? Phil I don't see anything wrong. Perhaps you have a non-printable control character embedded in your code? Try copy-pasting the above code (but quote that array key) and see if that helps. Also, check the code before that line for unclosed quotes and braces/parens or other problems; some parse errors can show up far from where they actually occurred. Other than that, without knowing anything else, it's hard to say off the top of my head. -- Torben Wilson [EMAIL PROTECTED]+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What did I do wrong to cause a parse error?
On Fri, 11 Jul 2003 00:53:32 -0400, you wrote: foreach ($profileArray[$i][attributes] as $key = $val) { $singleProfileHTML .= $key . =\ . str_replace(', '#039;', str_replace('', 'quot;', $val)) . \\n; } The parsing error occurs in the $singleProfileHTML.. line. I'm completely don't get it; I see absolutely nothing wrong with this, what did I miss? Line 1 - attributes should have a $ in front of it, or be a string literal. BTW, that's a really nasty line. Maybe it would be easier to read as : foreach ($profileArray[$i][$attributes] as $key = $val) { $val = str_replace('', 'quot;', $val); $val = str_replace(', '#039;', $val); $singleProfileHTML .= $key=\$val\\n; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] regexp problem
On Thursday, July 10, 2003, 9:25:31 PM, Taylor wrote: TY First, TY I need the code to replace the link in a string, like TY BASE HREF=www.google.com with BASE HREF=mystring TY ereg_replace('BASE HREF=\'(.*)'\', 'BASE HREF=\$my_string\', TY $old); TY That was the closest i got, but (.*) makes it take the first BASE HREF, and the last , which sucks. TY Can anyone help? I'm not a regex guru by any means, but I think your problem here is that your expression is greedy. Try (.?) ... I think. TY Second, TY I hate asking for help on Regexps...I would like a tutorial online that TY steps me through one method of them at a time, and then lets me move TY on...kindof like math. You have to know the basics befor you can get TY advanced. Any help there either? I have found that the best people to ask for regex questions are PERL programmers. They seem to have the insider knowledge on this stuff. There are a few online tutorials that I've seen, but none that I could recommend with any confidence. They are simply this expression does this, and put it together ... wow it works! Regexs are great! There is a #perl channel on freenode (IRC) that I have found to be extremely helpful in this regard. If you do find any good tutorials, I would appreciate an offline. -- Regards, Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Variable Functions...
On Friday, July 11, 2003, 3:11:51 AM, Michael wrote: MS Smarty has a class method where it calls: $this-$some_var(somevalue); Are you sure about that syntax? I'm not too familiar with Smarty, only used it once, but I think its $this-some_var(value); MS and this throws errors on Windows versions of php that i've tried. why MS is that? Does it error out on l/unix? -- Regards, Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What did I do wrong to cause a parse error?
Thanx I got it to work, however, I have no idea why it works now considering I did nothing different: $singleProfileHTML .= !--\n; foreach ($profileArray[$i][attributes] as $key = $val) { $singleProfileHTML .= strtolower($key) . '=' . str_replace(', '#039;', str_replace('', 'quot;', stripslashes($val))) . \\n; } $singleProfileHTML .= --\n; Beats the heck out of me! Phil - Original Message - From: David Otton [EMAIL PROTECTED] To: Phil Powell [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, July 11, 2003 2:48 AM Subject: Re: [PHP] What did I do wrong to cause a parse error? On Fri, 11 Jul 2003 00:53:32 -0400, you wrote: foreach ($profileArray[$i][attributes] as $key = $val) { $singleProfileHTML .= $key . =\ . str_replace(', '#039;', str_replace('', 'quot;', $val)) . \\n; } The parsing error occurs in the $singleProfileHTML.. line. I'm completely don't get it; I see absolutely nothing wrong with this, what did I miss? Line 1 - attributes should have a $ in front of it, or be a string literal. BTW, that's a really nasty line. Maybe it would be easier to read as : foreach ($profileArray[$i][$attributes] as $key = $val) { $val = str_replace('', 'quot;', $val); $val = str_replace(', '#039;', $val); $singleProfileHTML .= $key=\$val\\n; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Please assist - been on this for hours - Permissions onserver
Writing and moving require the same permissions. Also, there is a big difference between root and webroot. Which one are you talking about? Web root. Sorry not the root directory of the server but the webroot. 1 directory back in fact is all I need so the structure would be: Web Cms generator.php Web generated.php So I can protect the CMS directory which currently needs to be chmod 777 in order to write the page (at least that was the only way I could get the write function to work) and then just have the written files drop back into the web root so that if someone typed: http://www.mysite.com/generated.php They would get the page. Not (as I can currently do) http://www.mysite.com/cms/generated.php Thanks. Steve Jackson Web Development and Marketing Manager Viola Systems Ltd. http://www.violasystems.com [EMAIL PROTECTED] Mobile +358 50 343 5159 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need Some Basic Help with Arrays
Okay Ladies and gents... I am sure I am not the only one who doesn't take advantage of arrays like they should be... would some be so kind as to explain them... you kow I can read the manual and all... but to tell you the truth.. it's a little confusing... maybe some of you have some good ways to explain it to a right brainer like myself Joe Harman http://www.HarmanMedia.com You will never be happy if you continue to search for what happiness consists of. You will never live if you are looking for the meaning of life. - Albert Camus
[PHP] Re: just wondering
hmm... and... what would you do with a clear screen function on a web page with php ? I can't see how it could work.. :) PHP is server side, so you can't clear the user screen like with C or other language ... Regards, P.E. Baroiller Artoo [EMAIL PROTECTED] a écrit dans le message de news:[EMAIL PROTECTED] Just wondering if there's a clear screen function in PHP like the clrscr() in 'C'. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please assist - been on this for hours - Permissions onserver
On Friday 11 July 2003 15:20, Steve Jackson wrote: Writing and moving require the same permissions. Also, there is a big difference between root and webroot. Which one are you talking about? Web root. Sorry not the root directory of the server but the webroot. 1 directory back in fact is all I need so the structure would be: Web Cms generator.php Web generated.php So I can protect the CMS directory which currently needs to be chmod 777 in order to write the page (at least that was the only way I could get the write function to work) and then just have the written files drop back into the web root so that if someone typed: http://www.mysite.com/generated.php They would get the page. Not (as I can currently do) http://www.mysite.com/cms/generated.php You can use php's ftp functions to write the file into your webroot directory. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* One enemy soldier is never enough, but two is entirely too many -- Murphy's Military Laws n68 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] What did I do wrong to cause a parse error?
-Original Message- From: Phil Powell [mailto:[EMAIL PROTECTED] Sent: 11 July 2003 05:54 foreach ($profileArray[$i][attributes] as $key = $val) { $singleProfileHTML .= $key . =\ . str_replace(', '#039;', str_replace('', 'quot;', $val)) . \\n; } The parsing error occurs in the $singleProfileHTML.. line. I'm completely don't get it; I see absolutely nothing wrong with this, what did I miss? Well, I can see nothing wrong with that line, so I can't help there. I do, however, wonder why you aren't using htmlentities() instead of those two ugle str_replace()s. And I hope you have a constant defined called attributes, otherwise that array index must be either quoted (e.g. 'attributes'), or $attributes. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need Some Basic Help with Arrays
Joe, JH Okay Ladies and gents... I am sure I am not the only one who doesn't JH take advantage of arrays like they should be... would some be so kind as JH to explain them... You won't get much joy from this list with this kind of question - it is simply too general for anyone to answer. You have to help us to help you. What precisely do you find confusing? If you find the manual confusing (and it does tend to assume some knowledge) you might benefit from reading one of the many books aimed at introducing PHP to people new to programming. I personally like Teach Yourself PHP4 in 24 hours by Zandstra (Sams Publishing). This is a short, affordable book that explains the basic concepts pretty clearly. PHP is an easy language to learn, but you can't expect it to be painless, any more than learning, say, French would be painless. The more effort you put in, the more the language will reward you... Geoff Caplan Advantae -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Storing HTML string in database
is escaping a solution? addslashes() for your insert-query stripslashes() for your select-query Aaron Axelsen [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have a php script set up for a user to upload a word document, which is then coverted to html form, which I would then lke to store in a database. Howver, when I run the following command: INSERT into sermons (data) VALUE ('$output'); It failes to work, because the $output strings contains , which messes things up. Is there some way that this can be ignored while entering into the databse? Or am I better of replace all the with ''? Thanks for the assistance. - --- Aaron Axelsen AIM: AAAK2 Email: [EMAIL PROTECTED] Want reliable web hosting at affordable prices? www.modevia.com Web Dev/Design Community/Zine www.developercube.com -BEGIN PGP SIGNATURE- Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com iQA/AwUBPw4PI7rnDjSLw9ADEQLL5QCg6rxSs/roIiGyxC6nN3XNiuONg00AoK/T PSAAAbM+O7+e6iVNMMnpK5AC =phqJ -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] session data missing
-Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED] Sent: 09 July 2003 20:30 - Original Message - From: ulf sundin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 1:00 PM Subject: Re: [PHP] session data missing ok, so now the variable names are registred and stored in the file. But without values. check this: --firstpage.php session_start() session_register('foo'); $HTTP_SESSION_VARS['foo'] = 'bar'; echo $HTTP_SESSION_VARS['foo']; //outputs bar; transport by a href to: secondpage.php session_start(); echo $HTTP_SESSION_VARS['foo']; //outputs nothing --- checking the contents of the file called /tmp/sess_{session_id}: !foo| (snip) Make a choice here.. = session_register('foo'); = $HTTP_SESSION_VARS['foo'] = 'bar'; Use either the session_register() function or the session global array. Not both. Not true -- $HTTP_SESSION_VARS is *not* like $_SESSION, and its values are *not* auto-registered. In fact, I still have my copy of the 4.0.6 manual around, and it specifically gives this as an example: Example 1. Registering a variable ?php session_register(count); $HTTP_SESSION_VARS[count]++; ? However, it's a little unclear on whether this should still work regardless of the register_globals setting, as it also gives this as an example: Example 2. Registering a variable with register_globals enabled ?php session_register(count); $count++; ? I guess I'd have to go away and try it to be sure of what behaviour occurs for each setting of register_globals -- but there seems little point given that using $_SESSION has been much the best option for several versions now! Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] /etc/passwd
-Original Message- From: Fejes Jozsef [mailto:[EMAIL PROTECTED] Sent: 10 July 2003 12:33 My method is: 1. check if id starts with / if(ereg(^\/, $id)) goaway; That's a rather expensive (and slightly obscure) way of performing that check. Try: if ($id{0}=='/') goaway; 2. check if there is .. in it if(ereg(\.\., $id)) goaway; Likewise: if (strpos($id, '..')!==FALSE) goaway; Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Please assist - been on this for hours - Permissions onserver
Interesting. Do I need to open an FTP connection do you think or use wrappers? I tried this: // Define the filename to write to. $filename = 'test.txt'; // Open the file for overwriting. $fp = fopen($filename, w); // Write the string to the file $write = fputs($fp, $string); // Close the file fclose($fp); // rename the filename in the root directory to the pagename rename($filename, $pagename.php); $url = 172.16.2.4/~stephenj/misc/webpage; $final_url = ftp://$url/$pagename.php;; $fp2 = fopen(ftp://$url/cms/$pagename.php;, r); Line 59. $move = fputs($fp2, $final_url); fclose($fp2); // end of function. and get a really odd error: Warning: fopen(ftp://172.16.2.4/~stephenj/misc/webpage/cms/this_wont_work.php,; r) - Inappropriate ioctl for device on line 59 Any ideas people? Steve Jackson Web Development and Marketing Manager Viola Systems Ltd. http://www.violasystems.com [EMAIL PROTECTED] Mobile +358 50 343 5159 -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: 11. heinäkuuta 2003 11:47 To: [EMAIL PROTECTED] Subject: Re: [PHP] Please assist - been on this for hours - Permissions onserver On Friday 11 July 2003 15:20, Steve Jackson wrote: Writing and moving require the same permissions. Also, there is a big difference between root and webroot. Which one are you talking about? Web root. Sorry not the root directory of the server but the webroot. 1 directory back in fact is all I need so the structure would be: Web Cms generator.php Web generated.php So I can protect the CMS directory which currently needs to be chmod 777 in order to write the page (at least that was the only way I could get the write function to work) and then just have the written files drop back into the web root so that if someone typed: http://www.mysite.com/generated.php They would get the page. Not (as I can currently do) http://www.mysite.com/cms/generated.php You can use php's ftp functions to write the file into your webroot directory. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* One enemy soldier is never enough, but two is entirely too many -- Murphy's Military Laws n68 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Socket connect crashes web server
Hi Guys, I wonder if any of you can help with this I'm using sockets in php to connect my script to an outside system. More often than not this works fine, but every so often, say twice a day, it brings down my whole web server. When this has happened all the sites im serving can take up to 5 minutes to be displayed in your browser, if I look in the web logs their have been no accesses for a couple of minutes which is not usual and if I look in performance monitor in Win2k there is a flat line for Web Server bytes sent, NIC bytes sent and File Read Bytes/sec. Can anyone explain why this connect to sockets can bring down the whole server? Is it not possible to have the function work in isolation rather than having a knock on effect on everything else? Also in the Win2k system event viewer I get the error: The script started from the URL '/myscript/index.php' with parameters '' has not responded within the configured timeout period. The HTTP server is terminating the script. Any help anyone please? I'm going mad here! Thanks, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Socket connect crashes web server
The script started from the URL '/myscript/index.php' with parameters '' has not responded within the configured timeout period. The HTTP server is terminating the script. maybe the problem is not with the sockets but you have an endless loop bug? do you have an up-to-date version of php? i can't imagine a single connect slowing down an entire server -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] numbers to text
Anyone know of a class or function that converts numbers to readable text eg inputing the number would output text as in 120 = one hundred and twenty 3600 = three thousand six hundred tia pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please assist - been on this for hours - Permissions onserver
Write the file with ftp right away: // Define the filename to write to. $filename = 'ftp://username:[EMAIL PROTECTED]/your_webdir/test.txt'; // Open the file for overwriting. $fp = fopen($filename, w); // Write the string to the file $write = fputs($fp, $string); // Close the file fclose($fp); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Please assist - been on this for hours - Permissions onserver
Same error. Warning: fopen(ftp://[EMAIL PROTECTED]/misc/webpage/cms/test.txt,w) - Inappropriate ioctl for device in /home/stephenj/public_html/misc/webpage/cms/generator.php on line 51 Think this is going to get too complicated for a user interface as well so I might have to abandon this idea. I think I'll just try uploading a template file with it's unique ID rather than writing one directly to the server. I don't want to have to have users put their ftp username and password into the CMS for it to work. Unless you think I am not far from success with this method? All I wanted was for a file to be written into a safe directory and then moved automatically to the webroot. Steve Jackson Web Development and Marketing Manager Viola Systems Ltd. http://www.violasystems.com [EMAIL PROTECTED] Mobile +358 50 343 5159 -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED] Sent: 11. heinäkuuta 2003 13:32 To: Steve Jackson Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Please assist - been on this for hours - Permissions onserver Write the file with ftp right away: // Define the filename to write to. $filename = 'ftp://username:[EMAIL PROTECTED]/your_webdir/test.txt'; // Open the file for overwriting. $fp = fopen($filename, w); // Write the string to the file $write = fputs($fp, $string); // Close the file fclose($fp); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: numbers to text
Anyone know of a class or function that converts numbers to readable text Oh how old... coud you just not even be bothered with Google or any other search engine? To save you the trouble: http://www.phpclasses.org/browse.html/package/754.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: numbers to text
? just not even be bothered with Google I did but didnt find any Thanks ;-) pete Brian McGarvie wrote: Anyone know of a class or function that converts numbers to readable text Oh how old... coud you just not even be bothered with Google or any other search engine? To save you the trouble: http://www.phpclasses.org/browse.html/package/754.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 11 Jul 2003 11:04:55 -0000 Issue 2169
php-general Digest 11 Jul 2003 11:04:55 - Issue 2169 Topics (messages 154802 through 154853): Using DOMXML with homogenous elements 154802 by: Matt Grimm 154807 by: Matt Grimm nlist 154803 by: Johnny Martinez 154804 by: Robert C. 154805 by: David Nicholson 154806 by: Johnny Martinez How to hide url on a php link NOT post... 154808 by: Joey 154810 by: Shena Delian O'Brien 154831 by: Jeff Harris Variable Functions... 154809 by: Michael Smith 154835 by: Burhan Khalid Storing SQL Queries for Reuse in Apps 154811 by: Jacob C Storing HTML string in database 154812 by: Aaron Axelsen 154814 by: Jacob C 154817 by: Aaron Axelsen 154843 by: sven Re: Blatant newbie question - killing a session 154813 by: Ow Mun Heng 154821 by: Bruce Bruen Re: download php 154815 by: Ow Mun Heng Re: Object assignment 154816 by: Tom Rogers 154820 by: Tom Rogers Need hep with mysql function 154818 by: zlut arch 154819 by: Robert Cummings Re: /etc/passwd 154822 by: Mantas Kriauciunas 154845 by: Ford, Mike [LSS] pdf file error? 154823 by: Micah Montoy 154830 by: Micah Montoy Re: Excel Parser 154824 by: Tom Rogers What did I do wrong to cause a parse error? 154825 by: Phil Powell 154832 by: Lars Torben Wilson 154833 by: David Otton 154836 by: Phil Powell 154841 by: Ford, Mike [LSS] dump $_POST into variables 154826 by: Joe Harman 154828 by: Jason Wong 154829 by: Joe Harman just wondering 154827 by: Artoo 154839 by: Baroiller Pierre-Emmanuel Re: regexp problem 154834 by: Burhan Khalid Re: Please assist - been on this for hours - Permissions onserver 154837 by: Steve Jackson 154840 by: Jason Wong 154846 by: Steve Jackson 154850 by: Marek Kilimajer 154851 by: Steve Jackson Need Some Basic Help with Arrays 154838 by: Joe Harman 154842 by: Geoff Caplan Re: session data missing 154844 by: Ford, Mike [LSS] Socket connect crashes web server 154847 by: Chris Morrow 154848 by: Fejes Jozsef numbers to text 154849 by: Pete Morganic 154852 by: Brian McGarvie 154853 by: Pete Morganic Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- I have a final kink to work out of an array to XML parser I've been writing. The array structure is below, along with the example XML it came from. A link to the source I'm working on is at bottom. The only problem this script runs into is when there are multiple elements with the same name on the same node level. It crams all the values into a single element with that name, and uses only the final element's attributes. It seemed like clone_node() was the answer, but it isn't working correctly in this context -- anyone see why? I sure don't. [xml] ?xml version=1.0? rootElement record id=1Value 1/record record id=2Value 2/record /rootElement [/xml] [array] Array ( [rootElement] = Array ( [0] = Array ( [record] = Array ( [0] = Array ( [ATTRIBUTES] = Array ( [id] = 1 ) [VALUE] = Value 1 ) [1] = Array ( [ATTRIBUTES] = Array ( [id] = 2 ) [VALUE] = Value 2 ) ) ) ) ) [/array] Source: http://www.healthtvchannel.org/test/php2xml.phps Thanks, -- Matt Grimm Web Developer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Parkway Anchorage, AK 99508 907.770.6200 ext. 686 907.336.6205 (fax) E-mail: [EMAIL PROTECTED] Web: www.healthtvchannel.org ---End Message--- ---BeginMessage--- I failed to show the output XML in my last message. It's outputting like so: [xml] rootElement record id=2Value1Value2/record /rootElement [/xml] -- Matt Grimm Matt Grimm [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have a final kink to work out of an array to XML parser I've
Re: [PHP] Please assist - been on this for hours - Permissions onserver
On Friday 11 July 2003 18:54, Steve Jackson wrote: Same error. Warning: fopen(ftp://[EMAIL PROTECTED]/misc/webpage/cms/test.txt,w) - Inappropriate ioctl for device in /home/stephenj/public_html/misc/webpage/cms/generator.php on line 51 You *are* using the correct user/pass? It should be the same as what you use to upload files to your webroot. If you can't get this to work then try the ftp functions. Think this is going to get too complicated for a user interface as well so I might have to abandon this idea. I think I'll just try uploading a template file with it's unique ID rather than writing one directly to the server. I don't want to have to have users put their ftp username and password into the CMS for it to work. Alternatively, you could consider storing them in a DB. Unless you think I am not far from success with this method? All I wanted was for a file to be written into a safe directory and then moved automatically to the webroot. I still don't understand (ie you still haven't explained) why you're creating the file somewhere then move it elsewhere. Why can you not use it where it's created, or create it where it's to be used? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* On the Internet, nobody knows you're a dog. -- Cartoon caption */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please assist - been on this for hours - Permissions onserver
You are not that far away. It seems to me you have allow_url_fopen off. Then you need to store your file in a temporary location, use ftp functions to upload it (the example in the manual is all you need), and then remove the temporary file. But this again needs the ftp extenssion enabled. Steve Jackson wrote: Same error. Warning: fopen(ftp://[EMAIL PROTECTED]/misc/webpage/cms/test.txt,w) - Inappropriate ioctl for device in /home/stephenj/public_html/misc/webpage/cms/generator.php on line 51 Think this is going to get too complicated for a user interface as well so I might have to abandon this idea. I think I'll just try uploading a template file with it's unique ID rather than writing one directly to the server. I don't want to have to have users put their ftp username and password into the CMS for it to work. Unless you think I am not far from success with this method? All I wanted was for a file to be written into a safe directory and then moved automatically to the webroot. Steve Jackson Web Development and Marketing Manager Viola Systems Ltd. http://www.violasystems.com [EMAIL PROTECTED] Mobile +358 50 343 5159 -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED] Sent: 11. heinäkuuta 2003 13:32 To: Steve Jackson Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Please assist - been on this for hours - Permissions onserver Write the file with ftp right away: // Define the filename to write to. $filename = 'ftp://username:[EMAIL PROTECTED]/your_webdir/test.txt'; // Open the file for overwriting. $fp = fopen($filename, w); // Write the string to the file $write = fputs($fp, $string); // Close the file fclose($fp); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Lang question
Hi All, looking throught the source of squirrelmail, I see he calls a function _(somevalue) What is this and where can i get more info about it? Thanks -- Dallas Goldswain -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: numbers to text
? just not even be bothered with Google I did but didnt find any to be fair... nor did I when i was looking :\ :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Lang question
www.php.net/gettext Dallas Goldswain wrote: Hi All, looking throught the source of squirrelmail, I see he calls a function _(somevalue) What is this and where can i get more info about it? Thanks -- Dallas Goldswain -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Please assist - been on this for hours - Permissions onserver
You *are* using the correct user/pass? It should be the same as what you use to upload files to your webroot. If you can't get this to work then try the ftp functions. Yes I am. Alternatively, you could consider storing them in a DB. Yes that's what I was thinking they only need put the username password in once so it might not be such a bad idea. But more I think about this I'm doing this in a strange way. If I upload the file directly to root rather than write it then I won't have any problems. Doesn't matter who owns the file then. I still don't understand (ie you still haven't explained) why you're creating the file somewhere then move it elsewhere. Why can you not use it where it's created, or create it where it's to be used? I can't create it where it's meant to be used by writing the file because it would mean changing the permissions of the web root directory to chmod 777. That was the only way I could get the generator file to write the php page by 'chmodding' the directory that the files were being created in to 777. If I do that to the web root it's a security risk. My idea and it's turned out to be a bad one was to put the generator file: ie the file writing the page on the fly in a safe directory IE outside the webroot or in a protected directory. Then move the file to the web root from the safe directory. If there is a way to do what you suggest without a security risk I'd buy you a beer and send it to you via ASDL if you'd tell me how ;o). Cheers, Steve. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please assist - been on this for hours - Permissions onserver
Steve Jackson wrote: You *are* using the correct user/pass? It should be the same as what you use to upload files to your webroot. If you can't get this to work then try the ftp functions. Yes I am. Alternatively, you could consider storing them in a DB. Yes that's what I was thinking they only need put the username password in once so it might not be such a bad idea. But more I think about this I'm doing this in a strange way. If I upload the file directly to root rather than write it then I won't have any problems. Doesn't matter who owns the file then. It does matter in safe mode, unless safe_mode_include_dir is properly set up. I still don't understand (ie you still haven't explained) why you're creating the file somewhere then move it elsewhere. Why can you not use it where it's created, or create it where it's to be used? I can't create it where it's meant to be used by writing the file because it would mean changing the permissions of the web root directory to chmod 777. That was the only way I could get the generator file to write the php page by 'chmodding' the directory that the files were being created in to 777. If I do that to the web root it's a security risk. My idea and it's turned out to be a bad one was to put the generator file: ie the file writing the page on the fly in a safe directory IE outside the webroot or in a protected directory. Then move the file to the web root from the safe directory. Still this would not work for the same reason you cannot write it there directly, the permissions cannot be circumvented. If there is a way to do what you suggest without a security risk I'd buy you a beer and send it to you via ASDL if you'd tell me how ;o). Cheers, Steve. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Capturing Windows Login Details
Hi All, I need to capture the username and password used to login to Windows 2000/XP with PHP. Does anybody know how to do this? Many thanks Gary Ogilvie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Lang question
thanks a million Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] www.php.net/gettext Dallas Goldswain wrote: Hi All, looking throught the source of squirrelmail, I see he calls a function _(somevalue) What is this and where can i get more info about it? Thanks -- Dallas Goldswain -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] So in summary this can't be done due to permission problems?
As part of a CMS I wanted to get the user to: 1) Create a new recordset via a form (with a uniqueid). 2) Press submit whereupon php gets the ID of the record just created in the DB, writes a new page to the server with that unique id and saves it as a filename determined by the user. No way around that due to permission settings on the webroot? So there is no way that PHP can write to the server unless the directory it's writing in is executable? Thanks for continued help. Cheers, Steve Jackson Web Development and Marketing Manager Viola Systems Ltd. http://www.violasystems.com [EMAIL PROTECTED] Mobile +358 50 343 5159 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Socket connect crashes web server
I'm pretty sure its not in an endless loop and php is 4.3, im still nowhere closer to fixing this. I'm sure its not hardware and I thought I was sure its not networkl related but I think im going to have to rethirnk my ideas. Cheers. Chris Fejes Jozsef [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The script started from the URL '/myscript/index.php' with parameters '' has not responded within the configured timeout period. The HTTP server is terminating the script. maybe the problem is not with the sockets but you have an endless loop bug? do you have an up-to-date version of php? i can't imagine a single connect slowing down an entire server -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Unknown Syntax
Does anybody recognize this: !== with 2 '=' Ive known != to mean not equal to but i'm just looking at someone elses script and they use this instead. Does anyone know if this works or any problems with it? Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unknown Syntax
Hello, This is a reply to an e-mail that you wrote on Fri, 11 Jul 2003 at 13:55, lines prefixed by '' were originally written by you. Does anybody recognize this: !== with 2 '=' Ive known != to mean not equal to but i'm just looking at someone elses script and they use this instead. Does anyone know if this works or any problems with it? Cheers This compares type as well as content, for example: 2 !== 2 evaluates to true but 2 != 2 evaluates to false David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] just wondering
[snip] Just wondering if there's a clear screen function in PHP like the clrscr() in 'C'. [/snip] If you are running PHP from the command line on a *nix or BSD box you could... exec(clear); HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unknown Syntax
On Fri, Jul 11, 2003 at 01:56:46PM +0100, Chris Morrow wrote: Does anybody recognize this: !== with 2 '=' Ive known != to mean not equal to but i'm just looking at someone elses script and they use this instead. Does anyone know if this works or any problems with it? Cheers The syntax means 'not true' You can use it after a strpos operation to distinguish 'string was not found' from 'string was found at position 0'. -- Jim Kaufman mailto:[EMAIL PROTECTED] Linux Evangelistcell: 612-481-9778 public key 0x6D802619 fax: 952-937-9832 http://www.linuxforbusiness.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unknown Syntax
Chris Morrow wrote: Does anybody recognize this: !== with 2 '=' Ive known != to mean not equal to but i'm just looking at someone elses script and they use this instead. Does anyone know if this works or any problems with it? Not identical. Negative ===. http://us2.php.net/manual/en/language.operators.comparison.php -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Unknown Syntax
two equal signs means 'equal to' so '!==' means 'not equal to' one equal sign sets a value. ie... x = 2; // x is set to the value of 2 if(x!==3) // checks if the value of x is not equal to 3 as for != i've never seen it with just one equal sign... Chris Morrow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Does anybody recognize this: !== with 2 '=' Ive known != to mean not equal to but i'm just looking at someone elses script and they use this instead. Does anyone know if this works or any problems with it? Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] apache seg fault left ant right
Hello, We get many child pid [xxx] exit signal Segmentation fault (11) in out error_log. tracing the pids and shows seg faults on different funtions, most if not all related to php. Thats probably a bug somewhere on our system, I need help with pin pointing the trouble. here are the tails of what we found out so far, I hope it will make more sense to someone here then to me. The following crush happens on many (80% of the segmentation faults) occasion: read(9, ?php\nfunction draw_menubox_head..., 4096) = 702 _llseek(9, 702, [702], SEEK_SET)= 0 ioctl(9, SNDCTL_TMR_TIMEBASE, 0x5d8f3150) = -1 ENOTTY (Inappropriate ioctl for device) read(9, , 4096) = 0 read(9, , 8192) = 0 ioctl(9, SNDCTL_TMR_TIMEBASE, 0x5d8f2110) = -1 ENOTTY (Inappropriate ioctl for device) close(9)= 0 munmap(0x2313f000, 4096)= 0 time(NULL) = 1057925553 write(22, [Fri Jul 11 15:12:33 2003] [erro..., 270) = 270 chdir(/) = 0 munmap(0x2325c000, 81920) = 0 munmap(0x23212000, 303104) = 0 munmap(0x231f2000, 131072) = 0 munmap(0x231e1000, 69632) = 0 munmap(0x231bf000, 139264) = 0 close(8)= 0 munmap(0x2313d000, 8192)= 0 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 fcntl64(6, F_SETFL, O_RDWR|O_NONBLOCK) = 0 read(6, 0x8a21a70, 8192)= -1 EAGAIN (Resource temporarily unavailable) fcntl64(6, F_SETFL, O_RDWR) = 0 write(6, \1\0\0\0\1, 5) = 5 shutdown(6, 2 /* send and receive */) = 0 close(6)= 0 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 --- SIGSEGV (Segmentation fault) --- The function is: function draw_menubox_header($titel){ $string = 'table ...'. 'td ...' . $titel . '.../table' ; return($string); } ? Those are other type of crushes... All within a time frame of about 15 minutes. == 10742 == munmap(0x2313d000, 8192)= 0 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 fcntl64(6, F_SETFL, O_RDWR|O_NONBLOCK) = 0 read(6, 0x8a90c80, 8192)= -1 EAGAIN (Resource temporarily unavailable) fcntl64(6, F_SETFL, O_RDWR) = 0 write(6, \1\0\0\0\1, 5) = 5 shutdown(6, 2 /* send and receive */) = 0 close(6)= 0 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 --- SIGSEGV (Segmentation fault) --- == 11420 == umask(077) = 022 umask(022) = 077 setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={60, 0}}, NULL) = 0 rt_sigaction(SIGPROF, {0x22c4b2dc, [PROF], SA_RESTART|0x400}, {0x22c4b2dc, [PROF], SA_RESTART|0x400}, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0 --- SIGSEGV (Segmentation fault) --- == 12218 == fstat64(6, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 fcntl64(6, F_SETFD, FD_CLOEXEC) = 0 getdents64(0x6, 0x8adabb8, 0x1000, 0) = 4088 getdents64(0x6, 0x8adabb8, 0x1000, 0) = 2448 getdents64(0x6, 0x8adabb8, 0x1000, 0) = 0 close(6)= 0 stat64(/some/path/index.php, {st_mode=S_IFREG|0644, st_size=233, ...}) = 0 stat64(/sme/path/index.php, {st_mode=S_IFREG|0644, st_size=233, ...}) = 0 --- SIGSEGV (Segmentation fault) --- == 13083 == munmap(0x2314e000, 8192)= 0 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 fcntl64(6, F_SETFL, O_RDWR|O_NONBLOCK) = 0 read(6, 0x8a8ca18, 8192)= -1 EAGAIN (Resource temporarily unavailable) fcntl64(6, F_SETFL, O_RDWR) = 0 write(6, \1\0\0\0\1, 5) = 5 shutdown(6, 2 /* send and receive */) = 0 close(6)= 0 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 --- SIGSEGV (Segmentation fault) --- == 14516 == fcntl64(6, F_SETFL, O_RDWR|O_NONBLOCK) = 0 read(6, 0x89e1b80, 8192)= -1 EAGAIN (Resource temporarily unavailable) fcntl64(6, F_SETFL, O_RDWR) = 0 write(6, \1\0\0\0\1, 5) = 5 shutdown(6, 2 /* send and receive */) = 0 close(6)= 0 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 --- SIGSEGV (Segmentation fault) --- == 18581 == munmap(0x2313d000, 8192)= 0 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 fcntl64(6, F_SETFL, O_RDWR|O_NONBLOCK) = 0 read(6, 0x8a6b440, 8192)= -1 EAGAIN (Resource temporarily unavailable) fcntl64(6, F_SETFL, O_RDWR) = 0 write(6, \1\0\0\0\1, 5) = 5 shutdown(6, 2 /* send and receive */) = 0 close(6)= 0 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 --- SIGSEGV (Segmentation fault) --- == 21266 == fstat64(7, {st_mode=S_IFREG|0644, st_size=1003, ...}) = 0
[PHP] Re: Unknown Syntax
I Found this on the PHP.net site, maybe it will clear things up. Thanks for your help everyone. Example Name Result $a == $b Equal TRUE if $a is equal to $b. $a === $b Identical TRUE if $a is equal to $b, and they are of the same type. (PHP 4 only) $a != $b Not equal TRUE if $a is not equal to $b. $a $b Not equal TRUE if $a is not equal to $b. $a !== $b Not identical TRUE if $a is not equal to $b, or they are not of the same type. (PHP 4 only) $a $b Less than TRUE if $a is strictly less than $b. $a $b Greater than TRUE if $a is strictly greater than $b. $a = $b Less than or equal to TRUE if $a is less than or equal to $b. $a = $b Greater than or equal to TRUE if $a is greater than or equal to $b. Cheers, Chris Erythros [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] two equal signs means 'equal to' so '!==' means 'not equal to' one equal sign sets a value. ie... x = 2; // x is set to the value of 2 if(x!==3) // checks if the value of x is not equal to 3 as for != i've never seen it with just one equal sign... Chris Morrow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Does anybody recognize this: !== with 2 '=' Ive known != to mean not equal to but i'm just looking at someone elses script and they use this instead. Does anyone know if this works or any problems with it? Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Capturing Windows Login Details
I need to capture the username and password used to login to Windows 2000/XP with PHP. Does anybody know how to do this? You can get the username, that's it. $_SESSION['LOGON_USER'] ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fwd: Re: [PHP] How to hide url on a php link NOT post...
--- Jeff Harris [EMAIL PROTECTED] wrote: On Jul 10, 2003, Joey claimed that: |How can I hide this link so value can't be changed? |I don't want to change anything at the server level, and its not from a |form so I cant do a post -vs- a get. | |http://www.abcd.com/popup_SearchRepSet.php?searchby=cust_nosearch=1value=WOR032 | |Thanks ! | #1) [Not PHP] Make it a post that looks like a link. See previous posting at http://marc.theaimsgroup.com/?l=php-generalm=105597453308214w=2 He said it's not a form, so he can't change the method to POST. #2) [Not PHP] If the values will never change, try http://tinyurl.com. If you're keeping track of referrals, it might mess up your statistics. Also, this does not hide the URL once it's been clicked. it expands it, and allows someone to see the variables, which can then be changed and resubmitted. #3) [Not PHP] Make that link inside a frame. One frameset would be invisible, the other would be the link. Not quite sure how this would work. If I can click on the link, I can see (and copy) the full URI. He might want to look into cURL and libcURL(http://curl.haxx.se/libcurl/php/) I believe there are tools there for doing a POST through a standard clickable URL. -- Registered Linux user #304026. lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED Responses to this message should conform to RFC 1855. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Capturing Windows Login Details
OK - is there any other way of grabbing both the username and password from somewhere else? For example the login details used to login onto the Intranet through the firewall, or IIS? Thanks :) -Original Message- From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] Sent: 11 July 2003 14:36 To: Gary Ogilvie; [EMAIL PROTECTED] Subject: Re: [PHP] Capturing Windows Login Details I need to capture the username and password used to login to Windows 2000/XP with PHP. Does anybody know how to do this? You can get the username, that's it. $_SESSION['LOGON_USER'] ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Capturing Windows Login Details
CPT John W. Holmes wrote: You can get the username, that's it. $_SESSION['LOGON_USER'] Don't you mean $_SERVER['LOGON_USER']? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Capturing Windows Login Details
Everything I try I get undefined index what does this mean? It is vital also that I can grab the user and the pass before somebody can access a certain part of the website, like the authentication dialogs that appear in Internet Explorer. Gazza -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Capturing Windows Login Details
Leif K-Brooks wrote: CPT John W. Holmes wrote: You can get the username, that's it. $_SESSION['LOGON_USER'] Don't you mean $_SERVER['LOGON_USER']? I have no variable for either, and I'm authenticated thru a NT domain. We were doing this at the last place I worked for. Users had to logon to the NT domain just to use their computer, so we wanted to make it easier for them to reach the intranet (linux box, running apache/php/etc.) without having to login to it. Unfortunately, I didn't work on the project, so I'm afraid I won't be much help with the gory details, but I know we used LDAP in some way, shape, or form (the guy who did the project lurks around this mailing list from time to time). If I remember correctly, you had to use IE for this to work, and the domain (web site domain) had to be part of the NT domain. I know...not much help, but maybe it'll give you a starting point. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Question
Hi guys,I am new to PHP and I am writing my forst scripts, so maybe this quesetion is a kinda stupid, but it is driving me crazy, can you tell meHow can I set a line break in long line of my code?. thanks in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Capturing Windows Login Details
If it is REALY needed ask the user. You might want to search for NTLM authentication. Gary Ogilvie wrote: OK - is there any other way of grabbing both the username and password from somewhere else? For example the login details used to login onto the Intranet through the firewall, or IIS? Thanks :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] So in summary this can't be done due to permission problems?
--- Steve Jackson [EMAIL PROTECTED] wrote: As part of a CMS I wanted to get the user to: 1) Create a new recordset via a form (with a uniqueid). 2) Press submit whereupon php gets the ID of the record just created in the DB, writes a new page to the server with that unique id and saves it as a filename determined by the user. No way around that due to permission settings on the webroot? So there is no way that PHP can write to the server unless the directory it's writing in is executable? That is correct. According to the docs, if the directory is not executable, you can't even get the permissions on the files in it. I'm confused, though. Let me state at the begining that I'm not a linux guy. Learning, but slowly. -Doesn't PHP run as some user? -Is the issue giving that user execute permissions in the web root? -Why the concern about letting that user have execute permissions, and then prevent anyone (execpt those that have valid reasons) from having write/execute permission to the webroot. Am I missing something basic? Quite possibly... = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Capturing Windows Login Details
CPT John W. Holmes wrote: You can get the username, that's it. $_SESSION['LOGON_USER'] Don't you mean $_SERVER['LOGON_USER']? Yeah :) See what I get for giving up caffeine... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Capturing Windows Login Details
Everything I try I get undefined index what does this mean? It is vital also that I can grab the user and the pass before somebody can access a certain part of the website, like the authentication dialogs that appear in Internet Explorer. Like Lief said, it's $_SERVER['LOGON_USER']... That's only going to be set if you allow access by NT permissions instead of allowing anonymous browsing, anyhow. You're not going to be able to get the password, so give up on that. If you're on an intranet, just use NT permissions on the directory and you can specifically allow which individuals or groups you want and not allow anyone else. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Capturing Windows Login Details
I have found out that all I actually need is the username. That is all - either the windows login username or the firewall username. How do I grab either? Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Fwd: Re: [PHP] How to hide url on a php link NOT post...
Umm.. Maybe you should use sessions. --- Mark [EMAIL PROTECTED] wrote: --- Jeff Harris [EMAIL PROTECTED] wrote: On Jul 10, 2003, Joey claimed that: |How can I hide this link so value can't be changed? |I don't want to change anything at the server level, and its not from a |form so I cant do a post -vs- a get. | |http://www.abcd.com/popup_SearchRepSet.php?searchby=cust_nosearch=1value=WOR032 | |Thanks ! | #1) [Not PHP] Make it a post that looks like a link. See previous posting at http://marc.theaimsgroup.com/?l=php-generalm=105597453308214w=2 He said it's not a form, so he can't change the method to POST. #2) [Not PHP] If the values will never change, try http://tinyurl.com. If you're keeping track of referrals, it might mess up your statistics. Also, this does not hide the URL once it's been clicked. it expands it, and allows someone to see the variables, which can then be changed and resubmitted. #3) [Not PHP] Make that link inside a frame. One frameset would be invisible, the other would be the link. Not quite sure how this would work. If I can click on the link, I can see (and copy) the full URI. He might want to look into cURL and libcURL(http://curl.haxx.se/libcurl/php/) I believe there are tools there for doing a POST through a standard clickable URL. -- Registered Linux user #304026. lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED Responses to this message should conform to RFC 1855. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question
Alvaro Rosales R. wrote: Hi guys,I am new to PHP and I am writing my forst scripts, so maybe this quesetion is a kinda stupid, but it is driving me crazy, can you tell meHow can I set a line break in long line of my code?. More of a text editor question than a PHP question. In most text editors, just hit the enter or return key on your keyboard where you want the line break to be. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Long lines
Hi guys,I am new to PHP and I am writing my first scripts, so maybe this question is a kinda stupid, but it is driving me crazy, can you tell me How can I set a line break in longs line of my code?. thanks in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Fwd: Re: [PHP] How to hide url on a php link NOT post...
--- Mark [EMAIL PROTECTED] wrote: --- Jeff Harris [EMAIL PROTECTED] wrote: On Jul 10, 2003, Joey claimed that: |How can I hide this link so value can't be changed? |I don't want to change anything at the server level, and its not from a |form so I cant do a post -vs- a get. | |http://www.abcd.com/popup_SearchRepSet.php?searchby=cust_nosearch=1value=WOR032 | |Thanks ! | #1) [Not PHP] Make it a post that looks like a link. See previous posting at http://marc.theaimsgroup.com/?l=php-generalm=105597453308214w=2 He said it's not a form, so he can't change the method to POST. D'oh! Stupid me. Didn't read the rest of you archived email. = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Capturing Windows Login Details
CPT John W. Holmes wrote: CPT John W. Holmes wrote: You can get the username, that's it. $_SESSION['LOGON_USER'] Don't you mean $_SERVER['LOGON_USER']? Yeah :) See what I get for giving up caffeine... ---John Holmes... Ughwhy torture yourself?!?!?! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Long lines
snip can you tell me How can I set a line break in longs line of my code?. /snip I think you want to use \n -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Capturing Windows Login Details
Well here is some more information so you can understand what I am trying to do: I need to display their username in html/php document. This document has a form which they fill out. It is to stop people changing who they are when they fill out the form (for example joe bloggs filling out a timesheet for Melinda messenger - hey it cud happen ;)). So, by grabbing the username of their NT logon or Firewall access I can control this. Many thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Fwd: Re: [PHP] How to hide url on a php link NOT post...
--- Daniel Guerrier [EMAIL PROTECTED] wrote: Umm.. Maybe you should use sessions. Oh sure, come up with the EASY way ;-) --- Mark [EMAIL PROTECTED] wrote: --- Jeff Harris [EMAIL PROTECTED] wrote: On Jul 10, 2003, Joey claimed that: |How can I hide this link so value can't be changed? |I don't want to change anything at the server level, and its not from a |form so I cant do a post -vs- a get. | |http://www.abcd.com/popup_SearchRepSet.php?searchby=cust_nosearch=1value=WOR032 | |Thanks ! | #1) [Not PHP] Make it a post that looks like a link. See previous posting at http://marc.theaimsgroup.com/?l=php-generalm=105597453308214w=2 He said it's not a form, so he can't change the method to POST. #2) [Not PHP] If the values will never change, try http://tinyurl.com. If you're keeping track of referrals, it might mess up your statistics. Also, this does not hide the URL once it's been clicked. it expands it, and allows someone to see the variables, which can then be changed and resubmitted. #3) [Not PHP] Make that link inside a frame. One frameset would be invisible, the other would be the link. Not quite sure how this would work. If I can click on the link, I can see (and copy) the full URI. He might want to look into cURL and libcURL(http://curl.haxx.se/libcurl/php/) I believe there are tools there for doing a POST through a standard clickable URL. = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question
Alvaro Rosales R. wrote: Thank you but ,(I come from microsoft vb world, and line breaks of code could be divided with a character(_), so the compiler could parse it and where it finded that character it knew that it was a line break), is there something similar in php? No. Just put a line break. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] So in summary this can't be done due to permission problems?
On Friday, July 11, 2003, 5:07:49 PM, Mark wrote: [ snip ] M That is correct. According to the docs, if the directory is not M executable, you can't even get the permissions on the files in it. M I'm confused, though. M Let me state at the begining that I'm not a linux guy. Learning, but M slowly. M -Doesn't PHP run as some user? PHP runs with the same permissions as Apache. M -Is the issue giving that user execute permissions in the web root? If Apache cannot create a file in a directory, then PHP can't do it either. M -Why the concern about letting that user have execute permissions, M and then prevent anyone (execpt those that have valid reasons) from M having write/execute permission to the webroot. I don't think the problem is with execute permissions. It just needs to be able to write and read from a directory, not necessarily execute. Although I'm not too sure about this. M Am I missing something basic? Quite possibly... This isn't the easiest of things... -- Regards, Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] So in summary this can't be done due to permission problems?
--- Burhan Khalid [EMAIL PROTECTED] wrote: On Friday, July 11, 2003, 5:07:49 PM, Mark wrote: [ snip ] M That is correct. According to the docs, if the directory is not M executable, you can't even get the permissions on the files in it. M I'm confused, though. M Let me state at the begining that I'm not a linux guy. Learning, but M slowly. M -Doesn't PHP run as some user? PHP runs with the same permissions as Apache. Understood. M -Is the issue giving that user execute permissions in the web root? If Apache cannot create a file in a directory, then PHP can't do it either. Understood as well. M -Why the concern about letting that user have execute permissions, M and then prevent anyone (execpt those that have valid reasons) from M having write/execute permission to the webroot. I don't think the problem is with execute permissions. It just needs to be able to write and read from a directory, not necessarily execute. Although I'm not too sure about this. M Am I missing something basic? Quite possibly... This isn't the easiest of things... I guess I have two questions, then. 1-What is the risk of allowing apache to write to the webroot as opposed to a directory under the webroot? I guess it would prevent website defacement, but other than that, can't I do anything malicious in a webroot subdirectory that I can do in the webroot? 2-Is this is not the easiest of things about letting the apache user read/write, but not other users? If so, I must have misunderstood what I've read about linux security (again, quite possibly). I thought users could be in a group, and that group given permissions to a directory/file. Trying to learn... Mark = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Capturing Windows Login Details
Well here is some more information so you can understand what I am trying to do: I need to display their username in html/php document. This document has a form which they fill out. It is to stop people changing who they are when they fill out the form (for example joe bloggs filling out a timesheet for Melinda messenger - hey it cud happen ;)). So, by grabbing the username of their NT logon or Firewall access I can control this. Your web server needs to be IIS in order to get this. Is that the case? If so, disable anonymous browsing. That may be all you have to do. Now, access to the webroot, even though HTTP will require a valid user on your NT domain. You can adjust the security settings of the webroot folder to allow specific people or groups, also. Now, $_SERVER['LOGON_USER'] will be set with the username of the person. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] So in summary this can't be done due to permission problems?
File and directory permissions (so that people searching the archives have something to look for). That is correct. According to the docs, if the directory is not executable, you can't even get the permissions on the files in it. I'm confused, though. 1) To be able to _access_ a directory and its contents you need at minimum, execute permissions, on all directories in the path. 2) To be able to create files (ie write _new_ files) in a directory, you need write permission for the directory in which the file is to be created (as well as (1)). 3) To be able to change the contents of existing files you need (1) and you need write permissions on the file that you want to change. 4) To be able to rename files, you need (1) and read permissions on the source files and (2) on the destination directory. 5) To be able to _list_ the contents of a directory (as opposed to just having _access_) then you need (1) and read permissions on that directory. -Doesn't PHP run as some user? Yes, usually as the user which runs the webserver. -Is the issue giving that user execute permissions in the web root? Not just execute, you need write as well. -Why the concern about letting that user have execute permissions, and then prevent anyone (execpt those that have valid reasons) from having write/execute permission to the webroot. Because in many shared-hosting environments, such an arrangement will mean that your fellow co-hosts will be able to read/write/trash files in your web space. That is why it was suggested that the OP used the FTP functions to write the files into his own web space. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Stone's Law: One man's simple is another man's huh? */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] So in summary this can't be done due to permission problems?
-Why the concern about letting that user have execute permissions, and then prevent anyone (except those that have valid reasons) from having write/execute permission to the webroot. The permissions are Read, Write, and Execute. Read and Write are self explanatory (for directories Write means you can add new files). Execute means you can run an program or shell script (for directories this means you can change directories to it). There are 3 settings for the permissions, User-rwx, Group-rwx, and Other-rwx. Apache usually runs as an unprivileged user, so it uses the Other permissions. Other is everyone that isn't the owner or group, so it's basically anyone else on the server. If you give other write access to the directory with other execute permission, then anyone can read/write to the directory. Which means that they can delete, change text, images, what have you. On a shared server with lots of untrusted users if could be interesting. So create a temp directory, and give chmod o=rwx. Do your writing there, when done stick the final file into a table in a db, and have your main page fetch the contents. For the CMS, before you work too much, take a look at typo3 ... http://www.typo3.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php mysql array question
Is there any php function to pull a query into an array? I know there is a way to get the first row of the results in an array, but I'm having to loop through each row pushing the row onto an array to get the result I'm looking for and it seems like a lot of code for something that I would think is used a lot. Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mysql array question
Is there any php function to pull a query into an array? I know there is a way to get the first row of the results in an array, but I'm having to loop through each row pushing the row onto an array to get the result I'm looking for and it seems like a lot of code for something that I would think is used a lot. There's no PHP function to do so. Some abastraction layers provide this, but it's just doing a loop like you're doing. Show your code and we can offer tips on how to improve performance. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Capturing Windows Login Details
Indeed that works thank you very much :) -Original Message- From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] Sent: 11 July 2003 15:50 To: Gary Ogilvie; [EMAIL PROTECTED] Subject: Re: [PHP] Capturing Windows Login Details Well here is some more information so you can understand what I am trying to do: I need to display their username in html/php document. This document has a form which they fill out. It is to stop people changing who they are when they fill out the form (for example joe bloggs filling out a timesheet for Melinda messenger - hey it cud happen ;)). So, by grabbing the username of their NT logon or Firewall access I can control this. Your web server needs to be IIS in order to get this. Is that the case? If so, disable anonymous browsing. That may be all you have to do. Now, access to the webroot, even though HTTP will require a valid user on your NT domain. You can adjust the security settings of the webroot folder to allow specific people or groups, also. Now, $_SERVER['LOGON_USER'] will be set with the username of the person. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mysql array question
On Fri, 11 Jul 2003, CPT John W. Holmes wrote: Is there any php function to pull a query into an array? I know there is a way to get the first row of the results in an array, but I'm having to loop through each row pushing the row onto an array to get the result I'm looking for and it seems like a lot of code for something that I would think is used a lot. There's no PHP function to do so. Some abastraction layers provide this, but it's just doing a loop like you're doing. Show your code and we can offer tips on how to improve performance. I'm glad this feature doesn't exist. Just think how abused it would be, how many people would use it, when few would actually need it. Most people can use the data while in the loop, not after. Or do what is needed in the sql, not php. Maybe I'm a little too parental though, but so be it. :) Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php mysql array question
I use the PEAR db http://pear.php.net/manual/en/package.database.php This returns arrays - examples here http://pear.php.net/manual/en/package.database.db.intro-fetch.php look at the Quick data retreaval down the page pete Larry Brown wrote: Is there any php function to pull a query into an array? I know there is a way to get the first row of the results in an array, but I'm having to loop through each row pushing the row onto an array to get the result I'm looking for and it seems like a lot of code for something that I would think is used a lot. Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] So in summary this can't be done due to permission problems?
Thanks to all who explained it to me. Sorry if I inadvertently hijacked the thread. --- Jason Wong [EMAIL PROTECTED] wrote: File and directory permissions (so that people searching the archives have something to look for). That is correct. According to the docs, if the directory is not executable, you can't even get the permissions on the files in it. I'm confused, though. 1) To be able to _access_ a directory and its contents you need at minimum, execute permissions, on all directories in the path. 2) To be able to create files (ie write _new_ files) in a directory, you need write permission for the directory in which the file is to be created (as well as (1)). 3) To be able to change the contents of existing files you need (1) and you need write permissions on the file that you want to change. 4) To be able to rename files, you need (1) and read permissions on the source files and (2) on the destination directory. 5) To be able to _list_ the contents of a directory (as opposed to just having _access_) then you need (1) and read permissions on that directory. -Doesn't PHP run as some user? Yes, usually as the user which runs the webserver. -Is the issue giving that user execute permissions in the web root? Not just execute, you need write as well. -Why the concern about letting that user have execute permissions, and then prevent anyone (execpt those that have valid reasons) from having write/execute permission to the webroot. Because in many shared-hosting environments, such an arrangement will mean that your fellow co-hosts will be able to read/write/trash files in your web space. That is why it was suggested that the OP used the FTP functions to write the files into his own web space. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Stone's Law: One man's simple is another man's huh? */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] htaccess?
Is it possible to determine who the htaccess user logged in is? If so, how? Can you point me at some articles? Johnny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] fread() question
I have an open socket that I am reading from. The code looks like the following: $contentLength = 0 + $this-response['headers']['content-length']; do{ $status = socket_get_status($this-socket); if( $status['eof'] == 1 ) { if( $this-clientOptions['debug'] DBGSOCK ) echo(DBG.SOCK status eof met, finished socket_read\n); break; } if($status['unread_bytes'] 0) { if($contentLength $status['unread_bytes']) { echo(DBG.SOCK reading {$status['unread_bytes']} bytes...\n); $buffer = @fread($this-socket, $status['unread_bytes']); $contentLength = $contentLength - $status['unread_bytes']; } else { $buffer = @fread($this-socket, $contentLength); $contentLength = 0; } } else { if( $this-clientOptions['debug'] DBGSOCK ) echo(DBG.SOCK reading {$status['unread_bytes']} bytes...\n); usleep(1); continue; } $data .= $buffer; } while($contentLength 0); Now, the above code hangs (infinite loop, actually), ultimately returning something like: DBG.SOCK reading 3993 bytes... DBG.SOCK reading 0 bytes... DBG.SOCK reading 0 bytes... DBG.SOCK reading 0 bytes... DBG.SOCK reading 0 bytes... DBG.SOCK reading 0 bytes... DBG.SOCK reading 0 bytes... DBG.SOCK reading 0 bytes... DBG.SOCK reading 0 bytes... etc... On the other hand, if I change the following lines: $buffer = @fread($this-socket, $status['unread_bytes'] - 1); $contentLength = $contentLength - $status['unread_bytes'] - 1; Then I get something that looks like: DBG.SOCK reading 3993 bytes... DBG.SOCK reading 1 bytes... DBG.SOCK reading 1 bytes... DBG.SOCK reading 1 bytes... DBG.SOCK reading 1 bytes... DBG.SOCK reading 1 bytes... DBG.SOCK reading 1 bytes... DBG.SOCK reading 1 bytes... DBG.SOCK reading 1 bytes... etc... until the entire response has been read (88771 bytes in this case). Also, this would mean that the effective fread would be: $buffer = @fread($this-socket, 0); However, if I just do: $data = @fread($this-socket, $contentLength); it works as expected. So what's going on? For now, I will use the single command in place of the loop, but I really wanted to monitor the current unread bytes. Any thoughts appreciated. --- Seairth Jacobs [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using DOMXML with homogenous elements
And nevermind, problem solved in another thread. -- Matt Grimm Web Developer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Parkway Anchorage, AK 99508 907.770.6200 ext. 686 907.336.6205 (fax) E-mail: [EMAIL PROTECTED] Web: www.healthtvchannel.org Matt Grimm [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have a final kink to work out of an array to XML parser I've been writing. The array structure is below, along with the example XML it came from. A link to the source I'm working on is at bottom. The only problem this script runs into is when there are multiple elements with the same name on the same node level. It crams all the values into a single element with that name, and uses only the final element's attributes. It seemed like clone_node() was the answer, but it isn't working correctly in this context -- anyone see why? I sure don't. [xml] ?xml version=1.0? rootElement record id=1Value 1/record record id=2Value 2/record /rootElement [/xml] [array] Array ( [rootElement] = Array ( [0] = Array ( [record] = Array ( [0] = Array ( [ATTRIBUTES] = Array ( [id] = 1 ) [VALUE] = Value 1 ) [1] = Array ( [ATTRIBUTES] = Array ( [id] = 2 ) [VALUE] = Value 2 ) ) ) ) ) [/array] Source: http://www.healthtvchannel.org/test/php2xml.phps Thanks, -- Matt Grimm Web Developer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Parkway Anchorage, AK 99508 907.770.6200 ext. 686 907.336.6205 (fax) E-mail: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Long lines
i'm not sure if you want to code in multi line, display in single line or code in single line, display in multi line here gives an example: ?php echo 123; echo 456; echo 789; ? This will give: 123456789 another example: ?php echo abc . \n . def . \n . xyz; ? This will give : abc def xyz another one: ?php echo abc\ndef\nxyz; ? this also gives the same as above hope this helps -- - Eddy Wong __ inframatrix internet solutions http://www.inframatrix.com/ ??Eddy Regular Octa-Eddy ??? ??? ??? ??: [EMAIL PROTECTED] ??? ??: news://news.fixip.net/chat.ed ??? ???: news://news.fixip.net/ ??? ??? Alvaro Rosales R. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi guys,I am new to PHP and I am writing my first scripts, so maybe this question is a kinda stupid, but it is driving me crazy, can you tell me How can I set a line break in longs line of my code?. thanks in advance!
[PHP] Enable GD on PHP 4.1.1 problems
Argh! I am ready to pull out my hair on this. I have made sure that jpeg-6b is installed, libpng is installed, zlib etc. I can configure with ./configure --with-apxs=/usr/local/sbin/apxs --with-config-file-path=/usr/local/etc --enable-versioning --with-system-regex --disable-debug --enable-track-vars --with-zlib --with-mysql=/usr/local --prefix=/usr/local/ --enable-ftp i386--freebsd4.5 --with-jpeg=/usr/local --with-png=/usr/local --with-gd=/usr/local no errors are thrown by make or make install but the phpinfo() page just displays a header with no other info. If I take out with-gd=/usr/local all goes well, the phpinfo() comes back to life...but none of the image info appears. I get './configure' '--with-apxs=/usr/local/sbin/apxs' '--with-config-file-path=/usr/local/etc' '--enable-versioning' '--with-system-regex' '--disable-debug' '--enable-track-vars' '--with-zlib' '--with-mysql=/usr/local' '--prefix=/usr/local/' '--enable-ftp' 'i386--freebsd4.5' in the configuration Maybe I should just call it a day and start over on Monday. Would someone please point me in the right direction? Thanks! jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Long lines
Try this $str = here is some php . here is more . here is even more; Just a plain '.' will do the trick. Jim Lucas - Original Message - From: Alvaro Rosales R. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 11, 2003 7:11 AM Subject: [PHP] Long lines Hi guys,I am new to PHP and I am writing my first scripts, so maybe this question is a kinda stupid, but it is driving me crazy, can you tell me How can I set a line break in longs line of my code?. thanks in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] htaccess?
Is it possible to determine who the htaccess user logged in is? If so, how? Can you point me at some articles? Johnny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php $_SERVER['PHP_AUTH_USER'] -- Thanks, Dean E. Weimer http://www.dwiemer.org/ [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php mysql array question
It shouldn't take a lot of code to put results into an array: $query = select * from table; $r = mysql_result($query); while ($row = mysql_fetch_object($r)) $hold[] = $row; (OR, to index by some id field in the database:) $hold[$row-id] = $row; mysql_free_result($r); Total of 5 lines. -- Rob Larry Brown [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there any php function to pull a query into an array? I know there is a way to get the first row of the results in an array, but I'm having to loop through each row pushing the row onto an array to get the result I'm looking for and it seems like a lot of code for something that I would think is used a lot. Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to hide URL but it's not from a form just a link ?
How can I hide this link so value can't be changed? I don't want to change anything at the server level, and its not from a form so I cant do a post -vs- a get. http://www.abcd.com/SearchSet.php?searchby=cust_nosearch=1value=WOR032 Thanks ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to hide URL but it's not from a form just a link ?
As someone mentioned earlier, put them into a session (or a cookie). Is this a repost, or is it a duplicate? --- Joey [EMAIL PROTECTED] wrote: How can I hide this link so value can't be changed? I don't want to change anything at the server level, and its not from a form so I cant do a post -vs- a get. http://www.abcd.com/SearchSet.php?searchby=cust_nosearch=1value=WOR032 Thanks ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mind exploded on this one!
$booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile', 'hasSelectedProfile', 'hasEditedProfile', 'hasDeletedProfile', 'willDeleteProfile', 'willDeletePic'); $booleanVars = array('profileID', 'showemail', 'showbirthday', 'season', 'profilememberid'); $profileVarArray = array('firstname', 'lastname', 'city', 'state', 'country', 'favebands', 'faveconcert', 'favescandinavia', 'faveviking', 'favemeat', 'freetime', 'thingslove', 'thingshate', 'favebibleverse', 'changeonething', 'maritalstatus', 'birthday', 'favemovie', 'faveplace', 'favetv', 'imgpath', 'imgext'); $profileNonFormVarArray = array('profileName', 'letter', 'name'); $arrayListArray = array('booleanNonFormVars', 'booleanVars', 'profileVarArray', 'profileNonFormVarArray'); Bluntly put, I need to get: $hasSelectedLetter $letter Etc.. I have absolutely NO idea how to do this, help! Phil
Re: [PHP] Mind exploded on this one!
- Original Message - From: Phil Powell [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 11, 2003 12:21 PM Subject: [PHP] Mind exploded on this one! $booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile', 'hasSelectedProfile', 'hasEditedProfile', 'hasDeletedProfile', 'willDeleteProfile', 'willDeletePic'); $booleanVars = array('profileID', 'showemail', 'showbirthday', 'season', 'profilememberid'); $profileVarArray = array('firstname', 'lastname', 'city', 'state', 'country', 'favebands', 'faveconcert', 'favescandinavia', 'faveviking', 'favemeat', 'freetime', 'thingslove', 'thingshate', 'favebibleverse', 'changeonething', 'maritalstatus', 'birthday', 'favemovie', 'faveplace', 'favetv', 'imgpath', 'imgext'); $profileNonFormVarArray = array('profileName', 'letter', 'name'); $arrayListArray = array('booleanNonFormVars', 'booleanVars', 'profileVarArray', 'profileNonFormVarArray'); Bluntly put, I need to get: $hasSelectedLetter $letter Etc.. I have absolutely NO idea how to do this, help! Phil --- Oh my. :) Looks like to me you've got.. $hasSelectedLetter = $arrayListArray['booleanNonFormVars'][0]; $letter = $arrayListArray['profileNonFormVarArray'][1]; HTH, Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mind exploded on this one!
- Original Message - From: Kevin Stone [EMAIL PROTECTED] To: Phil Powell [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 11, 2003 12:33 PM Subject: Re: [PHP] Mind exploded on this one! - Original Message - From: Phil Powell [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 11, 2003 12:21 PM Subject: [PHP] Mind exploded on this one! $booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile', 'hasSelectedProfile', 'hasEditedProfile', 'hasDeletedProfile', 'willDeleteProfile', 'willDeletePic'); $booleanVars = array('profileID', 'showemail', 'showbirthday', 'season', 'profilememberid'); $profileVarArray = array('firstname', 'lastname', 'city', 'state', 'country', 'favebands', 'faveconcert', 'favescandinavia', 'faveviking', 'favemeat', 'freetime', 'thingslove', 'thingshate', 'favebibleverse', 'changeonething', 'maritalstatus', 'birthday', 'favemovie', 'faveplace', 'favetv', 'imgpath', 'imgext'); $profileNonFormVarArray = array('profileName', 'letter', 'name'); $arrayListArray = array('booleanNonFormVars', 'booleanVars', 'profileVarArray', 'profileNonFormVarArray'); Bluntly put, I need to get: $hasSelectedLetter $letter Etc.. I have absolutely NO idea how to do this, help! Phil --- Oh my. :) Looks like to me you've got.. $hasSelectedLetter = $arrayListArray['booleanNonFormVars'][0]; $letter = $arrayListArray['profileNonFormVarArray'][1]; HTH, Kevin Correction! The indicies are not valid. My mistake. :) $hasSelectedLetter = $arrayListArray['booleanNonFormVars']['hasSelectedLetter']; $letter = $arrayListArray['profileNonFormVarArray']['letter']; - Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Mind exploded on this one!
Could you give an example of what you want/expect to get back? Seairth Phil Powell [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] $booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile', 'hasSelectedProfile', 'hasEditedProfile', 'hasDeletedProfile', 'willDeleteProfile', 'willDeletePic'); $booleanVars = array('profileID', 'showemail', 'showbirthday', 'season', 'profilememberid'); $profileVarArray = array('firstname', 'lastname', 'city', 'state', 'country', 'favebands', 'faveconcert', 'favescandinavia', 'faveviking', 'favemeat', 'freetime', 'thingslove', 'thingshate', 'favebibleverse', 'changeonething', 'maritalstatus', 'birthday', 'favemovie', 'faveplace', 'favetv', 'imgpath', 'imgext'); $profileNonFormVarArray = array('profileName', 'letter', 'name'); $arrayListArray = array('booleanNonFormVars', 'booleanVars', 'profileVarArray', 'profileNonFormVarArray'); Bluntly put, I need to get: $hasSelectedLetter $letter Etc.. I have absolutely NO idea how to do this, help! Phil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Writing to files
Is there a way to write to a beginning of a file without it overwriting data that's already there or do I have to write to the end of the file in order to preserve data? I ask because it would be much easier to print the lines of the file out in order of last added first if I could add lines at the top of the file. Thanks, Jason Giangrande -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Enable GD on PHP 4.1.1 problems SOLVED
[snip] ... all of it ... [/snip] required installing the jpeg library first, png second, then gd Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mind exploded on this one!
You have almost everything correct here change that last line to this. $arrayListArray = compact('booleanNonFormVars', 'booleanVars', 'profileVarArray', 'profileNonFormVarArray'); notice the use of compact() Jim Lucas - Original Message - From: Phil Powell [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 11, 2003 11:21 AM Subject: [PHP] Mind exploded on this one! $booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile', 'hasSelectedProfile', 'hasEditedProfile', 'hasDeletedProfile', 'willDeleteProfile', 'willDeletePic'); $booleanVars = array('profileID', 'showemail', 'showbirthday', 'season', 'profilememberid'); $profileVarArray = array('firstname', 'lastname', 'city', 'state', 'country', 'favebands', 'faveconcert', 'favescandinavia', 'faveviking', 'favemeat', 'freetime', 'thingslove', 'thingshate', 'favebibleverse', 'changeonething', 'maritalstatus', 'birthday', 'favemovie', 'faveplace', 'favetv', 'imgpath', 'imgext'); $profileNonFormVarArray = array('profileName', 'letter', 'name'); $arrayListArray = array('booleanNonFormVars', 'booleanVars', 'profileVarArray', 'profileNonFormVarArray'); Bluntly put, I need to get: $hasSelectedLetter $letter Etc.. I have absolutely NO idea how to do this, help! Phil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Writing to files
Hello, This is a reply to an e-mail that you wrote on Fri, 11 Jul 2003 at 19:56, lines prefixed by '' were originally written by you. Is there a way to write to a beginning of a file without it overwriting data that's already there or do I have to write to the end of the file in order to preserve data? I ask because it would be much easier to print the lines of the file out in order of last added first if I could add lines at the top of the file. Not without reading the entire file into a variable first then appending that variable to the data you wish to add and saving the entire file again (which will obviously take longer than appending to the end of the file). David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Writing to files
Any ideas on how I can print the lines of my file in reverse order, then? Does fgets() always process from the beginning of the file even if you open the file with the pointer at the end? I tried to get the line count of the file and go through each line of the file backwards but that doesn't seem to work, so either it's impossible or I'm going about it the wrong way. Here's the code: $fh = fopen(data.txt, a+) or die(Could not open file); $line_num = 0; while (! feof($fh)) { if ($line = fgets($fh, 1048576)) { $line_num++; } } while ($line_num != 0)) { if ($line = fgets($fh, 1048576)) { print $line; $line_num--; } } Thanks, Jason On Fri, 2003-07-11 at 15:04, David Nicholson wrote: Hello, This is a reply to an e-mail that you wrote on Fri, 11 Jul 2003 at 19:56, lines prefixed by '' were originally written by you. Is there a way to write to a beginning of a file without it overwriting data that's already there or do I have to write to the end of the file in order to preserve data? I ask because it would be much easier to print the lines of the file out in order of last added first if I could add lines at the top of the file. Not without reading the entire file into a variable first then appending that variable to the data you wish to add and saving the entire file again (which will obviously take longer than appending to the end of the file). David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Writing to files
Any ideas on how I can print the lines of my file in reverse order, then? Does fgets() always process from the beginning of the file even if you open the file with the pointer at the end? I tried to get the line count of the file and go through each line of the file backwards but that doesn't seem to work, so either it's impossible or I'm going about it the wrong way. Here's the code: $fh = fopen(data.txt, a+) or die(Could not open file); $line_num = 0; while (! feof($fh)) { if ($line = fgets($fh, 1048576)) { $line_num++; } } while ($line_num != 0)) { if ($line = fgets($fh, 1048576)) { print $line; $line_num--; } } $file = file('data.txt'); $rev_file = array_reverse($file); foreach($rev_file as $line) { echo $line; } ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Writing to files
You could try using the file() function. Then loop backward through the array or use array_reverse. -- Rob Jason Giangrande [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Any ideas on how I can print the lines of my file in reverse order, then? Does fgets() always process from the beginning of the file even if you open the file with the pointer at the end? I tried to get the line count of the file and go through each line of the file backwards but that doesn't seem to work, so either it's impossible or I'm going about it the wrong way. Here's the code: $fh = fopen(data.txt, a+) or die(Could not open file); $line_num = 0; while (! feof($fh)) { if ($line = fgets($fh, 1048576)) { $line_num++; } } while ($line_num != 0)) { if ($line = fgets($fh, 1048576)) { print $line; $line_num--; } } Thanks, Jason On Fri, 2003-07-11 at 15:04, David Nicholson wrote: Hello, This is a reply to an e-mail that you wrote on Fri, 11 Jul 2003 at 19:56, lines prefixed by '' were originally written by you. Is there a way to write to a beginning of a file without it overwriting data that's already there or do I have to write to the end of the file in order to preserve data? I ask because it would be much easier to print the lines of the file out in order of last added first if I could add lines at the top of the file. Not without reading the entire file into a variable first then appending that variable to the data you wish to add and saving the entire file again (which will obviously take longer than appending to the end of the file). David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mailing list server with PHP frontend
Hi! I want to know if anyone knows about a good mailing list manager that has got a PHP administration frontend I've found many PHP scripts for sending newsletters and announcementes, but that's it's not what I want I want a system like Mailman, Sympa or Majordomo (the mailing list server may be programmed in Perl or whatever), but it must provide a PHP frontend for administration, subscription, etc It would be great if messages are stored in a database like MySQL and it must be free software Does this exist?? Thanks in advanced, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Writing to files
Hello, This is a reply to an e-mail that you wrote on Fri, 11 Jul 2003 at 20:37, lines prefixed by '' were originally written by you. Any ideas on how I can print the lines of my file in reverse order, then? How about... $fp = fopen(yourfile.txt,r); $filecontents = ; while(!feof($fp)){ $filecontents.=fgets($fp,1024); // read entire file into $filecontents } $filelines = split(\n,$filecontents); // split file into individual lines for($i=(count($filelines)-1);$i=0;$i--){ // loop through array in reverse order echo $filelines[$i] . \n; } -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mailing list server with PHP frontend
Hi, Maybe is this what you want; http://www.eternalmart.com/ Regards, Frank - Original Message - From: Juan Nin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, July 12, 2003 1:47 AM Subject: [PHP] Mailing list server with PHP frontend Hi! I want to know if anyone knows about a good mailing list manager that has got a PHP administration frontend I've found many PHP scripts for sending newsletters and announcementes, but that's it's not what I want I want a system like Mailman, Sympa or Majordomo (the mailing list server may be programmed in Perl or whatever), but it must provide a PHP frontend for administration, subscription, etc It would be great if messages are stored in a database like MySQL and it must be free software Does this exist?? Thanks in advanced, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mailing list server with PHP frontend
From: Frank Keessen [EMAIL PROTECTED] Maybe is this what you want; http://www.eternalmart.com/ nope, I had already seen it.. that's the kind of software I found lots, it's for sending announcements via a web form to subscribed users, but it's not a mailing list server thanks anyway Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php