Jump to content

nawhaley2265

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

nawhaley2265's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [!--quoteo(post=386557:date=Jun 21 2006, 02:43 PM:name=SemiApocalyptic)--][div class=\'quotetop\']QUOTE(SemiApocalyptic @ Jun 21 2006, 02:43 PM) [snapback]386557[/snapback][/div][div class=\'quotemain\'][!--quotec--] I can't see anything obvious jumping out at me, have you made sure error reporting / logging has been switched on within your php.ini file? [/quote] ok glad I wasn't going crazy, no its logging correctly though the php markers are strange in this new version apparently at the start of the file you have to use <?php but if you close out of the php at any point with a ?> you have to use just <? to start php up again otherwise you get a syntax error, its very bizzarre I'm still getting use to it. Use to you did it one way or the other not both ways it made it more consistant and readable that way I thought but apparently I was in the minority. At any rate I made a change and got a slew of errors cropping up now to fix *sigh* I hate new compilers.
  2. I have a question for those of you who have moved up a few versions of php. Last version I was working with before we updated was 5.0.2 where the following code worked fine. [code] function UserLogin() { /* displays the user login screen. Hidden fields used for the CHAP protocol to try to make the login more secure do not alter please*/ $challange = md5(mt_rand(1,10000)); print('<P ALIGN ="center"><IMG SRC ="ITIlogo1.jpg"></P>'); print('<FORM METHOD ="POST" ACTION ="appluserlogin.php" NAME ="loginform" id ="loginform" onSubmit ="userpassword()">'); print('<P ALIGN ="CENTER">'); print('<B><U>User Login</U><BR><BR>'); print('UserName:'); print('<INPUT TYPE ="text" NAME = "username" id="username" SIZE = 15>'.'<BR>'); print('Password:  '); print('<INPUT TYPE ="password" NAME = "password" id="password" SIZE =15>'); print('<INPUT TYPE ="hidden" NAME ="challange" id ="challange" VALUE ="'.$challange .'">'); print('<INPUT TYPE ="hidden" NAME ="response" id ="response" VALUE ="">'.'<BR>'); print('<INPUT TYPE ="submit" NAME = "submit" VALUE ="Login">'); print('</B></P></FORM>'); } [/code] now however all I get is a blank screen no error messages in my log no nothing just a blank screen has php changed the way it will allow you to print html to the browser or so I have some really obscure syntax error that the compiler isnt catching?
  3. Ok here is the code I couldnt post before. Note that if I comment the entire function save the brackets it still gives an error message stating that there is an unexpected } at the end of the function which is odd. P.S. Thanks for the help in explaining why it wouldnt post Ken [code] function SaveEditAnswer() {    /*saves new answer where the answercode matches that stored in $acode*/     $count = 1;     $acode = $_SESSION['answer'];     $correct =$_POST['answercorrect'];     $link = odbc_connect ("ApplicantQuiz","UserName","password");     $aquery = "SELECT * from tblAnswers WHERE AnswerCode ='$acode'";     $aresult = odbc_exec ($link,$aquery);     $answer = odbc_result ($aresult,"Answer");     $question =odbc_result ($aresult,"QuestionCode");     $qquery ="SELECT QuestionType from tblQuestions WHERE QuestionCode ='$question'";     $qresult = odbc_exec ($link,$qquery);     $qtype = odbc_result ($qresult,"QuestionType");     $rightwrong = odbc_result ($aresult,"Correct");    if($rightwrong ==0 && $correct ==1):                $count++;      endif;    if($qtype =="S" && $count > 1 )       {        ?>        <script LANGUAGE ="javascript" TYPE ="text/javascript">        alert("There is more than one correct answer to this question now. Please correct before you finish editing!");        </SCRIPT>        <?php              }     $newanswer = $_POST['newanswer'];     $originalanswer = $answer;     $editsql = "UPDATE tblAnswers SET Answer='$newanswer',Correct ='$correct' WHERE AnswerCode ='$acode'";     $editresult = odbc_exec ($link,$editsql);     $_SESSION['QA'] = ""; } [/code]
  4. oddly it wont let me post any code now :/
  5. good question when I do comment it out it goes down to the end of the function and says that the } that ends the function is unexpected so it has to be something to do with a missing } somewhere which is odd because I don't recall this error appearing before I went from version 5.0.2 up to 5.1.4.
  6. I thought the same thing to but I"m not finding anything else following the code thats causing the problem or before I'll look again though and see if I can find anything that might be causing this other than that one piece of code.
  7. Hey everyone I'm working on debugging a app of mine written in php and I keep having an error come up on the following code [code] if($qtype =="S" && $count > 1 )       {       ?>        <script LANGUAGE ="javascript" TYPE ="text/javascript">        alert("There is more than one correct answer to this question now. Please correct before you finish editing!");        </SCRIPT>        <?php              } [/code] it keeps telling me there is an unexpected } in this code. Now I've checked all the syntax around this code and it all looks fine its just this one segment that causes issues to crop up. Is there something against PhP version 5.1.4 and using javascript in this manner? Is there any workaround I can do to leave it basically functioning the same way?
  8. Hello everyone I have a small issue thats got me confused that I want to run by you folks and see if perhaps you have a solution. I setup a PhP program to pull some data out of a database and display it using ODBC. Now, the way I have it configured works fine on my local machine where I run an instance of apache to connect to the database but setting up the same System DSN I have on my local machine on my server and trying to connect causes the following error [code] odbc_connect() [<a href='function.odbc-connect'>function.odbc-connect</a>]: SQL error: [Microsoft][ODBC SQL Server Driver][Named Pipes]SQL Server does not exist or access denied., SQL state [/code] does anyone have any idea how I can correct this at all?
  9. [!--quoteo(post=384228:date=Jun 15 2006, 10:47 AM:name=thorpe)--][div class=\'quotetop\']QUOTE(thorpe @ Jun 15 2006, 10:47 AM) [snapback]384228[/snapback][/div][div class=\'quotemain\'][!--quotec--] The php.ini is pretty well commented in this area, however, I think you'll find most syntax [i]errors[/i] are actually just [i]warnings[/i]. [/quote] yeah I just got it working and its not liking my odbc connection to my database for some reason it keeps saying its not configured properly which is striking me as odd. Thanks for the response by the way and yeah I know its mostly warnings but they help me debug my code anyway :).
  10. Hey everyone, I'm trying to get IIS to do one of two things 1) Display the syntax error messages on the php page itself or 2) make a log file with the errors that occured loading a page on it. The second option is more preferable since it lets me view just the log then fix the syntax errors I have without having to turn it off when I'm done so the end user dosent see it. However I can't seem to get it configured properly in the php.ini file does anyone have a set of instructions on how to do this?
  11. sorry for posting this in this forum but for some reason it wont let me post in the installation forum where it belongs. I'm currently working on installing php on an IIS6 server and everytime I go through the installation I ge the following error message just trying to pull up the index page "Invalid access to memory location.". This happens on any page I try to pull up in php. I know I've got something wrong in either the ini file or the IIS configuration itself but for the life of me I cannot find it. Does anyone have any ideas as to what could be causing this given that I'm following these instructions [a href=\"http://www.wikihow.com/Installing-Php-5-for-Iis-6-on--Windows-Xp-and-2003\" target=\"_blank\"]http://www.wikihow.com/Installing-Php-5-fo...ows-Xp-and-2003[/a] mind you I commented back out the extensions it asks you to uncomment due to the fact I've been troubleshooting a lot and I wanted to get just the bare bones installation working first. edit: I got past this now it displays the index page fine now. It looks like a syntax issue elsewhere at this point which brings up a totally seperate question [img src=\"style_emoticons/[#EMO_DIR#]/laugh.gif\" style=\"vertical-align:middle\" emoid=\":laugh:\" border=\"0\" alt=\"laugh.gif\" /] . I had to download the php files again and redo the installation and that seemed to fix it only thing I can think of is I had gotten ahold of a flaky older version of php 5.1.4 seems to work fine *shrugs*.
×
×
  • 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.