php-general Digest 17 Apr 2004 08:05:37 -0000 Issue 2710
php-general Digest 17 Apr 2004 08:05:37 - Issue 2710 Topics (messages 183673 through 183711): Re: Unwanted e-mails 183673 by: Elfyn McBratney 183674 by: Travis Low 183675 by: Lester Caine 183676 by: John W. Holmes 183677 by: John Nichel 183679 by: Lester Caine 183680 by: Jay Blanchard 183681 by: John W. Holmes 183682 by: Elfyn McBratney 183683 by: Chris W. Parker 183684 by: John Nichel 183685 by: Elfyn McBratney 183686 by: Lester Caine 183688 by: David T-G 183692 by: Ryan A Re: sending mail with php on a linux box 183678 by: John W. Holmes Re: Looking for a comprehensive PHP tutorial 183687 by: Stephen Allen http header 183689 by: Gabe 183690 by: Matt Matijevich 183691 by: Elfyn McBratney 183693 by: Matt Matijevich 183695 by: Brandon Holtsclaw 183696 by: Gabe 183703 by: Chris Shiflett 183707 by: Matt Matijevich Double mails 183694 by: Lopez, Kaleb (GEAE, Foreign National, CIAT) 183697 by: Chris W. Parker 183698 by: Lopez, Kaleb (GEAE, Foreign National, CIAT) 183706 by: Chris W. Parker 183708 by: PHP Email List 183709 by: PHP Email List 183710 by: Elfyn McBratney Re: Formatting phone numbers? 183699 by: Jay Blanchard Re: alternating row color--newbie help 183700 by: Don Read ***Re: [PHP] Explanation of cookie behavior 183701 by: David A. Stevens PHP's RPM vs PHP's Compiling??? 183702 by: Scott Fletcher limit number of CGI processes 183704 by: Florian Effenberger Fatal error: Call to undefined function: mysql_connect() 183705 by: Tim 183711 by: David Robley Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Friday 16 Apr 2004 19:19, Lester Caine wrote: Chris W. Parker wrote: David A. Stevens mailto:[EMAIL PROTECTED] on Friday, April 16, 2004 10:31 AM said: I have somehow, for reasons unknown to me, gotten onto some e-mail list that I don't want to or need to be on. Somebody please, at all the above addresses, do everything possible to get me off that list(s). DON'T MAKE AN AUTO-REPLY!! UNSUBSCRIBE YOURSELF!! Does not Fing work!! The unsubscribe process requires you to reply to the eMail that is sent. THAT email is bounced for many people who are trying to unsubscribe. SOMEBODY NEEDS TO GET THEIR ACT TOGETHER AND FIX THE SYSTEM SO THAT WE C*A*N* UNSBSCRIBE ! There is obviously an anti spam filter that processes many of these requests and prevent email IN while still sending it OUT to the banned addresses ! Chill out, or you'll see no help, OK? If for whatever reason you don't get that unsibscribe email, you need to contact the people who run this list: php-general-owner at lists dot php dot net But use that as a /last/ resort. Try the unsubscribe page on the PHP website first: http://www.php.net/unsub.php Coming on this list and swearing at everyone won't get you anywhere. :-) Elfyn - -- Elfyn McBratney, EMCB mailto:[EMAIL PROTECTED] http://www.emcb.co.uk/ PGP Key ID: 0x456548B4 PGP Key Fingerprint: 29D5 91BB 8748 7CC9 650F 31FE 6888 0C2A 4565 48B4 When I say something, I put my name next to it. -- Isaac Jaffee ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Linux london 2.6.5-emcb-241 #2 i686 GNU/Linux ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAgECmaIgMKkVlSLQRAkR9AJ48QGZl4iwy+hPmbBNekD3F4lRZvQCgiKh/ JBY08qC2MFFNLvsXbv3hnuc= =4+dE -END PGP SIGNATURE- ---End Message--- ---BeginMessage--- Lester Caine wrote: Chris W. Parker wrote: David A. Stevens mailto:[EMAIL PROTECTED] on Friday, April 16, 2004 10:31 AM said: I have somehow, for reasons unknown to me, gotten onto some e-mail list that I don't want to or need to be on. Somebody please, at all the above addresses, do everything possible to get me off that list(s). DON'T MAKE AN AUTO-REPLY!! UNSUBSCRIBE YOURSELF!! Does not Fing work!! The unsubscribe process requires you to reply to the eMail that is sent. THAT email is bounced for many people who are trying to unsubscribe. SOMEBODY NEEDS TO GET THEIR ACT TOGETHER AND FIX THE SYSTEM SO THAT WE C*A*N* UNSBSCRIBE ! I just unsubscribed and re-subscribed, no problems at all. Did I miss anything? :-) cheers, Travis -- Travis Low mailto:[EMAIL PROTECTED] http://www.dawnstar.com ---End Message--- ---BeginMessage--- Lester Caine
RE: [PHP] php and mysql help
[EMAIL PROTECTED] (Jay Blanchard) wrote in news:[EMAIL PROTECTED]: Why are you sending this to me? You're at Stanford, you can probably figure out the unsubscribe link and stuff -Original Message- From: David A. Stevens [mailto:[EMAIL PROTECTED] Sent: Friday, April 16, 2004 12:41 PM To: Jay Blanchard Subject: RE: [PHP] php and mysql help Please remove my address from any future correspondence about PHP. Jay, you are confusing persons at a university with persons who may have a Clue [TM] David (also recipient of this message) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Fatal error: Call to undefined function: mysql_connect()
[EMAIL PROTECTED] (Tim) wrote in news:[EMAIL PROTECTED]: Setup: 2 servers, one with PHP 4.1.2 and no MySQL installed, the other has MySQL and PHP 4.1.2 Problem: I am attempting to connect to the MySQL server from the server without MySQL, but I get the error that shows in the subject. Fatal error: Call to undefined function: mysql_connect() in /folder/index.php on line 11 I was told that maybe the extension for MySQL was not setup in PHP. I thought that maybe it was just because MySQL wasnt installed on the system I am working on, but it makes sense that I am not trying to access a database on the system I am working from, but trying to access one on a different server all together. What do you think? I think the error message tells it all - there is no mysql support in the php you are using. You'll need to recompile with php support, or load a mysql extension library. Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] http header
Yes, that works. Is the following code the best way to redirect someone to a different page using PHP? ?php header(Location: http://www.yahoo.com;); ? I looked for a redirect function of some kind and didn't come up with anything. Just curious what the consensus is...
[PHP] Re: http header
Gabe [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is the following code the best way to redirect someone to a different page using PHP? ?php header(Location: http://www.yahoo.com;); ? From personal experience I can recommend putting exit; behind a header() redirect to absolutely make sure that no code is executed afterwards in the script: header(Location: http://www.yahoo.com;); exit; Without exit; the header redirect soemtimes didn't work for me. Regards, Torsten Roehr I looked for a redirect function of some kind and didn't come up with anything. Just curious what the consensus is... Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Print out all the files in a directory
Hi, I want to write a simple script that looks for all the files with a common name and show them, like all the .mp3 files or all the .doc files. How do I go about it? Thank you, -Pooya -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Print out all the files in a directory
http://www.php.net/readdir -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Print out all the files in a directory
But how do I get all the .mp3 files? can I use *.mp3? and how ? Matt Matijevich [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] http://www.php.net/readdir -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Print out all the files in a directory
on that page ther is examples ?php if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != . $file != ..) { //add your logic to see if it is an .mp3 file right here, that can be done any number of ways echo $file\n; } } closedir($handle); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Print out all the files in a directory
That is exactly my question! how do I look for a .mp3 file?! I tried if ($file != . $file != .. $file==*.mp3) but it doesn't work! Matt Matijevich [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] on that page ther is examples ?php if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != . $file != ..) { //add your logic to see if it is an .mp3 file right here, that can be done any number of ways echo $file\n; } } closedir($handle); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Print out all the files in a directory
On Sat, 2004-04-17 at 12:35, Pooya Eslami wrote: That is exactly my question! how do I look for a .mp3 file?! I tried if ($file != . $file != .. $file==*.mp3) but it doesn't work! if( eregi( '\.mp3$', $file ) ) Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Print out all the files in a directory
Thank you Robert. Robert Cummings [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Sat, 2004-04-17 at 12:35, Pooya Eslami wrote: That is exactly my question! how do I look for a .mp3 file?! I tried if ($file != . $file != .. $file==*.mp3) but it doesn't work! if( eregi( '\.mp3$', $file ) ) Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] why doesn't this work ?
If I put the following script in a .php file it would work but if I put it in an .html file doesn't work, why? script tag is only used in .html file. script language = php echo ul; if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != . $file != .. eregi('\.html$', $file)) { echo lia href=\$file\font color=\#CC\$file/ font/a/libr; } } closedir($handle); } echo /ul; /script -Pooya -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Array Problem
Hi I have i Problem i got a variable a=2351 now i need to create an array out of this variable a[0]=1 a[1]=3 a[2]=5 a[3]=1 I have an idea to use the modulo function an do some Math but im sure there is a nicer way of solving my prob thx Flavio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why doesn't this work ?
Pooya Eslami wrote: If I put the following script in a .php file it would work but if I put it in an .html file doesn't work, why? script tag is only used in .html file. You web server determines whether or not to look for PHP in a file based upon its extension. You must set up your web server to look for PHP code in .html files. -- ---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] why doesn't this work ?
How do I do that? I don't have a webserver, it is hosted by a hosting company. John W. Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Pooya Eslami wrote: If I put the following script in a .php file it would work but if I put it in an .html file doesn't work, why? script tag is only used in .html file. You web server determines whether or not to look for PHP in a file based upon its extension. You must set up your web server to look for PHP code in .html files. -- ---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] Array Problem
That's how you could do it ... $ar = array(); $len = strlen($a); for ($i = 0; $i $len; ++$i) { $ar[] = $a{$i}; } HTH Richard Friday, April 16, 2004, 11:00:49 PM, you wrote: Hi I have i Problem i got a variable a=2351 now i need to create an array out of this variable a[0]=1 a[1]=3 a[2]=5 a[3]=1 I have an idea to use the modulo function an do some Math but im sure there is a nicer way of solving my prob thx Flavio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array Problem
That's how you could do it ... $ar = array(); $len = strlen($a); for ($i = 0; $i $len; ++$i) { $ar[] = $a{$i}; } If I remember well strlen is used for checking the length of a string... Arthur Looking for a job!? Use the smart search engine!! Find a Job from Millions WorldWide... http://search.jobsgrabber.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Formatting phone numbers?
Jay, Here is a little more of the larger function with comments (more comments than code, which is never a Bad Thing [tm]). I am only showing the handling for two basic types of telephone numbers with explanation for additional verification which we would typically use, since we have those resources available. Great. Thanks very much. Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php accelerator for php5rc1 ?
The latest Zend optimiser - 3.60 does not support php 5 - is there any alternative accelerators which do ? thx dave -- David Herring --- Netfm Ltd T: 07092 140694 M: 07766 086179 F: 07092 337656 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why doesn't this work ?
The browser doesn't know what to do with PHP code. If I put the following script in a .php file it would work but if I put it in an .html file doesn't work, why? script tag is only used in .html file. script language = php echo ul; if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != . $file != .. eregi('\.html$', $file)) { echo lia href=\$file\font color=\#CC\$file/ font/a/libr; } } closedir($handle); } echo /ul; /script -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why doesn't this work ?
I should have also said: Because it's missing the ?php and ? tags, the web server isn't going to run the code, but pass it back to the client browser. If I put the following script in a .php file it would work but if I put it in an .html file doesn't work, why? script tag is only used in .html file. script language = php echo ul; if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != . $file != .. eregi('\.html$', $file)) { echo lia href=\$file\font color=\#CC\$file/ font/a/libr; } } closedir($handle); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array Problem
How about count() That's how you could do it ... $ar = array(); $len = strlen($a); for ($i = 0; $i $len; ++$i) { $ar[] = $a{$i}; } HTH Richard -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why doesn't this work ?
I took out the scrip tags and put in ?php in the beginning and ? at the end, but it returns this: $file ; } } closedir($handle); } echo ; ? Any ideas how to fix this? Daniel Clark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I should have also said: Because it's missing the ?php and ? tags, the web server isn't going to run the code, but pass it back to the client browser. If I put the following script in a .php file it would work but if I put it in an .html file doesn't work, why? script tag is only used in .html file. script language = php echo ul; if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != . $file != .. eregi('\.html$', $file)) { echo lia href=\$file\font color=\#CC\$file/ font/a/libr; } } closedir($handle); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array Problem
Saturday, April 17, 2004, 7:38:46 PM, Arthur Radulescu wrote: That's how you could do it ... $ar = array(); $len = strlen($a); for ($i = 0; $i $len; ++$i) { $ar[] = $a{$i}; } If I remember well strlen is used for checking the length of a string... It does ... I didn't look closely enough :( So .. the var has to be converted to str first ... or use a temp var converted to string ... except of course someone comes up with a better method of solving the problem at hand. just for reference: the original problem (as I now understand it) was how to 'convert' a number into an array ... Friday, April 16, 2004, 11:00:49 PM, Flavio Fontana wrote: Hi I have i Problem i got a variable a=2351 now i need to create an array out of this variable a[0]=1 a[1]=3 a[2]=5 a[3]=1 I have an idea to use the modulo function an do some Math but im sure there is a nicer way of solving my prob thx Flavio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why doesn't this work ?
Daniel Clark wrote: I should have also said: Because it's missing the ?php and ? tags, the web server isn't going to run the code, but pass it back to the client browser. You are right, but not for the reason you think. script language=php is a valid way of starting PHP mode. http://us2.php.net/manual/en/language.basic-syntax.php Because the file extension is .html, though, the PHP engine will not parse any of the PHP in the file, though. -- ---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] Rporting tool - CVS?
Scenario : Im working on several large projects, all which have several users. Each user has a personal innstallation. Each of my projects are in constant development, and often the updates from version to version are only in a few files. Is there a tool out there who can compare two folders, and generate a report on what files are new, removed and updated? Usually I just upload all the project files all over, since all settings are in the database or settings file. But when projects have over 500 files, and you have 50 customers it would be nice to just upload the files which are updated. I have a feeling CVS would maby be the trick here, but im not sure. Still I could manually do this, it isnt that hard, but you know - maby there already is such a system out there and in that case it would fit me perfectly. -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. -- www.steinhaug.com - www.easywebshop.no - www.webkitpro.com -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why doesn't this work ?
I took out the scrip tags and put in ?php in the beginning and ? at the end, but it returns this: $file ; } } closedir($handle); } echo ; ? Any ideas how to fix this? John W. Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Daniel Clark wrote: I should have also said: Because it's missing the ?php and ? tags, the web server isn't going to run the code, but pass it back to the client browser. You are right, but not for the reason you think. script language=php is a valid way of starting PHP mode. http://us2.php.net/manual/en/language.basic-syntax.php Because the file extension is .html, though, the PHP engine will not parse any of the PHP in the file, though. -- ---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] [AWF-TOPIC] Reporting tool - CVS?
On Sat, 2004-04-17 at 14:47, Kim Steinhaug wrote: Scenario : Im working on several large projects, all which have several users. Each user has a personal innstallation. Each of my projects are in constant development, and often the updates from version to version are only in a few files. Is there a tool out there who can compare two folders, and generate a report on what files are new, removed and updated? Usually I just upload all the project files all over, since all settings are in the database or settings file. But when projects have over 500 files, and you have 50 customers it would be nice to just upload the files which are updated. I have a feeling CVS would maby be the trick here, but im not sure. Still I could manually do this, it isnt that hard, but you know - maby there already is such a system out there and in that case it would fit me perfectly. The diff command under Linux will serve you well to compare two directories (optionally recursively). However, you would be MUCH better off with something like CVS since in many cases it will merge the changes for you. At the very least if it cannot successfully merge the changes it will indicate where in the file the conflict occurred and give you both versions of the code so you can delete what you don't what and keep what you do. HTH, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php accelerator for php5rc1 ?
On Sat, 17 Apr 2004 19:01:21 +0100 [EMAIL PROTECTED] (David Herring) wrote: The latest Zend optimiser - 3.60 does not support php 5 - is there any alternative accelerators which do ? uhm, afaik the optimiser is not an accelerator, more kind of a loader for encrypted files. You would have to use the zend-accelerator, phpa, turck-mmcache, apc or similar products. thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Rporting tool - CVS?
Beyond Compare: http://www.scootersoftware.com/home.php Enjoy :) Aaron -Original Message- From: Kim Steinhaug [mailto:[EMAIL PROTECTED] Sent: April 17, 2004 2:48 PM To: [EMAIL PROTECTED] Subject: [PHP] Rporting tool - CVS? Scenario : Im working on several large projects, all which have several users. Each user has a personal innstallation. Each of my projects are in constant development, and often the updates from version to version are only in a few files. Is there a tool out there who can compare two folders, and generate a report on what files are new, removed and updated? Usually I just upload all the project files all over, since all settings are in the database or settings file. But when projects have over 500 files, and you have 50 customers it would be nice to just upload the files which are updated. I have a feeling CVS would maby be the trick here, but im not sure. Still I could manually do this, it isnt that hard, but you know - maby there already is such a system out there and in that case it would fit me perfectly. -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. -- www.steinhaug.com - www.easywebshop.no - www.webkitpro.com -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Rporting tool - CVS?
Kim Steinhaug wrote: Scenario : Im working on several large projects, all which have several users. Each user has a personal innstallation. Each of my projects are in constant development, and often the updates from version to version are only in a few files. Is there a tool out there who can compare two folders, and generate a report on what files are new, removed and updated? Usually I just upload all the project files all over, since all settings are in the database or settings file. But when projects have over 500 files, and you have 50 customers it would be nice to just upload the files which are updated. I have a feeling CVS would maby be the trick here, but im not sure. Still I could manually do this, it isnt that hard, but you know - maby there already is such a system out there and in that case it would fit me perfectly. Hi Kim, and all, I think you are in the right felling about CVS. I use it in the way you're asking for with success. Because now I'm not on a team, I'm using CVS in local mode (without a CVS server). I have a general repository, where I store all general libraries, and then a repository for each project. In each file, I include the CVS $Id$ tag, wich is changed by CVS for the file name and revision each time you commit to the repository. When you are ready to upload a new revision to the web server, you can tag the version (Ex. Version-2-0) and export the repository by revision (only changed files are exported). If something fails in the server, or a bug appears, because you have all revision history, you can go back while fixing errors. You can find CVS at http://cvshome.org If you're working on Windows, take a look to CVSNT at http://cvsnt.org and to WinCVS at http://wincvs.org Because this is OT in this list, feel free to contact me for any question. Regards, Jordi. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why doesn't this work ?
Pooya Eslami wrote: I took out the scrip tags and put in ?php in the beginning and ? at the end, but it returns this: $file ; } } closedir($handle); } echo ; ? Any ideas how to fix this? Use a .php extension on your file. Or you can ask your hosting company to have .html files processed as PHP, but they won't. -- ---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] Form data not available at first. Why?
Since the server upgrade to PHP 4.3.4 I have a odd problem with FORM data capture. When Page one and two are started in the open http:// ,the pair work just fine. If they are started with ssl https:// then page two has no data until you refresh and ok the resending of the data, At which point all the data is in place. I am New to this session work so I could really use some help. Please and Thank you. Dave // Page one ?PHP session_name(SESSE); session_start(); FORM method=POST action=..xxx.php??=SID? // Page two ?php session_name(SESSE); session_start(); $pres= session_id(); print $pres; session_id($pres); echo br; foreach ($_POST as $key = $val){ echo key: $key ... Value: $valbr; session Session Support enabled Registered save handlers files user Directive Local Value Master Value session.auto_start Off Off session.bug_compat_42 On On session.bug_compat_warn On On session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file /dev/urandom /dev/urandom session.entropy_length 16 16 session.gc_divisor 100 100 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path /tmp /tmp session.serialize_handler php php session.use_cookies On On session.use_only_cookies Off Off session.use_trans_sid Off Off sockets Sockets Support enabled -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Print out all the files in a directory
Pooya Eslami schrieb: Hi, I want to write a simple script that looks for all the files with a common name and show them, like all the .mp3 files or all the .doc files. How do I go about it? Thank you, -Pooya Look in the manual at php.net, especially: http://php.net/opendir http://php.net/readdir http://php.net/closedir Rainer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Rporting tool - CVS?
Beyond Compare is a pretty cool diff program. www.scootersoftware.com They have a demo version. Scenario : Im working on several large projects, all which have several users. Each user has a personal innstallation. Each of my projects are in constant development, and often the updates from version to version are only in a few files. Is there a tool out there who can compare two folders, and generate a report on what files are new, removed and updated? Usually I just upload all the project files all over, since all settings are in the database or settings file. But when projects have over 500 files, and you have 50 customers it would be nice to just upload the files which are updated. I have a feeling CVS would maby be the trick here, but im not sure. Still I could manually do this, it isnt that hard, but you know - maby there already is such a system out there and in that case it would fit me perfectly. -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. -- www.steinhaug.com - www.easywebshop.no - www.webkitpro.com -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 17 Apr 2004 23:21:37 -0000 Issue 2711
php-general Digest 17 Apr 2004 23:21:37 - Issue 2711 Topics (messages 183712 through 183745): Re: php and mysql help 183712 by: David Robley Re: http header 183713 by: Daniel Clark 183714 by: Torsten Roehr Print out all the files in a directory 183715 by: Pooya Eslami 183716 by: Matt Matijevich 183717 by: Pooya Eslami 183718 by: Matt Matijevich 183719 by: Pooya Eslami 183720 by: Robert Cummings 183721 by: Pooya Eslami 183744 by: Rainer Müller why doesn't this work ? 183722 by: Pooya Eslami 183724 by: John W. Holmes 183725 by: Pooya Eslami 183730 by: Daniel Clark 183731 by: Daniel Clark 183733 by: Pooya Eslami 183735 by: John W. Holmes 183737 by: Pooya Eslami 183742 by: John W. Holmes Array Problem 183723 by: Flavio Fontana 183726 by: Richard Harb 183727 by: Arthur Radulescu 183732 by: Daniel Clark 183734 by: Richard Harb Re: Formatting phone numbers? 183728 by: Andy Crain php accelerator for php5rc1 ? 183729 by: David Herring 183739 by: Thomas Seifert Rporting tool - CVS? 183736 by: Kim Steinhaug 183740 by: Aaron Wolski 183741 by: Jordi Canals 183745 by: Daniel Clark Re: [AWF-TOPIC] Reporting tool - CVS? 183738 by: Robert Cummings Form data not available at first. Why? 183743 by: Dave Pidgeon Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- [EMAIL PROTECTED] (Jay Blanchard) wrote in news:[EMAIL PROTECTED]: Why are you sending this to me? You're at Stanford, you can probably figure out the unsubscribe link and stuff -Original Message- From: David A. Stevens [mailto:[EMAIL PROTECTED] Sent: Friday, April 16, 2004 12:41 PM To: Jay Blanchard Subject: RE: [PHP] php and mysql help Please remove my address from any future correspondence about PHP. Jay, you are confusing persons at a university with persons who may have a Clue [TM] David (also recipient of this message) ---End Message--- ---BeginMessage--- Yes, that works. Is the following code the best way to redirect someone to a different page using PHP? ?php header(Location: http://www.yahoo.com;); ? I looked for a redirect function of some kind and didn't come up with anything. Just curious what the consensus is... ---End Message--- ---BeginMessage--- Gabe [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is the following code the best way to redirect someone to a different page using PHP? ?php header(Location: http://www.yahoo.com;); ? From personal experience I can recommend putting exit; behind a header() redirect to absolutely make sure that no code is executed afterwards in the script: header(Location: http://www.yahoo.com;); exit; Without exit; the header redirect soemtimes didn't work for me. Regards, Torsten Roehr I looked for a redirect function of some kind and didn't come up with anything. Just curious what the consensus is... Thanks ---End Message--- ---BeginMessage--- Hi, I want to write a simple script that looks for all the files with a common name and show them, like all the .mp3 files or all the .doc files. How do I go about it? Thank you, -Pooya ---End Message--- ---BeginMessage--- http://www.php.net/readdir ---End Message--- ---BeginMessage--- But how do I get all the .mp3 files? can I use *.mp3? and how ? Matt Matijevich [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] http://www.php.net/readdir ---End Message--- ---BeginMessage--- on that page ther is examples ?php if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != . $file != ..) { //add your logic to see if it is an .mp3 file right here, that can be done any number of ways echo $file\n; } } closedir($handle); } ? ---End Message--- ---BeginMessage--- That is exactly my question! how do I look for a .mp3 file?! I tried if ($file != . $file != .. $file==*.mp3) but it doesn't work! Matt Matijevich [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] on that page ther is examples ?php if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != . $file != ..) { //add your logic to see if it is an .mp3 file right here, that can be done any number of ways echo $file\n; } } closedir($handle); } ? ---End Message--- ---BeginMessage--- On Sat, 2004-04-17 at 12:35, Pooya Eslami wrote: That is exactly my question! how do I look for a .mp3 file?! I tried if ($file != . $file != .. $file==*.mp3) but it doesn't work! if( eregi(
Re: [PHP] why doesn't this work ?
Can you post the code and error. I took out the scrip tags and put in ?php in the beginning and ? at the end, but it returns this: $file ; } } closedir($handle); } echo ; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Removing line breaks...
How do i turn this... [br] [b]My Title [/b] [br] into [br][b]My Title[/b][br] --- I just need to have line breaks removed basically... any ideas? Russ Jones -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Bookmark server
I am planning on writing a bookmark server in php. The idea is I will have a database that stores all my internet favorites on a web server some where, so if I am doing some web browsing away from home and find a site I want to save, I can go to my bookmark server and save the url there. Now for the part I can't figure out an easy way to do. I want to have it so if I am looking at a page I want to save I can type in a nice short url for my bookmark server and it will some how be able to know where I just came from and have the form fields for URL and description already filled in for me. Then I just have to tell it what category to save the bookmark in. First I thought the _SERVER[HTTP_REFERER] variable, but that only works if you click on a link and since every web page I want to save won't have a link to my bookmark server that won't work. Then I thought I could use the history array with javascript, but that only works if your script is signed and I don't want to go there. So now I am out of ideas and was wondering if anyone here had any. Chris W http://thewishzone.com:8086/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Removing line breaks...
str_replace(\n,'',$string); don't think it'd be any faster with the regex ones... Rene At 01:18 18-04-2004, Russell P Jones wrote: How do i turn this... [br] [b]My Title [/b] [br] into [br][b]My Title[/b][br] --- I just need to have line breaks removed basically... any ideas? Russ Jones -- Rene Brehmer aka Metalbunny ~ If you don't like what I have to say ... don't read it ~ http://metalbunny.net/ References, tools, and other useful stuff... Check out the new Metalbunny forums @ http://forums.metalbunny.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Removing line breaks...
str_replace( $line, '\n', '') http://us2.php.net/manual/en/function.str-replace.php How do i turn this... [br] [b]My Title [/b] [br] into [br][b]My Title[/b][br] --- I just need to have line breaks removed basically... any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Why are Session Variables carried over into a brand new browser window?
This is my first posting to this group, so I am not familiar with any special etiquette for it, please bear with me. . . I maintain the PHP code for the website for the murals of Winnipeg and have found a situation where I have a session open with the state of the user's search results saved in the session and link to a location with the following link: A target=blank href=http://www.themuralsofwinnipeg.com/Mpages/index.php?action=gotomuralm uralid=179 so this opens a new browser window, but it is inheriting the session values from the browser window that called it and is causing problems in the new window. When I open a new browser window shouldn't it start a whole new session and not get anything from the previous browser. Thanks in advance for your help, Bob Bruce, Winnipeg, Manitoba Canada -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why are Session Variables carried over into a brand new browser window?
Sorry, the new window is part of the same session. You'll have to find some other way to distinguish between the two windows. cheers, Travis Bob Bruce - Programmer wrote: This is my first posting to this group, so I am not familiar with any special etiquette for it, please bear with me. . . I maintain the PHP code for the website for the murals of Winnipeg and have found a situation where I have a session open with the state of the user's search results saved in the session and link to a location with the following link: A target=blank href=http://www.themuralsofwinnipeg.com/Mpages/index.php?action=gotomuralm uralid=179 so this opens a new browser window, but it is inheriting the session values from the browser window that called it and is causing problems in the new window. When I open a new browser window shouldn't it start a whole new session and not get anything from the previous browser. Thanks in advance for your help, Bob Bruce, Winnipeg, Manitoba Canada -- Travis Low mailto:[EMAIL PROTECTED] http://www.dawnstar.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array Problem
Hi, Saturday, April 17, 2004, 7:00:49 AM, you wrote: FF Hi FF I have i Problem i got a variable a=2351 now i need to create an array out of this variable FF a[0]=1 FF a[1]=3 FF a[2]=5 FF a[3]=1 FF I have an idea to use the modulo function an do some Math but FF im sure there is a nicer way of solving my prob FF thx Flavio If you treat the variable as a string it is already an array of characters try echo $a{0}; -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why doesn't this work ?
I put this in the body of an html file: ?php if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != . $file != .. eregi('\.html$', $file)) { echo lia href=\$file\font color=\#CC\$file/ font/a/libr; } } closedir($handle); } echo /ul; ? the output page contains : $file ; } } closedir($handle); } echo ; ? I don't understand why. Daniel Clark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Can you post the code and error. I took out the scrip tags and put in ?php in the beginning and ? at the end, but it returns this: $file ; } } closedir($handle); } echo ; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why are Session Variables carried over into a brand new browser window?
so this opens a new browser window, but it is inheriting the session values from the browser window that called it and is causing problems in the new window. When I open a new browser window shouldn't it start a whole new session and not get anything from the previous browser. A buddy of mine created a secure sessions tutorial that protects against this exact issue. He has a fantasy stocks site and needed to protect against session hijacking. http://tutorials.dotgeek.org/tutorial.php?action=viewid=58 -- Greg Donald [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why doesn't this work ?
It's already been mentioned, but you do need to ensure you are using a .php extension on the file. Also, forgive me if this has already been covered, but are you sure the server even supports PHP? Try creating a new file with: ?php phpinfo(); ? And save it as something.php, check and see if it returns a table full of information or not. Andy Pooya Eslami wrote: I put this in the body of an html file: ?php if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != . $file != .. eregi('\.html$', $file)) { echo lia href=\$file\font color=\#CC\$file/ font/a/libr; } } closedir($handle); } echo /ul; ? the output page contains : $file ; } } closedir($handle); } echo ; ? I don't understand why. Daniel Clark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Can you post the code and error. I took out the scrip tags and put in ?php in the beginning and ? at the end, but it returns this: $file ; } } closedir($handle); } echo ; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php