[PHP] How to add new user to the domain
Hello, Any one please let me know how to use PHP to add new user to a domain for using mail (sendmail). And also any funtions to check the availibility of a domain name. Regards, Anan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Using fopen()/fread()/fscanf()
Alright, I see that this is probably the way to go, but I'm dying here. I have this: $filename = fopen("http://www.kinyradio.com/juneaunews/latest_juneau_news.html";, "r"); $contents = fread($filename, 100); preg_match_all("|+[-a-zA-Z0-9,. ]+|i", $contents, $out); print_r($out); And it returns this: Array ( [0] => Array ( [0] => Injured hiker [1] => Toy guns looked real enough [2] => U-S Forest Service Chief visiting [3] => Millions in compensation divided up [4] => Alaska Air [5] => One car [6] => Services [7] => Talkeetna ) [1] => Array ( [0] => Injured hiker [1] => Toy guns looked real enough [2] => U-S Forest Service Chief visiting [3] => Millions in compensation divided up [4] => Alaska Air [5] => One car [6] => Services [7] => Talkeetna ) ) This is definitely progress, but the headlines are truncated. I have a feeling this has something to do with linebreaks, but I don't know how to account for those. For example, $out[0][0] should read "Injured hiker rescued on Mt. Juneau" and $out[0][2] should end with "...Alaska for the first time". The manual entries for preg_match and preg_match_all pretty much assume you have a working knowledge of reg expressions, which I don't, and a google search turned up a bunch of pages, none of which I could understand enough to be of help. So, any pointers would be appreciated. Thanks! Jason Soza -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 11:01 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Using fopen()/fread()/fscanf() On Tuesday 23 July 2002 14:16, Jason Soza wrote: > I'm fairly certain that fopen() is working fine - I can echo "$contents"; > and it works great, but it displays the entire page that I fetched. I just > want certain parts of the page and unfortunately, fscanf() doesn't seem to > think $contents or $filename are valid. Just more info on this, I tried > replacing fscanf($filename,...) with fscanf($contents,...) and got the same > result. Not sure why you're using fscanf() and why it doesn't work. I would use preg_match() on $contents. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Communications satellite used by the military for star wars. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] redirecting after login
> what doesn't work is after they login to Page 1, the > redirect sends them to > Page 2 and right back to Page 1 because the global session > isn't staying > registered. Are you putting session_start() at the top of each page where you want to be able to use the session stuff you've set? CYA, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: multiple search
After executing the exact script I get the following (rough)error: Warning: Undefined offset: 1 in :/Inetpub/co2_busters_mk2 The script(Which is being executed about 25m away) soon cause my computer to fill up up it's memory(96mb used to about 256) That is why I couldn't give you the message(IE crashed). It is looping forever for some reason(I've never filled a client's computer that fast before!) How can I fix it? Or if you cant tell me what does the error mean? -- JJ Harrison [EMAIL PROTECTED] www.tececo.com "Richard Lynch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > >My question is what can I do if someone searches for php script for search? > > > >I would want to use OR in my SQL statment. The problem is how do I write the > >query so that it will detect the number of words sent then put enough ORs > >and LIKE '%$search[1]% in? > > The LIKE operator will cheerfully return 1 or 0, which you can "add up", or > in your case, "weight and add up" in your SELECT: > > $query = "select 0 "; > # The 0 is a kind of 'yeast' to start off our summation of matches. > > $words = explode(' ', $search); > > while (list(,$word) = $words){ > $word = trim($word); > if ($word){ > $query .= " + article_keyword.weight * article_keyword.keyword like > '%$word%' "; > } > } > > $query .= " as score "; > $query .= " from article_keyword, article_data "; > $query .= " where score > 0 "; > $query .= " and article_data.aid = article_keyword.aid "; > $query .= " order by score desc "; > > echo $query, "\n"; > > -- > Like Music? http://l-i-e.com/artists.htm > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Using fopen()/fread()/fscanf()
On Tuesday 23 July 2002 15:38, Jason Soza wrote: > Alright, I see that this is probably the way to go, but I'm dying here. I > have this: > > $filename = > fopen("http://www.kinyradio.com/juneaunews/latest_juneau_news.html";, "r"); > $contents = fread($filename, 100); > preg_match_all("|+[-a-zA-Z0-9,. > ]+|i", $contents, $out); > print_r($out); Assuming that the and tags are closed and you want everything in between then try this: preg_match_all("|(.*)|i", $contents, $out); > The manual entries for preg_match and preg_match_all pretty much assume you > have a working knowledge of reg expressions, which I don't, and a google > search turned up a bunch of pages, none of which I could understand enough > to be of help. So, any pointers would be appreciated. Thanks! You want to read up on "Pattern Modifiers" and "Pattern Syntax", that's where all the regex black magic is explained. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* He's dead, Jim. -- McCoy, "The Devil in the Dark", stardate 3196.1 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Login / Authentication Class
I've been developing a simple (protecting nuclear secrets it aint) login / authentication class library. This code is designed to - 1. check unname & password are completed 2. check uname & password contain only permitted chars (a-z,1-9) 3. match user against dbase user table 4. generate a unique session token 5. store session token in dbase 6. set client side session cookie I've attached the code here in the hope that it may be of use to some of you. I also welcome any feedback regarding problems / security shortcomings or ways it can be improved. Happy Coding... Notes - -- dbase is postgres (dbase stuff should probably should be abstracted to make the code platform independant) -- password encyrption is done using CRYPT_STD_DES rather than md5 because of legacy data (passwords in current dbase are crypted like this) Here's the code... begin index.html >> end index.html begin doLogin.inc >> uname = $uname; $this->pass = $pass; $this->cookieName = "cookieName"; $this->authUser(); } // validate & authenticate function authUser(){ // check that both uname & password are complete $this->loginDataComplete(); // check uname & pass contain only valid chars $this->validateLogin(); // create dbase object $db = new db(); // encrypt password $cryptedpass = crypt($this->pass,"CRYPT_STD_DES"); // select user & password from dbase $userQuery = pg_exec($db->db, "select oid, adminuser from user where username = '$this->uname' and pass = '$cryptedpass'"); if (pg_NumRows($userQuery) != 1) { $this->halt(); } else { $user_oid = pg_Result($userQuery, 0, "oid"); $this->adminUsr = pg_Result($userQuery, 0, "adminuser"); // generate unique md5 crypted session token $this->createSessionID(); // write session token 2 user table $resultSessid = pg_Exec($db->db, "update user set sessid = '$this->session_id' where oid = $user_oid"); // set session cookie $this->setSessionCookie(); // authentication complete // redirect 2 welcome page here } } // check uname & password are not empty function loginDataComplete(){ if ((!isset($uname)) || (!isset($pass))) { $this->halt; } else { return; } } // do login char validation function validateLogin() { if ( (!$isValidUname = $this->validateChars($this->uname)) || (!$isValidPass = $this->validateChars($this->pass)) ) { //$this->halt(); } else { return; } } // validates login against permitted chars function validateChars($what){ $isValid = (ereg("^([A-Za-z0-9_]*)$", $what)) ? true : false; return $isValid; } // create unique md5 encrypted session token function createSessionID() { srand((double)microtime()*100); $this->session_id = md5(uniqid(rand())); return; } // set cookie with encrypted session token function setSessionCookie(){ $issetCookie = setcookie($this->cookieName, $this->session_id, time()+7200); /* expire in 1 hour */ if (!$issetCookie == 1) { $this->halt(); } else { return; } } // record logon attempt 2 in log function recordLogin(){ $log = new log; $log->record(); } // halt && display errors function halt() { // authentication failed display login form displayLogin(); // write login attempt to log here // call 2 optional error msg handler here } } // end authentication class --- // login presentation template function displayLogin() { ?> Please enter your Username & Password username password
RE: [PHP] redirecting after login
> why don't u do something like > > if (!username) > { you can not access this page > } > else > { > //page content > } > > ? > > that's a quick fix but might be all you need to do.. Umm...I hope register_globals is off... www.yourdomain.com/yourpage.php?username=a_bad_user ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: MySQL - PHP combined log
I guess I missed the part where you wanted to implement something w/o changing existing scripts. There's no easy way to do it right now. You could write a script that'll run in the background and combine all of the error logs together. You can turn on error logs for PHP and for MySQL. You'll still have the problem of identifying which PHP page caused the MySQL error, though... ---John Holmes... > -Original Message- > From: PHPCoder [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 23, 2002 2:23 AM > To: Richard Lynch > Cc: php-general > Subject: Re: [PHP] Re: MySQL - PHP combined log > > Thanks, but all these "methods" require modification of the scripts > already on the server, and it won't ensure any new script being written > by a user on my system to comply. > Are you all saying that there are no logs kept by default of errors > generated on php/mysql pages at all unless specifically coded? Wouldn't > it be possible then in future PHP releases to have a "set_error_logging" > directive in the php.ini file that will automatically run a wrapper > function on all mysql_query() functions to do this kind of thing? > > How are people out there managing the scripts/script errors caused by > users on their systems? Or is it a case of "handling the crisis when it > happens"? > You see, as administrator, I need to be able to quickly see who are > coding in such a way as to leave security holes, or even worse, cause > the server to crash due to poor coding. There are almost 1000 individual > php files on my server, and it wouldn't be possible for me to scrutinize > all of them to make sure they are OK. > Are there any admins out there that have policies about scripting > practices on their systems; ie, checking a script from a user before it > is allowed to be uploaded etc? > > Thanks > > > Richard Lynch wrote: > > >>Hi, tried this on mysql list, no luck: > >> > >>I want to be able to view a single log that contains the following: > >> > >>IP of user : page_name (PHP only): time/date: MySQL query ( 'select * > >> > >>from xxx' etc.) : error msg from mysql/php if any > > > >>So it's almost a hybrid between apache and mysql with some extra's > >> > >>I'm sure you all should see the benifit of this in troubleshooting and > >>specially keeping track of who does what when it comes to PHP coding on > >>ones server, specially with crappy code that kills the server. > >> > >>Is something like this possible, already there? > >> > >>PS, Running RedHat 7.0 with PHP4 and mysql 3.23.x > >> > > > >http://php.net/error_log > > > >if you can get everybody to use your own function to query the database. > > > >Or, you could use http://php.net/set_error_handler and > >http://php.net/trigger_error and catch all errors thrown by all PHP code. > > > >Actually, to get the PHP page name and line number, set_error_handler is > >probably your best bet. > > > > > > -- > 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: OO Programming - get practical
For a really good overview of the OO programming read "Thinking in Java" by Bruce Eckel. What you learn can then easily be applied to your coding practices in PHP. The author has made the book available for free from his site www.mindview.com _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] redirecting after login
> Umm...I hope register_globals is off... And if not. http://www.yourdomain.com/yourpage.php"; method="post"> Can be used from every server to login. Op dinsdag 23 juli 2002 12:42, schreef John Holmes: > > why don't u do something like > > > > if (!username) > > { you can not access this page > > } > > else > > { > > //page content > > } > > > > ? > > > > that's a quick fix but might be all you need to do.. > > Umm...I hope register_globals is off... > > www.yourdomain.com/yourpage.php?username=a_bad_user > > ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to store an image into a mysql database using php language?
There's no reason to store images in a database. It's a waste of time and it's a slower process than just loading it off the disk. If you still want to know how to do it, search the web. This question is asked every day and there are a couple dozen tutorials out there that'll tell you exactly how to do it. ---John Holmes... > -Original Message- > From: Rija [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 22, 2002 11:03 PM > To: [EMAIL PROTECTED] > Subject: [PHP] How to store an image into a mysql database using php > language? > > I want to store image data into mysql table using BLOB but I don't know > how to read it after. To record the image, I doesn't have any problem, but > to read the file after and to view the image, I can't do anything the > variable show only comment like this: memobin24.bin > > So how can I do? > > This was the script. > > > Include("connect.inc") ; > > $fp = fopen("image/photo.jpg","r") ; > > if ($fp) { > > $code2 = "" ; > > while (!feof($fp)) { > > $buffer = fgets($fp, 4096); > > $code2 = $code2.$buffer; > > } > > } > > $code2 = addslashes($code2) ; > > $table = 'image' ; > > $instruction = mysql_query("INSERT into $table values ('','fichier > inage','$code2','') or die("FATAL ERROR") ; > > ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP input and variables dynamic :)
I'm trying to create input boxes on the fly by using php variables:PHP:so that will create:then i'm trying to set the value to something else using:document.all['tree'].status[1].value='expand';but i'm getting a an error on page dialog saying:'document.all.tree.status.0 is null or not an object'any ideas :)basically i'm trying to create an IE and netscape friendly tree control which is all dynamically created using an array passed.ThanksAndy
[PHP] Question to 'DIR'
It´s a silly question, but how can I create a directory on web?
[PHP] Fw: [webdevelopersjournal-discuss] php vuln.
>From another list [EMAIL PROTECTED] --- "Life must be lived as play." - Plato (427 - 347 BC) - Original Message - From: "John Best" <[EMAIL PROTECTED]> To: "Web Developer's Journal - Discuss" <[EMAIL PROTECTED]> Sent: Tuesday, July 23, 2002 12:01 PM Subject: [webdevelopersjournal-discuss] php vuln. Have you all heard about the new vulnerability in PHP's reading of POST'd forms. http://www.theregister.co.uk/content/55/26316.html Thought it might be important for some of you. JB. (there is a patch or something out, the workaround is to switch of the parsing of POST'd forms, which is probably not an option for some people) -Original Message- From: Ian C. Purdie [mailto:[EMAIL PROTECTED]] Sent: 23 July 2002 08:58 To: Web Developer's Journal - Discuss Subject: [webdevelopersjournal-discuss] Re: Nigerian Bank Scams Scott Merker wrote: > So He's off scot free and they can't even complain about him because of > libel/slander laws. and we wonder how we ended up with crooked CEO's Yep, this is at "chicken little" level but your views still hold. This is TRUE... a club which was formed around 1946 and, with interests toward 'returned servicemen'. Actaully became a very successful club by 1960 and motored on in a big way... A lifetime of effort (including my Dad's) to be destroyed by... As Scott said... > So He's off scot free and they can't even complain about him because of > libel/slander laws. and we wonder how we ended up with crooked CEO's > Ian Like this list? Check out our online Web Development Discussion Group, which lets you browse past posts. http://forums.internet.com/WebX?13@%5e37571@.ee7b24b You are currently subscribed to webdevelopersjournal-discuss as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% The contents of this e-mail are confidential to the ordinary user of the e-mail address to which it was addressed, or in the case of an incorrectly addressed e-mail message, the intended recipient. No-one else may copy, use, disseminate or forward all or any part of it in any form. Although this email, including any attachments, is believed to be free of any virus, or other defect which might affect any computer or IT system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free, and no responsibility is accepted for any loss or damage arising in any way from its use. The views expressed in this e-mail are those of the sender and not necessarily the employees company. If you receive this e-mail in error please accept our apology. If this is the case we would be obliged if you would contact the sender and then delete the e-mail. Like this list? Check out our online Web Development Discussion Group, which lets you browse past posts. http://forums.internet.com/WebX?13@%5e37571@.ee7b24b You are currently subscribed to webdevelopersjournal-discuss as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Headers already sent (Sometimes)
Im getting Warnings about headers being already sent. But not on my local web server Im sending the headers (to try and make the page not cache) before anything is echoed to the browser. I set the error reporting to E_ALL at the top of the script, turning error reporting off suppresses the warnings. local server Win XP(Windows NT 5.1 build 2600), Apache/2.0.39, PHP 4.2.1 running as a module using a patched Apache 2.0 Filter other server: Linux, Apache/1.3.24, PHP 4.1.2 with my local server there are no errors (even on E_ALL). I can also send a refresh header after html output. thanks in advance, Jake -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Security Advisory: Vulnerability in PHP versions4.2.0 and 4.2.1
[snip] >Well, trying to updrade on Slackware Linux 8.0 and compiling with the GD >(1.8.4) libraries are giving us some headaches. Some of what seems to be >wrong; ... You're simply looking at the old PHP. You did stop/start Apache, right?... Cuz the new PHP won't kick in until you do. If so, almost for sure your installation of the "new" PHP binary is not happening correctly. Watch carefully when you do "make install" to see where your new copies go. Use "locate modphp.so" or whatever it is to find out where your old copies are. [/snip] We finally got this right yesterday afternoon, it ended up being, as Richard said, a directories problem. Ah well, live and learn :) The FreeBSD boxes went off without a hitch. Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] redirecting after login
[snip] A site I'm working on requires a login screen where various individuals will log into the site and add information for their various departments. Rather than setup a different script for each department, I was hoping to create one script that would either accept or deny a login based on the username/password stored in a database, then based on the username/password - redirect the individuals browser to a URL. [/snip] You need to take the script below and place it into a seperate file with NO OTHER INFORMATION. Your form action should state that this script is the action and method should be POST. Modify this script for access levels and redirect pages. email; $level = $dbuser->accesslevel; // //send the user to a page based on their user level switch($level) { case "level1": header("Location: level1.php"); exit; break; case "level2": header("Location: level2.php"); exit; break; case "level3": header("Location: level.php"); exit; break; case "level4": header("Location: level4.php"); exit; break; case "level5": header("Location: level5.php"); exit; break; default: header("Location: loginfail.php"); exit; } ?> HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] re: OO Programming - get practical
[snip] For a really good overview of the OO programming read "Thinking in Java" by Bruce Eckel. What you learn can then easily be applied to your coding practices in PHP. The author has made the book available for free from his site www.mindview.com [/snip] Try http://www.mindview.net HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions4.2.0 and 4.2.1
> Who said anything about M$? I don't use their crappy products so I > don't have to deal with their security issues. I'm the one who brought up Microsoft, I'm saying it's a whole lot better then the alternatives. > If PHP 4.2 is unsafe then why is it listed at the top of the page for > download? There is not a shread of text saying do not use in production, > no unsafe warnings whatsoever. How am I supposed to magically find the > 'do not use' warnings? You have to magically find this by reading the messages on this list, not more then a month ago, someone asked was it considered stable for production use, and the answer was no. I was going to type a long rant about how you should test software or atleast wait a while for the kinks to be worked out of new versions instead of running cutting edge, but screw it, I'm not wasting any more time on this. > It's not about that.. It's about the hell I've already been through with > the new register_globals setting. Then two huge ass security holes > following in the next couple of months after that. I know, there such bastards for releasing security patches to fix the holes they know about instead of burrying the evidence and denying a hole exists. > If it doesn't bother you the hassles 'the php group' is putting me, you, > and alot of others through then I guess that's just you. I can't > help but get pissed about it. I did not have the time to do these > upgrades, but now I have to make time. You know your right, the PHP group (god bless them) is out to get you, individually, they intentionally put security holes into the software, so they can go back later and make you patch your "dozens of systems" and make your life a living hell. And it's not just me who doesn't mind upgrading, it's just you who can't handle it. Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] array_rand() and seed
Using Win2K Professional Server, IIS PHP Version 4.2.1 mt_getrandmax() returned 2147483647 I have an array of 26 characters. I want three random values from the array, I use the following: $rand_al = array_rand ($arralpha, 3); I get the same characters each and every time. The way I am handling it right now is generating random values using mt_rand(0,25) and using those random values as the index of the array to retrieve the value of. Any ideas on this? Thanks. Naintara
[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 http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
FW: [PHP] array_rand() and seed
First I seed the generator with mt_srand ((double) microtime() * 100); -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] t]On Behalf Of Naintara Jain Sent: Tuesday, July 23, 2002 6:36 PM To: Php-General@Lists. Php. Net Subject: [PHP] array_rand() and seed Using Win2K Professional Server, IIS PHP Version 4.2.1 mt_getrandmax() returned 2147483647 I have an array of 26 characters. I want three random values from the array, I use the following: $rand_al = array_rand ($arralpha, 3); I get the same characters each and every time. The way I am handling it right now is generating random values using mt_rand(0,25) and using those random values as the index of the array to retrieve the value of. Any ideas on this? Thanks. Naintara -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and 4.2.1
Hi, 1. Every peice of software has bugs - PHP still bugs - it always will have. Deal with it. 2. It is no-one's responsibility other than your own to *test the software*. Anyone using any form of software in a production environment has at least one test bed to install new versions of software on to test for security. 3. You dont have to upgrade! You should, but you dont have to... its down to the system administrator to assess the need. 4. If your software requires register_globals to be set "On" in the php.ini then your software is badly coded and quite possiblty insecure in its own nature. 5. At the end of the day, we arent choosing YOU to use PHP... you chose PHP for your own reasons. If you dont like it - Microsoft will be happy to take chunks of money off your hands for a Win2k Server with IIS and ASP on it. The grass it always greener huh. - Dan >> Who said anything about M$? I don't use their crappy products so I >> don't have to deal with their security issues. > > I'm the one who brought up Microsoft, I'm saying it's a whole lot better > then the alternatives. > >> If PHP 4.2 is unsafe then why is it listed at the top of the page for >> download? There is not a shread of text saying do not use in >> production, no unsafe warnings whatsoever. How am I supposed to >> magically find the 'do not use' warnings? > > You have to magically find this by reading the messages on this list, > not more then a month ago, someone asked was it considered stable for > production use, and the answer was no. I was going to type a long rant > about how you should test software or atleast wait a while for the kinks > to be worked out of new versions instead of running cutting edge, but > screw it, I'm not wasting any more time on this. > >> It's not about that.. It's about the hell I've already been through >> with the new register_globals setting. Then two huge ass security >> holes following in the next couple of months after that. > > I know, there such bastards for releasing security patches to fix the > holes they know about instead of burrying the evidence and denying a > hole exists. > >> If it doesn't bother you the hassles 'the php group' is putting me, >> you, and alot of others through then I guess that's just you. I >> can't help but get pissed about it. I did not have the time to do >> these upgrades, but now I have to make time. > > You know your right, the PHP group (god bless them) is out to get you, > individually, they intentionally put security holes into the software, > so they can go back later and make you patch your "dozens of systems" > and make your life a living hell. And it's not just me who doesn't mind > upgrading, it's just you who can't handle it. > > Adam Voigt > [EMAIL PROTECTED] > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Dan Hardiker [[EMAIL PROTECTED]] ADAM Software & Systems Engineer First Creative Ltd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] array_rand() and seed
Have you seeded the random generator? Read up on srand and mt_srand. - Dan > Using Win2K Professional Server, IIS > PHP Version 4.2.1 > > mt_getrandmax() returned 2147483647 > I have an array of 26 characters. I want three random values from the > array, I use the following: > $rand_al = array_rand ($arralpha, 3); > > I get the same characters each and every time. > The way I am handling it right now is generating random values using > mt_rand(0,25) > and using those random values as the index of the array to retrieve the > value of. > > Any ideas on this? > > Thanks. > Naintara -- Dan Hardiker [[EMAIL PROTECTED]] ADAM Software & Systems Engineer First Creative Ltd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Comma question
Richard, > This Programmer has actually read the Documentation and believed the > warnings that some day just plain old $strName might not be enough. Where might these warnings be? I just perused this URL: http://www.php.net/manual/en/language.types.string.php especially where it talks about the {} syntax, but I see no such warnings of future deprecation. I also followed a provided link here: http://www.zend.com/zend/tut/using-strings.php but that also doesn't mention this warning. Is this in fact syntax that will no longer work in some future version? If so, I'll start using {} everywhere I embed variables in strings, but I was unaware that stuff like this: "This is a $variable embedded in a string" might no longer work. If you have URLs, I'd love to read up on this. Thanks! -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Where to set return-path for virtualhosts
I saw a comment in the online docs about setting the return-path for sendmail for virtualhosts. However, the note did not say WHERE to put the line - I attempted to put it into apache's virtual host tag and that failed. The line was: php_admin_value return-path "/usr/sbin/sendmail -t -i -f [EMAIL PROTECTED]" Can anyone give me a hint? Please CC me as I am not currently subscribed. Thanks, Joe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Pine config
[ straying even more off-topic... ] > It's doing this as a favor to you. If it displayed the "From" you'd know > less about the message than you know this way. I replied to Michael off-list, but since this popped up again... Pine uses a value called 'index-format' (configurable in the main config screen) to determine how and what to display for your email. Each piece of information (date, subject, author, etc...) that shows up in your index is represented by a 'token'. Pine has a stock set of tokens that it uses, but you can change the format to appear however you want. The default token is 'FROMORTO', which displays the 'from' address, unless 'From' is one of your own addresses (defined in pine's "alt-addresses" list); then it displays the 'To' value. To change this, simply define your own index-format, and use the 'FROM' token instead of 'FROMORTO'. More info is available by going to Pine's config screen (m, s, c), searching for 'index-format' (w index-format ), and hitting CTRL-G to bring up the help. HTH! -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] need some help on stratagy... (php/mysql/javascript)
I have an embedded object in my webpage which will play a DVD movie right in the page (provided you have a disc in teh dvdrom drive). One of the javascript methods attached to this object returns the current time. OK, on to the php/mysql part. I have a mysql database which has a table to catalog camera shots digramed like so: ___ |*shot_num| | start_time| | end_time | |__| * = primary key During play, I have a javascript function which continuously gets teh current time and puts it in an input field called cur_time (clever huh?). So my question is... what is the best way to have a second field called shot_num which is continuously changing? It can't be good to query the database continuously, even if it is a small query, can it? What is a good stratagy to work with here? I'm still a bit of a novice with php/mysql, so be gentle. Thanks Alex Ross [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] control structure question
is there a more programmatically elegant way of saying... $isError = ""; function main() { doStep1(); if (!$isError) { doStep2(); } if (!$isError) { doStep3(); } // etc. etc. } function doStep1() { if ($something) { $isError = 1; } } function doStep2() { if ($something) { $isError = 1; } } _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] control structure question
For steps and sequences, I always use switches. Most commonly associated with the "action" variable, it would look like this: switch($action) { default: // what to show if no variable exists, or is set to a value // that is not acceptable below break; case "add_file": // what to do in the even that a file needs to be added // to the database. break; case "remove_file": // what to do in the even that a file need sto be removed // from the database. break; } Basically, whatever the value of $action, that is what section of code will execute. Hope that helps! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ >>> "Javier Montserat" <[EMAIL PROTECTED]> 07/23/02 10:03AM >>> is there a more programmatically elegant way of saying... $isError = ""; function main() { doStep1(); if (!$isError) { doStep2(); } if (!$isError) { doStep3(); } // etc. etc. } function doStep1() { if ($something) { $isError = 1; } } function doStep2() { if ($something) { $isError = 1; } } _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- 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] PHP 4.2.2 install woe: cannot stat libs/libphp.so
I tried to upgrade from PHP 4.2.1 to 4.2.2 due to the security bug announce in the web site. When I do make install, it stopped with errors. The following are the last few lines from the output: [activating module `php4' in /usr/local/apache/conf/httpd.conf] cp libs/libphp4.so /usr/local/apache/libexec/libphp4.so cp: cannot stat `libs/libphp4.so': No such file or directory apxs:Break: Command failed with rc=1 make[1]: *** [install-sapi] Error 1 make[1]: Leaving directory `/usr/src/php-4.2.2' make: *** [install-recursive] Error 1 When I checked the directory libs, there are only files libphp4.a libphp4.la I tried to make symlink called libphp4.so to one of this files, and then the make install run without error. But then when I started my apache, it gives me: bash $> /usr/local/apache/bin/apachectl start Syntax error on line 205 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: /usr/local/apache/libexec/libphp4.so: invalid ELF header /usr/local/apache/bin/apachectl start: httpd could not be started Any help on this would be greatly appreciated. Thanks in advance. Reuben D. Budiardja -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] control structure question
So refering back, i re-wrote the original example using the switch syntax... switch (true) { case doStep1(): case doStep2(): case doStep3(): error(); break; default: valid(); } Each case expressions is evaluated, until one of them evaluates to a value equal (==) to the switch expression (in this case a boolean error flag). The error() code will only be called if one of the doStep() evaluates to false. And the valid() code will only be evaluated if the switch reached the default, which means that none of the above check returned false I think for this example the switch syntax is more elegant than using a series of if() statements. Thanks, Javier >For steps and sequences, I always use switches. Most commonly associated >with the "action" variable, it would look like this: > >switch($action) { >default: > // what to show if no variable exists, or is set to a value > // that is not acceptable below >break; >case "add_file": > // what to do in the even that a file needs to be added > // to the database. >break; >case "remove_file": > // what to do in the even that a file need sto be removed > // from the database. >break; >} > >Basically, whatever the value of $action, that is what section of code will >execute. Hope that helps! > >Martin Clifford >Homepage: http://www.completesource.net >Developer's Forums: http://www.completesource.net/forums/ > > > >>> "Javier Montserat" <[EMAIL PROTECTED]> 07/23/02 10:03AM >>> >is there a more programmatically elegant way of saying... > >$isError = ""; > >function main() { > > doStep1(); > > if (!$isError) { > doStep2(); > } > > if (!$isError) { > doStep3(); > } > // etc. etc. >} > >function doStep1() { > if ($something) { > $isError = 1; > } >} > >function doStep2() { > if ($something) { > $isError = 1; > } >} > >_ >Join the world's largest e-mail service with MSN Hotmail. >http://www.hotmail.com > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php benchmarking suite
Is anyone aware of a php benchmarking suite comparable in functionality to perls Benchmark.pm? // George Schlossnagle // Principal Consultant // OmniTI, Inc http://www.omniti.com // (c) 240.460.5234 (e) [EMAIL PROTECTED] // 1024D/1100A5A0 1370 F70A 9365 96C9 2F5E 56C2 B2B9 262F 1100 A5A0 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using PHP with MySQL - Can I supress MySQL errors?
Hi, I'm using PHP to connect and perform queries with a MySQL database. I've noticed that it there is an error performing certain commands like 'mysql_connect()', I'll get a warning message in the browser. I'd like to suppress these messages as I am storing the error, mysql_error(), in an array. So if there is an error, I would simply display the contents of the array in a nice format. Is this possible? Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: OO Programming - get practical
> "Paul" == Paul Dionne <[EMAIL PROTECTED]> writes: [. . .] Paul> So, I guess my point is that if people want to encourage use Paul> of OO programming, they need to use more examples in their Paul> books instead of what is "easy." [. . .] then again there is the time honored tradition of reading code. this is really not as hard as it seems. may i recommend this link? http://phpclasses.optip.com/browse.html/browse.html i'm sure that if you look around, you can find others. php is everywhere. -- When the birdcage is open, | donate to causes I care about: the selfish bird flies away, |http://svcs.affero.net/rm.php?r=leed_25 but the virtuous one stays. | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using PHP with MySQL - Can I supress MySQL errors?
You can suppress the error messages of ANY function by placing an @ in front of the function call: @mysql_connect('blah') $result = @mysql_query($sql); etc etc Justin French on 24/07/02 2:08 AM, DonPro ([EMAIL PROTECTED]) wrote: > Hi, > > I'm using PHP to connect and perform queries with a MySQL database. I've > noticed that it there is an error performing certain > commands like 'mysql_connect()', I'll get a warning message in the browser. > > I'd like to suppress these messages as I am storing the error, mysql_error(), > in an array. So if there is an error, I would simply > display the contents of the array in a nice format. > > Is this possible? > > Thanks, > Don > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML vs. PHP manual???
I read the useful document about XML in PHP on http://www.analysisandsolutions.com/code/phpxml.html. I still haven't made much progress on XML. I'm still confuse about XML. I had to write XML stuffs on the client-side with the build-in XML request and it doesn't make sense that the client brower should be communicating to credit bureau network without going to my company's PHP webserver to that credit bureau. So, it meant I have to use the post request that would send the data to my company's PHP webserver and somehow convert it into xml and send it to that credit bureau by cURL. Is there a way to do that?? Thanks, FletchSOD P.S. Is there a good XML / PHP manual for that? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP Security Advisory: Vulnerability in PHP versions 4.2.0
I don't know how to appy patches to the PHP software. I just finish upgrading the website to work with PHP 4.2.1 from PHP 4.0.6. And now this So, just patched it then configure openssl, mycrypt, curl, modssl then do the usual stuff for PHP then apache, right?? "Adam Alkins" <[EMAIL PROTECTED]> wrote in message 050a01c231c2$d483f770$aa9303c4@alkins">news:050a01c231c2$d483f770$aa9303c4@alkins... > Any real programmer should know that almost nothing is bug free, even if you > test it beyond your imagination. Something is always going to elude you and > be found by someone experimenting down the road. > > For the widespread use of PHP, I'm rather impressed by the small amount of > vunerabilities discovered in PHP so far. > > Some humans are just never ever satisfied... > > -- > Adam Alkins > http://www.rasadam.com > -- > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using PHP with MySQL - Can I supress MySQL errors?
On Tuesday, July 23, 2002, DonPro wrote: > I've noticed that it there is an error performing certain commands > like 'mysql_connect()' > I'd like to suppress these messages as I am storing the error, > mysql_error(), in an array. So if there is an error, I would simply > display the contents of the array in a nice format. Assuming I understand you correctly, to surpress errors from PHP functions simply put an '@' symbol before the function. This will surpress the error message from PHP but will still execute your 'or' statement, storing the message in your array, e.g.: $result = @mysql_connect('blah','blah','blah') or some_error_function(); or I guess you could also do: $result = @mysql_connect('blah','blah','blah'); if (!$result) { $error_array[] = mysql_error(); ... } -- Tim Fountain ([EMAIL PROTECTED]) http://www.tfountain.co.uk/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sessions
You forgot the session_start(); call. You will have to do that before you can tap into registered vars. Hope that helps. Jas "Alexander Ross" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm trying to understand sessions so I can set session variables. I set up 2 > very simple pages: > > Page 1: > > session_start(); > $test_var = "froggy"; > session_register('test_var'); > ?> > Click here > > > Page 2: > > print $test_var."!"; > ?> > > > This doesn't seem to work though. $test_var doesn't seem to have a value > when I go the second page. What am I missing. Thanks for helping a newbie. > > Alex > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: OO Programming - get practical
If i can suggest... I'm working on a project for the Quebec Junior Major Hockey league and i found out that objects can be quite usefull in a large scale web application like this one. What i am doing is an object that connects to the database and stores pertinent information into it. Also, i have other objects called collections which read from the database in an uniform way. My junior programmers here don't understand the basics of OOP but they do like it, because it simplifies their work. They just need to know the object methods and properties, how to use it and they do. They don't even have to do complex request to the database anymore, all my objects do it for them. My point is, OOP is great and it INDEED should be pushed much much more into our common day programming of anything, should it be webapps or normal executables. If anyone is interested in developping a package of classes that could greatly benefit SQL Reading/Writting and Data manipulation i'd be ready to invest some time into it with other people so we can create a completly standalone reader/writter class for any situation, table and fields. That would be great. (BTW, i'm on php4 and mysql, but welcome to new technologies like Orable<->php and ODBC<->php) Insane Coder (Or almost insane =P) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML vs. PHP manual???
On Tue, Jul 23, 2002 at 12:33:19PM -0400, Scott Fletcher wrote: > I read the useful document about XML in PHP on > http://www.analysisandsolutions.com/code/phpxml.html. Thanks. But, you mean: http://www.analysisandsolutions.com/code/phpxml.htm > I had to write XML > stuffs on the client-side with the build-in XML request and it doesn't make > sense that the client brower should be communicating to credit bureau > network without going to my company's PHP webserver to that credit bureau. Programs do what you tell them to do. If you write something on the client and then tell it to get data from (or send data to) the credit bureau, why would you expect it to communicate with your server? If you want it to send/receive from your server, then you need to tell the program to do that. Also, PHP is a server side language, so, if you wrote something client side, what language did you write it in and you might be better off asking on a list for that language. > So, it meant I have to use the post request that would send the data to my > company's PHP webserver and somehow convert it into xml and send it to that > credit bureau by cURL. Is there a way to do that?? Sure. Make an HTML form on your server where users type in the input. You need to then design a script that handles the data the users submit. I don't know how you want the data formatted nor how data gets submitted to your credit bureau, so I can't state anything specific on the remaining steps. Anyway, when you're writing your HTML form in the first step, the action attribute in the tag should lead to that second script you made. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [ANNOUNCE] PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and4.2.1
Very cute! "Upgrade Now!" It will work well with PHP newbies. Not! "Richard Lynch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > >Not being an expert in php..i couldnt understand the vulnerability. > >Can someone shed some light here. > > Very short explanation: > > Upgrade. > Now! > > Longer one: > > If your web-site has *ANY* FORM tags on it, and you have PHP > ready-and-waiting to process those FORMs, then somebody could manage to > create a really icky FORM page and POST to your site and break in. > > Actually, even if you do *NOT* have the FORM tags, but you're "allowing" > them in httpd.conf, and PHP is there, they could break in. > > Presumably the precise details of what you'd have to slam into the FORM to > break in are simply too complex to fit into an Announcement of this nature. > I imagine the Details could be dug out of Bugtrak and/or wherever the bug > was first announced/discussed. Presumably PHP-Dev and e-matters would be > good places to start digging for gory details. > > If Upgrading is impossible, *AND* you don't use FORMs with PHP in the first > place (highly unlikely) than you could just "turn off" POST (forms) in your > httpd.conf and nobody will be allowed to POST (send a form) anything to your > web-site, and then PHP won't ever see the data, since Apache stopped them, > and the bug wouldn't kick in. > > Upgrade. > Now! > > -- > Like Music? http://l-i-e.com/artists.htm > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using PHP with MySQL - Can I supress MySQL errors?
Put an ampersat symbol (@) in front of the function name to suppress errors. $link = @mysql_connect("host", "user", "pass"); Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ >>> "DonPro" <[EMAIL PROTECTED]> 07/23/02 12:08PM >>> Hi, I'm using PHP to connect and perform queries with a MySQL database. I've noticed that it there is an error performing certain commands like 'mysql_connect()', I'll get a warning message in the browser. I'd like to suppress these messages as I am storing the error, mysql_error(), in an array. So if there is an error, I would simply display the contents of the array in a nice format. Is this possible? Thanks, Don -- 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] How to patch PHP 4.2.2 to PHP 4.2.1?
Sorry about the old posting, didn't realize it was a yesterday posting. Anyway, how do I apply the patch, php 4.2.2 to php 4.2.1?? I never done it before and yes, lots, lots of webpages use POST method. Isn't stress great? Thanks FletchSOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP Security Advisory: Vulnerability in PHP versions 4.2.0
Amended to this recent posting. Already started a new posting from scratch. "Scott Fletcher" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I don't know how to appy patches to the PHP software. I just finish > upgrading the website to work with PHP 4.2.1 from PHP 4.0.6. And now > this So, just patched it then configure openssl, mycrypt, curl, modssl > then do the usual stuff for PHP then apache, right?? > > "Adam Alkins" <[EMAIL PROTECTED]> wrote in message > 050a01c231c2$d483f770$aa9303c4@alkins">news:050a01c231c2$d483f770$aa9303c4@alkins... > > Any real programmer should know that almost nothing is bug free, even if > you > > test it beyond your imagination. Something is always going to elude you > and > > be found by someone experimenting down the road. > > > > For the widespread use of PHP, I'm rather impressed by the small amount of > > vunerabilities discovered in PHP so far. > > > > Some humans are just never ever satisfied... > > > > -- > > Adam Alkins > > http://www.rasadam.com > > -- > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] suscribe
--- Eynar Alberto Gaitán Rivas. Sysop Tiempos Nicaragua, S.A. Managua, Nicaragua Tel. 268-2945 ext. 22 http://www.tdm.com.ni [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Apache 2 support broken?
With php 4.2.2 I get this when trying to compile with apache 2 support: Making all in apache2filter /bin/sh /usr/local/download/apache/php-4.2.2/libtool --silent --mode=compile gcc -I. -I/usr/local/download/apache/php-4.2.2/sapi/apache2filter -I/usr/local/download/apache/php-4.2.2/main -I/usr/local/download/apache/php-4.2.2 -I/usr/site/include -I/usr/local/download/apache/php-4.2.2/Zend -I/usr/local/include -I/usr/local/pgsql/include -I/usr/local/download/apache/php-4.2.2/ext/xml/expat -D_REENTRANT -D_THREAD_SAFE -I/usr/local/download/apache/php-4.2.2/TSRM -I/usr/local/include/pth -g -O2 -pthread -DZTS -prefer-pic -c php_functions.c php_functions.c:93: syntax error *** Error code 1 Stop in /usr/local/download/apache/php-4.2.2/sapi/apache2filter. *** Error code 1 Stop in /usr/local/download/apache/php-4.2.2/sapi/apache2filter. *** Error code 1 Stop in /usr/local/download/apache/php-4.2.2/sapi. *** Error code 1 I grabbed a CVS version of PHP and during configure it lets me know that I need apache 2.0.40 -- since the latest release of Apache 2 is 2.0.39 I'm not sure what to do there.. Does that mean the latest apache 2 devel source? Someone toss me a clue stick please! -Mitch -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML vs. PHP manual???
Ha ha, I'm so used to "html" instead of "htm". :-) It have been my thought that I write a script as a post method to send data to the server then have hte PHP webserver do the dirty work. I haven't figure out how to get PHP to put in the xml stuffs into the data and send it to the credit bureau. The documentation said the data need to be in XML format when sending and receiving the data. Before, I use the serial stream of data with the format setting according to the guideline in the manual I got from the credit bureau. Well, we don't want the customer to access that credit bureau site since they aren't a programmer, just somebody who want to see the inquiries. Lots of them don't know how to use SSLs. It doesn't seem to be a good idea to create a software and give it to the customers. Also, throught the server can I be able to tell if the data is a hit or not a hit, whether the add-on stuffs being used or not, etc. The person name in the inquiry, all together, would I be able to put into the database for billing purpose. FletchSOD "Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Tue, Jul 23, 2002 at 12:33:19PM -0400, Scott Fletcher wrote: > > I read the useful document about XML in PHP on > > http://www.analysisandsolutions.com/code/phpxml.html. > > Thanks. But, you mean: > > http://www.analysisandsolutions.com/code/phpxml.htm > > > > I had to write XML > > stuffs on the client-side with the build-in XML request and it doesn't make > > sense that the client brower should be communicating to credit bureau > > network without going to my company's PHP webserver to that credit bureau. > > Programs do what you tell them to do. If you write something on the > client and then tell it to get data from (or send data to) the credit > bureau, why would you expect it to communicate with your server? > > If you want it to send/receive from your server, then you need to tell the > program to do that. > > Also, PHP is a server side language, so, if you wrote something client > side, what language did you write it in and you might be better off asking > on a list for that language. > > > > So, it meant I have to use the post request that would send the data to my > > company's PHP webserver and somehow convert it into xml and send it to that > > credit bureau by cURL. Is there a way to do that?? > > Sure. Make an HTML form on your server where users type in the input. > > You need to then design a script that handles the data the users submit. > I don't know how you want the data formatted nor how data gets submitted > to your credit bureau, so I can't state anything specific on the remaining > steps. > > Anyway, when you're writing your HTML form in the first step, the action > attribute in the tag should lead to that second script you made. > > --Dan > > -- >PHP classes that make web design easier > SQL Solution | Layout Solution | Form Solution > sqlsolution.info | layoutsolution.info | formsolution.info > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help installing Apache please
Hi, Someone please tell me how to install apache on redhat linux. -Varsha __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [ANNOUNCE] PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and4.2.1
On Wednesday 24 July 2002 01:01, Scott Fletcher wrote: > Very cute! "Upgrade Now!" It will work well with PHP newbies. Not! If 'PHP newbies' aren't able to perform the upgrade themselves, they should ask someone who can. If it was the 'PHP newbies' who originally did the php installation then the upgrade is just a matter of repeating the same steps as the original installation. There's nothing difficult about. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Hash table has woodworm */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help installing Apache please
On Wednesday 24 July 2002 01:22, Varsha Agarwal wrote: > Hi, > Someone please tell me how to install apache on redhat > linux. This is neither an Apache list, nor a Redhat list. Best ask on the relevant list. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Pyros of the world... IGNITE !!! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP OOP list
Is there a newsgroup list for PHP and OOP? It would be great to split up this large topic and create an OOP specific list. InsaneCoder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: PHP Security Advisory: Vulnerability in PHP versions 4.2.0
> From: Scott Fletcher [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 23, 2002 12:43 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Re: PHP Security Advisory: Vulnerability > in PHP versions 4.2.0 > > > I don't know how to appy patches to the PHP software. I just finish > upgrading the website to work with PHP 4.2.1 from PHP 4.0.6. And now > this So, just patched it then configure openssl, > mycrypt, curl, modssl > then do the usual stuff for PHP then apache, right?? Rebuilding from source: 1. download the new php source, extract it to whereever you do. 2. cd to php-4.2.2 copy config.nice from your existing php compile dir (this has your previous complies config command). 3. Run it: ./config.nice 4. make 5. apachectl stop 6. make install 7a. i. If php is a DSO: ii. apachectl start (you're done) 7b. i. If php is compiled into apache: ii. cd to apache compile dir iii. make clean iv. ./config.status v. make vi. make install vii. apachectl start (you're done) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP OOP list
Try http://www.phpclasses.org; Warren Vail Tools, Metrics & Quality Processes (415) 667-7814 Pager (877) 774-9891 215 Fremont 02-658 -Original Message- From: Mathieu Dumoulin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 10:36 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP OOP list Is there a newsgroup list for PHP and OOP? It would be great to split up this large topic and create an OOP specific list. InsaneCoder -- 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] Oracle persistent connection limit
Is there a way to limit the total number of persistent connection to an oracle database? I know this functionality exists for MySQL through a setting in the php.ini but I haven't found it for oracle. I am in an environment where we have about 10 users that connect to oracle from each of 10 webservers that each have about 20 apache processes and I would like to use persistent connections but the resulting 2000 connections would overwhelm oracle. I am looking at reducing the number of users but that will be a large undertaking to go through the entire codebase. Any ideas? Eric -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Script Testing Portal Connections...
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 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. ..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] Credit card checks?
Just wondering if anyone has come across the need to develop a class to test a string of numbers based on a credit card type. If you have where would I be able to get information on what string of numbers is consistent with each of the different credit cards? Any help would be appreciated! Jas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions4.2.0 and 4.2.1
Well, I'm not sure about the 'you get what you pay for'. Some paid for software has less support and documentation than PHP! "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Greg, > > Your attitude stinks. > > PHP is a FREE scripting language. Think about the amount of money you are > probably charging hosting clients, or charging in web or programming > services, or making in site revenue, or whatever way you 'commercially > function' through PHP. > > The register globals 'imposition' IS more secure and encourages better > coding practices... would you prefer they made the change now, or in 5 years > when you have 100's more sites to fix. Better late than later. > > > If you want something that will never have a bug, never have a security > hole, performs perfectly from day 1, never has an upgrade/change, and will > never change for the better, you are utterly dreaming! > > The difference in this case is that the PHP Group aren't emptying your > wallet. > > > Sorry to hear that you'll have to do some more upgrading, but I'd keep the > complaining to yourself -- "you get what you pay for" springs to mind, but > in the case of PHP, we get a whole lot more. > > > Justin French > > > > > > > > > > on 23/07/02 2:55 AM, Greg Donald ([EMAIL PROTECTED]) wrote: > > > Not only did I get to re-write all my apps the past few months because of > > the new register_globals default that was imposed by `the php group`... > > > > Now I get to upgrade my PHP install once a month or so cause of new > > security holes.. Yay! > > > > Wasn't this new register_globals setting supposed to enhance security? > > > > How would you like to be a sys admin with dozens of machines to upgrade > > before you can proceed with anythign else? > > > > Can anyone say Ruby? > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit card checks?
Try this: http://www.AnalysisAndSolutions.com/code/ccvs-ph.htm Rick A sense of humor can help you over look the unattractive, tolerate the unpleasant, cope with the unexpected, and smile through the unbearable. - Moshe Waldoks > From: "Jas" <[EMAIL PROTECTED]> > Date: Tue, 23 Jul 2002 12:09:48 -0600 > To: [EMAIL PROTECTED] > Subject: [PHP] Credit card checks? > > Just wondering if anyone has come across the need to develop a class to test > a string of numbers based on a credit card type. If you have where would I > be able to get information on what string of numbers is consistent with each > of the different credit cards? Any help would be appreciated! > Jas > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 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
RE: [PHP] Re: does this mean ....
popen() opens a named pipe to a program - you can read and write to it if the program you're piping to supports that kind of interactivity (mostly you just read the output from the command). However, in this case, I don't think you want either popen() or fopen() (certainly not fopen() - that just opens a file and that's not at all what you want). You can use a system call or just backticks around the call to useradd (if it's on the same server as your web server). If it's not, you'll have to use sockets and or xmlrpc or some other messaging service. BUT...you probably know that useradd requires root privs. So you either have your webserver running as root (a really really bad idea), or you have it configured to allow suid programs or you have useradd as suid root - also not really good ideas. Maybe you want to take a look at a program called Webmin (http://www.webmin.com/) that already does what you are talking about. I haven't used it for several years, but as I remember, it was a pretty handy tool. ..mike.. On Mon, 2002-07-22 at 17:56, Peter wrote: > > > i'm tring to run the useradd command (under Solaris) to add a user to the > system so i don't have to continueously remote log in and also make it > easier for myself to add users to the system(s).. maybe popen isn't the best > option for this .. though i don't think fopen will be able to do what i need > it to do.. maybe playing around with sockets would be better? > > > Cheers > > Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Oracle persistent connection limit
On Tue, Jul 23, 2002 at 11:00:43AM -0700, Eric Thelin wrote: > Is there a way to limit the total number of persistent connection to an > oracle database? I know this functionality exists for MySQL through a > setting in the php.ini but I haven't found it for oracle. I am in an > environment where we have about 10 users that connect to oracle from > each of 10 webservers that each have about 20 apache processes and I > would like to use persistent connections but the resulting 2000 > connections would overwhelm oracle. I am looking at reducing the number > of users but that will be a large undertaking to go through the entire > codebase. Any ideas? even the mysql-limits are _per_ apache-process. so if you want to limit the simutainious connections to any php supported database is to set MaxClients (in httpd.conf) or disable persistent connections completely. re, tc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Filename is nothing
Basic scenario. There's really nothing else to tell except for that. I'm trying to upload a file via a TYPE=FILE control in a form. When I press submit, my $uploadedfile is what it should be, but my $uploadedfile_name is blank. So is my $uploadedfile_size. Any reason? __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Oracle persistent connection limit
That is what I figured. The problem is that oracle doesn't even seem to have per-process limits. Eric On Tue, 23 Jul 2002, Thies C. Arntzen wrote: > On Tue, Jul 23, 2002 at 11:00:43AM -0700, Eric Thelin wrote: > > Is there a way to limit the total number of persistent connection to an > > oracle database? I know this functionality exists for MySQL through a > > setting in the php.ini but I haven't found it for oracle. I am in an > > environment where we have about 10 users that connect to oracle from > > each of 10 webservers that each have about 20 apache processes and I > > would like to use persistent connections but the resulting 2000 > > connections would overwhelm oracle. I am looking at reducing the number > > of users but that will be a large undertaking to go through the entire > > codebase. Any ideas? > > even the mysql-limits are _per_ apache-process. so if you > want to limit the simutainious connections to any php > supported database is to set MaxClients (in httpd.conf) or > disable persistent connections completely. > > re, > tc > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit card checks?
You should contact Visa International Service Association to determine what constitues a "valid" credit card number. Just FYI, a valid format is 16 digits; ---. I believe VISA normally begins with "41" as the first two digits, however, I am not a Visa Int. agent but I am a client. Ultimately, you would need a merchant account to verify its validity, AFTER you have verified its format for accuracy. HTH Kris Jas wrote: >Yeah, I have looked at that class file and I don't want someone elses >example to use, I want to build my own but have no way of knowing what makes >up a valid visa number etc >Jas > >"Richard Baskett" <[EMAIL PROTECTED]> wrote in message >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > >>Try this: >> >>http://www.AnalysisAndSolutions.com/code/ccvs-ph.htm >> >>Rick >> >>A sense of humor can help you over look the unattractive, tolerate the >>unpleasant, cope with the unexpected, and smile through the unbearable. - >>Moshe Waldoks >> >> >> >>>From: "Jas" <[EMAIL PROTECTED]> >>>Date: Tue, 23 Jul 2002 12:09:48 -0600 >>>To: [EMAIL PROTECTED] >>>Subject: [PHP] Credit card checks? >>> >>>Just wondering if anyone has come across the need to develop a class to >>> >>> >test > > >>>a string of numbers based on a credit card type. If you have where >>> >>> >would I > > >>>be able to get information on what string of numbers is consistent with >>> >>> >each > > >>>of the different credit cards? Any help would be appreciated! >>>Jas >>> >>> >>> >>>-- >>>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: Filename is nothing
Check to make sure that your FORM tag has: enc-type=multpart-formdata i had SO much trouble finding this out. hope it helps ya InsaneCoder "Liam Gibbs" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Basic scenario. There's really nothing else to tell > except for that. > > I'm trying to upload a file via a TYPE=FILE control in > a form. When I press submit, my $uploadedfile is what > it should be, but my $uploadedfile_name is blank. So > is my $uploadedfile_size. Any reason? > > __ > Do You Yahoo!? > Yahoo! Health - Feel better, live better > http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit card checks?
So there is no way to use some sort of string comparison to check the number then? I would have to have a merchant account? Sorry for being nieve, just never tried to work with credit card numbers etc. Jas "Kristopher Yates" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > You should contact Visa International Service Association to determine > what constitues a "valid" credit card number. Just FYI, a valid format > is 16 digits; ---. I believe VISA normally begins with > "41" as the first two digits, however, I am not a Visa Int. agent but I > am a client. Ultimately, you would need a merchant account to verify its > validity, AFTER you have verified its format for accuracy. HTH Kris > > Jas wrote: > > >Yeah, I have looked at that class file and I don't want someone elses > >example to use, I want to build my own but have no way of knowing what makes > >up a valid visa number etc > >Jas > > > >"Richard Baskett" <[EMAIL PROTECTED]> wrote in message > >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > > >>Try this: > >> > >>http://www.AnalysisAndSolutions.com/code/ccvs-ph.htm > >> > >>Rick > >> > >>A sense of humor can help you over look the unattractive, tolerate the > >>unpleasant, cope with the unexpected, and smile through the unbearable. - > >>Moshe Waldoks > >> > >> > >> > >>>From: "Jas" <[EMAIL PROTECTED]> > >>>Date: Tue, 23 Jul 2002 12:09:48 -0600 > >>>To: [EMAIL PROTECTED] > >>>Subject: [PHP] Credit card checks? > >>> > >>>Just wondering if anyone has come across the need to develop a class to > >>> > >>> > >test > > > > > >>>a string of numbers based on a credit card type. If you have where > >>> > >>> > >would I > > > > > >>>be able to get information on what string of numbers is consistent with > >>> > >>> > >each > > > > > >>>of the different credit cards? Any help would be appreciated! > >>>Jas > >>> > >>> > >>> > >>>-- > >>>PHP General Mailing List (http://www.php.net/) > >>>To unsubscribe, visit: http://www.php.net/unsub.php > >>> > >>> > >>> > > > > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit card checks?
Visa starts with 45 Mastercard starts with 51 =P InsaneCoder "Kristopher Yates" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > You should contact Visa International Service Association to determine > what constitues a "valid" credit card number. Just FYI, a valid format > is 16 digits; ---. I believe VISA normally begins with > "41" as the first two digits, however, I am not a Visa Int. agent but I > am a client. Ultimately, you would need a merchant account to verify its > validity, AFTER you have verified its format for accuracy. HTH Kris > > Jas wrote: > > >Yeah, I have looked at that class file and I don't want someone elses > >example to use, I want to build my own but have no way of knowing what makes > >up a valid visa number etc > >Jas > > > >"Richard Baskett" <[EMAIL PROTECTED]> wrote in message > >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > > >>Try this: > >> > >>http://www.AnalysisAndSolutions.com/code/ccvs-ph.htm > >> > >>Rick > >> > >>A sense of humor can help you over look the unattractive, tolerate the > >>unpleasant, cope with the unexpected, and smile through the unbearable. - > >>Moshe Waldoks > >> > >> > >> > >>>From: "Jas" <[EMAIL PROTECTED]> > >>>Date: Tue, 23 Jul 2002 12:09:48 -0600 > >>>To: [EMAIL PROTECTED] > >>>Subject: [PHP] Credit card checks? > >>> > >>>Just wondering if anyone has come across the need to develop a class to > >>> > >>> > >test > > > > > >>>a string of numbers based on a credit card type. If you have where > >>> > >>> > >would I > > > > > >>>be able to get information on what string of numbers is consistent with > >>> > >>> > >each > > > > > >>>of the different credit cards? Any help would be appreciated! > >>>Jas > >>> > >>> > >>> > >>>-- > >>>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] Certificate information using php?
Hi! I have a challenging part to this project. Let's say the PHP webserver establish a connection to a different website and received the ssl connection from there. How do I get the certificate information from that website and display it? I can use print_r($GLOBALS) but it only display the certificate from this PHP webserver. So, how do I get the certificate information from that website?? Thanks, FletchSOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] secure sockets
I'm trying to connect to a Java application that's listening on a socket using SSL. I am trying to use fsockopen with the address beginning with ssl://, but it doesn't work. There's no error message that I can find, it just doesn't create the file-handler. Here's some sample code: That returns: Warning: fwrite(): supplied argument is not a valid File-Handle resource in /usr/home/research/htdocs/tests/secure.php on line 8 Warning: fgets(): supplied argument is not a valid File-Handle resource in /usr/home/research/htdocs/tests/secure.php on line 10 0 Warning: fclose(): supplied argument is not a valid File-Handle resource in /usr/home/research/htdocs/tests/secure.php on line 20 Thanks in advance for any help, Josh Levine -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apache 2 support broken?
Here's how to get it to work (thanks to somebody on Google Groups)... 1. Open up the file php_functions.c in /sapi/apache2filter/ 2. Change MODULE_MAGIC_AT_LEAST to AP_MODULE_MAGIC_AT_LEAST (Note the addition of "AP_") 3. Save the php_functions.c file and try running configure again -- Aaron Gould [EMAIL PROTECTED] Web Developer - Original Message - From: "Mitch Vincent" <[EMAIL PROTECTED]> To: "php-general" <[EMAIL PROTECTED]> Sent: Tuesday, July 23, 2002 1:16 PM Subject: [PHP] Apache 2 support broken? > With php 4.2.2 I get this when trying to compile with apache 2 support: > > Making all in apache2filter > /bin/sh /usr/local/download/apache/php-4.2.2/libtool --silent --mode=compile > gcc -I. -I/usr/local/download/apache/php-4.2.2/sapi/apache2filter > -I/usr/local/download/apache/php-4.2.2/main > -I/usr/local/download/apache/php-4.2.2 -I/usr/site/include > -I/usr/local/download/apache/php-4.2.2/Zend -I/usr/local/include > -I/usr/local/pgsql/include > -I/usr/local/download/apache/php-4.2.2/ext/xml/expat -D_REENTRANT > -D_THREAD_SAFE -I/usr/local/download/apache/php-4.2.2/TSRM > -I/usr/local/include/pth -g -O2 -pthread -DZTS -prefer-pic -c > php_functions.c > php_functions.c:93: syntax error > *** Error code 1 > > Stop in /usr/local/download/apache/php-4.2.2/sapi/apache2filter. > *** Error code 1 > > Stop in /usr/local/download/apache/php-4.2.2/sapi/apache2filter. > *** Error code 1 > > Stop in /usr/local/download/apache/php-4.2.2/sapi. > *** Error code 1 > > > I grabbed a CVS version of PHP and during configure it lets me know that I > need apache 2.0.40 -- since the latest release of Apache 2 is 2.0.39 I'm not > sure what to do there.. Does that mean the latest apache 2 devel source? > > Someone toss me a clue stick please! > > -Mitch > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit card checks?
Yeah, I have looked at that class file and I don't want someone elses example to use, I want to build my own but have no way of knowing what makes up a valid visa number etc Jas "Richard Baskett" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Try this: > > http://www.AnalysisAndSolutions.com/code/ccvs-ph.htm > > Rick > > A sense of humor can help you over look the unattractive, tolerate the > unpleasant, cope with the unexpected, and smile through the unbearable. - > Moshe Waldoks > > > From: "Jas" <[EMAIL PROTECTED]> > > Date: Tue, 23 Jul 2002 12:09:48 -0600 > > To: [EMAIL PROTECTED] > > Subject: [PHP] Credit card checks? > > > > Just wondering if anyone has come across the need to develop a class to test > > a string of numbers based on a credit card type. If you have where would I > > be able to get information on what string of numbers is consistent with each > > of the different credit cards? Any help would be appreciated! > > Jas > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit card checks?
Correct. Your first "parsing" of the credit card number could be done by the web server, just to check its length and format: you could use strlen() function in PHP to count the digits, to verify it is correct. You could strip the dashes with ereg_replace("-", "", $credit_card_number) then count its length. To actually verify that the card submitted is a number assigned by VISA, your system would have to connect via LinkPoint, AuthorizeNet, or a service like that. They do address comparisson, bank assigner id comparison, and much much more. Without a merchant account, your PHP could only verify that it "appears" to be a valid credit card number. The only other option is to get your local bank to hook you up with a merchant account and transaction equipment, and you could just run the cards "by hand". That option doesnt sound very fun but some folks prefer doing biz that way. I dont know about AuthorizeNet, but LinkPoint has an API written in PHP that is supposed to be inexpensive, and easilly integratable into any PHP apps. I heard it was only $125.00.. Not a bad price for a few hundred lines of code. I am in no way affiliated with or trying to advertise for these companies. Hope this helps, Kris Jas wrote: >So there is no way to use some sort of string comparison to check the number >then? I would have to have a merchant account? Sorry for being nieve, just >never tried to work with credit card numbers etc. >Jas > >"Kristopher Yates" <[EMAIL PROTECTED]> wrote in message >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > >>You should contact Visa International Service Association to determine >>what constitues a "valid" credit card number. Just FYI, a valid format >>is 16 digits; ---. I believe VISA normally begins with >>"41" as the first two digits, however, I am not a Visa Int. agent but I >>am a client. Ultimately, you would need a merchant account to verify its >>validity, AFTER you have verified its format for accuracy. HTH Kris >> >>Jas wrote: >> >> >> >>>Yeah, I have looked at that class file and I don't want someone elses >>>example to use, I want to build my own but have no way of knowing what >>> >>> >makes > > >>>up a valid visa number etc >>>Jas >>> >>>"Richard Baskett" <[EMAIL PROTECTED]> wrote in message >>>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >>> >>> >>> >>> Try this: http://www.AnalysisAndSolutions.com/code/ccvs-ph.htm Rick A sense of humor can help you over look the unattractive, tolerate the unpleasant, cope with the unexpected, and smile through the >unbearable. - > > Moshe Waldoks >From: "Jas" <[EMAIL PROTECTED]> >Date: Tue, 23 Jul 2002 12:09:48 -0600 >To: [EMAIL PROTECTED] >Subject: [PHP] Credit card checks? > >Just wondering if anyone has come across the need to develop a class to > > > > >>>test >>> >>> >>> >>> >a string of numbers based on a credit card type. If you have where > > > > >>>would I >>> >>> >>> >>> >be able to get information on what string of numbers is consistent with > > > > >>>each >>> >>> >>> >>> >of the different credit cards? Any help would be appreciated! >Jas > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > > > > >>> >>> >>> >>> >>> >> >> >> > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit card checks?
Ok how's this then? http://www.beachnet.com/~hstiles/cardtype.html Don't dismiss a good idea simply because you don't like the source. - Unknown > From: "Jas" <[EMAIL PROTECTED]> > Date: Tue, 23 Jul 2002 12:33:17 -0600 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Credit card checks? > > Yeah, I have looked at that class file and I don't want someone elses > example to use, I want to build my own but have no way of knowing what makes > up a valid visa number etc > Jas > > "Richard Baskett" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> Try this: >> >> http://www.AnalysisAndSolutions.com/code/ccvs-ph.htm >> >> Rick >> >> A sense of humor can help you over look the unattractive, tolerate the >> unpleasant, cope with the unexpected, and smile through the unbearable. - >> Moshe Waldoks >> >>> From: "Jas" <[EMAIL PROTECTED]> >>> Date: Tue, 23 Jul 2002 12:09:48 -0600 >>> To: [EMAIL PROTECTED] >>> Subject: [PHP] Credit card checks? >>> >>> Just wondering if anyone has come across the need to develop a class to > test >>> a string of numbers based on a credit card type. If you have where > would I >>> be able to get information on what string of numbers is consistent with > each >>> of the different credit cards? Any help would be appreciated! >>> Jas >>> >>> >>> >>> -- >>> 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Credit card checks?
This may help with the specific formats. (And how to calculate the check digit yourself to verify) http://www.beachnet.com/~hstiles/cardtype.html Jaime Bozza -Original Message- From: Kristopher Yates [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 1:42 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Credit card checks? You should contact Visa International Service Association to determine what constitues a "valid" credit card number. Just FYI, a valid format is 16 digits; ---. I believe VISA normally begins with "41" as the first two digits, however, I am not a Visa Int. agent but I am a client. Ultimately, you would need a merchant account to verify its validity, AFTER you have verified its format for accuracy. HTH Kris Jas wrote: >Yeah, I have looked at that class file and I don't want someone elses >example to use, I want to build my own but have no way of knowing what makes >up a valid visa number etc >Jas > >"Richard Baskett" <[EMAIL PROTECTED]> wrote in message >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > >>Try this: >> >>http://www.AnalysisAndSolutions.com/code/ccvs-ph.htm >> >>Rick >> >>A sense of humor can help you over look the unattractive, tolerate the >>unpleasant, cope with the unexpected, and smile through the unbearable. - >>Moshe Waldoks >> >> >> >>>From: "Jas" <[EMAIL PROTECTED]> >>>Date: Tue, 23 Jul 2002 12:09:48 -0600 >>>To: [EMAIL PROTECTED] >>>Subject: [PHP] Credit card checks? >>> >>>Just wondering if anyone has come across the need to develop a class to >>> >>> >test > > >>>a string of numbers based on a credit card type. If you have where >>> >>> >would I > > >>>be able to get information on what string of numbers is consistent with >>> >>> >each > > >>>of the different credit cards? Any help would be appreciated! >>>Jas >>> >>> >>> >>>-- >>>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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Object problem
I just wrote this message in the wrong list so i'll be short... I have two classes: - mysql_connection - data_collection data_collection REQUIRES a mysql_connection object to work. So i decided to pass this object in the constructor for the data_collection, but when i do so it seems it creates a copy of this object and doesn't use the object i had previously created... I tried to do function data_collection(&$mysql_server){ ... } But even the & sign like they say to use on the php.net web site doesn't work, it creates a copy of the object. The only way i found to bypass this problem is to do: my_collection->mysql_server = &$mysql_server; which will assign a reference of the mysql_collection object to my collection, but this means i need to modify something like 45 files of my web site and also i have to add some init settings because they where done in the constructor where you needed the connection... please help me out!!! InsaneCoder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] parsing
Okay, I want to know if anybody has a clue which is more efficient, processorwise/parsingwise: this: -- echo "".$somevar."".$somevardesc.""; or this: -- echo "{$somevar}{$somevardesc}"; I almost always use the first method (just seems more readable to me), but with all of the discussion popping up about curly brackets, i was wondering if it really makes a difference? Any vets out there care to put in their $0.02? Dave Tichy http://sinewaves.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: parsing
try echo "$somevar$somevardesc"; which is probably better than the other two but don't quote me on that! You can just include the variables because you have used " rather than ' (I think it works for echo as well as print) "Dave At Sinewaves.Net" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Okay, > > I want to know if anybody has a clue which is more efficient, > processorwise/parsingwise: > > this: > -- > echo > "".$somevar."".$somevardesc.""; > > or this: > -- > echo "{$somevar}{$somevardesc}"; > > > I almost always use the first method (just seems more readable to me), but > with all of the discussion popping up about curly brackets, i was wondering > if it really makes a difference? Any vets out there care to put in their > $0.02? > > Dave Tichy > http://sinewaves.net/ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HELP: COM(CDO.Message)HTML vs TEXT
Greetings PHPers. For those of you with MS COM experience or those who want to know how to send a MULTI MIME type message read on. I'm trying to find out the syntax for sending an HTMLbody and TEXTbody in the same message thus making it a TRUE MULTI message. (see code) This is what I have... what am I doing wrong??? Any Clues? $message = new COM('CDO.Message'); $message->To = $myList[$i]; $message->From = '[EMAIL PROTECTED]'; $message->Subject 'My Subject Line'; $message->TEXTBody = "This is my plain Text Body!" $message->HTMLBody = "HTML STRING HERE"; $message->Send(); Do I need to declare the HTML body first? Do I have to set the AutoGeneratedTextBody property to false? Commenting out the TEXTBody line sends a auto generated text body by default, but I was hoping to be able to customize my TEXTBody with a bit more control. Your comments are always GREATLY appreciated. Thanks gang! - NorthBayShane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit card checks?
> "Kristopher" == Kristopher Yates <[EMAIL PROTECTED]> writes: [. . .] Kristopher> I dont know about AuthorizeNet, but LinkPoint has an Kristopher> API written in PHP that is supposed to be inexpensive, Kristopher> and easilly integratable into any PHP apps. I heard Kristopher> it was only $125.00.. Not a bad price for a few Kristopher> hundred lines of code. I am in no way affiliated with Kristopher> or trying to advertise for these companies. Hope this Kristopher> helps, Kris The linpoint API is, indeed, easy o integrate into a PHP app. Linkpoint's level of service could use some improvement, however. -- When the birdcage is open, | donate to causes I care about: the selfish bird flies away, |http://svcs.affero.net/rm.php?r=leed_25 but the virtuous one stays. | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HELP: COM(CDO.Message)(SOLVED!!!)
Placing the line $message->TEXTBody = "This is my plain Text Body!" AFTER your HTMLBody tag did the trick. Try it out Solved my own problem, but I hope this helps someone else out. -Original Message- From: Shane Sent: Tuesday, July 23, 2002 12:21 PM To: [EMAIL PROTECTED] Subject: [PHP] HELP: COM(CDO.Message)HTML vs TEXT Greetings PHPers. For those of you with MS COM experience or those who want to know how to send a MULTI MIME type message read on. I'm trying to find out the syntax for sending an HTMLbody and TEXTbody in the same message thus making it a TRUE MULTI message. (see code) This is what I have... what am I doing wrong??? Any Clues? $message = new COM('CDO.Message'); $message->To = $myList[$i]; $message->From = '[EMAIL PROTECTED]'; $message->Subject 'My Subject Line'; $message->TEXTBody = "This is my plain Text Body!" $message->HTMLBody = "HTML STRING HERE"; $message->Send(); Do I need to declare the HTML body first? Do I have to set the AutoGeneratedTextBody property to false? Commenting out the TEXTBody line sends a auto generated text body by default, but I was hoping to be able to customize my TEXTBody with a bit more control. Your comments are always GREATLY appreciated. Thanks gang! - NorthBayShane -- 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: parsing
> "Dave" == Dave At Sinewaves Net <[EMAIL PROTECTED]> writes: Dave> Okay, I want to know if anybody has a clue which is more Dave> efficient, processorwise/parsingwise: Dave> this: -- echo Dave> "".$somevar."".$somevardesc.""; Dave> or this: -- echo Dave> "{$somevar}{$somevardesc}"; Dave> I almost always use the first method (just seems more Dave> readable to me), but with all of the discussion popping up Dave> about curly brackets, i was wondering if it really makes a Dave> difference? Any vets out there care to put in their $0.02? I bet that this would beat the pants off of both: echo ''. $somevar . '' . $somevardesc . ''; -- When the birdcage is open, | donate to causes I care about: the selfish bird flies away, |http://svcs.affero.net/rm.php?r=leed_25 but the virtuous one stays. | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] parsing
I just benched it. If there is a difference in performance then it is too small to detect with microseconds. I'd say there's no need to parse the vars by hand unless the syntax requires it. -Kevin - Original Message - From: "Dave at Sinewaves.net" <[EMAIL PROTECTED]> To: "PHPlist" <[EMAIL PROTECTED]> Sent: Tuesday, July 23, 2002 1:01 PM Subject: [PHP] parsing > Okay, > > I want to know if anybody has a clue which is more efficient, > processorwise/parsingwise: > > this: > -- > echo > "".$somevar."".$somevardesc.""; > > or this: > -- > echo "{$somevar}{$somevardesc}"; > > > I almost always use the first method (just seems more readable to me), but > with all of the discussion popping up about curly brackets, i was wondering > if it really makes a difference? Any vets out there care to put in their > $0.02? > > Dave Tichy > http://sinewaves.net/ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] imagecolortransparent()
thanks it worked ^^ -Nick "Tom Rogers" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > Tuesday, July 23, 2002, 5:16:43 AM, you wrote: > > N> "Tom Rogers" <[EMAIL PROTECTED]> wrote in message > N> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > >> Hello Nick, > >> > >> Monday, July 22, 2002, 8:47:39 PM, you wrote: > >> > >> N> i get php to allocate a colour then make it transparent using > >> N> imagecolortransparent() > >> > >> N> instead of turning it transparent it becomes black. > >> > >> N> Is it something i'm doing wrong? can anyone help me? > >> > >> N> thanx in advance > >> > >> Post a bit of the code so we can see what you are doing > >> > >> -- > >> Tom > >> > > N> $im = imagecreate($size, 21); > > N> $bgcolour = > N> imagecolorallocate($im,hexdec(substr($table[bg],0,2)),hexdec(substr($table[b > N> g],2,2)),hexdec(substr($table[bg],4,2))); > N> $fontcolour = > N> imagecolorallocate($im,hexdec(substr($table[fg],0,2)),hexdec(substr($table[f > N> g],2,2)),hexdec(substr($table[fg],4,2))); > > N> if ($table[bg] == "no") { > N> $trans = imagecolortransparent ($im,$bgcolour); > N> } > > probably what you need is: > > $im = imagecreate($size, 21); > if ($table[bg] == "no") { >$bgcolour = imagecolorallocate($im,1,1,1); >$trans = imagecolortransparent ($im,$bgcolour); > } > else{ > $bgcolour = imagecolorallocate($im,hexdec(substr($table[bg],0,2)),hexdec(substr($table[b g],2,2)),hexdec(substr($table[bg],4,2))); > } > $fontcolour = imagecolorallocate($im,hexdec(substr($table[fg],0,2)),hexdec(substr($table[f g],2,2)),hexdec(substr($table[fg],4,2))); > > > > > > -- > Best regards, > Tom > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Drop Down Box Question
On Sun, Jul 21, 2002 at 11:43:25AM -0400, WANDA HANSEN wrote: > Is there a way to handle data gathered from a drop down menu that > allows multiple selections using PHP? Yes. The way I normally do this is to use HTML that looks something like: Red Green Blue Now in your PHP program, you can access them all with something like: \n"; } ?> -- Jason Stechschulte [EMAIL PROTECTED] http://www.ypisco.com -- History books which contain no lies are extremely dull. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: parsing
Lee, yes you're right. Using single quotes to denote a litteral string does speed things up a bit. My bench sped up by about .08 seconds over 10,000 echos. That's about 5 pages worth of text. Is .08 seconds worth worrying about? I'm gonna go out a limb here and say.. no. :) -Kevin - Original Message - From: "Lee Doolan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 23, 2002 1:40 PM Subject: [PHP] Re: parsing > > "Dave" == Dave At Sinewaves Net <[EMAIL PROTECTED]> writes: > > Dave> Okay, I want to know if anybody has a clue which is more > Dave> efficient, processorwise/parsingwise: > > Dave> this: -- echo > Dave> "".$somevar."".$somevardesc.""; > > Dave> or this: -- echo > Dave> "{$somevar}{$somevardesc}"; > > > Dave> I almost always use the first method (just seems more > Dave> readable to me), but with all of the discussion popping up > Dave> about curly brackets, i was wondering if it really makes a > Dave> difference? Any vets out there care to put in their $0.02? > > I bet that this would beat the pants off of both: > > echo ''. $somevar . '' . $somevardesc . ''; > > > -- > When the birdcage is open, | donate to causes I care about: > the selfish bird flies away, |http://svcs.affero.net/rm.php?r=leed_25 > but the virtuous one stays. | > > -- > 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] PHP creating table for HTML layout
I am hoping someone can help me with a desperate problem I am having I know nothing about PHP and hoping that it might be able to solve a problem I have with HTML tables. I want my web background to cover the entire screen regardless of screen size. The background has a header, a left side nav and a footer. I want the footer to be on the bottom of the screen or bottom of the text, which ever is greater. If you go to www.v3.aru.org.nz you will get an idea of what I'm talking about. If you are using IE 5.x or greater it should show correctly. I used the HTML table tag height=100%, however this is not a valid tag and therefore Netscape ignores it. Also if I use it it wont validate as a true complaint code, which I want it to. So can I use PHP to create a table or place the background images to create a header, side nav and footer with the middle white section adjusting to screen size. I don't want to have to greater multiple sites for different resolutions and would rather have one template that all pages call by an include statement (That's the ASP command, think I saw the same command in PHP) Any help or solution would be appreciated as I have been searching the net and working on this for weeks and I'm getting nowhere. Thanks Shane. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP creating table for HTML layout
PHP is server-side, so it can't do anything that would help with the layout of HTML on the client-side. You might want to look into Cascading Style Sheets (CSS) to format the page so that it validates the way you want it to :o) HTH! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ >>> "Briggsy" <[EMAIL PROTECTED]> 07/23/02 04:10PM >>> I am hoping someone can help me with a desperate problem I am having I know nothing about PHP and hoping that it might be able to solve a problem I have with HTML tables. I want my web background to cover the entire screen regardless of screen size. The background has a header, a left side nav and a footer. I want the footer to be on the bottom of the screen or bottom of the text, which ever is greater. If you go to www.v3.aru.org.nz you will get an idea of what I'm talking about. If you are using IE 5.x or greater it should show correctly. I used the HTML table tag height=100%, however this is not a valid tag and therefore Netscape ignores it. Also if I use it it wont validate as a true complaint code, which I want it to. So can I use PHP to create a table or place the background images to create a header, side nav and footer with the middle white section adjusting to screen size. I don't want to have to greater multiple sites for different resolutions and would rather have one template that all pages call by an include statement (That's the ASP command, think I saw the same command in PHP) Any help or solution would be appreciated as I have been searching the net and working on this for weeks and I'm getting nowhere. Thanks Shane. -- 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] Getting the day if given a date
Is there any way to get the day of the week given a date. For example if the date is the 22nd July 2003 I want to know if it will be a Monday or Wednesday, etc.. Any help appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting the day if given a date
On Tue, Jul 23, 2002 at 04:24:37PM -0800, Cirkit Braker wrote: > Is there any way to get the day of the week given a date. Check out the date() function. -- Jason Stechschulte [EMAIL PROTECTED] http://www.ypisco.com -- Campus sidewalks never exist as the straightest line between two points. -- M. M. Johnston -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting the day if given a date
You can use the one or the combination of: date(); mktime(); strtotime(); eg: echo date("l", strtotime("22 July 2003")); Check the php online doc for explanation of each function. Rdb On Tue, 2002-07-23 at 20:24, Cirkit Braker wrote: > Is there any way to get the day of the week given a date. > > For example if the date is the 22nd July 2003 I want to know if it will be a > Monday or Wednesday, etc.. > > Any help appreciated. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] secure sockets
Hi Josh, I have not done this myself but afaik, you can use curl to so this. http://www.php.net/manual/en/ref.curl.php Best Regards, Patrick Lynch. Optip Ltd, Internet & Mobile Development Co. Clare, Ireland. http://www.optip.com/ -Original Message- From: Josh Levine [mailto:[EMAIL PROTECTED]] Sent: 23 July 2002 19:57 To: [EMAIL PROTECTED] Subject: [PHP] secure sockets I'm trying to connect to a Java application that's listening on a socket using SSL. I am trying to use fsockopen with the address beginning with ssl://, but it doesn't work. There's no error message that I can find, it just doesn't create the file-handler. Here's some sample code: That returns: Warning: fwrite(): supplied argument is not a valid File-Handle resource in /usr/home/research/htdocs/tests/secure.php on line 8 Warning: fgets(): supplied argument is not a valid File-Handle resource in /usr/home/research/htdocs/tests/secure.php on line 10 0 Warning: fclose(): supplied argument is not a valid File-Handle resource in /usr/home/research/htdocs/tests/secure.php on line 20 Thanks in advance for any help, Josh Levine -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP creating table for HTML layout
I have had some success with something similar to what you want to do, using frames. The bottom footer always remains at the bottom of the browser page with the upper body becoming scrollable when it fills up and no longer fits. Perhaps you can use some variation of this. My Form hope this helps, Warren Vail Tools, Metrics & Quality Processes -Original Message- From: Briggsy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 1:11 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP creating table for HTML layout I am hoping someone can help me with a desperate problem I am having I know nothing about PHP and hoping that it might be able to solve a problem I have with HTML tables. I want my web background to cover the entire screen regardless of screen size. The background has a header, a left side nav and a footer. I want the footer to be on the bottom of the screen or bottom of the text, which ever is greater. If you go to www.v3.aru.org.nz you will get an idea of what I'm talking about. If you are using IE 5.x or greater it should show correctly. I used the HTML table tag height=100%, however this is not a valid tag and therefore Netscape ignores it. Also if I use it it wont validate as a true complaint code, which I want it to. So can I use PHP to create a table or place the background images to create a header, side nav and footer with the middle white section adjusting to screen size. I don't want to have to greater multiple sites for different resolutions and would rather have one template that all pages call by an include statement (That's the ASP command, think I saw the same command in PHP) Any help or solution would be appreciated as I have been searching the net and working on this for weeks and I'm getting nowhere. Thanks Shane. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: MySQL - PHP combined log
> >>>I want to be able to view a single log that contains the following: > >> >>http://php.net/error_log >> > >how about this curve... getting PHP to append a line to the apache log. How about reading the documentation? http://php.net/error_log >would much rather pump the clf formatted log sting directly into the appropriate >apache log, but if I am not mistaken, using the above function would require >permissions for user nobody(www, whatever) on the log files, no? Nope. PHP is running as part of Apache. PHP can ask Apache to write stuff into its own log. That's one of the features of http://php.net/error_log NOTE: If you are running PHP as a CGI, this probably ain't gonna work, because, as noted, you need access to those logs, and PHP running as a CGI is a separate process and probably can't convince Apache that it's kosher to write into its log files. YMMV. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: MySQL - PHP combined log
>Thanks, but all these "methods" require modification of the scripts >already on the server, and it won't ensure any new script being written >by a user on my system to comply. That is correct. >Are you all saying that there are no logs kept by default of errors >generated on php/mysql pages at all unless specifically coded? Wouldn't >it be possible then in future PHP releases to have a "set_error_logging" >directive in the php.ini file that will automatically run a wrapper >function on all mysql_query() functions to do this kind of thing? There *IS* a setting in php.ini to log every error. However, it only logs PHP errors, not unreported MySQL errors. I think you *MUST* write some PHP code to get MySQL errors to appear in the first place, and you'd have to write even more code to get them to be considered PHP errors -- I *THINK*. Never turned on this feature, so can't be 100% certain. >How are people out there managing the scripts/script errors caused by >users on their systems? Or is it a case of "handling the crisis when it >happens"? In most cases, dedicated applications *ARE* using a common 'include' file and the Project Manager or Lead Developer will kill you if you don't. In a shared ISP sort of environment, you just have to educate your users, and be sure you make it easy for them to Do The Right Thing. Does their default include_path have a non web-tree directory conveniently placed in their home directory for them to throw their db_connnect.inc file into it? My ISP does that, but I dunno if the rest are that smart or not. He called the directory 'php' instead of 'include' like I would have, but I can live with that. :-) Actually, he provides a db class pre-built in a file in that directory, along with some custom pre-built PHP scripts like guestbook and Tour Calendar... But that's because he focuses on a particular market. >You see, as administrator, I need to be able to quickly see who are >coding in such a way as to leave security holes, or even worse, cause >the server to crash due to poor coding. There are almost 1000 individual >php files on my server, and it wouldn't be possible for me to scrutinize >all of them to make sure they are OK. You won't catch a security hole by logging anyway, I don't think... Though I guess you could pull out the file names and make sure they aren't in the web-tree and aren't, say, world-writable (shudder). 1000 PHP files? That's not that many :-) If you need to log every MySQL query specifically, that's *probably* gonna be a debugging feature (not recommended for production use) in /etc/my.conf, assuming a recent install following the instructions that come with MySQL. If you installed with Triad or an RPM or anything like that, you're on your own. It's actually fairly hard to bring down the whole machine using PHP and MySQL -- You'd have to work at it, or do something incredibly stupid... Locking up or killing off a single Apache child is less unlikely (still not common) but that usually takes care of itself with Apache children doomed to die within a certain time-frame or # of requests. So you run enough Apache children that it doesn't matter if a few get locked up for awhile. >Are there any admins out there that have policies about scripting >practices on their systems; ie, checking a script from a user before it >is allowed to be uploaded etc? Possibly. But that's *GOT* to be very resource-intensive on the human side, and probably not useful for most situations. I think the actual answer is that *MOST* admins are looking at the "big picture" and monitoring their machines rather than try to force users into a single channel or scrutinize every line of code. If you try to force users into a single channel, you'll either make them all frustrated and drive them away, or there will be so many who find some work-around that it won't really be effective anyway. I think we can safely say that scrutinizing every line of code is not an option for most. Set up a monitoring system of your critical services (HTTP, MySQL) and just focus on quality of service, rather than perfection of your users. While I understand your concerns, I think you're focusing too much on the details of what could go wrong, and missing the forest for the trees. If something does go wrong, there will most likely be physical evidence (logs, error messages, top output) that you can use to find the problem quickly. In the rare cases where it doesn't, be prepared to turn on logging and take the performance hit until you *CAN* find it. Another suggestion: Provide a "development" setup for your users. If they have an easy place to put scripts/database calls and pound on it before it goes into Production to a live audience, they'll more likely use that and make sure the damn thing doesn't take down anything before going "live" -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: htt
[PHP] Re: Comma question
>> This Programmer has actually read the Documentation and believed the >> warnings that some day just plain old $strName might not be enough. > >Where might these warnings be? I just perused this URL: > > http://www.php.net/manual/en/language.types.string.php > >especially where it talks about the {} syntax, but I see no such >warnings of future deprecation. I also followed a provided link here: > > http://www.zend.com/zend/tut/using-strings.php > >but that also doesn't mention this warning. Is this in fact syntax that >will no longer work in some future version? If so, I'll start using {} >everywhere I embed variables in strings, but I was unaware that stuff >like this: > > "This is a $variable embedded in a string" > >might no longer work. If you have URLs, I'd love to read up on this. My bad. It's the square brackets for an array that is deprecated. http://www.php.net/manual/en/language.types.string.php Right before Example 7-3. I haven't quite got the hang of using {} inside of strings yet... It just looks so ugly :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: can there be a fax gateway?
Altn-N have a product called relayfax which is used with e-mail. You could use forms to send an email and have realyfax fax it www.altn.com They have awesome support for their mailserver MDaemon so I would say realyfax would be equally as good "Unknown Sender" <[EMAIL PROTECTED]> wrote in message news:007d01bff8ae$7062bbe0$98519ac2@2112... > Hello List, > i guess that's a wrong place to ask this question, but... > recently I received a web-site order for an > online pizza ordering company, and they > want their web-orders to be sent to their fax > number. > Does anyone if there is a way to make the server > send info to a fax - or maybe some server addon that would allow > e-mail messages be delivered to a fax?? > > Thanks a lot, > ~Peter > ... tomorrow I will change, > and today won't mean a thing ... > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP OOP list
Hello, On 07/23/2002 02:35 PM, Mathieu Dumoulin wrote: > Is there a newsgroup list for PHP and OOP? > It would be great to split up this large topic and create an OOP specific > list. Sure, just send a message to [EMAIL PROTECTED] or subscribe in this page: http://groups.yahoo.com/group/php-objects/join -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MySQL equivalent to append?
Greetings, is there a mySQL syntax command equivalent to appending information to a text record. If I wanted to add an email value to a text record that already has an email value in it, is there a faster way to do this than reading the original value, combining the new value to it, and then running an UPDATE command? - Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php