PHP being interpreted and saved

This is a discussion on PHP being interpreted and saved within the PHP Language forums, part of the PHP Programming Forums category; We're setting up a webserver w. RHEL 4.1 and PHP 4.3. I'm sure there is a ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-08-2007
swiftfalcon@gmail.com
 
Posts: n/a
Default PHP being interpreted and saved

We're setting up a webserver w. RHEL 4.1 and PHP 4.3. I'm sure there
is a setting somewhere that's been confounding me. When I create a
file "test.php" and insert:
<?php
phpinfo();
?>
It displays as expected in the browser but when the file is reopened
from the server to be edited, the file contains the output from the
phpinfo() call rather then the three lines of code above. Anyone have
ideas as to why this is happening?

Reply With Quote
  #2 (permalink)  
Old 08-08-2007
ZeldorBlat
 
Posts: n/a
Default Re: PHP being interpreted and saved

On Aug 8, 11:13 am, swiftfal...@gmail.com wrote:
> We're setting up a webserver w. RHEL 4.1 and PHP 4.3. I'm sure there
> is a setting somewhere that's been confounding me. When I create a
> file "test.php" and insert:
> <?php
> phpinfo();
> ?>
> It displays as expected in the browser but when the file is reopened
> from the server to be edited, the file contains the output from the
> phpinfo() call rather then the three lines of code above. Anyone have
> ideas as to why this is happening?


What do you mean by "reopened from the server" ? How are you opening
the file?

Reply With Quote
  #3 (permalink)  
Old 08-08-2007
swiftfalcon@gmail.com
 
Posts: n/a
Default Re: PHP being interpreted and saved

On Aug 8, 12:14 pm, ZeldorBlat <zeldorb...@gmail.com> wrote:
> On Aug 8, 11:13 am, swiftfal...@gmail.com wrote:
>
> > We're setting up a webserver w. RHEL 4.1 and PHP 4.3. I'm sure there
> > is a setting somewhere that's been confounding me. When I create a
> > file "test.php" and insert:
> > <?php
> > phpinfo();
> > ?>
> > It displays as expected in the browser but when the file is reopened
> > from the server to be edited, the file contains the output from the
> > phpinfo() call rather then the three lines of code above. Anyone have
> > ideas as to why this is happening?

>
> What do you mean by "reopened from the server" ? How are you opening
> the file?


I'm opening it with Notebook++, a simple source code editor

Reply With Quote
  #4 (permalink)  
Old 08-08-2007
dkruger
 
Posts: n/a
Default Re: PHP being interpreted and saved

On Aug 8, 10:13 am, swiftfal...@gmail.com wrote:
> We're setting up a webserver w. RHEL 4.1 and PHP 4.3. I'm sure there
> is a setting somewhere that's been confounding me. When I create a
> file "test.php" and insert:
> <?php
> phpinfo();
> ?>
> It displays as expected in the browser but when the file is reopened
> from the server to be edited, the file contains the output from the
> phpinfo() call rather then the three lines of code above. Anyone have
> ideas as to why this is happening?


if you use 'php test.php' to "re-open" the file, it will output the
content generated by the php script, but if you edit test.php with 'vi
test.php' or something of the sort, you should see the code you
entered previously instead of the generated info.

Reply With Quote
  #5 (permalink)  
Old 08-08-2007
swiftfalcon@gmail.com
 
Posts: n/a
Default Re: PHP being interpreted and saved

On Aug 8, 1:20 pm, dkruger <davidkru...@techie.com> wrote:
> On Aug 8, 10:13 am, swiftfal...@gmail.com wrote:
>
> > We're setting up a webserver w. RHEL 4.1 and PHP 4.3. I'm sure there
> > is a setting somewhere that's been confounding me. When I create a
> > file "test.php" and insert:
> > <?php
> > phpinfo();
> > ?>
> > It displays as expected in the browser but when the file is reopened
> > from the server to be edited, the file contains the output from the
> > phpinfo() call rather then the three lines of code above. Anyone have
> > ideas as to why this is happening?

>
> if you use 'php test.php' to "re-open" the file, it will output the
> content generated by the php script, but if you edit test.php with 'vi
> test.php' or something of the sort, you should see the code you
> entered previously instead of the generated info.


You're corrent that through vi I do see the code. I'm starting to
think this may be a WebDAV issue.

Reply With Quote
  #6 (permalink)  
Old 08-08-2007
dkruger
 
Posts: n/a
Default Re: PHP being interpreted and saved

On Aug 8, 12:43 pm, swiftfal...@gmail.com wrote:
> On Aug 8, 1:20 pm, dkruger <davidkru...@techie.com> wrote:
>
>
>
>
>
> > On Aug 8, 10:13 am, swiftfal...@gmail.com wrote:

>
> > > We're setting up a webserver w. RHEL 4.1 and PHP 4.3. I'm sure there
> > > is a setting somewhere that's been confounding me. When I create a
> > > file "test.php" and insert:
> > > <?php
> > > phpinfo();
> > > ?>
> > > It displays as expected in the browser but when the file is reopened
> > > from the server to be edited, the file contains the output from the
> > > phpinfo() call rather then the three lines of code above. Anyone have
> > > ideas as to why this is happening?

