Jump to content

gizmola

Administrators
  • Posts

    5,945
  • Joined

  • Last visited

  • Days Won

    145

Everything posted by gizmola

  1. Not really, these types of counts can be done by the database using the GROUP BY. First off, there is nothing in your database that relates a word to a user. So there is no way you're going to get a count by user at present. If you did the principle would be the same, although user_id would be part of the GROUP BY. Ignoring that you can get a count of repeated words with this query: SELECT words, count(*) as countof FROM labels GROUP BY words order by countof DESC
  2. You mean to tell me, that after two years of getting FREE HELP from the members of this site, you are now planning to NO LONGER COME HERE TO GET FREE HELP???!!!!!???? This is an outrage! OUTRAGE I tell you! Heads will roll, I promise you, if there is one thing I will do, it is get to the bottom of this and insure that this never ever happens to anyone again, where they come here and get free help, and people answering their questions and mentoring them, and making them a better php programmer. NEVER AGAIN NEVER AGAIN! Now I suggest that the first course of action be, that you cut off your nose to spite your face! If something offends thee then cut it off. Your eyes read words that were mean and upsetting -- I suggest that you follow the example of Oedipus and pluck them out so that you need no longer see. This may seem extreme, but it's necessary if you want to insure that you will never read words from people that hurt your feelings.
  3. Anything is possible, but I would not advise that. Basically what you would need to do is have an htaccess rule that looked for controllers first, and matched those. Any names that are the same as controllers are going to be a problem. Regardless, they are still going to redirect to a controller while passing a param.
  4. I doubt that there are blogs telling people to use register_globals. Don't use it. It is completely deprecated (removed entirely) from php v. 5.3. It's defunct, dead, gone. In the way you are describing it, Javascript runs in the browser (client). It can not be used to replace php, nor can php be used to replace javascript. They are two different tools that run in entirely different places. PHP runs on the server. Just for completeness sake, there are projects that allow you to write serverside code in javascript, but that is not relevant to this question, nor an avenue open to you in regards to a site based on php scripts.
  5. https://www.pcisecuritystandards.org/security_standards/documents.php Download PCI DSS 2.0.
  6. PCI is mostly common sense stuff (transaction and db servers need to be hardened/firewalled with specific isolation from general use network, cc data needs to be encrypted, use of https required etc.). There is no debate in this case. You can easily verify this yourself by downloading the pci dss version 2 document. The "change password" provision is part of the PCI DSS 2.0 document in section 8.5:
  7. If he interpreted that as end-users, then yeah he's wrong.
  8. You should be making a controller file and putting the code for the method in it. Your url should be something like: localhost/profile/username. Your controller would then be named profile.php. You should not be editting the bootstrap file and putting in controller specific code.
  9. The last time I had to do this, rather than reinventing the wheel, I just used Zend Framework. One of the advantages of their code is that you can setup one list and it will output multiple formats, so you can offer rss and atom with the same code. Take a look at this thread: http://www.phpfreaks.com/forums/index.php?topic=320176.msg1516021#msg1516021
  10. Hostgator must have some pretty shitty server configuration if the lack of read/execute perms on a php script cause a 500 error.
  11. No, the ftp protocol is built to do exactly one thing -- transfer files back and forth. I'm not sure why you have the idea that you need to run a process to "sort data". MySQL has the ability to sort any result using ORDER BY. So you have a script that currently accepts form data and inserts it into a database. Now you should write a script that SELECT ... FROM the table ORDER BY the column(s) you want to have it sorted by. You can put that script in the same directory where your other PHP script resides.
  12. Well, start with apachebench. You have to be specific about what you want to test and why if you want something more specific.
  13. There simply isn't going to be anything like this, because payment processors earn their money on transaction fees, and have to work with banks, credit cards, and all the regulations that go along with those. For example, if you are dealing with goods, and a credit card, you can do an auth for an amount of money, but regulations stipulate that the card is not suppossed to be charged until good are shipped, so the auth can be used in a period of time to complete the transaction. However, the money is not cleared until later when the banks involved actually transfer the money to cover the charge, and those charges have a period of time where the client can decline. For something like you're talking about, you really will need to treat these transactions like electronic goods, complete the transaction and bank the money. You will have to refund the money later under your model and deduct the transaction fee. If these are micro-transactions.... well you can probably understand why there is no viable micro-transaction solution -- the fees themselves make micro transactions seem absurd, as the cost of the transaction could easily be more than the cost amount of money involved. I think you're more likely to have something working if you simply disclose your fees, and inform people that you'll have to deduct transaction fees from their original amount should you need to refund the funds. Either that or plan on eating the fees. Everyone who deals with ecommerce will tell you about issues of fraud/declined charges, and resulting chargebacks, which have to be managed carefully. See http://en.wikipedia.org/wiki/Chargeback. Payment processors and banks account for your chargebacks and track rates and reasons, and you can easily get into trouble if your chargeback rates get too high, as the payment processors have to deal with visa/mc/amex. It sounds like you are planning to do a form of managed escrow, and there might be escrow related laws involved. I would highly recommend you get some expert accounting and legal advice for something like this.
  14. Why don't you do some of your own testing using operating system functions, and tools like apachebench or other load testing tools.
  15. You can check the permissions -- no problem there. I don't follow your htaccess comment though. An htaccess doesn't set permissions, it simply defines apache/php settings (if apache has been configured to allow this) for a particular directory. The file system permissions are independent of an htaccess file. With that said, php has the function fileperms that will get you the perms on a file or directory. I don't use php on windows, so I can't speak from experience in terms of how compatible it is with windows OS's as the permissions schemes are very different.
  16. PHP already has a constant to take care of this since version 5.02: PHP_EOL See http://us2.php.net/manual/en/reserved.constants.php for more of these.
  17. Your description lacks clarity. Are you saying that every line starts with a number like: 3. 4. etc? Are you also saying you don't care about this number? Do some lines *not* begin with a number, thus indicating they are part of a previous line? There's way too much ambiguity in your description. Precision is important to getting good help. Here's my best guess, and I assume here you don't care about the number. I also assume you willl storing this in a mysql table with a varchar or text column, and that you know how to take care of that. I'm also assuming you know how to open the file and process each line in a loop. So my recommendation? Use explode on the '.' with the limit parameter of 2, which will split the string on the period after the line number: // $str contains the original line $splitstr = explode('.', $str, 2); echo trim($splitstr[1]); /// this is the remainder of line without the number portion, with whitespace at front and back removed
  18. The other thing about Access, is that it has no server, so it's fundamentally a different approach. Each client has the access engine in memory, and opens the data files. On a fileserver, there is a provision for locking, but that is also done in the client engine. Trying to relate most access concepts to mysql is comparing apples and oranges, as they are fundamentally different animals, and the terminology is probably not going to match up well in most cases, due to this profound difference. Access like most other PC databases (Dbase, Paradox etc) were designed to be single user systems, running on one workstation with all the files local. They each were extended with fairly simple file locking code so that multiple users could share databases, but there are very few scenarios these days where one would recommend using a PC database when relational database management systems are so prevalent and there are now several free/opensource options. Even microsoft tends to supply a sqlserver in its business products that require sql database storage. RDBMS's have a server which takes sql queries and handles all the details internally, returning results via its client library. Clients never touch the data files directly. The closest thing to Access in the opensource/php world would be sqllite.
  19. No, it sounds like you have a typical relational model where you have related information in seperate tables. That is normal. Using joins you can unite the information in one query. If your user table has a column that indicates this membership status, then all you need do is specify that as criteria either as part of the join condition or in the where clause, and you'll get the result you are looking for. It is hard for us to advise you more specifically on how to do this type of query without understanding your schema more fully but I assure you that a seperate table is not needed, and not a good design choice.
  20. Its complicated but i cant do that it has to run on its own table. What exactly is complicated?
  21. Why would you make a 2nd table, when you could just add a status column to the users table to indicate whether they are "upgrade" users?
  22. How about sqlite? http://us2.php.net/sqlite
  23. One of the confusing aspects of this is the idea of "bind" variables. The process of "binding" a variable involves telling the libraries involved that a particular variable is bound to a placeholder in a query. Once this "binding" occurs, as successive query operations occur, data is moved back and forth depending on the type of query, without actually having to pass the variables again as parameters or having them receive the result of a function call. This can be confusing to people who are used to the more specific $row = query_function(). In many rdbms's this is the only way to interface with stored procedures, so if you were using oracle in the old days, you absolutely had to use bind variables to be able to pass parameters to stored procedures or get the results.
  24. The way to handle this is to use http://www.php.net/manual/en/class.domdocument.php so that you can process the html as DOM nodes, and perform your translation only on the text. Depending on exactly what you are doing, this extension might be helpful: http://beerpla.net/projects/smartdomdocument-a-smarter-php-domdocument-class/
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.