Re: [PHP] PHP
John Nichel wrote: Cheung Pui Pan wrote: Dear Sir/Madam, I would like to make a page on which people may add records to a table and view them (As my web server does not support MYSQL, I may have to do Want us to wash and wax your car while we're at it? John - Since his ISP does not support MySQL why should he be looking for MySQL manuals? He needed pointing to other ways of doing the job! Far too many knee jurk reactions assume MySQL is the answer to everything. Thankfully ISP's are now supporting other mush more convenient options :) Try looking for a non-MySQL solution using the links you gave :) -- 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] PHP + JPEG2000
I'm developing a photo gallery/store site. I am storing full-resolution, full-quality images on my server and generating (and caching) lower resolution thumbnails for previewing the images. As it stands, I accept PNG and JPEG images via the GD image functions. Typically, I upload PNG files, but if I happen to upload a JPEG file, it will be retained as a JPEG (to reduce space requirements - no reason to convert). All of the above is working perfectly in PHP using GD image functions, including an automatic watermarking scheme. PNG files typically offer a nice reduction in file size over uncompressed lossless files while not throwing away any image data. I've been relatively pleased with it, at least until I discovered JPEG2000 lossless. Completely lossless, just like PNG, but 1/3 smaller. That means 50% more images can fit in the same space. And considering that web space is quite valuable (especially when you're looking at storing hundreds, thousands, or more of several megapixel plus full-color images online at all times) this is a very significant thing to me. So, has anybody worked with JPEG 2000 and PHP? I'm guessing ImageMagick is the program to use, does that support JPEG2000, and if so, does it work well and everything? Also, there might be other formats out there that support lossless photo compression, any suggestions that would match/beat JPEG2000 and be usable with PHP? (I'm only going to be accessing the full-resolution, losslessly encoded images when a customer actually buys the image, so there is no need for extreme PHP integration or anything, just a decent way to archive and de-archive the images and, most important of all - save space!) Suggestions and thoughts anybody? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Image Editing and Image Upload
Hello, I am involved in building a website that will allow users to upload their images and edit them online. I am looking for a web based Photo Editor and an Online Uploader (an applet perhaps that displays the contents of the users folders and allows them to upload multiple selected files to the server) that can be used with a PHP application. We are looking at server side implementations of both. The image editing features that I am looking at are cropping, rotating, red-eye reduction, add text and apply a template. Are there any libraries or readymade software (OCX or Java Applets) that work with PHP to achieve this? Please advice me on this and if you have any implementation tips, I would be grateful for them. Looking forward to hearing from you. Best Regards Feroze === Jar Jar Binks will be Jedi! === -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Running a PHP script on an automated regular schedule
Hi. I am wanting to use a PHP script to check on an hourly/daily basis on a few things- ie links on my sites, whether the sites are up and running and also to send an e-mail to me. I know how to do this using PHP but my problem is how to have this running 24/7. I can't really have this on a web page as wouldn't it time out? I don't have my own server and so use a hosting company. Is there a way of running a PHP script on a regular basis (say every 10 or 30 mins, or hourly or daily)? Would I have to set up my own server to do this? I just the simplest way of acheiving this. Any ideas? Does anyone know of any decent link checkers written in PHP that I could implement? Many thanks, Ian Gray
[PHP] Re: Running a PHP script on an automated regular schedule
Best way to achieve this would be cron/crontab http://www.webmasters-central.com/t/cron.shtml HTH Craig I.A. Gray [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi. I am wanting to use a PHP script to check on an hourly/daily basis on a few things- ie links on my sites, whether the sites are up and running and also to send an e-mail to me. I know how to do this using PHP but my problem is how to have this running 24/7. I can't really have this on a web page as wouldn't it time out? I don't have my own server and so use a hosting company. Is there a way of running a PHP script on a regular basis (say every 10 or 30 mins, or hourly or daily)? Would I have to set up my own server to do this? I just the simplest way of acheiving this. Any ideas? Does anyone know of any decent link checkers written in PHP that I could implement? Many thanks, Ian Gray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Refresh a frame?
in Javascript frame_name.reload() Robert Sossomon wrote: I am in need of a way to reload a page within a frame as the other frames are used to modify the information. I have a 3-frame site now that I am using 1 frame as a list, another frame to add the information, and the 3rd frame to show the results of the 2nd frame. I know how to do the location: URL for the full page, but how do I do it for JUST a single page? Thanks, Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Passing args to a PHP script from the command line
Hi All, Can anyone tell me how to pass arguments to a PHP script from the command line? I know I need to use the -args option but how exactly, I have tried the following... /usr/bin/php myscript.php -args key=value but this does not work, the script executes but key is not available as $_GET[key] in my script. Any pointers will be much appreciated. TIA Phil. --- Phil Ewington - Technical Director 43 Plc - Ashdale House 35 Broad Street, Wokingham Berkshire RG40 1AU T: +44 (0)1189 789 500 F: +44 (0)1189 784 994 E: mailto:[EMAIL PROTECTED] W: www.soyouthink.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Image Editing and Image Upload
On Thursday 10 June 2004 17:29, Feroze Md. Arif wrote: The image editing features that I am looking at are cropping, rotating, red-eye reduction, add text and apply a template. IIRC http://gallery.sourceforge.net includes a java component which does some of the above. -- 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 -- /* The woman you buy -- and she is the least expensive -- takes a great deal of money. The woman who gives herself takes all your time. -- Balzac */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Passing args to a PHP script from the command line
On Thursday 10 June 2004 18:58, Phil Ewington - 43 Plc wrote: Can anyone tell me how to pass arguments to a PHP script from the command line? I know I need to use the -args option but how exactly, I have tried the following... manual Using PHP from the command line /usr/bin/php myscript.php -args key=value but this does not work, the script executes but key is not available as $_GET[key] in my script. Any pointers will be much appreciated. print_r($argv); -- 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 -- /* An American's a person who isn't afraid to criticize the president but is always polite to traffic cops. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Passing args to a PHP script from the command line
Phil Ewington - 43 Plc wrote on donderdag 10 juni 2004 12:58: Hi All, Can anyone tell me how to pass arguments to a PHP script from the command line? I know I need to use the -args option but how exactly, I have tried the following... /usr/bin/php myscript.php -args key=value You don't have to call the -args argument. just run the script from command line like this: php myscript.php value Where value is the argument you want to use in the script. These arguments are stored in an arrray ($argv). Do a print_r($argv) and you can see the content. but this does not work, the script executes but key is not available as $_GET[key] in my script. Any pointers will be much appreciated. TIA Phil. --- Phil Ewington - Technical Director 43 Plc - Ashdale House 35 Broad Street, Wokingham Berkshire RG40 1AU T: +44 (0)1189 789 500 F: +44 (0)1189 784 994 E: mailto:[EMAIL PROTECTED] W: www.soyouthink.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Passing args to a PHP script from the command line
Phil Ewington - 43 Plc wrote on donderdag 10 juni 2004 12:58: Hi All, Can anyone tell me how to pass arguments to a PHP script from the command line? I know I need to use the -args option but how exactly, I have tried the following... /usr/bin/php myscript.php -args key=value You don't have to call the -args argument. just run the script from command line like this: php myscript.php value Where value is the argument you want to use in the script. These arguments are stored in an arrray ($argv). Do a print_r($argv) and you can see the content. OK, but if no param name is passed in, I assume that the order they are passed in as must be correct or the script will not know what values belong to which parameters? This seems a little odd, I assume that $argv only exists when accessed from the command line? My script needs to be excuted from both command line and from web browsers. but this does not work, the script executes but key is not available as $_GET[key] in my script. Any pointers will be much appreciated. TIA Phil. --- Phil Ewington - Technical Director 43 Plc - Ashdale House 35 Broad Street, Wokingham Berkshire RG40 1AU T: +44 (0)1189 789 500 F: +44 (0)1189 784 994 E: mailto:[EMAIL PROTECTED] W: www.soyouthink.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Passing args to a PHP script from the command line
Phil Ewington - 43 Plc wrote on donderdag 10 juni 2004 14:27: Phil Ewington - 43 Plc wrote on donderdag 10 juni 2004 12:58: Hi All, Can anyone tell me how to pass arguments to a PHP script from the command line? I know I need to use the -args option but how exactly, I have tried the following... /usr/bin/php myscript.php -args key=value You don't have to call the -args argument. just run the script from command line like this: php myscript.php value Where value is the argument you want to use in the script. These arguments are stored in an arrray ($argv). Do a print_r($argv) and you can see the content. OK, but if no param name is passed in, I assume that the order they are passed in as must be correct or the script will not know what values belong to which parameters? This seems a little odd, I assume that $argv only exists when accessed from the command line? My script needs to be excuted from both command line and from web browsers. How do you mean the order must be correct. Use some code like this to give it an index value. for ($counter=0; $counter $argc; $counter++) { list($key, $value) = each($argv); echo (key . $key . has value : . $value . \n); } From what i understand the argv argc are only avaliable when the script is run from commandline. Just do a check on this and if not there get some $_POST or $_GET variables. but this does not work, the script executes but key is not available as $_GET[key] in my script. Any pointers will be much appreciated. TIA Phil. --- Phil Ewington - Technical Director 43 Plc - Ashdale House 35 Broad Street, Wokingham Berkshire RG40 1AU T: +44 (0)1189 789 500 F: +44 (0)1189 784 994 E: mailto:[EMAIL PROTECTED] W: www.soyouthink.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Passing args to a PHP script from the command line
Phil Ewington - 43 Plc wrote on donderdag 10 juni 2004 14:27: Phil Ewington - 43 Plc wrote on donderdag 10 juni 2004 12:58: Hi All, Can anyone tell me how to pass arguments to a PHP script from the command line? I know I need to use the -args option but how exactly, I have tried the following... /usr/bin/php myscript.php -args key=value You don't have to call the -args argument. just run the script from command line like this: php myscript.php value Where value is the argument you want to use in the script. These arguments are stored in an arrray ($argv). Do a print_r($argv) and you can see the content. OK, but if no param name is passed in, I assume that the order they are passed in as must be correct or the script will not know what values belong to which parameters? This seems a little odd, I assume that $argv only exists when accessed from the command line? My script needs to be excuted from both command line and from web browsers. How do you mean the order must be correct. Use some code like this to give it an index value. for ($counter=0; $counter $argc; $counter++) { list($key, $value) = each($argv); echo (key . $key . has value : . $value . \n); } Your example was... php myscript.php value That is just a value, no parameter name as with a query string, take this example... php myscript.php a b Let's say that this was requested from a browser like myscript.php?1=a2=b PHP uses 1 2 to refer to the values, but the values would get mixed up if I was to use... $argv[0] $argv[1] and the order of a and b were different when the script was called. Does that make sense? I find it odd that I need to write more code to 1) check $_GET and 2) check $argv, also simple error checking will fail for command line stuff when checking that all the required params are present. From what i understand the argv argc are only avaliable when the script is run from commandline. Just do a check on this and if not there get some $_POST or $_GET variables. but this does not work, the script executes but key is not available as $_GET[key] in my script. Any pointers will be much appreciated. TIA Phil. --- Phil Ewington - Technical Director 43 Plc - Ashdale House 35 Broad Street, Wokingham Berkshire RG40 1AU T: +44 (0)1189 789 500 F: +44 (0)1189 784 994 E: mailto:[EMAIL PROTECTED] W: www.soyouthink.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Free news feeds
Hi Ben, Thanks for the reply. They actually don't have free feeds anymore. They actually say in the FAQ that they don't do that anymore. Does anyone know different? Tim At 01:39 AM 10/06/2004, Ben Ramsey wrote: Check out moreover.com. They used to have free RSS feeds, and I think you can still get to them on their site somewhere... you just have to dig through everything. [EMAIL PROTECTED] wrote: Hi I'm looking for recommendations for places I might look for free news feeds to incorporate into our companies website. Specifically I'm looking for feeds related to the pharmaceutical and medical industries. Thanks, Tim -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- 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
Lester Caine wrote: John Nichel wrote: Cheung Pui Pan wrote: Dear Sir/Madam, I would like to make a page on which people may add records to a table and view them (As my web server does not support MYSQL, I may have to do Want us to wash and wax your car while we're at it? John - Since his ISP does not support MySQL why should he be looking for MySQL manuals? Even if his ISP doesn't have MySQL installed, he can still install it in his _home_ directory. He needed pointing to other ways of doing the job! Well, I did supply a link to the PHP manual. Far too many knee jurk reactions assume MySQL is the answer to everything. Thankfully ISP's are now supporting other mush more convenient options :) Convenient? Like what, PostgreSQL? Oracle? MSSQL? Progress? Flat files? Maybe I'm biased, but for handling data like this, I don't find anything more convenient than MySQL. Try looking for a non-MySQL solution using the links you gave :) Following the link to the PHP manual http://us4.php.net/manual/en/ref.filesystem.php if the OP wants to use flat files And a ton of other DB options besides MySQL. -- John C. Nichel 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] Passing args to a PHP script from the command line
Phil Ewington - 43 Plc wrote on donderdag 10 juni 2004 15:11: Phil Ewington - 43 Plc wrote on donderdag 10 juni 2004 14:27: Phil Ewington - 43 Plc wrote on donderdag 10 juni 2004 12:58: Hi All, Can anyone tell me how to pass arguments to a PHP script from the command line? I know I need to use the -args option but how exactly, I have tried the following... /usr/bin/php myscript.php -args key=value You don't have to call the -args argument. just run the script from command line like this: php myscript.php value Where value is the argument you want to use in the script. These arguments are stored in an arrray ($argv). Do a print_r($argv) and you can see the content. OK, but if no param name is passed in, I assume that the order they are passed in as must be correct or the script will not know what values belong to which parameters? This seems a little odd, I assume that $argv only exists when accessed from the command line? My script needs to be excuted from both command line and from web browsers. How do you mean the order must be correct. Use some code like this to give it an index value. for ($counter=0; $counter $argc; $counter++) { list($key, $value) = each($argv); echo (key . $key . has value : . $value . \n); } Your example was... php myscript.php value That is just a value, no parameter name as with a query string, take this example... php myscript.php a b Let's say that this was requested from a browser like myscript.php?1=a2=b PHP uses 1 2 to refer to the values, but the values would get mixed up if I was to use... $argv[0] $argv[1] and the order of a and b were different when the script was called. Does that make sense? I find it odd that I need to write more code to 1) check $_GET and 2) check $argv, also simple error checking will fail for command line stuff when checking that all the required params are present. ic now i understand what you mean :) Why not just pass the arguments on commandline like this: php myscript.php 1=a 2=b and then just split on '=' to get key value. From what i understand the argv argc are only avaliable when the script is run from commandline. Just do a check on this and if not there get some $_POST or $_GET variables. but this does not work, the script executes but key is not available as $_GET[key] in my script. Any pointers will be much appreciated. TIA Phil. --- Phil Ewington - Technical Director 43 Plc - Ashdale House 35 Broad Street, Wokingham Berkshire RG40 1AU T: +44 (0)1189 789 500 F: +44 (0)1189 784 994 E: mailto:[EMAIL PROTECTED] W: www.soyouthink.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can I set a different include path per Apache Virtual host?
Mike Zornek wrote: Can I set a different PHP include path per Apache Virtual host? I am trying this: snip Only if php is being run as an Apache module. If php is running as a module on your box, and it's still not working, try removing the IfModule mod_php4.c and /IfModule wrapper. Your syntax of 'php_value include_path .:/path' is correct. -- John C. Nichel 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] Getting Server time
When I'm using the time() function am I getting the time on the server? If not how can I get the time from the server regardless of whether or not its in the same time zone as the client. alex hogan * The contents of this e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. The views stated herein do not necessarily represent the view of the company. If you are not the intended recipient of this e-mail you may not copy, forward, disclose, or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender. *
RE: [PHP] Passing args to a PHP script from the command line
Phil Ewington - 43 Plc wrote on donderdag 10 juni 2004 15:11: Phil Ewington - 43 Plc wrote on donderdag 10 juni 2004 14:27: Phil Ewington - 43 Plc wrote on donderdag 10 juni 2004 12:58: Hi All, Can anyone tell me how to pass arguments to a PHP script from the command line? I know I need to use the -args option but how exactly, I have tried the following... /usr/bin/php myscript.php -args key=value You don't have to call the -args argument. just run the script from command line like this: php myscript.php value Where value is the argument you want to use in the script. These arguments are stored in an arrray ($argv). Do a print_r($argv) and you can see the content. OK, but if no param name is passed in, I assume that the order they are passed in as must be correct or the script will not know what values belong to which parameters? This seems a little odd, I assume that $argv only exists when accessed from the command line? My script needs to be excuted from both command line and from web browsers. How do you mean the order must be correct. Use some code like this to give it an index value. for ($counter=0; $counter $argc; $counter++) { list($key, $value) = each($argv); echo (key . $key . has value : . $value . \n); } Your example was... php myscript.php value That is just a value, no parameter name as with a query string, take this example... php myscript.php a b Let's say that this was requested from a browser like myscript.php?1=a2=b PHP uses 1 2 to refer to the values, but the values would get mixed up if I was to use... $argv[0] $argv[1] and the order of a and b were different when the script was called. Does that make sense? I find it odd that I need to write more code to 1) check $_GET and 2) check $argv, also simple error checking will fail for command line stuff when checking that all the required params are present. ic now i understand what you mean :) Why not just pass the arguments on commandline like this: php myscript.php 1=a 2=b and then just split on '=' to get key value. That will do for me! Still more coding than I would like and not how I think it should be implemented, but hey we don't actually live in an ideal world do we ;o) Thanks for your help, it is much appreciated. - Phil. From what i understand the argv argc are only avaliable when the script is run from commandline. Just do a check on this and if not there get some $_POST or $_GET variables. but this does not work, the script executes but key is not available as $_GET[key] in my script. Any pointers will be much appreciated. TIA Phil. --- Phil Ewington - Technical Director 43 Plc - Ashdale House 35 Broad Street, Wokingham Berkshire RG40 1AU T: +44 (0)1189 789 500 F: +44 (0)1189 784 994 E: mailto:[EMAIL PROTECTED] W: www.soyouthink.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting Server time
Alex Hogan wrote: When I'm using the time() function am I getting the time on the server? If not how can I get the time from the server regardless of whether or not its in the same time zone as the client. alex hogan It is returning the timestamp of _your_ server, based on the timezone settings of that box. * The contents of this e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. The views stated herein do not necessarily represent the view of the company. If you are not the intended recipient of this e-mail you may not copy, forward, disclose, or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender. * Uh-oh, guess I'm going to jail since I replied to the list, and not the OP. ;) -- John C. Nichel 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] Getting Server time
Since PHP is parsed on the server and not on the client machine, you should be getting the server time. You can figure out in which TZ the server is by comparing it to the time where you are. Steve - Original Message - From: Alex Hogan [EMAIL PROTECTED] To: PHP General list [EMAIL PROTECTED] Sent: Thursday, June 10, 2004 9:27 AM Subject: [PHP] Getting Server time When I'm using the time() function am I getting the time on the server? If not how can I get the time from the server regardless of whether or not its in the same time zone as the client. alex hogan * The contents of this e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. The views stated herein do not necessarily represent the view of the company. If you are not the intended recipient of this e-mail you may not copy, forward, disclose, or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender. * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting Server time
Alex Hogan wrote: When I'm using the time() function am I getting the time on the server? If not how can I get the time from the server regardless of whether or not its in the same time zone as the client. That's quite easy: PHP runs on the server. What time is it you will get? The server's. HTH Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting Server time
lol -- If I get email not intended for me, it is now MY property and I'll darn well send it, copy it, distribute it as I see fit. Kinda like getting stuff in the mail you didn't order... And I guess the admins finally did something about those two autoresponders. THANKS!! - Original Message - From: John Nichel [EMAIL PROTECTED] To: PHP General list [EMAIL PROTECTED] Sent: Thursday, June 10, 2004 9:33 AM Subject: Re: [PHP] Getting Server time Alex Hogan wrote: When I'm using the time() function am I getting the time on the server? If not how can I get the time from the server regardless of whether or not its in the same time zone as the client. alex hogan It is returning the timestamp of _your_ server, based on the timezone settings of that box. * The contents of this e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. The views stated herein do not necessarily represent the view of the company. If you are not the intended recipient of this e-mail you may not copy, forward, disclose, or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender. * Uh-oh, guess I'm going to jail since I replied to the list, and not the OP. ;) -- John C. Nichel 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Running a PHP script on an automated regular schedule
Craig Donnelly wrote: Best way to achieve this would be cron/crontab http://www.webmasters-central.com/t/cron.shtml Unless you're on Windows and don't have cron. Then, use scheduled tasks. The task would look something like this: c:\php\php.exe c:\path\to\script\to\schedule.php -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Passing args to a PHP script from the command line
You may also want to check out PEAR::Console_Getopt http://pear.php.net/package/Console_Getopt Phil Ewington - 43 Plc wrote: Hi All, Can anyone tell me how to pass arguments to a PHP script from the command line? I know I need to use the -args option but how exactly, I have tried the following... /usr/bin/php myscript.php -args key=value but this does not work, the script executes but key is not available as $_GET[key] in my script. Any pointers will be much appreciated. -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Free news feeds
Tim Winters wrote: Thanks for the reply. They actually don't have free feeds anymore. They actually say in the FAQ that they don't do that anymore. Bah! They do have free feeds, still. I can't remember how I found this link, but I went through an old backup of a bookmarks file to get it for you, and it still works. The RSS feeds unbelievably still work, too. If I got to this page from their homepage without a login, then I don't imagine they care too much about people using them. There is one thing I would suggest, though: to keep traffic down to their feeds, set up an automated script (through cron or something) to download the feed(s) once a day or once every other hour. Then, on the page you want to display the feed(s), just point to your locally downloaded copy. This way you don't tax Moreover's servers and they don't get too mad about people using the feeds. The link: http://w.moreover.com/categories/category_list_rss.html -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Free news feeds
Hi Tim, Have you tried a google search? Try: http://www.google.com/search?num=100hl=enlr=ie=UTF-8q=free+news+feed s+pharmaceutical+medicalbtnG=Search There might be something useful to you. Regards, David Bevan GetAnyIdeas Web Design P. 416.452.9410 F. 416.570.4529 E. [EMAIL PROTECTED] W. getanyideas.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, June 10, 2004 12:33 AM To: [EMAIL PROTECTED] Subject: [PHP] Free news feeds Hi I'm looking for recommendations for places I might look for free news feeds to incorporate into our companies website. Specifically I'm looking for feeds related to the pharmaceutical and medical industries. Thanks, Tim -- 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
John Nichel wrote: Even if his ISP doesn't have MySQL installed, he can still install it in his _home_ directory. Don't understand that - either you are setting up a site on an ISP or you are working from home. Not many ISP's allow you to install applications on their system? Far too many knee jurk reactions assume MySQL is the answer to everything. Thankfully ISP's are now supporting other mush more convenient options :) Convenient? Like what, PostgreSQL? Oracle? MSSQL? Progress? Flat files? Maybe I'm biased, but for handling data like this, I don't find anything more convenient than MySQL. This caught me at a bad time - another customer I was trying to hook decided that he HAS to use MSSQL/ASP even after we gave him a live demo of his finished system on PHP and Firebird. We don't get any money, and yet he is prepared to pay 10 times as much for something that will not now be live until next year. MySQL is in the same camp - hook the customer and sting them for licence fees later :) I'm just glad it's been dropped from PHP5, where SQLite is the flavour of the month - that I can compete with ;) -- 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] Export data from word ducument
Someone,can you help me ? I need exported pictures that are inserted in word document to the jpg (gif,tiff,bmp) format. Is it possible and how ? Thanks you very much Roman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Free news feeds
On Thu, 10 Jun 2004, Ben Ramsey wrote: Tim Winters wrote: Thanks for the reply. They actually don't have free feeds anymore. They actually say in the FAQ that they don't do that anymore. Bah! They do have free feeds, still. I can't remember how I found this link, but I went through an old backup of a bookmarks file to get it for you, and it still works. The RSS feeds unbelievably still work, too. If I got to this page from their homepage without a login, then I don't imagine they care too much about people using them. There is one thing I would suggest, though: to keep traffic down to their feeds, set up an automated script (through cron or something) to download the feed(s) once a day or once every other hour. Then, on the page you want to display the feed(s), just point to your locally downloaded copy. This way you don't tax Moreover's servers and they don't get too mad about people using the feeds. The link: http://w.moreover.com/categories/category_list_rss.html -- Regards, Ben Ramsey http://benramsey.com Attached is a text file containing a list of rss and xml news feeds we use in our portal. You have to write the code to convert the xml to plain text. -- Ron Clark sysadmin/webmaster Armstrong Atlantic State UniversityFaculty / Staff Applications|Information Retrieval|IR| Faculty / Staff Applications|MetaApp|meta| Faculty / Staff Applications|Utilities|utilities| ||| CIS|CIS Cove Developer Info|cove_developers| ||| Registrar Applications|Degree Program (Major) Process|degch| ||| Pirates' Cove|Armstrong Announcements|Announcements| Pirates' Cove|Pirates' Cove Information|cove_info| Pirates' Cove|Savannah Weather|weather| Pirates' Cove|Search Cove|search| Pirates' Cove|Stock Ticker|stocks| ||| Science and Tech|ABC News SciTech|ABC_News_SciTech|http://my.abcnews.go.com/rsspublic/scitech_rss093.xml Science and Tech|Advogato|advogato|http://www.advogato.org/rss/articles.xml Science and Tech|Apache Week|Apache_Week|http://www.apacheweek.com/issues/apacheweek-headlines.xml Science and Tech|BBC World News Science and Nature|BBC_World_News_Science_and_Nature|http://news.bbc.co.uk/rss/newsonline_world_edition/science/nature/rss091.xml Science and Tech|BBC World News Technology|BBC_World_News_Technology|http://news.bbc.co.uk/rss/newsonline_world_edition/technology/rss091.xml Science and Tech|Christian Science Monitor Sci/Tech|csm_scitech|http://csmonitor.com/rss/scitech.rss Science and Tech|Desktopian|desktopian|http://desktopian.org/includes/headlines.xml Science and Tech|ExtremeTech - Core Tech|extremeTechCore|http://rssnewsapps.ziffdavis.com/extreme.xml Science and Tech|Extreme Tech - Reviews|extremeTechReview|http://rssnewsapps.ziffdavis.com/extremetechreviews.xml Science and Tech|Freshmeat|freshmeat|http://freshmeat.net/backend/fm.rdf Science and Tech|GameDev|GameDev|http://www.gamedev.net/xml/ Science and Tech|Humorix|Humorix|http://i-want-a-website.com/about-linux/headlines.rdf Science and Tech|IceWalkers|IceWalkers|http://www.icewalk.com/backend/netscape_channel.txt Science and Tech|Javable|Javable|http://www.javable.com/eng/rss.shtml Science and Tech|Linux Game Tome|The_Linux_Game_Tome|http://happypenguin.org/html/news.rdf Science and Tech|Linux Security|Linuxsecurity|http://www.linuxsecurity.com/linuxsecurity_articles.rdf Science and Tech|Linux Today|Linux_Today|http://linuxtoday.com/backend/my-netscape.rdf Science and Tech|Mac News Network|macnn|http://www.macnn.com/macnn.rdf Science and Tech|MultiAgent Systems|MultiAgent_Systems|http://www.multiagent.com/mynetscape.rdf Science and Tech|Perl News|Perl_News|http://www.news.perl.org/perl-news-short.rdf Science and Tech|PHP Net|PHP_Net|http://www.php.net/news.rss Science and Tech|Security Focus|Security_Focus|http://www.securityfocus.com/topnews-rss.html Science and Tech|Slashdot|slashdot|http://slashdot.org/slashdot.rdf Science and Tech|SourceForge Project News|SourceForge_Project_News|http://sourceforge.net/export/rss_sfnews.php Science and Tech|Squishdot|Squishdot|http://squishdot.org/rdf Science and Tech|The Register|The_Register|http://www.theregister.co.uk/tonys/slashdot.rdf Science and Tech|WebDEV - German Language Web Developer's Resource|WebDEV|http://webdev.khm.de/xml/scriptingNews2.xml Science and Tech|WebReference|webreference|http://www.webreference.com/webreference.rdf Science and Tech|Wired|wired|http://www.wired.com/news_drop/netcenter/netcenter.rdf Science and Tech|Yahoo! News Science|yahoo_science|http://rss.news.yahoo.com/rss/science Science and Tech|Yahoo! News Technology|yahoo_tech|http://rss.news.yahoo.com/rss/tech ||| Money and Finance|ABC News Business|ABC_News_Business|http://my.abcnews.go.com/rsspublic/business_rss093.xml Money and Finance|BBC World News Business|BBC_World_News_Business|http://news.bbc.co.uk/rss/newsonline_world_edition/business/rss091.xml Money and Finance|BBC World News
Re: [PHP] Re: Free news feeds
Ben Ramsey wrote: Bah! They do have free feeds, still. I can't remember how I found this link, but I went through an old backup of a bookmarks file to get it for you, and it still works. The RSS feeds unbelievably still work, too. If I got to this page from their homepage without a login, then I don't imagine they care too much about people using them. There is one thing I would suggest, though: to keep traffic down to their feeds, set up an automated script (through cron or something) to download the feed(s) once a day or once every other hour. Then, on the page you want to display the feed(s), just point to your locally downloaded copy. This way you don't tax Moreover's servers and they don't get too mad about people using the feeds. The link: http://w.moreover.com/categories/category_list_rss.html Woo-hoo...That rocksthanks man! -- John C. Nichel 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
Lester Caine wrote: John Nichel wrote: Even if his ISP doesn't have MySQL installed, he can still install it in his _home_ directory. Don't understand that - either you are setting up a site on an ISP or you are working from home. Not many ISP's allow you to install applications on their system? I have yet to use an ISP that you couldn't setup and run things like MySQL in your home directory. Now I've only used four different hosting providers in the past 7 years (one for the past 4), but on all of them, I could do this. Convenient? Like what, PostgreSQL? Oracle? MSSQL? Progress? Flat files? Maybe I'm biased, but for handling data like this, I don't find anything more convenient than MySQL. This caught me at a bad time - another customer I was trying to hook decided that he HAS to use MSSQL/ASP even after we gave him a live demo of his finished system on PHP and Firebird. We don't get any money, and yet he is prepared to pay 10 times as much for something that will not now be live until next year. MySQL is in the same camp - hook the customer and sting them for licence fees later :) I'm just glad it's been dropped from PHP5, where SQLite is the flavour of the month - that I can compete with ;) It hasn't been dropped from php5 in the sense that you cannot use php5 and MySQL together, it's just not bundled. But this doesn't change the convenience of it. You can't swing a dead cat without hitting a php developer who has at least some grasp on MySQL, and the amount of information on using PHP/MySQL on the web is staggering. That in itself makes it more convenient than any other data storage/retrieval system out there. I'll stop now before this becomes a MySQL vs. others, 'free as in beer' vs. 'free as in speech' war. ;) -- John C. Nichel 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
John Nichel wrote: I'll stop now before this becomes a MySQL vs. others, 'free as in beer' vs. 'free as in speech' war. ;) Yep - I actually pay the mortgage by moving applications from MySQL, Access, MSSQL and the rest to Firebird so I'm far too biased ;) -- 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] Can I set a different include path per Apache Virtual host?
Mike Zornek wrote: I am trying this: VirtualHost * ServerAdmin [EMAIL PROTECTED] DocumentRoot /Library/WebServer/Websites/stage/content ServerName stage.asmpweb.org ErrorLog /Library/WebServer/Websites/stage/logs/error_log CustomLog /Library/WebServer/Websites/stage/logs/access_log common php_value include_path .:/usr/local/php/lib/php:/Library/WebServer/Websites/stage/content/includes /VirtualHost snip But get the following error: Ghen:~ zorn$ httpd -t Syntax error on line 1070 of /etc/httpd/httpd.conf: Invalid command 'php_value', perhaps mis-spelled or defined by a module not included in the server configuration Same error if I use php_admin_value What version of Apache? I currently have multiple boxes running with configurations like this, all on Apache 1.3.x, without any problems (one of them's a Mac...looks like you're using a Mac above). -- John C. Nichel 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] Free news feeds
http://www.syndic8.com/feedcat.php?Scheme=Syndic8 syndic8 has good stuff! -- Aaron Wormus -- Pears and Pickles Served fresh every day at http://php.eckspee.com -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can I set a different include path per Apache Virtual host?
On 6/10/04 11:01 AM, John Nichel [EMAIL PROTECTED] wrote: What version of Apache? I currently have multiple boxes running with configurations like this, all on Apache 1.3.x, without any problems (one of them's a Mac...looks like you're using a Mac above). Ghen:~ zorn$ httpd -v Server version: Apache/1.3.29 (Darwin) Server built: Feb 4 2004 10:31:58 Ghen:~ zorn$ /usr/local/php/bin/php -v PHP 4.3.4 (cli) (built: Dec 8 2003 16:22:32) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies Apache is default from Apple and PHP is from Marc: http://www.entropy.ch/software/macosx/php/ ~ Mike - Mike Zornek Web Designer, Media Developer, Programmer and Geek Personal site: http://MikeZornek.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Webyog releases SQLyog 3.71 SJA 2.0
On 6/10/2004 6:42:20 AM, [EMAIL PROTECTED] wrote: WTF? Who gives a rats ass about this? Nearly everyone on this list has php related commerical products but nobody advertises it here or announces it when they make or update their products unless its very closely related to php (and usually free), your product does not fall in either category, so kindly take your SQLYog and shove it up your yog. Personally I use PHPMyAdmin which works great, is open source and free (donation supported) -Ryan Hey Dan, Ok i'll speak nicely here and i'll be emailing ryan offlist, Why, thank you, very nice of you :-) why not have taken that email offlist, noone wants to hear your angst reply man ! Sorry bout that, I generally hit the reply all button, most of the time when I have something to say its ok for the list to read it. On this topic, i actually have a licence of this mighty find product, it was good when it was free, the licence is a bitch, but just have to bite i guess. My point exactly, if it was free or open source/ very benificial to the php community the announcement wouldnt really be a problem, on this list there are some mighty fine programmers and extremly knowledgeable people (most of who have helped me and scores of others when we started and continue to do so till this day), and most of them have, i'm sure, very good programs for sale but NOBODY comes almost spamming the list with their products. This is a PHP discussion list, if you have a product closely related to php then most people wont mind, eg: PHP accelerators The TURCK MMCache project A good (new?) php obfuscator A php tool that converts code to binary A really good php article to help you program better A great tool to help you program better/faster (contriversial as everyone has their favs) There are a few exceptions like, a couple of days back I asked about a CMS system, I got a few replies and one from James about his CMS system (which is not free, not open source), thats ok because he was trying to help and his product might have been what I was looking for. I also see another product quite often being recomended when the old thread of is smarty good or best templateing package etc comes along...which too is cool and nobody minds as the software might be what the person was searching for. Another very popular questions are: how do I do xxx or where can I find a class to do this or I want this email functionality in which case a lot of times he/she is pointed to the php classes site by Manuel Lemos or someone else...but you DONT see Manuel Lemos spamming the list every time a new class is put on his site...do you? he's got a newsletter for that like any responsible company/webmaster. This is a high volume list, and I get enough of great product offers every day from porn sites and medicial companies as we manage 13 sites... and the one more won't hurt is f***ing stupid. Recommendations for the yog website, it is extremely misleading, try and change it to price for 1-9 licences. It sounds like its 1-9 licences for that price. WHO CARE`S? you are one of their customers, you might. If you signed up for their newsletter and you recieve their updates good for you, the rest of us (most of us) do not care. Most (good) sites have a newsletter system for just this thing. Anyway phpmyadmin is crap sorry, i avoid it like the plague, Fair enough, thats your opinion and we all respect it. But how would you like it if you started getting frequent updates in your mail everytime phpmyAdmin was updated? now wouldnt that be sweet? 2 cents Thanks, I'm saving it all up, every penny helps. :-D -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Passing args to a PHP script from the command line
Ben Ramsey wrote: You may also want to check out PEAR::Console_Getopt http://pear.php.net/package/Console_Getopt or better yet PEAR::Console_GetArgs http://pear.php.net/package/Console_Getargs -- Aaron Wormus -- Pears and Pickles Served fresh every day at http://php.eckspee.com -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can I set a different include path per Apache Virtual host?
Mike Zornek wrote: On 6/10/04 11:01 AM, John Nichel [EMAIL PROTECTED] wrote: What version of Apache? I currently have multiple boxes running with configurations like this, all on Apache 1.3.x, without any problems (one of them's a Mac...looks like you're using a Mac above). Ghen:~ zorn$ httpd -v Server version: Apache/1.3.29 (Darwin) Server built: Feb 4 2004 10:31:58 Ghen:~ zorn$ /usr/local/php/bin/php -v PHP 4.3.4 (cli) (built: Dec 8 2003 16:22:32) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies Apache is default from Apple and PHP is from Marc: http://www.entropy.ch/software/macosx/php/ Don't know what to tell you Mike. The site in my sig below is running on a Mac with Apache 1.3.29 (I compiled both php and Apache from source though), and I'm setting the include path for that one (and all the other vhosts) in the httpd.conf. Do you have a php info page up on your site so I can see the configure line for the Entropy version of php? -- John C. Nichel 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] Webyog releases SQLyog 3.71 SJA 2.0
Ryan A wrote: This is a high volume list, and I get enough of great product offers every day from porn sites and medicial companies as we manage 13 sites... and the one more won't hurt is f***ing stupid. I agree. Products for PHP that are being /discussed/ by the developers here is one thing. Solicited product announcements are just spam, and you all know what we'd like to do to people who send us spam. ;-P -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Passing args to a PHP script from the command line
Aaron Wormus wrote: Ben Ramsey wrote: You may also want to check out PEAR::Console_Getopt http://pear.php.net/package/Console_Getopt or better yet PEAR::Console_GetArgs http://pear.php.net/package/Console_Getargs Did I say the wrong package? Oops. Both are for the command line, but Aaron's right: I was thinking about the Getargs one. -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Passing args to a PHP script from the command line
Ben Ramsey wrote: Did I say the wrong package? Oops. GetOpts does the job, but GetArgs is brand spanking new and much more configurable. However, unless you already use other PEAR packages I would think twice about loading the big Pear codebase just to parse a few commandline options. -- Aaron Wormus -- Pears and Pickles Served fresh every day at http://php.eckspee.com -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simple cms type system
On Wed, Jun 09, 2004 at 08:29:18PM +0200 or thereabouts, Ryan A wrote: Instead of programming this from scratch was wondering if anybody can recomend any package/open source project etc that can do this, I'm sure this must have come up before with other clients. Searched google/phpresource/hot scripts/ script archive but most cms's are offering far far too much for my needs, and actually stripping them down would take as much as making a new one and some are just not worth it (in mho). Any suggestions? I've never used this (phpMyFAQ), but apparently this application is a lighter CMS; Project description: phpMyFAQ is a multilingual, completely database-driven FAQ system. It also offers a content management system, flexible multi-user support, a news system, user tracking, language modules, templates, extensive XML support, PDF support, a backup system, and an easy to use installation script. It's available on Freshmeat. -- S.Allen --- barnyard Thursday Jun 10 2004 11:50:01 AM EDT --- If you keep your mind sufficiently open, people will throw a lot of rubbish into it. -- William Orton -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can I set a different include path per Apache Virtual host?
Mike Zornek wrote: On 6/10/04 11:28 AM, John Nichel [EMAIL PROTECTED] wrote: Don't know what to tell you Mike. The site in my sig below is running on a Mac with Apache 1.3.29 (I compiled both php and Apache from source though), and I'm setting the include path for that one (and all the other vhosts) in the httpd.conf. Do you have a php info page up on your site so I can see the configure line for the Entropy version of php? Here is the info page. And attached is my current httpd.conf file (without trying to set the include_path) should it shed some light on anything. ** Could I see your conf file, or snippet to see how you do it? Our info file is here... http://www.kegworks.com/phpinfo.php Couldn't see yours, as it wanted a username/password (HTTP auth). According to your httpd.conf, php isn't running a a module... #LoadModule php4_modulelibexec/httpd/libphp4.so That line (and the corresponding AddModule line) would need to be uncommented if php was installed as a module. Look at the configure line in the php info page for KegWorks, and you'll see this --with-apxs=/usr/sbin/apxs The httpd.conf configuration for KegWorks is this # KegWorks.com Normal VirtualHost 208.135.99.99:80 ServerName www.kegworks.com ServerAlias kegworks.com *.kegworks.net *.kegworks.ca *.kegworks.ie DocumentRoot /Library/WebServer/sites/kegworks.com/ ServerAdmin [EMAIL PROTECTED] php_value include_path .:/Library/WebServer/sites/phpinclude/kegworks.com ErrorLog logs/kegworks.com-error_log CustomLog logs/kegworks.com-access_log common ErrorDocument 404 /shoppingcart/customer/pages.php?pageid=55 /VirtualHost -- John C. Nichel 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] Running a PHP script on an automated regular schedule
I.A. Gray mailto:[EMAIL PROTECTED] on Thursday, June 10, 2004 3:03 AM said: I am wanting to use a PHP script to check on an hourly/daily basis on a few things- ie links on my sites, whether the sites are up and running and also to send an e-mail to me. can you create a crontab for your user? what you'd need to do is make a file with a cron rule in it then feed that to 'crontab'. man crontab for more info. I can't really have this on a web page as wouldn't it time out? well it would only time out if the page was taking a really long time to finish processing. otherwise the page could sit there forever and not time out. what you could do in this case is keep a browser window open and use the meta-refresh header to refresh the page at a given interval. this is hardly an ellegant solution but it would work as long as the browser was kept open. I don't have my own server and so use a hosting company. Is there a way of running a PHP script on a regular basis (say every 10 or 30 mins, or hourly or daily)? read above. Does anyone know of any decent link checkers written in PHP that I could implement? in php no. but for regular windows program there's xenu link sleuth. chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [SOLVED] Can I set a different include path per Apache Virtual host?
On 6/10/04 11:56 AM, John Nichel [EMAIL PROTECTED] wrote: Our info file is here... http://www.kegworks.com/phpinfo.php Couldn't see yours, as it wanted a username/password (HTTP auth). Sorry. According to your httpd.conf, php isn't running a a module... #LoadModule php4_modulelibexec/httpd/libphp4.so That line (and the corresponding AddModule line) would need to be uncommented if php was installed as a module. It is actually loaded with an include file at the bottom: Include /usr/local/php/httpd.conf.php has: # # Additional PHP Apache directives, # part of the entropy.ch PHP package for Mac OS X # # For more information, go to http://www.entropy.ch/software/macosx/php/ # LoadModule php4_module/usr/local/php/libphp4.so AddModule mod_php4.c Anyways .. I found a work around. I set up the Directory to AllowOverride Options and then in my .htaccess file put: # PHP php_value include_path .:/usr/local/php/lib/php:/Library/WebServer/Websites/dev/content/includes And it seems to be working. Thanks for all your help. ~ Mike - Mike Zornek Web Designer, Media Developer, Programmer and Geek Personal site: http://MikeZornek.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Export data from word ducument
Hi, Thursday, June 10, 2004, 11:53:46 PM, you wrote: RD Someone,can you help me ? RD I need exported pictures that are inserted in word document to the jpg RD (gif,tiff,bmp) format. RD Is it possible and how ? RD Thanks you very much RD Roman use the Save as Web Page option in Ms word and it will extract the images for you and they usually saved in a sub directory as image1.jpg image2.jpg or .whatever off the directory where you save the document. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Free news feeds
Excellent!!! Thanks Very Much!!! Tim At 11:27 AM 10/06/2004, Ron Clark wrote: On Thu, 10 Jun 2004, Ben Ramsey wrote: Tim Winters wrote: Thanks for the reply. They actually don't have free feeds anymore. They actually say in the FAQ that they don't do that anymore. Bah! They do have free feeds, still. I can't remember how I found this link, but I went through an old backup of a bookmarks file to get it for you, and it still works. The RSS feeds unbelievably still work, too. If I got to this page from their homepage without a login, then I don't imagine they care too much about people using them. There is one thing I would suggest, though: to keep traffic down to their feeds, set up an automated script (through cron or something) to download the feed(s) once a day or once every other hour. Then, on the page you want to display the feed(s), just point to your locally downloaded copy. This way you don't tax Moreover's servers and they don't get too mad about people using the feeds. The link: http://w.moreover.com/categories/category_list_rss.html -- Regards, Ben Ramsey http://benramsey.com Attached is a text file containing a list of rss and xml news feeds we use in our portal. You have to write the code to convert the xml to plain text. -- Ron Clark sysadmin/webmaster Armstrong Atlantic State University -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with _one_ CE chars - GD library
Hi, Im doing some dynamic image creation with GD library - and I really wonder why I can't get the last character printed out on the image :( I use this file to encode the font: http://phpgeek.dk/ng/88592.enc.txt And the font I use is Frutiger CE 45 Light... I wonder if it is the font that are buggy - I can write out all other characters - but not the last one I need :( The character I can't write out is: (html: #273;) I works fine with the upper character: (html: #272;) (HTML codes added, if the newsserver removes these characters...). When I tries to write the character on the image, I just make white space... Any one tried such problems? Any solution for that? And is it the font, the encoding file - or something else that are wrong? I don't think it is my source - cause all other Central European characters I tried works fine :( (Or maybe this should a happy smiley :D) I hope someone can help me :) With best regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Problem with _one_ CE chars - GD library
Johan Holst Nielsen wrote: Any one tried such problems? Any solution for that? And is it the font, the encoding file - or something else that are wrong? Okay, I found the solution :) I was the encoding file that was wrong... The /dbar should be replaced with /dcroat Now everything works :) Is this a bug in the encoding file, or? -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Getting Server time
Alex Hogan wrote: When I'm using the time() function am I getting the time on the server? If not how can I get the time from the server regardless of whether or not its in the same time zone as the client. Use the gmdate() function. http://php.net/manual/en/function.gmdate.php -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SQL Query Statement for MySQL... (DataType -- TEXT vs BLOB)
I'm wrestling over deciding on which data type to go with, TEXT or BLOB. I have one table with one column of 400 characters, I was thinking that TEXT may be the way to go for that one. I also have another table that use 4 columns of 800 characters along with 5 columns that use 250 characters. I'm thinking of using TEXT for 9 of those columns. The reason is because I read the MySQL Manual there that say TEXT and BLOB are pretty much the same in many ways, the only thing different is that BLOB use VARCHAR Binary while TEXT use VARCHAR. But reading the article somewhere (not part of MySQL's Manual) say this... --snip-- If it doesn't have to be searchable then a BLOB might be more efficient and you shouldn't have to worry about size (Like size is important? ). The reason being that BLOB information is stored seperate from the table data and is related by a reference number in the table. This keeps the table smaller and faster as I understand. --snip-- So, I don't feel too sure what to decide on... Care for some advice or recommendation?? Thanks, Scott Fletcher begin 666 eek.gif M1TE.#EA$ `0`/Z`/___P```-7__\___\O+S `$N3DYOL]@*#QD9'?]] M``0(#3)%2#)'[EMAIL PROTECTED]/65_O6HQ24X.RI2KV\Q0/%+PM[R\Q#PP, H3/+R M_+V]QN7EYG*O_[CSTQ,4^!8!_/S_OK]CJ] ,]35/]^`+O__]?:XS1 M24%OZE1*3K?__P`6+G)RG.QS^7__UQPF3-76.G__S\\.X'%_X___'N[+?! MTZ7__WLG`*7[_\# P$Q19[EMAIL PROTECTED]:6VPY#=_WW^M+2TW-U=3A@ M;EF,_WV-GFZST8O:^R=%:TL\.S1,3XVAKBQ5PG1I:\G#PYZLT(^9M'M[?7K! M_S5-48%AX:J+BXP51_T7J,H#HV-=O;Y1]!B@(.3X!(2$S]IAH:'@`1 M)@4'#BU#1YSO_[VOR)F0\/%!L9KJ[PZS__[R\O?KX^9W@,A'M?__T) M1Z/Z_WBAI./CY T-#;/%T2DY/KRSLLG'RM___U$IVVLTMK[E \WEPG_! M_U=.0A X?4_UZ,MT^,HF.BO.;H\]#*RSQ98=78YM#/TA0_6N[KZN'D[P`7 M-P(!?OW]M[Z.KFY^5;!2M07C8D'I24FT-MXC-?;S\_0ZZNK\2ZNEB CY+ MU31W2PA*V*?NE)2604'#(BNP'HR0`4'WVKKP(!!8/'[S]KRZGIW8FK2^ MRP8'4Q7VDI[WP#8K*IJ:[EMAIL PROTECTED]/7U_P`` M M M M M`'Y! $``+H`+ `0`! `0 C_`'7IHD2*$YM0 M3K!TF##'0Q!II08^:+*C!P9+P9(D#1BR9$'M5H!2) +0*4\$ `*,0*=, MND1L\F,H`()3L18$T (H32)=( ! [EMAIL PROTECTED]((M(@`)(AR!JE*ES5X:$TSA1( MAU:[EMAIL PROTECTED]`B^C0*/3DCT!=( [EMAIL PROTECTED], ZU:7ACALB,U -J4*2Z,= M86;ILE $P 8[`#R1B*$'@ $#`*AD07,%`($6`!0U:!+%\AX`/2J LL7DT9M M% 0(P [EMAIL PROTECTED]:[EMAIL PROTECTED]:[EMAIL PROTECTED]@=- 8LZN-2'!:X2G)$8N6%T=RS/EXA!MER0^[@ `[ ` end -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Load Data
Hello! I need a problem with mysql Load Data. PHP say: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES), but my user and password is correct.The sql query is: $query_string2 = LOAD DATA INFILE '/usr/local/psa/home/vhosts/allaria.com.ar/httpdocs/XLS/precios' REPLACE INTO TABLE precio FIELDS TERMINATED BY ',' ENCLOSED BY '\' LINES TERMINATED BY '\n'; I used a vhost, what's a problem? Regards. Juan Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Load Data
Hi Juan Pablo, LOAD DATE INFILE requires the FILE privelege, and the MySQL server process must have permissions to read the file in the named directory. Most times one or both of these requirements cannot be satisfied easily, particularly in a web environment. You can get around both permissions issues using LOAD DATA LOCAL INFILE, which sends the contents of the infile over the MySQL socket to the MySQL server. In this case your running application (ie: apache, assuming PHP is running as a module) must have read permissions on the file, which is much easier to control. Regards, James -Original Message- From: Juan Pablo Herrera [mailto:[EMAIL PROTECTED] Sent: Thursday, June 10, 2004 4:15 PM To: [EMAIL PROTECTED] Subject: [PHP] Load Data Hello! I need a problem with mysql Load Data. PHP say: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES), but my user and password is correct.The sql query is: $query_string2 = LOAD DATA INFILE '/usr/local/psa/home/vhosts/allaria.com.ar/httpdocs/XLS/precios' REPLACE INTO TABLE precio FIELDS TERMINATED BY ',' ENCLOSED BY '\' LINES TERMINATED BY '\n'; I used a vhost, what's a problem? Regards. Juan Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Getting Server time
When I'm using the time() function am I getting the time on the server? If not how can I get the time from the server regardless of whether or not its in the same time zone as the client. read the *first* comment. http://us2.php.net/time chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session.use_trans_sid = 0 does not work!!!
Hi. My www provider has set session.use_trans_sid default to ON. I tried changing it in .htaccess or in the .php before session_start() but relative links are always renamed to xxx?PHPSESSION= I'm also printing the value of session_use_trans_sid with ini_get and it always returns 1 (on)! I don't know if this is important but I have a RewriteRule to parse HTM as PHP so, my links are always xxx.htm and never xxx.php. What it's happening? I noticed that this happens only in the welcome page. The following pages never (nor the welcome page if I refresh) include the ?PHPSESSION= (maybe because it detects the browser has cookies enabled). Thanks Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] session.use_trans_sid = 0 does not work!!!
Hi Robert, The initial links have session id's appended since upon the very first entry into the site, no PHPSESSION cookie is available. PHP appends the session id in the event no cookies are available- it doesn't know yet whether you have cookies on or not. If you want to forcefully remove this PHPSESSION (which is sometimes a good idea since search engine spiders will catalog the links with the session id if you don't remove it), try this: ini_set(session.use_only_cookies,1); James -Original Message- From: Robert Winter [mailto:[EMAIL PROTECTED] Sent: Thursday, June 10, 2004 4:51 PM To: [EMAIL PROTECTED] Subject: [PHP] session.use_trans_sid = 0 does not work!!! Hi. My www provider has set session.use_trans_sid default to ON. I tried changing it in .htaccess or in the .php before session_start() but relative links are always renamed to xxx?PHPSESSION= I'm also printing the value of session_use_trans_sid with ini_get and it always returns 1 (on)! I don't know if this is important but I have a RewriteRule to parse HTM as PHP so, my links are always xxx.htm and never xxx.php. What it's happening? I noticed that this happens only in the welcome page. The following pages never (nor the welcome page if I refresh) include the ?PHPSESSION= (maybe because it detects the browser has cookies enabled). Thanks Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] choosing another smtpserver with PHPs mail function
Hello everybody :). I having a little problem with PHPs build in function mail(). The mailserver isnt located on the webserver, its on another machine. I have tryed ini_set(SMTP, ipaddress); with no result. The system I'm on runs on an Linux box. Can this be done or must I write an own mail function, with sockets? _ Lättare att hitta drömresan med MSN Resor http://www.msn.se/resor/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: choosing another smtpserver with PHPs mail function
Oôv asäönsson wrote: Hello everybody :). I having a little problem with PHPs build in function mail(). The mailserver isnt located on the webserver, its on another machine. I have tryed ini_set(SMTP, ipaddress); with no result. The system I'm on runs on an Linux box. Can this be done or must I write an own mail function, with sockets? _ Lättare att hitta drömresan med MSN Resor http://www.msn.se/resor/ The smtp settings are only for PHP on Windows. You don't have to write your own, though, it's been done for you. :-) PEAR's Mail package has an smtp backend which will do all of it for you. http://pear.php.net/package/Mail -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Webyog releases SQLyog 3.71 SJA 2.0
A php tool that converts code to binary This I would love to see .. WHO CARE`S? you are one of their customers, you might. If you signed up for their newsletter and you recieve their updates good for you, the rest of us (most of us) do not care. Most (good) sites have a newsletter system for just this thing. I actually got work to buy me a licence, unfortunately because of the price, they cannot afford tobuy licences for 3 other developers so i'm the only one with it. Fair enough, thats your opinion and we all respect it. But how would you like it if you started getting frequent updates in your mail everytime phpmyAdmin was updated? now wouldnt that be sweet? LOL no that would annoy me totally, I know what you are getting at though, it was technically spam, his application is pretty good though, unfortunately the mysql control is terribly limited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Webyog releases SQLyog 3.71 SJA 2.0
Hey, A php tool that converts code to binary This I would love to see .. Yep, can hardly wait myselfcheck out www.roadsend.com , looks promising and they need volunteers to help out. (I have no connection at all to the roadsend.com company/website NOR do i get anything (money or otherwise) for sending you there) :-) I actually got work to buy me a licence, unfortunately because of the price, they cannot afford tobuy licences for 3 other developers so i'm the only one with it. Yep, checked out their prices, its a bit steep, but if you make the software you have the right to name your price. ;-) If people buy it or not...thats another issue. Fair enough, thats your opinion and we all respect it. But how would you like it if you started getting frequent updates in your mail everytime phpmyAdmin was updated? now wouldnt that be sweet? LOL no that would annoy me totally, I know what you are getting at though, it was technically spam... Great! Now you see my point. Cheers, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simple cms type system
On 10/06/2004, at 4:29 AM, Ryan A wrote: Anyway, it seems that the client has a control panel where he can make changes to the site (nothing major, just add products, edit paragraphs etc...NO shopping cart) he wants the same kind of functionality for his new pages. Have not seen his control panel but I dont think its anything major. Instead of programming this from scratch was wondering if anybody can recomend any package/open source project etc that can do this, I'm sure this must have come up before with other clients... My fav PHP-CMS is textpattern http://www.textpattern.com, but it's not quite ready for prime-time yet (for my needs - but it may be fine for yours). Everything follows a blog-like section category article metaphor, but it can be used for a lot more than blogs. This model could quite easily be bent into shape for products, static pages, etc as you need. It's opensource, has a great support forum/community, and comes with goodies like Textile http://textism.com/tools/textile/ (an ASCI shorthand HTML), templating, CSS-GUI and a lot more built in. My knee-jerk reaction though is that the simplest way out of this would be to build your own (that way you get want, without any dependancies on anything but your own skills). Searched google/phpresource/hot scripts/ script archive but most cms's are offering far far too much for my needs, and actually stripping them down would take as much as making a new one and some are just not worth it (in mho). As mentioned here many times, http://www.opensourcecommerce.com/ let's you try a bunch of them for free on the web before downloading/installing. --- Justin French http://indent.com.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simple cms type system
My fav PHP-CMS is textpattern http://www.textpattern.com, but it's Hey, Thanks for the link. Am still searching as nearly every system I looked at is far far too much in features / price or my needs are just too small I guess. Just need something that will allow me to use my design and allow the client to update/add/delete text and pictures. Anything comes to mind? if not, tell me which one is best to strip to get the above... Thanks, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SQL Query Statement for MySQL... (DataType -- TEXT vs BLOB)
Probably a good question for a MySQL e-mail list. [Original Message] From: Scott Fletcher [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: 06/10/2004 12:49:07 PM Subject: [PHP] SQL Query Statement for MySQL... (DataType -- TEXT vs BLOB) I'm wrestling over deciding on which data type to go with, TEXT or BLOB. I have one table with one column of 400 characters, I was thinking that TEXT may be the way to go for that one. I also have another table that use 4 columns of 800 characters along with 5 columns that use 250 characters. I'm thinking of using TEXT for 9 of those columns. The reason is because I read the MySQL Manual there that say TEXT and BLOB are pretty much the same in many ways, the only thing different is that BLOB use VARCHAR Binary while TEXT use VARCHAR. But reading the article somewhere (not part of MySQL's Manual) say this... --snip-- If it doesn't have to be searchable then a BLOB might be more efficient and you shouldn't have to worry about size (Like size is important? ). The reason being that BLOB information is stored seperate from the table data and is related by a reference number in the table. This keeps the table smaller and faster as I understand. --snip-- So, I don't feel too sure what to decide on... Care for some advice or recommendation?? Thanks, Scott Fletcher -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Binary mah
Hey gang, I've got a complex algorithm that I'm trying to work out. I'm trying to store and retrieve a set of switches in a decimal representation of a binary number. I have four checkboxes, call them A, B, C, and D. They can be represented by a (decimal) number from 0 to 15 in binary ( to ). I need to be able to store and retrieve this set of data. I've got the script to store it, and I thought I had the script to retrieve the data, but I can't seem to get the checkboxes to actually be checked (or not) depending on the value in the database. I don't like dealing with the data this way, but the program I'm interacting with requires it. The script below is used to handle a number of data elements on the page. $pagevars is an array of the variables on the page, and the table they are located in. set_val(a,b) puts the values in array a into the variables listed in array b. form_element(a,b) is a function that returns a form element of type a (CB, TB) with the variable a. So form_element(CB,var) returns the following: INPUT TYPE=CHECKBOX NAME=var / If the value is 1 or on, CHECKED will be added. Here's the script: --- START CORE.PHP --- ?php include(../functions.inc); include(menu.html); $pagevars=array(statistics=array(StatFlags,StatFiles,StatMail,STF_Hours,STM_Hours)); if (isset($_POST['submit'])) { $stat=$_POST['stat']; for ($i=0;$i4;$i++) { $t[$i]=isset($stat[$i])?1:0; } $stat=implode(,$t); $StatFlags=bindec($stat); $_POST['StatFlags']=$StatFlags; unset($_POST['stat']); if (!set_val($_POST,$pagevars)) { echo data not written to database. Contact system administrator; } } $page_var_vals=get_vars($pagevars); if (is_array($page_var_vals)) { extract($page_var_vals); } echo StatFlags:$StatFlagsBR; $stat=preg_split('//', str_pad(decbin($StatFlags), 4, 0, STR_PAD_LEFT), -1, PREG_SPLIT_NO_EMPTY); for ($i=0;$i4;$i++) { $stat[$i]=($stat[$i]==1)?on:; } debug($stat); ? H1Statistics/H1 FORM METHOD=POST ACTION=?php echo $_SERVER['PHP_SELF']; ? p?php form_element(CB,stat[0]); ?Save statistics to a file periodically Every ?php form_element(TB,STF_Hours); ?hours/p pSave in: ?php form_element(TB,StatFiles); ?/p p?php form_element(CB,stat[1]); ?Email statistics periodically Every ?php form_element(TB,STM_Hours); ?hours/p pSend to: ?php form_element(TB,StatMail); ?/p p?php form_element(CB,stat[2]); ?Automatically open the statistics window at startup/p p?php form_element(CB,stat[3]); ?Collect statistics about mail sent by local users/p pSystem Messages/p pSystem reporting level: SELECT NAME= option value=0 0 - No messages /option option value=1 1 - Urgent messages /option option value=2 2 - Significant messages /option option value=3 3 - Normal messages /option option value=4 4 - Informational messages /option option value=5 5 - Debugging messages /option /SELECT/p pNumber of messages to store: ?php form_element(TB,); ?/p p?php form_element(CB,); ? Automatically open the system messages window on startup/p INPUT TYPE=SUBMIT NAME=submit VALUE=Save / INPUT TYPE=Reset VALUE=Cancel / /form /body /html --- END CORE.PHP --- = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Binary mah
Mark wrote: Hey gang, I've got a complex algorithm that I'm trying to work out. I'm trying to store and retrieve a set of switches in a decimal representation of a binary number. I have four checkboxes, call them A, B, C, and D. They can be represented by a (decimal) number from 0 to 15 in binary ( to ). I need to be able to store and retrieve this set of data. I've got the script to store it, and I thought I had the script to retrieve the data, but I can't seem to get the checkboxes to actually be checked (or not) depending on the value in the database. I'm not sure what's wrong with the code you have, but for the 4-digit one you have: $packed = 4-bit var with ABCD encoded in it $a = $packed 1; $b = $packed 2; $c = $packed 4; $d = $packed 8; I don't like dealing with the data this way, but the program I'm interacting with requires it. The script below is used to handle a number of data elements on the page. $pagevars is an array of the variables on the page, and the table they are located in. set_val(a,b) puts the values in array a into the variables listed in array b. form_element(a,b) is a function that returns a form element of type a (CB, TB) with the variable a. So form_element(CB,var) returns the following: INPUT TYPE=CHECKBOX NAME=var / If the value is 1 or on, CHECKED will be added. Here's the script: --- START CORE.PHP --- ?php include(../functions.inc); include(menu.html); $pagevars=array(statistics=array(StatFlags,StatFiles,StatMail,STF_Hours,STM_Hours)); if (isset($_POST['submit'])) { $stat=$_POST['stat']; for ($i=0;$i4;$i++) { $t[$i]=isset($stat[$i])?1:0; } $stat=implode(,$t); $StatFlags=bindec($stat); $_POST['StatFlags']=$StatFlags; unset($_POST['stat']); if (!set_val($_POST,$pagevars)) { echo data not written to database. Contact system administrator; } } $page_var_vals=get_vars($pagevars); if (is_array($page_var_vals)) { extract($page_var_vals); } echo StatFlags:$StatFlagsBR; $stat=preg_split('//', str_pad(decbin($StatFlags), 4, 0, STR_PAD_LEFT), -1, PREG_SPLIT_NO_EMPTY); for ($i=0;$i4;$i++) { $stat[$i]=($stat[$i]==1)?on:; } debug($stat); ? H1Statistics/H1 FORM METHOD=POST ACTION=?php echo $_SERVER['PHP_SELF']; ? p?php form_element(CB,stat[0]); ?Save statistics to a file periodically Every ?php form_element(TB,STF_Hours); ?hours/p pSave in: ?php form_element(TB,StatFiles); ?/p p?php form_element(CB,stat[1]); ?Email statistics periodically Every ?php form_element(TB,STM_Hours); ?hours/p pSend to: ?php form_element(TB,StatMail); ?/p p?php form_element(CB,stat[2]); ?Automatically open the statistics window at startup/p p?php form_element(CB,stat[3]); ?Collect statistics about mail sent by local users/p pSystem Messages/p pSystem reporting level: SELECT NAME= option value=0 0 - No messages /option option value=1 1 - Urgent messages /option option value=2 2 - Significant messages /option option value=3 3 - Normal messages /option option value=4 4 - Informational messages /option option value=5 5 - Debugging messages /option /SELECT/p pNumber of messages to store: ?php form_element(TB,); ?/p p?php form_element(CB,); ? Automatically open the system messages window on startup/p INPUT TYPE=SUBMIT NAME=submit VALUE=Save / INPUT TYPE=Reset VALUE=Cancel / /form /body /html --- END CORE.PHP --- = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Undiscovered Firefox...
Okay, I'm sitting at home, writing a bit of code for one of my personal sites, and I'm currently working on a function to detect different browser types. Well, I think I have the URL to a page on one of my boxes which echo's out the HTTP_USER_AGENT in my clipboard. However, what I have there is elseif ( preg_match ( /Firefox/, $_SERVER['HTTP_USER_AGENT'] ) ) { Well, I paste this into Firefox's URL bar and hit enter before my brain can tell my hands that this is not what I want to do. Do I get a could not find server error from Firefox? Nope. It forwards me to this page http://itangersjack.com/oddball/cheese.htm Nothing really special about the page, except it's revealing source code to something I'm currently working on (not in the way I'm doing it, but it's there). Okay, it's late, and I'm easily amused. ;) -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Undiscovered Firefox...
John Nichel wrote: Okay, I'm sitting at home, writing a bit of code for one of my personal sites, and I'm currently working on a function to detect different browser types. Well, I think I have the URL to a page on one of my boxes which echo's out the HTTP_USER_AGENT in my clipboard. However, what I have there is elseif ( preg_match ( /Firefox/, $_SERVER['HTTP_USER_AGENT'] ) ) { Well, I paste this into Firefox's URL bar and hit enter before my brain can tell my hands that this is not what I want to do. Do I get a could not find server error from Firefox? Nope. It forwards me to this page http://itangersjack.com/oddball/cheese.htm Nothing really special about the page, except it's revealing source code to something I'm currently working on (not in the way I'm doing it, but it's there). Okay, it's late, and I'm easily amused. ;) BTW, you should really use strstr($_SERVER['HTTP_USER_AGENT'], 'Firefox'); or stristr -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Undiscovered Firefox...
Justin Patrin wrote: BTW, you should really use strstr($_SERVER['HTTP_USER_AGENT'], 'Firefox'); or stristr I'm an old Perl guy. Me likes perl regular expressions. :) -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Improving my Regex?
Looking for suggestions on if this bit of code can be improved.. The goal. To extract the conditions in the WHERE of an sql statement. I would appreciate any pointers you may have... Thanks ?php $hello = 'Hello'; $world = 'World'; $foo_bar = 'foo bar'; $sql = SELECT FROM TABLE WHERE id = 1, greeting = '$hello', destination = '$world', what = '$foo_bar' ORDER BY some_id; header('content-type: text/plain'); $regex = '/([a-z0-9_]+)\s?=\s?(\d+|\'.*?\')/'; preg_match_all($regex, $sql, $match, PREG_SET_ORDER); var_dump($sql, $regex, $match); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Undiscovered Firefox...
John Nichel wrote: Justin Patrin wrote: BTW, you should really use strstr($_SERVER['HTTP_USER_AGENT'], 'Firefox'); or stristr I'm an old Perl guy. Me likes perl regular expressions. :) Sure, I love PREGs myself, but it's way overkill for such a simple operation. ;-) -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Undiscovered Firefox...
* Thus wrote Justin Patrin ([EMAIL PROTECTED]): John Nichel wrote: Justin Patrin wrote: BTW, you should really use strstr($_SERVER['HTTP_USER_AGENT'], 'Firefox'); or stristr I'm an old Perl guy. Me likes perl regular expressions. :) Sure, I love PREGs myself, but it's way overkill for such a simple operation. ;-) .0002 seconds overkill Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php