Re: [PHP] Looking for help with Forms and Mailing them
Thanks for the link! -- Linds On Wed, 25 Aug 2004 21:44:22 -0700 Justin Patrin [EMAIL PROTECTED] writes: On Wed, 25 Aug 2004 19:13:08 -0600, Bradleigh Simms [EMAIL PROTECTED] wrote: Alright I'm apparently a complete dunce where PHP is concerned. I've tried to read the tutorials and am just getting completely mixed up. What I want: I want the form at http://ussblackwell.devermore.net/join.html to send as an email to myself and the GM of the game when the apply button is hit, without having to go through something like OE or Juno. What I don't know is *anything* at *all* about PHP. Can somebody help me? http:://www.php.net/mail -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The best thing to hit the Internet in years - Juno SpeedBand! Surf the Web up to FIVE TIMES FASTER! Only $14.95/ month - visit www.juno.com to sign up today! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is javascript enable?
Marcos Thiago M. Fabis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i share your opinion, but belive-me when i say that this situation requires it. i have to check if it´s inside frames, pass values for only one a respective frame that is responsable for logging, start procedures with setTimeOut, etc... maybe next time the project can be better planned, but i can´t see how at this time! [s] Mt Hi, one way could be to setup an empty intro page that has two ways of redirecting: 1. Redirect via meta-refresh tag after 2 seconds to page2.php?js=off 2. Redirect via JavaScript immediately to page2.php?js=on If JS is enabled the second redirect will be processed, if it's off the first one will. Then on page2 you'll have $_GET['js'] with on/off as the value. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] crypt()
Afan Pasalic [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi everyone! My hosting company has global turned on. But I want to code using more safe global off. My question though is how I can do it locally, in my script? I tried to use ini_set(register_globals, FALSE); but it still doesn't work. On php.net manual I can find WHAT I have to do and reasons but not HOW. Thanks for any help! Afan Please don't hijack other people's thread: Try this at the top of *every* script: ini_set('register_globals', 0); Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: crypt()
Aaron Todd [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have developed a PHP based site that requires users to login. Their login information is kept in a MYSQL database. Currently, I am using an IF statement to verify what the user enters as their password with what is in the the database. If they are the same a session is created and they have access to the content of the site. As far as I know the password is being sent to the script in clear text and I was wondering what a good way would be to get this to be encrypted. My first thought is to encrypt the password in the database using crypt(). So if I view the table I will see the encrypted characters. Then change the IF statement to encrypt the password that the user enters and then just check if its the same as what is in the database. That sounds like the same as I am doing now only instead of checking a password that is a name, its checking the encrypted characters of the name. So it seems my idea would hide the real characters. Can anyone tell me if this is a bad idea. And maybe point me toward a good one. Thanks, Aaron Hi Aaron, encrypting passwords in the database is generally a good idea. You can use md5() as an alternative to crypt(). MySQL itself has an MD5 function you can directly use in your SQL statements. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Odd behaviour of non-existent keys?
Hi folks, Michael Sims wrote: MS IMHO what you have described is a bug in PHP, and if I were you, MS I'd report it as such. If it's not a bug it at least has a very MS high WTF factor. Problem with reporting is that I am using Debian Test and the current PHP version is too old to report. If someone with an current PHP version could replicate the problem, let me know and I will report it. Here is the code: $foo = '' ; $foo['one']['two'] = 'test-value' ; print( 'bRunning tests for one non-existent key/bbrbr' ) ; // Test isset() for non-existent key if( isset( $foo['one']['two']['three'] ) ) { print( Unexpected isset(): evaluated to TRUEbr ) ; } else { print( Expected isset(): evaluated to FALSEbr ) ; } // Use var_dump() to find out what is going on // Expected: evaluate to NULL // Actual: evaluated to 'string(1) t' // (x is the first char of test-value) print( 'var_dump() output (expecting NULL):br' ) ; var_dump( $foo['one']['two']['three'] ) ; // Add another non-existent key and things // work as expected print( 'brbrbRunning tests for two non-existent keys/bbrbr' ) ; if( isset( $foo['one']['two']['three']['four'] ) ) { print( Unexpected isset(): evaluated to TRUEbr ) ; } else { print( Expected isset(): evaluated to FALSEbr ) ; } print( 'var_dump() output (expecting NULL):br' ) ; var_dump( $foo['one']['two']['three']['four'] ) ; -- Geoff Caplan Vario Software Ltd (+44) 121-515 1154 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Web functional testing tools?
Hi folks, Just setting out on a major new project, and this time I want to set up a comprehensive regression testing from the start: I've learned the hard way that manual testing is not the way to go! But looking at open-source web application frameworks, most of them are very Java specific, or at least require Java to write the tests. What do people recommend for the functional testing of PHP data-driven apps? (By functional testing I mean testing the application as a whole, as opposed to unit testing.) -- Geoff Caplan Vario Software Ltd (+44) 121-515 1154 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web functional testing tools?
On Thu, Aug 26, 2004 at 10:58:43AM +0100, Geoff Caplan wrote: Hi folks, Just setting out on a major new project, and this time I want to set up a comprehensive regression testing from the start: I've learned the hard way that manual testing is not the way to go! But looking at open-source web application frameworks, most of them are very Java specific, or at least require Java to write the tests. What do people recommend for the functional testing of PHP data-driven apps? (By functional testing I mean testing the application as a whole, as opposed to unit testing.) http://www.lastcraft.com/simple_test.php#web Regards, Doug -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ini_set('include_path') and require_once()
Hi, In the following code, require_once() borks, complaining: Failed opening required 'includes/companies.php' (include_path='.:..') ini_set(include_path, ../../php); require_once('includes/common.php'); require_once('includes/validate.php'); require_once('includes/company.php'); require_once('includes/companies.php'); The strange thing is: I have other code where this same method _does_ appear to work. Anyone care to enlighten me? I'm using PHP 4.3.8. BigSmoke Smokes your problems, coughs fresh air PS: I was not sure in which newsgroups to (cross-)post this. I thought, it might be better fit for php.version4, but, since I wasn't sure, I decided on php.general. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Closing my Window after Download
Ave, Trust me John, I would not post here without trying out many javascript functions first. In fact, the reason I posted here is because I began to think that a PHP script like that won't allow the window to close, because from window.close() to self.close() to various Timeout Close scripts, I've tried many javascript functions. I don't get any errors ... The window just doesn't close... On 8/24/04 2:09 PM, John Nichel [EMAIL PROTECTED] wrote: PHP Junkie wrote: Ave, The browser window which launched the Save As window... PHP cannot do this. You'll have to use JavaScript in the browser window. Something like ?php $file = $P/$F; header(Content-Description: File Transfer); header(Content-Type: application/force-download); header(Content-Disposition: attachment; filename=.basename($file)); @readfile($file); ? script language=JavaScript window.close(); /script -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Odd behaviour of non-existent keys?
Geoff Caplan wrote: Michael Sims wrote: IMHO what you have described is a bug in PHP, and if I were you, I'd report it as such. If it's not a bug it at least has a very high WTF factor. Problem with reporting is that I am using Debian Test and the current PHP version is too old to report. If someone with an current PHP version could replicate the problem, let me know and I will report it. Here is the code: [snip] I've replicated it in version 4.3.8, as well as five other previous versions (I always keep my build directories around for a while on my development server.) Here's a suggestion so that you don't have to depend on other people to reproduce it for you (and in case one of the PHP maintainers asks you to try a snapshot): Download the PHP tarball you want to test with (4.3.8 or snapshot or whatever) and extract it in your home directory, then configure it and run make. Then create your test script as a CLI script and make the shebang line: #!/home/your-home-dir/php-version/sapi/cli/php This allows you to test with whatever version you wish without having to actually install it. FWIW... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web functional testing tools?
Doug, What do people recommend for the functional testing of PHP data-driven apps? (By functional testing I mean testing the application as a whole, as opposed to unit testing.) DK http://www.lastcraft.com/simple_test.php#web I'm aware of SimpleTest, but it's very much a unit testing framework. As I say, my interest in this thread is with functional testing: the testing of the application as a whole... -- Geoff Caplan Vario Software Ltd (+44) 121-515 1154 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Odd behaviour of non-existent keys?
Thanks for your help, everyone, especially Michael Sims. I've reported the bug: http://bugs.php.net/bug.php?id=29848 -- Geoff Caplan Vario Software Ltd (+44) 121-515 1154 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: crypt()
Thanks for the tip, it worked great, however everything I have been reading says that md5 is only one way. The way I have setup my app is the database contains the encrypted version of what the user entered as their password. Then on my login page there is an if statement that encrypts what the user is entering as their password and then checking that against what is in the database for them. This is working great!...Thanks again. My registration page is where the password gets encrypted and then sent to the database. After the user registers and I accept them as a user they recieve an email containing their username and password. But the password is encrypted. Is there a way to decrypt the encrypted password in the database? Or am I going about this wrong? Thanks again for your help. Aaron Torsten Roehr [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Aaron Todd [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have developed a PHP based site that requires users to login. Their login information is kept in a MYSQL database. Currently, I am using an IF statement to verify what the user enters as their password with what is in the the database. If they are the same a session is created and they have access to the content of the site. As far as I know the password is being sent to the script in clear text and I was wondering what a good way would be to get this to be encrypted. My first thought is to encrypt the password in the database using crypt(). So if I view the table I will see the encrypted characters. Then change the IF statement to encrypt the password that the user enters and then just check if its the same as what is in the database. That sounds like the same as I am doing now only instead of checking a password that is a name, its checking the encrypted characters of the name. So it seems my idea would hide the real characters. Can anyone tell me if this is a bad idea. And maybe point me toward a good one. Thanks, Aaron Hi Aaron, encrypting passwords in the database is generally a good idea. You can use md5() as an alternative to crypt(). MySQL itself has an MD5 function you can directly use in your SQL statements. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Setcookie variable use issue after moving php app to different se rver
Hello, We are trying to move our php app to a different server. For some reason, when we type in the login/password/account number info and click submit, it does not seem to set the variables. The webpage portion that collects the login/password/account looks like the following: tr tdbusername:/b/td tdinput type="text" name="UserName" value="?php echo $UserName ?" maxlength=8 class="form_style" /td /tr tr tdbpassword:/b/td tdinput type="password" name="Password" class="form_style"/td /tr tr td colspan="2" align="center" font color='gray' size=1Username and Password are case sensitive./font /td /tr tr td colspan="2" align="center"font color='red'?php echo $status; ?/font/td /tr tr td colspan="2" align="right" input type="submit" name="Submit" value=" Login " style="font-weight:bold;" /td /tr It looks like the value= line for user name puts the text the user types into in the $UserName variable (or is this setting a default value if $UserName exists?). The password line does not have this. Either way, this setup works fine on the original server. At the top of the index.php page, it then has php code like the following: ?php setcookie ("ccp_logged_in"); setcookie ("ccp_username"); setcookie ("ccp_uid"); setcookie ("ccp_fname"); setcookie ("ccp_lname"); setcookie ("ccp_access"); setcookie ("ccp_company"); setcookie ("ccp_account"); setcookie ("ccp_maccount"); setcookie ("ccp_master"); //Get Global Variable Settings require("internet/include/global.php"); / Open a Database connection to the MySQL Database / if ($UserName != ""){ $link = mysql_connect($SERVERNAME, $DB_USER, $DB_PWD) or die ("Could not Connect"); mysql_select_db ($DB) (code continues on to validate user and then if approved, goes to another page called page2.php) Note: The submit action is to go back to itself (index.php). It never gets in here as if $UserName is not set (at least that is what I think is going on because if I put $UserName = someuser/$Password=password/$AccountNo=someacctno just before the if...then statement, it validates and moves on to page2.php). If I hardcode set these (which is not an option for use..just for troubleshooting), it goes to page2.php, with the cookies, which I checked with print_r option. However, it has a if ($ccs_logged_in = 1) check that fails, even though the print_r shows it is set to 1 as if it is notusing the cookie. I am fairly new to php, so I do not know if I am supposed to capture the ccs_logged_in cookie value and assign it to $ccs_logged_in variable. I am not doing this because, well, it is working as such on the other server. Can anybody please help me understand what is goingon with these php pages? This electronic message transmission contains information from the office of David Shapiro, ITC^DeltaCom, Inc., which may be confidential or privileged. The information is intended to be for the use of the individual or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify us by telephone 1-919-865-6955 or by electronic mail [EMAIL PROTECTED] immediately. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Get Value
On Thu, 26 Aug 2004 09:41:28 +0530, in php.general [EMAIL PROTECTED] (Syed Ghouse) wrote: Will anybody tell me how to extract the value (say Google) from the code below: a href=www.google.comGoogle(value to extract)/a Instead of using regular expressions (and taking care of all exceptions), you might want to use xml_parser_create(), since you essentially want to parse the contents of a tag. I simply don't think that regular expressions is the right tool here (and the complexity of the regular expression when all exceptions has been taken care of is unnecessary). Works fine under PHP4 and PHP5: ?php $string = 'a href=doc.php?id=13 target=_blank title=go go goblabla/a'; $x = xml_parser_create(); xml_parse_into_struct($x,$string,$array); // href will be available in $array[0]['attributes']['HREF'] ? If you are curious, you could add: ?php print pre; var_dump($array[0]['attributes']); print /pre; print hr; print pre; var_dump($array); print /pre; ? But look at $array[0]['attributes']['HREF'] for the link. -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Exporting Dbase to CSV
I've seen many different posts on this subject and try as I might I can't get my data to output to CSV for a user to save. I can output to a table, I can output to screen in CSV format but that just means massing about with copy and paste. Has anyone got any suggestions...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: crypt()
On Thu, 2004-08-26 at 15:01, Aaron Todd wrote: Thanks for the tip, it worked great, however everything I have been reading says that md5 is only one way. The way I have setup my app is the database contains the encrypted version of what the user entered as their password. Then on my login page there is an if statement that encrypts what the user is entering as their password and then checking that against what is in the database for them. This is working great!...Thanks again. My registration page is where the password gets encrypted and then sent to the database. After the user registers and I accept them as a user they recieve an email containing their username and password. But the password is encrypted. Is there a way to decrypt the encrypted password in the database? Or am I going about this wrong? Send the password before it gets encrypted and put into the database. You can't decrypt an md5 encrypted password. Ian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is javascript enable?
snip From: Thomas Goyne [EMAIL PROTECTED] It is quite literally impossible to enforce security with JS. Anything you try to do I could get around with Proxomitron and/or Opera. -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ /snip So far, i´m forced to agree with you, but i believe this is a big lost for web! [s] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Closing my Window after Download
At 09:14 AM 8/26/2004, PHP Junkie wrote: Ave, Trust me John, I would not post here without trying out many javascript functions first. In fact, the reason I posted here is because I began to think that a PHP script like that won't allow the window to close, because from window.close() to self.close() to various Timeout Close scripts, I've tried many javascript functions. I don't get any errors ... The window just doesn't close... On 8/24/04 2:09 PM, John Nichel [EMAIL PROTECTED] wrote: PHP Junkie wrote: Ave, The browser window which launched the Save As window... PHP cannot do this. You'll have to use JavaScript in the browser window. Something like ?php $file = $P/$F; header(Content-Description: File Transfer); header(Content-Type: application/force-download); header(Content-Disposition: attachment; filename=.basename($file)); @readfile($file); ? script language=JavaScript window.close(); /script Here, try this JS: function close_opener() { parentwin = window.self; // Make handle for current window named parentwin parentwin.opener = window.self;// Tell current window that it opened itself parentwin.close(); // Close window's parent (e.g. the current window) } HTH - Miles Thompson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Popup with recent IE updates
A couple of sites are reporting problems with pages which include .css style pop-ups. The information is being displayed at the top of the page rather than in a pop-up. This seems to be happening on sites where recent IE 'security fixes' have been applied. Anybody else starting to see it, and more important, anybody got a fix ( other than our usual suggestion to switch to Mozilla ;) ) As far as I can see the html generated by PHP for the pages is the same, but I'm just cross checking that. -- Lester Caine - L.S.Caine Electronic Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] download filesize problem with IE
Not sure if this is just a problem with MS IE, or if there's something I need to set in my php.ini. I've got some large zip files sitting in a directory in my website for my clients to download (no these aren't programs for warez but images for the graphics industry). One of the zip files is 78 MB. When using MS IE6 and when I right click the link for that zip file to download it (then 'File Save As), IE gives back an error message that IE cannot download ... path/filename from website.net and IE was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later. However, if I try the same thing with a much smaller zip file, it works in IE. And of course, if I use any other browser but IE, then it works perfect no matter what the file size. So it seems to be a combination of MS IE and large file size. In my php.ini, I've got: post_max_size = 100M upload_max_filesize = 100M Is there anything else I need to do in php.ini? Mime settings or execution times? Or is this just another shortcoming in IE? And if so, is it editable? Many thanks Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ini_set('include_path') and require_once()
The error message hints that something is wrong with your include path. (include_path='.:..') Also, when you say `ini_set(include_path, ../../php)` you are overwriting the entire include path rather than appending your path to it. Try this: ?php echo get_include_path(); set_include_path(get_include_path() . ':/full/path/to/your/includes'); echo get_include_path(); ? I would use the full system path rather than a relative path. Using echo get_include_path() should give you an idea what's going on. http://www.php.net/manual/en/function.set-include-path.php Jim Grill - Original Message - From: BigSmoke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 26, 2004 6:56 AM Subject: [PHP] ini_set('include_path') and require_once() Hi, In the following code, require_once() borks, complaining: Failed opening required 'includes/companies.php' (include_path='.:..') ini_set(include_path, ../../php); require_once('includes/common.php'); require_once('includes/validate.php'); require_once('includes/company.php'); require_once('includes/companies.php'); The strange thing is: I have other code where this same method _does_ appear to work. Anyone care to enlighten me? I'm using PHP 4.3.8. BigSmoke Smokes your problems, coughs fresh air PS: I was not sure in which newsgroups to (cross-)post this. I thought, it might be better fit for php.version4, but, since I wasn't sure, I decided on php.general. -- 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] Exporting Dbase to CSV
[snip] I've seen many different posts on this subject and try as I might I can't get my data to output to CSV for a user to save. I can output to a table, I can output to screen in CSV format but that just means massing about with copy and paste. Has anyone got any suggestions...? [/snip] What, exactly, do you mean? A CSV file that resembles a spreadsheet? A doc with CSV? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Exporting Dbase to CSV
Hi, Depending on which database you're using, there is the UNLOAD function. Do a google for it, should find the answers. I've seen many different posts on this subject and try as I might I can't get my data to output to CSV for a user to save. I can output to a table, I can output to screen in CSV format but that just means massing about with copy and paste. Has anyone got any suggestions...? -Dan Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Setcookie variable use issue after moving php app to different server
From: Shapiro, David We are trying to move our php app to a different server. For some reason, when we type in the login/password/ account number info and click submit, it does not seem to set the variables. The magic 8-ball says register_globals is OFF on the new server... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web functional testing tools?
On Thu, Aug 26, 2004 at 01:35:00PM +0100, Geoff Caplan wrote: Doug, What do people recommend for the functional testing of PHP data-driven apps? (By functional testing I mean testing the application as a whole, as opposed to unit testing.) DK http://www.lastcraft.com/simple_test.php#web I'm aware of SimpleTest, but it's very much a unit testing framework. As I say, my interest in this thread is with functional testing: the testing of the application as a whole... SimpleTest's WebTester package is definitely an acceptance/functional testing framework. If you'd prefer not to specify your test's in PHP you could look at something like Canoo WebTest which uses XML. If you can elaborate on what SimpleTest is lacking I might be able to point you in another direction. Regards, Doug -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Exporting Dbase to CSV
I'm using MySQL Jay I can present the results in a table easy enough and if I replace the TD TAGs with commas etc. I get a screen output that resembles a CSV file but need to go that one step further and don't know how... -- - Michael Mason Arras People www.arraspeople.co.uk - Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] I've seen many different posts on this subject and try as I might I can't get my data to output to CSV for a user to save. I can output to a table, I can output to screen in CSV format but that just means massing about with copy and paste. Has anyone got any suggestions...? [/snip] What, exactly, do you mean? A CSV file that resembles a spreadsheet? A doc with CSV? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Exporting Dbase to CSV
I'm using MySQL Dan I can present the results in a table easy enough and if I replace the TD TAGs with commas etc. I get a screen output that resembles a CSV file but need to go that one step further and don't know how... -- - Michael Mason Arras People www.arraspeople.co.uk - Dan Joseph [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Depending on which database you're using, there is the UNLOAD function. Do a google for it, should find the answers. I've seen many different posts on this subject and try as I might I can't get my data to output to CSV for a user to save. I can output to a table, I can output to screen in CSV format but that just means massing about with copy and paste. Has anyone got any suggestions...? -Dan Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] download filesize problem with IE
[snip] I've got some large zip files sitting in a directory in my website for my clients to download (no these aren't programs for warez but images for the graphics industry). One of the zip files is 78 MB. When using MS IE6 and when I right click the link for that zip file to download it (then 'File Save As), IE gives back an error message that IE cannot download ... path/filename from website.net and IE was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later. However, if I try the same thing with a much smaller zip file, it works in IE. And of course, if I use any other browser but IE, then it works perfect no matter what the file size. So it seems to be a combination of MS IE and large file size. In my php.ini, I've got: post_max_size = 100M upload_max_filesize = 100M Is there anything else I need to do in php.ini? Mime settings or execution times? Or is this just another shortcoming in IE? And if so, is it editable? [/snip] You'll note the difference between UPLOAD and DOWNLOAD. With PHP there is some control you have over the UPLOAD portion of the show. For the DOWLOAD in the manner you described it is not a PHP issue. The error - IE was not able to open this Internet site. The requested site is either unavailable or cannot be found. indicates that the file may not be where you think it is (check the path) or that there is something wrong with the availability of the file. Make sure the permissions are proper. A quick google of IE large file download problems revealed some information, but it did not seem relevant to your problem. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML_sql2xml
Hello, I am trying to install XML_sql2xml I followed the directions to install XML_sql2xml at: http://php.chregu.tv/sql2xml I used pear and typed: pear install XML_sql2xml The result I got was: No release with state eqal to: 'stable' found for 'XML_sql2xml' Is there someplace that the php class file can be downloaded from and manually installed? Anybody know? -Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Popup with recent IE updates
and what has this got to do with PHP? Lester Caine wrote: A couple of sites are reporting problems with pages which include .css style pop-ups. The information is being displayed at the top of the page rather than in a pop-up. This seems to be happening on sites where recent IE 'security fixes' have been applied. Anybody else starting to see it, and more important, anybody got a fix ( other than our usual suggestion to switch to Mozilla ;) ) As far as I can see the html generated by PHP for the pages is the same, but I'm just cross checking that. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] download filesize problem with IE
From: Kevin Coyner [EMAIL PROTECTED] I've got some large zip files sitting in a directory in my website for my clients to download (no these aren't programs for warez but images for the graphics industry). One of the zip files is 78 MB. When using MS IE6 and when I right click the link for that zip file to download it (then 'File Save As), IE gives back an error message that IE cannot download ... path/filename from website.net and IE was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later. Is this over SSL and/or are you using sessions? I've came across problems like this before and the solution was changing the session.cache_limiter, IIRC. Although my issue did not depend upon large file sizes, it happened for any file. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Setcookie variable use issue after moving php app to different se rver
your message is multipart/alternative - please do not send them to mailing lists. your signatue should have '--' on a line before it's start. you might want to read the newby guide and try again. Shapiro, David wrote: Hello, We are trying to move our php app to a different server. For some reason, when we type in the login/password/account number info and click submit, it does not seem to set the variables. The webpage portion that collects the login/password/account looks like the following: tr tdbusername:/b/td tdinput type=text name=UserName value=?php echo $UserName ? maxlength=8 class=form_style /td /tr tr tdbpassword:/b/td tdinput type=password name=Password class=form_style/td /tr tr td colspan=2 align=center font color='gray' size=1Username and Password are case sensitive./font /td /tr tr td colspan=2 align=centerfont color='red'?php echo $status; ?/font/td /tr tr td colspan=2 align=right input type=submit name=Submit value= Login style=font-weight:bold; /td /tr It looks like the value= line for user name puts the text the user types into in the $UserName variable (or is this setting a default value if $UserName exists?). The password line does not have this. Either way, this setup works fine on the original server. At the top of the index.php page, it then has php code like the following: ?php setcookie (ccp_logged_in); setcookie (ccp_username); setcookie (ccp_uid); setcookie (ccp_fname); setcookie (ccp_lname); setcookie (ccp_access); setcookie (ccp_company); setcookie (ccp_account); setcookie (ccp_maccount); setcookie (ccp_master); //Get Global Variable Settings require(internet/include/global.php); / Open a Database connection to the MySQL Database / if ($UserName != ){ $link = mysql_connect($SERVERNAME, $DB_USER, $DB_PWD) or die (Could not Connect); mysql_select_db ($DB) (code continues on to validate user and then if approved, goes to another page called page2.php) Note: The submit action is to go back to itself (index.php). It never gets in here as if $UserName is not set (at least that is what I think is going on because if I put $UserName = someuser/$Password=password/$AccountNo=someacctno just before the if...then statement, it validates and moves on to page2.php). If I hardcode set these (which is not an option for use..just for troubleshooting), it goes to page2.php, with the cookies, which I checked with print_r option. However, it has a if ($ccs_logged_in = 1) check that fails, even though the print_r shows it is set to 1 as if it is not using the cookie. I am fairly new to php, so I do not know if I am supposed to capture the ccs_logged_in cookie value and assign it to $ccs_logged_in variable. I am not doing this because, well, it is working as such on the other server. Can anybody please help me understand what is going on with these php pages? This electronic message transmission contains information from the office of David Shapiro, ITC^DeltaCom, Inc., which may be confidential or privileged. The information is intended to be for the use of the individual or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify us by telephone 1-919-865-6955 or by electronic mail [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] immediately. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To
Re: [PHP] fatal error undefined call to mysql_connect
Ok I found out that php is installed as an RPM so do activate mysql? thanks Angelo Zanetti Z Logic [c] +27 72 441 3355 [t] +27 21 464 1363 [f] +27 21 464 1371 www.zlogic.co.za John Nichel [EMAIL PROTECTED] 08/25/04 4:44 PM Angelo Zanetti wrote: so to include the mysql extensions to I have to reinstall PHP or can I simply just change the values in the PHP.ini file for the mysql entries? Thanks to those who responded How did you install php? RPM (or similiar package), or source? If you installed from RPM, you can add the php-mysql rpm, and restart your web server. If you installed from source, you'll have to recompile php (hopefully you're using apxs). -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Disclaimer This e-mail transmission contains confidential information, which is the property of the sender. The information in this e-mail or attachments thereto is intended for the attention and use only of the addressee. Should you have received this e-mail in error, please delete and destroy it and any attachments thereto immediately. Under no circumstances will the Cape Technikon or the sender of this e-mail be liable to any party for any direct, indirect, special or other consequential damages for any use of this e-mail. For the detailed e-mail disclaimer please refer to http://www.ctech.ac.za/polic or call +27 (0)21 460 3911 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re:[PHP] imap_search and results
Hello: Here is my code : /---/ $mails = imap_search($mbox, 'TO gentoo-user-[EMAIL PROTECTED]',SE_UID); echo sizeof($mails); /--/ You can start to parse the mailheader,mailbody... for($i=0;$icount($mails);$i++) { [EMAIL PROTECTED]($mbox,$mails[$x-1]); echo $subject=$h-subject; echo $sender=$h-from[0]; echo BR; } Hi, nice to meet you! -- ¡»From: [EMAIL PROTECTED] http://fonn.fongming.idv.tw [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imap_search and results
On Thu, 26 Aug 2004 22:25:00 +0800, fongming [EMAIL PROTECTED] wrote: Hello: Here is my code : /---/ $mails = imap_search($mbox, 'TO gentoo-user-[EMAIL PROTECTED]',SE_UID); echo sizeof($mails); /--/ You can start to parse the mailheader,mailbody... for($i=0;$icount($mails);$i++) { [EMAIL PROTECTED]($mbox,$mails[$x-1]); echo $subject=$h-subject; echo $sender=$h-from[0]; echo BR; } Hi, nice to meet you! -- ¡»From: [EMAIL PROTECTED] http://fonn.fongming.idv.tw [EMAIL PROTECTED] Thank you, I have finally found what is the thing which was the problem, it was the option SE_UID in the search function. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Popup with recent IE updates
Raditha Dissanayake wrote: and what has this got to do with PHP? Lester Caine wrote: A couple of sites are reporting problems with pages which include .css style pop-ups. The information is being displayed at the top of the page rather than in a pop-up. This seems to be happening on sites where recent IE 'security fixes' have been applied. Anybody else starting to see it, and more important, anybody got a fix ( other than our usual suggestion to switch to Mozilla ;) ) As far as I can see the html generated by PHP for the pages is the same, but I'm just cross checking that. The PHP application is working fine everywhere else. If you are bothered about me asking for help getting it working with crappy browsers just don't bother to post at all -- Lester Caine - L.S.Caine Electronic Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Setcookie variable use issue after moving php app to di fferent server
Thanks for pointing in the hopefully the right direction. I see in /etc/php.ini the following: ; - register_globals = Off [Security, Performance] I put below this line: register_globals = On And I restarted apache. However, it did not seem to resolve the issue, although I still think this sounds right. Do I implement the turning on of the register_globals correctly, or do I need to do something different? David -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED] Sent: Thursday, August 26, 2004 9:53 AM To: Shapiro, David; [EMAIL PROTECTED] Cc: Perry, Joe (ITCD) Subject: Re: [PHP] Setcookie variable use issue after moving php app to different server From: Shapiro, David We are trying to move our php app to a different server. For some reason, when we type in the login/password/ account number info and click submit, it does not seem to set the variables. The magic 8-ball says register_globals is OFF on the new server... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Setcookie variable use issue after moving php app to different server
From: Shapiro, David [EMAIL PROTECTED] Thanks for pointing in the hopefully the right direction. I see in /etc/php.ini the following: ; - register_globals = Off [Security, Performance] I put below this line: register_globals = On And I restarted apache. However, it did not seem to resolve the issue, although I still think this sounds right. Do I implement the turning on of the register_globals correctly, or do I need to do something different? That's the right method, but you may not have edited the correct php.ini. Create a PHP page that only has ?php phpinfo(); ? as the source. Load that page and it'll show you all of the setting PHP is currently using along with the location of the php.ini file it's getting the configuration from. The php.ini file will be listed in the first table that's shown. If there is a full path including php.ini at the end, then that's the right file. If it's just a path, then that's where PHP is expecting to find php.ini, but did not. Hope that helps. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ini_set('include_path') and require_once()
BigSmoke wrote: Hi, In the following code, require_once() borks, complaining: Failed opening required 'includes/companies.php' (include_path='.:..') ini_set(include_path, ../../php); require_once('includes/common.php'); require_once('includes/validate.php'); require_once('includes/company.php'); require_once('includes/companies.php'); Try setting it to the full path. ini_set ( include_path, /path/from/root/php ); -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Exporting Dbase to CSV
[snip] I'm using MySQL Jay I can present the results in a table easy enough and if I replace the TD TAGs with commas etc. I get a screen output that resembles a CSV file but need to go that one step further and don't know how... [/snip] Use CSV (without the table thing) and place Excel header definitions in the script header(Content-Type: application/vnd.ms-excel); header(Content-Disposition: inline; filename=\excel.xls\); header(Expires: 0); header(Cache-Control: must-revalidate, post-check=0, pre-check=0); and then an example from one of our spreadsheet outputs print($rowage-TmsNoLines . ,); print($rowage-TmsStatus . ,); print($rowage-TmsPaidDate . ,); print(number_format($rowage-Current, 2, '.', '') . ,); print(number_format($rowage-Thirty, 2, '.', '') . ,); print(number_format($rowage-Sixty, 2, '.', '') . ,); print(number_format($rowage-Ninety, 2, '.', '') . ,); print(number_format($rowage-OneTwenty, 2, '.', '') . ,\n); We usually make the link open in a new window when outputting sheets like this. All the user needs to do is save it locally at that poiint. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is javascript enable?
[EMAIL PROTECTED] wrote: Try phpsniff at http://phpsniff.sourceforge.net/. It not only detects javascript using PHP, but many other things as well. You will wonder how you lived without it. It's pretty cool... Navid It doesn't tell you if JavaScript is enabled, only if the browser supports it. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Exporting Dbase to CSV
Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm using MySQL Jay I can present the results in a table easy enough and if I replace the TD TAGs with commas etc. I get a screen output that resembles a CSV file but need to go that one step further and don't know how... Please specify what you mean with one step further? You can assign the contents to a variable and write it to a file. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Popup with recent IE updates
raditha dissanayake wrote: and what has this got to do with PHP? Lester Caine wrote: A couple of sites are reporting problems with pages which include .css style pop-ups. The information is being displayed at the top of the page rather than in a pop-up. This seems to be happening on sites where recent IE 'security fixes' have been applied. Anybody else starting to see it, and more important, anybody got a fix ( other than our usual suggestion to switch to Mozilla ;) ) As far as I can see the html generated by PHP for the pages is the same, but I'm just cross checking that. The OP mentioned PHP in his message. ;) -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: XML_sql2xml
Brian Anderson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I am trying to install XML_sql2xml I followed the directions to install XML_sql2xml at: http://php.chregu.tv/sql2xml I used pear and typed: pear install XML_sql2xml The result I got was: No release with state eqal to: 'stable' found for 'XML_sql2xml' Is there someplace that the php class file can be downloaded from and manually installed? Anybody know? -Brian Hi Brian, I found this link on the page you mentioned: http://pear.php.net/package-info.php?pacid=18 Click on download, download the archive and extract it to your PEAR directory. Best regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web functional testing tools?
Doug, DK SimpleTest's WebTester package is definitely an acceptance/functional DK testing framework. If you'd prefer not to specify your test's in PHP you DK could look at something like Canoo WebTest which uses XML. Apologies: I had overlooked the WebTester functionality within SimpleTest. I'll check it out in more detail. DK If you can elaborate on what SimpleTest is lacking I might be able to DK point you in another direction. I'm fairly new to this field, so I'm still feeling my way, but I guess my requirements are similar to anyone else building a fairly complex ecommerce application: fill and submit forms using the full range of HTML widgets, submit and check cookies, gets and posts, check changes to data (in Postgres), check for patterns in pages, organise groups of related tests, follow redirects etc etc. The requirement to run checks on the database suggests that a server-side solution would be the way to go. Obviously, a key issue is keeping the tests robust in the face of changes to the application. I need to be able to change a link label, for example, without breaking the test-suite. I am trying to avoid anything that requires a complex Java setup or Eclipse: I don't have the relevant skills. The best options I have found so far, in addition to SimpleTest, are: **Puffin** Pure Python framework, so easy to extend (I know a bit of Python). Looks very powerful, but not much current activity and documentation is minimal: http://www.puffinhome.org/what.htm **Canoo** Which you obviously know. http://webtest.canoo.com/webtest/manual/WebTestHome.html **TestCase**, which looks powerful - but requires that you model the whole site in UML, which is not the way I prefer to work: http://www5f.biglobe.ne.jp/~webtest/testcasetool/index.html Is there anything I have overlooked? The problem I am facing is that it will take a few days to do a full evaluation of the options and I am pressed for time. Any advice that you could offer that would help accelerate the process would be most welcome... -- Geoff Caplan Vario Software Ltd (+44) 121-515 1154 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re:[PHP] imap_search and results
On Thu, 2004-08-26 at 09:25, fongming wrote: for($i=0;$icount($mails);$i++) { [EMAIL PROTECTED]($mbox,$mails[$x-1]); echo $subject=$h-subject; echo $sender=$h-from[0]; echo BR; } Calling count() every time the for loop iterates is inefficient. $count = count($mails); for($i=0; $i$count; $i++){ } -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: exploding
M. Sokolewicz wrote: Jake McHenry wrote: Hi everyone. Is there a way to explode by every character in the variable? Example: $var = 8; $test = explode(, $var); output would be $test[0] = 0; $test[1] = 0; $test[2] = 0; $test[3] = 0; $test[4] = 8; Can I get an array like that? Thanks, Jake McHenry MIS Coordinator Nittany Travel http://www.nittanytravel.com 570.748.6611 x108 well, you can access strings like arrays already. So instead of exploding you can already do something like $var = 15 is a number; $var[2] = 7; echo $var; // will output: 17 is a number same way goes for accessing them In PHP5, the square brackets have been replaced with the curly ones (the square brackets still works, but it's deprecated) $string = 12345; echo $string{2}; // 3 -- Daniel Schierbeck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] download filesize problem with IE
At the moment you're talking about two different things - uploading and downloading. Your IE download problem has nothing to do with the php.ini settings for uploaded file sizes. There is nothing you can do with PHP to resolve the download problem. I have experienced the same problems with files over about 32Mb with the last batch of IE updates. It simply isn't capable of downloading such files any more. My employer (name withheld) has *very* recently decided that the officially supported browser is Mozilla, and support for IE will be dropped quite soon simply because Mozilla works and IE causes too many problems. regards Markus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Setcookie variable use issue after moving php app to di fferent server
You certainly know your stuff. Unfortunatley, it says that is uses /etc/php.ini, which I did modify, but it also reports register_globals as still off too. It does show a scan dir for additional .ini files (/etc/php.d and additional ini files parsed as ldap.ini, mysql.ini, and odbc.ini too, but I don't think they would have anything to do with it. I'm stumped. Other than adding the entry and stop/starting apache, is there anything else I need to go? David -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED] Sent: Thursday, August 26, 2004 10:49 AM To: Shapiro, David; [EMAIL PROTECTED] Cc: Perry, Joe (ITCD) Subject: Re: [PHP] Setcookie variable use issue after moving php app to different server From: Shapiro, David [EMAIL PROTECTED] Thanks for pointing in the hopefully the right direction. I see in /etc/php.ini the following: ; - register_globals = Off [Security, Performance] I put below this line: register_globals = On And I restarted apache. However, it did not seem to resolve the issue, although I still think this sounds right. Do I implement the turning on of the register_globals correctly, or do I need to do something different? That's the right method, but you may not have edited the correct php.ini. Create a PHP page that only has ?php phpinfo(); ? as the source. Load that page and it'll show you all of the setting PHP is currently using along with the location of the php.ini file it's getting the configuration from. The php.ini file will be listed in the first table that's shown. If there is a full path including php.ini at the end, then that's the right file. If it's just a path, then that's where PHP is expecting to find php.ini, but did not. Hope that helps. ---John Holmes... -- 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] Setcookie variable use issue after moving php app to different server
From: Shapiro, David [EMAIL PROTECTED] You certainly know your stuff. Unfortunatley, it says that is uses /etc/php.ini, which I did modify, but it also reports register_globals as still off too. It does show a scan dir for additional .ini files (/etc/php.d and additional ini files parsed as ldap.ini, mysql.ini, and odbc.ini too, but I don't think they would have anything to do with it. I'm stumped. Other than adding the entry and stop/starting apache, is there anything else I need to go? That should be all you have to do. Does it say that the local and master values are both OFF, still? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sharing records with assigned users
Ave, I'm working on a Phonebook Application for my company. Much of it's functions and application are pretty much clear and workable for me. But there's one aspect which I'm trying to figure out. It's a multi-user application where there's 2 kinds of users... Admin User. The User can only view, add, edit, browse through his own records. Each user does get a public private option, wherein the user can make the record either private, so only he can see it, or public which anybody can view. The Admin can do absolutely anything. There is one feature that Admin gets which I'm trying to figure out. When the Admin is adding a record, he gets to decide which users he wants to share the record with. He can choose particular Users by clicking on their name to share that record with. How do I make that happen? Any suggestions? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Setcookie variable use issue after moving php app to di fferent server
Yes, I am afraid so. Both are marked as off. -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED] Sent: Thursday, August 26, 2004 12:08 PM To: Shapiro, David; [EMAIL PROTECTED] Cc: Perry, Joe (ITCD) Subject: Re: [PHP] Setcookie variable use issue after moving php app to different server From: Shapiro, David [EMAIL PROTECTED] You certainly know your stuff. Unfortunatley, it says that is uses /etc/php.ini, which I did modify, but it also reports register_globals as still off too. It does show a scan dir for additional .ini files (/etc/php.d and additional ini files parsed as ldap.ini, mysql.ini, and odbc.ini too, but I don't think they would have anything to do with it. I'm stumped. Other than adding the entry and stop/starting apache, is there anything else I need to go? That should be all you have to do. Does it say that the local and master values are both OFF, still? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Popup with recent IE updates
On Thursday 26 August 2004 22:37, Lester Caine wrote: Lester Caine wrote: The PHP application is working fine everywhere else. If you are bothered about me asking for help getting it working with crappy browsers just don't bother to post at all OK here are the 'facts': - This seems to be happening on sites where recent IE 'security fixes' - The PHP application is working fine everywhere else. What can one reasonably conclude from the above? I would suggest you find out what the IE updates were and figure out how it affected your pages. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Everywhere I look I see NEGATIVITY and ASPHALT ... */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with front page files downloaded to dev machine
Hi all: I downloaded files via FTP from a site published with FrontPage and active Front Page extensions. When I try to run them on my local machine, php files are not recognized and parsed by Apache. IE gives me the save to dialog and Mozilla displays binary garbage. Checking the FTP log, it says that they have been downloaded in ASCII mode. I even tried a backup on the machine and download as tar file with the same result. Any ideas what could cause the Apache php parser to not recognize this? I am running Apache 1.3.23 on W2K with PHP 4.3.4. TIA Gunter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTTP_POST Intermittent Problem
I'm using the code below and about a third of the posts aren't getting through. We have no idea why and don't know where to start to trouble shoot. Any ideas? Thanks. Jeff function http_post($host, $path, $data) { $http_response = ''; $content_length = strlen($data); $fp = fsockopen($host, 80); fputs($fp, POST $path HTTP/1.1\r\n); fputs($fp, Host: $host\r\n); fputs($fp, Content-Type: application/x-www-form-urlencoded\r\n); fputs($fp, Content-Length: $content_length\r\n); fputs($fp, Connection: close\r\n\r\n); fputs($fp, $data); while (!feof($fp)) { $http_response .= fgets($fp, 128); } fclose($fp); return $http_response; } $http_response = http_post('www.blah.com', '/test.aspx?', 'data'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Anyone ever use ToolBook to be client to PHP server scripts?
I'm trying to connect a ToolBook cleint to send via HTTP Post some user information but I'm having trouble making the connection. I'm sending variables with TB HTTP Post but they don't seem to get to the PHP script I'm sending them to. In my php script I'm trying to get the data sent to it using #HTTP_POST_VARS. Also, I'm trying to send an acknowledgement back to ToolBook with header() function. Does this make sense? Am I on the right track here? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Popup with recent IE updates
Jason Wong wrote: Lester Caine wrote: The PHP application is working fine everywhere else. If you are bothered about me asking for help getting it working with crappy browsers just don't bother to post at all OK here are the 'facts': - This seems to be happening on sites where recent IE 'security fixes' - The PHP application is working fine everywhere else. What can one reasonably conclude from the above? I would suggest you find out what the IE updates were and figure out how it affected your pages. Have updated both w2k machine on site and a local w2k machine to latest version of IE via 'Windows update'. Machine on site is still showing a problem with the div for the pop-up being displayed as text above the top of the proper page, while the local machine has no problem. No other site has a problem with the code, and only some of the machines on the problem site show a problem. Both XP and W2k machines are affected, but not all, and updating versions has not cleared problem. It is beginning to look as if the .css is being corrupted somewhere. We have tried wiping cache, and also renaming the .css file so that a different copy has to be used, all without success. Loading Mozilla on the problem machines gives a clean page with the correct pop-up's so I simply don't know what to try next. When this sort of thing was happening during development it was usually tracked to faulty PHP, but that is not definitely not the case this time. -- Lester Caine - L.S.Caine Electronic Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] sharing records with assigned users
[snip] There is one feature that Admin gets which I'm trying to figure out. When the Admin is adding a record, he gets to decide which users he wants to share the record with. He can choose particular Users by clicking on their name to share that record with. How do I make that happen? Any suggestions? [/snip] I am going to go a little sideways in response to your question because I believe that we should help people to learn and improve. Many people enter the PHP arena and become exposed to the shear power available to them, so they want to accomplish more and more complex apps than they would in the course of normal web site interaction. I believe at this point one makes the leap from web developer to applications developer. One of the first things an applications developer should learn is how to design an application before they write the first line of code. This requires things like flowcharting and UML. Every programming language book has several words on this. So, Junkie, what you should do is break down the the componenets into statements. The statements can then be broken down some more...into processes, decisions, etc. Once done you will know what the code is. It's very zen. 1. Admin adds record. 2. Admin chooses user type(s) that will be allowed access to record. 3. Admin saves information so that application knows. NAME ACCESS_LEVEL bhoover admin pnosehair user etc. [/off soapbox] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sharing records with assigned users
Ave, Jay.. Firstly thanks a lot for the tips. I appreciate that and in fact I do try to go methodically in most cases, even using the pen paper to create my flow charts and diagrams of what I'm about to program. I actually love that method of designing an application. In fact, for this Phonebook application as well, right here in front of me is the piece of paper in which I've tried to draw the different modules, their behaviors and the functions which I will need to create in order to make this application work intelligibly. Coming back again to my problem.. If, in the table I'm storing my records, I create a field which stores the Users allowed access to that particular record, then in case of multiple users, that single field will hold multiple user names... Which is a problem for me. And I might be applying a very wrong approach, logically, which is why I came forward for some assistance. Thanks again. On 8/26/04 1:37 PM, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] There is one feature that Admin gets which I'm trying to figure out. When the Admin is adding a record, he gets to decide which users he wants to share the record with. He can choose particular Users by clicking on their name to share that record with. How do I make that happen? Any suggestions? [/snip] I am going to go a little sideways in response to your question because I believe that we should help people to learn and improve. Many people enter the PHP arena and become exposed to the shear power available to them, so they want to accomplish more and more complex apps than they would in the course of normal web site interaction. I believe at this point one makes the leap from web developer to applications developer. One of the first things an applications developer should learn is how to design an application before they write the first line of code. This requires things like flowcharting and UML. Every programming language book has several words on this. So, Junkie, what you should do is break down the the componenets into statements. The statements can then be broken down some more...into processes, decisions, etc. Once done you will know what the code is. It's very zen. 1. Admin adds record. 2. Admin chooses user type(s) that will be allowed access to record. 3. Admin saves information so that application knows. NAME ACCESS_LEVEL bhoover admin pnosehair user etc. [/off soapbox] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] sharing records with assigned users
[snip] If, in the table I'm storing my records, I create a field which stores the Users allowed access to that particular record, then in case of multiple users, that single field will hold multiple user names... Which is a problem for me. And I might be applying a very wrong approach, logically, which is why I came forward for some assistance. [/snip] use a column for user levels (you'll only have a few) in the record and then add a column in the user table that designates what level that user is. RECORD TABLE Record IDUserLevels RecordFooadmin, user, read-only USER TABLE User Level Bob user Junkie admin Sue read-only -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP: Undefined Variables Error Message
Hello all. I just finished placing a new server in production and PHP is not working. I am getting undefined variable messages when trying to submit php based forms. Register Globals is on in php.ini, but it still does not work. I have even tried copying a known-good php.ini from another server and the same behavior exists. I am running IIS in Windows 2000. Any ideas? Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Popup with recent IE updates
Most likely this is a consequence of Windows XP SP2, one of its side effects is blocking of popups in IE. Strange, like smokers becoming non-smokers. Check Sunbelt Software for some workarounds, they identified the problem about 12 da ago. Cheers - Miles At 01:11 PM 8/26/2004, Jason Wong wrote: On Thursday 26 August 2004 22:37, Lester Caine wrote: Lester Caine wrote: The PHP application is working fine everywhere else. If you are bothered about me asking for help getting it working with crappy browsers just don't bother to post at all OK here are the 'facts': - This seems to be happening on sites where recent IE 'security fixes' - The PHP application is working fine everywhere else. What can one reasonably conclude from the above? I would suggest you find out what the IE updates were and figure out how it affected your pages. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Everywhere I look I see NEGATIVITY and ASPHALT ... */ -- 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] problem with front page files downloaded to dev machine OT
[snip] I downloaded files via FTP from a site published with FrontPage and active Front Page extensions. When I try to run them on my local machine, php files are not recognized and parsed by Apache. IE gives me the save to dialog and Mozilla displays binary garbage. Checking the FTP log, it says that they have been downloaded in ASCII mode. I even tried a backup on the machine and download as tar file with the same result. Any ideas what could cause the Apache php parser to not recognize this? I am running Apache 1.3.23 on W2K with PHP 4.3.4. [/snip] It is not a PHP problem. FrontPage and their extensions only run on M$ servers unless you are using an IIS imitator. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Looking for a TODO: parser.
I'm looking for a program that will run through a directory tree and parse all the files (ideally by extension, like *.php, *.js, *.html, *.c) and give me a formatted output (or HTML table or something useful). It should include the //TODO of course, the path/file, the line(s), and perhaps other things I'm overlooking. Maybe last time file changed/file date, and possibly the comments immediately below the //TODO: (as sometimes they take up more than a single line). Anyone know of or have built something like this... That is before I go and re-invent the wheel. This recursively gets you file path/name, line number, the matching line and the 2 that follow it. $ grep -HrnA 2 TODO: /path/to/code/root --rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP_POST Intermittent Problem
function http_post($host, $path, $data) { $http_response = ''; $content_length = strlen($data); $fp = fsockopen($host, 80); fputs($fp, POST $path HTTP/1.1\r\n); fputs($fp, Host: $host\r\n); fputs($fp, Content-Type: application/x-www-form-urlencoded\r\n); fputs($fp, Content-Length: $content_length\r\n); fputs($fp, Connection: close\r\n\r\n); fputs($fp, $data); while (!feof($fp)) { $http_response .= fgets($fp, 128); } fclose($fp); return $http_response; } $http_response = http_post('www.blah.com', '/test.aspx?', 'data'); can you use PEAR? There is already a bunch of http packages http://pear.php.net/package-search.php?pkg_name=httpbool=ANDsubmit=Search -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HTTP_POST Intermittent Problem
[snip] I'm using the code below and about a third of the posts aren't getting through. We have no idea why and don't know where to start to trouble shoot. Any ideas? Thanks. [/snip] Have you checked the http access and error logs? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] recognizing modules problem
I am in the process of installing php 5 (have never had probs with earlier versions - am running php/mysql on an apache server on my windows xp machine) and am having problems with module recognition (I especially need mysql!). I have wrestled and reinstalled php 5 several times, following assiduously all the directions - also several times. Any suggestions, help, etc., etc. would be appreciated. After two days of this, I guess I am getting frustrated! I have set the extension directory: (And the path statement in autoexec.bat) extension_dir = c:/php/ext/ The Result: DOES NOT RECOGNIZE THESE MODULES (they are in the directory, I checked, and checked spelling, etc.) extension=php_exif.dll extension=php_iconv.dll extension=php_ifx.dll extension=php_iisfunc.dll extension=php_java.dll extension=php_mcrypt.dll extension=php_mysql.dll extension=php_oci8.dll extension=php_oracle.dll extension=php_pdf.dll extension=php_sybase_ct.dll extension=php_w32api.dll extension=php_yaz.dll extension=php_zip.dll RECOGNIZED THESE MODULES extension=php_bz2.dll extension=php_cpdf.dll extension=php_curl.dll extension=php_dba.dll extension=php_dbase.dll extension=php_dbx.dll extension=php_fdf.dll extension=php_filepro.dll extension=php_gd2.dll extension=php_gettext.dll extension=php_imap.dll extension=php_interbase.dll extension=php_ldap.dll extension=php_mbstring.dll extension=php_mhash.dll extension=php_mime_magic.dll extension=php_ming.dll extension=php_msql.dll extension=php_mssql.dll extension=php_openssl.dll extension=php_pgsql.dll extension=php_shmop.dll extension=php_snmp.dll extension=php_sockets.dll extension=php_tidy.dll extension=php_xmlrpc.dll extension=php_xsl.dll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Popup with recent IE updates
On Friday 27 August 2004 01:28, Lester Caine wrote: [yada yada] Loading Mozilla on the problem machines gives a clean page with the correct pop-up's so I simply don't know what to try next. When this sort of thing was happening during development it was usually tracked to faulty PHP, but that is not definitely not the case this time. So why are you asking on the PHP list then? Look to save you looking it up: www.microsoft.com -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Remember that whatever misfortune may be your lot, it could only be worse in Cleveland. -- National Lampoon, Deteriorata */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sharing records with assigned users
On Friday 27 August 2004 01:49, PHP Junkie wrote: Coming back again to my problem.. If, in the table I'm storing my records, I create a field which stores the Users allowed access to that particular record, then in case of multiple users, that single field will hold multiple user names... Which is a problem for me. And I might be applying a very wrong approach, logically, which is why I came forward for some assistance. You have a new table which has 2 columns: record_id, user_id Then: SELECT user_id FROM new_table WHERE record_id = whatever; -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Cold hands, no gloves. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: Undefined Variables Error Message
From: Jeff - Webmaster [EMAIL PROTECTED] Hello all. I just finished placing a new server in production and PHP is not working. I am getting undefined variable messages when trying to submit php based forms. Register Globals is on in php.ini, but it still does not work. I have even tried copying a known-good php.ini from another server and the same behavior exists. I am running IIS in Windows 2000. Any ideas? Does the output of phpinfo() show that register_globals is ON? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: Undefined Variables Error Message
On Thu, 2004-08-26 at 12:55, Jeff - Webmaster wrote: Hello all. I just finished placing a new server in production and PHP is not working. I am getting undefined variable messages when trying to submit php based forms. Register Globals is on in php.ini, but it still does not work. I have even tried copying a known-good php.ini from another server and the same behavior exists. I am running IIS in Windows 2000. Any ideas? Is your error_reporting turned up too high for the quality of the code? http://www.php.net/error_reporting -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP_POST Intermittent Problem
Jay Blanchard wrote: [snip] I'm using the code below and about a third of the posts aren't getting through. We have no idea why and don't know where to start to trouble shoot. Any ideas? Thanks. [/snip] Have you checked the http access and error logs? On their end? Yes they can see each attempt to post and some that should have been posted (we know because we get confirmation email) didn't show up at all on their end. If it's on my end what would I look for? Thanks. Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP_POST Intermittent Problem
Matt M. wrote: can you use PEAR? There is already a bunch of http packages http://pear.php.net/package-search.php?pkg_name=httpbool=ANDsubmit=Search I've taken a look at that and don't know the first thing about how to implement or use it. Are there any tutorials out there? Plus, I don't know if this would solve the problem. Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: Undefined Variables Error Message
The error reporting level is the same as it was for the same websites on a different server that is working. Jeff At 11:49 AM 8/26/2004, Greg Donald wrote: On Thu, 2004-08-26 at 12:55, Jeff - Webmaster wrote: Hello all. I just finished placing a new server in production and PHP is not working. I am getting undefined variable messages when trying to submit php based forms. Register Globals is on in php.ini, but it still does not work. I have even tried copying a known-good php.ini from another server and the same behavior exists. I am running IIS in Windows 2000. Any ideas? Is your error_reporting turned up too high for the quality of the code? http://www.php.net/error_reporting -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with front page files downloaded to dev machine OT
I stripped out all the front page files and if I compare files frin a wirjubg ubstakk with WinMerge, it tells me that they are identical (at least all of the unmodified files). Can't find any invisible caracters with WinMerg in the not identical files. How does the php parser or Apache determine that these files are Frontpage and not plain php files? Any pointers to where I can find additional info would be very much appreciated. My google search didn't turn out anything useful but I might used the wrong keywords. TIA Gunter Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] I downloaded files via FTP from a site published with FrontPage and active Front Page extensions. When I try to run them on my local machine, php files are not recognized and parsed by Apache. IE gives me the save to dialog and Mozilla displays binary garbage. Checking the FTP log, it says that they have been downloaded in ASCII mode. I even tried a backup on the machine and download as tar file with the same result. Any ideas what could cause the Apache php parser to not recognize this? I am running Apache 1.3.23 on W2K with PHP 4.3.4. [/snip] It is not a PHP problem. FrontPage and their extensions only run on M$ servers unless you are using an IIS imitator. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: Undefined Variables Error Message
Jeff - Webmaster wrote: Hello all. I just finished placing a new server in production and PHP is not working. I am getting undefined variable messages when trying to submit php based forms. Register Globals is on in php.ini, but it still does not work. I have even tried copying a known-good php.ini from another server and the same behavior exists. I am running IIS in Windows 2000. Any ideas? Jeff Chances are you just have error reporting set to show warnings/notices as well as errors. Check the php.ini for this. While it is best to code so that you won't have these notices popping up, most will tell you to turn down error reporting on a production server. What would cause something like this is if I have a checkbox in a form on one page, and I don't have it checked when I submit the form, that variable won't be sent...so if I try to do something with that variable, I'll get this warning. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: Undefined Variables Error Message
From: Jeff - HarborNet [EMAIL PROTECTED] Hello all. I just finished placing a new server in production and PHP is not working. I am getting undefined variable messages when trying to submit php based forms. Register Globals is on in php.ini, but it still does not work. I have even tried copying a known-good php.ini from another server and the same behavior exists. I am running IIS in Windows 2000. Any ideas? Does the output of phpinfo() show that register_globals is ON? Yes it does show as being on. Sorry, I forgot to also put: and if it is on, show some code that produces the message you're talking about. If it says $var is undefined, where to you define $var or how do you think/feel $var is being defined? I have mind reading turned off for the time being. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] paste values for one pop-up. And this pop-up is one frame
Hello Someone now how to paste values for one pop-up. And this pop-up is one frame I am doing like this to open pop-up echoa href=\#\ class=\textblack\ onclick=\NewWindow('fact_imprime.php?factura_id=$factura_id','Ficha','700', '300','no','left');return false\ onfocus=\this.blur()\ img src=\images/imprime.gif\ width=\31\ height=\31\ border =\0\/a; And in the pop-up I do like this. echo$_REQUEST[factura_id]; Thanks for the help...
Re: [PHP] Looking for a TODO: parser.
From: Rick Fletcher [EMAIL PROTECTED] This recursively gets you file path/name, line number, the matching line and the 2 that follow it. $ grep -HrnA 2 TODO: /path/to/code/root I get a parse error when I put that in my PHP file... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: Undefined Variables Error Message
Here is a snippet of the code that is being choked on. The first failure comes from line 6: ?php $name = $_POST['name']; $address = $_POST['address']; $email = $_POST['email']; $phone = $_POST['phone']; $type = $_POST['type']; $message = $_POST['message']; The variables are being passed from an html form that calls this script with the post method. Jeff At 12:06 PM 8/26/2004, John Holmes wrote: From: Jeff - HarborNet [EMAIL PROTECTED] Hello all. I just finished placing a new server in production and PHP is not working. I am getting undefined variable messages when trying to submit php based forms. Register Globals is on in php.ini, but it still does not work. I have even tried copying a known-good php.ini from another server and the same behavior exists. I am running IIS in Windows 2000. Any ideas? Does the output of phpinfo() show that register_globals is ON? Yes it does show as being on. Sorry, I forgot to also put: and if it is on, show some code that produces the message you're talking about. If it says $var is undefined, where to you define $var or how do you think/feel $var is being defined? I have mind reading turned off for the time being. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: Undefined Variables Error Message
Another website dies on line 4 here: ?php $to = [EMAIL PROTECTED]; $subject = Swinos.com Booking Contact - $name; $headers .= MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= From: swinos.com [EMAIL PROTECTED]\r\n; $headers .= Reply-To: .$name. .$email.\r\n; $headers .= X-Priority: 1\r\n; $headers .= X-MSMail-Priority: High\r\n; $headers .= X-Mailer: iCEx Networks HTML-Mailer v1.0; $subject = stripslashes($subject); $message = stripslashes($message); $body = font face=Arial size=-1b$name/b has submited a Booking Request. brbr Name: b$name/b br Email address: $email br Phone: $phone br Business Name: $business br Venue: $venue brbr Comments: br$comments; $success = @mail($to,$subject,$body,$headers); ? At 12:06 PM 8/26/2004, John Holmes wrote: From: Jeff - HarborNet [EMAIL PROTECTED] Hello all. I just finished placing a new server in production and PHP is not working. I am getting undefined variable messages when trying to submit php based forms. Register Globals is on in php.ini, but it still does not work. I have even tried copying a known-good php.ini from another server and the same behavior exists. I am running IIS in Windows 2000. Any ideas? Does the output of phpinfo() show that register_globals is ON? Yes it does show as being on. Sorry, I forgot to also put: and if it is on, show some code that produces the message you're talking about. If it says $var is undefined, where to you define $var or how do you think/feel $var is being defined? I have mind reading turned off for the time being. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Oficial Certification
I just saw that: http://www.phparch.com/cert/
Re: [PHP] problem with front page files downloaded to dev machine OT
Please do not top post. On Friday 27 August 2004 02:58, Gunter Sammet wrote: I stripped out all the front page files and if I compare files frin a wirjubg ubstakk with WinMerge, it tells me that they are identical (at least all of the unmodified files). Can't find any invisible caracters with WinMerg in the not identical files. How does the php parser or Apache determine that these files are Frontpage and not plain php files? Any pointers to where I can find additional info would be very much appreciated. My google search didn't turn out anything useful but I might used the wrong keywords. Do any php pages work at all on your development server? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Magic is always the best solution -- especially reliable magic. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sharing records with assigned users
Ave, That makes sense... Actually I think I know exactly what you're saying and I think it's gonna work that way. Let me do this. Thanks a ton! On 8/26/04 2:42 PM, Jason Wong [EMAIL PROTECTED] wrote: On Friday 27 August 2004 01:49, PHP Junkie wrote: Coming back again to my problem.. If, in the table I'm storing my records, I create a field which stores the Users allowed access to that particular record, then in case of multiple users, that single field will hold multiple user names... Which is a problem for me. And I might be applying a very wrong approach, logically, which is why I came forward for some assistance. You have a new table which has 2 columns: record_id, user_id Then: SELECT user_id FROM new_table WHERE record_id = whatever; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: Undefined Variables Error Message
John Holmes wrote: I have mind reading turned off for the time being. It's a good thing I'm a nice guy. ;) -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] US / Canada Zip Codes List
As a online merchant I want to accept US (m.b. Canadian) Credit Cards ONLY for online payments. I am going to use Payflow Pro /PHP. How can I check US (Canada) zipcode before transaction request?
Re: [PHP] PHP: Undefined Variables Error Message
Jeff - Webmaster wrote: Another website dies on line 4 here: $headers .= MIME-Version: 1.0\r\n; Well, in this case it's becaue $headers is undefined, yet you're trying to concatinate another string to it. Thus the warning... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: Undefined Variables Error Message
Jeff - Webmaster wrote: Here is a snippet of the code that is being choked on. The first failure comes from line 6: ?php $name = $_POST['name']; $address = $_POST['address']; $email = $_POST['email']; $phone = $_POST['phone']; $type = $_POST['type']; $message = $_POST['message']; The variables are being passed from an html form that calls this script with the post method. Jeff If you're going to use the super-global $_POST, why do you need globals on? Anyway, how is 'type' passed from the previous page? Show the code for that. What type of form field is it? -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Looking for a TODO: parser.
I've only got some of my functions converted to 'doc' style comments. This seems to require all my //TODO: be up in the /** */ section. Many of my //TODO: comments are inline, say, before a loop, or in other parts of code (many are not even in functions). Hmm... Well, I'll give it a few more days to see if I get any more replies, and then I guess I'll take a stab at coding this. I'm astonished that there isn't a single parser out there that someone could suggest. It doesn't have to be written in PHP, just be able to read source code and look for what would seem to be pretty standard //TODO: comments. daevid.com -Original Message- From: Jim Grill [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 25, 2004 7:18 PM To: Daevid Vincent; [EMAIL PROTECTED] Subject: Re: [PHP] Looking for a TODO: parser. Not sure about other file types, but phpdoc includes a tag for todo. It also makes nice documentation on the fly based on your comments. http://phpdoc.org/docs/HTMLSmartyConverter/default/phpDocument or/tutorial_tags.todo.pkg.html Jim Grill - Original Message - From: Daevid Vincent [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 25, 2004 8:55 PM Subject: [PHP] Looking for a TODO: parser. I, like many other people I'm sure, put //TODO: comments in my code (inspite of M$ patent on the idea!). http://yro.slashdot.org/article.pl?sid=04/06/08/2319254tid=15 5tid=109tid= 156tid=17 I'm looking for a program that will run through a directory tree and parse all the files (ideally by extension, like *.php, *.js, *.html, *.c) and give me a formatted output (or HTML table or something useful). It should include the //TODO of course, the path/file, the line(s), and perhaps other things I'm overlooking. Maybe last time file changed/file date, and possibly the comments immediately below the //TODO: (as sometimes they take up more than a single line). Anyone know of or have built something like this... That is before I go and re-invent the wheel. D. -- 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: Undefined Variables Error Message
Intersting. This is the same pair of html and php files that was functional on another server. Can you think of any reason that could account for the difference? Jeff At 01:51 PM 8/26/2004, John Holmes wrote: Jeff - Webmaster wrote: Another website dies on line 4 here: $headers .= MIME-Version: 1.0\r\n; Well, in this case it's becaue $headers is undefined, yet you're trying to concatinate another string to it. Thus the warning... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: HTTP_POST Intermittent Problem
Hello, On 08/26/2004 02:12 PM, Jeff Oien wrote: I'm using the code below and about a third of the posts aren't getting through. We have no idea why and don't know where to start to trouble shoot. Any ideas? Thanks. Are you sure the data is always URL encoded? Anyway, some servers intentionally refuse x-form-url-encoded data and only accept multipart/form-data posts. It is odd but it was actually one user of this class that warned me. You may want to try it as it forces multipart/form-data POSTs even when you are not uploading files: http://www.phpclasses.org/httpclient -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with sessions
I am using a 4.3.2. version of PHP on Apache 1.3 Win2k. Here's the problem I've come across - when I jump from a page a.php to b.php using a href=b.phpclick here/a statement the sessions work fine but when I use PHP's header(location: b.php); expression a new session is created and the data from the previous one is lost. Anyone familiar with this problem? Any known solutions? It's been really driving me nuts! Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: Undefined Variables Error Message
Jeff - Webmaster wrote: Intersting. This is the same pair of html and php files that was functional on another server. Can you think of any reason that could account for the difference? default error_reporting levels... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem using fread with https
Hi folks. I'm getting the following error when attempting to use PEAR::HTTP_Request to check the existence of a file. It's throwing an error from fread on an https stream: Warning: fread(): SSL: fatal protocol error in /u0/local/lib/php/Net/Socket.php on line 263 Line 263 is as follows: return fread($this-fp, $size); My PHP version is 4.3.4, and it's compiled with openssl, so I can't see why this is throwing an error since according to the docs as long as openssl is compiled https is supported. Does anyone have any suggestions? Cheers and TIA, Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Keep from using cache
Here's the scenario... I am building a courseware builder. The page on which someone builds the test displays the questions which have already been entered followed by an insert form to create a new one. When a new question is created and the page is reloaded, the new question is displayed. But, along with each question is a link to delete the question. When this link is followed, another page opens with the question data and a delete record form. When the question is deleted, the user is redirected back to the question list with the insert form. Here's the problem... After a deletion, when the question list page is reloaded, the browser uses the cached version of the page and the question which was just deleted is still displayed. If you refresh the page, the question disappears. So, I know that the deletion is working. I just need to know how to force the browser to NOT use the cached version of the page. Thanx, -- Robb Kerr Digital IGUANA Helping Digital Artists Achieve their Dreams http://www.digitaliguana.com http://www.cancerreallysucks.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: Undefined Variables Error Message
Removing the . got rid of most of the errors, but two remain: Notice: Undefined variable: headers in E:\domains\swinos\contact.php on line 4 Notice: Undefined variable: message in E:\domains\swinos\contact.php on line 12 The offending lines are: 4 - $headers = MIME-Version: 1.0\r\n; and 12 - $message = stripslashes($message); Jeff At 02:32 PM 8/26/2004, Michal Migurski wrote: Hello all. I just finished placing a new server in production and PHP is not working. I am getting undefined variable messages when trying to submit php based forms. Register Globals is on in php.ini, but it still does not work. I have even tried copying a known-good php.ini from another server and the same behavior exists. I am running IIS in Windows 2000. Any ideas? Another website dies on line 4 here: ?php $to = [EMAIL PROTECTED]; $subject = Swinos.com Booking Contact - $name; $headers .= MIME-Version: 1.0\r\n; $headers .= '...'; is equivalent to $headers = $headers . '...'; So it's probably complaining that $headers is not defined when you're trying to append something to it. Change that first .= to a =, like the line above, and see if that doesn't help. -- michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html
Re: [PHP] US / Canada Zip Codes List
On Thu, 2004-08-26 at 15:42, Eugene Voznesensky wrote: As a online merchant I want to accept US (m.b. Canadian) Credit Cards ONLY for online payments. I am going to use Payflow Pro /PHP. How can I check US (Canada) zipcode before transaction request? I'm not sure the URL right off hand but the US post office releases a new zip code database every year. It's a little flat file you can stick in a database to query against. -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Looking for a TODO: parser.
This recursively gets you file path/name, line number, the matching line and the 2 that follow it. $ grep -HrnA 2 TODO: /path/to/code/root I get a parse error when I put that in my PHP file... That's not PHP code. It's the syntax for using a program called grep on the command line which would produce most of the results that Daevid was looking for. More info on using grep can be found here: http://www.google.com/search?q=man%20grep --rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: Undefined Variables Error Message
Jeff - Webmaster wrote: Removing the . got rid of most of the errors, but two remain: Notice: Undefined variable: headers in E:\domains\swinos\contact.php on line 4 Notice: Undefined variable: message in E:\domains\swinos\contact.php on line 12 The offending lines are: 4 - $headers = MIME-Version: 1.0\r\n; and 12 - $message = stripslashes($message); Line 4 would not produce that message. If $message is undefined, how are you going to stripslashes from it? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php