Jump to content

Logical1

Members
  • Posts

    56
  • Joined

  • Last visited

    Never

Everything posted by Logical1

  1. It is back to the first problem now (header sent): if I add this to the code which becomes: <?php session_start(); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <body> شروع عضویت حدس بزنید راهنما حدسها و نتیجه ها نظر خواهی و تماس اخبار ورزشی جالب خروج از سیستم مسابقات تیمها </html> I get the following error: Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /----------/test.php:1) in /mnt/w0900/d34/s39/b02eb908/www/hadsi.com/test.php on line 2 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /--------------------/test.php:1) in /--------------/test.php on line 2 شروع عضویت حدس بزنید راهنما حدسها و نتیجه ها نظر خواهی و تماس اخبار ورزشی جالب خروج از سیستم مسابقات تیمها
  2. I use the same browser for all other pages which are utf-8. when you save what do you select as type? text?
  3. Thank you very much for taking the time to help. I did exctly what you suggested step by step. I loaded the file both time to my web server and both time I get: شروع عضویت حدس بزنید راهنما حدسها و نتیجه ها نظر خواهی و تماس اخبار ورزشی جالب خروج از سیستم مسابقات تیمها This is wierd if I don't include BOM fonts wont get recognized. I can not figure out how you do the exact same thing and get a different result unless it has something to do with the web server. You save is as what? with which option?
  4. PFMaBiSmAd now with Notepad ++ I can register the session but problem is that the Perian fonts show as funny characters. If I save the file as UTF-8 without BOM then I can not register session and get header already sent error message. Exact error message are: in /----------------/login.php on line 15 Warning: Cannot modify header information - headers already sent by (output started at /----------------/login.php:1) in /mnt/w0900/d34/s39/b02eb908/www/hadsi.com/login.php on line 17 Warning: Cannot modify header information - headers already sent by (output started at /----------------/login.php:1) in /----------------/login.php on line 19 
  5. I have no doubt that there is a way and I am doing womething wrong. This I copy directly from the browser : اصلی شروع عضویت حدس بزنید راهنما حدسها Ùˆ نتیجه ها نظر خواهی Ùˆ تماس اخبار ورزشی جالب خروج از سیست٠This is what I get. The font is supposed to be Persian and show: شروع عضویت حدس بزنید راهنما حدسها و نتیجه ها نظر خواهی و تماس اخبار ورزشی جالب خروج از سیستم مسابقات تیمها The option in format is Convert to UTF-8 without BOM an then I save it (as 123.php with default option All types *.*) Would you please write the setting you have? Thanks in advance
  6. yes.can omebody else try entering fornts of non english type (say arabic or japanese or similar) and see if you can remove the bom?
  7. I downloaded the notepad++ opened the same php file and saved it with the option UTF-8 without BOM. Problem got bigger now! Not only the fonts att turned into حدسها و نتیجه ها I am still getting header already send message!! What am I doing wrong?
  8. Howdy I am trying to find a way to standardize time of recorded events on my site. People post questions at different time zones and I want everybody's posting time to be based on a uniform system. And then I need to do some calculations with time (FOR EXAMPLE : 2 hours after posting the person should not be able to edit). Any idea as how to go about this? Thanks in advance. L1
  9. Thank you for your answer. I use Notepad and I earched the help there is no option for BOM I will download the notepad++
  10. I noticed that when a php file is saved as UTF-8 (I have to use non-english fonts and hence the UTF-8 saving) I keep on getting header send already errors when I try to regiter a session or cookies. The exact same php file saved as ascii does not casue any problem so it must not be the code but being UTF-8.Can anyone explain why and how to det around this issue and register sessions or cookies in a UTF-8 file? Thanks in advance L1
  11. What are the dos and donts of designing a dynamic data-driven site with PHP to prevent possibility of getting hacked? What techniques do you use or have heard about? For example I have noticed many sites link to a specific page by calling the ID number of that item for example: http://wwww.123khdkhdlihdflihdlaih.com/item.php?Id=2 which probably means that one can put another id number in the URL directly and see another item even unauthorized. How can this be prevented? Any suggestion or ideas are appreciated. Thanks in advance.
  12. The URL shows the location of files and one can figure out the directory structure. How can you not show that?
  13. I know that but still it is pretty silly to write password and usernames openly like that. ANy suggestions?
  14. I have checked many manuals and instructions and have not been able to find any way to prevent having to include in the code the username and password for connecting to the database. It seem like a very insecure way of doing things. Does any one have a suggestion for not having to write the username and passwrods for the databse in the code? tx
  15. Thank you for the suggestions. What is the structure of this file? Can't I extract the data out of them into excell or even a text file and then simply export the new data?
  16. For each of tables there are three files (with extentions you mentioned). Versions of MySQL are not the same, would placing them in the corresponding directory take care of the problem? On the other hand since the new system is already prepared by making the identical tables, can't we get the data somehow out of .myd files and then export them in to the new tables? Thanks in advance for your suggestions.
  17. In trying to recover data from a crashed server I have managed to get .myd files for each of the tables.- Structure of tables where simple and they are re-created in the new server. Question is: How can I get the data from .myd files into any other format or file (deli. text/excel/access/....) that can be used to export them into the new tables? Any suggetions? Thanks in advance.
  18. Thank you guys for your helpful and precise answers.
  19. Can anyone tell me in what format MySQL saves the data? Is it binary, text,...? tx
  20. Computer on the web server crashed and we are checking the hard drive to see if we can recover he MyQL tables. We used PhpMyAdmin to work with them and in reality do not know the location of the tables. How can we find them? The hard drive is OK but the guy trying to find the tables can not locate them altough we have upplied him with the table names. Any ideas? Thank in advance.
  21. I have no idea why you are acting funny. I said that I don't see how your suggestion can come of and provided you with the code to show how it can be done. There are 2 possibilites either it works or it does't either way it takes 10 minutes to find out and no need to act offended. I have provided you with the code it takes no more than 10 minutes to show how you can do this according to your system for only one variable. Also these forums are for exchange of ideas and learning, people post questions about what they do not know and others answer nobody tries to offend or gets offended for someone saying do an example. As they say proof is in the pudding.
  22. I really don't see how your suggestion can work. As you know PHP is not like Java that clicking on a button could initiate an event and I do not want to go to a middle page (there is no need for a preview, thay are already seeing the content). Why don't you put your suggestion into action in a very simple code (Just pass 2 variables) and don't have to worry about where to get the variables. I will supply you with the basics to save time: Here is the code for the thread page: <?php $V1= "GOOD"; $V2="DAY"; print "<a href=".$Id.".txt>Right click here to save a text file version</a><br><br>"; Print "Variable one: ".$V1."<br>"; print "Variable two: ".$V2."<br>"; ?> Here is your text generator file: <?php $name = "$Id"; $file = "$name.txt"; $values = "Variable one: $V1\nVariable two: $V2\n\n" $fp = fopen($file, "w") or die("Couldn't open $file for writing!"); $numBytes = fwrite($fp, $values) or die("Couldn't write values to file!"); fclose($fp); ?> And here is what the text file will look like: Variable one: GOOD Variable two: DAY
  23. I wrote a PHP page that picks up the data from the MySQL database and sends it to the text file. So far so good. But it is not working for me becasue let's say you are at the page OneThread.php?Id=100 in the forum and looking at the entry number 100. There is a link on the page that says "Note in text format". You click on it and it sends you to the page Generate_Text.php and that page creates a fresh copy of your text version (say Entry100.txt). You see there is a middle step and the link on the page is not actually to the text file. That's what I am trying to avoid. If I generate a text file every time the OneThread.php is viewed I can make the link on that page to Entry100.txt (for example). But this measn creating a lot of text files while in reality not many people might want to use them (by creating the every time the page is opened). What do you think? I guess subconsiously I knew it was not going to work. I
  24. Thanks I think I got the idea and you do not have to program it for me. I will write the script and if there were any problems post it here. Thasnk for the suggestions
  25. I have no problem with visitors wanting to select where to save or even if they want to save. As a matter of fact this is how I want this thing to work. The issue is that I don't want to sit ana manually make a text file for every entry in the system, and I can not think of a way to automate it. If I make a generic text file it wo't have the content for that specific entry. Or maybe you know a way to do this and I don't know about that? Supposed you were makikng a forum and wanted to give option of saving a message or reply in text format without having to opy and paste the content manually. How would you do it? Each message would be different, without having to make a separate text file for each message and updating it every time there is an answer what solution do you see? Secondly, if it is so easy to open a text file, write to it and close the file again, why is it impossible to give the option to the viewer to see it on the screen if they want to and decide if they want to save it or not?
×
×
  • 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.