How to get your PHP program to work
- Use jEdit to write your program to take advantage of
color-coding. This will help you catch mistakes such as a mistyped
- Don't write a large program all at once, write a little bit at
a time. Test your program after every time you change or add
- To test, upload your file to your public_html (or its subfolder)
rynite. Type in its URL in the browser. If you get a file-not-found
error, double-check the file name and its location.
- If the result is not what you expected and you don't immediately
see a mistake, you can try to run the program directly on the server
in a hope that you get some helpful information from the error
- login to rynite using
ssh. In the lab type
ssh yourusername@rynite if
your user name is different on rynite) in the terminal window. Enter
the password. On your home machine (Windows) you can install
- a simple program that allows you to connect to a server via ssh.
- Change the directory to where your file is located using
cd command, for instance
php myfile.php (where instead of
myfile.php you use the actual file name). This will give
the HTML output of the program (if any) and error messages (if
any). Some error messages are not very clear, but they usually give
you at least some idea of what's wrong and point to a specific line in
your program where the mistake was detected.
- Correct the mistake in jEdit and upload your file again.
The views and opinions expressed in this page are strictly those of the page author. The contents of this page have not been reviewed or approved by the University of Minnesota.