php-general Digest 14 Aug 2002 09:40:57 -0000 Issue 1524
Topics (messages 112440 through 112504): Re: File Upload size limit 112440 by: Rasmus Lerdorf 112442 by: Oliver Schönrock 112475 by: RPS Internet Re: Need a Web Host for php/mySQl 112441 by: vic 112444 by: David T-G 112456 by: The Doctor Read file dates for most recent 112443 by: Mike Davis 112446 by: Bas Jobsen Re: Web host withdraws support for PHP extensions - supposed secuity risks 112445 by: David T-G 112448 by: Manuel Lemos 112455 by: The Doctor Re: mailing list managers 112447 by: Justin French 112450 by: Manuel Lemos 112454 by: Justin French 112457 by: Michael Sims 112459 by: Manuel Lemos no HTML in a form textarea field 112449 by: Roger Thomas 112451 by: Bas Jobsen determining which link was clicked 112452 by: Gui Guy 112490 by: Joni Järvinen Comparing Data 112453 by: Justin 112458 by: Peter Houchin 112460 by: Justin 112464 by: Michael Sims client-side form validation 112461 by: Jean-Christian Imbeault Session, error occurs 112462 by: Daniel Canil 112498 by: David Robley howto disable cron output 112463 by: Roger Thomas 112465 by: Michael Sims 112466 by: Jean-Christian Imbeault 112467 by: Roger Thomas URL path question 112468 by: Seairth Jacobs 112472 by: Jason Reid Trying to delete 112469 by: César Aracena 112474 by: David Robley 112479 by: César Aracena 112483 by: Brad Bulger upgrading error 112470 by: Alex Shi 112473 by: . Edwin 112492 by: EdwardSPL.ita.org.mo location headers are crisco to cookie headers? 112471 by: Scott A Connerly 112476 by: Michael Sims mysql error 112477 by: victor.argilent.com 112478 by: . Edwin 112482 by: Brad Bulger 112484 by: victor.argilent.com abstract question 112480 by: Brad Bulger newbie PHP/HTML pull down menu problem 112481 by: Brian & Shannon Windsor 112485 by: . Edwin 112499 by: David Robley wanto uninstall php manual 112486 by: Alex Shi 112487 by: . Edwin 112488 by: Alex Shi 112503 by: David Robley Seemingly simple header problem, isn't! 112489 by: Robert Orenstein 112491 by: . Edwin 112493 by: Robert Orenstein 112494 by: . Edwin Re: Troubles with Classes 112495 by: lallous Variable 112496 by: Remon Redika 112497 by: Michael Egan Re: How to make it use blowfish? 112500 by: Jean-Christian Imbeault 112504 by: Dan Hardiker ldap_rename refused to work 112501 by: Roger Thomas SSL/sessions & password question 112502 by: Jean-Christian Imbeault 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 ---> Thanks for quick response. Just a couple of silly questions: > > - changed where? in php or apache? My host is running the "three week old" > v 4.2.2 of php so I guess you mean apache? No, I mean PHP. The 4.2.2 release was a security fix for 4.2.1 only. None of the changes for the past couple of months, including this one, is in it. > - If I can in fact get them to change it in http.conf for my virtual host > block then I will have these huge (!) settings for my whole site rather > than just the necessary scripts. Is there any downside to this (other than > misbehaved scripts being really misbehaved)? Yes, you will have them for your whole site. If you want to limit them to a certain directory or a certain file, tell them to put the settings inside appropriate <Directory> or <Location> blocks. -Rasmus--- End Message ---
--- Begin Message ---> No, I mean PHP. The 4.2.2 release was a security fix for 4.2.1 only. > None of the changes for the past couple of months, including this one, is > in it. OK, but you said originally > post_max_size and upload_max_filesize could not be set in your .htaccess > file until recently. It was changed about 3 weeks ago, so unless your > provider is running a recent snapshot, you won't be able to get this to > work. and upload_max_file_size IS being changed by my .htaccess settings...(only post_max_size is not working)?! confused..! 8-) > Yes, you will have them for your whole site. If you want to limit them to > a certain directory or a certain file, tell them to put the settings > inside appropriate <Directory> or <Location> blocks. OK, got it. - Oliver--- End Message ---
--- Begin Message ---You can also do this all in a php file without changing the directives in either .htaccess or the httpd.conf file. Here is a sample: <form enctype="multipart/form-data" action="<? $PHP_SELF ?>" method = "post"> <input tpye = "hidden" name = "MAX_FILE_SIZE" value = "4096" #1024 each meg :) <input name="uploadedfile" type="file"> <input type = "submit" value = "Upload"> Hope that helps, Josh Thomas RPS Internet Services -----Original Message----- From: Oliver Schonrock [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 13, 2002 2:12 PM To: [EMAIL PROTECTED] Subject: [PHP] File Upload size limit Sorry for bringing up an old problem, (there seem to be many articles in the archives already) but I couldn't find the solution there so here is my version of the problem ;-) I am running php 4.2.2 on a virtual host, so I have no access to php.ini. But I can use the apache directives in .htaccess which has worked well for me so far. So i have the following directives in the .htaccess in the directory where the relevant upload script is located: php_value memory_limit 34M php_value post_max_size 33M php_value upload_max_filesize 32M php_value max_execution_time 600 So I have memory_limit > post_max_size > upload_max_filesize experimentation shows that uploads greater than 8M bomb out. So I check phpinfo() and guess what? It reports post_max_size = 8M. The other 3 config settings have been changed correctly from their master (default) values. but for some reason the post_max_size 33M has been ignored. I know that some priviledges are required to be able to change these settings via .htaccess (namely "AllowOverride Options" or "AllowOverride All" privileges) but i thought that these applied to all the settings. So since I can change the first three why not the last one? Can my host stop me from changing a single config? If so how, and what do they need to change so I can get post_max_size = 33M? Or have i missed something really really stupid? Thanks very much in advance Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php--- End Message ---
--- Begin Message ---Look into http://linuxwebhost.com The price is higher, features lower, but it works, and that is more important isn't it? The only reason I am endorsing them is because I use them and they are very good. Just don't pay for them with anything besides a credit card ;) (Like 10 years LATER) hehe. - Vic -----Original Message----- From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 13, 2002 4:09 PM To: [EMAIL PROTECTED] Subject: [PHP] Need a Web Host for php/mySQl Glory, I'm looking for a new Web Hosting company, to host my sites. I had been with Aletia, but i'm experiencing some technical flaws with them, so i need a new one. Aletia is very economical, with $7.95 a month for 200 MB, 10 GB Bandwidth, sub-domains, dbs, and a hell a lot of goodies. so i would prefer someone like them or better then them. I'd really appreciate if someone can find me a better Host. Thanks, T. Edison Jr. __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ______________________________________________________________________ Post your ad for free now! http://personals.yahoo.ca--- End Message ---
--- Begin Message ---Thomas -- ...and then Thomas Edison Jr. said... % % Glory, % % I'm looking for a new Web Hosting company, to host my I'm not as cheap as Aletia apparently is, but I don't have the technical problems that it seems that they do, either :-) I host through datapipe and we are very stable. I'm a SysAdmin and programmer, not a hosting company, so I'm not trying to get rich from this -- but you can bet that things will stay up because I absolutely have to have them up for myself (I'm not just the hoster; I'm a client! :-) Drop me a note if you would like to discuss it further. [That goes for anyone else out there, too :-] HTH & HAND :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!--- End Message ---
msg75457/pgp00000.pgp
Description: PGP signature
--- Begin Message ---On Tue, Aug 13, 2002 at 06:20:08PM -0400, David T-G wrote: > Thomas -- > > ...and then Thomas Edison Jr. said... > % > % Glory, > % > % I'm looking for a new Web Hosting company, to host my > > I'm not as cheap as Aletia apparently is, but I don't have the technical > problems that it seems that they do, either :-) I host through datapipe > and we are very stable. I'm a SysAdmin and programmer, not a hosting > company, so I'm not trying to get rich from this -- but you can bet that > things will stay up because I absolutely have to have them up for myself > (I'm not just the hoster; I'm a client! :-) > > Drop me a note if you would like to discuss it further. [That goes for > anyone else out there, too :-] > Well for dynamic Web hosting, check out http://www.nk.ca > > HTH & HAND > > :-D > -- > David T-G * It's easier to fight for one's principles > (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie > (work) [EMAIL PROTECTED] > http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! > -- Member - Liberal International On 11 Sept 2001 the WORLD was violated. This is [EMAIL PROTECTED] Ici [EMAIL PROTECTED] Society MUST be saved! Extremists must dissolve. Beware of defining as intelligent only those who share your opinions--- End Message ---
--- Begin Message ---I need to read a directory full of PDF files, and get the file date of the most recent. Can someone get me started?--- End Message ---
--- Begin Message ---Op dinsdag 13 augustus 2002 23:25, schreef Mike Davis: > I need to read a directory full of PDF files, and get the file date of the > most recent. > Can someone get me started? <?php // Note that !== did not exist until 4.0.0-RC2 $dir='/home/allop/'; if ($handle = opendir($dir)) { echo "Directory handle: $handle\n"; $lasttime=0; $lastfile=''; while (false !== ($file = readdir($handle))) { if(is_file($file) && filemtime($file)>$latime) { $lasttime=filemtime($file); $lastfile=$file; } } } echo $lastfile.':'.date('r',$lasttime),'\n'; ?>--- End Message ---
--- Begin Message ---Alan -- ...and then Alan Hale said... % % My Web hosting company has just withdrawn (with no notice) support for PHP % extensions on the grounds they represent security risks and they don't wish % to spend time and effort in evaluating and compensating for those risks. That, and particularly the "no notice" part, sure sounds lame. % % I'd welcome views on how reasonable this is. Hmmm... Is it a risk? Well, theoretically everything is a risk; they might as well just shut down their servers now since they don't want to compensate for risks. And anything can be buggy, too, so they'd better wipe those disks clean of any nasty utilities, servers, or operating systems. I guess whether or not it's reasonable depends on what they want their business to do. If they want to serve FrontPage web clients and perhaps a little bit of POP3 email, they don't need php. They don't need apache for that matter, either, since it's all configurable and dangerous and everything. HTH & HAND :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!--- End Message ---
msg75457/pgp00001.pgp
Description: PGP signature
--- Begin Message ---Hello, On 08/13/2002 06:10 PM, Alan Hale wrote: > My Web hosting company has just withdrawn (with no notice) support for PHP > extensions on the grounds they represent security risks and they don't wish > to spend time and effort in evaluating and compensating for those risks. > > I'd welcome views on how reasonable this is. > > The extension I'm mainly concerned about is GD, which I rely on for > interactive mapping functionality. I find it hard to see how this is a > security risk, but I'm no expert and prepared to be enlightened. They are basically saying that what you are paying is not worth the effort of upgrading PHP version recompiling ith with such extensions. They are so many hosting companies in the world, why are you still hanging on a company that thinks what you pay is not worth it? It is time to switch. -- Regards, Manuel Lemos--- End Message ---
--- Begin Message ---On Tue, Aug 13, 2002 at 10:10:45PM +0100, Alan Hale wrote: > My Web hosting company has just withdrawn (with no notice) support for PHP > extensions on the grounds they represent security risks and they don't wish > to spend time and effort in evaluating and compensating for those risks. > > I'd welcome views on how reasonable this is. > > The extension I'm mainly concerned about is GD, which I rely on for > interactive mapping functionality. I find it hard to see how this is a > security risk, but I'm no expert and prepared to be enlightened. > I could host you if interested. Check http://www.nk.ca . > Many thanks > > Alan Hale > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.381 / Virus Database: 214 - Release Date: 02/08/2002 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Member - Liberal International On 11 Sept 2001 the WORLD was violated. This is [EMAIL PROTECTED] Ici [EMAIL PROTECTED] Society MUST be saved! Extremists must dissolve. Beware of defining as intelligent only those who share your opinions--- End Message ---
--- Begin Message ---on 14/08/02 4:00 AM, Manuel Lemos ([EMAIL PROTECTED]) wrote: > Hello, > > On 08/13/2002 12:09 PM, Justin French wrote: >> Just a quick note to see if anyone has any experience with mailing list >> managers. >> >> I've currently got a DB of subscribers, and basic PHP scripts are not going >> to be a good long-term solution. >> >> I was hoping that maybe there's an opensource or commercial product out >> there that I can install in my doc root (ie, PHP + MySQL support) which will >> handle this in a more effective manner (ie, space the mailout across an hour >> or so, etc etc). > > You can do all in PHP if you do things more efficiently. One thing that > you should avoid at all costs is personalization. Once you do that, you > can just queue a single message to all subscribers, instead one per > subscriber. Doesn't pose issues with some spam filters looking for obvious stuff like 2000 names in the Bcc header? > Another point is to have a DBM like database just to cache the > subscribers addresses. Such databases are much faster to query than MySQL. By the same token, is a CSV file faster? Justin French--- End Message ---
--- Begin Message ---Hello, On 08/13/2002 08:22 PM, Justin French wrote: >>>Just a quick note to see if anyone has any experience with mailing list >>>managers. >>> >>>I've currently got a DB of subscribers, and basic PHP scripts are not going >>>to be a good long-term solution. >>> >>>I was hoping that maybe there's an opensource or commercial product out >>>there that I can install in my doc root (ie, PHP + MySQL support) which will >>>handle this in a more effective manner (ie, space the mailout across an hour >>>or so, etc etc). >> >>You can do all in PHP if you do things more efficiently. One thing that >>you should avoid at all costs is personalization. Once you do that, you >>can just queue a single message to all subscribers, instead one per >>subscriber. > > Doesn't pose issues with some spam filters looking for obvious stuff like > 2000 names in the Bcc header? Of course not. Bcc headers are virtual. They do not get sent with messages that are delivered to any of the recipients. Do you seen any Bcc headers in this message that you got from this mailing list? >>Another point is to have a DBM like database just to cache the >>subscribers addresses. Such databases are much faster to query than MySQL. > > > By the same token, is a CSV file faster? It depends on what you do with it, but in general yes as long as your new message rate is faster than the subscriber list change rate. -- Regards, Manuel Lemos--- End Message ---
--- Begin Message ---Hi, on 14/08/02 10:25 AM, Manuel Lemos ([EMAIL PROTECTED]) wrote: > Of course not. Bcc headers are virtual. They do not get sent with > messages that are delivered to any of the recipients. Do you seen any > Bcc headers in this message that you got from this mailing list? No, good point. Maybe i'm confusing it with something else I've seen on this list -- perhaps 2000 emails in the "To:" is the problem :) So, Bcc is definitely an option -- the only problem I've now got is personalisation. I like to be able to provide detailed things such as: " You are subscribed as [EMAIL PROTECTED] To unsubscribe, click on this link: http://site.com/mail.phpaction=off&id=187 etc etc etc. " Even seeing your address in the "To:" can help you unsubscribe (I for example have multiple address', so trying to unsubscribe from Bcc stuff is a huge pain sometimes), and this isn't available with Bcc. I think my ISP also puts a restriction of 100 address' per sent email... or maybe that's just a rumour :) Thanks for your help. Justin--- End Message ---
--- Begin Message ---On Wed, 14 Aug 2002 01:09:32 +1000, you wrote: >I was hoping that maybe there's an opensource or commercial product out >there that I can install in my doc root (ie, PHP + MySQL support) which will >handle this in a more effective manner (ie, space the mailout across an hour >or so, etc etc). Take a look at some of the dedicated mailing list managers, and see if perhaps you can modify them to get their subscriber list from your database. EZMLM by all accounts is very nice, although I believe it requires Qmail. Majordomo is another option. If you don't want the complexity of those types of programs, look at some Perl-based solutions. I've been learning Perl as time allows, and I've found that it's not too difficult if you're already a PHP person to pick up Perl. A search on www.hotscripts.com or www.freshmeat.net may turn up something. I'm using a very basic Perl-based mailing list manager called Minimalist, which I am modifying to read it's subscriber list from a database. It may be too simple for your needs, however, as it does not do any spacing of mail delivery or anything like that...but in case it's useful in some way here is the URL: http://www.mml.org.ua/--- End Message ---
--- Begin Message ---Hello, On 08/13/2002 10:00 PM, Justin French wrote: >>Of course not. Bcc headers are virtual. They do not get sent with >>messages that are delivered to any of the recipients. Do you seen any >>Bcc headers in this message that you got from this mailing list? > > No, good point. Maybe i'm confusing it with something else I've seen on > this list -- perhaps 2000 emails in the "To:" is the problem :) Or Cc:. > So, Bcc is definitely an option -- the only problem I've now got is > personalisation. I like to be able to provide detailed things such as: > " > You are subscribed as [EMAIL PROTECTED] To unsubscribe, click on this link: > http://site.com/mail.phpaction=off&id=187 etc etc etc. > " > > Even seeing your address in the "To:" can help you unsubscribe (I for > example have multiple address', so trying to unsubscribe from Bcc stuff is a > huge pain sometimes), and this isn't available with Bcc. That is a much expensive solution because it forces you to queue separate messages for all recipients. Message generation will take period of time that is proportional (if not exponential) to the number of subscribers and it will take much more disk space in the local mailer queue because you will be queueing N distinct messages. An alternative is to have an address to process subscription requests that is handled somehow by a PHP script that can lookup your subscriber list and provide automatic personalized assistance. > I think my ISP also puts a restriction of 100 address' per sent email... or > maybe that's just a rumour :) That is a silly restriction that in reality means something else that usually is, for the money you are paying you are not allowed to do any sort of bulk mailing. If your ISP has that restriction, you'd better ask them if you can do any bulk mailing at all because I guess they don't want you to. -- Regards, Manuel Lemos--- End Message ---
--- Begin Message ---i presented my visitor to fill up some description about themselves via HTML's textarea FORM element. how do i block them from entering unwanted HTML tags into the textarea field? -- roger __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com--- End Message ---
--- Begin Message ---http://www.php.net/manual/en/function.strip-tags.php Op woensdag 14 augustus 2002 02:24, schreef Roger Thomas: > i presented my visitor to fill up some description about themselves via > HTML's textarea FORM element. > > how do i block them from entering unwanted HTML tags into the textarea > field? > > -- > roger > > > __________________________________________________ > Do You Yahoo!? > HotJobs - Search Thousands of New Jobs > http://www.hotjobs.com--- End Message ---
--- Begin Message ---if I have a page full of links and I want to generate another page. The contents of the new page will depend on the link I click. How can I determine which link was clicked? Thanks.--- End Message ---
--- Begin Message ---Hi. Try something like the link having an ID and the other page that generates the content pulls that ID from the uri and then generates the page according to the ID. Ie. <a href="content.php?id=1">Category: Cars</a> and content.php pulls the id from the uri with $_GET["id"] IIRC. Consult the manual about this. -Joni- "Gui Guy" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > if I have a page full of links and I want to generate another page. The > contents of the new page will depend on the link I click. > How can I determine which link was clicked? > > Thanks. > >--- End Message ---
--- Begin Message ---Hello all, I've run into a problem and there has got to be a way to do this. I'm searching a mysql table and finding all rows that have the same ID. I need to output that ID, but I only want it to print once. Any help would be greatly appreciated! Justin--- End Message ---
--- Begin Message ---> -----Original Message----- > From: Justin [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, 14 August 2002 10:52 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Comparing Data > > > Hello all, > > I've run into a problem and there has got to be a way to do this. > > I'm searching a mysql table and finding all rows that have the > same ID. I need to output that ID, but I only want it to print once. > > Any help would be greatly appreciated! > Justin > what about something like a simple select statement eg SELECT * FROM table where id = $ID; then do something like echo $ID echo $other values. blah blah blah blah with the echo in a loop so it gets all the values.. just a thought.. Cheers--- End Message ---
--- Begin Message ---Well, the only problem is, the data will be outputted into a dropdown box, so a loop would cause duplicates of the ID. Guess I should have mentioned that there are approx 50 ID's and they are not unique. The only way I can think of doing it is something like: $foo = mysql_query($whatever) while ( mysql_fetch_row($foo) ) { if ( $id == 1 ) { $id1_count ++; } if ($id == 2) { $id2_count ++; } } if ($id1_count >=1) { print "This ID"; } But something like that on a larger table will cause problems with server load after time (I'm assuming)... Any other possibilities out there? Thanks again. Justin At 11:17 AM 8/14/2002 +1000, you wrote: > -----Original Message----- > From: Justin [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, 14 August 2002 10:52 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Comparing Data > > > Hello all, > > I've run into a problem and there has got to be a way to do this. > > I'm searching a mysql table and finding all rows that have the > same ID. I need to output that ID, but I only want it to print once. > > Any help would be greatly appreciated! > Justin > what about something like a simple select statement eg SELECT * FROM table where id = $ID; then do something like echo $ID echo $other values. blah blah blah blah with the echo in a loop so it gets all the values.. just a thought.. Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php--- End Message ---
--- Begin Message ---On Tue, 13 Aug 2002 21:31:22 -0400, you wrote: >Well, the only problem is, the data will be outputted into a dropdown box, so a loop >would cause duplicates of the ID. > >Guess I should have mentioned that there are approx 50 ID's and they are not unique. >The only way I can think of doing it is something like: [...] >Any other possibilities out there? Are you just looking for duplicate ID's? If so, put the work on the SQL server, not PHP: select id,count(*) as cnt from table group by id having cnt > 1--- End Message ---
--- Begin Message ---When a user hits the submit button I'd like to do some client-side validation before sending the form data to the server. What is the proper way to do this in Javascript? I.e. should I use the form's Sumbit button's "onClick()" event to trigger the client-side Javascript validation function and the call "document.location.href" from the function? (Will this pass the POST data?) Thanks! Jc--- End Message ---
--- Begin Message ---I have jsut recently installed a php development kit on my windows platform. Im interested in using the session functions but I am recieving this error when I use session_start(): Warning: open(/tmp\sess_540ded508edf231c47fe85bd970f936a, O_RDWR) failed: m (2) in d:\phpdev\www\phpdev4\samples\samp13.htm on line 4 Im assuming it has got to do something with the location it store the seesion id file. I had a look in my php.ini file and here is the the following configuration: [Session] ; Handler used to store/retrieve data. session.save_handler = files ; Argument passed to save_handler. In the case of files, this is the path ; where data files are stored. session.save_path = D:\phpdev\php\temp; ; Whether to use cookies. session.use_cookies = 1 ; Name of the session (used as cookie name). session.name = PHPSESSID ; Initialize session on request startup. session.auto_start = 0 ; Lifetime in seconds of cookie or, if 0, until browser is restarted. session.cookie_lifetime = 0 ; The path for which the cookie is valid. session.cookie_path = / Im not to sure why this is all ways happening. If anyone haas a solution or knows why this might occur could you please respond or email me at [EMAIL PROTECTED] Much appreaciated Daniel--- End Message ---
--- Begin Message ---In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > I have jsut recently installed a php development kit on my windows platform. > Im interested in using the session functions but I am recieving this error > when I use session_start(): > > Warning: open(/tmp\sess_540ded508edf231c47fe85bd970f936a, O_RDWR) failed: m > (2) in d:\phpdev\www\phpdev4\samples\samp13.htm on line 4 > > Im assuming it has got to do something with the location it store the > seesion id file. I had a look in my php.ini file and here is the the > following configuration: > > [Session] > ; Handler used to store/retrieve data. > session.save_handler = files > > ; Argument passed to save_handler. In the case of files, this is the path > ; where data files are stored. > session.save_path = D:\phpdev\php\temp; Does this directory exist? If not, you may have problems. <SNIP> > Im not to sure why this is all ways happening. If anyone haas a solution or > knows why this might occur could you please respond or email me at > [EMAIL PROTECTED] > > Much appreaciated > > Daniel > > > -- David Robley Temporary Kiwi! Quod subigo farinam--- End Message ---
--- Begin Message ---i wrote an ecard script and added 'send at a future date' feature. this feature is implemented via cron that runs daily at 1200 hours $> crontab -l looks like: 00 00 * * * wget http://ecard.domain.com/futuresend.php 2&1> /dev/null it works great but everyday there will be a file being written to my ecard directory. this file is named futuresend.php.1 the next day there will be another file called futuresend.php.2 so on and so forth. how do i stop Solaris/Linux from spitting this file out ? -- roger __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com--- End Message ---
--- Begin Message ---On Tue, 13 Aug 2002 18:42:17 -0700 (PDT), you wrote: >i wrote an ecard script and added 'send at a future date' feature. >this feature is implemented via cron that runs daily at 1200 hours > >$> crontab -l looks like: >00 00 * * * wget http://ecard.domain.com/futuresend.php 2&1> /dev/null > >it works great but everyday there will be a file being written to my ecard >directory. [...] Two solutions: (1) Use lynx (or links) instead of wget, with the -dump option. (2) Otherwise, use the wget's -O option with a dash to get it to output it's file to STDOUT, which you are trashing anyway: wget -O - http://ecard.domain.com/futuresend.php > /dev/null 2>&1--- End Message ---
--- Begin Message ---Hey Roger, when you want to write a new email to this list don't reply to an existing posting and just change the subject line. It ruins it for people who follow messages using threading. You did that with my message and now both of our "message threads" will appear mixed up together. Just a friendly reminder. Please don't do it again. Jc Roger Thomas wrote: > i wrote an ecard script and added 'send at a future date' feature. > this feature is implemented via cron that runs daily at 1200 hours > > $> crontab -l looks like: > 00 00 * * * wget http://ecard.domain.com/futuresend.php 2&1> /dev/null > > it works great but everyday there will be a file being written to my ecard > directory. > > this file is named futuresend.php.1 > the next day there will be another file called futuresend.php.2 > so on and so forth. > > how do i stop Solaris/Linux from spitting this file out ? > > -- > roger > > > __________________________________________________ > Do You Yahoo!? > HotJobs - Search Thousands of New Jobs > http://www.hotjobs.com--- End Message ---
--- Begin Message ---yes, you are rite. and i know that. it could have *accidently happened* due my haste in between pulling my hair trying to figure out / solve my scripting. my apology to Jean-Christian and the list. rgds. roger --- Jean-Christian Imbeault <[EMAIL PROTECTED]> wrote: > Hey Roger, when you want to write a new email to this list don't reply > to an existing posting and just change the subject line. It ruins it for > people who follow messages using threading. > > You did that with my message and now both of our "message threads" will > appear mixed up together. > > Just a friendly reminder. Please don't do it again. > > Jc > > Roger Thomas wrote: > > i wrote an ecard script and added 'send at a future date' feature. > > this feature is implemented via cron that runs daily at 1200 hours > > > > $> crontab -l looks like: > > 00 00 * * * wget http://ecard.domain.com/futuresend.php 2&1> /dev/null > > > > it works great but everyday there will be a file being written to my ecard > > directory. > > > > this file is named futuresend.php.1 > > the next day there will be another file called futuresend.php.2 > > so on and so forth. > > > > how do i stop Solaris/Linux from spitting this file out ? > > > > -- > > roger > > > > > > __________________________________________________ > > Do You Yahoo!? > > HotJobs - Search Thousands of New Jobs > > http://www.hotjobs.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com--- End Message ---
--- Begin Message ---I would like to be able to do the following: www.sample.com/path/file.php/additional/path/ Unfortunately on IIS, this gives an error. Interestingly, the following does not: www.sample.com/path/file.php/ I need to have a single PHP script be responsible for a series of resources, but I do not want to use a query string (for various reasons) to identify those resources. So, how can I do this? Is this an IIS-specific problem or does PHP just not allow this? TIA. --- Seairth Jacobs [EMAIL PROTECTED] p.s. Sorry if you see a cross-post on php.version4. I got a warning that said it was a read-only list, so I am reposting to this list as well (which is probably the correct list to post to in the first place. <g>--- End Message ---
--- Begin Message ---Its an IIS problem. With apache there are several ways, www.phpbuilder.com/columns/tim20000526.php3 is IMO the best way, i currently use it on several sites. i think this would be what you need if it was apache you were working on Jason Reid [EMAIL PROTECTED] -- AC Host Canada www.achost.ca ----- Original Message ----- From: "Seairth Jacobs" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 13, 2002 8:21 PM Subject: [PHP] URL path question > I would like to be able to do the following: > > www.sample.com/path/file.php/additional/path/ > > Unfortunately on IIS, this gives an error. Interestingly, the following > does not: > > www.sample.com/path/file.php/ > > I need to have a single PHP script be responsible for a series of resources, > but I do not want to use a query string (for various reasons) to identify > those resources. So, how can I do this? Is this an IIS-specific problem or > does PHP just not allow this? > > TIA. > > --- > Seairth Jacobs > [EMAIL PROTECTED] > > p.s. Sorry if you see a cross-post on php.version4. I got a warning that > said it was a read-only list, so I am reposting to this list as well (which > is probably the correct list to post to in the first place. <g> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >--- End Message ---
--- Begin Message ---Hi all. I have a small problem here. I have this full-PHP site working with a MySQL db and came to a dead road when trying to delete a record from it from the Administrator's page. I have PHP to make this decision after the Administrator selected the record to delete and answered YES to the ¿Are you sure...? The last part will pass a hidden value of $editpic which tells the deleting script which artid to delete from the db. This is the code that does the deletion: else if ($deleteyes) { $query = "DELETE FROM saav_arts WHERE artid = '$editpic' LIMIT 1"; $result = mysql_query($query) or die (mysql_error()); if (!$result) { echo "The Picture could NOT be deleted<br>"; echo "<form action=\"".$PHP_SELF."\" method=\"post\">"; echo "<input type=\"submit\" name=\"cancel\" value=\"Back to Edition\">"; echo "</form>"; } else if ($result) { echo "The Picture was deleted sucsesfully<br>"; echo "<form action=\"".$PHP_SELF."\" method=\"post\">"; echo "<input type=\"submit\" name=\"cancel\" value=\"Back to Edition\">"; echo "</form>"; } } Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621--- End Message ---
--- Begin Message ---In article <000001c2433c$e2e3e4c0$e5c405c8@gateway>, [EMAIL PROTECTED] says... > Hi all. > > I have a small problem here. I have this full-PHP site working with a > MySQL db and came to a dead road when trying to delete a record from it > from the Administrator's page. I have PHP to make this decision after > the Administrator selected the record to delete and answered YES to the > =BFAre you sure...? The last part will pass a hidden value of $editpic > which tells the deleting script which artid to delete from the db. This > is the code that does the deletion: > > else if ($deleteyes) > { > $query =3D "DELETE FROM saav_arts WHERE artid =3D '$editpic' LIMIT > 1"; > $result =3D mysql_query($query) or die (mysql_error()); > > if (!$result) > { > echo "The Picture could NOT be deleted<br>"; > echo "<form action=3D\"".$PHP_SELF."\" method=3D\"post\">"; > echo "<input type=3D\"submit\" name=3D\"cancel\" > value=3D\"Back to Edition\">"; > echo "</form>"; > } > else if ($result) > { > echo "The Picture was deleted sucsesfully<br>"; > echo "<form action=3D\"".$PHP_SELF."\" method=3D\"post\">"; > echo "<input type=3D\"submit\" name=3D\"cancel\" > value=3D\"Back to Edition\">"; > echo "</form>"; > } > } > > Cesar Aracena > CE / MCSE+I You have made some wrong assumptions in your code here; it is quite possible that $result may be true but no entries have been deleted. You perhaps should look at the possibility of testing mysql_affected_rows to determine whether any rows have been updated/deleted. WHERE artid = '$editpic' implies that you expect artd to be a text field of type char or varchar because you have enclosed the value that you are testing in single quotes; if artid is in fact an integer type, this query will not affect any rows, as the text value will never match an integer field value. -- David Robley Temporary Kiwi! Quod subigo farinam--- End Message ---
--- Begin Message ---Thanks. I must apology as I made a mistake when writing the incoming variable's name. I had it wrong so it would pass the variable but the incoming script was looking for a variable that wasn't passed. In the meantime, and now that I correct that, I'm still comparing artid to '$artid' (with single quotes) and it does it well... it is an int(4) field and now that you mention it... how is it possible? C. > -----Original Message----- > From: David Robley [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 14, 2002 12:47 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: [PHP] Re: Trying to delete > > In article <000001c2433c$e2e3e4c0$e5c405c8@gateway>, [EMAIL PROTECTED] > says... > > Hi all. > > > > I have a small problem here. I have this full-PHP site working with a > > MySQL db and came to a dead road when trying to delete a record from it > > from the Administrator's page. I have PHP to make this decision after > > the Administrator selected the record to delete and answered YES to the > > =BFAre you sure...? The last part will pass a hidden value of $editpic > > which tells the deleting script which artid to delete from the db. This > > is the code that does the deletion: > > > > else if ($deleteyes) > > { > > $query =3D "DELETE FROM saav_arts WHERE artid =3D '$editpic' LIMIT > > 1"; > > $result =3D mysql_query($query) or die (mysql_error()); > > > > if (!$result) > > { > > echo "The Picture could NOT be deleted<br>"; > > echo "<form action=3D\"".$PHP_SELF."\" method=3D\"post\">"; > > echo "<input type=3D\"submit\" name=3D\"cancel\" > > value=3D\"Back to Edition\">"; > > echo "</form>"; > > } > > else if ($result) > > { > > echo "The Picture was deleted sucsesfully<br>"; > > echo "<form action=3D\"".$PHP_SELF."\" method=3D\"post\">"; > > echo "<input type=3D\"submit\" name=3D\"cancel\" > > value=3D\"Back to Edition\">"; > > echo "</form>"; > > } > > } > > > > Cesar Aracena > > CE / MCSE+I > > You have made some wrong assumptions in your code here; it is quite > possible that $result may be true but no entries have been deleted. You > perhaps should look at the possibility of testing mysql_affected_rows to > determine whether any rows have been updated/deleted. > > WHERE artid = '$editpic' > > implies that you expect artd to be a text field of type char or > varchar because you have enclosed the value that you are testing in single > quotes; if artid is in fact an integer type, this query will not affect > any rows, as the text value will never match an integer field value. > > -- > David Robley > Temporary Kiwi! > > Quod subigo farinam > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php--- End Message ---
--- Begin Message ---On Wed, 14 Aug 2002, [iso-8859-1] César Aracena wrote: > Thanks. I must apology as I made a mistake when writing the incoming > variable's name. I had it wrong so it would pass the variable but the > incoming script was looking for a variable that wasn't passed. In the > meantime, and now that I correct that, I'm still comparing artid to > '$artid' (with single quotes) and it does it well... it is an int(4) > field and now that you mention it... how is it possible? MySQL lets you compare numbers and strings pretty liberally: mysql> create table foo (x int, y double); Query OK, 0 rows affected (0.02 sec) mysql> insert into foo values (1, 3.1415); Query OK, 1 row affected (0.09 sec) mysql> select * from foo where x = '1'; +------+--------+ | x | y | +------+--------+ | 1 | 3.1415 | +------+--------+ 1 row in set (0.01 sec) mysql> select * from foo where y like '3.14%'; +------+--------+ | x | y | +------+--------+ | 1 | 3.1415 | +------+--------+ 1 row in set (0.00 sec)--- End Message ---
--- Begin Message ---I have PHP 4.0.4p11 on RH Linux 7.1. Today I downloaded PHP 4.1.2-7 rpm packages (10 packages) from RH web site. These packages are come with RH Linux 7.3. I don't want to upgrade Linux but just upgrade PHP so I tried rpm -Uvh php-4.1.2-7.i386.rpm. I got following error message: error: failed dependencies: libcrypto.so.2 is needed by php-4.1.2-7 libcurl.so.2 is needed by php-4.1.2-7 libdb-3.3.so is needed by php-4.1.2-7 libltdl.so.3 is needed by php-4.1.2-7 libmm.so.11 is needed by php-4.1.2-7 libpspell.so.4 is needed by php-4.1.2-7 libssl.so.2 is needed by php-4.1.2-7 libxml2.so.2 is needed by php-4.1.2-7 php = 4.0.4pl1-9 is needed by php-imap-4.0.4pl1-9 php = 4.0.4pl1-9 is needed by php-ldap-4.0.4pl1-9 php = 4.0.4pl1-9 is needed by php-mysql-4.0.4pl1-9 php = 4.0.4pl1-9 is needed by php-pgsql-4.0.4pl1-9 php = 4.0.4pl1-9 is needed by php-manual-4.0.4pl1-9 Any idea? Seems like it is impossible to directly upgrade from 4.0.4 to 4.1.2-7....Please advice. Thanks in advace! Alex -- --------------------------- TrafficBuilder Network: http://www.bestadv.net/index.cfm?ref=7029--- End Message ---
--- Begin Message ---Just a thought... If you have downloaded 10 packages perhaps you need to upgrade ALL of them AT THE SAME TIME. So, instead of doing: rpm -Uvh php-4.1.2-7.i386.rpm. Try this: 1. Put all packages in the same folder 2. rpm -Fvh *.rpm The "F" (instead of "U") updates all INSTALLED packages only. I didn't really check but it might work. If not, perhaps, you need to have more packages other than the ones you've already downloaded... - E > >I have PHP 4.0.4p11 on RH Linux 7.1. Today I downloaded PHP 4.1.2-7 >rpm packages (10 packages) from RH web site. These packages are >come with RH Linux 7.3. I don't want to upgrade Linux but just upgrade >PHP so I tried rpm -Uvh php-4.1.2-7.i386.rpm. > >I got following error message: > >error: failed dependencies: > libcrypto.so.2 is needed by php-4.1.2-7 > libcurl.so.2 is needed by php-4.1.2-7 > libdb-3.3.so is needed by php-4.1.2-7 > libltdl.so.3 is needed by php-4.1.2-7 > libmm.so.11 is needed by php-4.1.2-7 > libpspell.so.4 is needed by php-4.1.2-7 > libssl.so.2 is needed by php-4.1.2-7 > libxml2.so.2 is needed by php-4.1.2-7 > php = 4.0.4pl1-9 is needed by php-imap-4.0.4pl1-9 > php = 4.0.4pl1-9 is needed by php-ldap-4.0.4pl1-9 > php = 4.0.4pl1-9 is needed by php-mysql-4.0.4pl1-9 > php = 4.0.4pl1-9 is needed by php-pgsql-4.0.4pl1-9 > php = 4.0.4pl1-9 is needed by php-manual-4.0.4pl1-9 > >Any idea? Seems like it is impossible to directly upgrade from 4.0.4 >to 4.1.2-7....Please advice. Thanks in advace! > >Alex >-- >--------------------------- >TrafficBuilder Network: >http://www.bestadv.net/index.cfm?ref=7029 > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > _________________________________________________________________ $B%&%#%k%9%a!<%k!"LBOG%a!<%kBP:v$J$i(B MSN Hotmail http://www.hotmail.com/JA--- End Message ---
--- Begin Message ---If you want to upgrade php by RPM packages, you may try this site : http://rpms.arvin.dk/php/source/ Alex Shi wrote: > I have PHP 4.0.4p11 on RH Linux 7.1. Today I downloaded PHP 4.1.2-7 > rpm packages (10 packages) from RH web site. These packages are > come with RH Linux 7.3. I don't want to upgrade Linux but just upgrade > PHP so I tried rpm -Uvh php-4.1.2-7.i386.rpm. > > I got following error message: > > error: failed dependencies: > libcrypto.so.2 is needed by php-4.1.2-7 > libcurl.so.2 is needed by php-4.1.2-7 > libdb-3.3.so is needed by php-4.1.2-7 > libltdl.so.3 is needed by php-4.1.2-7 > libmm.so.11 is needed by php-4.1.2-7 > libpspell.so.4 is needed by php-4.1.2-7 > libssl.so.2 is needed by php-4.1.2-7 > libxml2.so.2 is needed by php-4.1.2-7 > php = 4.0.4pl1-9 is needed by php-imap-4.0.4pl1-9 > php = 4.0.4pl1-9 is needed by php-ldap-4.0.4pl1-9 > php = 4.0.4pl1-9 is needed by php-mysql-4.0.4pl1-9 > php = 4.0.4pl1-9 is needed by php-pgsql-4.0.4pl1-9 > php = 4.0.4pl1-9 is needed by php-manual-4.0.4pl1-9 > > Any idea? Seems like it is impossible to directly upgrade from 4.0.4 > to 4.1.2-7....Please advice. Thanks in advace! > > Alex > -- > --------------------------- > TrafficBuilder Network: > http://www.bestadv.net/index.cfm?ref=7029 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php--- End Message ---
--- Begin Message ---I had some headers that were working on one server (4.0.6), but isn't working on my (nearly) fresh install of 4.2.2. Here's the conundrum: header("Set-Cookie: mid=$mid"); header("Location: $location"); exit; worked just fine. I moved it over, and now the cookie doesn't take effect. But here's the interesting part: when I interrupt it, then uninterrupt it, it works. Let me illustrate: header("Set-Cookie: mid=$mid"); echo "stop that location header!"; header("Location: $location"); exit; then edit the script to remove the echo and the subsequent error, and hit refresh, the cookie holds. This is both in IE and Moz. Does anyone have any clue what might be causing this? I assume it's something with my PHP.ini, but can't (seem to) find any significant differences in the two ini's. One other feasable difference is that the 4.0.6 was on a *nix box with apache and the 4.2.2 is on 2k's IIS, but I doubt that is the problem. Any help would be appreciated. Thanks, Scott--- End Message ---
--- Begin Message ---On Tue, 13 Aug 2002 22:14:28 -0500, you wrote: >I had some headers that were working on one server (4.0.6), but isn't >working on my (nearly) fresh install of 4.2.2. Here's the conundrum: > header("Set-Cookie: mid=$mid"); > header("Location: $location"); > exit; >worked just fine. I moved it over, and now the cookie doesn't take >effect. [...] >One other feasable difference is that the >4.0.6 was on a *nix box with apache and the 4.2.2 is on 2k's IIS, but I >doubt that is the problem. Actually, that *IS* the problem. This is a bug in the way that IIS handles CGI-generated headers, and is detailed in knowledgebase article Q176113. It seems that if a "Location: " header is sent from a CGI program, IIS will ignore any other headers that come with it. So you cannot by default set a cookie and redirect on the same page. The workaround is to rename the script so that it begins with "nph-". (I'm serious). This stands for "non-parsed headers mode" and it tells IIS to leave the headers alone. Then you have to generate the headers manually rather than using the setcookie() function built into IIS. I had this exact same problem on a script that I was working on. In my script I was attempting to set a cookie and then redirect the browser upon successful authentication. When I discovered that this does not work with IIS + PHP (cgi mode) I moved the login and logout functionality to seperate files called nph-authenticate.php and nph-logout.php, and I generate the headers manually, like so: header("HTTP/1.0 302 Redirect"); header("Location: $location"); header("Set-Cookie: mid=$mid"); HTH--- End Message ---
--- Begin Message ---I get this error: Error submiting paragraph.You have an error in your SQL syntax near 'WHERE page_name='features' AND par_id='13' ' at line 1 But my code, I think is fine: // Insert the form information into the database mysql_query("INSERT INTO malibu_data SET heading='$heading', paragraph='$paragraph' WHERE page_name='$page_name' AND par_id='$par_id' ") or die ('Error submiting paragraph.'. mysql_error()); - Vic ______________________________________________________________________ Post your ad for free now! http://personals.yahoo.ca--- End Message ---
--- Begin Message ---Looks like you're updating your table so instead of "INSERT INTO...", try: "UPDATE malibu_data SET ..." HTH, - E > >I get this error: > >Error submiting paragraph.You have an error in your SQL syntax near >'WHERE page_name='features' AND par_id='13' ' at line 1 > > >But my code, I think is fine: > >// Insert the form information into the database > mysql_query("INSERT INTO malibu_data SET heading='$heading', >paragraph='$paragraph' >WHERE page_name='$page_name' AND par_id='$par_id' ") > or die ('Error submiting paragraph.'. mysql_error()); > > >- Vic > > > >______________________________________________________________________ >Post your ad for free now! http://personals.yahoo.ca > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php _________________________________________________________________ $B%O%$%;%s%9$J>&IJ$r5$7Z$K9XF~(B MSN $B%7%g%C%T%s%0(B http://shopping.msn.co.jp/--- End Message ---
--- Begin Message ---it's the WHERE clause, it's illegal there. what are you trying to do? if you want to change the heading & paragraph columns of every row in malibu_data where the page_name & par_id match your values, this should be an UPDATE. if you want to create a new record in malibu_data for every record that meets your criteria - which would be a kind of strange thing to do, but whatever - you'd need to write it like insert into malibu_data (heading,paragraph) select '$heading', '$paragraph' from malibu_data where page_name = '$page_name' and par_id = '$par_id' Always try to run your queries in MySQL directly first. You'd see the same error, and remove worries about any kind of PHP coding problem. On Wed, 14 Aug 2002 [EMAIL PROTECTED] wrote: > I get this error: > > Error submiting paragraph.You have an error in your SQL syntax near > 'WHERE page_name='features' AND par_id='13' ' at line 1 > > > But my code, I think is fine: > > // Insert the form information into the database > mysql_query("INSERT INTO malibu_data SET heading='$heading', > paragraph='$paragraph' > WHERE page_name='$page_name' AND par_id='$par_id' ") > or die ('Error submiting paragraph.'. mysql_error()); > > > - Vic > > > > ______________________________________________________________________ > Post your ad for free now! http://personals.yahoo.ca > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >--- End Message ---
--- Begin Message ---Yes, thank you very much, I shouldn$B!G(Bt code late at night without any caffeine in me. - Vic -----Original Message----- From: @ Edwin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 14, 2002 12:29 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mysql error Looks like you're updating your table so instead of "INSERT INTO...", try: "UPDATE malibu_data SET ..." HTH, - E > >I get this error: > >Error submiting paragraph.You have an error in your SQL syntax near >'WHERE page_name='features' AND par_id='13' ' at line 1 > > >But my code, I think is fine: > >// Insert the form information into the database > mysql_query("INSERT INTO malibu_data SET heading='$heading', >paragraph='$paragraph' >WHERE page_name='$page_name' AND par_id='$par_id' ") > or die ('Error submiting paragraph.'. mysql_error()); > > >- Vic > > > >______________________________________________________________________ >Post your ad for free now! http://personals.yahoo.ca > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php _________________________________________________________________ $B%O%$%;%s%9$J>&IJ$r5$7Z$K9XF~(B MSN $B%7%g%C%T%s%0(B http://shopping.msn.co.jp/ ______________________________________________________________________ Post your ad for free now! http://personals.yahoo.ca--- End Message ---
--- Begin Message ---If you aren't supposed to be able to use func_get_args() as a function parameter, but you can get away with it if you make it the *first* param, is that a bug or a feature? works: funcy(func_get_args(), 'p1', 3); fatal error: funcy('p1', 3, func_get_args()); i assume this works because whatever func_get_args() reads gets rebuilt in the course of processing a new function call. and that in the 1st case, it hasn't begun the new list yet, so it can still read the current one.--- End Message ---
--- Begin Message ---Hi, I want to pull information out of my mySQL database and use it as a pull down menu ona web page. There are two sets of information that I need, one is a color, and the other is the color_id, so I want to use it in the way below but without having to physically enter all the data. I'd like to use color_id as the value and the actual color name as the text in the pull down button. Can someone please help me on how to pass the info into a useable way to get the info out of PHP and into HTML? I've haad no problems going from HTML to PHP, but can't seem to grasp going the other way, especially with a list of things. I've been banging my head against this for two days, but something tells me it's extremely easy. Thanks, Brian <form name="tester" action="script.php" method="get"> <select name="color"> <option value="1">red <option value="2">blue <option value="3">black <option value="4">ice <option value="5">purple </select> </form>--- End Message ---
--- Begin Message ---Something like this should work: after mysql_connect() and mysql_select_db() ... $sql = "SELECT color_id,color FROM mytable"; $result = mysql_query($sql); echo '<form blah,blah,blah>'; echo '<select name="color_id">'; while ($row = mysql_fetch_array($result)){ printf("<option value=\"%s\">",$row["color_id"]); printf("%s</option>",$row["color"]); } echo '</select>'; echo '</form>'; HTH, - E PS Check the manual for printf() if you're not sure how it works... http://www.php.net/manual/en/function.printf.php > >Hi, > >I want to pull information out of my mySQL database and use it as a pull >down menu ona web page. There are two sets of information that I need, one >is a color, and the other is the color_id, so I want to use it in the way >below but without having to physically enter all the data. I'd like to use >color_id as the value and the actual color name as the text in the pull down >button. Can someone please help me on how to pass the info into a useable >way to get the info out of PHP and into HTML? I've haad no problems going >from HTML to PHP, but can't seem to grasp going the other way, especially >with a list of things. I've been banging my head against this for two days, >but something tells me it's extremely easy. > >Thanks, > >Brian > ><form name="tester" action="script.php" method="get"> > <select name="color"> > <option value="1">red > <option value="2">blue > <option value="3">black > <option value="4">ice > <option value="5">purple > </select> ></form> > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php _________________________________________________________________ $B$-$C$H8+$D$+$k$"$J$?$N?75o!!ITF0;:>pJs$O(B MSN $B=;Bp$G(B http://house.msn.co.jp/--- End Message ---
--- Begin Message ---In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Hi, > > I want to pull information out of my mySQL database and use it as a pull > down menu ona web page. There are two sets of information that I need, one > is a color, and the other is the color_id, so I want to use it in the way > below but without having to physically enter all the data. I'd like to use > color_id as the value and the actual color name as the text in the pull down > button. Can someone please help me on how to pass the info into a useable > way to get the info out of PHP and into HTML? I've haad no problems going > from HTML to PHP, but can't seem to grasp going the other way, especially > with a list of things. I've been banging my head against this for two days, > but something tells me it's extremely easy. > > Thanks, > > Brian Just the pseudocode to give you an idea... query = Select color, colorid from table run dbquery <form name="tester" action="script.php" method="get"> <select name="color"> loop through dbresults <option value="<?php echo colorid?>"><?php echo $color?> end loop </select> </form> See the mysql functions for exampls of how to submit a query and use the results in a while loop. Cheers -- David Robley Temporary Kiwi! Quod subigo farinam--- End Message ---
--- Begin Message ---Hi, I upgraded php from 4.0.4p11 to 4.0.6 with up2date (a RedHat Update Agent). The new php includes a huge manual but I cannot find where is it after installed, and I don't know how can access it. And more, my free disk space is only 120M. So I am thinking to uninstall this manual. Any one know how can do uninstallation? Thanks in advance! Alex P.S. thank @ Edwin for your suggestion for upgrading. -- --------------------------- TrafficBuilder Network: http://www.bestadv.net/index.cfm?ref=7029--- End Message ---
--- Begin Message ---I haven't use up2date but perhaps this will work anyway. Open a terminal and execute this: rpm -ql php-manual The 'l' will tell you where the package was installed. While, rpm -e php-manual will uninstall the package... HTH - E > >Hi, > >I upgraded php from 4.0.4p11 to 4.0.6 with up2date (a RedHat Update >Agent). The new php includes a huge manual but I cannot find where is >it after installed, and I don't know how can access it. And more, my free >disk space is only 120M. So I am thinking to uninstall this manual. Any >one know how can do uninstallation? Thanks in advance! > >Alex > >P.S. thank @ Edwin for your suggestion for upgrading. > You're welcome! >-- >--------------------------- >TrafficBuilder Network: >http://www.bestadv.net/index.cfm?ref=7029 > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php _________________________________________________________________ $B%-%c%j%"%"%C%W$rL\;X$9$"$J$?$N%J%S%2!<%?!<(B MSN $B="?&!&E>?&(B http://career.msn.co.jp/--- End Message ---
--- Begin Message ---Thanks! It works as I expected ;-) Alex -- --------------------------- TrafficBuilder Network: http://www.bestadv.net/index.cfm?ref=7029 "@ Edwin" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I haven't use up2date but perhaps this will work anyway. Open a terminal > and execute this: > > rpm -ql php-manual > > The 'l' will tell you where the package was installed. While, > > rpm -e php-manual > > will uninstall the package... > > HTH > > - E > > > > > >Hi, > > > >I upgraded php from 4.0.4p11 to 4.0.6 with up2date (a RedHat Update > >Agent). The new php includes a huge manual but I cannot find where is > >it after installed, and I don't know how can access it. And more, my free > >disk space is only 120M. So I am thinking to uninstall this manual. Any > >one know how can do uninstallation? Thanks in advance! > > > >Alex > > > >P.S. thank @ Edwin for your suggestion for upgrading. > > > > You're welcome! > > >-- > >--------------------------- > >TrafficBuilder Network: > >http://www.bestadv.net/index.cfm?ref=7029 > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php > > > > > _________________________________________________________________ > $B%-%c%j%"%"%C%W$rL\;X$9$"$J$?$N%J%S%2!<%?!<(B MSN $B="?&!&E>?&(B > http://career.msn.co.jp/ >--- End Message ---
--- Begin Message ---In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Hi, > > I upgraded php from 4.0.4p11 to 4.0.6 with up2date (a RedHat Update > Agent). The new php includes a huge manual but I cannot find where is > it after installed, and I don't know how can access it. And more, my free > disk space is only 120M. So I am thinking to uninstall this manual. Any > one know how can do uninstallation? Thanks in advance! > > Alex > > P.S. thank @ Edwin for your suggestion for upgrading. > > Getting a bit off topic from php - but have you tried 'man up2date' to find out how to determine 1) what was installed where and 2) how to uninstall it. As a Slackware user I am unfamiliar with up2date. -- David Robley Temporary Kiwi! Quod subigo farinam--- End Message ---
--- Begin Message ---Hi, I'm running the simplest possible script to test headers: <?php header("Location: http://www.yahoo.com/"); exit; ?> The redirect works fine when I run the script on my FreeBSD server, but when I run it on my Windows server, it fails. (The Windows Apache server is at least Apache 1.3, but I don't know the exact version, and am not sure how to find it on Windows). In Netscape 6, the failure manifests itself with a blank page and an empty session file. In IE 6, a "This Page Cannot Be Displayed (HTTP 500 - Internal server error)" page shows in the browser, and an empty session file appears in the temp directory as well. The Apache error log shows nothing. Is there something that has to be set in the httpd.conf file for the header function to work properly? If anyone has any ideas, I'd appreciate hearing them... I'm stuck. Thanks, Robert Orenstein Perforce Software--- End Message ---
--- Begin Message ---Hi there, Try running <?php phpinfo(); ?> and I'm sure you'll find out something about the Apache version. (If, indeed, you're running Apache... Could it be that you're running IIS and Apache is down? Of course, I could be wrong...) - E > >Hi, > >I'm running the simplest possible script to test headers: > > <?php header("Location: http://www.yahoo.com/"); > exit; > ?> > >The redirect works fine when I run the script on my FreeBSD server, >but when I run it on my Windows server, it fails. (The Windows >Apache >server is at least Apache 1.3, but I don't know the exact version, >and >am not sure how to find it on Windows). > >In Netscape 6, the failure manifests itself with a blank page and >an empty session file. In IE 6, a "This Page Cannot Be Displayed >(HTTP 500 - Internal server error)" page shows in the browser, and >an empty session file appears in the temp directory as well. The >Apache error log shows nothing. > >Is there something that has to be set in the httpd.conf file for >the header function to work properly? If anyone has any ideas, I'd >appreciate hearing them... I'm stuck. > >Thanks, > >Robert Orenstein >Perforce Software > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php _________________________________________________________________ $B%-%c%j%"%"%C%W$rL\;X$9$"$J$?$N%J%S%2!<%?!<(B MSN $B="?&!&E>?&(B http://career.msn.co.jp/--- End Message ---
--- Begin Message ---Hi, Edwin. Of course... thanks! Apache version 1.3.23. Definitely not IIS. Robert Orenstein Perforce Software >Try running <?php phpinfo(); ?> and I'm sure you'll find out something >about the Apache version. (If, indeed, you're running Apache... Could it >be that you're running IIS and Apache is down? Of course, I could be wrong...)--- End Message ---
--- Begin Message ---Well, then, in that case, your original problem about the header() has nothing to do with an earlier post (about IIS). Perhaps, you can try installing the latest Apache + the latest PHP and everything might just work. I've ask a friend to try it on his Win2K(sp2)+Apache2+php4.2.2 and the code was working perfectly fine--without doing anything special in httpd.conf... - E > >Hi, Edwin. Of course... thanks! > >Apache version 1.3.23. Definitely not IIS. > >Robert Orenstein >Perforce Software > > > >>Try running <?php phpinfo(); ?> and I'm sure you'll find out >>something about the Apache version. (If, indeed, you're running >>Apache... Could it be that you're running IIS and Apache is down? >>Of course, I could be wrong...) > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php _________________________________________________________________ $B2q0wEPO?$OL5NA!&=<http://auction.msn.co.jp/--- End Message ---
--- Begin Message ---try to put any code inside the new class' constructor part, -> move the this code: > $DBQuery = new DBQueries; <--------------------------- this > is line 134 > $DBQuery->attrib["type"] = "select"; > $DBQuery->attrib["query"] = "SELECT ID_Secpage, PageType, into : class SubMenu { SubMenu() { $this->DBQuery->attrib["type"] = "select"; $this->DBQuery->attrib["query"] = "SELECT ID_Secpage, PageType, } } Elias "Jadiel Flores" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hey guys, I have a little problem here, I have one class to create queries > to a mysql database, this class works fine, but, now I want to create an > instance of this class inside another class but I'm receiving the error: > > Parse error: parse error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION > or T_FUNCTION or T_VAR or '}' in > D:\InetPub\hispanicroot\includes\database.php on line 134 > > This is my code: > > class SubMenu { > var $attrib = array("level"=>"", "page"=>"", "section"=>""); > $DBQuery = new DBQueries; <--------------------------- this > is line 134 > $DBQuery->attrib["type"] = "select"; > $DBQuery->attrib["query"] = "SELECT ID_Secpage, PageType, > Title, PageURL FROM inf_secpages WHERE ID_Page = " . $attrib['page'] . " > ORDER BY Slot ASC"; > $GetData = $DBQuery->RunQuery(); > bla bla bla .......... > } > > If I use: > var $DBQuery = new DBQueries; > then I receive the error: > Parse error: parse error, unexpected T_NEW in > D:\InetPub\hispanicroot\includes\database.php on line 134 > > Thanks > > > Jadiel Flores > ------------------------- > http://www.abargon.com > [EMAIL PROTECTED] > (52-55) 52-29-80-34 > >--- End Message ---
--- Begin Message ---this is the form -------------- insert.php ---------------- <tr> <td width="105">Nama Satu</td> <td width="289"> <input type="text" name="namasa" size="40"> </td> </tr> <td width="105">Nama Dua</td> <td width="289"> <input type="text" name="namadu" size="40"> </td> </tr> <td width="105">Nama Tiga</td> <td width="289"> <input type="text" name="namati" size="40"> </td> </tr> ----------------variable and my query ---------------------- $Namak = $namasa; $Namak = $Namak.$namadu; $Namak = $Namak.$namati; $query ="Insert into Kel (NIP,Id_kel,Nama,Status)"; $query .="Values ('$NIP','$Id_kel','$Namak','$Status')"; the problem is my query cant execute the variable $Namak i got failed message from mysql query help!!!!--- End Message ---
--- Begin Message ---Some quick thoughts: Is the $Namak variable being correctly passed to the query? Have you tried to echo out the query just to see precisely what is being passed to MySQL? On the first line of the query: $query ="Insert into Kel (NIP,Id_kel,Nama,Status)"; You might need a space after ')' before passing it to MySQL. Michael Egan -----Original Message----- From: Remon Redika [mailto:[EMAIL PROTECTED]] Sent: 14 August 2002 01:23 To: [EMAIL PROTECTED] Subject: [PHP] Variable this is the form -------------- insert.php ---------------- <tr> <td width="105">Nama Satu</td> <td width="289"> <input type="text" name="namasa" size="40"> </td> </tr> <td width="105">Nama Dua</td> <td width="289"> <input type="text" name="namadu" size="40"> </td> </tr> <td width="105">Nama Tiga</td> <td width="289"> <input type="text" name="namati" size="40"> </td> </tr> ----------------variable and my query ---------------------- $Namak = $namasa; $Namak = $Namak.$namadu; $Namak = $Namak.$namati; $query ="Insert into Kel (NIP,Id_kel,Nama,Status)"; $query .="Values ('$NIP','$Id_kel','$Namak','$Status')"; the problem is my query cant execute the variable $Namak i got failed message from mysql query help!!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php--- End Message ---
--- Begin Message ---I'd like to use the crypt() function and have it use Blowfish encryption. However it seems that my system doesn't support blowfish encryption since I get: CRYPT_BLOWFISH = 0 My system is a linux RH7.2 box. How can I make blowfish encryption available to PHP's crypt? Jc--- End Message ---
--- Begin Message ---> My system is a linux RH7.2 box. How can I make blowfish encryption > available to PHP's crypt? Use mcrypt. See the manual. -- Dan Hardiker [[EMAIL PROTECTED]] ADAM Software & Systems Engineer First Creative Ltd--- End Message ---
--- Begin Message ---built: php-4.2.2 with openldap 2.0.25 i tried using the ldap_rename function to modify the dn of my ldap db but nothing seems to happen. the record was not change at all. i have followed closely the code-snippet that was given by Mr Stig Venaas at: http://marc.theaimsgroup.com/?l=php-general&m=100949195224325&w=2 following is my short code to do this: <? //connect to LDAP $ds=ldap_connect("192.168.10.222"); if (!$ds) { echo "Connection to LDAP server failed<br><br>"; exit(); } if (!ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) { echo "Failed to set protocol version"; exit; } //we bind to ldap server AFTER the ldap_set_option is successfull //this is an authenticated bind $r=ldap_bind($ds,"cn=admin,o=Administrators,dc=mydomain,dc=net", "secret"); if (!$r) { echo "LDAP bind failed<br><br>"; exit(); } // we want to transfer user roger from Civil Engineering to Credit section in Finance $r=ldap_rename($ds, "uid=roger,ou=People,ou=Civil,o=Engineering,dc=mydomain,dc=net", "uid=roger,ou=People,ou=Credit,o=Finance,dc=mydomain,dc=net", "dc=mydomain,dc=net",TRUE); //Close the LDAP connection. ldap_close($ds); print "modification done"; ?> please advise. -- roger __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com--- End Message ---
--- Begin Message ---Sorry for the vagueness of the subject line but I wasn't sure what to put. Here's what I'd like to do: 1- user comes to my web site with normal (non-SSL) connection 2- user enter login name and password 3- data is submitted to a PHP script via SSL connection to same web server 4- PHP script checks password 5- If everything is ok user is directed to restricted page The reason I want to use SSL is simple, so that sniffers can pick up a clear text password. The reason I don't want to whole site using SSL is because of the overhead in incurs. I figure I can use sessions to force people to log in. If someone doesn't log in the proper session variables are not set and they cannot get any of the pages on my web site. (each page would check that the proper session var was registered). Is this approached do-able? Is it recommended? If this approach is ok what I can't figure out is how to get my login page to submit data via SSL. Suggestions welcomed! Jc--- End Message ---