-
Posts
16,734 -
Joined
-
Last visited
-
Days Won
9
Everything posted by PFMaBiSmAd
-
^^^ Sounds like this is either VPS or dedicated hosting? What sort of administrative access do you have to the mail server? The type of MTA does not directly matter as long as it is configured to accept emails from the web server/php. Is the php.ini sendmail path (which is just the path to the MTA binary/cli) set correctly? You would likely need to look at the 'send' queue to see what is happening to the emails. Are they being placed into the queue? Are they getting sent to the destination? Any chance someone change the 'relaying' settings of the mail server so that it no longer accepts any emails from the web server/php?
-
Your form is setting ?do=new In your form processing code, you are only creating a connection to the mysql server/selecte a database when ?do=login So, you don't have a connection in the select/case 'new': code. You should connect to the mysql server/select a database at a common point in your code. Also, please rename your include file to end in a .php extension so that someone cannot simply browse to it and see your connection details (as is the case when it does not end in a .php extension.)
-
Paste it into the post and with it selected, hit the # menu button to surround it in bbcode tags.
-
You have no connection at the time the mysql_query() is being executed. Since I didn't see (your code has no indentation, so it is difficult to locate anything in it) any statement closing the connection, you either never create a valid connection or some of the included code is closing the connection.
-
Change your mail() line of code to the following - if(mail($mailto, $mailsubj, $mailbody, $mailhead)){ echo "success"; } else { echo "mail function call failed"; } and temporarily comment out the header(); redirect statement (so that you can be sure to see either the success or mail function call failed message.) You will probably need to check with the web host to see what is happening on the sending mail server with the emails you are trying to send. You should probably check with the web host anyway to see if anything has been changed with the configuration needed for a php script to send email. Sadly, the contents of the $email variable is being put directly into the header field without any validation, so it is possible that spammers have been sending email through the mail server and your mail server has been banned by wherever you are trying to send the emails to.
-
You are likely getting php errors (the html you originally posted in that file would have been producing header() errors.) You should be developing and debugging php code on a system with error_reporting set to E_ALL and display_errors set to ON so that all the php errors your code produces will be reported and displayed. You should set these two values in your master php.ini so that fatal parse errors will be displayed, but if you are sure your code is actually running, you can set them in your script. Temporarily comment out the content-type header() statement, add the following two lines of code immediately after your first opening <?php tag, and browse directly to the test.php file that produces the image - ini_set("display_errors", "1"); error_reporting(E_ALL);
-
Cannot help you with any of them unless you post them.
-
There is no mysql_query() statement in it to executing the query. At line 123 in the file, you set $sql = "... ..."; but you never put that into a mysql_query() statement to execute it.
-
PHP not able to render generated images
PFMaBiSmAd replied to compgeek83's topic in PHP Installation and Configuration
We cannot really help you without seeing both your HTML and your php code that produces (reproduces) the symptom. Do web pages work at all? It's likely you are outputting some characters (possibly the Byte Order Mark characters that your editor places at the start of a UTF-8 encoded file) thing before the content-type header and the header() is not actually working. -
Have you asked the web host is any other accounts are having session problems or if the web server this account is on is currently experiencing problems?
-
Ummm. The header error message is due to the fact that the first error message is occurring and is being output to the browser before the header() statement.
-
If you want help with your current code, you would need to post it. Posting the current 'view source' that corresponds with that code would help as well.
-
You forgot to tell us what that means? What is it doing or not doing? We are not standing right next to you and 'its not working' does not mean anything to us.
-
No one asked you to use ini_get() to check register_globals as ini_get might be disabled and could return an indication dependent on your logic order. If you aren't, can't, or won't post all the relevant code, I don't know what level of help you were expecting to get on a forum.
-
Now that you have posted MORE of the output on the page, it seems like it is echoing your Pumpkin test string as expected - And someone already told you why your overall output is incorrect - You also have a very bad database design, where you have individual tables for each product/variation and you must execute one query to get the table name and then put that table name into another query to actually get the information.
-
Since you haven't posted all the code involved (including your form), it is not directly possible to eliminate your code as the cause of the problem. Another possibility (when variables change value on their own) is that register_globals are on and you have same name session/post/get/cookie/program variables and they are overwriting each other. What does a phpinfo(); statement show for register_globals?
-
The test.php file (that is outputting the image) is not a HTML document. The only thing that should be in it is php code that outputs the content-type header followed by the image data. Also, don't use GD function JUST to output image data. You use GD functions if you need to manipulate the image in some way. For what you are doing (just outputting the image data) you would just use readfile after the content type header has been output.
-
That might be the code you think you are running, but it is not the code that is on your server and being executed or you are looking at an old cached version of the output due to the settings on your web server. Download the code to a different file name and look in it. You could also have a different section of code that is similar or a different/wrong include file, but the output you posted didn't get produced by the code you posted. The HTML doesn't even match.
-
javascript adding inputs blank all :S
PFMaBiSmAd replied to UnknownPlayer's topic in Javascript Help
There are working add an input field scripts posted all over the Internet. Have you even tried to search for one that appends a field? -
It's likely that the code you are actually running is not the code you have posted. If your bigger problem you are trying to solve is that the code does not loop as expected, it is because you are reusing the $result variable inside of the outer loop, so when the outer loop goes back to fetch the next row from the first query, $result is no longer what you expect.
-
What does the 'view source' in your browser show?
-
Convert single integer to double digit values
PFMaBiSmAd replied to EchoFool's topic in PHP Coding Help
Here is an example using preg_replace_callback (taken from the php.net example and modified to match groups of digits and to apply sprintf to pad with leading zeros) - <?php $line = "5:14:1+2+5+6+7"; $line = preg_replace_callback( '|\d+|', create_function( // single quotes are essential here, // or alternative escape all $ as \$ '$matches', 'return sprintf(\'%02d\',$matches[0]);' ), $line ); echo $line; ?> -
Can't figure out error (Column doesnt match)
PFMaBiSmAd replied to Deiviux's topic in Third Party Scripts
If you are using mysql, you should use mysql_real_escape_string. Does your database class have a method to escape data that is specific to the type of database being used? -
Convert single integer to double digit values
PFMaBiSmAd replied to EchoFool's topic in PHP Coding Help
Either use str_pad or sprintf with a %02d format specifier.