Development grr strange php problem

Discussion in 'Software' started by Haddy, 21 Aug 2002.

  1. Haddy

    Haddy World Domination

    Joined:
    22 Jan 2002
    Posts:
    2,821
    Likes Received:
    0
    http://www.alien-host.com/order.php

    look between the nav bar and the top of the form.....where the crap did those strange characters come from???

    if u need more info then u can get from the view source part let me know....

    btw the script does work....it just gives me that funky stuff at the top.....
     
  2. bradford010

    bradford010 Bradon Frohman

    Joined:
    7 Dec 2001
    Posts:
    3,426
    Likes Received:
    0
    From what I can see they actually appear in th HTML before the opening of the form tag.
    You wanna maybe contact me, and let me see the original code. Shouldn't be too tricky getting to the bottom of this one.
     
  3. Haddy

    Haddy World Domination

    Joined:
    22 Jan 2002
    Posts:
    2,821
    Likes Received:
    0
    www.alien-host.com/PHP.rar -original source coded pages.....if u need any more just let me know....

    friend said something about the tag might not be closing.....i dunno this is my first time with my own php....so i have no clue....
     
  4. Alaric

    Alaric code assassin

    Joined:
    3 Nov 2001
    Posts:
    2,881
    Likes Received:
    0
    i haven't actually checked any of the code but you seem to have some stuff before the "<?php" at the top of orderform.php that needn't / shouldn't be there.

    Also check to makesure it's being uploaded as ascii (sure you have) but some ftp clients seem to neglect php as being ascii

    if it's neither of them i'll look at it again in the morning when i'm a bit fresher :) (read: A LOT fresher)(like being awake would help :))

    Alaric.
     
  5. Haddy

    Haddy World Domination

    Joined:
    22 Jan 2002
    Posts:
    2,821
    Likes Received:
    0
    could u be more specific??
     
  6. bradford010

    bradford010 Bradon Frohman

    Joined:
    7 Dec 2001
    Posts:
    3,426
    Likes Received:
    0
    He's right. I missed it at first. I moved to wordpad from notepad for coding a little while ago, because it can miss things like this, but word missed this one as well.
    Then I opened it using Homesite and sure enough, there were your 'strange characters'.
    I've edited your script and tested it locally and it seems to be fixed.
    right click - save as
    Let me know if you need anything more. :D
     
  7. Alaric

    Alaric code assassin

    Joined:
    3 Nov 2001
    Posts:
    2,881
    Likes Received:
    0
    yeh urgh... sorry i'm half asleep.

    There's one (or more) very high ascii characters before the first "<?php" in orderform.php - they don't even appear in notepad or wordpad. But show up as one character in ultraedit... dropping into hexmode i could see they were high ascii values... deleting that in ultraedit allowed it to work on my test server without any extra nasty characters appearing. :)

    on account of the fact you probably can't actually see the thing to delete i've uploaded a modified copy to http://www.ajrn.co.uk/etc/orderform.rar
    if you makesure that uploads as ascii you shouldn't have any problems as it works on my machine perfectly.

    Errr... if you do or you think i'm talking gibberish i promise to look again in the morning... just try uploading the php file in my rar as ascii first :D

    gl

    alaric
     
  8. Haddy

    Haddy World Domination

    Joined:
    22 Jan 2002
    Posts:
    2,821
    Likes Received:
    0
    where were they???
     
  9. bradford010

    bradford010 Bradon Frohman

    Joined:
    7 Dec 2001
    Posts:
    3,426
    Likes Received:
    0
    Beat ya by 4 minutes :p
     
  10. Alaric

    Alaric code assassin

    Joined:
    3 Nov 2001
    Posts:
    2,881
    Likes Received:
    0
    damn you beat my tired typing :p

    :D

    was a strange problem... dunno how they got there but i saw it straight away cause it's clearly visible in ultraedit :D

    i'm going to sleep now that someone thinks i'm not insane :)

    nn

    Alaric.
     
  11. bradford010

    bradford010 Bradon Frohman

    Joined:
    7 Dec 2001
    Posts:
    3,426
    Likes Received:
    0
    Immediately before your '<?php tag' in orderform.php.
    Like Alaric said, it's likely some sort of screw up during file transfer that just wouldn't show up in a basic text editor like notepad.

    What do you use for editing your code btw?
     
  12. Haddy

    Haddy World Domination

    Joined:
    22 Jan 2002
    Posts:
    2,821
    Likes Received:
    0
    i wuz usin dream weaver to edit it casue it color codes......but i wrote it in word....
     
  13. bradford010

    bradford010 Bradon Frohman

    Joined:
    7 Dec 2001
    Posts:
    3,426
    Likes Received:
    0
    eewwwwwwee, Dreamweaver:blah:

    You may have guessed, I'm not Dreamweaver's biggest fan.:lol:
     
  14. relix

    relix Minimodder

    Joined:
    14 Nov 2001
    Posts:
    5,948
    Likes Received:
    41
    I think dreamweaver is the best, much better than Word or Frontpage anyway.

    What do you suggest then bradford?
     
  15. Kevo

    Kevo 426F6C6C6F636B7300

    Joined:
    9 Sep 2001
    Posts:
    3,669
    Likes Received:
    0
    Dreamwaver = Filth.

    Notepad = r0><0r!!

    UltraEdit = l33t
     
  16. bradford010

    bradford010 Bradon Frohman

    Joined:
    7 Dec 2001
    Posts:
    3,426
    Likes Received:
    0
    I haven't actually used UltraEdit, although it has a very good rep. From what I've seen of it, it's very similar in execution to Macromedia Homesite, which is my choice.

    Basically, IMO, Dreamweaver was created for home users who weren't computer literate enough to learn some proper programming skills and professionals who couldn't afford to hire real programmers.
    You made my point by comparing it to Word and frontpage. They are devil spawn I tell you!

    If you're a programmer and you use Dreamweaver, you deserve to be shot!:hehe: :hehe:
     
  17. Alaric

    Alaric code assassin

    Joined:
    3 Nov 2001
    Posts:
    2,881
    Likes Received:
    0
    correct.

    absolutely.

    damn right!

    Ultraedit == teh win.
    It has all the text editting features you'd ever need but is quick, opens multiple files at once and remember and reopens them when you reopen it. (Just like Opera does with browser windows)


    Alaric.
     
  18. linear

    linear Minimodder

    Joined:
    5 Oct 2001
    Posts:
    4,393
    Likes Received:
    1
    And: Ian (who wrote UltraEdit) is cool, he's a guy trying to make a living by writing great software. Pay the thirty bucks to license your copy, it is going directly to the person responsible for the product in this case.
     
  19. Haddy

    Haddy World Domination

    Joined:
    22 Jan 2002
    Posts:
    2,821
    Likes Received:
    0
    yea well im an uber noob with html......i just used it cause u can usualy c where u messed up cause it can display codes in color......its a good learing tool......ima look into ultra edit....
     
  20. Haddy

    Haddy World Domination

    Joined:
    22 Jan 2002
    Posts:
    2,821
    Likes Received:
    0
    well its me again......figured id just use my same thread sense its basicly the same problem.....sept i cant even get this one to work......all i did wuz edit out the code from the other one *friend coded most of it and i watched.....* so instead of buggin him to help me again i figured id bring it here =)

    PHP2

    like i said before i dont know much php is if its just totaly wrong let me know.....i figured it would work...all i would have to do is edit what the email displayed =/ guess i thought wrong
     

Share This Page