[solved] Okay, am I going insane?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Elessar
Forum Newbie
Posts: 15
Joined: Tue Jun 15, 2004 11:17 am

[solved] Okay, am I going insane?

Post by Elessar »

Here is my little mystery:

I have a little include file on my webpage, which I use to display the "news" of the month. The file's on PHP (as well as several other pages on the site) and it takes data (the news of the month) from a mySQL database.

So far so good. But when I try to retrieve the file via FTP, I don't get the file with the PHP code, I get the HTML code. Somehow, for some reason, the file's parsed BEFORE it's sent to me, so all I see is plain HTML. It happens ONLY with that file. And yes, I'm 100% sure the file's PHP. I'm truly baffled by this.

Any help, please?
Last edited by Elessar on Tue Jun 15, 2004 12:08 pm, edited 1 time in total.
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

Try renaming the file on the server and then ftp it. What FTP application are you using?
Elessar
Forum Newbie
Posts: 15
Joined: Tue Jun 15, 2004 11:17 am

Already done.

Post by Elessar »

I changed the name. Nothing, I still get plain HTML. I'm using WS_FTP LE as a FTP client. Horrible, but it's kinda the "standard" here at office.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Lol thats unusual but it is definantly the ftp program
User avatar
snpo123
Forum Commoner
Posts: 77
Joined: Sat Apr 17, 2004 6:31 pm

Post by snpo123 »

can you do this to ftp? ftp://yoursite/
Elessar
Forum Newbie
Posts: 15
Joined: Tue Jun 15, 2004 11:17 am

Post by Elessar »

Yes, but I can't login. For some reason it always logs me in as anonymous, even if I provide the correct username/password
Elessar
Forum Newbie
Posts: 15
Joined: Tue Jun 15, 2004 11:17 am

Post by Elessar »

Oh, and I also downloaded the file using the command line FTP, I'm using Windows 2000. Same thing.

O_O
Elessar
Forum Newbie
Posts: 15
Joined: Tue Jun 15, 2004 11:17 am

Post by Elessar »

Okay, if this continues, I'll have to rewrite the code (no big deal, just a simple SELECT), but I'd really like to know what the %$@$#% I just did for this to happen.
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

Elessar
Forum Newbie
Posts: 15
Joined: Tue Jun 15, 2004 11:17 am

Post by Elessar »

I know, it doesn't work, because the username contains a '@' as well.
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

Elessar
Forum Newbie
Posts: 15
Joined: Tue Jun 15, 2004 11:17 am

Post by Elessar »

Didn't work.
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

yea it was a long shot...
Elessar
Forum Newbie
Posts: 15
Joined: Tue Jun 15, 2004 11:17 am

God, I'm SUCH an idiot...

Post by Elessar »

The script I use to modify the monthly news writes DIRECTLY to the .php file. That's why I didn't see any code, because there isn't any.

I'm so embarrased... :oops:
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

ehheeh

happens to all of us
Post Reply