Hello all.
I hope that I am posting this thread in the right spot. I want to state first of all that I am VERY VERY NEW to PHP. Never done anything with it at all. This is the first day I've ever even fooled with it. However, I decided that I would try out some guy's example on how to use PHP in order to simulate a text resizer. Upon trying to duplicate his example, I ran into a unique problem upon testing.
My browser will not automatically load the page. I get the standard download window from IE- Do you want to save or open this file? Does anyone know offhand why I am having this problem?
Please let me know ASAP.
Curious & Confused
Moderator: General Moderators
Can you post the code? What version of PHP are you using? What HTTPD server are you working with (Apache, etc)? Windows or Linux installation? Please be as specific as possible.
You do understand that you need to 'serve' the page using a server such as Apache, you can't simply 'open' a PHP script with a browser?
It sounds like you haven't properly configured your web server to handle PHP scripts, and the browser is attempting to download the script because it doesn't recognize the type.
You do understand that you need to 'serve' the page using a server such as Apache, you can't simply 'open' a PHP script with a browser?
It sounds like you haven't properly configured your web server to handle PHP scripts, and the browser is attempting to download the script because it doesn't recognize the type.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
I'm obviously over my head with such a programming language. I'm really not sure of which version of PHP I'm dealing with. I'll post the URL where this example is found.bdlang wrote:Can you post the code? What version of PHP are you using? What HTTPD server are you working with (Apache, etc)? Windows or Linux installation? Please be as specific as possible.
You do understand that you need to 'serve' the page using a server such as Apache, you can't simply 'open' a PHP script with a browser?
It sounds like you haven't properly configured your web server to handle PHP scripts, and the browser is attempting to download the script because it doesn't recognize the type.
Here it is:
http://24ways.org/advent/introducing-udasss
I'm working off of a server provided by the institution I work with. I am unable to find any of the people in the know at the moment. I believe the server is Windows 2003 Server. Is that the info you need?
So would it be that the server may not support PHP scripts?
When you say "serve" the page, do you mean that I have to upload the page to the server first before testing? I'm not keen on my terminology yet.
So it's not as if I can rip off some of this guy's stuff, plunk it into my code, and work with it? I should mention that he had all associated files zipped into an archive. I downloaded them and dumped them onto the server here. i was working off of a page I created that utilized all of the files he created.arborint wrote:PHP is a server side language which means that you need a webserver configures with PHP to actually user PHP.
Ok, for starters, yes you need to verify that the server you're working with supports PHP. The system admin will make that determination, I'm afraid you'll have to wait to ask him (or her).shawty wrote: I'm working off of a server provided by the institution I work with. I am unable to find any of the people in the know at the moment. I believe the server is Windows 2003 Server. Is that the info you need?
So would it be that the server may not support PHP scripts?
When you say "serve" the page, do you mean that I have to upload the page to the server first before testing? I'm not keen on my terminology yet
You can, however, if you're adventurous, install a web server such as Apache (it's free) and PHP on your own desktop machine to test scripts. Everything you need is detailed in the PHP Manual under the installation and configuration section. Note the subsections for each OS type / install type.
You can also install PHP as a purely CLI (command line) application and have it parse scripts on the command line. I am constantly using the CLI interface to debug scripts, and I use it for alot of shell scripts to interface with a database, etc.
Literally everything you want to know about PHP can be found in the manual.
Thanks for all of the info. So in all, my problem stems from the server? I'll check that out ASAP.bdlang wrote:Ok, for starters, yes you need to verify that the server you're working with supports PHP. The system admin will make that determination, I'm afraid you'll have to wait to ask him (or her).shawty wrote: I'm working off of a server provided by the institution I work with. I am unable to find any of the people in the know at the moment. I believe the server is Windows 2003 Server. Is that the info you need?
So would it be that the server may not support PHP scripts?
When you say "serve" the page, do you mean that I have to upload the page to the server first before testing? I'm not keen on my terminology yet
You can, however, if you're adventurous, install a web server such as Apache (it's free) and PHP on your own desktop machine to test scripts. Everything you need is detailed in the PHP Manual under the installation and configuration section. Note the subsections for each OS type / install type.
You can also install PHP as a purely CLI (command line) application and have it parse scripts on the command line. I am constantly using the CLI interface to debug scripts, and I use it for alot of shell scripts to interface with a database, etc.
Literally everything you want to know about PHP can be found in the manual.