php-general Digest 4 Apr 2006 12:28:28 -0000 Issue 4052
php-general Digest 4 Apr 2006 12:28:28 - Issue 4052 Topics (messages 233170 through 233191): Re: curl http file upload post 233170 by: Chris proc_open and unix pty support 233171 by: Jon 233173 by: Chris PHP/Dreamweaver CSS issue 233172 by: The Doctor 233180 by: Peter Hoskin 233191 by: Jay Blanchard parse a Makefile 233174 by: Benjamin D Adams 233182 by: Peter Hoskin 233183 by: Kevin Kinsey Re: utf8 problem 233175 by: Chris Re: Best authentication method for user 233176 by: Grant Young Re: return path of mail function 233177 by: sub.drewpydraws.com 233178 by: Chris Re: Here is a silly question 233179 by: Chris 233188 by: Tom Chubb Re: ID-tags from picture? 233181 by: Chris Re: PHP AJAX Framework - Suggestions Please 233184 by: Rasmus Lerdorf How to get a timestamp in error log? 233185 by: John Hicks Re: mysql_fecth_array() and function call as parameter 233186 by: Jon Drukman Re: Multidimentional array problems 233187 by: John Wells Re: Looping information into a table 233189 by: Georgi Ivanov 233190 by: Georgi Ivanov Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: php-general@lists.php.net -- ---BeginMessage--- webmaster wrote: I am trying to upload a file to a remote server using curl and post method here is what I have: $file = $dir..$dbfile[0]; $this-invoiceno = $dbfile[1]; $uploadpath = http://www.website.com; $postvar = array (); $postvar['cboFileType'] = 837; $postvar['txtDesc'] = Invoice No. .$this-invoiceno; $postvar['btnSave'] = Upload File; $postvar['FILE1'] = @$file; $postvar['UPLOADING'] = true; $this-postvariables = txtUserName=.$this-user.txtPassword=.$this-password.btnLogin=Log In; // login first $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $this-login_post); curl_setopt($ch, CURLOPT_USERAGENT, $this-agent); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $this-postvariables); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_REFERER, $this-reffer); curl_setopt($ch, CURLOPT_COOKIEFILE, $this-cookie_file_path); curl_setopt($ch, CURLOPT_COOKIEJAR, $this-cookie_file_path); $results = curl_exec ($ch); // upload file curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,$postvar); curl_setopt ( $ch, CURLOPT_URL, $uploadpath); $uploaded = curl_exec ( $ch ); echo $uploaded; I think my problem is that the file I need to upload is not in the same directory on the server as this script. I am setting $file = /var/www/include/upload/test.txt and this is what seems to be causing the problem. I can find very little information on this topic on google so I need your help. Do I need to copy the file to the same directory that the script is in or is there something else I am missing? If I just set $file = test.txt how would the server know where to find the file? You need the full filepath on the server - /path/to/test.txt. from this page: http://www.php.net/manual/en/function.curl-setopt.php looks like you need to add a curl_setopt call: CURLOPT_UPLOAD If that doesn't work, put verbose mode on and see what's going on: CURLOPT_VERBOSE -- Postgresql php tutorials http://www.designmagick.com/ ---End Message--- ---BeginMessage--- Has anyone worked with ptys using proc_open? I want to try it out but it appears to be disabled at the source level and I don't know how to re-enable it. Any info at all is appreciated. ---End Message--- ---BeginMessage--- Jon wrote: Has anyone worked with ptys using proc_open? I want to try it out but it appears to be disabled at the source level and I don't know how to re-enable it. Any info at all is appreciated. Stupid question - you're using php5 right? It should already be there: http://php.net/proc_open PHP 5 introduces pty support for systems with Unix98 ptys. -- Postgresql php tutorials http://www.designmagick.com/ ---End Message--- ---BeginMessage--- I am trying to modularize a Web Page using one of Dremweaver's CSSes. It works in Firefox but it falls about in IE. Is IE at fault or the modularization? -- Member - Liberal International This is [EMAIL PROTECTED] Ici [EMAIL PROTECTED] God Queen and country! Beware Anti-Christ rising! Canada's New CONservatives - Same old Tory. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ---End Message--- ---BeginMessage--- Lack of information means no answer for you. More to the point, this is a CSS
Re: [PHP] Multidimentional array problems
On 4/3/06, Mace Eliason [EMAIL PROTECTED] wrote: This is what I am doing and the output (for testing) seems correct while($row=mysql_fetch_array($result)) { $banner= array($arrayIndex = $row); echo $banner[$arrayIndex][image]. br; echo $banner[$arrayIndex][url]. br; echo $banner[$arrayIndex][display_type]. br; $arrayIndex++; } Tom is correct, you're overwriting $banner each time. While the following is a bit verbose (Tom's assignment step is all you need), this might help to show what's happening: [code] $banner_array = array(); while ($row = mysql_fetch_array($result)) { $banner_array[] = array( url = $row[url], image = $row[image], display_type = $row[display_type] ); } [/code] $value=0; while($value $number_of_banners_db ) { echo $banner[$value][url]. br; echo $banner[$value][image]. br; echo $banner[$value][display_type]. br; } Here you're also not incrementing your loop counter. Try this: [code] foreach($banner_array as $banner) { echo $banner[url] . br; echo $banner[image] . br; echo $banner[display_type] . br; } [/code] HTH, John W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Here is a silly question
Great - thanks Chris - that's the answer I've been looking for! On 04/04/06, Chris [EMAIL PROTECTED] wrote: Mace Eliason wrote: Hi, This is come thing that I have struggled with now and again. I usaually us php code to make it work, but was wondering how others deal with this I use includes in most of the web applications that I work on to include the header, footer, menu etc. The problem that I always run into as a project gets bigger is my links to pages. If all the files are in the root directory theres no problem. If I have some files in a folder and call my menu for example ? include(../menu.php); ? I have to call if from the parent directory. But then of course all the links are wrong. Root becomes the calling directory. I usually use a php variable to place the ../ if its needed. How does everyone else deal with this type of problem. I have a times places an extra copy of the footer, menu, header etc in each directory but it is a pain to change links when you have multiple locations to do it in. Thanks for any suggestions. I would be nice to have a simple way to have my include files in a common place that works and keeps the links right. Scandog I didn't see anybody else mention this, so: $mydir = dirname(__FILE__); include($mydir . '/../nav/menu.php'); works every time and you don't have to rely on document_root being set properly etc. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Tom Chubb [EMAIL PROTECTED] 07915 053312
Re: [PHP] Looping information into a table
A little OT but i think it is important : I really would not write this code like this . You are making too many queries to the database . If u have 100 rows in first table and 200 rows returned from second query , you make 100*200 queries to the database ! Try using SQL Joins. Like this : ?php $query =select * from cforum cf INNER JOIN scforum; $res=mysql_query($query); while ($line=mysql_fetch_array($res)){ ? table width=94% border=-1 bordercolor=black cellspacing=1 cellpadding=0 align=center tr td table width=100% border=0 cellspacing=0 cellpadding=0 bgcolor=#ff6600 tr tdfont face=tahoma size=1 color=white?php echo(font face =tahoma color=black size=1b$line[cname];/b/fontbr); ?/font/td td align=rightfont face=tahoma size=1 color=whiteForum Mods Will Go Here/font/td /tr /table /td /tr tr td table width=98% border=0 cellspacing=2 cellpadding=0 align=center tr tdfont face=tahoma color=black size=1 ?php echo(font face =tahoma color=black size=1b-- Topic Name: /b$line[scname] br b-- Topic Description:/b line[scdesc]br); ? /td /tr /table /td /tr /tablebr ?php } You may want to use LEfT Join .. This way you will make just ONE query to the database On Monday April 3 2006 06:31, benifactor wrote: i am creating a forum and i am having trouble getting the database information in to an html table i believe it has somthing to do with the placement of the while loops because they repeat the segment of code over untill the statment returns false, thus adding extra html.. you guys are the experts so if you could help i would appreaciate it. i will give you the code and an example of how its shows up and then how i need it to show up and if you could point me in the right direction it would be awsome... //code ? $query = mysql_query(select * from cforum); while ($query1 = mysql_fetch_array($query)) { $lid = $query1[id]; $query2 = mysql_query(select * from scforum where cfid = '$lid'); while ($query3 = mysql_fetch_array($query2)) { ? table width=94% border=-1 bordercolor=black cellspacing=1 cellpadding=0 align=center tr td table width=100% border=0 cellspacing=0 cellpadding=0 bgcolor=#ff6600 tr tdfont face=tahoma size=1 color=white?php echo(font face =tahoma color=black size=1b$query1[cname];/b/fontbr); ?/font/td td align=rightfont face=tahoma size=1 color=whiteForum Mods Will Go Here/font/td /tr /table /td /tr tr td table width=98% border=0 cellspacing=2 cellpadding=0 align=center tr tdfont face=tahoma color=black size=1 ?php echo(font face =tahoma color=black size=1b-- Topic Name: /b$query3[scname] br b-- Topic Description:/b $query3[scdesc]br); ? /td /tr /table /td /tr /tablebr ? } } ? //end code //here is how it displays General; Forum Mods Will Go Here -- Topic Name: General -- Topic Description: blagh l adsklhdfkhadklfhaklsdhf sdhlkh Other; Forum Mods Will Go Here -- Topic Name: Other -- Topic Description: sdfdsjl;asdf Other; Forum Mods Will Go Here -- Topic Name: Another Other -- Topic Description: sdafkasdhkdhas other; Forum Mods Will Go Here -- Topic Name: yet another other -- Topic Description: Talk about all aspects of other. oh wait There is another forum just for that! Bug Reports; Forum Mods Will Go Here -- Topic Name: Web Site Bug Reports -- Topic Description: Report bugs here. Please include information like, how the problem was encountered, the nature of the bug e.x. Spelling error on the forum page. Please give us steps on how to re-create the bug so we can fix it. // see this looks ok, but the 'others' should be grouped together like this Other; forum Mods Will Go Here -- Topic Name: Another Other -- Topic Description: sdafkasdhkdhas -- Topic Name: Other -- Topic Description: sdfdsjl;asdf -- Topic Name: yet another other -- Topic Description: Talk about all aspects of other. oh wait There is another forum just for that! if you get what i mean and can offer any help i would appreaciate it thank you in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Looping information into a table
Sorry . The correct SQL should be: $query =select * from cforum cf INNER JOIN scforum ON cforum.id=scforum.cfid; :) On Tuesday April 4 2006 11:58, Georgi Ivanov wrote: A little OT but i think it is important : I really would not write this code like this . You are making too many queries to the database . If u have 100 rows in first table and 200 rows returned from second query , you make 100*200 queries to the database ! Try using SQL Joins. Like this : ?php $query =select * from cforum cf INNER JOIN scforum ON ; $res=mysql_query($query); while ($line=mysql_fetch_array($res)){ ? table width=94% border=-1 bordercolor=black cellspacing=1 cellpadding=0 align=center tr td table width=100% border=0 cellspacing=0 cellpadding=0 bgcolor=#ff6600 tr tdfont face=tahoma size=1 color=white?php echo(font face =tahoma color=black size=1b$line[cname];/b/fontbr); ?/font/td td align=rightfont face=tahoma size=1 color=whiteForum Mods Will Go Here/font/td /tr /table /td /tr tr td table width=98% border=0 cellspacing=2 cellpadding=0 align=center tr tdfont face=tahoma color=black size=1 ?php echo(font face =tahoma color=black size=1b-- Topic Name: /b$line[scname] br b-- Topic Description:/b line[scdesc]br); ? /td /tr /table /td /tr /tablebr ?php } You may want to use LEfT Join .. This way you will make just ONE query to the database On Monday April 3 2006 06:31, benifactor wrote: i am creating a forum and i am having trouble getting the database information in to an html table i believe it has somthing to do with the placement of the while loops because they repeat the segment of code over untill the statment returns false, thus adding extra html.. you guys are the experts so if you could help i would appreaciate it. i will give you the code and an example of how its shows up and then how i need it to show up and if you could point me in the right direction it would be awsome... //code ? $query = mysql_query(select * from cforum); while ($query1 = mysql_fetch_array($query)) { $lid = $query1[id]; $query2 = mysql_query(select * from scforum where cfid = '$lid'); while ($query3 = mysql_fetch_array($query2)) { ? table width=94% border=-1 bordercolor=black cellspacing=1 cellpadding=0 align=center tr td table width=100% border=0 cellspacing=0 cellpadding=0 bgcolor=#ff6600 tr tdfont face=tahoma size=1 color=white?php echo(font face =tahoma color=black size=1b$query1[cname];/b/fontbr); ?/font/td td align=rightfont face=tahoma size=1 color=whiteForum Mods Will Go Here/font/td /tr /table /td /tr tr td table width=98% border=0 cellspacing=2 cellpadding=0 align=center tr tdfont face=tahoma color=black size=1 ?php echo(font face =tahoma color=black size=1b-- Topic Name: /b$query3[scname] br b-- Topic Description:/b $query3[scdesc]br); ? /td /tr /table /td /tr /tablebr ? } } ? //end code //here is how it displays General; Forum Mods Will Go Here -- Topic Name: General -- Topic Description: blagh l adsklhdfkhadklfhaklsdhf sdhlkh Other; Forum Mods Will Go Here -- Topic Name: Other -- Topic Description: sdfdsjl;asdf Other; Forum Mods Will Go Here -- Topic Name: Another Other -- Topic Description: sdafkasdhkdhas other; Forum Mods Will Go Here -- Topic Name: yet another other -- Topic Description: Talk about all aspects of other. oh wait There is another forum just for that! Bug Reports; Forum Mods Will Go Here -- Topic Name: Web Site Bug Reports -- Topic Description: Report bugs here. Please include information like, how the problem was encountered, the nature of the bug e.x. Spelling error on the forum page. Please give us steps on how to re-create the bug so we can fix it. // see this looks ok, but the 'others' should be grouped together like this Other; forum Mods Will Go Here -- Topic Name: Another Other -- Topic Description: sdafkasdhkdhas -- Topic Name: Other -- Topic Description: sdfdsjl;asdf -- Topic Name: yet another other -- Topic Description: Talk about all aspects of other. oh wait There is another forum just for that! if you get what i mean and can offer any help i would appreaciate it thank you in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP/Dreamweaver CSS issue
[snip] I am trying to modularize a Web Page using one of Dremweaver's CSSes. It works in Firefox but it falls about in IE. Is IE at fault or the modularization? [/snip] Since it is a CSS issue it is likely IE. I will refer you to a CSS mailing list at css-d@lists.css-discuss.org since this is not a PHP question. They will want more information than you provided here, such as an example or link to the page that doesn't work. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with greek language
Hi, I have one very big problem: I create website with english and greek language. I use iso-8859-1 encoding for my website. I show the greek language text with encoded chars like tau;eta;lambda;epsilon;#972;rho;alpha;si; - I copy/paste this from Openoffice documents. On the website I have no problems - everything shows ok, but when I pass this greek encoded string to javascript - i.e. alert('tau;eta;'); the browser doesn't decode the greek symbols and the alert shows me the same :tau;eta; Have someone some idea how to solve this problem ? Thanks in advance, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] FQDN of the server thru CLI
Hi All I'm writing a bunch of cron scripts that send reports periodically using phpmailer. I'm having a hard time trying to find the FQDN of the server. I need that information to construct the from address for the emails. The $_ENV['HOSTNAME'] works only if the script is executed manually. the cron does not pass the HOSTNAME env variable to the scripts. When executed from the CLI, the $_SERVER['HOSTNAME'] does not have the fqdn, but just the hostname part of the FQDN. Unless i hard code the corntab file with HOSTNAME=fqdn i do not want to hardcode the hostname anywhere as these script will be copied onto many servers. is there a way i can find the fully qualified domain name thru PHP? Thanks /V -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] GD to move to php.net
This can only mean good things for PHP and GD development. Hope to see some real improvements to the lib now http://phpro.org/phpdev/GD-moving-home-to-PHP.html K -- Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FQDN of the server thru CLI
I usually do this by forcing the profile to be read before I run the script. Something like * * * * * . /etc/profile /path/to/script Date: Tue, 04 Apr 2006 17:43:09 +0530 From: Venkat Venkataraju [EMAIL PROTECTED] To: php-general@lists.php.net Subject: [PHP] FQDN of the server thru CLI Hi All I'm writing a bunch of cron scripts that send reports periodically using phpmailer. I'm having a hard time trying to find the FQDN of the server. I need that information to construct the from address for the emails. The $_ENV['HOSTNAME'] works only if the script is executed manually. the cron does not pass the HOSTNAME env variable to the scripts. When executed from the CLI, the $_SERVER['HOSTNAME'] does not have the fqdn, but just the hostname part of the FQDN. Unless i hard code the corntab file with HOSTNAME=fqdn i do not want to hardcode the hostname anywhere as these script will be copied onto many servers. is there a way i can find the fully qualified domain name thru PHP? Thanks /V -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FQDN of the server thru CLI
Venkat Venkataraju wrote: i do not want to hardcode the hostname anywhere as these script will be copied onto many servers. is there a way i can find the fully qualified domain name thru PHP? If the system has been configured correctly the following should work... $hostname = trim(`hostname`); // note the backticks -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with greek language
Hi Rosen, either use ISO-8859-7 for the encoding or UTF-8. If you use ISO-8859-7 your site will not need any modifications (either than replacing the tau, ..., etc symbols with the actual characters). If you use UTF-8 you will of course have to modify your strings to make them UTF-8 compatible. Please, take into account that using the tau;eta, ..., etc symbols is *not* guaranteed to work for users visiting your site from Greece. No matter what the standards say, there are problems. Trust me. I live in Greece :-) -Stathis On Tuesday 04 April 2006 15:39, Rosen wrote: Hi, I have one very big problem: I create website with english and greek language. I use iso-8859-1 encoding for my website. I show the greek language text with encoded chars like tau;eta;lambda;epsilon;#972;rho;alpha;si; - I copy/paste this from Openoffice documents. On the website I have no problems - everything shows ok, but when I pass this greek encoded string to javascript - i.e. alert('tau;eta;'); the browser doesn't decode the greek symbols and the alert shows me the same :tau;eta; Have someone some idea how to solve this problem ? Thanks in advance, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] test for illegal characters and consequences
Hi guys. Ive developed a site and now I've come to the stage where I need to test each textfield on each form for illegal characters that have been inputted. I would like to know from some of you how you go about it? Do you use a regular expression and test each textfield sequencially, also what do you do when you find illegal characters? do you strip them out of the inputted information or do you post an error message and tell them that there are illegal characters? I have many pages and many textfields so I would like to use the best and most appropriate and time effective approach by taking in your suggestions before doing the testing and counter measure. Thanks in advance -- Angelo Zanetti Z Logic www.zlogic.co.za [c] +27 72 441 3355 [t] +27 21 469 1052 [f] +27 86 681 5885 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] test for illegal characters and consequences
On Tue, 2006-04-04 at 15:32 -0800, Angelo Zanetti wrote: Ive developed a site and now I've come to the stage where I need to test each textfield on each form for illegal characters that have been inputted. I would like to know from some of you how you go about it? In our framework, we use a few methods, depending on what needs to be done in what way... If you look at our wiki module, we use AJAX to check for valid PageNames when using SmashWordsTogether. In our other forms we use a form validation object that checks for numeric, alphanumeric, textonly etc on form submission. It sounds as though the AJAX route is more what you are looking for. If you would like some help let me know, or ask on our developers list. You can check it out at any one of our sites. Try registering and adding a page to the wiki at http://fsiu.uwc.ac.za/ for an example of the AJAX validation --Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with greek language
Thanks, But the problem is thath I can't put directly into code the greek text with copy/paste from the .doc file in the PHP editor. I chahged the encoding for the editor to greek charset, but when I paste it, the result is ??? ( questiomarks ) . rouvas wrote: Hi Rosen, either use ISO-8859-7 for the encoding or UTF-8. If you use ISO-8859-7 your site will not need any modifications (either than replacing the tau, ..., etc symbols with the actual characters). If you use UTF-8 you will of course have to modify your strings to make them UTF-8 compatible. Please, take into account that using the tau;eta, ..., etc symbols is *not* guaranteed to work for users visiting your site from Greece. No matter what the standards say, there are problems. Trust me. I live in Greece :-) -Stathis On Tuesday 04 April 2006 15:39, Rosen wrote: Hi, I have one very big problem: I create website with english and greek language. I use iso-8859-1 encoding for my website. I show the greek language text with encoded chars like tau;eta;lambda;epsilon;#972;rho;alpha;si; - I copy/paste this from Openoffice documents. On the website I have no problems - everything shows ok, but when I pass this greek encoded string to javascript - i.e. alert('tau;eta;'); the browser doesn't decode the greek symbols and the alert shows me the same :tau;eta; Have someone some idea how to solve this problem ? Thanks in advance, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with greek language
Hmmm... Are you sure it is not a matter of your fonts being incapable of displaying Greek characters? Can you try with these : http://sourceforge.net/projects/font-tool BTW, are you using Windows or *nix? -Stathis On Tuesday 04 April 2006 16:52, Rosen wrote: Thanks, But the problem is thath I can't put directly into code the greek text with copy/paste from the .doc file in the PHP editor. I chahged the encoding for the editor to greek charset, but when I paste it, the result is ??? ( questiomarks ) . rouvas wrote: Hi Rosen, either use ISO-8859-7 for the encoding or UTF-8. If you use ISO-8859-7 your site will not need any modifications (either than replacing the tau, ..., etc symbols with the actual characters). If you use UTF-8 you will of course have to modify your strings to make them UTF-8 compatible. Please, take into account that using the tau;eta, ..., etc symbols is *not* guaranteed to work for users visiting your site from Greece. No matter what the standards say, there are problems. Trust me. I live in Greece :-) -Stathis On Tuesday 04 April 2006 15:39, Rosen wrote: Hi, I have one very big problem: I create website with english and greek language. I use iso-8859-1 encoding for my website. I show the greek language text with encoded chars like tau;eta;lambda;epsilon;#972;rho;alpha;si; - I copy/paste this from Openoffice documents. On the website I have no problems - everything shows ok, but when I pass this greek encoded string to javascript - i.e. alert('tau;eta;'); the browser doesn't decode the greek symbols and the alert shows me the same :tau;eta; Have someone some idea how to solve this problem ? Thanks in advance, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Programmer needed for winsock project
Hi, I don't know what peoples backgrounds are here on the list but we have a paying project for the right person. Or if anyone has another list that can suggest where I can post this. Is anyone interested in working on a small project? We are looking for someone to write a program for us. Program description: Transparent socks proxy client. Must run as a service and be password protected. It needs to transparently redirect all internet traffic to a socks proxy. Needs to be able to configure server settings (port, address, username, password) To give you an idea of what I mean take a look at proxcap http://proxylabs.netwu.com/ If anyone is interested please email me at [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help with some logic.
I've been looking at this code for a few hours now and I get the nagging feeling that I am overcomplicating something, something I never ever do. I have a login that puts some information on the session, and if the customer wants they can ask to be remembered, the cookie is given the customers user name and another cookie stores a unique id, similar to a password I could do the password in a cookie as its md5 encrypted, but I went with an a unique id which is store in the user db. Anyway here is what I am trying to do with the code below. The authorized user section requires 4 pieces of information, userid, password, username and user level, a person who logs in each time gets that information assigned to their session, that part works *knock on wood* perfectly. When a customer says remember me they go away and come back a while later they are remembered, so that part works perfectly, however I need to get the persons information and put that on the session, however I would like the function to behave in such a way as to not overwrite the information each time the page load. So for example the cookie is read the information is valid, the query to the db, the information set to the session. You might wonder why I dont set the userlevel to the cookie, well I dont want someone changing the value of a cookie and getting admin access, which reminds me I should add that as a check. Thats about it. getCookieInfo() the function inside the checkLogin function just looks up the information for the cookie in the db. I know that someone is going to say something really simple that I am going to slap my forehead over, I would like to thank that person before hand. function checkLogin () { /* Check if user has been remembered */ if (isset($_COOKIE['cookname']) isset($_COOKIE['cookid'])) { if (!isset($_SESSION['name']) !isset($_SESSION['id']) !isset($_SESSION['level']) !isset($_SESSION['password'])) { $cookieInfo=getCookieInfo($_COOKIE['cookname'], $_COOKIE['cookid']); if ($cookieInfo==0) { return 0; } if ($cookieInfo==1) { setcookie(cookname, , time()-60*60*24*100, /); setcookie(cookid, , time()-60*60*24*100, /); return 1; } if ($cookieInfo==2) { setcookie(cookname, , time()-60*60*24*100, /); setcookie(cookid, , time()-60*60*24*100, /); return 2; } } } if (isset($_SESSION['name']) isset($_SESSION['id']) isset($_SESSION['level']) isset($_SESSION['password'])) { if (loginUser($_SESSION['username'], $_SESSION['password'],'') != 1) { unset($_SESSION['name']); unset($_SESSION['id']); unset($_SESSION['level']); unset($_SESSION['password']); $_SESSION = array(); // reset session array session_destroy(); // destroy session. // incorrect information, user not logged in return 0; } // information valid, user okay return 1; } else { // user not logged in return 2; } }
Re: [PHP] help with some logic.
hey Dallas, have you thought about breaking this up and making two seperate functions one the checks the cookie and one that checks the session information? I'm not sure if that is what you were looking for as far as an answer but it might be a good start. On 4/4/06, Dallas Cahker [EMAIL PROTECTED] wrote: I've been looking at this code for a few hours now and I get the nagging feeling that I am overcomplicating something, something I never ever do. I have a login that puts some information on the session, and if the customer wants they can ask to be remembered, the cookie is given the customers user name and another cookie stores a unique id, similar to a password I could do the password in a cookie as its md5 encrypted, but I went with an a unique id which is store in the user db. Anyway here is what I am trying to do with the code below. The authorized user section requires 4 pieces of information, userid, password, username and user level, a person who logs in each time gets that information assigned to their session, that part works *knock on wood* perfectly. When a customer says remember me they go away and come back a while later they are remembered, so that part works perfectly, however I need to get the persons information and put that on the session, however I would like the function to behave in such a way as to not overwrite the information each time the page load. So for example the cookie is read the information is valid, the query to the db, the information set to the session. You might wonder why I dont set the userlevel to the cookie, well I dont want someone changing the value of a cookie and getting admin access, which reminds me I should add that as a check. Thats about it. getCookieInfo() the function inside the checkLogin function just looks up the information for the cookie in the db. I know that someone is going to say something really simple that I am going to slap my forehead over, I would like to thank that person before hand. function checkLogin () { /* Check if user has been remembered */ if (isset($_COOKIE['cookname']) isset($_COOKIE['cookid'])) { if (!isset($_SESSION['name']) !isset($_SESSION['id']) !isset($_SESSION['level']) !isset($_SESSION['password'])) { $cookieInfo=getCookieInfo($_COOKIE['cookname'], $_COOKIE['cookid']); if ($cookieInfo==0) { return 0; } if ($cookieInfo==1) { setcookie(cookname, , time()-60*60*24*100, /); setcookie(cookid, , time()-60*60*24*100, /); return 1; } if ($cookieInfo==2) { setcookie(cookname, , time()-60*60*24*100, /); setcookie(cookid, , time()-60*60*24*100, /); return 2; } } } if (isset($_SESSION['name']) isset($_SESSION['id']) isset($_SESSION['level']) isset($_SESSION['password'])) { if (loginUser($_SESSION['username'], $_SESSION['password'],'') != 1) { unset($_SESSION['name']); unset($_SESSION['id']); unset($_SESSION['level']); unset($_SESSION['password']); $_SESSION = array(); // reset session array session_destroy(); // destroy session. // incorrect information, user not logged in return 0; } // information valid, user okay return 1; } else { // user not logged in return 2; } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help with some logic.
Okay I'll look at that. What about switching to setting the password in md5 format in the cookie rather then a regular id. I might not call the cookie password but to me in thinking about it seems like the same thing as setting a random id and then saving the random id in the db. On 4/4/06, Dan McCullough [EMAIL PROTECTED] wrote: hey Dallas, have you thought about breaking this up and making two seperate functions one the checks the cookie and one that checks the session information? I'm not sure if that is what you were looking for as far as an answer but it might be a good start. On 4/4/06, Dallas Cahker [EMAIL PROTECTED] wrote: I've been looking at this code for a few hours now and I get the nagging feeling that I am overcomplicating something, something I never ever do. I have a login that puts some information on the session, and if the customer wants they can ask to be remembered, the cookie is given the customers user name and another cookie stores a unique id, similar to a password I could do the password in a cookie as its md5 encrypted, but I went with an a unique id which is store in the user db. Anyway here is what I am trying to do with the code below. The authorized user section requires 4 pieces of information, userid, password, username and user level, a person who logs in each time gets that information assigned to their session, that part works *knock on wood* perfectly. When a customer says remember me they go away and come back a while later they are remembered, so that part works perfectly, however I need to get the persons information and put that on the session, however I would like the function to behave in such a way as to not overwrite the information each time the page load. So for example the cookie is read the information is valid, the query to the db, the information set to the session. You might wonder why I dont set the userlevel to the cookie, well I dont want someone changing the value of a cookie and getting admin access, which reminds me I should add that as a check. Thats about it. getCookieInfo() the function inside the checkLogin function just looks up the information for the cookie in the db. I know that someone is going to say something really simple that I am going to slap my forehead over, I would like to thank that person before hand. function checkLogin () { /* Check if user has been remembered */ if (isset($_COOKIE['cookname']) isset($_COOKIE['cookid'])) { if (!isset($_SESSION['name']) !isset($_SESSION['id']) !isset($_SESSION['level']) !isset($_SESSION['password'])) { $cookieInfo=getCookieInfo($_COOKIE['cookname'], $_COOKIE['cookid']); if ($cookieInfo==0) { return 0; } if ($cookieInfo==1) { setcookie(cookname, , time()-60*60*24*100, /); setcookie(cookid, , time()-60*60*24*100, /); return 1; } if ($cookieInfo==2) { setcookie(cookname, , time()-60*60*24*100, /); setcookie(cookid, , time()-60*60*24*100, /); return 2; } } } if (isset($_SESSION['name']) isset($_SESSION['id']) isset($_SESSION['level']) isset($_SESSION['password'])) { if (loginUser($_SESSION['username'], $_SESSION['password'],'') != 1) { unset($_SESSION['name']); unset($_SESSION['id']); unset($_SESSION['level']); unset($_SESSION['password']); $_SESSION = array(); // reset session array session_destroy(); // destroy session. // incorrect information, user not logged in return 0; } // information valid, user okay return 1; } else { // user not logged in return 2; } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php, sessions and ie
I've been hearing some of my friends saying there is an issue with Session in PHP and IE having problems with them. Is that true? If it is how do people get around this? Session information saved to db? Session id in cookie?
Re: [PHP] php, sessions and ie
I used to use a database table which housed their information, and their cookie housed their sessionID that the server assigned them when they logged in. Grabbing the sessionID only from the cookie (and their IP) I was able to log most people in (even dynamic IPs don't change THAT often). For those whom were dealing with a changed IP, the system had them verify just their password. Wrong password dumped them back out and asked for full login information. no browser issues at the time. Wolf Dallas Cahker wrote: I've been hearing some of my friends saying there is an issue with Session in PHP and IE having problems with them. Is that true? If it is how do people get around this? Session information saved to db? Session id in cookie? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: test for illegal characters and consequences
Angelo Zanetti wrote: Hi guys. Ive developed a site and now I've come to the stage where I need to test each textfield on each form for illegal characters that have been inputted. I would like to know from some of you how you go about it? Do you use a regular expression and test each textfield sequencially, also what do you do when you find illegal characters? do you strip them out of the inputted information or do you post an error message and tell them that there are illegal characters? I have many pages and many textfields so I would like to use the best and most appropriate and time effective approach by taking in your suggestions before doing the testing and counter measure. Thanks in advance Be more specific about what you mean by illegal characters. Give us some examples. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: test for illegal characters and consequences
Al wrote: Angelo Zanetti wrote: Hi guys. Ive developed a site and now I've come to the stage where I need to test each textfield on each form for illegal characters that have been inputted. I would like to know from some of you how you go about it? Do you use a regular expression and test each textfield sequencially, also what do you do when you find illegal characters? do you strip them out of the inputted information or do you post an error message and tell them that there are illegal characters? I have many pages and many textfields so I would like to use the best and most appropriate and time effective approach by taking in your suggestions before doing the testing and counter measure. Thanks in advance Be more specific about what you mean by illegal characters. Give us some examples. Well any kind of character that could break the the site and the SQL statement. Its not really important what the characters are inputted but rather how to remedy the situation once these characters have been entered. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php, sessions and ie
I have had some issues with sessions and IE in the past and used the following code to start the session ?php if (isset($SessID)){ session_id($SessID); } session_start(); header(Cache-control: private); // IE 6 Fix. setcookie(SessID, session_id(), time() + 60 * 15); ? Now, though, I always use a DB to store sessions... Much nicer HTH Dan - Dan Parry Senior Developer Virtua Webtech Ltd http://www.virtuawebtech.co.uk -Original Message- From: Dallas Cahker [mailto:[EMAIL PROTECTED] Sent: 04 April 2006 16:19 To: php-general@lists.php.net Subject: [PHP] php, sessions and ie I've been hearing some of my friends saying there is an issue with Session in PHP and IE having problems with them. Is that true? If it is how do people get around this? Session information saved to db? Session id in cookie? __ NOD32 1.1454 (20060321) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need a CRM recommendation
Howdy group! I need recommendations for a good CRM done in PHP, thanks! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need a CRM recommendation
Try Civiccrm - http://www.openngo.org/ CiviCRM is the first open source and freely downloadable constituent relationship management solution. CiviCRM is web-based, internationalized, and designed specifically to meet the needs of advocacy, non-profit and non-governmental groups. I use this with several NGOs, very easy to customize and scale. - Greg On 4/4/06, Jay Blanchard [EMAIL PROTECTED] wrote: Howdy group! I need recommendations for a good CRM done in PHP, thanks! Jay -- 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: problem with greek language
Rosen wrote: I have one very big problem: I create website with english and greek language. I use iso-8859-1 encoding for my website. I show the greek language text with encoded chars like tau;eta;lambda;epsilon;#972;rho;alpha;si; Representing such characters as HTML entities is fine. On the website I have no problems - everything shows ok, but when I pass this greek encoded string to javascript - i.e. alert('tau;eta;'); the browser doesn't decode the greek symbols and the alert shows me the same :tau;eta; The data between script and /script is, in HTML documents, CDATA, so HTML entities are not decoded. You either have to encode the document using a character encoding which supports the characters you want (such as UTF-8), configure your server to emit a suitable HTTP header, and use literal versions of those characters or represent those characters as \u (where is the Unicode character specified by four hexadecimal digits), or \XXX (three octal digits representing the Latin-1 character), or \xXX (two hexadecimal digits representing the Latin-1 character). -- David Dorward http://blog.dorward.me.uk/ http://dorward.me.uk/ Home is where the ~/.bashrc is -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need a CRM recommendation
I need recommendations for a good CRM done in PHP, thanks! http://www.opensourcecms.com/ Lots of options, ratings, reviews, demos, etc. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Need a CRM recommendation
[snip] I need recommendations for a good CRM done in PHP, thanks! http://www.opensourcecms.com/ Lots of options, ratings, reviews, demos, etc. [/snip] Lot's of good CMS's there, only one, maybe two CRM's. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] proc_open and unix pty support
*SHOULD* is the operative word here, since its *not*. No matter whether its a linux, osX or freebsd box that I try using pty support on with php 5.1.2 it says that pty support is not available for my system. Further checking in the user-contributed notes on this page: http://us2.php.net/proc_open reveals a user comment that appears to be the exact description of the problem: andrew dot budd at adsciengineering dot com 28-Dec-2005 09:55 The pty option is actually disabled in the source for some reason via a #if 0 condition. I'm not sure why it's disabled. I removed the 0 and recompiled, after which the pty option works perfectly. Just a note. except that it doesn't say WHERE in the source. I can't find it. #if 0 shows up about a million times. anyone got any advice? I swear i'm not crazy. Chris wrote: Jon wrote: Has anyone worked with ptys using proc_open? I want to try it out but it appears to be disabled at the source level and I don't know how to re-enable it. Any info at all is appreciated. Stupid question - you're using php5 right? It should already be there: http://php.net/proc_open PHP 5 introduces pty support for systems with Unix98 ptys. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php, sessions and ie
How are you destroying the sessions if they leave the site (dont logout). do you check on activity or something else? On 4/4/06, Dan Parry [EMAIL PROTECTED] wrote: I have had some issues with sessions and IE in the past and used the following code to start the session ?php if (isset($SessID)){ session_id($SessID); } session_start(); header(Cache-control: private); // IE 6 Fix. setcookie(SessID, session_id(), time() + 60 * 15); ? Now, though, I always use a DB to store sessions... Much nicer HTH Dan - Dan Parry Senior Developer Virtua Webtech Ltd http://www.virtuawebtech.co.uk -Original Message- From: Dallas Cahker [mailto:[EMAIL PROTECTED] Sent: 04 April 2006 16:19 To: php-general@lists.php.net Subject: [PHP] php, sessions and ie I've been hearing some of my friends saying there is an issue with Session in PHP and IE having problems with them. Is that true? If it is how do people get around this? Session information saved to db? Session id in cookie? __ NOD32 1.1454 (20060321) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com
RE: [PHP] Need a CRM recommendation
[snip] I need recommendations for a good CRM done in PHP, thanks! http://www.opensourcecms.com/ Lots of options, ratings, reviews, demos, etc. [/snip] Lot's of good CMS's there, only one, maybe two CRM's. Woops. That's what happens when you read too fast... No experience with it, but there's http://www.sugarcrm.com/crm/ -p -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] parsing malformed xml documents
Hei guys, I´m parsing some xml's and fetching nodes using xpath, and the PHP 5.0 DOM. Unfortunately, some documents have white spaces in the beginning or some missing tags. In some situations, the script just skips that xml, or even crashes without notice. I tried loading them as html, and disabling validation, but that didn´t do the trick, as they have invalid html tags. I wonder if there is some way (maybe an external class, or something) to accomplish this. I know that theorically, it would be better to have well formed xml (I also think so), but I need to handle them at any rate, and they´re created by an external source away from my control. Thanks in advance, Mariano Guadagnini -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.3.5/300 - Release Date: 03/04/2006 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ID-tags from picture?
- Original Message - From: Chris [EMAIL PROTECTED] To: Gustav Wiberg [EMAIL PROTECTED] Cc: PHP General php-general@lists.php.net Sent: Tuesday, April 04, 2006 4:14 AM Subject: Re: [PHP] ID-tags from picture? Gustav Wiberg wrote: Hi guys! If I've got this right, there will be some kind of tag that is saved in a picture (hidden). Is it possible to retrieve this information from PHP and what it is called? Any ideas / suggestions would be approciated! Depends on what information you are after. Some images may have exif info, but not all. http://www.php.net/exif Possibly IPTC information too (but only applies to jpegs apparently): http://www.php.net/iptcparse -- Postgresql php tutorials http://www.designmagick.com/ Hi! And thanx a lot! Exactly what I was looking for! Best regards /Gustav Wiberg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] parsing malformed xml documents
Mariano Guadagnini wrote: Hei guys, I´m parsing some xml's and fetching nodes using xpath, and the PHP 5.0 DOM. Unfortunately, some documents have white spaces in the beginning or some missing tags. In some situations, the script just skips that xml, or even crashes without notice. I tried loading them as html, and disabling validation, but that didn´t do the trick, as they have invalid html tags. I wonder if there is some way (maybe an external class, or something) to accomplish this. I know that theorically, it would be better to have well formed xml (I also think so), but I need to handle them at any rate, and they´re created by an external source away from my control. How about something like this: $dom = @DOMDocument::loadHTML($xml); if(is_object($dom)) $xpath = new DOMXPath($dom); else { $xml = tidy_repair_string($xml); if($xml) { $dom = @DOMDocument::loadHTML($xml); if(is_object($dom)) $xpath = new DOMXPath($dom); } } -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: test for illegal characters and consequences
You can compare each character against the standard character set by means of regular expressions. Angelo Zanetti escribió: Al wrote: Angelo Zanetti wrote: Hi guys. Ive developed a site and now I've come to the stage where I need to test each textfield on each form for illegal characters that have been inputted. I would like to know from some of you how you go about it? Do you use a regular expression and test each textfield sequencially, also what do you do when you find illegal characters? do you strip them out of the inputted information or do you post an error message and tell them that there are illegal characters? I have many pages and many textfields so I would like to use the best and most appropriate and time effective approach by taking in your suggestions before doing the testing and counter measure. Thanks in advance Be more specific about what you mean by illegal characters. Give us some examples. Well any kind of character that could break the the site and the SQL statement. Its not really important what the characters are inputted but rather how to remedy the situation once these characters have been entered. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php, sessions and ie
I let GC and cookie expiration handle ending the session... The cookie was only set for 15 minutes Dan --- http://chrome.me.uk -Original Message- From: Dallas Cahker [mailto:[EMAIL PROTECTED] Sent: 04 April 2006 19:41 To: php-general@lists.php.net Subject: Re: [PHP] php, sessions and ie How are you destroying the sessions if they leave the site (dont logout). do you check on activity or something else? On 4/4/06, Dan Parry [EMAIL PROTECTED] wrote: I have had some issues with sessions and IE in the past and used the following code to start the session ?php if (isset($SessID)){ session_id($SessID); } session_start(); header(Cache-control: private); // IE 6 Fix. setcookie(SessID, session_id(), time() + 60 * 15); ? Now, though, I always use a DB to store sessions... Much nicer HTH Dan - Dan Parry Senior Developer Virtua Webtech Ltd http://www.virtuawebtech.co.uk -Original Message- From: Dallas Cahker [mailto:[EMAIL PROTECTED] Sent: 04 April 2006 16:19 To: php-general@lists.php.net Subject: [PHP] php, sessions and ie I've been hearing some of my friends saying there is an issue with Session in PHP and IE having problems with them. Is that true? If it is how do people get around this? Session information saved to db? Session id in cookie? __ NOD32 1.1454 (20060321) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] redirect using php
Greetings All, In JSP I have access to a function called sendRedirect() to send a user from one page to another, usually after some processing completed. Is there a similar function in PHP? After processing a form and sending the data via email, I need to redirect them to another page. I currently use a method of merely replacing the form with some 'thank you' text after submitting the form, I prefer this but, the client wants me to redirect to another page. All help appreciated. Thanks! -- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Business.Solution.Developers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Need a CRM recommendation
Apparently vTiger is quite good but I've had no experience of it http://www.vtiger.com/ Dan --- http://chrome.me.uk -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: 04 April 2006 17:50 To: php-general@lists.php.net Subject: [PHP] Need a CRM recommendation Howdy group! I need recommendations for a good CRM done in PHP, thanks! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ NOD32 1.1470 (20060404) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] redirect using php
http://uk.php.net/manual/en/function.header.php --- http://chrome.me.uk -Original Message- From: Schalk [mailto:[EMAIL PROTECTED] Sent: 04 April 2006 22:21 To: php-general@lists.php.net Subject: [PHP] redirect using php Greetings All, In JSP I have access to a function called sendRedirect() to send a user from one page to another, usually after some processing completed. Is there a similar function in PHP? After processing a form and sending the data via email, I need to redirect them to another page. I currently use a method of merely replacing the form with some 'thank you' text after submitting the form, I prefer this but, the client wants me to redirect to another page. All help appreciated. Thanks! -- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Business.Solution.Developers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ NOD32 1.1471 (20060404) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] suse php apache2 sessions problem
Dear All, I'm setting up a development server (SuSe 9.1 x86_64, apache2, php 4)and I'm having a weird issue with php 4 not recognizing the start_session function. I've loaded the module with the php.ini file: extension=session.so I've installed the rpm for php sessions and frankly I'm dumbfounded as to why my phpinfo() is still not even listing sessions as a modules??! Any suggestions would be greatly appreciated. TIA! -- Paul Nowosielski -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] redirect using php
-Original Message- In JSP I have access to a function called sendRedirect() to send a user from one page to another, usually after some processing completed. Is there a similar function in PHP? Take a look at the header() function. http://php.net/header To redirect you can use: header(Location: http://www.example.com/;); Brady -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] redirect using php
Brady Mitchell wrote: -Original Message- In JSP I have access to a function called sendRedirect() to send a user from one page to another, usually after some processing completed. Is there a similar function in PHP? Take a look at the header() function. http://php.net/header To redirect you can use: header(Location: http://www.example.com/;); Brady Thanks everyone, I will give this a go. -- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Business.Solution.Developers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] calling php script from C - pclose problem
Hello, Calling a php script from legacy c code using popen(), works great. Problem: when php script is done, pclose() in c code fails with ECHILD, No child process, wait4() failed. This is because the php script does not hang around to be wait'ed for; any idea how to make a command line php script behave like a normal child process that waits for its parent to get a status via a wait system call? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] proc_open and unix pty support
Jon wrote: *SHOULD* is the operative word here, since its *not*. No matter whether its a linux, osX or freebsd box that I try using pty support on with php 5.1.2 it says that pty support is not available for my system. Further checking in the user-contributed notes on this page: http://us2.php.net/proc_open reveals a user comment that appears to be the exact description of the problem: andrew dot budd at adsciengineering dot com 28-Dec-2005 09:55 The pty option is actually disabled in the source for some reason via a #if 0 condition. I'm not sure why it's disabled. I removed the 0 and recompiled, after which the pty option works perfectly. Just a note. except that it doesn't say WHERE in the source. I can't find it. #if 0 shows up about a million times. anyone got any advice? I swear i'm not crazy. The -internals list will know the source code.. or send that guy an email and ask him where he had to change it. Chris wrote: Jon wrote: Has anyone worked with ptys using proc_open? I want to try it out but it appears to be disabled at the source level and I don't know how to re-enable it. Any info at all is appreciated. Stupid question - you're using php5 right? It should already be there: http://php.net/proc_open PHP 5 introduces pty support for systems with Unix98 ptys. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Fwd: one more php opcode cacher for your choice
Is anyone aware of how this compares? -- Forwarded message -- From: Xuefer [EMAIL PROTECTED] Date: Apr 3, 2006 10:04 PM Subject: one more php opcode cacher for your choice To: Lighttpd List [EMAIL PROTECTED] http://blog.lighttpd.net/articles/2006/04/04/one-more-opcache-for-php-preview we might make it available online in a separated svn/trac, by now u can download and try the preview package. any comment is welcomed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php