>
> > if you use 'php test.php' to "re-open" the file, it will output the
> > content generated by the php script, but if you edit test.php with 'vi
> > test.php' or something of the sort, you should see the code you
> > entered previously instead of the generated info.

>
> You're corrent that through vi I do see the code. I'm starting to
> think this may be a WebDAV issue.- Hide quoted text -
>
> - Show quoted text -


It could be the notepad++ program, I am personally not familiar with
that, however, if you are accessing the file through windows (i
assume) for viewing/editing, likely using the URL for the file to open
it, then the server is executing the script as though a web browser
requested it and is sending the output of the script...just my guess.
If you run some sort of editing program on your server, to make the
changes, probably the issue would not occur.

Reply With Quote
  #7 (permalink)  
Old 08-08-2007
swiftfalcon@gmail.com
 
Posts: n/a
Default Re: PHP being interpreted and saved

On Aug 8, 2:24 pm, dkruger <davidkru...@techie.com> wrote:
> On Aug 8, 12:43 pm, swiftfal...@gmail.com wrote:
>
>
>
> > On Aug 8, 1:20 pm, dkruger <davidkru...@techie.com> wrote:

>
> > > On Aug 8, 10:13 am, swiftfal...@gmail.com wrote:

>
> > > > We're setting up a webserver w. RHEL 4.1 and PHP 4.3. I'm sure there
> > > > is a setting somewhere that's been confounding me. When I create a
> > > > file "test.php" and insert:
> > > > <?php
> > > > phpinfo();
> > > > ?>
> > > > It displays as expected in the browser but when the file is reopened
> > > > from the server to be edited, the file contains the output from the
> > > > phpinfo() call rather then the three lines of code above. Anyone have
> > > > ideas as to why this is happening?

>
> > > if you use 'php test.php' to "re-open" the file, it will output the
> > > content generated by the php script, but if you edit test.php with 'vi
> > > test.php' or something of the sort, you should see the code you
> > > entered previously instead of the generated info.

>
> > You're corrent that through vi I do see the code. I'm starting to
> > think this may be a WebDAV issue.- Hide quoted text -

>
> > - Show quoted text -

>
> It could be the notepad++ program, I am personally not familiar with
> that, however, if you are accessing the file through windows (i
> assume) for viewing/editing, likely using the URL for the file to open
> it, then the server is executing the script as though a web browser
> requested it and is sending the output of the script...just my guess.
> If you run some sort of editing program on your server, to make the
> changes, probably the issue would not occur.


Thanks for the advice but what it ended up is that the line "ForceType
text/plain" was missing from our conf file. So the code was being
preprocessed.

Reply With Quote
  #8 (permalink)  
Old 08-08-2007
swiftfalcon@gmail.com
 
Posts: n/a
Default Re: PHP being interpreted and saved

On Aug 8, 5:04 pm, swiftfal...@gmail.com wrote:
> On Aug 8, 2:24 pm, dkruger <davidkru...@techie.com> wrote:
>
>
>
> > On Aug 8, 12:43 pm, swiftfal...@gmail.com wrote:

>
> > > On Aug 8, 1:20 pm, dkruger <davidkru...@techie.com> wrote:

>
> > > > On Aug 8, 10:13 am, swiftfal...@gmail.com wrote:

>
> > > > > We're setting up a webserver w. RHEL 4.1 and PHP 4.3. I'm sure there
> > > > > is a setting somewhere that's been confounding me. When I create a
> > > > > file "test.php" and insert:
> > > > > <?php
> > > > > phpinfo();
> > > > > ?>
> > > > > It displays as expected in the browser but when the file is reopened
> > > > > from the server to be edited, the file contains the output from the
> > > > > phpinfo() call rather then the three lines of code above. Anyone have
> > > > > ideas as to why this is happening?

>
> > > > if you use 'php test.php' to "re-open" the file, it will output the
> > > > content generated by the php script, but if you edit test.php with 'vi
> > > > test.php' or something of the sort, you should see the code you
> > > > entered previously instead of the generated info.

>
> > > You're corrent that through vi I do see the code. I'm starting to
> > > think this may be a WebDAV issue.- Hide quoted text -

>
> > > - Show quoted text -

>
> > It could be the notepad++ program, I am personally not familiar with
> > that, however, if you are accessing the file through windows (i
> > assume) for viewing/editing, likely using the URL for the file to open
> > it, then the server is executing the script as though a web browser
> > requested it and is sending the output of the script...just my guess.
> > If you run some sort of editing program on your server, to make the
> > changes, probably the issue would not occur.

>

Thanks for the advice but what it ended up is that the line "ForceType
text/plain" was missing from our conf file. So the code was being
preprocessed.

So basically it was an issue with WebDAV missing that one line
directive.

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:55 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0