[PHP] PHP 4.0.5 Parse Problems

2001-05-07 Thread Ben Gollmer

Hi all -

Today I compiled and installed PHP 4.0.5 on my Linux server (Apache 
1.3.19, linked statically with php  mod_ssl). Suddenly, many of my 
files would no longer be parsed by PHP - instead, they spit raw code 
onto the page.

I created most of the files on my MacOS X machine using the text editor 
Pepper. Some were also created on Windows 2000 using Notepad. Previously 
I noticed a post to this list noting a problem with line endings:

With 4.0.4pl1 and earlier, this did not occur, but with 4.0.5, there
are some files on our server that are not getting parsed as php, and
just showing up as the code itself.  The problem files are a mess, but
I only mention them since they got parsed before.  They are php files
that the designers here have created in HomeSite and saved as PC
format, so they are basically 1 long line when I open them in vi, and
have ^M's everywhere.  If they pull them back into HomeSite and save
as UNIX format and upload, no problem.  What changed in PHP that would
make this difference.  I would just tell them to do this with all the
problem ones, but there are a lot.
This is on OpenBSD, btw.  Thanks.
-Ken

I tried changing the line endings of some of my files, but to no avail. 
The only thing that seems to work for me is to create a new file using 
vi or pico - PHP then parses it perfectly. For now, PHP 4.0.5 isn't a 
must-have upgrade, so I went back to 4.0.4pl1.

Is this a bug, or some change in PHP that is causing it to ignore 
alternative (non-UNIX) line endings? If there is a problem with PHP, I 
want to make sure everyone is aware of it so it can be fixed in 4.0.6.

Ben Gollmer

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP 4.0.5 Parse Problems

2001-05-07 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Ben Gollmer) wrote:

   I only mention them since they got parsed before.  They are php files
   that the designers here have created in HomeSite and saved as PC
   format, so they are basically 1 long line when I open them in vi, and
   have ^M's everywhere.  If they pull them back into HomeSite and save
   as UNIX format and upload, no problem.  What changed in PHP that would
   make this difference.  I would just tell them to do this with all the
   problem ones, but there are a lot.
   This is on OpenBSD, btw.  Thanks.
   -Ken
 
 I tried changing the line endings of some of my files, but to no avail. 
 The only thing that seems to work for me is to create a new file using 
 vi or pico - PHP then parses it perfectly. For now, PHP 4.0.5 isn't a 

What transfer mode is your FTP client using to transfer the files?  I 
forget whether it's binary or ASCII mode (I *think the latter...) that 
automatically adjusts linebreak/newline characters for you, but you might 
want to try toggling the client's setting to see if those changed line 
endings can be made to stay changed after transfer.  (BTW, text editors 
often have an option allowing the user to specify which OS's linebreak 
style to use when saving.  Sounds like 4.0.5. may be requiring more of us 
to take advantage of this type of feature.)

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]