php-general Digest 23 Nov 2001 01:58:12 -0000 Issue 1010
Topics (messages 75497 through 75545): about the replacing HTML code by another codes in a Forum ? 75497 by: trongduc 75499 by: liljim Cool? 75498 by: Jaime Iniesta Aleman Send an e-mail witdh php 75500 by: Henk 75501 by: Sebastian Wenleder 75503 by: Henk 75504 by: Simos Varelakis 75510 by: Jason G. Re: Need regular match help - possibly 75502 by: Gaylen Fraley Re: Cannot add header information... SOLUTION 75505 by: Per Waagen Memory upload question.. 75506 by: Pierre-Yves Lemaire Re: GD, PNG 75507 by: Michael A. Peters Re: header("Location:...") much faster then http-equiv="refresh"? too fast? 75508 by: Avi Schwartz Re: Cannot add header information... 75509 by: Avi Schwartz 75544 by: Peter Brown redirect 75511 by: Etienne Colla 75512 by: Fredrik Wahlberg possible problems working with sessions 75513 by: Alberto Mucignat 75539 by: George Whiffen error handling and __LINE__ 75514 by: SafeV POP commands 75515 by: Yura 75516 by: Daniel Roperto - Ação Direta 75528 by: Fred What does &var mean ? 75517 by: Girish Nath 75518 by: Bas Jobsen 75521 by: Girish Nath 75522 by: Nayco_IUT Laroche 75529 by: Fred 75535 by: J Smith 75537 by: Nayco_IUT Laroche 75542 by: Philip Olson Re: How do I convert from perl to php? - Reality Check & Taxation 75519 by: George Whiffen 75536 by: George Whiffen mail client 75520 by: Krzysztof Kakol Yet Another Mysql Problem 75523 by: Stephen Phillips 75524 by: Jon Farmer 75525 by: Stephen Phillips 75530 by: Richard Black 75531 by: Fred 75538 by: Fred solaris + APACHE + PHP = ??? it's working ? 75526 by: Evgeny Rachlenko 75527 by: Justin England How to load .php3 pages using PHP4 75532 by: EDUMEXICO 75533 by: Justin England what the best version PHP + APACHE on Solaris8 75534 by: Evgeny Rachlenko SAFE_MODE + deleting files 75540 by: Robert Mena DTD Validation with DOM 75541 by: Fernando Nemec get_included_files() in php3 75543 by: Martin Towell usage stats 75545 by: Joseph Blythe 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] ----------------------------------------------------------------------
--- Begin Message ---hi, can anyone help me this ? 1) I made a simple forum, and it will allow the users to send their messages in HTML format. But I worried about the security of my website, so I removed all of the "<SCRIPT" tags in their messages by placing "</SCRIPT" instead. (Because the users maybe use <SCRIPT language="JavaScript">, so I cannot replace "<SCRIPT>" exactly) Is it the best solution to protect my pages from malicious code ? (is it secure for my pages ?) Are there other ways that someone can use malicious codes in their messages without <SCRIPT> ? 2) In the case I do not allow the users send messages in HTML codes, I replaced (similar with phpBB code) : [a]=>"<a href=" [/a]=>">" [//a]=>"</a>" example the content of message is : [a]www.microsoft.com[/a]Click here...[//a] ...will place a link to Microsoft.com, but the problems will happen when the users use only [a], or [/a], not use [//a] to close the link. Can anyone help me to fix this problem ? (is there another way to do this more simple ?) thanks very much...--- End Message ---
--- Begin Message ---Hiya, well, you could replace all script tags with this regex: $string = preg_replace("/<\/?SCRIPT.*?>/is", "", $string); But, if you're converting all < and > to their html equivelants (which you should be) using something like htmlspecialchars or your own regex, you shouldn't even need to do that. You might also want to think about strip_tags(), though again, I prefer just to convert the characters and not worry about it. as for your links, I'd rethink the user input and use something like [a=www.microsoft.com]Click[/a] ;> // quick and dirty regex $string = preg_replace("/\[a=(.+?)\](.*?)\[\/a\]/is", "<a href=\"\\1\" target=\"_blank\">\\2</a>", $string); James "Trongduc" <[EMAIL PROTECTED]> wrote in message 001101c17341$b6de6060$1d0b10ac@d">news:001101c17341$b6de6060$1d0b10ac@d... > hi, > can anyone help me this ? > > 1) > I made a simple forum, and it will allow the users to send their messages in > HTML format. > But I worried about the security of my website, so I removed all of the > "<SCRIPT" tags in their messages by placing "</SCRIPT" instead. > (Because the users maybe use <SCRIPT language="JavaScript">, so I cannot > replace "<SCRIPT>" exactly) > > Is it the best solution to protect my pages from malicious code ? (is it > secure for my pages ?) > Are there other ways that someone can use malicious codes in their messages > without <SCRIPT> ? > > 2) > In the case I do not allow the users send messages in HTML codes, I replaced > (similar with phpBB code) : > [a]=>"<a href=" > [/a]=>">" > [//a]=>"</a>" > > example the content of message is : > [a]www.microsoft.com[/a]Click here...[//a] > ...will place a link to Microsoft.com, but the problems will happen when the > users use only [a], or [/a], not use [//a] to close the link. Can anyone > help me to fix this problem ? (is there another way to do this more simple > ?) > > thanks very much... >--- End Message ---
--- Begin Message ---Well, my site about Talking Heads is kinda cool, and I'm using PHP in it, more and more everyday. Soon it'll let visitors add their own comments to the pages, just like the anotated PHP manual: http://thismustbetheplace.net Jaime From: "Carry Ian" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Mime-Version: 1.0 Content-type: text/plain; charset="iso-8859-1" Subject: begineer + coolsite I found this site http://www.Banners4i.com while surfing the net, may be it could be useful to you. It has Free Banner / Link Exchange Server, Counter Server and a WAP Counter Server developed using PHP (may be PHP4, MySQL, WML) If you know of any cool sites developed using PHP pl. let me know. -------------------------------------------------------------------------------------------------- Get real solutions to all your problems. http://www.salahkarindia.com - India's first advisory Portal Your friend, advisor, healer,companion!!! Register now to get free advice on all your problems. ----------------------------------------------------------------------------------------------------- End Message ---
--- Begin Message ---Hello, I want to send an e-mail to one address(To) and many carbon copies to many e-mailadresses(BCC). Is there a class to do this?? Henk--- End Message ---
--- Begin Message --->Hello, > >I want to send an e-mail to one address(To) and many carbon copies to many >e-mailadresses(BCC). > >Is there a class to do this?? > >Henk Hi Henk, You don't need a special class, just use: $to = "[EMAIL PROTECTED]"; $subject = "Your Subject"; $messages = "some text you want to send..."; $headers = "CC: firstname<[EMAIL PROTECTED]>, [EMAIL PROTECTED],"; $headers .= "[EMAIL PROTECTED]\n"; $headers .= "From: Your name<[EMAIL PROTECTED]>"\n"; mail ($to, $subject, $message , $headers); Best, Sebastian--- End Message ---
--- Begin Message ---That doesn't work. He is gives the error: Failed to Connect Henk "Sebastian Wenleder" <[EMAIL PROTECTED]> wrote in message news:p0510030ab822a385d74e@[192.168.100.2]... > >Hello, > > > >I want to send an e-mail to one address(To) and many carbon copies to many > >e-mailadresses(BCC). > > > >Is there a class to do this?? > > > >Henk > > > Hi Henk, > > You don't need a special class, just use: > > $to = "[EMAIL PROTECTED]"; > $subject = "Your Subject"; > $messages = "some text you want to send..."; > $headers = "CC: firstname<[EMAIL PROTECTED]>, [EMAIL PROTECTED],"; > $headers .= "[EMAIL PROTECTED]\n"; > $headers .= "From: Your name<[EMAIL PROTECTED]>"\n"; > > mail ($to, $subject, $message , $headers); > > Best, > Sebastian--- End Message ---
--- Begin Message ---> -----Original Message----- > From: Henk [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 22, 2001 3:21 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Send an e-mail witdh php > > > That doesn't work. He is gives the error: > > Failed to Connect > > > Henk > check your /etc/php.ini conf file--- End Message ---
--- Begin Message ---Also, If you have an array of addresses, use the implode() function. $sAddressList = implode(',', $aAddressArray); and then use that with the Bcc: header in the mail function. -Jason Garber IonZoft.com >Hi Henk, > >You don't need a special class, just use: > >$to = "[EMAIL PROTECTED]"; >$subject = "Your Subject"; >$messages = "some text you want to send..."; >$headers = "CC: firstname<[EMAIL PROTECTED]>, [EMAIL PROTECTED],"; >$headers .= "[EMAIL PROTECTED]\n"; >$headers .= "From: Your name<[EMAIL PROTECTED]>"\n"; > >mail ($to, $subject, $message , $headers); > >Best, >Sebastian At 01:50 PM 11/22/2001 +0100, Sebastian Wenleder wrote: >>Hello, >> >>I want to send an e-mail to one address(To) and many carbon copies to many >>e-mailadresses(BCC). >> >>Is there a class to do this?? >> >>Henk--- End Message ---
--- Begin Message ---Thanks. According to the manual, the <br /> is for XHTML compliance. This changed in 4.0.5. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.3 Guestbook http://www.gaylenandmargie.com/phpwebsite "Liljim" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Thinking about it, this would probably be even better: > > $string = preg_replace("/(\n|<br>){3,}/i", "\\1\\1\\1", $string); > > This: > $string = "This is a > \n\n\n\n\n\n\n\n\n\n\ntest\nTesting\nTesting\n\n123<br><br><br><br><br><br>< > br><br><br><br><br>Some more testing<br><br><br><br><br><br><br><br><br>And > a little > more<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> > <br><br><br><br><br><br><br><br><br><br><br><br><br><br>Even more."; > > Then outputs as this: > > This is a <br /> > <br /> > <br /> > test<br /> > Testing<br /> > Testing<br /> > <br /> > 123<br><br><br>Some more testing<br><br><br>And a little > more<br><br><br>Even more. > > when echo'd with nl2br() > > As a side note, does anyone know what's with the <br> tag changing to <br > />? That's the way I've always used the line break tag for wml pages, but > hadn't realised that it's being written that way for standard html now. Is > this a change in spec? > > James > > "Liljim" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hello Gaylen, > > > > try this: > > > > $string = preg_replace("/\n{3,}/", "\n\n\n", $string); > > > > James > > > > "Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > I need a routine that will allow me to trap multiple <br> and/or line > feed > > > characters and convert them to a constant number. As an example, let's > > say > > > that you have text that has 10 carriage returns and/or line feeds. I > want > > > to limit this to 3. So, I need to be able to parse the line to detect > the > > > multiple control characters and convert the string to 3. So if the > string > > > looked something like: > > > > > > This is \n\n\n\n\n\n\n\n\n\n a test. > > > > > > I would want it converted to > > > > > > This is \n\n\n a test. > > > > > > > > > Conceivably, it could be > > > > > > This is <br><br><br><br><br> a test. > > > > > > I would want it converted to > > > > > > This is <br><br><br> a test. > > > > > > > > > I know I could write a do/while loop, but I was wondering if there is a > > way > > > using eregi_replace or something along that line? > > > > > > Thanks! > > > > > > > > > > > >--- End Message ---
--- Begin Message ---Thank you Jon & folks, now its OK! ;) Per > You've already sent something to the browser... the line that starts with > <HTML><HEAD>... > > Move that below the authentication code and all should be well. > > HTH > Jon > > > -----Original Message----- > From: Per Waagen [mailto:[EMAIL PROTECTED]] > Sent: 22 November 2001 10:20 > To: [EMAIL PROTECTED] > Subject: [PHP] Cannot add header information... > > > Need some help here, Im getting this error: > > Warning: Cannot add header information - headers already sent by (output > started at /home/p/pe/perphp/public_html/login.php:4) in > /home/p/pe/perphp/public_html/login.php on line 44 > > ...while trying to run the following .PHP code on my server. Any ideas why > this doesnt work? > (Im trying to setup user authentication and found this on the Webmonkey > site) > > All tips are appreciated!! > > > ********************************************************************** > 'The information included in this Email is of a confidential nature and is > intended only for the addressee. If you are not the intended addressee, > any disclosure, copying or distribution by you is prohibited and may be > unlawful. Disclosure to any party other than the addressee, whether > inadvertent or otherwise is not intended to waive privilege or confidentiality' > > ********************************************************************** > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >--- End Message ---
--- Begin Message ---do you have a tip to upload big files without the hassle of having php crunch so much memory? If I upload, say, 20 MB of data, my script process will end up using 20 MB of memory. I think it stores all received data in memory and then flushes it in the temp file at the end. Regards,--- End Message ---
--- Begin Message ---The operating system you are using would be nice to know- and wether its for apache, cgi-bin, or whatever. Most unixes (and it looks like you got a unix) have zlib in /usr not /usr/local. Quite a few already have gd and libpng in /usr as well. That's why it would be nice to know what your build environment is. Anyway, I'm pretty sure that you need to make sure gd is compiled against png. On my system, for example, my gd library is compiled with png, jpeg, and FreeType2 support. Secondly- if your system is darwin, you need to fix a few things. First, run ranlib on /usr/local/lib/libpng.a Then you can build gd against it. Then, though, you need to do the same to libgd ranlib /usr/local/lib/libgd.a note that the above is only needed on Darwin. That is properly done on most other unixes for you (in fact, most unixes compile those as shared libraries) If you are compiling for an apache module, try this- tar -zxf php-4.0.6.tar.gz cd php-4.0.6 ./configure --with-apxs=/usr/sbin/apxs --with-zlib=/usr --with-gd=/usr/local --with-png-dir=/usr/local On Thu, 22 Nov 2001 16:55:37 -0500 Yamin Prabudy <[EMAIL PROTECTED]> mentioned: > Hi there > I try to setup GD and PNG and Zlib to work with my PHP 4.06 > > but still no sucess > > can anyone point me out how to do that, or a website that contain step by > step instruction > in the configure line i used this options --with-gd=/usr/local > --with-png-dir=/usr/local/png --with-zlib=/usr/local > > installing those three items i just used make and make install so everthing > must go to /usr/local > > > thanks for the help > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- -=-=-=-=-=-=-=-=-=-=-=-=- Michael A. Peters http://24.5.29.77:10080/--- End Message ---
--- Begin Message ---I tried it and it didn't work. It seems that <http-equiv="refresh"...> meta tag forces a refresh while header("Location") does not. I am not sure why. Avi Roko Roic wrote: >> When I use header("Location: ...") to redirect the user back to the >> record > > Send a Header(pragma no-cache) before Header(Location) and it will work. > > Roko -- Avi Schwartz [EMAIL PROTECTED] "I have to share the credit. I invented it, but Bill made it famous." - IBM engineer Dave Bradley describing the control-alt-delete reboot sequence--- End Message ---
--- Begin Message ---Headers have to be sent before anything else is sent to the browser. Even once space appearing before the php openning tag will cause this error! Try to send the headers first thing in your code before any html code. Avi Per Waagen wrote: > Warning: Cannot add header information - headers already sent by (output > started at /home/p/pe/perphp/public_html/login.php:4) in > /home/p/pe/perphp/public_html/login.php on line 44 -- Avi Schwartz [EMAIL PROTECTED] "I have to share the credit. I invented it, but Bill made it famous." - IBM engineer Dave Bradley describing the control-alt-delete reboot sequence--- End Message ---
--- Begin Message ---If you add ob_start(); at the start of your code, then you will be able to set Headers anywhere in your page. Peter > Per Waagen wrote: > > > Warning: Cannot add header information - headers already sent by (output > > started at /home/p/pe/perphp/public_html/login.php:4) in > > /home/p/pe/perphp/public_html/login.php on line 44 > -- > Avi Schwartz > [EMAIL PROTECTED] > > "I have to share the credit. I invented it, but Bill made it > famous." - IBM engineer Dave Bradley describing the > control-alt-delete reboot sequence--- End Message ---
--- Begin Message ---hi I 'm newbie with php and i have a small problem. I have a script that uploads 4 pictures But when that is done there has to be a redirect to an other page. My script is as follows: <?php header("Location: http://www.xxxxx.com/x.html"); $num=$nummer; if(count($FILE) == 0 || $FILE[1] == none) { #print("File(s) not uploaded."); }else{ #print("<span class=\"tekst\">"); # Loop through the uploaded files foreach($FILE as $key => $value) { if($value != none) { if($saveto == "disk") { $mtest = $test; $destpath = sprintf("/home/users/A000456/x.be/upload/%s%s",$num,$FILE_name[$key]); copy($value,$destpath); $conn = mysql_connect("213.239.56.153:3306","U045601D","kvch97"); #echo "Fout : ".mysql_errno()." : ".mysql_error()."<BR>"; mysql_select_db("D045601D",$conn); #echo "Fout : ".mysql_errno()." : ".mysql_error()."<BR>"; $msql = sprintf("insert into upload (filename, filesize, contenttype, indexnr, nummer) values('%s%s','%s','%s','%s','%s')",$num,$FILE_name[$key],$FILE_size[$key],$FILE_type[$key],$num,$test); #printf("%s<br>",$msql); $rs = mysql_query($msql,$conn); #echo "Fout : ".mysql_errno()." : ".mysql_error()."<BR>"; $num=$num+1; } } } #print("</span>"); mysql_close($conn); } ?> but i keep getting the folowing error: Warning: Cannot add header information - headers already sent by (output started at /home/users/A000456/x.be/upload.php:1) in /home/users/A000456/x.be/upload.php on line 2 Etienne Colla--- End Message ---
--- Begin Message ---Make sure that you have no blank spaces before the <?php tag. It really must be the first line in the script. /Fredrik "Etienne Colla" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi I 'm newbie with php and i have a small problem. I have a script that uploads 4 pictures But when that is done there has to be a redirect to an other page. but i keep getting the folowing error: Warning: Cannot add header information - headers already sent by (output started at /home/users/A000456/x.be/upload.php:1) in /home/users/A000456/x.be/upload.php on line 2--- End Message ---
--- Begin Message ---well, if you're using default session handling provided with php, users sessions are stored in /tmp directory (also used by default for temporary caching of uploaded files). assume to have the php.ini file with default settings: session.gc_probability = 1 session.gc_maxlifetime = 1440 this means garbage collector lauched 1 times every 100 started sessions. furthermore, deletable sessions are those ones opened 1440 seconds ago (24 minutes). well, i've doing some tries asking web server the following by wget command, (but i suppose you can use also a sockopen or CURL (!) functions...): HEAD /test_session.php HTTP/1.0 where /test_session.php simply starts a session with "session_start()" function. every single request create a session file in the /tmp server directory. if someone find out how to do many simultanious requests could create so many files in the /tmp dir (while the garbage clean them only after 24 minutes). we know that linux filesystem is limited to 64K files per directory. this could create problems... obviously there are some kind of solutions... - play with session.gc_* php settings in order to prevent problems (but i can't be sure that's a good idea...) - provide a different session storage than the default one. in this case, you have only two other solutions: mm and database storage. i prefer to store sessions in a database, because with mm this could generate worse problems with memory usage... but i mean... there are so many php developers that uses php with default settings (for example: newbies that uses phpnuke or other php content manager "session based")... about sessions i've found: http://www.phpwizard.net/resources/tutorials/session_intro.html seen Tobias around? :-) bye, alberto. ps: well, i work with session since not long time, so can be i made a mistake...--- End Message ---
--- Begin Message ---Sorry if I'm off-topic, but I've always wondered what people use sessions for. I seem to be either dealing with "logged-in" users who I pick up via http-authentication and maintain any details I need in a user data structure, or casual users, for whom the odd hidden input field or occasional cookie seems quite enough. I guess I'm also nervous of anything state-full, especially if it makes you dependent on cookies/funny urls/IP addresses etc.. So why do people use sessions? Alberto Mucignat wrote: > > well, if you're using default session handling provided with php, users > sessions are stored in /tmp directory (also used by default for temporary > caching of uploaded files). assume to have the php.ini file with default > settings: > > session.gc_probability = 1 > session.gc_maxlifetime = 1440 > > this means garbage collector lauched 1 times every 100 started sessions. > furthermore, deletable sessions are those ones opened 1440 seconds ago (24 > minutes). > > well, i've doing some tries asking web server the following by wget command, > (but i suppose you can use also a sockopen or CURL (!) functions...): > > HEAD /test_session.php HTTP/1.0 > > where /test_session.php simply starts a session with "session_start()" > function. every single request create a session file in the /tmp server > directory. if someone find out how to do many simultanious requests could > create so many files in the /tmp dir (while the garbage clean them only after > 24 minutes). > > we know that linux filesystem is limited to 64K files per directory. this could > create problems... > > obviously there are some kind of solutions... > - play with session.gc_* php settings in order to prevent problems (but i > can't be sure that's a good idea...) > - provide a different session storage than the default one. in this case, you > have only two other solutions: mm and database storage. i prefer to store > sessions in a database, because with mm this could generate worse problems > with memory usage... > > but i mean... there are so many php developers that uses php with default > settings (for example: newbies that uses phpnuke or other php content manager > "session based")... > > about sessions i've found: > http://www.phpwizard.net/resources/tutorials/session_intro.html > seen Tobias around? :-) > > bye, alberto. > > ps: well, i work with session since not long time, so can be i made a > mistake...--- End Message ---
--- Begin Message ---Hi, I wonder if there's a way to find the line number of the calling script from a function, like the error messages PHP generates. An example: In an included file I have a function and want to do something similar to: function foo($obj) { if (!is_object($obj)) { echo "Error: supplied argument is not an object in "; echo __FILE__ . " line " . __LINE__; } ... } But __FILE__ and __LINE__ refers to the current file, ie. the file with the function in, and not the file where the function is called from. The first one I can solve by using $SCRIPT_NAME, but what about the line number???--- End Message ---
--- Begin Message ---Hi, does anybogy know pop3 box management commands? I'm making pop client on php. I know some of the commands like USER PASS RETR DELE TOP but don't know how to use them. I have fputs( $socket_open, "USER " . $username . "\r\n" ); but how do I use RETR or TOP or DELE in these circumstanses? Youri <>< <>< <>< <>< God is our provider ><> ><> ><> ><> http://www.body-builders.org--- End Message ---
--- Begin Message ---Why don't u use a socket view ? u config ur outlook to connect 127.0.0.1 (localhost) and watch the communication .. if someone wants it send mail to [EMAIL PROTECTED] then i cansend one that i designed on delphi 5 (it's ugly and has FEW options and not tested with binary comm., but works with text) well, try this: start -> execute -> telnet yourpophost.com 110 « +OK connected » USER yourusername « +OK accepted, send password » PASS thecode « +OK xxx messages » LIST « +OK « 1 1233 « 2 5940 « 3 5421 « . where the 1st is the message number, the secont the bytes (size) of the message. The 'DOT ' means END OF LIST » RETR 1 « +OK « [... the message ...] « . the dot means end of message » QUIT « +OK goodbye Hope u understood my english and the basic commands! Daniel Roperto ----- Original Message ----- From: "Yura" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 22, 2001 1:30 PM Subject: [PHP] POP commands > Hi, > > does anybogy know pop3 box management commands? I'm making pop client on php. I know > some of the commands like USER PASS RETR DELE TOP but don't know how to use them. > > I have fputs( $socket_open, "USER " . $username . "\r\n" ); but how do I use RETR or TOP or > DELE in these circumstanses? > > Youri > <>< <>< <>< <>< God is our provider ><> ><> ><> ><> > http://www.body-builders.org > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED]--- End Message ---
--- Begin Message ---Read the RFC for POP3. http://www.hio.hen.nl/cgi-bin/show-gz/rfc/pop/rfc1725.txt.gz Fred Yura <[EMAIL PROTECTED]> wrote in message 3BFD3620.32115.1873696@localhost">news:3BFD3620.32115.1873696@localhost... > Hi, > > does anybogy know pop3 box management commands? I'm making pop client on php. I know > some of the commands like USER PASS RETR DELE TOP but don't know how to use them. > > I have fputs( $socket_open, "USER " . $username . "\r\n" ); but how do I use RETR or TOP or > DELE in these circumstanses? > > Youri > <>< <>< <>< <>< God is our provider ><> ><> ><> ><> > http://www.body-builders.org > >--- End Message ---
--- Begin Message ---Hi I've been looking at some classes an have come across this notation for example : function remove(&$productid) { /* this function will remove a given product from the cart */ if (isset($productid)) { unset($this->items[$productid]); } } What does the "&" (ampersand) before the variable name mean ? Thanks Girish--- End Message ---
--- Begin Message ---> What does the "&" (ampersand) before the variable name mean ? a pointer to the address (mem) of the variable--- End Message ---
--- Begin Message ---Thanks, you guys rock! :) Girish ----- Original Message ----- From: "Roberto Ramírez" <[EMAIL PROTECTED]> To: "Girish Nath" <[EMAIL PROTECTED]> Sent: Thursday, November 22, 2001 4:10 PM Subject: RE: [PHP] What does &var mean ? The use of the & means that its passed by reference. That its equal to the memory address of where the variable is stored &$variable its often used to modify the value of a that variable within a function. for example: <?php $variable = 3; echo $variable; #will print 3 function checkit(&$x){ $x = 5; #this will modify the value of $variable. } checkit($variable); echo $variable; #will print 5 ?> ________________________________________________ PROSSES, Roberto Ramírez. Tel-Fax. 8115 3197 y 99 Puerto No. 3425 Col. Riberas del Río CP. 67160 Guadalupe, Nuevo León. México. Visítanos aquí: http://www.prosses.com <http://www.prosses.com> Correo electrónico: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> -----Mensaje original----- De: Girish Nath [mailto:[EMAIL PROTECTED]] Enviado el: Jueves, 22 de Noviembre de 2001 09:43 a.m. Para: [EMAIL PROTECTED] Asunto: [PHP] What does &var mean ? Hi I've been looking at some classes an have come across this notation for example : function remove(&$productid) { /* this function will remove a given product from the cart */ if (isset($productid)) { unset($this->items[$productid]); } } What does the "&" (ampersand) before the variable name mean ? Thanks Girish -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]--- End Message ---
--- Begin Message -------- Original Message ----- From: Nayco_IUT Laroche <[EMAIL PROTECTED]> To: Girish Nath <[EMAIL PROTECTED]> Sent: Thursday, November 22, 2001 4:59 PM Subject: Re: [PHP] What does &var mean ? > This is a reference to the variable, that means that it extends the scope of > this variable into the function, ie, you can modify this variable inside the > function ... OK, OK, my english is bad so maybe you didn't understand > anything .... Well, I tried ;~) !!! > In fact, &var is THE ADDRESS of var .... > > ----- Original Message ----- > From: Girish Nath <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, November 22, 2001 4:43 PM > Subject: [PHP] What does &var mean ? > > > > Hi > > > > I've been looking at some classes an have come across this notation for > > example : > > > > function remove(&$productid) { > > /* this function will remove a given product from the cart */ > > if (isset($productid)) { > > unset($this->items[$productid]); > > } > > } > > > > > > What does the "&" (ampersand) before the variable name mean ? > > > > Thanks > > > > > > Girish > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > >--- End Message ---
--- Begin Message ---It indicates that the variable was passed by reference rather than by value. Fred Girish Nath <[EMAIL PROTECTED]> wrote in message 000f01c1736c$714abc30$015b10ac@AERIS">news:000f01c1736c$714abc30$015b10ac@AERIS... > Hi > > I've been looking at some classes an have come across this notation for > example : > > function remove(&$productid) { > /* this function will remove a given product from the cart */ > if (isset($productid)) { > unset($this->items[$productid]); > } > } > > > What does the "&" (ampersand) before the variable name mean ? > > Thanks > > > Girish >--- End Message ---
--- Begin Message ---Bas Jobsen wrote: >> What does the "&" (ampersand) before the variable name mean ? > > a pointer to the address (mem) of the variable PHP doesn't have pointers and memory can't be directly accessed this way like you can in C, or C++ or whatever. The ampersand is for passing values via reference rather than value. PHP has no notion of pointers. J--- End Message ---
--- Begin Message ---Ouupppss!! You're right !!! ----- Original Message ----- From: J Smith <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 22, 2001 6:43 PM Subject: Re: [PHP] What does &var mean ? > Bas Jobsen wrote: > > >> What does the "&" (ampersand) before the variable name mean ? > > > > a pointer to the address (mem) of the variable > > PHP doesn't have pointers and memory can't be directly accessed this way > like you can in C, or C++ or whatever. The ampersand is for passing values > via reference rather than value. PHP has no notion of pointers. > > J > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > >--- End Message ---
--- Begin Message ---> What does the "&" (ampersand) before the variable name mean ? It's called a reference, check out: http://www.php.net/manual/en/language.references.php regards, Philip Olson--- End Message ---
--- Begin Message ---Ok, To summarise your requirements: 1. No javascript validation (users must reload for any validation). 2. No information on which field is missing. 3. Same message on all forms in all cases. 4. Simplest possible syntax for html designers who set the required fields. Possible syntaxes: a) Set hidden required field on form e.g. <INPUT TYPE="HIDDEN" NAME="REQUIRED" VALUE="name,address,phone"> b) Set variable in php e.g. $required = 'name address phone'; $required = 'name,address,phone'; $required = array($name,$address,$phone); c) Call function in php e.g. required('name address phone'); required('name,address,phone'); required($name,$address,$phone); $required = 'a b'; $required = 'a,b'; $required = array($a,$b); $required = a b ; //required(a b); required(a,b); ho handles the Javascript on-page validation? Or do you always force your users to wait for a page reload before telling them about simple errors? The Javascript is Brandon Lamb wrote: > > The point of keeping it easier is what if i want to give my script to a > friend, do you REALLY want to explain to a non-programmer how to add another > if statement or condition when they could simply add the field to the array? > > And actually you only have to change the name in 2 places. > 1. you define the variable as an input from a form > 2. in the required fields array > > ----- Original Message ----- > From: "George Whiffen" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, November 21, 2001 7:28 AM > Subject: Re: [PHP] How do I convert from perl to php? - Reality Check & > Taxation > > > So I would have to write a seperate if condition for each form input field > i wanted to require? that doesn't make for a very dynamic script... > > > > > if(!(isset($name) && isset($address) && isset($phone)) { > > > echo "You left one empty."; > > > } > > Reality Check: We write code to solve real world problems! > > The parts of our code which are essential to the describe the real world > problem we want solved are > essential. All the rest of our code is an unfortunate "tax" on the rest of > the world. The code can > be as complex, dynamic, interesting or clever as it likes, it's still tax! > "Very dynamic script"s > have to be JUSTIFIED, they are not, repeat not, intrinsically good! > > In this case, the essential elements are the names of the fields required > and the message to be sent > if they are not present i.e. the following 38 characters > > "name address phone You left one empty." > > Rasmus code consists of 92 characters i.e. 44 extra characters or around > 110% tax. Does that sound > a lot? Your original perl had 192 characters i.e. over 400% tax. > > What about maintainability/reusability? Lets look at the tax element of > some likely changes: > > 1. Change in the name of one of the required fields e.g. name should now be > lastname > Rasmus : 0% TAX: (You change "name" to "lastname" once) > Perl : 200% TAX: (You change "name" to "lastname" in 3 places) > > 2. Remove one of the fields from the required list > Rasmus : 12 characters TAX (You have to remove "&& isset($) " as well as the > field name itself) > Perl : 13 characters + 200% TAX (You must remove "$ = param($);\n" and the > field name 3 times) > > 3. Add a new field > As per 2. above. > > 4. Modify the conditions for the error message e.g. change to name and > either address or phone > required > Rasmus : 4 characters TAX (change && to "or" and add two brackets) i.e. > if(!(isset($name) && (isset($address) or isset($phone)) { > Perl : Rewrite required....unknown cost! > > Well, I hope that resolves the question of which is the more world-friendly > code (i.e. more "tax" > efficient). > > Personally, and all views on simplicity, elegance and beauty of code are > subjective, I also find > Rasums php version much simpler and easier to understand. It involves far > fewer commands and is > therefore much more accessible to the novice programmer. It has much less > extraneous structure and > is clearly focussed on the task in hand. It can very easily be extended and > modified to provide > richer functionality. What more do we want? (Well personally, I'd rather he > used "and" instead of > "&&" and "not" instead of "!" and put the separate conditions on separate > lines and generally had > more white space ;). > > George > > P.S. Is this a characteristic example of the difference beteeen Perl and > PHP or an extreme > example? Is Perl really so "geeky" in style and application? Or am I just > too stupid, stubborn, > ignorant to see that Perl is better than php? > > [EMAIL PROTECTED] wrote: > > > > So I would have to write a seperate if condition for each form input field > i wanted to require? that doesn't make for a very dynamic script... > > > > > if(!(isset($name) && isset($address) && isset($phone)) { > > > echo "You left one empty."; > > > } > > > > > > On Tue, 20 Nov 2001 [EMAIL PROTECTED] wrote: > > > > > > > I am a perl user trying to convert to php > > > > > > > > how would i turn this perl into php? > > > > > > > > use CGI; > > > > > > > > $name = param(name); > > > > $address = param(address); > > > > $phone = param(phone); > > > > > > > > @required = qw( name address phone ); > > > > > > > > foreach $key($required) > > > > { > > > > if (!$$key) { &out("You left one empty."); }--- End Message ---
--- Begin Message ---Ok, Let's concentrate on acceptable syntaxes for your html programmers to specify the required fields first. Here are some options grouped by technique and roughly put into order of increasing difficulty for an html author: HTML ---- 1. <INPUT TYPE="HIDDEN" NAME="required" VALUE="name address phone"> PHP FUNCTION ------------ 2. required(name,phone,address); 3. required($name,$phone,$address); PHP ASSIGNMENT -------------- 4. $required = 'name address phone'; 5. $required = 'name,address,phone'; 6. $required = array($name,$address,$phone); COMPLETE INLINE PHP CODE ------------------------ 7. Rasmums solution (slightly modified): if (!(1==1 && isset($name) && isset($address) && isset($phone) )){print 'You left one empty.';} It's really up to you to say which of these is most acceptable to your html guys. The order also roughly corresponds to decreasing amounts of php code and support required. Here's the supporting code for each: 1. <INPUT TYPE="HIDDEN" NAME="required" VALUE="name address phone"> ------------------------------------------------------------------- foreach(explode(' ',$required)) as $field) { if (${$field) == '') { print 'You left one empty.'; break; } } 2. required(name,phone,address); -------------------------------- function required() { foreach(func_get_args() as $field) { global ${$field}; if (${$field} == '') { print 'You left one empty.'; return; } } } 3. required($name,$phone,$address); ----------------------------------- function required() { foreach(func_get_args() as $field) { if ($field == '') { print 'You left one empty.'; return; } } } 4. $required = 'name address phone'; ------------------------------------ foreach(explode(' ',$required) as $field) { if (${$field} == '') { print 'You left one empty.'; break; } } 5. $required = 'name,address,phone'; ------------------------------------ foreach(explode(',',$required) as $field) { if (${$field} == '') { print 'You left one empty.'; break; } } 6. $required = array($name $address $phone); -------------------------------------------- foreach(explode(' ',$required) as $field) { if (${$field} == '') { print 'You left one empty.'; return; } } 7. Rasmus Solution ------------------ Already complete! The closest to your original is 4., and it is pretty close. However, if your html guys are really so allergic to code I would have thought that 1. would suit them best. The great benefit of 7., is that your html guys would learn something useful that they could apply elsewhere rather than a special "rule" on where to put required fields when they're working with you on a particular kind of job. For the record I typically have a completely different approach to the whole problem i.e. A. I would have field-specific (onChange) and form-wide (onSubmit) Javascript validation on the form page itself as a courtesy to the browser users and to save them unnecessary page loads. B. In the php, the checks would be repeated explicitly for users without Javascript or non-browser users and would include an unique identifier so that the form could be intelligently driven remotely by another application e.g. if ($name == '') { $errormessage .= "error:myform:0100 name is a required field.<br>"; } if ($address == '') .... if ($errormessage != '') { print 'Please correct the following errors -<br>'.$errormessage; etc. C. The data would almost certainly have ended up in a database even if it is being mailed on or whatever. So the question of non-programming html designers adding required fields would not arise. I can't think of much data that I might trouble a user to enter that isn't worth explicitly storing. But then I guess we work on different kinds of applications. It sounds like you can't afford more than a couple of minutes per form while I have the luxury of half an hour or so. Good luck, George Brandon Lamb wrote: > > The point of keeping it easier is what if i want to give my script to a > friend, do you REALLY want to explain to a non-programmer how to add another > if statement or condition when they could simply add the field to the array? > > And actually you only have to change the name in 2 places. > 1. you define the variable as an input from a form > 2. in the required fields array > > ----- Original Message ----- > From: "George Whiffen" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, November 21, 2001 7:28 AM > Subject: Re: [PHP] How do I convert from perl to php? - Reality Check & > Taxation > > > So I would have to write a seperate if condition for each form input field > i wanted to require? that doesn't make for a very dynamic script... > > > > > if(!(isset($name) && isset($address) && isset($phone)) { > > > echo "You left one empty."; > > > } > > Reality Check: We write code to solve real world problems! > > The parts of our code which are essential to the describe the real world > problem we want solved are > essential. All the rest of our code is an unfortunate "tax" on the rest of > the world. The code can > be as complex, dynamic, interesting or clever as it likes, it's still tax! > "Very dynamic script"s > have to be JUSTIFIED, they are not, repeat not, intrinsically good! > > In this case, the essential elements are the names of the fields required > and the message to be sent > if they are not present i.e. the following 38 characters > > "name address phone You left one empty." > > Rasmus code consists of 92 characters i.e. 44 extra characters or around > 110% tax. Does that sound > a lot? Your original perl had 192 characters i.e. over 400% tax. > > What about maintainability/reusability? Lets look at the tax element of > some likely changes: > > 1. Change in the name of one of the required fields e.g. name should now be > lastname > Rasmus : 0% TAX: (You change "name" to "lastname" once) > Perl : 200% TAX: (You change "name" to "lastname" in 3 places) > > 2. Remove one of the fields from the required list > Rasmus : 12 characters TAX (You have to remove "&& isset($) " as well as the > field name itself) > Perl : 13 characters + 200% TAX (You must remove "$ = param($);\n" and the > field name 3 times) > > 3. Add a new field > As per 2. above. > > 4. Modify the conditions for the error message e.g. change to name and > either address or phone > required > Rasmus : 4 characters TAX (change && to "or" and add two brackets) i.e. > if(!(isset($name) && (isset($address) or isset($phone)) { > Perl : Rewrite required....unknown cost! > > Well, I hope that resolves the question of which is the more world-friendly > code (i.e. more "tax" > efficient). > > Personally, and all views on simplicity, elegance and beauty of code are > subjective, I also find > Rasums php version much simpler and easier to understand. It involves far > fewer commands and is > therefore much more accessible to the novice programmer. It has much less > extraneous structure and > is clearly focussed on the task in hand. It can very easily be extended and > modified to provide > richer functionality. What more do we want? (Well personally, I'd rather he > used "and" instead of > "&&" and "not" instead of "!" and put the separate conditions on separate > lines and generally had > more white space ;). > > George > > P.S. Is this a characteristic example of the difference beteeen Perl and > PHP or an extreme > example? Is Perl really so "geeky" in style and application? Or am I just > too stupid, stubborn, > ignorant to see that Perl is better than php? > > [EMAIL PROTECTED] wrote: > > > > So I would have to write a seperate if condition for each form input field > i wanted to require? that doesn't make for a very dynamic script... > > > > > if(!(isset($name) && isset($address) && isset($phone)) { > > > echo "You left one empty."; > > > } > > > > > > On Tue, 20 Nov 2001 [EMAIL PROTECTED] wrote: > > > > > > > I am a perl user trying to convert to php > > > > > > > > how would i turn this perl into php? > > > > > > > > use CGI; > > > > > > > > $name = param(name); > > > > $address = param(address); > > > > $phone = param(phone); > > > > > > > > @required = qw( name address phone ); > > > > > > > > foreach $key($required) > > > > { > > > > if (!$$key) { &out("You left one empty."); }--- End Message ---
--- Begin Message ---Hi I wrote a kind of web mail client. But I've got a problem. When the function imap_header fetches all of the headers from a mailbox in a loop, it lasts very long time, if a user has big files attached to his mails. I operate at pop3 server. What's the problem? Do you know, how to list all of the messages headers not in 10 minutes? kakol--- End Message ---
--- Begin Message ---Hi again, I've run into a nice bug using phpmyadmin to import data into a mysql database, and was hoping someone had some experience with doing this. I was wondering if there is any common errors which could be occurring due to characters with in the data? I'm fairly certain that this is the case as I can import about 5 lines of the database in mysql through phpmyadmin, and these don't have many odd characters in them, but anymore and it turns around and gives me an error, any ideas? Steve.--- End Message ---
--- Begin Message ---Well telling us what the errors are would be a start :-) Regards Jon -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07763 620378 PGP Key available, send email with subject: Send PGP Key ----- Original Message ----- From: "Stephen Phillips" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 22, 2001 5:16 PM Subject: [PHP] Yet Another Mysql Problem Hi again, I've run into a nice bug using phpmyadmin to import data into a mysql database, and was hoping someone had some experience with doing this. I was wondering if there is any common errors which could be occurring due to characters with in the data? I'm fairly certain that this is the case as I can import about 5 lines of the database in mysql through phpmyadmin, and these don't have many odd characters in them, but anymore and it turns around and gives me an error, any ideas? Steve.--- End Message ---
--- Begin Message ---lol, ok (sorry I've been staring at a text file looking for bugs for 3 hours) this is the type of error msg phpmyadmin is giving me; Warning: Only 0 bytes were written, expected to write 32516 in - on line 82 sometimes it says line 74, or 130 as well I was kinda hoping someone might know of some common things which might trip up mysql or php in a string, since this is my best guess as to the reason for the error. Steve.--- End Message ---
--- Begin Message ---I've been using phpmyadmin 2.2.1 and found that importing data from a script requires you to be at the main page for the database, rather than the table page. Submitting it via the table page says it was executed successfully, but it wasn't. Haven't had time to look at whats causing it. I had a strange one today, where it gave me all sorts of errors about not having a valid db_link. Couldn't reproduce it though. -----Original Message----- From: Stephen Phillips [SMTP:[EMAIL PROTECTED]] Sent: 22 November 2001 17:16 To: [EMAIL PROTECTED] Subject: [PHP] Yet Another Mysql Problem << File: ATT00006.txt; charset = Windows-1252 >>--- End Message ---
--- Begin Message ---Please post a verbatim copy of the error. We have no way of knowing what is happening with such a generic description of the problem. Fred Stephen Phillips <[EMAIL PROTECTED]> wrote in message 000e01c17379$643f6d80$21937ad5@stevephillips">news:000e01c17379$643f6d80$21937ad5@stevephillips... Hi again, I've run into a nice bug using phpmyadmin to import data into a mysql database, and was hoping someone had some experience with doing this. I was wondering if there is any common errors which could be occurring due to characters with in the data? I'm fairly certain that this is the case as I can import about 5 lines of the database in mysql through phpmyadmin, and these don't have many odd characters in them, but anymore and it turns around and gives me an error, any ideas? Steve.--- End Message ---
--- Begin Message ---What version of admin are you using? I run version 2.2.0 and have never had such a problem. Without looking at the code I can say that it appears that myadmin estimates the size of the file before uploading it and then something happens to prevent the upload from occuring. It may well be that some odd character sequence is causing the error as you suggest, or it may be some sort of socket error. I would suggest some steps to narrow the problem down. First, make sure that your file is actually formatted the way that you are telling myadmin it is formatted. Check the delimiting character, the field terminators, the escape character and the line terminator. It is possible that one of these settings is causing myadmin to think EOF is reached when it is not. Try using different formats, file sizes and upload paths to determine if the error is triggered by a certain combination of factors. Fred Stephen Phillips <[EMAIL PROTECTED]> wrote in message 002001c1737b$6b36a700$21937ad5@stevephillips">news:002001c1737b$6b36a700$21937ad5@stevephillips... lol, ok (sorry I've been staring at a text file looking for bugs for 3 hours) this is the type of error msg phpmyadmin is giving me; Warning: Only 0 bytes were written, expected to write 32516 in - on line 82 sometimes it says line 74, or 130 as well I was kinda hoping someone might know of some common things which might trip up mysql or php in a string, since this is my best guess as to the reason for the error. Steve.--- End Message ---
--- Begin Message ---Hello. I got the problem when I tryed to setup Apache server with PHP on my Sparc computer with the Solaris8 operational system. The standard package includes the Apache 1.3.9 version, which does not includes the PHP. Is there any way to use the existent Apache server with PHP capability with the minimal change of the standard configuration? On the PHP WEB site I found information about Apache with PHP compilation, but there is not any information about the problem which I got. Sincerely yours--- End Message ---
--- Begin Message ---Your best bet is to remove the Apache package that comes with Solaris and install from the source dist from the apache website. I do that with all my Solaris8 Sparc machines. Justin England [EMAIL PROTECTED] Network Administrator E-Net Information Services http://www.enetis.net Tel: 605-341-3638 Fax: 605-341-8880 On Thu, 22 Nov 2001, Evgeny Rachlenko wrote: > Hello. > > I got the problem when I tryed to setup Apache server with PHP on my Sparc > > computer with the Solaris8 operational system. The standard package > > includes the Apache 1.3.9 version, which does not includes the PHP. Is there > > any way to use the existent Apache server with PHP capability with the > > minimal change of the standard configuration? > > On the PHP WEB site I found information about Apache with PHP compilation, > > but there is not any information about the problem which I got. > > Sincerely yours > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >--- End Message ---
--- Begin Message ---Hi all, I'm using PHP version 4 (module) with no problems in a Debian box, but today I download PHPlib; I installed as the README file told me, but all the files have the extension php3, and when I try to open with my browser I it tell me to save the file to disc. I uncomment the next line in srm.conf: AddType application/x-httpd-php3 .php3 and restart apache without luck. I don't want to downgrade to PHP3, so is there a way of solve this using PHP4? Thanks for your help. -- Mauricio Téllez Jiménez Seguimiento Técnico EDUMEXICO [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Zamora No. 25, Col. Centro C.P. 91000, Xalapa, Ver. Tel. 52(28)17-86-87, 17-73-80 Fax. 52(28)18-64-13--- End Message ---
msg40913/pgp00000.pgp
Description: PGP signature
--- Begin Message ---Comment that line again, and add .php3 to: AddType application/x-httpd-php .php .php3 This will tell apache to use PHP4 for both .php and .php3 files. Justin England [EMAIL PROTECTED] Network Administrator E-Net Information Services http://www.enetis.net Tel: 605-341-3638 Fax: 605-341-8880 On Thu, 22 Nov 2001, EDUMEXICO wrote: > Hi all, I'm using PHP version 4 (module) with no problems in a Debian box, but today >I download PHPlib; I installed as the README file told me, but all the files have >the extension php3, and when I try to open with my browser I it tell me to save the >file to disc. > > I uncomment the next line in srm.conf: > AddType application/x-httpd-php3 .php3 > > and restart apache without luck. I don't want to downgrade to PHP3, so is there a >way of solve this using PHP4? Thanks for your help. > > -- > Mauricio Téllez Jiménez > Seguimiento Técnico EDUMEXICO > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > Zamora No. 25, Col. Centro > C.P. 91000, Xalapa, Ver. > Tel. 52(28)17-86-87, 17-73-80 > Fax. 52(28)18-64-13 >--- End Message ---
--- Begin Message ---Dir Justin England, Could you tell me what the version of apache and php do you prefer for Solaris 8 . thanks--- End Message ---
--- Begin Message ---Hi, I have enabled the safe mode in a virtual host that uses php in order to try to prevent the user from uploading (via ftp) a php that could sniff around other's people files. Unfortunately I got stucked in a problem. this site uses php to upload and manage some files remotely. The webserver runs as nobody.nobody but the files are owned by the user's id. Warning: SAFE MODE Restriction in effect. The script whose uid is 1515 is not allowed to access /home/httpd/html/some_site/img/foo.jpg owned by uid 99 in .....php on line 43 Any tips ? Best regards. __________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1--- End Message ---
--- Begin Message ---Hi, PHP DOM-XML functions has support to XML data validation (DTD)? Thanks Fernando Nemec [EMAIL PROTECTED]--- End Message ---
--- Begin Message ---Hi all, Is there a way of generating a list of files that have been included, in php3, similar to php4's get_included_files() ?? If so, can you supply code plz? Thnx Martin--- End Message ---
--- Begin Message ---G'day all, I am putting together a small piece on php and was wondering if anyone knew how to dynamically generate the php usage stats from: http://www.netcraft.com/Survey/ Sort of want something like: http://www.php.net/usage.php Have looked at the source looks like this is manually updated? Thought there may be some way of grabbing the stats and generate my own graph with gd or something? Any ideas? Regards, Joseph--- End Message ---