[PHP] Misbehaved Script...
Hi folks: Have any of you guys encountered the following error: CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: My Scripts that require user interaction and self modification often encounter this. I have no clue as to what's going on. I have to reboot the server when this happens and it seems to fix the problem... I don't think this has anything to do with my scripts... Could someone please suggest whats wrong... My Server has Microsoft IIS 4.0 on Win NT 4 and is running PHP 4.2.1. Thanks in advance. Spike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: refresh a php page
Meltem Demirkus [EMAIL PROTECTED] wrote in message 001b01c2559c$11d3af60$5583@hiborya">news:001b01c2559c$11d3af60$5583@hiborya... Hi, Is it possible to refresh a php page by a code?Or I should use meta or javascript?. thanks meltem Most of the responses I get when I ask Qs of messing with the browser is that php is not capable of this coz it is a Server Side tool. Hence my inclination would lead me to say this cannot be done (You'd have to use javascript most likely)... I maybe wrong though... Just responding wrt the responses that I got from the tons of posts that I have posted in the past... Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Closing Frames...
How can I go about closing a Frame using PHP would this be possible considering that PHP is Server Side? I am assuming Frame closing is similar to Window closing (I am trying to avoid doing this in JavaScript in case someone has JavaScript disabled on their browser)... Thanks in advance... Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Active page
Budi Kelana [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I want to make a web page that can retrive data from my tables automatically, periodically. Does PHP have some timer control ? I know we can do with JavaScript (setInterval() or setTimeOut()) but I cann't join java script with PHP. I've tried make simple script with JavaScript to open new window that contain PHP script for show current time every 5 seconds. function showData() { newWindow = Window.open('data.php','screen'); } function loadData() { setInterval('showData()','5000') } data.php : ? echo date(l dS of F Y h:i:s A); ? in result, data.php will reload every 5 seconds, but it doesn't change. Can someone help me and give me suggestion ? TIA regards, Budi Kelana Not quite sure what you want to do... but why don't you just enclose your JavaScript in a PHP Script... echo language = javascript echo 'function Afunc(){ }'; Or alternatively, this is the way I would approach it (and forgive me if I'm getting a head of myself and misunderstood the question): - if you are on a Linux/UNIX type machine you could use Unix tools to achieve the desired effect by time intervals... One way of doing this is to implement code that utilizes the cron utility. Use cron to execute a script at the desired time intervals, the output of what ever script is executed can hence be written to a file and read using php and finally spatt out onto your page... Hope this helps... Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Code for off-site Maintenance?
Andre Dubuc [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Soon, I will be transferring my site to go on-line with my IP. Since I've never managed anything off-site, I have a very fundamental question: What are the usual procedures with respect to maintaining a site, that is, accessing the PostgreSQL database for corrections, deletions, etc? I personally would create a user-friendly front end to enable changes online... In the long run this would save time... (I'd obviously code in php)... I would not want to continuously be loading and uploading and remodifying record changes as that would be time consuming in the long run... As your DB grows, obviously time taken to keep transferring the files via ftp (I am assuming as most hosts have this capability) would keep increasing though by a small factor but eventually this all adds up and becomes an inconvinnience... Obviously another thing to keep in mind is that most of the hosts I have seen in Canada are on a UNIX platform so if you are to create a user -friendly front end for yourself you will have to be familiar with the UNIX chmod settings i.e keep in mind writable scripts will have to be set to 666 and this would usually require familiarity with SSH as that would be how you would alter the settings (its all online)... Anywayz as you are using PHP you are probably already familiar with UNIX tools and utilities... (Which may not even be necessary as some hosts run the insecure MS Web Server software hence run on a MS platform risking defacement)... Anywayz, those are just my views on the issue... One idea that occured to me: mirror the site here, complete with database, and modify stuff at this end, then upload to the IP. Or should I create some form of management code that would allow me, using php, to access and modify the stuff on-line. I've looked at Zope, Midguard, and another one, but they seem like over-kill (and I would have to change a lot of my code to use them). I would appreciate any input pointing how I should proceed -- I'm a total newbie in this area. Any pointers, or where to look, would be greatly appreciated. Tia, Andre -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Web site down?
It seemed to be down... Earlier in the morning I had trouble getting onto it... Its alright now though, it may have been traffic or some minor stuff... Spike... Adam Williams [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Thanks! Silly me, I'm always forgetting about the mirror sites ;) Adam On Wed, 21 Aug 2002, DL Neil wrote: Is it just me having network connectivity problems, or is the PHP website, http://www.php.net down? I tried connecting to it from a couple of difference computers and I can't access it on any of them. Just wondering if anyone else is having problems getting to their website too. Adam, It is not just your paranoia. Be brave, step outside the contiguous 50 and try http://uk2.php.net/manual/en/ (it's working!) Regards, =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: A Doubt!
Thiruvelraj Pokkishamani [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Sir, I am using Windows 2000 server, and i use IIS 4.0 as the server and i have done many php scriptings and everything works fine and i done have any problem regarding this. And i want to send mail to the visitors of this site . for that purpose i use mail() and if i click send button i receive server error in D:\inetpub\wwwroot\test\sendmail.php . i have tried many scripts and i receive this error. Some says that i want to configure the server , how to configure and just iam a beginner to this PHP. if u help me it could b fine for me to finish this project. Xpecting ur mail. Yours Thankingly Thiruvelraj If you have tested the same script on a different Server it may just be an issue of the fact that IIS and PHP are not the greatest of combos... My scripts tested on my localhost running Apache usually give me problems when I transfer them to an IIS Server (particularly 4.0)... They generate error messages but have the expected functionality if this is the case with your Script stick in some @ symbols like so: echo @Whatever I want to print out if variables are returned as undefined within this echo statement; $something = @$somethingElse; If the functionality is not as expected then it could probably be something else and it would really help if you posted sections of your script which you suspect to cause the errors... Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: using PHP on forms submitted to other sites - HELP
Dan McCullough [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... We have a client that has a form that submits to a payment processor to handle the cc processing. The visitor gets what he wants and then comes to a verification page on our clients site. He wants to buy it so he clicks the submit button and hes gone, to the payment processors site. We want to send a notification that someone has placed an order, not that they got to the payment page. So I have tried using onSubmit on the form and then placing the function name in there, but that doesnt work, its a function written in PHP to send a mail alert. Any thoughts we dont want the alert going to the guy until the visitor actually hits the submit button, and once it leaves the return notification from the processor is very limited, so I can't send it on the return from teh processor. Help please :) try this... ? global $submit; if($submit){ Do whatever... } ? input type=submit name=sent value=submit = Theres no such thing as a problem unless the servers are on fire! __ 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
[PHP] Re: Forms and sessions
Donpro [EMAIL PROTECTED] wrote in message 007601c24462$fec36fe0$[EMAIL PROTECTED]">news:007601c24462$fec36fe0$[EMAIL PROTECTED]... Hi, How can I keep values in a from when using session_start() and later, the I always keep variables as hidden HTML variables Note: you'd have to include backslashes if you are using PHP echo input type = hidden \name=var1\ value = \$var1\; Back Button on my Browser after posting via POST? I may be wrong but in my experience with Sessions you may use the back Button as long as your Script has reached the destroy session statement... If the Script is executing after a point at which the Session has been destroyed you'll get a *Page Expired* Notice... Hope this helps... Thanks, Don Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Keyword exact phrase search
David Buerer [EMAIL PROTECTED] wrote in message 91FBD0B430EFD5118B930060672D982C081148@CAIRO">news:91FBD0B430EFD5118B930060672D982C081148@CAIRO... Has anyone bumped into or written a set of good searching routines? I need to search across one,two, or three fields in an MySQL database in either exact phrase (easy) or keyword with relavence (difficult.) I'm thinking something like a google/yahoo style search. I've tried MySQL full text searches, but the results it returns seem to be just a little to broad and you end up with a bunch of irrelevant results. With respect to the database size that I'm searching in, right now it's about 20MB but I'm guessing that within the next 24 months it will be up around 2GB. The first field I'm searching in is a CHAR(255) field. The second field is a small blob and usually is only about 1 paragraph of text. The thrid field is an entire HTML document and can be many many pages long. Ouch that sounds nasty... I've only had to search a 4MB database and tried to cut time spent searching as much as I could... I tried every thing from storing values in an array to various SQL commands... The elements at the bottom of the table still took annoyingly long... Maybe there'd be a decent, more efficient algorithm for a sorted DB... If you can keep it sorted at all times I am quite sure you would be able to find a decent search algorithm (Binary search - I have never applied the concept of a binary search algorithm to a DB before)... Then again the slowness could have been due to the type of DB I was searching or due to the location of the DB... (I was using Paradox tables, It had to search a different drive and the webserver was IIS - the good news is that it was pretty efficient when tested against a copy of the same 4MB db, located on my machine though (localhost)... Any help is appreciated, David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Destroying Sessions... (Page Expired....)
I have my Sessions Started in a different function... I have a different function displaying a form dependent on input... At the end of the body of the Script (The Script that is not part of any function //based on an online example by: URS Gehrig... I try to destroy the session.. This isn't working i.e when I click on the Back Button on the Browser it returns to the initial page (it should read Page Expired)... Any ideas... Here is how its going... SessionRegistration...//returns 1 on successful Session Registration session_start()... ShowForm Function... if Session Successfully Registered.. Do something and then kill the Session else Show Form again... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sessions...
Am I mistaken to assume that a Session is automatically destroyed if a Window Browser is closed? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Detecting Browser Closing...
Is there a function that can detect if anyone has closed the browser? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Detecting Browser Closing (2)...
Sorry I din't quite phrase that right... Here goes I am manipulating variables according to various user reactions... I want to be able to alter a certain variable to its default if the user decides to say, well to hell with it and closes his browser... Are there any php functions that would determine if the browser on which the code is being viewed has just been closed? Thanks in Advance... Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Detecting Browser Closing...
Chris Boget [EMAIL PROTECTED] wrote in message 075f01c243ba$2a9d11b0$8c01a8c0@ENTROPY">news:075f01c243ba$2a9d11b0$8c01a8c0@ENTROPY... Is there a function that can detect if anyone has closed the browser? Not in PHP. You can using JavaScript, however. Chris Thanks for the prompt response... Would this mean I would embedd the Java Script in my php Script and alter the php variable accordingly... Now I am aware that this is not a JavaScript Forum and I don't want to have to subscribe to one for one simple Q which I will probably never have use for again but how would I detect this via Java Script and then embed change back to php mode (if that's possible)? Folks please non of the smart 'This is not a JavaScript group! I am aware of that but there should be someone who knows how to use php and Java Script hand in hand... I don't want to have to convert a PHP variable to and HTML variable then to JavaScript then back to HTML then to PHP... Thanks in advance... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sessions...
? setcookie(cookie, Job Postings Psyc... Created by Kondwani Mkandawire, time()+3600); session_start(); session_register(MySession); $counter=0;? ?php $file = fopen(basename($PHP_SELF), r+); if((SomeCondition is Satisfied)($counter 4)){ echo 'form name=formName action = ThisSamePHPFile.php method=post'; if(empty($verif)){ Display Some message... $counter++; fputs($file, ?\r\nsetcookie(\cookie\, \Created by Kondwani Mkandawire\, time()+3600);\n); fputs($file, session_start();\n); fputs($file, session_register(\MySession\);\n); fputs($file, \$counter=$counter;?\r\n); } else{ Display SomeOther message... $counter++; fputs($file, ?\r\nsetcookie(\cookie\, \Created by Kondwani Mkandawire\, time()+3600);\n); fputs($file, session_start();\n); fputs($file, session_register(\MySession\);\n); fputs($file, \$counter=$counter;?\r\n); } } else{ reset counter to 0 destroy session... } I want this set up such that given someone hits the close button on the browser, the counter is set to 0... Coz at the moment if someone gets fed up of trying and closes the browser, the next person has less than 4 attempts to login in... Any idea of how I can go about using this sessions idea coupled with the self modifying code to achieve this? I can't exactly stick in an: if(session_is_registered) statement, coz it appears as though the session is restarted every time the code is modified.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Writing to a file that's not PHP_SELF
Any idea why this is not working... $file = fopen(Counter.txt, r+); $counter = fread($file, filesize(Counter.txt)); fwrite($file, $counter, strlen($counter)); echo 'form name=studVer action = ThisSameFile.php method=post'; if(empty($SomeVariable...)){ $counter++; // Here counter indicates that it has been incremented... echo counter = $counter; // For some reason the updated value is not written // to Counter.txt fwrite($file, $counter, strlen($counter)); fclose($file); // Again this indicates that the value of $counter // has actually gone up... echo counter = $counter; I submit here... The String in Counter.txt is always 0 why is this... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: What the heck is this Zope?
Deependra B. Tandukar [EMAIL PROTECTED] wrote in message 003e01c23f8c$ce099120$0101@dt">news:003e01c23f8c$ce099120$0101@dt... Dear all: What the heck is this Zope? Which is better PHP or Zope? Any idea ! DT I just skimmed over the documentation and the tutorials on line and couldn't make heads or tails of it... I know a good deal of other languages, most bear similarities but from one of the coding examples I saw it looked weird... The tutorials available don't explain much which probably says something about the programming skill of the supposedly expert Zope coders... The manner in which their official website is presented fails to generate any curiosity on my part... In the case of php upon hearing about it I visited the official website and learned a great from it... The people at Zend have introduced some awesome features to PHP as have the first peeps who wrote it (They are definitely geniouses)... I have no idea as to who developed Zope... So far since I started messing with Server Side Applications i have found PHP to be the most convinient Scriptor, as well as reasonably efficient... As for Zope???!!$#$#...(Though I am not familiar with it - I don't think I ever will be either) Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What the heck is this Zope?
Chris Garaffa [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Friday, August 9, 2002, at 07:27 AM, Jason Wong wrote: Which is better PHP or Zope? How long is a piece of string? Twice the length of one of its halves. c. What if the String cannot be split into equal halves? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] JSP vs. PHP?
I'm still into PHP like crazy... But I have been told JSP is more powerful how true is this? From what I've read so far (tutorials and all), the syntax is 100% similar to Java i.e. it is basically Java with additional library functions... Now here's the story: I am yet to use PHP with a Graphics library (The GD extensions I believe they are), so I don't know about their performace... However the last time I wrote a decently large Java Applet, the browser took annoyingly long to load the applet... If the same principle applies of having a JVM or a Java Interpreter embedded in the browser then I see no advantage to JSP apart from the point of protability... (Unless the graphic libraries that support PHP are any slower)... Could someone please comment... Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending automatically mail
César aracena [EMAIL PROTECTED] wrote in message 002101c23fcb$4e43c390$93c405c8@gateway">news:002101c23fcb$4e43c390$93c405c8@gateway... I had a question like this once, and the most applicable answer I got from this list was to make a script which triggers *IF* a certain time of day was reached. The only problem is that it had to be triggered by one visitor's clicking at least (the script was asleep in a page until that page was called). Now, it comes to my mind that you could have one hidden page which META refresh tags (refreshing itself let's say every hour), with a script inside that will trigger *IF* a certain hour (time) has passed. I hope this makes any sense, C. -Original Message- From: Jan Souman [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 2:03 PM To: [EMAIL PROTECTED] Subject: [PHP] Sending automatically mail I would like my php-script to send a mail every day automatically, without anyone opening my site. Is this possible and if yes can anyone tell how to do this? Kind regards, Jan I think exec() with Cron would also do the trick... Obviously this is under the assumption that you are under a UNIX-type platform... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending automatically mail
Kondwani Spike Mkandawire [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... César aracena [EMAIL PROTECTED] wrote in message 002101c23fcb$4e43c390$93c405c8@gateway">news:002101c23fcb$4e43c390$93c405c8@gateway... I had a question like this once, and the most applicable answer I got from this list was to make a script which triggers *IF* a certain time of day was reached. The only problem is that it had to be triggered by one visitor's clicking at least (the script was asleep in a page until that page was called). Now, it comes to my mind that you could have one hidden page which META refresh tags (refreshing itself let's say every hour), with a script inside that will trigger *IF* a certain hour (time) has passed. I hope this makes any sense, C. -Original Message- From: Jan Souman [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 2:03 PM To: [EMAIL PROTECTED] Subject: [PHP] Sending automatically mail I would like my php-script to send a mail every day automatically, without anyone opening my site. Is this possible and if yes can anyone tell how to do this? Kind regards, Jan I think exec() with Cron would also do the trick... Obviously this is under the assumption that you are under a UNIX-type platform... sorry I meant shell_exec() -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Script Testing Portal Connections...
Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... #!/usr/local/bin/php -q ? // don't timeout! set_time_limit(0); // set some variables $host = 1.2.3.4...; $port = 1234; $command = /usr/games/fortune; # I must be missing something, cuz I don't see where this $command is used... $command is used further down in the script I din't post the whole thing coz it dies when it reaches the statement: $result = listen($socket, 3) or die(Set up Failed!); i.e. output: Setup Failed! // create socket $socket = socket(AF_INET, SOCK_STREAM, 0) or die(Could not create socket\n); // bind socket to port $result = bind($socket, $host, $port) or die(Could not bind to socket\n); /* start listening for connections * My Script Fails here... * Any suggestions why it fails the Socket SetUp... * Should I screw around with the port numbers? */ $result = listen($socket, 3) or die(Set up Failed!); echo Waiting for connections...\n; You do realize that it's *SUPPOSED* to just sit there waiting for somebody to connect at this point, right?... It it saying Set up Failed!? I mean, it may *LOOK* like it hangs but it's really just waiting... You'll need to open another shell window and poke at the port it's listening to to get any action. Oh, and you probably need to use socket_listen, and not just listen, I think... Or are these the old function names?... I tested the Script on PHP 4.1.2 it does not have a definition for the functions socket_listen or socket_create hence you can only use socket() and listen() Thanks for the response... Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Script Testing Portal Connections...
I am trying to test a Script which I got online and will modify later (its from devshed)... It fails to set up a connection... #!/usr/local/bin/php -q ? // don't timeout! set_time_limit(0); // set some variables $host = 1.2.3.4...; $port = 1234; $command = /usr/games/fortune; // create socket $socket = socket(AF_INET, SOCK_STREAM, 0) or die(Could not create socket\n); // bind socket to port $result = bind($socket, $host, $port) or die(Could not bind to socket\n); /* start listening for connections * My Script Fails here... * Any suggestions why it fails the Socket SetUp... * Should I screw around with the port numbers? */ $result = listen($socket, 3) or die(Set up Failed!); echo Waiting for connections...\n; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Script Testing Portal Connections...
Michael Sweeney [EMAIL PROTECTED] wrote in message 1027447470.3349.28.camel@catalyst">news:1027447470.3349.28.camel@catalyst... Um...did you happen to modify this to have a valid IP address or host name for $host and a valid port number for $port? It would also help to *Obviously* I modified it to be tested at a valid host and address the IP address I have used for this post a dummy address in this post... Obviously I am not going to post a valid IP number from the Work Station on which I am working on due to security issues... I am obviously not going to test an IP number 1.2.3.4 have a valid path for $command that is going to talk to a daemon on the port you specify (ie. making a connection to port 80 and asking for /usr/games/fortune is not to going to get you far). If you have made those modifications and it's still failing, some information about what actually happens in the failure might be helpful. It dies i.e it executes the die statement: SetUp Failed! as shown in the code... I have got an accept statement after it but if its not reaching this satement there was no point in posting it up... Thanks for the response though... Spike... ..mike.. On Tue, 2002-07-23 at 06:10, Kondwani Spike Mkandawire wrote: I am trying to test a Script which I got online and will modify later (its from devshed)... It fails to set up a connection... #!/usr/local/bin/php -q ? // don't timeout! set_time_limit(0); // set some variables $host = 1.2.3.4...; $port = 1234; $command = /usr/games/fortune; // create socket $socket = socket(AF_INET, SOCK_STREAM, 0) or die(Could not create socket\n); // bind socket to port $result = bind($socket, $host, $port) or die(Could not bind to socket\n); /* start listening for connections * My Script Fails here... * Any suggestions why it fails the Socket SetUp... * Should I screw around with the port numbers? */ $result = listen($socket, 3) or die(Set up Failed!); echo Waiting for connections...\n; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Newbie getting close, form submission
Work by process of elimination... Here goes... Start with testing whether your mail will actually send the mail by executing a one line script... Just out of curiosity: how come your host is running an old version of php... Test the following: ?php ( [EMAIL PROTECTED], Testing, Just a Test, ); ? if possible try and run it as a script by connecting to your host via telnet or whatever (I am assuming the platform is UNIX or Linux): php MyMailScript If you are using Linux or UNIX and this doesn't work then there ought to be something wrong with the sendmail file... If you are on a MS Windows platform then there ought to be a problem in the ini file with the smtp setting... If it sends then we can start sticking echo statements in your script to see where the breakdown is... Drop another line on the news group if you still need help, I'll be behind this monitor for a while as will others I'm sure... Spike... Dean Ouellette [EMAIL PROTECTED] wrote in message 004d01c23185$a8822cb0$9c89adac@yoda">news:004d01c23185$a8822cb0$9c89adac@yoda... I am a complete newbie, search the web for examples right now and use them. The host has php 3.0 Having problems with for submission Right now, no error messages, but does not actually send the email. Ideas? ? $MailToAddress = [EMAIL PROTECTED]; $MailSubject = Get Involved List; if (!$MailFromAddress) { $MailFromAddress = $email; } $Header = ; $Footer = ; ? ? if (!is_array($HTTP_POST_VARS)) return; reset($HTTP_POST_VARS); while(list($key, $val) = each($HTTP_POST_VARS)) { $GLOBALS[$key] = $val; $val=stripslashes($val); $Message .= $key = $val\n; } if ($Header) { $Message = $Header.\n\n.$Message; } if ($Footer) { $Message .= \n\n.$Footer; } mail( $MailToAddress, $MailSubject, $Message, From: $MailFromAddress); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Newbie getting close, form submission
Sorry I forgot to stick the mail function there ?php mail( [EMAIL PROTECTED], Testing, Just a Test, ); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Parse error
?php If ('GET' == $HTTP_SERVER_VARS['REQUEST_METHOD']) { $MailToAddress = '[EMAIL PROTECTED]'; $MailSubject = 'Get Involved List'; ? ?php exit; } ? You appear to be moving in and out of PHP Mode that could be pretty tough to follow... I've practically been looking at php Code 8 hours a day for the past 3 months with a good deal of former CGI Scripting experience and I'm still scared of learning this tactic... However I have never had to use it before so the circumstances may be different... ? If ('POST' == $HTTP_SERVER_VARS['REQUEST_METHOD']) { if (isset($HTTP_POST_VARS['email'])) { $MailFromAddress = $HTTP_POST_VARS['email']; // I'm assuming the vars were posted from a form } else { $MailFromAddress = '[EMAIL PROTECTED]'; // vars don't expand in single quotes, but we don't have any here. } $Message = $HTTP_POST_VARS['Message']; // should single quote associative array indexes if (isset($HTTP_POST_VARS['Header'])) { $Message = $HTTP_POST_VARS['Header'] . \n\n$Message; // need to wrap arrays in double quotes in {} to parse } if (isset($HTTP_POST_VARS['Footer'])) { $Message .= \n\n$HTTP_POST_VARS[Footer]; } mail($MailToAddress,$MailSubject,$Message,$MailFromAddress); // don't have to quote vars on parms } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Script executing Telnet Shell Command...
I am trying to execute a Script running a telnet command testing through a range of IP connections... Here goes: ? $str = 123.456.789.; $count = 0; while ($count 999){ $runTheScriptCommand... } ? What I want to stick into the while loop is if connection was successful, break... Is there a way I can check whether telnet connection was successful on each step through the loop or do I have to restructure my program and try connecting to a port via fsockopen... By the way does anyone know what port number telnet connects to... Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] getservbyname
getservbyname takes in the following arguments: getservbyname(string service, string protocol); is the parameter service similar to those diefined under unix's /etc/services file or is there something else to it? Thanks in advance... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Translatting php to binary...
PHP is a scripting language I am pretty much aware of that... But is there a way to translate php into binary/machine code or would one have to write a translator program? Kondwani... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: how to access javascipt variables in PHP
Wouldnt this work? form name=myForm action=sendPage.php action=post script language = javascript function myFunc(){ var myJavaScriptVar = initialValue... Do What Ever (manipulate myVar)... document.myForm.fieldName.value = myJavaScriptVar; /script input type=hidden name=fieldName value=init ?php // If the function my Func has been executed you can do // the following... echo input type=hidden name=fieldName value=$fieldName; ? // If you are not running apache (if running IIS) you may get an undefined // variable notice on running your script to rid yourself of // this do the following instead of the php above... ?php if(isset($fieldName)){ echo input type=hidden name=fieldName value=$fieldName; } ? Hope this Helps... Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Cookies - good or bad???
Before I started to read up on sessions, I simply used my own form of session management by sending all relevant variables either via URL or via form fields to the subsequent pages. Obviously this method leaves a bunch of holes as well, but I KNOW that my application is always pure and simple HTML, doesn't have browser issues, doesn't have cookie issues, so 100% of the internet community can use it. Does anyone out there have a view/practise when it comes to session/cookies? - basically I am still not convinced that using sessions/cookies is a good idea, but I would love to be educated as to why I should... The issue on Advantages and disadvantages of Cookies has been discussed numerous amounts of times... There was also debate on using I.P vs Cookies, I see from your address that you are based in S.A. meaning there is still numerous amounts of people set on dial up hence allocating someone a specific id via dial up would be totally out of the question (dial up IP changes)... Through the discussions I was convinced that Cookies are and ought to be the best way to go... Most people use IE/Netscape which does not ask if you want to accept or reject cookies like the browsers that are generic to Linux namely Konqueror and Lynx... Furthermore, I don't know too many people that scrimmage through their hard drive searching for Cookies to delete... besides most people (unless they have done a great deal of web programming) don't know what a Cookie is, so if they actually do get prompted to accept or reject a Cookie the odds of them Accepting are equal to the odds of them rejecting (probably even higher considering most prompts require a Yes)... I'd say Cookies and Sessions are quite reliable... Well, they are the safest method I know to go about the problem of monitoring ones surfing habits... If anyone can think of another please post her up, I'd be curious to learn of it... Regards, Kondwani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Cookies - good or bad???
Awesome Scott... That's some wicked code... Scott Fletcher [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Instead of Cookies, I use Sessions which is run on hte server side. So, I use the --snip-- $salt = strtoupper(md5(uniqid(rand(; session_id($salt); session_start(); header(Location: https://xxx.yyy.zzz/index.php?.SID.init_login=TRUE;); --snip-- to create the identifer for an unique person. Then use the php script that take care of the session management such as logging the user out when time is up as an example. Another script was used to prevent the direct access attempt. Another script was used to detect whether the server have the user's identifier in the server, if not exist then would force the web browser to the login page. As for the newbie, well, sometime they had to learn it from the pro. Although it would be nice if there is documentation somewhere. Cord Schneider [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Phpcoder [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm really battling with this whole session thing. My first impressions are that cookies are OK, and really helps to make sessions workable and efficient, YET, from a developers point of view, I [..snip..] Does anyone out there have a view/practise when it comes to session/cookies? - basically I am still not convinced that using sessions/cookies is a good idea, but I would love to be educated as to why I should... A number of people have offered their opinion why cookies are a bad idea. As a developer new to PHP, if cookies are such a big a big no-no, how does one do effective session management without storing anything client-side?? Bear in mind that the browser is stateless and, the user can disconnect and reconnect in between fetching pages from your site. Regards, Cord -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Cannot parse html pages in php
Keith Roberts [EMAIL PROTECTED] wrote in message 006401c22e78$a71723e0$48b5913f@Operator1">news:006401c22e78$a71723e0$48b5913f@Operator1... I am running into a situation where I need some serious help. My environment is: Workstation - W2k, Frontpage Server - Cobalt RaQ4i, Linux, Apache Problem: I need to access MySQL to display inventory information on the web page. When I have modified the httpd.conf file to parse html files through php, the embedded php code works. However, FrontPage no longer works and a Web statisics application will not work (Webalizer). I know I am not setting something correctly, but dang if I know what it is. I really need some help on this. Please realize that I am relatively new to internet programming, linux, php, etc. I have done okay so far, but this is beyond me at this point. Any help will be greatly appreciated. Do you have access to the Server Settings i.e. were you doing this yourself? If so it might be wise to install PHP as an Apache Module (if you haven't already done so) - things tend to work much smoother... Secondly - not trying to offend you or be conceited but I have to ask this coz no one on these groups can guess the others comptency level in a particular aspect - are you using Front Page simply as an easy non-programmer-type style to create your pages or are you using the coding aspect to it (with line number list and all), if you are using it the former this won't work... You may also want to check whether files with extension php are set to viewable in Front Page, I believe this is under Tools... I personally wouldn't recommend using Front Page to create PHP ran Web Applications (but that might be coz I am slow to pickup on how MS products operate)... Good Luck... Spike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php Similar to C in Pointer Memory Accessing or not?
Hi Folks: Just for interest sake, for those of you who have messed with C know about Pointers hence probably know that one can access stuff from Memory Locations in very wierd ways via pointers and Arrays: int * ptr; ptr = array[0]; ptr=ptr-1; The last statement does not generate an error but lets you access that location... Firstly I want to know if PHP has pointers (I know it uses dereferencing values via ) and if it does use pointers does it let you do stuff like this (or does its nature not let you interact with the lower level hardware components? I've never seen the need to investigate if there are pointers in PHP but it would be an interesting thing to know... Being a Server Side tool, it would not surprise me if it did, it appears to have some similarities to C anywayz notably function printf() Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Complex session issue
Just an idea, I'll point it out algorithmically coz it would take me a bit of time to sketch the code... Here goes and my appologies if this is not what you want.. Would it not work if you targeted the next application to open up in window y... The problem is that you said you want it to be in the same domain... If you allowed for a different subdomain, you could have a php script in the file that runs X generating Code that is written to a file that runs Y... using fputs($fileY, $StartASessionForY); Then start spitting out Code for y using a write function or a fputs function... If you wanted to use the same domain name this might (I am still kind of iffy on this), if you stuck in a couple of if statements and left both sessions running... the y session is triggered if a certain logical test is passed... I hope this leads you towards the light... Spike... Divyank Turakhia [EMAIL PROTECTED] wrote in message 001001c22c8e$46066e80$2601a8c0@Divyank">news:001001c22c8e$46066e80$2601a8c0@Divyank... I have a situation where I have one browser window open for lets say web application 'x'. Now I want my user to goto application 'y' on the same domain in a new browser window by passing the authentication information from application 'x' to application 'y'. I obviously donot want my session variables to be continued in application 'y'. But at the same time I donot want to destroy the session of my application 'x' Since they r in two COMPLETELY separate browser windows, both sessions should logically be separate. But for some reason IE netscape take a new window in the same Instance. Is there any way I can open a new browser instance, such that the same session is not continued and a new session in created leaving the old session as it is? Or is there any other work around for the same? - Divyank -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Submit code
Algorithmically: //in php 1) create a counter that will keep count of the # of variables that have been set 2) if all your variables have been set spit out the relevant JavaScript that runs the AutoSubmit function... (There are a couple onLine)... ... It can follow the following Skeleton... if((isset($var1))(isset($var2)) echo The JavaScript... Could Taget write it to another file as opposed to spitting out HTML run the function onLoad.. Mindhunter [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am looking for PHP code that will submit (post) a form automaically to a ANOTHER php page. I do not want to press a submit button. I have found a class at PHPClasses but it is too complicated for my needs. What is the simplest way of doing this? What is the theoretical approach? The reason I need this is that I have a table output from a database after one submits 'n list of variables (form inputs). I want to update a graph in another Iframe automatically without clicking on another submit button. Tx MH -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem Running my Scripts from IIS...
I have a problem running my Scripts from IIS... I test them on my localhost which is running Apache and PHP 4.2.1 and it works perfectly... However I get an undefined variable error running it on an IIS Server running PHP 4.2.1 Apart from these messages that make my send to pages look untidy, the Script still runs as expected on IIS... I have tried a couple of approaches: Stuck in some if and isset statements... Effect: It affects the running of the whole Script (Some of the variables loose info... and I am using locking quotations \)... I have tried sticking in symbols and this has no effect I have tried sticking in if empty... This has a similar effect to if isset... Does anyone else have any ideas on what I could do? Kondwani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] activating php scripts via cron
Hi Jay: If you can run PHP from the command line, i.e. php thisscript.php it means that you have installed PHP as a standalone executable. If so you What do you mean standalone? If this is in reference to not running it as a module of Apache, then my set up must be weird, because I can run my PHP as a Script from the Command line yet it was installed as a Module of Apache and this is explicitly stated when I fire up Apache... Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: read a text file
php.net has little snippets under the documentation for the fread function... That's a start... Edgar [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I was looking for in the news, but i did not encounter any thing. Where can I get an example or the way to read a text file into a variable and how identify the carriage return and special characters. Thank you Edgar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Problem Running my Scripts from IIS...
I run it as CGI... I have the problem fixed though... It looks real messy but every time I echo out a variable that *appears* to be undefined whilst it actually is, I stick an @ sign infront of it... Hence I have something like: echo @$var1; If I need to stick extra statements I use concatenation as follows: echo @$var1.Extra String Fed.@var2.; Kind of nasty looking but under IIS it does the trick... Spike... Mindhunter [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Are you running PHP as CGI or ISAPI? I got so much similar trouble with the ISAPI dll on IIS that I use the CGI nowadays. MH Kondwani Spike Mkandawire [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a problem running my Scripts from IIS... I test them on my localhost which is running Apache and PHP 4.2.1 and it works perfectly... However I get an undefined variable error running it on an IIS Server running PHP 4.2.1 Apart from these messages that make my send to pages look untidy, the Script still runs as expected on IIS... I have tried a couple of approaches: Stuck in some if and isset statements... Effect: It affects the running of the whole Script (Some of the variables loose info... and I am using locking quotations \)... I have tried sticking in @symbols and this has no effect I have tried sticking in if empty... This has a similar effect to if isset... Does anyone else have any ideas on what I could do? Kondwani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using index.php instead of index.html
Alternatively code a redirection page on the HTML page to redirect to the PHP page in 0 seconds... (Some simple online Code)... META HTTP-EQUIV=REFRESH CONTENT = 0; URL=http://www.mynewIndexPage.php; if page is not redirected in 1 second click a href=http://www.mynewIndexPage.phpHERE/a Sailom [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, I am a novice on PHP and web programming. Can any one suggest me if I can use index.php in place of index.html? I really need to concern about security issue too. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Preventing Multiple Log-Ins after Authentication
create cookie and at the end of the Script/page destroy cookies Use if statements: setcookie('cookie', $value, $expire, $path $domain); if(isset($cookie)) echo Access Denied, Multiple Login Attempted!; else run the page/script or Stick an fetch I.P Stick it in String array, if duplicate exist die... else run script Jay Blanchard [EMAIL PROTECTED] wrote in message 001401c22cf2$db192080$8102a8c0@niigziuo4ohhdt">news:001401c22cf2$db192080$8102a8c0@niigziuo4ohhdt... [snip] Is there a standard method in PHP for preventing multiple people from using the same log-in username/password simultaneously on a membership site? Any suggestions are greatly appreciated. [/snip] One way is to set a non-expiring cookie, which works if they don't delete cookies from time-to-time. HTH! Jay Growing old is mandatory, growing up is optional * * Want to meet other PHP developers * * in your area? Check out: * * http://php.meetup.com/* * No developer is an island ... * * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: good article on creating a subscription form/script
The suggestion by Mike seems feasible... However if you are working on a subsription form and are expecting the application to be used by alot of people, why don't you store the info supplied by the user to a Database as opposed to mailing it to someones box and having a whole lot of stuff in your e-mail box... If you still choose to go the e-mail route, php has its own mail function: mail($whereItsgoing, $subject, $message, $extra); I may have gotten the parameters wrong but its in the online documentation... You can Check out a mail forms in php Tutorial or/and Databases using php Tutorial online (I think its on lycos' webmonkey)... Hope this helps... Spike... René fournier [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I've looked on php.net, phpbuilder.com, and zend.com, but to no avail. Any suggestions? --- René Fournier, [EMAIL PROTECTED] Toll-free +1.888.886.2754 Tel +1.403.291.3601 Fax +1.403.250.5228 www.smartslitters.com SmartSlitters International #33, 1339 - 40th Ave NE Calgary AB T2E 8N6 Canada -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: problem with cookies and some browsers
Andy [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi there, I am wondering if there is a possiblity that some browsers like IE 5.1 do not accespt cookies by default. I am working on a session management system Linux's Konqueror always asks if a user wants to accept Cookies or not (well atleast it does this by default) so does Linux's nongraphical browser lynx If a person has no idea as to what a cookie is to him/her Clicking No or yes would obviously not make a difference... and some users report that they have not been able to login because the cookie has been rejected. They are running IE 5.1 Mac (and maybe PC as well) Are there any known problems? Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] South African IP Provider.. (Mweb Server Names)
Does anyone know the name of any the mweb servers in South Africa... I am trying to test my a Php Login Script from a Computer there and I am trying to use someone elses account with an mweb subscription to test my Script from a remote area... Kondwani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Self Modifying PHP Code Working on IIS
Am I the only one who seems to be irritated by the tremendous amount of settings you have to do on the IIS Server if testing a PHP Script... I am testing a Self modifying Script runs perfectly on Apache 1.3 /PHP4.2.1 However it is meant to sick Chunks of code at the beginning of my File... Hence with NewLine Characters and everything else... It kind of messes up and sticks chunks of code in the wrong places generating errors... Any advice?! Kondwani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP 4.3.x..
One of the threads above Speak of PHP 4.3 I was not aware that it existed... Is it still in its Testing stages? How come its not on the PHP Website? Are there any great modifications to it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Searching a Paradox Table with my PHP Script..
I have a lot of things to change including the whole strategy... Thanks for the responses... It ended up being a whole number of factors that were slowing the Script down... Thanks again... Miles Thompson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Why are you building the array? Why not let SQL do the work? Select col1, col2, col3, ... coln from target_table where field_holding_target_value = '$target_value_i_want' If you have no records returned, then no match, otherwise you have one or more matches. In the second case you can proceed with your processing. I've also noted Chris Hewitt's suggestions re number of connections, etc.; that's worth checking as well. See below as well ... Cheers - Miles Thompson At 04:00 PM 7/11/2002 -02-30, Kondwani Spike Mkandawire wrote: Hallo folks: (Sorry for a repost on the same topic just that my first one never got through)... I have a bit of an issue with Paradox Table Searching... I have a fairly large table (4MB+), here is the problem: When I run a search for an element in the Table on my localhost which is running Apache and php 4.1, I have no issues with speed... However when I run it on the Server at my work place, which is running IIS Server (I am not sure which version), and the same PHP version on my Workstation it takes ages to execute... I have gotten suggestions and have revised my Script over and over using odbc_exec() with SQL commands SELECT myColumn FROM myTable, I have used a COUNT SQL command suggested on this forum, My general algorithm is as follows... 1) I create an Array using odbc_fetch_array this Array contains one column from the Table I am searching... How are you populating the array? 2) Keep trying to matchup each element in the array against the validation element being checked... returning found within a sequential loop... and eventually Not Found... Are you hitting the database each time through the loop, or stepping through the result set? How many elements in the array? 3) I suppose the sequential loop is whats killing me, but the table is not ordered hence I am forced to do a sequential search.. Does anyone else have an idea for a quicker and much more efficient algorithm... What reasons are there for not ordering the table? Indexes speed things up dramatically, for both the users on the LAN and those accessing via the 'Net. Use indexes, they're your friend! Once again the issue of Speed is a non-factor on my local machine running Apache but it does become a factor when I run it on our Server, which is running an IIS Server... Thanks in advance... Kondwani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: help with mail() function!
Try: $header = From: Test List [EMAIL PROTECTED]; mail($to, $subject, $fullbody, $header.); Note the extra Null String concatinated... My php.ini is also configured to show: sendmail_from= In the mail function... This is under WinNT... php 4.2.1 The Null String might work under UNIX too... I haven't tried it... Spike... Thomas Omega Henning [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello all, I am trying to build a php driven mailing list where i can send an email to the whole list. Here is my code: ?php $to = Henning Tamas [EMAIL PROTECTED] . ,; $header = From: Test List [EMAIL PROTECTED]; include(pop3.php); $user=irc; $password=*; $apop=0; $pop3_connection=new pop3_class; $pop3_connection-hostname=localhost; if(($error=$pop3_connection-Open())==) { echo PREConnected to the POP3 server $pop3_connection-hostname/PRE\n; if(($error=$pop3_connection-Login($user,$password,$apop))==) { echo PREUser $user logged in./PRE\n; if(($error=$pop3_connection-RetrieveMessage(1,$headers,$body,2))==) { echo PREMessage 1:\n---Message headers starts below---/PRE\n; for($line=0;$linecount($headers);$line++) { echo PRE,HtmlSpecialChars($headers[$line]),/PRE\n; $fullheader=$fullheader.$headers[$line].\r\n; } echo PRE---Message headers ends above---\n---Message body starts below---/PRE\n; for($line=0;$linecount($body);$line++) { echo PRE,HtmlSpecialChars($body[$line]),/PRE\n; $fullbody = $fullbody . $body[$line]; } echo PRE---Message body ends above---/PRE\n; } } } if($error== ($error=$pop3_connection-Close())==) echo PREDisconnected from the POP3 server $pop3_connection-hostname/PRE\n; echo($error); $i1=strpos($fullheader,Subject:); $i2=strlen($fullheader)-$i1; $subject=substr($fullheader,$i1,$i2); $subject=substr($subject,9,strlen($subject)); $subject = [MediaSoft] . $subject; //mail($to, $subject, $body, $headers) or die(tet); mail($to, $subject, $fullbody, From: [EMAIL PROTECTED]); ? I got the pop3.php from www.weberdev.com its a class to download emails from a POP3 server. My problem is: When i send an email from a PHP emailer using mail() function to my mailing list Message Subject is test, Message body is test. I run my script and my message source looks like this: Return-Path: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] Received: (qmail 30667 invoked by alias); 11 Jul 2002 13:04:08 - Delivered-To: [EMAIL PROTECTED] Received: (qmail 30662 invoked by uid 99); 11 Jul 2002 13:04:08 - Date: 11 Jul 2002 13:04:08 - Message-ID: [EMAIL PROTECTED] To: Henning Tamas [EMAIL PROTECTED], Root [EMAIL PROTECTED], Subject: [MediaSoft] test //---Header ends here I added this line From: Test List [EMAIL PROTECTED] From: [EMAIL PROTECTED] test And as you see From: [EMAIL PROTECTED] is in the header section of the mail() function. What can I do to fix this problem? Thomas Henning P.S. I tryed these to fix it: 1)$header=From: [EMAIL PROTECTED] \r\n; 2)$header=; mail($to,$subject,$message,$header,[EMAIL PROTECTED]); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Moving the pointer in a file...
I am trying to read and write to a file on Line 5 and line 5 alone... $file = fopen($fileName, r+); Places the pointer at the beginning of the file I have tried the following... $line = fgets($file, 255); $line = fgets($file, 255); $line = fgets($file, 255); $line = fgets($file, 255); fputs($file, the Line I want to write;); but nothing is happening... Please Help... Kondwani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Final Year Computer Science Project involving PHP
Hey Serdar: Have you ever heard of a piece of Software called 1st Place... You can create a simulation of that... It is used for Cooperative Education Services... We have it in place here at Memorial University (Canada)... It gives coordinators of various cooperative education programmes a decent way of keeping track of Employers for Interns participating in their programmes, Students enrolled as interns, schedules for job interviews... e.t.c A similar type of software is Place Pro... Here is what happens: There is a user friendly front end... When an Employer enlists to the program (i.e. when they want to contact students from a particular field they contact our office and are entered into the DataBase) All relevant info. is stored... Queries are in the form of forms... and are made against a couple of Databases in our Case Student.db (holding Students), Company.db (holding Company info), Schedule (I am not sure what table that one is held in)... Noticably they are all Paradox Tables... There are Lock Mechanisms that prevent Overwriting of a particular Row given two people are logged on at the same time... Such a project would depend on the ability to which your mind can conjure up pictures relating to such a project... Alot of features are taken into account... p/s: when engaging in such a project you ought to take into account security... You don't want every Tom, Dick and Harry to get at your Data (Hence the User Friendly Front End Should be straight Forward as well as Secure)... Good Luck in Your final decision... Spike... Garland Foster [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi Serdar, Let me check my bag of sadly archived projects mmmhyes I have a good idea for an A project: A RELAX NG validator for PHP. You can base your work on Jing, a RNG validator in Java. The advantages are clear a) 100% feasible (if everything fails just watch how Jing does it) b) Lot of CS theory to cover (Nullable patterns, ambiguous grammars, tree grammars, derivatives, etc) c) Good documentation d) Really useful for the PHP community e) Original f) Technically challenging g) You can get some support/help from the PHP community (I guess) What do you think? Garland. Hi, Please read the rest of this email if you're interested in helping final year Computer Science student (yes, that's me...) by giving him some ideas on his final year project very possible involving PHP and SQL... I will start next autumn my third year of Computer Science studies. I have to carry out a large programming project in this final year. These projects are supervised and assessed via a dissertation and an oral presentation. The project alone counts for 20% of my whole degree, so it is quite important. A variety of project proposals have been made available for our consideration already but they all look very dull and boring. We are also encouraged to come up with our own project ideas. The onus is on us to define the problem boundaries, to investigate possible solutions, and to present the results verbally, in writing and (possibly) to demonstrate in action. They like having projects that find solutions (or improve a current sloution) real life problems. This summer, I am doing an internship in a Swiss IT company, working on a Content Management System implemented with PHP and MySQL. This will obviously give me some valuable experience with these languages (I sort of already learn them quite well...) and most of our tuition in Uni is based on Java. If you can think of an interestin final year project involving hese languages, it would be very kind to share it with me... In order to obtain a very high mark, the project needs to be challenging. For example, having an e-commerce web-site using a Database is seen as a weak, non-innovative project... Many Thanks for your time Serdar Sokmen [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Moving the pointer in a file...
Figured it out: I just rewrote the first 3 lines with a few new Line Characters and place respat the Line I wanted Changed with its Variable... fputs($file, ?\nline1\nline2etc); The reason I was trying to read it at first was that I had a Cookie Set at the very top and I thought it would reset this each time it rewrites it... Since my code is running on Sessions that doesn't really matter... However just for Interests Sake... Given that I was not using sessions, and I wanted the Cookie Maintained, would rewriting it to self file on each try, reset the cookie hence elongating the Cookie expiration Time? Spike... Kondwani Spike Mkandawire [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am trying to read and write to a file on Line 5 and line 5 alone... $file = fopen($fileName, r+); Places the pointer at the beginning of the file I have tried the following... $line = fgets($file, 255); $line = fgets($file, 255); $line = fgets($file, 255); $line = fgets($file, 255); fputs($file, the Line I want to write;); but nothing is happening... Please Help... Kondwani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Searching a Paradox Table with my PHP Script...
Hallo folks: I have a bit of an issue with Paradox Table Searching... I have a fairly large table (4MB+), here is the problem: When I run a search for an element in the Table on my localhost which is running Apache and php 4.1, I have no issues with speed... However when I run it on the Server at my work place, which is running IIS Server (I am not sure which version), and the same PHP version on my Workstation it takes ages to execute... I have gotten suggestions and have revised my Script over and over using odbc_exec() with SQL commands SELECT myColumn FROM myTable, I have used a COUNT SQL command suggested on this forum, My general algorithm is as follows... 1) I create an Array using odbc_fetch_array this Array contains one column from the Table I am searching... 2) Keep trying to matchup each element in the array against the validation element being checked... returning found within a sequential loop... and eventually Not Found... 3) I suppose the sequential loop is whats killing me, but the table is not ordered hence I am forced to do a sequential search.. Does anyone else have an idea for a quicker and much more efficient algorithm... Once again the issue of Speed is a non-factor on my local machine running Apache but it does become a factor when I run it on our Server, which is running an IIS Server... Thanks in advance... Kondwani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: (OT) No Punishment for Erik Hegreberg, Yet...
I don't know what part of South Africa you're from Bee... I suppose you are an Afrikanner! I know in Sandton where my pops is, things run efficiently... Except for the fact that Internet Cafes run slow connections I see nothing wrong with the S.A's setting, for that fact it means people are doing their jobs!! No need to hate on such an amazing country... Kondwani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Searching a Paradox Table with my PHP Script..
Hallo folks: (Sorry for a repost on the same topic just that my first one never got through)... I have a bit of an issue with Paradox Table Searching... I have a fairly large table (4MB+), here is the problem: When I run a search for an element in the Table on my localhost which is running Apache and php 4.1, I have no issues with speed... However when I run it on the Server at my work place, which is running IIS Server (I am not sure which version), and the same PHP version on my Workstation it takes ages to execute... I have gotten suggestions and have revised my Script over and over using odbc_exec() with SQL commands SELECT myColumn FROM myTable, I have used a COUNT SQL command suggested on this forum, My general algorithm is as follows... 1) I create an Array using odbc_fetch_array this Array contains one column from the Table I am searching... 2) Keep trying to matchup each element in the array against the validation element being checked... returning found within a sequential loop... and eventually Not Found... 3) I suppose the sequential loop is whats killing me, but the table is not ordered hence I am forced to do a sequential search.. Does anyone else have an idea for a quicker and much more efficient algorithm... Once again the issue of Speed is a non-factor on my local machine running Apache but it does become a factor when I run it on our Server, which is running an IIS Server... Thanks in advance... Kondwani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Searching a Paradox Table with my PHP Script..
Would it be that it takes time to connect to a table if it is in use? Kondwani Spike Mkandawire [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hallo folks: (Sorry for a repost on the same topic just that my first one never got through)... I have a bit of an issue with Paradox Table Searching... I have a fairly large table (4MB+), here is the problem: When I run a search for an element in the Table on my localhost which is running Apache and php 4.1, I have no issues with speed... However when I run it on the Server at my work place, which is running IIS Server (I am not sure which version), and the same PHP version on my Workstation it takes ages to execute... I have gotten suggestions and have revised my Script over and over using odbc_exec() with SQL commands SELECT myColumn FROM myTable, I have used a COUNT SQL command suggested on this forum, My general algorithm is as follows... 1) I create an Array using odbc_fetch_array this Array contains one column from the Table I am searching... 2) Keep trying to matchup each element in the array against the validation element being checked... returning found within a sequential loop... and eventually Not Found... 3) I suppose the sequential loop is whats killing me, but the table is not ordered hence I am forced to do a sequential search.. Does anyone else have an idea for a quicker and much more efficient algorithm... Once again the issue of Speed is a non-factor on my local machine running Apache but it does become a factor when I run it on our Server, which is running an IIS Server... Thanks in advance... Kondwani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Searching a Paradox Table with my PHP Script...
Is the table layout, indices, amount of data and ODBC connection the same in both cases? How long is ages? If minutes then is it a DNS problem in connecting to the server computer? You could try this by getting an item of data from a new table containing only one row. Do I understand correctly, you have an unordered array and you are comparing every element with every record (also unordered) from a database? On my localhost (My Work Station) it takes 2 seconds to run the same search on the same Table... And on the work place Server it takes 30+ seconds... I think I have figured out the problem, it should be to do with the fact that I am connecting to a Table on the Network that is also being used by another Application (1st Place 95)... And at current 8 people are using this Application and constantly use it during working hours... I'll try the search at night and see if there is a difference... Thanks for the response... If so then I agree. I'd order the php array (either ascending or descending) and ask for the database records similarly ordered (e.g. select myColumn from myTable order by myColumn). Then you only need make the comparisons until the value is lower (or higher) than the one it is being compared with. Make sure there is an index on myColumn in the database. Sorting the Array will cost more time I think dependent on the Sort Approach... Creating the Array takes 1 or so secs... I should try and run it as a Script and set a timer... Thanks again though... Kondwani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Is it so fuckin diffuicult...
Wow the vulgarities... Anywayz, I guess that's how you gotta address people like Erik Hegreberg... Ashley M. Kirchner [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... vins wrote: Is it so fucking difficult to do the fucking unsubscribing yourself. Stop being a fucking baby and click your fucking mouse to the php website and unsubscribe... This fucking spamming business is going to get you into big shit there are a ton of hackers out there on this mailing list so stop being a fucking jerk. Ya, and your 'fucking' e-mail certainly helps him a lot better, eh? -- W | I haven't lost my mind; it's backed up on tape somewhere. + Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 IT Director / SysAdmin / WebSmith . 800.441.3873 x130 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP]Erik Hegreberg (Moderator)
Surely there ought to be some simple code that could check for this joker's e-mail address when it reaches the Server and simply prevent it from being distributed... Isn't every e-mail address verified anywayz before it goes to the mailing list? Marek Kilimajer [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Well, he likely never be able to unsubscribe himself, as he needs to reply to the unsubscribe notice, but his account is now full. R'twick Niceorgaw wrote: I just setup a rule in OE to forward his own mail to himself and delete it form my machine - Original Message - From: Jeff Lewis [EMAIL PROTECTED] To: R'twick Niceorgaw [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, July 09, 2002 12:42 PM Subject: Re: [PHP]Erik Hegreberg He is both, he has been emailed how to get off. For now, I keep just sending my read receipts :) - Original Message - From: R'twick Niceorgaw [EMAIL PROTECTED] To: Erik Hegreberg [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, July 09, 2002 6:30 PM Subject: Re: [PHP] ipoh'%% % %%% are you doped or mentally challenged ? - Original Message - From: Erik Hegreberg [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 09, 2002 12:26 PM Subject: [PHP] ipoh'%% % %%% -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Cannot Insert into Paradox Tables...
I am trying to insert info. into a paradox table but receive the following message after inputting the data into the approriate fields... Warning: SQL error: [Microsoft][ODBC Paradox Driver] Operation must use an updateable query., SQL state S1000 in SQLExecDirect in c:\program files\apache group\apache\htdocs\coopstudent.php on line 47 I am able to retrieve info. from the table but when I write some Insertion Code I receive the above message... This is what the code looks like... Please help... $db = odbc_connect(MyDNS, who, null); $dreq = INSERT INTO myTablet.db (field1, field2, field3...) VALUES ('$field1', '$field2', '$field3'...); odbc_exec($db, $dreq); Thanks in advance... Kondwani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Cannot Insert into Paradox Tables...
I am using Database Desk Top to create the tables... I am a first timer to Databases, please tell me how I can set these permissions... I am working under WinNT... (I have not done much on any MS platforms coz I have been using UNIX for the past 3 years...)... I would be using chmod and tripple 6's to acquire this under UNIX but I have no idea on how to go about this under WinNT... Alex Piaz [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Kondwani Spike Mkandawire [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am trying to insert info. into a paradox table but receive the following message after inputting the data into the approriate fields... Warning: SQL error: [Microsoft][ODBC Paradox Driver] Operation must use an updateable query., SQL state S1000 in SQLExecDirect in c:\program files\apache group\apache\htdocs\coopstudent.php on line 47 Your problem should be about file permissions. Try to give full permissions to the IIS_USR for the Paradox tabel you want to extract data from. Let me know if you have any other questions Regards Alex I am able to retrieve info. from the table but when I write some Insertion Code I receive the above message... This is what the code looks like... Please help... $db = odbc_connect(MyDNS, who, null); $dreq = INSERT INTO myTablet.db (field1, field2, field3...) VALUES ('$field1', '$field2', '$field3'...); odbc_exec($db, $dreq); Thanks in advance... Kondwani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: getting the IP address off a visitor
Despite all downfalls of using IP addresses, if you are in North America most people in a University or business environment use a fast connection (DSL or Cable) you may choose to use the following chunk of code to retrieve someone's IP number if (getenv(HTTP_X_FORWARDED_FOR)){ $ip=getenv(HTTP_X_FORWARDED_FOR); } else { $someones = getenv(REMOTE_ADDR); } // From Klemens Karssen's code from www.php.net Alternatively use Cookies which are easy to use (check the cookie function on www.php.net Cookies and Sessions from my understanding of earlier discussions in this forum might be a wiser idea... Spike.. Sebastian Marcu [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi there, I am new to PHP and need some help. I was wondering if there is a way to get hold of the IP address of a site visitor with PHP. I'm trying to develop an interaction where the server would recognise a new visitor from a returning visitor via the IP address. Regards, Sebastian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Print Question
I wasn't in the office hence haven't visited this group for a while... Here's an idea though I still may not understand the whole situation but from what I think it is here goes: I guess you will have to mix javascript and php in the following manner... use onclick for a particular HTML variable and create a function in Java Script that runs when you click this and returns true or writes to an HTML variable say input type= hidden name=hasClicked value=false... the HTML value will give this hidden variable the value true when clicked otherwise it will be defaulted at false... You can use document.write.formName.hasClicked.value = true... Then continue with: if($hasClicked == true) Run the Script... This will mean your script won't run until OK is pressed... I hope this helps and I hope its not too late... Spike... Chris Kay [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Question I have is I want to run a print job of 200+ invoices I have a javascript code to open a print dialog box and Then go to next invoice and do the loop.. Problem I am having is that I want it to pause if the ok button on the dialog Box is not pressed.. When I run the script it fly's throught and brings up a heap of printer Dialog boxes which causes me to ctrl+alt+del... Anyway or pausing the script untill ok is pressed? Thanks in advance.. --- Chris Kay Technical Support - Techex Communications Website: www.techex.com.au Email: [EMAIL PROTECTED] Telephone: 1300 88 111 2 - Fax: (02) 9970 5788 Address: Suite 13, 5 Vuko Place, Warriewood, NSW 2102 Platinum Channel Partner of the Year - Request DSL - Broadband for Business --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Working under Apache 1.3 but not Under IIS
The function shown below only functions with my Apache on WinNT... I have tried it on my local Server (thats the one running the Apache and it works perfectly)... I am trying to step through a moderately large database (4MB)... However when I tried the example on the Server for my Work Place it returned an error stating that the Script took longer than 30 seconds to execute hence failed... When I search for a name at the top of the Database it immeadiately Spits out Found!... The server on which this fails is an IIS WebServer, I am not quite sure what version it is... I am kind of at a loss whether its to do with the scripts efficiency or the Servers Settings... Why is it possible to execute the Script easily on my local host... Here is the location... http://www.coop.mun.ca/verification.php Try and Type in any Name... As it should simply Step through the Database not find it and Respit the Page... However this does not happn... Please Help... if (function_exists(odbc_fetch_array)) return; function odbc_fetch_array($result, $rownumber=-1) { if (PHP_VERSION 4.1) { if ($rownumber 0) { odbc_fetch_into($result, $rs); } else { odbc_fetch_into($result, $rs, $rownumber); } } else { odbc_fetch_into($result, $rownumber, $rs); } foreach ($rs as $key = $value) { $rs_assoc[odbc_field_name($result, $key+1)] = $value; } return $rs_assoc; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Working under Apache 1.3 but not Under IIS (Problem Resolved But its too Slow)...
I got it fixed by changing the Max Execution Time in the php.ini file... However, this is ridiculously slow... Does anyone else have any idea how I can run through a 4 MB+ Database checking 2 fields Without having to wait longer than 30 seconds... If it was a simple text file it would have been easy using different search strategies (possibly even Hashing Keys...) Please give me some suggesstions... Kondwani... Kondwani Spike Mkandawire [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The function shown below only functions with my Apache on WinNT... I have tried it on my local Server (thats the one running the Apache and it works perfectly)... I am trying to step through a moderately large database (4MB)... However when I tried the example on the Server for my Work Place it returned an error stating that the Script took longer than 30 seconds to execute hence failed... When I search for a name at the top of the Database it immeadiately Spits out Found!... The server on which this fails is an IIS WebServer, I am not quite sure what version it is... I am kind of at a loss whether its to do with the scripts efficiency or the Servers Settings... Why is it possible to execute the Script easily on my local host... Here is the location... http://www.coop.mun.ca/verification.php Try and Type in any Name... As it should simply Step through the Database not find it and Respit the Page... However this does not happn... Please Help... if (function_exists(odbc_fetch_array)) return; function odbc_fetch_array($result, $rownumber=-1) { if (PHP_VERSION 4.1) { if ($rownumber 0) { odbc_fetch_into($result, $rs); } else { odbc_fetch_into($result, $rs, $rownumber); } } else { odbc_fetch_into($result, $rownumber, $rs); } foreach ($rs as $key = $value) { $rs_assoc[odbc_field_name($result, $key+1)] = $value; } return $rs_assoc; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How Do Y'all Secure your Sites... (Cookies vs. IP Number)...
Quick Question on Cookies vs. IP Number: They appear to be easy to set (well at least in PHP), hence quite easily to get around (The user of your Site simply deletes the Cookie on his Hard Drive...) In Konqueror you are actually given the option of rejecting cookies... Using getenv($REMOTE_ADDR) to retrieve someones IP number isn't too reliable either in the case that someone is using Dial Up... I just want to get ideas from other PHP Coders as to how they secure their Sites and actually keep an accurate record as to who and how many people visit your sites.. coz even a combination of Cookies and IP would be easily by-passed... Some Ideas if you may folks... Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] function for size of array
Neat!... Philip Olson [EMAIL PROTECTED] wrote in message Pine.BSF.4.10.10207051644510.68593-10@localhost">news:Pine.BSF.4.10.10207051644510.68593-10@localhost... It's a term with many different meanings. See: http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?RTFM On Fri, 5 Jul 2002, Scott Fletcher wrote: What is RTFM?? Jason Wong [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Friday 05 July 2002 22:20, Scott Fletcher wrote: Ah! Thanks! By the way, it's count() with a n. :-) That was to trick you into RTFM! Hey you were lucky that the 'o' wasn't left out instead :) -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* The shortest distance between two points is under construction. -- Noelie Alito */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Configuring the Session Function in php.ini for WinNT...
Does anyone know how to configure the session function in the php.ini File under WinNT... The Session Function appears to be generic to UNIX... What do I change the save_path variable to... session.save_path = ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Paradox Tables with PHP (Still the Same old Question)...
Hallo Folks I have come across this problem many times... But still haven't seen anyone give a reasonably coherent solution... I am trying to get my script to read Paradox Tables... Its a no go so far... I do believe that this can be achieved via. odbc... I have tried the configurations but have fallen short each time... I keep getting the following Error: Warning: SQL error: [Microsoft][ODBC Paradox Driver] The Microsoft Jet database engine could not find the object 'Test.db'. Make sure the object exists and that you spell its name and the path name correctly., There has to be someone in this Forum who has successfully worked with Paradox Tables in conjunction with php... Do I have to download another version of ODBC... My Scripts have no issues reading MSAccess tables the problem is when it gets to Paradox... Please Help... Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP does not work??
I forgot to point out another disadvantage of turning on register_globals apart from that of security is that when you are sending a page with a form to the same page, e.g: form name=whatever action=$PHP_SELF method=post there is a tendency to lose info.. E.g. If you are sending text separated by spaces you only manage to send the first word this can be overcome by using the htmlspecialchars('value') method to evaluate value... turning on globals is to make the coding easier but has a good deal of disadvantages... Spike... Scott Fletcher [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Um, alright, I'll just leave the code in the hyperlink the way it is. It is not possible to use the form or post of some sort for the hyperlink. form will work with the submit button where we can use post or hidden. Hyperlink meant words or sentences that have underline underneath it, when clicked will go to a different webpage. Thanks, Scott Erik Price [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Wednesday, June 26, 2002, at 02:56 PM, Scott Fletcher wrote: I tried that and it worked. I have one question, what about the hyperlink? People will see the option in the hyperlink. You know. Is there a way around it to hid that in the hyperlink? If by hyperlink you mean the URL in the URL bar of their browser, correct -- people will see it. That GET data is part of the URL, sort of. Most browsers will not display POST data to their users (easily) but it's never truly hidden from view. Any data that your users are sending to you, whether it's GET, POST, or COOKIE, is data that they can see. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP and OOP
I still don't get what the big fuss of OO programming is about I do agree that it is stylistic hence helps someone else who hasn't written your code to follow up on what you are doing... But so far the programs I have been writing in OO supported languages have been written and scripted on an as is needed basis... i.e. I have the basic idea then I simply start scratching down methods/functions I have never sat down and drawn a single UML diagram on a project that I am about to do... How many of us have done so? Could some one please point out another feasible advantage of OO programming a part from the fact that I would make someone else's work easier by using this style of programming... Spike... Jesper Brunholm [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... [EMAIL PROTECTED] wrote: i want to build a site in fully OO style but that will significantly slow down execution time Do you have any documentation on this? - I'm getting quite used to read and hear the very opposite. Previously programmers even argued that asp was faster than php because it was more OO. Regards Jesper Brunholm -- Phønix - Danish folk music from young musicians - http://www.phonixfolk.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Email
You would have to reconfigure the smtp outgoing server in your php.ini file in the mail function as follows: SMTP=smtp.myHost.whatever I believe the php.ini file in Linux uses sendmail... In the php.ini simply search for [mail function] and make the necessary changes as above... Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: paradox
I've been having the same error for the past couple of days, I have posted on a couple of news goups with no response... I even have a posting on this one... I posted one on the paradox news group and some very rude individual gave a sarcastic response and led me back here (I think he was feeling like a don coz he owns some software firm)... Anywayz, I am quite convinced that it is to do with the configuration when setting up the connection to your database (I haven't come around that yet), kind of the same way you connect to an access DB. I don't think it has anything to do with your source... I was told that people link their php Scripts to paradox tables via. ODBC. However, I'd appreciate it if you would throw any further suggestions if you have any... Kondwani Sonjaya [EMAIL PROTECTED] wrote in message 01c21c2d$fbf5ef20$c800a8c0@sicute">news:01c21c2d$fbf5ef20$c800a8c0@sicute... ?php $conections=odbc_connect(data,tes,); $result=odbc_do($conections,select nama from password); odbc_binmode($result,0); odbc_longreadlen($result); odbc_fetch_row($result); header(Conten-type:type: image/gif); odbc_result($result,1); ? error message like this Warning: SQL error: [Microsoft][ODBC Paradox Driver] External table is not in the expected format., SQL state S1000 in SQLExecDirect in c:\apache\htdocs\database\odbc1.php on line 8 Warning: Wrong parameter count for odbc_longreadlen() in c:\apache\htdocs\database\odbc1.php on line 10 Warning: Supplied argument is not a valid ODBC result resource in c:\apache\htdocs\database\odbc1.php on line 11 Warning: Cannot add header information - headers already sent by (output started at c:\apache\htdocs\database\odbc1.php:8) in c:\apache\htdocs\database\odbc1.php on line 12 Warning: Supplied argument is not a valid ODBC result resource in c:\apache\htdocs\database\odbc1.php on line 13 any one cna help me with sample source -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: File Retrieval, unusual
Do you really need the quotation marks when you are simply using php to spit out your HTML? Unless it is absolutely necessary php still spits out the correct HTML code without uneccessary quotations... echo a href= $address; I am quite sure this should work for the link tag... Correct me if I am wrong but I know if works with the other HTML tags... The EXTRA quotation marks usually aren't necessary... Spike... Jay Blanchard [EMAIL PROTECTED] wrote in message 001401c21c3c$1c98b2e0$8102a8c0@niigziuo4ohhdt">news:001401c21c3c$1c98b2e0$8102a8c0@niigziuo4ohhdt... I am in the process of analyzing the following situation and wanted to see if any of you might have done this or something similar before... Each day we have a person who is responsible for going to a secure web site ,logging in, (which redirects to) a JAVA applet. This JAVA applet has a set of tabs across the top, one of which is labeled 'Daily Records'. The tab is clicked on and then a set of zip files is listed for download. All done manually every day. What we would like to do is develop some sort of automated method to do this file retrieval using PHP (as a stand alone executable run by a CRON job) since it has excellent file handling functions. We could use PERL too. Unfortunately the company we retrieve these files from will not make them available in a more convenient manner because if we do it for you, we have to do it for everyone. My arguement was that we already had access, there was no need for a JAVA applet layer of abstraction. The arguement fell on deaf ears, leaving me in this position. Does anyone have any ideas? I am trying some things, but looking for 'eye-openers' and 'ah-ha's!' TIA! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: File Retrieval, unusual
Jay Blanchard [EMAIL PROTECTED] wrote in message 001601c21c4b$67cfc5f0$8102a8c0@niigziuo4ohhdt">news:001601c21c4b$67cfc5f0$8102a8c0@niigziuo4ohhdt... --- Did you reply to the wrong message? Nope, You posted your question in someone else's Reply Section... (Martin Johansson's function echo question)... Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: check if a foreach loop has successfully run
Jule Slootbeek [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... if (foreach ($answer as $a) { echo $a }) { return TRUE; } else { return FALSE; } Seems about right, however by default output is printed to a Page unless you are running your script in the command prompt what you might want to do to avoid messiness is redirect every printout confirmation of your for loop to the std.error (I am not too sure what the path is: it should be in the manuals though - php.net)... Or alternatively to a file using the fopen(fileName, w+); then using puts() or fwrite to write the output contents... Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Setting Cookies in netscape and explorer?
Martin Johansson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi! Cookies makes me go AGHH!! Please help me with this: I am setting a cookie like this in my loginscript: setcookie(devProcCookie, cookie value.|.time(), 31536000); // Set cookie header(Location: inside.php); exit; So far it works! But when I go to the inside.php page that looks like this: $cookie_life = 30; // The cookie lives for 1 hour $tok = explode(|, $HTTP_COOKIE_VARS[devProcCookie]); $cookie_value = $tok[0]; $creation_time = $tok[1]; if((time()-$creation_time) $cookie_life) // If time expires go to cookie_expired.php { // cookie has expired so delete it. setcookie(devProcCookie, ); header (Location: cookie_expired.php); exit; } setcookie(devProcCookie, cookie value.|.time(), 31536000); // If time hasnt expired update the cookie time Something happens in netscape. Everything works fine in IExplorer. Netscape says: Notice: Undefined index: devProcCookie in c:\inetpub\wwwroot\devproc\beta\inside.php on line 2 Notice: Undefined offset: 1 in c:\inetpub\wwwroot\devproc\beta\inside.php on line 4 Warning: Cannot add header information - headers already sent by (output started at c:\inetpub\wwwroot\devproc\beta\inside.php:4) in c:\inetpub\wwwroot\devproc\beta\inside.php on line 9 Warning: Cannot add header information - headers already sent by (output started at c:\inetpub\wwwroot\devproc\beta\inside.php:4) in c:\inetpub\wwwroot\devproc\beta\inside.php on line 10 What is wrong! Please help me someone!!! /Martin --- Ditt utgående mail är virusfritt. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.371 / Virus Database: 206 - Release Date: 2002-06-13 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Setting Cookies in netscape and explorer?
As opposed to using the Cookies Array HTTP_COOKIES_VAR could you not just use explode the $devProcCookie using if (isset($devProcCookie)){ $tok = explode(|, $devProcCookie); } //Note this will only work if the global variables in your php.ini files are turned on... I have no idea why it can't read the index $devProcCookie in the Cookies Array if you figure it out though please post up... Kondwani Martin Johansson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi! Cookies makes me go AGHH!! Please help me with this: I am setting a cookie like this in my loginscript: setcookie(devProcCookie, cookie value.|.time(), 31536000); // Set cookie header(Location: inside.php); exit; So far it works! But when I go to the inside.php page that looks like this: $cookie_life = 30; // The cookie lives for 1 hour $tok = explode(|, $HTTP_COOKIE_VARS[devProcCookie]); $cookie_value = $tok[0]; $creation_time = $tok[1]; if((time()-$creation_time) $cookie_life) // If time expires go to cookie_expired.php { // cookie has expired so delete it. setcookie(devProcCookie, ); header (Location: cookie_expired.php); exit; } setcookie(devProcCookie, cookie value.|.time(), 31536000); // If time hasnt expired update the cookie time Something happens in netscape. Everything works fine in IExplorer. Netscape says: Notice: Undefined index: devProcCookie in c:\inetpub\wwwroot\devproc\beta\inside.php on line 2 Notice: Undefined offset: 1 in c:\inetpub\wwwroot\devproc\beta\inside.php on line 4 Warning: Cannot add header information - headers already sent by (output started at c:\inetpub\wwwroot\devproc\beta\inside.php:4) in c:\inetpub\wwwroot\devproc\beta\inside.php on line 9 Warning: Cannot add header information - headers already sent by (output started at c:\inetpub\wwwroot\devproc\beta\inside.php:4) in c:\inetpub\wwwroot\devproc\beta\inside.php on line 10 What is wrong! Please help me someone!!! /Martin --- Ditt utgående mail är virusfritt. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.371 / Virus Database: 206 - Release Date: 2002-06-13 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php