-
Posts
16,734 -
Joined
-
Last visited
-
Days Won
9
Everything posted by PFMaBiSmAd
-
All that would do is to hide the fact that the session start is failing. Your code won't work and you will not have any indication why. Hiding the error message DOES NOT fix the error.
-
What operating system? A leading slash / on a file system path refers to the root of the current hard disk. Do you in fact have a folder named Songs in the root of the current hard disk?
-
impossible syntax error - query does not like AND operator
PFMaBiSmAd replied to DLR's topic in Applications
String data in a query must be enclosed in single-quotes so that it is treated as string data instead of keywords or identifiers. -
ALL of the variables from your form must be converted to $_POST variables, including $send.
-
How would I check to see if a date fits a certain format
PFMaBiSmAd replied to aeroswat's topic in Regex Help
Checking the format first, followed by validating the date, would be impossible to do because of what exactly? -
How would I check to see if a date fits a certain format
PFMaBiSmAd replied to aeroswat's topic in Regex Help
If you want to validate the format (what your title states), use the information that JAY6390 posted. If you then want to validate the date - http://php.net/checkdate -
I asked you three specific questions that would have helped pin down if this is a problem with the server not parsing php code, with the php code you are using, or with the way you are browsing to the page. You only bothered to answer one of those, so don't be surprised if you never find a solution to your problem. Given that you have tried different web server/php combinations with the same result, best guess is the problem is either with the code you are using or the way you are invoking the web page in your browser.
-
Debian Lenny + local php.ini = bleh?
PFMaBiSmAd replied to B0b's topic in PHP Installation and Configuration
You need to add an AllowOverride statement in the httpd.conf that is in effect for the folder where you want to put a .htaccess file that contains php settings. -
Debian Lenny + local php.ini = bleh?
PFMaBiSmAd replied to B0b's topic in PHP Installation and Configuration
To start with, is php running as an Apache Module or as a CGI application? -
I generally find that displaying the structure, as simplexml/php sees it, helps determine how to access it - echo "<pre>",print_r($xml,true),"</pre>"; You can put any level into the above to see what it looks like, such as - echo "<pre>",print_r($xml->Category->Category,true),"</pre>";
-
That statement is of zero use, because we are not standing right next to you. We only see the information you provide in your posts. Tell us what it does do. A blank page? The raw php code appears in the browser? A php error? A browser error? A server error? What URL are you entering in your browser? I should be something like http://localhost/yourfile.php What is the exact .php code you are trying, show the opening php tag you are using in the file as well?
-
You will also find that your overall code will be simpler and more constant for each step of the form.
-
Why? Why not put the data gathered at each step into the database (after you validate it), marked with a 'pending' status? If this form is as long you hint, why not store the data persistently on the server so that if something should happen to cause a problem that would loose any data in a hidden form field or in a session (such as a battery dying, the Internet connection gets broken, the browser is accidentally closed, the cat chews through the power cord...), that you don't require the visitor to reenter everything from the start?
-
You are the one who suggested using sleep()... What exact problem or error are you having that you are trying to solve?
-
Your php script that is the target of the upload form is not executed until after the file has been completely uploaded. The act of receiving the uploaded file is handled by the web server and is basically out of your control (except for what you can influence by stetting some of the php settings), unless you do something to cause the normal handling of the upload to be replaced with your own code. See this thread for how you could do something like that - http://www.phpfreaks.com/forums/index.php/topic,284122.0.html
-
Echo the query $q to see what exactly is in it. You will probably find that the $_COOKIE is either empty or has some other value in it. You need to validate and escape ALL external string data being put into a query and in this case, if you are expecting someone to be logged in, your page should be checking for that at the start of the page and only executing the relevant code on the page if the current visitor is logged in.
-
So, you are guessing that the variable in question is being lost because the symptom you see in front of you is the return of the 'Registration failed!' value from the function? LOL, you are testing $this->levelOneSelectReferralSQL before the query that sets it has even been executed, so of course it is a FALSE value.
-
Since that is not all of the relevant code (for example what did you remove from the posted code that is setting $this->levelOneSelectReferralSQL) it is not possible to tell you what logical error there is in your code that is causing the problem. Also, you do know that you only need to define and use class variables when you need them to be shared between different class methods or accessed in the main code as data object of the instance of the class. You don't need to define and use $this->variable_name for every single variable that is used in a class function.
-
It the timestamp is in terms of microseconds since Unix Epoch, as it appears to be, instead of second since Unix Epoch, then removing the three least significant digits would be correct.
-
Show us the actual lines you are using in the file (are you sure the session save path setting you put into the .htaccess file is actually working?)
-
Umm. The PHP constant E_ALL has no meaning in a .htaccess file. You need to use the corresponding numeric value. Using -1 will (should) cause all of the error_reporting bits to be set.
-
Also, a leading slash in the file path refers to the root of the current hard disk. I seriously doubt that you have access to that path. You likely need to use a path that is somewhere within your accounts folder tree.
-
error_reporting must also be set to E_ALL and log_errors must be ON.
-
In the same way that you just globally set the session save path in a .htaccess file, you can set the error_log setting as well.
-
Post the code you are using to with the phpinfo(); statement, including showing us the opening php tag you are using. Have you got full php error reporting turned on so that any session related errors would be reported and displayed? At least add the following lines of code immediately after your first opening <?php tag (before any session_start() statement) - ini_set("display_startup_errors", "1"); ini_set("display_errors", "1"); error_reporting(E_ALL); And for all we know your code is using old methods that were depreciated over 7 years ago. What is your code that is setting the $_SESSION variables and what is your code that is showing them as a NULL, including showing us everything from the start of the files up to the relevant instructions.