[PHP-DB] Duplicates
Howdi all, How can you list the contents of a table and skip duplicate Dates?? eg select Date from table_name where name = 'Test'; |Date| 2000-01-01 2000-01-02 2000-01-02 --- How would you get rid of this duplicate date (without deleting it ;-))? I want to just get a list of dates in the table that querys have been inserted, but not duplicate dates... Say for instance I had 1 entry on 2000-01-01, and I had 10 entrys on 2000-01-02 I want it to tell me that there is a date for 2000-01-01 and a date for 2000-01-02, not for it to tell me there is 10 entrys on 2000-01-02 Any help would be appreciated Many Thanks guys -- Chris Grigor Calibre Clinical Consultants -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Duplicates
select distinct Date from table_name where name = 'Test'; Jeff Chris Grigor chris@calibre To: PHP Gen [EMAIL PROTECTED], PHP DB .co.za [EMAIL PROTECTED] cc: 10/23/2002 Subject: [PHP-DB] Duplicates 08:04 AM Howdi all, How can you list the contents of a table and skip duplicate Dates?? eg select Date from table_name where name = 'Test'; |Date| 2000-01-01 2000-01-02 2000-01-02 --- How would you get rid of this duplicate date (without deleting it ;-))? I want to just get a list of dates in the table that querys have been inserted, but not duplicate dates... Say for instance I had 1 entry on 2000-01-01, and I had 10 entrys on 2000-01-02 I want it to tell me that there is a date for 2000-01-01 and a date for 2000-01-02, not for it to tell me there is 10 entrys on 2000-01-02 Any help would be appreciated Many Thanks guys -- Chris Grigor Calibre Clinical Consultants -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Duplicates
select date from table_name where name='test' GROUP BY date -Original Message- From: Chris Grigor [mailto:chris;calibre.co.za] Sent: woensdag 23 oktober 2002 14:04 To: PHP Gen; PHP DB Subject: [PHP-DB] Duplicates Howdi all, How can you list the contents of a table and skip duplicate Dates?? eg select Date from table_name where name = 'Test'; |Date| 2000-01-01 2000-01-02 2000-01-02 --- How would you get rid of this duplicate date (without deleting it ;-))? I want to just get a list of dates in the table that querys have been inserted, but not duplicate dates... Say for instance I had 1 entry on 2000-01-01, and I had 10 entrys on 2000-01-02 I want it to tell me that there is a date for 2000-01-01 and a date for 2000-01-02, not for it to tell me there is 10 entrys on 2000-01-02 Any help would be appreciated Many Thanks guys -- Chris Grigor Calibre Clinical Consultants -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: [PHP] Duplicates
Check out DISTINCT in the MySQL manual SELECT DISTINCT(yourdatecolumn) * FROM tablename WHERE .. or something like that Justin on 23/10/02 10:04 PM, Chris Grigor ([EMAIL PROTECTED]) wrote: Howdi all, How can you list the contents of a table and skip duplicate Dates?? eg select Date from table_name where name = 'Test'; |Date| 2000-01-01 2000-01-02 2000-01-02 --- How would you get rid of this duplicate date (without deleting it ;-))? I want to just get a list of dates in the table that querys have been inserted, but not duplicate dates... Say for instance I had 1 entry on 2000-01-01, and I had 10 entrys on 2000-01-02 I want it to tell me that there is a date for 2000-01-01 and a date for 2000-01-02, not for it to tell me there is 10 entrys on 2000-01-02 Any help would be appreciated Many Thanks guys -- Chris Grigor Calibre Clinical Consultants -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Security
check http://www.mysql.com/doc/en/Miscellaneous_functions.html it covers a number of options Peter --- Excellence in internet and open source software --- Sunmaia www.sunmaia.net tel. 0121-242-1473 --- -Original Message- From: Doaldo Navai Junior [mailto:doaldo;triunfo-bsb.com.br] Sent: 22 October 2002 05:46 To: [EMAIL PROTECTED] Subject: [PHP-DB] Security I need RSA cryptography (or another assymetric method) to crypt the data in my db. How can I do it? Doaldo [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Print data
hello, at my company we have several network printers and i was was wondering if it's possible to print directly to them using PHP, instead of showing on the screen or both ... to gain more control on what is printed, because of the nasty browsers header and footer ... whom i now how to remove ... i know that the printer IP is 192.192.1.100 and the port is 9005 ... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Print data
I think this is only available as an option if you are running on windows based hardward, but if you are...i know i've seen it in the manual. José Moreira jmoreira@e-te To: Php Windows [EMAIL PROTECTED], Php-Db rno.net [EMAIL PROTECTED] cc: 10/23/2002 Subject: [PHP-DB] Print data 10:05 AM hello, at my company we have several network printers and i was was wondering if it's possible to print directly to them using PHP, instead of showing on the screen or both ... to gain more control on what is printed, because of the nasty browsers header and footer ... whom i now how to remove ... i know that the printer IP is 192.192.1.100 and the port is 9005 ... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Echo Command Thanks
Hi there everyone, Thank you all for your responses to my question about the best way to end a PHP command (Or use Echo to print HTML). My gut feeling was it should be ok, it's just that *To me* it is MUCH easier to follow code which doesn't contain echo table width=50 etc . I much prefer to do it ? table width=50 and so on, it seems to look much cleaner to me. I'm not a C+ programmer, a Perl programmer or anything like that, i've learnt ASP and PHP, started with ASP but found it to be a system hog, tried PHP and fell in love with it within a couple of days and just wanted to make sure I wasn't putting unecessary strain on my server :-) Thanks again everyone, this is the best PHP / Programming mailinglist out there. Regards Chris Payne -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] MySQL crypt test...
I am having trouble with a canned calendar application and I think that maybe the problem is the crypt function. Does anyone know of a good way to test the crypt function? I need to figure out somehow if this is the source of the problem or not. Thanks. Scott Nipp Phone: (214) 858-1289 E-mail: [EMAIL PROTECTED] Web: http:\\ldsa.sbcld.sbc.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PHP mail + MySQL
Dear Readers, Is there anybody who nows about a php-script which can be used to download email from a pop-account and then put the e-mailmessages and their attachments into a MySQL database. I want to use it to create a database of all e-mailmessages send to our company. This will greatly help us because as an online shop we are buried in mail. Probaly I'll will be able to script against it so our employees can answer e-mail from a php-webpage and maybe even write a script to put the names and adresses of the senders into a LDAP-server. Thanx, Maarten Verheijen
[PHP-DB] Re: PHP and databases? ...without MySQL and such
You can use the Microsoft ODBC Text driver to access flat files and perform SQL Queries on it - can be REALLY slow on big files though (no indexes) :( Alternatively - write a script that pulls the flat file into a proper database table :) Hope this helps -- Richard Allsebrook Applications and Web Development John Negretti [EMAIL PROTECTED] wrote in message news:47D4D382C169C84AADDC68C0600917992FDD1A;CSAN0MS01.corp.cox.com... Hello All, I am somewhat new to PHP and I have a question relating to FLAT FILE databases. First let me give an introduction to my question. I used to work at a company (www.miva.com) where we developed our own scripting language Miva Script, so my only experience with PHP was for comparison and such. The company was not doing so good and was barley afloat, so I left. In my efforts to find a new scripting language I choose PHP over ColdFusion, even though Miva Script was so similar to ColdFusion. I am loving PHP, I never realized just how extensive PHP is. Now I am at a big company where red tape has to be dealt with before I could get access to a database server. With the Miva Script language it has it's own built-in database (dBASE-DBF), so databases were never a problem with web development. So, I am stuck with either using PHP and finding a solution or reverting to Miva Script, which I do NOT want to do, of course I want to stay with PHP. I have been doing some research on google.com and such and have not found too much information on PHP with Flat File or DBF databases. I did find some PHP scripts working with Flat File databases, but not really what I need. Does anyone have any suggestions, or is PHP mostly just for MySQL and such. I am developing some PHP classes/functions that are utilizing file() and array() to read and edit my flat files. It's not perfected yet and I am running into difficulties here and there and this is why am I asking for any opinions or comments on available resources. When I get done with it I'll post it for free at www.ideablue.com (my personal site). Well, I do give thanks in advance for any help. NOTE: I think PHP is a great language and I do hope to stick with it. There are many great resources like www.phpbuilder.com, www.phpbeginner.com and the extensive documentation at www.php.net. Thanks to all that help us new PHP developers. John Negretti Web Applications Developer Cox Communications www.cox.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: [PHP] Re: PHP and databases? ...without MySQL and such
Youc use xml files as well as an alternative Richard Allsebrook wrote: You can use the Microsoft ODBC Text driver to access flat files and perform SQL Queries on it - can be REALLY slow on big files though (no indexes) :( Alternatively - write a script that pulls the flat file into a proper database table :) Hope this helps -- Richard Allsebrook Applications and Web Development John Negretti [EMAIL PROTECTED] wrote in message news:47D4D382C169C84AADDC68C0600917992FDD1A;CSAN0MS01.corp.cox.com... Hello All, I am somewhat new to PHP and I have a question relating to FLAT FILE databases. First let me give an introduction to my question. I used to work at a company (www.miva.com) where we developed our own scripting language Miva Script, so my only experience with PHP was for comparison and such. The company was not doing so good and was barley afloat, so I left. In my efforts to find a new scripting language I choose PHP over ColdFusion, even though Miva Script was so similar to ColdFusion. I am loving PHP, I never realized just how extensive PHP is. Now I am at a big company where red tape has to be dealt with before I could get access to a database server. With the Miva Script language it has it's own built-in database (dBASE-DBF), so databases were never a problem with web development. So, I am stuck with either using PHP and finding a solution or reverting to Miva Script, which I do NOT want to do, of course I want to stay with PHP. I have been doing some research on google.com and such and have not found too much information on PHP with Flat File or DBF databases. I did find some PHP scripts working with Flat File databases, but not really what I need. Does anyone have any suggestions, or is PHP mostly just for MySQL and such. I am developing some PHP classes/functions that are utilizing file() and array() to read and edit my flat files. It's not perfected yet and I am running into difficulties here and there and this is why am I asking for any opinions or comments on available resources. When I get done with it I'll post it for free at www.ideablue.com (my personal site). Well, I do give thanks in advance for any help. NOTE: I think PHP is a great language and I do hope to stick with it. There are many great resources like www.phpbuilder.com, www.phpbeginner.com and the extensive documentation at www.php.net. Thanks to all that help us new PHP developers. John Negretti Web Applications Developer Cox Communications www.cox.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: [PHP] PHP and databases? ...without MySQL and such
Darren Henderson [EMAIL PROTECTED] wrote... : 1. Anything more than just one single PHP file made in your text editor. Not sure what you mean by this. If I write a single suite of data handling routines then it doesn't matter if I have one or 10,000 pages using it. I meant a file to write and store the data. A configuration file, for example. 2. Dynamically modifying your configuration files. File locks? Not a hard or complicated thing. But isn't a RDBMS easier and safer at that point? A very big point, actually. 3. Per-user based configurations like to store things for later, frequent use. ndbm type solution is much better suited to this unless you have complicated querying requirements. And unless you are dealing with many users a simple unix type password table or user configuration files is perfectly sufficient. Yes, if you never have to touch individual user's data from within an admin area. But, if you want to do more things than just loading variables - you need querying each file :) 1. Simpler developing a database in SQL than in some Flat Files logic. This means investment saving. Sessions are ideal. SQL buys nothing at all but complexity. A shopping cart is a list of items - you do not need to do multi-key/foreign key look ups to deal with it. I didn't talk about sessions and multy-key/foreign-key staff yet. All I want to mention is that, creating a logic between Flat Files is not a simple thing, and, often, SQL usage will be easier. Unless one doesn't know SQL at all and take really long time to start using it. Files are more intuitive, true, but less complex than SQL. Consider this for displaying an item out: ?php $link = mysql_connect(mysql_host, mysql_user, mysql_password)); mysql_select_db(my_shop); $result = mysql_query(SELECT * FROM products WHERE product_id = $id); $product = mysql_fetch_array($result, MYSQL_ASSOC)) ? Againsts this: ?php include(/a/huge/file.php); $product = $data[$id]; ? Easier with files, no? But, s limited... for a shopping cart is not optimal at all. You will have to be quite experienced to write data in PHP syntax with a solid logic and locking files. If you are, then your experience will tell you - just get a DB, it's better. So if you've written your applications correctly Let me cut it here: if one writes an application correctly - it means it will write it with a DB, not flat files for a shopping cart. I would much rather worry about that then worry about backing up data bases, every RDBMS has such utility. checking to make sure I can talk to the db What about checking to make sure file is still writable (by anything on the server?) dealing with network outages Not always a need. dealing with speed issues, RDBMS is faster in most cases, and, even if not then the downgrade rarely goes over 1-10 milliseconds for things accomplishable also with Flat Files. especially in a heavily shared environment as exists in most/many hosting companies. believe me, files are worth in these cases :) Until recently MySQL didn't have transaction protection. In many hosting environements it isn't offered. If you are not using the roll back capabilities of the latest versions of MySQL then you do not have data integrity. Data integrity is not only everything we hear about Oracle and what mySQL only now is trying to implement. Data Integrity is also knowing that the data is controlled by an application specialized in that. If you need a real data integrity look for PostgreSQL that is Open Source (or expensive Oracle which is the maximum of Data Integrity logistics). The password needs to be stored somewhere on the file system - there is no advantage here. I wold hope you are protecting accounts and files with appropriate file permissions. You are right about this. But, theoretically, it is still easier to steal a folder than a DB. If you have complicated searches over a lot of data then yes, a data base is appropriate. I didn't say it was never the way to go. But - I would take issue with this statement. a little search on a few variables is almost always going to be faster in a flat file unless you are refering to finding a few records based on a key. If you ever write files, then at least write PHP files that can be simply included and referred by array keys. Then yes - files are faster. But, if data is big than not. Database is also portable, and portability is VERY important in programming. Conclusion: 1. Flat files - for site configurations 2. Database - for data manipulations Databases are suitable for situations where you have a large amount of complex data that you must do complex operations on. The trade off will be the extra maintenace you must do and the additional potential points of failure you must contend with. But truly, the one that knows to handle files well normally has no problems writing SQL either and/or keeping a DB server up. Be
[PHP-DB] loading includes
Here's one that will shake your head, mine's about shook off. Basic problem: new site works on my box but not on dev server. Both boxes have Apache and php loaded. New site is not loading includes and dynamic data. The old site copy on dev server has some main pages that include some files when loaded and loads some dynamic data from a database. I'll call one of the main pages pgroups. When old pgroups gets loaded on dev server, included files are included fine and data gets loaded. When I ftp over my modified pgroups - files are not included nor does data get loaded. The modifications are small in number, but basically add a javascript menu to pgroup and some layers in an included file. I've tried commenting out the javascript code in pgroup but it still wont add header.php which has meta tag info, plus other include file info that does load with old script. Done some other error checking to basically prove that the include files are not being included on dev server. I have also tried including the absolute path when calling the include, which is in the same directory as pgroup anyway Additionally, on my box, all of the new files work fine. All the includes get loaded and dynamic data gets loaded. *** my box - only thing in php.ini is register globals = ON *** dev server - php.ini include path is commented out. But old code gets loaded fine. This code was loaded and configured by someone else that got it from phpnuke for free. Lucky me. We would start from scratch but have 11/1 deadline. I can send each page of code, pgroup.old pgroup.new, both are about 3 pages long. I think we're not supposed to send attachments ? I cant remember. Both boxes have Apache 1.3 and am assuming php 4 on both. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Print data
hello, at my company we have several network printers and i was was wondering if it's possible to print directly to them using PHP, instead of showing on the screen or both ... to gain more control on what is printed, because of the nasty browsers header and footer ... whom i now how to remove ... i know that the printer IP is 192.192.1.100 and the port is 9005 ... The printer functions in the manual only work in windows and only work for the printer attached directly to the server. Hmm..I wonder, though, if you have a network printer that's set up to print from the server, can you use the printer functions to print to that? I'm sure the answer is in the manual. If not, maybe you can open a connection directly to the printer and send it the raw data, if you know the format. ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Function that outputs at line xxx
Hey -- I'm writing a database error handler function in PHP, and I want it to tell me at what line in what script the error occurred. Is this possible? I know it happens when PHP hits a warning or a fatal error, but is it possible to do in a live script? Or is there a global variable which keeps track of what line in which scripts each execution is at? Thanks, Peter --- Peter BeckmanSystems Engineer, Fairfax Cable Access Corporation [EMAIL PROTECTED] http://www.purplecow.com/ --- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Function that outputs at line xxx
__LINE__ and __FILE__ should work. ---John Holmes... - Original Message - From: Peter Beckman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 23, 2002 3:00 PM Subject: [PHP-DB] Function that outputs at line xxx Hey -- I'm writing a database error handler function in PHP, and I want it to tell me at what line in what script the error occurred. Is this possible? I know it happens when PHP hits a warning or a fatal error, but is it possible to do in a live script? Or is there a global variable which keeps track of what line in which scripts each execution is at? Thanks, Peter -- - Peter BeckmanSystems Engineer, Fairfax Cable Access Corporation [EMAIL PROTECTED] http://www.purplecow.com/ -- - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] mysql_affected_cols() ??? or equivalent?
Is it possible to find out how many columns from a row were updated in a single update SQL command? For example: $x = mysql_query(update users set un={$un},pw={$pw},ln={$ln},fn={$fn} where id={$id}); And the function (something like mysql_affected_cols()) would return 0 if everything stayed the same (like mysql_affected_rows() does), or if something changed, the number of columns that were changed. So if only the password and first name were changed, mysql_affected_cols() would return 2. From PHP.net regarding mysql_affected_rows(): When using UPDATE, MySQL will not update columns where the new value is the same as the old value. This creates the possiblity that mysql_affected_rows() may not actually equal the number of rows matched, only the number of rows that were literally affected by the query. Any ideas? Peter --- Peter BeckmanSystems Engineer, Fairfax Cable Access Corporation [EMAIL PROTECTED] http://www.purplecow.com/ --- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Function that outputs at line xxx
Yeah, I understand what your asking. I don't know of any method to get the line number a function was called on, from within the function. You may have to pass __LINE__ and __FILE__ in your db_query() function, or whatever it is. ---John Holmes... - Original Message - From: Peter Beckman [EMAIL PROTECTED] To: 1LT John W. Holmes [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, October 23, 2002 3:26 PM Subject: Re: [PHP-DB] Function that outputs at line xxx John, that does work! Thanks. The problem is this: Database calls are in db.inc. The script problem occurs in wine.inc. True, the SQL is called and executed from db.inc, so __LINE__ and __FILE__ are correct in a way. But how do I find out where in the execution of my script the other files are in their execution? index.php -- calls function in wine.inc -- calls function in db.inc -- throws SQL error, calls function in wine.inc -- which prints error to user nicely and exits What I want is when db.inc throws the error and passes the error text to the db_error function in wine.inc to look pretty for the user, I want to know where the function db_query was called in wine.inc (one level up, the script which called the function now running). Is this possible? Does it exist? Peter On Wed, 23 Oct 2002, 1LT John W. Holmes wrote: __LINE__ and __FILE__ should work. ---John Holmes... - Original Message - From: Peter Beckman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 23, 2002 3:00 PM Subject: [PHP-DB] Function that outputs at line xxx Hey -- I'm writing a database error handler function in PHP, and I want it to tell me at what line in what script the error occurred. Is this possible? I know it happens when PHP hits a warning or a fatal error, but is it possible to do in a live script? Or is there a global variable which keeps track of what line in which scripts each execution is at? Thanks, Peter -- - Peter BeckmanSystems Engineer, Fairfax Cable Access Corporation [EMAIL PROTECTED] http://www.purplecow.com/ -- - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- - Peter BeckmanSystems Engineer, Fairfax Cable Access Corporation [EMAIL PROTECTED] http://www.purplecow.com/ -- - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] PHP and databases? ...without MySQL and such
PHP-nites, I want to thank you all for your insight on PHP and database options, particularly to FLAT FILES. Many of you commented on using MySQL or Oracle and such, commenting how better it would be. I STRONGLY agree that using MySQL or any DMBS database application is a FAR better options. Although I am in a situation where I can only use FLAT FILE databases. I know it is not the best solution, but better than no database at all. I have looked into your suggestions on using dbase_create, php_dbase.dll, dbm, dba, xml, com and such, yet without finding a real solution. So, I am developing my own custom functions to maintain FLAT FILE databases. - EXAMPLES: - $conf_array = _FILEDB::Open( '/data/file.txt' ); _FILEDB::Edit( $conf_array, $line_id, $header, $new_value ); _FILEDB::Search( $conf_array, 'LIKE', 'joh*' ); _FILEDB::SearchHeader( $conf_array, 'LIKE', 'FNAME', 'John' ); Well, when I get done I'll post a link to download it for free. I know everyone is PRO MySQL, so am I. I just think flat files should not be excluded. Again, thank you all for your help. John Negretti -Original Message- From: Negretti, John (CCI-San Diego) Sent: Tuesday, October 22, 2002 9:00 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-WIN] PHP and databases? ...without MySQL and such Hello All, I am somewhat new to PHP and I have a question relating to FLAT FILE databases. First let me give an introduction to my question. I used to work at a company (www.miva.com) where we developed our own scripting language Miva Script, so my only experience with PHP was for comparison and such. The company was not doing so good and was barley afloat, so I left. In my efforts to find a new scripting language I choose PHP over ColdFusion, even though Miva Script was so similar to ColdFusion. I am loving PHP, I never realized just how extensive PHP is. Now I am at a big company where red tape has to be dealt with before I could get access to a database server. With the Miva Script language it has it's own built-in database (dBASE-DBF), so databases were never a problem with web development. So, I am stuck with either using PHP and finding a solution or reverting to Miva Script, which I do NOT want to do, of course I want to stay with PHP. I have been doing some research on google.com and such and have not found too much information on PHP with Flat File or DBF databases. I did find some PHP scripts working with Flat File databases, but not really what I need. Does anyone have any suggestions, or is PHP mostly just for MySQL and such. I am developing some PHP classes/functions that are utilizing file() and array() to read and edit my flat files. It's not perfected yet and I am running into difficulties here and there and this is why am I asking for any opinions or comments on available resources. When I get done with it I'll post it for free at www.ideablue.com (my personal site). Well, I do give thanks in advance for any help. NOTE: I think PHP is a great language and I do hope to stick with it. There are many great resources like www.phpbuilder.com, www.phpbeginner.com and the extensive documentation at www.php.net. Thanks to all that help us new PHP developers. John Negretti Web Applications Developer Cox Communications www.cox.com -- To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Credit Card Info Cryptography
Suppose I sell some products online and get user's credit card info via SSL connection. Isn't there any method (free, preferably) of ASSYMETRIC (Public key) cryptography I can use with PHP to store this data in a db?? Or is there any other good option instead of this? TIA, Doaldo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Credit Card Info Cryptography
Well... You can use PGPG/GNPGP for this or you can develop your own RSA encryption - if you understand/have the know how. A former programmer of mine who worked for a Security firm developed the base-line code which was originally written in C then transferred into Perl. He was greatful enough to provide us with the code (which is quite small) while working a few site before his departure. Seems to works like a charm and we've never had any issues with it (hacking, etc). Regards, Aaron -Original Message- From: Doaldo Navai Junior [mailto:doaldo;triunfo-bsb.com.br] Sent: Wednesday, October 23, 2002 2:53 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-DB] Credit Card Info Cryptography Suppose I sell some products online and get user's credit card info via SSL connection. Isn't there any method (free, preferably) of ASSYMETRIC (Public key) cryptography I can use with PHP to store this data in a db?? Or is there any other good option instead of this? TIA, Doaldo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Credit Card Info Cryptography
Since your goal is to encrypt the card number in the database you'll naturally need a way to decrypt it as well. At that point it seems your concern is that your database will be compromised. That can be avoided easily by creating a single private key and using your own algorithm to encrypt based on that key. The only catch is, if the code that does the encrypting is compromised, and the database is compromised, then the numbers are compromised. My basic point is, your need is not the same as what PGP addresses in that PGP addresses the more difficult problem of passing data between 2 entities. Your requirement is very simple to address; 1. write a simple compiled module with an embedded key, 2. keep that key in a safe place, and 3. write another module to decrypt, all it needs is the key. This is similar to what was done with DVDs, just don't allow your encryption algorithms to be compromised. You can put the source code in the same place as your key, you can use a code scrambler when you compile, and you should already have your server secure already. Again, my point is, this is easy because the same entity that encrypts is doing the decrypt. Hope this helps. Ryan -Original Message- From: Doaldo Navai Junior [mailto:doaldo;triunfo-bsb.com.br] Sent: Wednesday, October 23, 2002 12:53 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-DB] Credit Card Info Cryptography Suppose I sell some products online and get user's credit card info via SSL connection. Isn't there any method (free, preferably) of ASSYMETRIC (Public key) cryptography I can use with PHP to store this data in a db?? Or is there any other good option instead of this? TIA, Doaldo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Credit Card Info Cryptography
When ever I see easy, encrypt, and credit card in the same sentence, it makes me worry. Don't store credit card numbers. Charge them once and don't save it anywhere. ---John Holmes... - Original Message - From: Ryan Jameson (USA) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 23, 2002 4:20 PM Subject: RE: [PHP-DB] Credit Card Info Cryptography Since your goal is to encrypt the card number in the database you'll naturally need a way to decrypt it as well. At that point it seems your concern is that your database will be compromised. That can be avoided easily by creating a single private key and using your own algorithm to encrypt based on that key. The only catch is, if the code that does the encrypting is compromised, and the database is compromised, then the numbers are compromised. My basic point is, your need is not the same as what PGP addresses in that PGP addresses the more difficult problem of passing data between 2 entities. Your requirement is very simple to address; 1. write a simple compiled module with an embedded key, 2. keep that key in a safe place, and 3. write another module to decrypt, all it needs is the key. This is similar to what was done with DVDs, just don't allow your encryption algorithms to be compromised. You can put the source code in the same place as your key, you can use a code scrambler when you compile, and you should already have your server secure already. Again, my point is, this is easy because the same entity that encrypts is doing the decrypt. Hope this helps. Ryan -Original Message- From: Doaldo Navai Junior [mailto:doaldo;triunfo-bsb.com.br] Sent: Wednesday, October 23, 2002 12:53 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-DB] Credit Card Info Cryptography Suppose I sell some products online and get user's credit card info via SSL connection. Isn't there any method (free, preferably) of ASSYMETRIC (Public key) cryptography I can use with PHP to store this data in a db?? Or is there any other good option instead of this? TIA, Doaldo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Credit Card Info Cryptography
Well.. Isn't that the ideal. I agree in theory, however, not all clients are willing to shell for the Payment Processor Services if they are just starting ou tin e-commerce and don't know what kind of volume to expect. Thery is wonderful, however, practicle must preside. Aaron -Original Message- From: 1LT John W. Holmes [mailto:holmes072000;charter.net] Sent: Wednesday, October 23, 2002 4:33 PM To: Ryan Jameson (USA); [EMAIL PROTECTED] Subject: Re: [PHP-DB] Credit Card Info Cryptography When ever I see easy, encrypt, and credit card in the same sentence, it makes me worry. Don't store credit card numbers. Charge them once and don't save it anywhere. ---John Holmes... - Original Message - From: Ryan Jameson (USA) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 23, 2002 4:20 PM Subject: RE: [PHP-DB] Credit Card Info Cryptography Since your goal is to encrypt the card number in the database you'll naturally need a way to decrypt it as well. At that point it seems your concern is that your database will be compromised. That can be avoided easily by creating a single private key and using your own algorithm to encrypt based on that key. The only catch is, if the code that does the encrypting is compromised, and the database is compromised, then the numbers are compromised. My basic point is, your need is not the same as what PGP addresses in that PGP addresses the more difficult problem of passing data between 2 entities. Your requirement is very simple to address; 1. write a simple compiled module with an embedded key, 2. keep that key in a safe place, and 3. write another module to decrypt, all it needs is the key. This is similar to what was done with DVDs, just don't allow your encryption algorithms to be compromised. You can put the source code in the same place as your key, you can use a code scrambler when you compile, and you should already have your server secure already. Again, my point is, this is easy because the same entity that encrypts is doing the decrypt. Hope this helps. Ryan -Original Message- From: Doaldo Navai Junior [mailto:doaldo;triunfo-bsb.com.br] Sent: Wednesday, October 23, 2002 12:53 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-DB] Credit Card Info Cryptography Suppose I sell some products online and get user's credit card info via SSL connection. Isn't there any method (free, preferably) of ASSYMETRIC (Public key) cryptography I can use with PHP to store this data in a db?? Or is there any other good option instead of this? TIA, Doaldo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Credit Card Info Cryptography
Well.. Isn't that the ideal. I agree in theory, however, not all clients are willing to shell for the Payment Processor Services if they are just starting ou tin e-commerce and don't know what kind of volume to expect. They aren't that expensive and usually come with all of the scripts you need to implement it. Thery is wonderful, however, practicle must preside. Hmmm, that's funny. I would think that _security_ must preside. Maybe I run a different business than you do. ---John Holmes... -Original Message- From: 1LT John W. Holmes [mailto:holmes072000;charter.net] Sent: Wednesday, October 23, 2002 4:33 PM To: Ryan Jameson (USA); [EMAIL PROTECTED] Subject: Re: [PHP-DB] Credit Card Info Cryptography When ever I see easy, encrypt, and credit card in the same sentence, it makes me worry. Don't store credit card numbers. Charge them once and don't save it anywhere. ---John Holmes... - Original Message - From: Ryan Jameson (USA) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 23, 2002 4:20 PM Subject: RE: [PHP-DB] Credit Card Info Cryptography Since your goal is to encrypt the card number in the database you'll naturally need a way to decrypt it as well. At that point it seems your concern is that your database will be compromised. That can be avoided easily by creating a single private key and using your own algorithm to encrypt based on that key. The only catch is, if the code that does the encrypting is compromised, and the database is compromised, then the numbers are compromised. My basic point is, your need is not the same as what PGP addresses in that PGP addresses the more difficult problem of passing data between 2 entities. Your requirement is very simple to address; 1. write a simple compiled module with an embedded key, 2. keep that key in a safe place, and 3. write another module to decrypt, all it needs is the key. This is similar to what was done with DVDs, just don't allow your encryption algorithms to be compromised. You can put the source code in the same place as your key, you can use a code scrambler when you compile, and you should already have your server secure already. Again, my point is, this is easy because the same entity that encrypts is doing the decrypt. Hope this helps. Ryan -Original Message- From: Doaldo Navai Junior [mailto:doaldo;triunfo-bsb.com.br] Sent: Wednesday, October 23, 2002 12:53 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-DB] Credit Card Info Cryptography Suppose I sell some products online and get user's credit card info via SSL connection. Isn't there any method (free, preferably) of ASSYMETRIC (Public key) cryptography I can use with PHP to store this data in a db?? Or is there any other good option instead of this? TIA, Doaldo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Credit Card Info Cryptography
Maybe you do, Bt I run a _client_dictates_the_development_requirments business. It not not be that expensive but to some clients who are trying to give it a go it can mean a lot. Am I to tell them I won't accept their business? No - what I am to do is provide them with the best alternative which is storing the encrypted credit card info until it has been downloaded then wipe it from the system. Perfect? Hell no but a solution nonetheless. I'm not arguing that we shouldn't be storing credit card info - encrypted or otherwise - but sometimes life and business just isn't perfect. I would rather develop a solution like this for them instead of them going to some hack who could give 2 shits about security. My clients dictate the development and I provide the expert and cautionary advive. If they are willing to be obtuse about the process then who I am to balk? Just my thoughts. Aaron P.S. Cheap shot comments like that of yours serve no purpose for learning here. -Original Message- From: 1LT John W. Holmes [mailto:holmes072000;charter.net] Sent: Wednesday, October 23, 2002 4:41 PM To: [EMAIL PROTECTED]; 'Ryan Jameson (USA)'; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Credit Card Info Cryptography Well.. Isn't that the ideal. I agree in theory, however, not all clients are willing to shell for the Payment Processor Services if they are just starting ou tin e-commerce and don't know what kind of volume to expect. They aren't that expensive and usually come with all of the scripts you need to implement it. Thery is wonderful, however, practicle must preside. Hmmm, that's funny. I would think that _security_ must preside. Maybe I run a different business than you do. ---John Holmes... -Original Message- From: 1LT John W. Holmes [mailto:holmes072000;charter.net] Sent: Wednesday, October 23, 2002 4:33 PM To: Ryan Jameson (USA); [EMAIL PROTECTED] Subject: Re: [PHP-DB] Credit Card Info Cryptography When ever I see easy, encrypt, and credit card in the same sentence, it makes me worry. Don't store credit card numbers. Charge them once and don't save it anywhere. ---John Holmes... - Original Message - From: Ryan Jameson (USA) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 23, 2002 4:20 PM Subject: RE: [PHP-DB] Credit Card Info Cryptography Since your goal is to encrypt the card number in the database you'll naturally need a way to decrypt it as well. At that point it seems your concern is that your database will be compromised. That can be avoided easily by creating a single private key and using your own algorithm to encrypt based on that key. The only catch is, if the code that does the encrypting is compromised, and the database is compromised, then the numbers are compromised. My basic point is, your need is not the same as what PGP addresses in that PGP addresses the more difficult problem of passing data between 2 entities. Your requirement is very simple to address; 1. write a simple compiled module with an embedded key, 2. keep that key in a safe place, and 3. write another module to decrypt, all it needs is the key. This is similar to what was done with DVDs, just don't allow your encryption algorithms to be compromised. You can put the source code in the same place as your key, you can use a code scrambler when you compile, and you should already have your server secure already. Again, my point is, this is easy because the same entity that encrypts is doing the decrypt. Hope this helps. Ryan -Original Message- From: Doaldo Navai Junior [mailto:doaldo;triunfo-bsb.com.br] Sent: Wednesday, October 23, 2002 12:53 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-DB] Credit Card Info Cryptography Suppose I sell some products online and get user's credit card info via SSL connection. Isn't there any method (free, preferably) of ASSYMETRIC (Public key) cryptography I can use with PHP to store this data in a db?? Or is there any other good option instead of this? TIA, Doaldo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Credit Card Info Cryptography
OFFTOPIC :-) You have a good point, I just assumed that decision had already been made. Here's :a visual representation of my point. To hide A by turning it into B using algorithm object C and only someone with key D can see it. C.encrypt(A,D) = B; C.decrypt(B,D) = A; If anyone has either part of C, or D you can consider your data compromised. However, a reasonably complex C and D will result in a B that will not be useful alone. In the case of PGP the encrypt and decrypt algorithms are public, either of which are a good start to breaking the encryption. Hence the considerable increase in complexity of their problem the need for a more complex solution. Every encryption method by nature boils down to obscurity. What cannot be kept private must be complex enough to provide sufficient security. Hence the name P(retty) G(ood) P(rivacy) ... Which is better, 128 bit encryption or 40? If you answered 128 you are correct, only because it introduces more complexity than the other. Trivia Question: Why WAS it illegal to export strong encryption technology? Answer: Export laws? Technically, but specifically the government wanted the ability to decrypt exported data in a timely fashion. You can believe it... or not. /OFFTOPIC I LOVE PHP!!! Ryan -Original Message- From: 1LT John W. Holmes [mailto:holmes072000;charter.net] Sent: Wednesday, October 23, 2002 2:33 PM To: Ryan Jameson (USA); [EMAIL PROTECTED] Subject: Re: [PHP-DB] Credit Card Info Cryptography When ever I see easy, encrypt, and credit card in the same sentence, it makes me worry. Don't store credit card numbers. Charge them once and don't save it anywhere. ---John Holmes... - Original Message - From: Ryan Jameson (USA) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 23, 2002 4:20 PM Subject: RE: [PHP-DB] Credit Card Info Cryptography Since your goal is to encrypt the card number in the database you'll naturally need a way to decrypt it as well. At that point it seems your concern is that your database will be compromised. That can be avoided easily by creating a single private key and using your own algorithm to encrypt based on that key. The only catch is, if the code that does the encrypting is compromised, and the database is compromised, then the numbers are compromised. My basic point is, your need is not the same as what PGP addresses in that PGP addresses the more difficult problem of passing data between 2 entities. Your requirement is very simple to address; 1. write a simple compiled module with an embedded key, 2. keep that key in a safe place, and 3. write another module to decrypt, all it needs is the key. This is similar to what was done with DVDs, just don't allow your encryption algorithms to be compromised. You can put the source code in the same place as your key, you can use a code scrambler when you compile, and you should already have your server secure already. Again, my point is, this is easy because the same entity that encrypts is doing the decrypt. Hope this helps. Ryan -Original Message- From: Doaldo Navai Junior [mailto:doaldo;triunfo-bsb.com.br] Sent: Wednesday, October 23, 2002 12:53 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-DB] Credit Card Info Cryptography Suppose I sell some products online and get user's credit card info via SSL connection. Isn't there any method (free, preferably) of ASSYMETRIC (Public key) cryptography I can use with PHP to store this data in a db?? Or is there any other good option instead of this? TIA, Doaldo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] TOO MANY CONNECTIONS!!
Im getting a too many connections error in my PHP pages at http://www.free-ringtones.tv. I presume this is from the MySQL server, and I know I access the database a lot for each page. So whats the solution to this?? Write scripts that create static html pages that update every 20 minutes or so?? And was it the host that limited my connections??? TIA -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] TOO MANY CONNECTIONS!!
Send me the code around the lines that are giving errors.. Doesn't look like a MySQL error to me. -Micah At 10:18 PM 10/23/2002 +0100, Georgie Casey wrote: Im getting a too many connections error in my PHP pages at http://www.free-ringtones.tv. I presume this is from the MySQL server, and I know I access the database a lot for each page. So whats the solution to this?? Write scripts that create static html pages that update every 20 minutes or so?? And was it the host that limited my connections??? TIA -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Credit Card Info Cryptography
How about encrypting the credit card with a secret word that the user chooses? Or obsfucate it by encrypting their credit card using str_rot13(base64_encode(str_rot13($lastname).$lastname.$email.$firstname)) as the key? Sure, if someone gets your code and your DB, those credit card numbers are as good as gone. But what about using a C program, stripped, doing the same thing? That way even if they get your PHP code AND the C program, they won't be able to reverse engineer the code. They can, however, start plugging in strings into the C program (if they have the same system you have, binary compatibility and all) and try those outputted strings on the DB. Let's all agree though: there is no 100% sure way to protect any data if you are going to be able to decrypt it. There are ways, however, to make it tough to do so for the average hacker. I mean, if Hacker A wants your credit cards, you can't keep the key from them. You have to use it somehow to encrypt it, and assuming this happens in the code and not manually, it is located somewhere on your site. If they can get the DB, they can get the key. Obsfucation always worked for me. Peter On Wed, 23 Oct 2002, Aaron Wolski wrote: Maybe you do, Bt I run a _client_dictates_the_development_requirments business. It not not be that expensive but to some clients who are trying to give it a go it can mean a lot. Am I to tell them I won't accept their business? No - what I am to do is provide them with the best alternative which is storing the encrypted credit card info until it has been downloaded then wipe it from the system. Perfect? Hell no but a solution nonetheless. I'm not arguing that we shouldn't be storing credit card info - encrypted or otherwise - but sometimes life and business just isn't perfect. I would rather develop a solution like this for them instead of them going to some hack who could give 2 shits about security. My clients dictate the development and I provide the expert and cautionary advive. If they are willing to be obtuse about the process then who I am to balk? Just my thoughts. Aaron P.S. Cheap shot comments like that of yours serve no purpose for learning here. -Original Message- From: 1LT John W. Holmes [mailto:holmes072000;charter.net] Sent: Wednesday, October 23, 2002 4:41 PM To: [EMAIL PROTECTED]; 'Ryan Jameson (USA)'; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Credit Card Info Cryptography Well.. Isn't that the ideal. I agree in theory, however, not all clients are willing to shell for the Payment Processor Services if they are just starting ou tin e-commerce and don't know what kind of volume to expect. They aren't that expensive and usually come with all of the scripts you need to implement it. Thery is wonderful, however, practicle must preside. Hmmm, that's funny. I would think that _security_ must preside. Maybe I run a different business than you do. ---John Holmes... -Original Message- From: 1LT John W. Holmes [mailto:holmes072000;charter.net] Sent: Wednesday, October 23, 2002 4:33 PM To: Ryan Jameson (USA); [EMAIL PROTECTED] Subject: Re: [PHP-DB] Credit Card Info Cryptography When ever I see easy, encrypt, and credit card in the same sentence, it makes me worry. Don't store credit card numbers. Charge them once and don't save it anywhere. ---John Holmes... - Original Message - From: Ryan Jameson (USA) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 23, 2002 4:20 PM Subject: RE: [PHP-DB] Credit Card Info Cryptography Since your goal is to encrypt the card number in the database you'll naturally need a way to decrypt it as well. At that point it seems your concern is that your database will be compromised. That can be avoided easily by creating a single private key and using your own algorithm to encrypt based on that key. The only catch is, if the code that does the encrypting is compromised, and the database is compromised, then the numbers are compromised. My basic point is, your need is not the same as what PGP addresses in that PGP addresses the more difficult problem of passing data between 2 entities. Your requirement is very simple to address; 1. write a simple compiled module with an embedded key, 2. keep that key in a safe place, and 3. write another module to decrypt, all it needs is the key. This is similar to what was done with DVDs, just don't allow your encryption algorithms to be compromised. You can put the source code in the same place as your key, you can use a code scrambler when you compile, and you should already have your server secure already. Again, my point is, this is easy because the same entity that encrypts is doing the decrypt. Hope this helps. Ryan -Original Message- From: Doaldo Navai Junior [mailto:doaldo;triunfo-bsb.com.br] Sent: Wednesday, October 23, 2002 12:53 PM To:
Re: [PHP-DB] TOO MANY CONNECTIONS!!
On Wed, Oct 23, 2002 at 10:18:07PM +0100, Georgie Casey wrote: Im getting a too many connections error in my PHP pages at http://www.free-ringtones.tv. I presume this is from the MySQL server, and I know I access the database a lot for each page. So whats the solution to MySQL has a default of either 50 or 100 concurrent connections. Exceed it and you'll get that error. That parameter is configurable - if you run the MySQL daemon itself. If you use shared hosting, you may not be able to tweak it. Do the pages -need- to be totally dynamic, or can you use the caching system you mentioned? If so, then wrap code that stats an HTML page for the time, and if it's too old, update it. Be sure to use file locking so you don't clobber yourself. Moreover, do you open one connection and re-use it in a page, or do you do multiple opens and closes? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: TOO MANY CONNECTIONS!!
Hello, On 10/23/2002 06:18 PM, Georgie Casey wrote: Im getting a too many connections error in my PHP pages at http://www.free-ringtones.tv. I presume this is from the MySQL server, and I know I access the database a lot for each page. So whats the solution to this?? Write scripts that create static html pages that update every 20 minutes or so?? And was it the host that limited my connections??? You probably reached the number of persistent connections configured in php.ini . If you allow a larger number you probably exhaust your server memory until it crashes. The best solution is to cache content taken from the database and that does not vary frequently. That will also make your site faster. In that case you may want to try this class that can be used to store arbitrary data in files, like the HTML excerpts that are generated from your database queries. http://www.phpclasses.org/filecacheclass -- Regards, Manuel Lemos -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] checking data from a flash movie at my domain for an insert
is it possible to make sure data that will be inserted into a database is from a flash movie ( a game) residing on my domain? The data will be linked to prizes, so I want to be able to make sure that nobody executes a script and provides false data. The security measures I have now are encrypting strings client side (flash) and decrypting server side (php), only sending post vars, and sending obscure variables hidden deep in the flash movie, plus checking for the right ( or emtpy) value of http_referrer and checking for a cookie var that is set in the php page that embeds flash. So it's an I'll-make-it-annoying-but-not-impossible kind of thing. The reason I'm asking is because flash movies can be decompioled so the algorithm for encrypting can be decoded easily. thanks -- Rolf Vreijdenberger De Pannekoek en De Kale Maystraat 6 2593 VW Den Haag T: 06-24245719 E: [EMAIL PROTECTED] W: www.depannekoekendekale.nl -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Credit Card Info Cryptography
There is a simple alternative that you might not be aware of, and that is use Advantage Database (I am assuming that you are using MySQL right now). You can get a free version to try and it provides encryption at the table level. There is a PHP interface for it and everything can be found at www advantage-database.com and go the the developers download area. I have been using it in my everyday development for about 4 years and I love it. I just recently saw that they offer a PHP interface to it as well as an ODBC, VB, Delphi, C++ Builder, JBuilder etc. Store the credit card info in Advantage and leave the rest of your data where you have it. Just a thought... Jim ---Original Message--- From: Doaldo Navai Junior Date: Wednesday, October 23, 2002 12:52:23 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-DB] Credit Card Info Cryptography Suppose I sell some products online and get user's credit card info via SSL connection. Isn't there any method (free, preferably) of ASSYMETRIC (Public key) cryptography I can use with PHP to store this data in a db?? Or is there any other good option instead of this? TIA, Doaldo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php .
[PHP-DB] Adding 1 day to date/datetime/timestamp?
I need to add one day to a datetime/date/timestamp field. How would I do this? (sorry for the n00b-ish question...) I'm using mysql. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Adding 1 day to date/datetime/timestamp?
I need to add one day to a datetime/date/timestamp field. How would I do this? (sorry for the n00b-ish question...) I'm using mysql. SELECT your_column + INTERVAL 1 DAY FROM your_table; ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re:Re: [PHP-DB] Print data
hy, i'm having a problem with printing the data from a html or php page... how can i solve this problem ? I mean when i'm using frames they appear or like a view with scrollbar or there is an option to print them singulary. I want to print in a format that i want..like a report ... thanks From: 1LT John W. Holmes [EMAIL PROTECTED] Date: 2002/10/23 Wed PM 02:20:35 GMT+03:00 To: José Moreira [EMAIL PROTECTED], Php Windows [EMAIL PROTECTED], Php-Db [EMAIL PROTECTED] Subject: Re: [PHP-DB] Print data hello, at my company we have several network printers and i was was wondering if it's possible to print directly to them using PHP, instead of showing on the screen or both ... to gain more control on what is printed, because of the nasty browsers header and footer ... whom i now how to remove ... i know that the printer IP is 192.192.1.100 and the port is 9005 ... The printer functions in the manual only work in windows and only work for the printer attached directly to the server. Hmm..I wonder, though, if you have a network printer that's set up to print from the server, can you use the printer functions to print to that? I'm sure the answer is in the manual. If not, maybe you can open a connection directly to the printer and send it the raw data, if you know the format. ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Free Email Account at www.flash.ro -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php