Jump to content

gizmola

Administrators
  • Posts

    5,945
  • Joined

  • Last visited

  • Days Won

    145

Everything posted by gizmola

  1. Maybe this is something we should have in a faq item or something. Generally speaking what we look for is: -someone with some longevity and history of helpful posting and demonstrated expertise with our core subject matter (javascript, php, mysql, etc) -willingness to proactively keep the place orderly. Usually one or more existing staff members notices someone and nominates them. We have plenty of people who have turned us down, some of which prefer to be gurus. We have made exceptions in the past for people who had some demonstrated prominance in the past, but a lot of those people seem to bore quickly of phpfreaks (salathe being one of our treasured exceptions ) . There are some areas where we are looking to build up expertise, so if for example, someone was a proven javascript superstar and wanted to join our merry band, we'd probably be interested even if the weren't expert level with php/mysql. What this hopefully illustrates is the the main thing the staff does is read/answer questions, and the moderation is just a detail that they are trusted to perform moderation functions as well.
  2. Yes, well if you use row socket calls you get the raw data, but there is no reason for you to be doing that in this case. You want to either use the curl library extension or fopen() instead.
  3. Yes that is how you use it. I want to know if you are getting any output to the screen, which you should if the form is posting properly.
  4. I don't think you understand. That code is for debugging. I am cutting off script processing with the die() command. Did you receive any output when you filled out the form and submitted?
  5. Before the if.. loop $foundpost = false; substitute for your trim()... if (!empty(trim($value)) $foundpost = true;
  6. No, that simply is an http response. Working with anything that understands HTTP protocol will allow you to focus in on just the json data. What code are you using?
  7. The distinct is applied to all the columns in your list: SELECT DISTINCT products.product_id, category_matchup.match_cat_id, products.product_name. So in other words you get every distinct combination of product_id, match_cat_id, product_name in the results.
  8. I don't see any major problems. Stick this at the top of scripts/mail.php var_dump($_POST); die(); Post the form and let us know what output you get.
  9. Your query is generating an error. Your code does not check for that or display what the error is.
  10. No it doesn't. We asked for the form code. Having the code to the php script that handles the form is not helpful. There is nothing in there to explain your problem, although as pointed out by hemo-ali + Maq, you should probably have some checks in there that stop don't perform the mail() function if the required variables are empty. Clearly the variables ARE empty whether by accident or because something is submitting the form even though there is a problem with it. We have no way of knowing.
  11. gizmola

    PHP and ANT

    Another possibility is that there are open basedir restrictions in place. Are you in full sysadmin controll of this server? Check the phpinfo() page to see if anything like that is indicated. Restrictions can be put in place that disable execs or restrict the directories or specific commands you can run. You can also run it using the backtick operator and capture the output and display it to see if there are any messages being returned and of course check the logs. $return = `your ant script`; echo $return;
  12. Yes there are configuration items that would effect what method mail uses. See http://us3.php.net/manual/en/mail.configuration.php If this is a windows server, and they have changed something to do with the mail server this could be where it is broken.
  13. I have no idea, that technique dates back ages ago.
  14. There's not much to it. Either set a variable or set a constant, as in your example. In the scripts that are included, you simply do this: if (!defined('APPROVEDFILE')) die('Disabled'); or if (!isset($approvedfile)) die('Disabled');
  15. What editor are you using? I thought that most of these editors translate the data to html markup.
  16. It depends on the code. mysql_real_escape_string is not designed to prevent injections although in some cases it does. It is designed to escape quotes. You need to consider the input type of each variable. For example, if you are accepting an integer value, then you should use: $i = (int)$_GET['i']; Alternatively, using PDO or mysqli with bind variables is an excellent one step solution for preventing SQL injections.
  17. Help with what? All you have is a form. Where is your php code? Did you read this? http://us3.php.net/manual/en/features.file-upload.php
  18. The code calls a function mailform, that returns the value of the mail function. Since this is returning false, it means that the mail is not being accepted. Is this an existing site that has stopped working or an attempt to use this script on a new site? What has changed?
  19. The code already does that, or at least it skips logging based on the code you presented. if(!isSpider(getenv("HTTP_USER_AGENT"))) { // user tracking logic goes in here }
  20. gizmola

    PHP and ANT

    Did you specify the full path to ant?
  21. [quote author=The Little Guy link=topic=335040.msg1578221#msg1578221 date=1307131720] That doesn't work, You will get an error: Fatal error: Class 'someclass' not found It does work, within the confines of what php requires. The class has to be defined. class someclass { public function __construct($val1, $val2) { } } class myclass { public static function myfunc($obj) { echo get_class($obj) . "\n"; } } myclass::myfunc(new someclass('value1', 'value2')); It's called an object literal.
  22. Concatenating 3 values together and turning that into a column is a bizarre design that is going to perform poorly. Other than loading in this data into mysql we don't really have an idea of what you're trying to accomplish, but I can say with some certainty that you are on the wrong track here. If we understood the goal, we might be able to advise you on a good way to approach your problem.
  23. Well PHP and javascript are very different languages in terms of oop. You can however do this, which is similar: myclass::myfunc(new someclass('value1', 'value2'));
×
×
  • 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.