[symfony-users] Re: What might cause output to appear when running a command line script? We're getting: Content-type: text/html; charset=iso-8859-1

2009-05-18 Thread Gareth McCumskey
Did you rebuild the model and then clear cache?

(propel:build-model)

On Mon, May 18, 2009 at 8:02 AM, Lawrence lkrub...@geocities.com wrote:


 We are now unable to run commands such as:

 symfony propel:build-all-load

 Because this seems to output between all the major steps:

 X-Powered-By: PHP/5.2.9
 Content-type: text/html; charset=iso-8859-1

 Which causes this:

 Fatal error: Class 'Content-type' not found in /home/apartments/php/
 symfony/plugins/sfPropelPlugin/lib/addon/sfPropelData.class.php on
 line 253


 What would cause such output?

 



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: What might cause output to appear when running a command line script? We're getting: Content-type: text/html; charset=iso-8859-1

2009-05-18 Thread Marek

what does php -v tells you? I get:

PHP 5.2.9 (cli) (built: Apr  1 2009 16:50:35)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

The important part is cli after version number. That means Command
Line Interface. If you have cgi, that's causing it to output headers.

-- Marek

On 18. Máj, 08:02 h., Lawrence lkrub...@geocities.com wrote:
 We are now unable to run commands such as:

 symfony propel:build-all-load

 Because this seems to output between all the major steps:

 X-Powered-By: PHP/5.2.9
 Content-type: text/html; charset=iso-8859-1

 Which causes this:

 Fatal error: Class 'Content-type' not found in /home/apartments/php/
 symfony/plugins/sfPropelPlugin/lib/addon/sfPropelData.class.php on
 line 253

 What would cause such output?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: What might cause output to appear when running a command line script? We're getting: Content-type: text/html; charset=iso-8859-1

2009-05-18 Thread Lawrence



On May 18, 9:15 am, Marek m0k...@gmail.com wrote:
 what does php -v tells you? I get:

 PHP 5.2.9 (cli) (built: Apr  1 2009 16:50:35)
 Copyright (c) 1997-2009 The PHP Group
 Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

 The important part is cli after version number. That means Command
 Line Interface. If you have cgi, that's causing it to output headers.




mybai...@mybailiwick.com [~/home/sfprojects/bw2]# php -v
PHP 5.2.9 (cgi-fcgi) (built: May 18 2009 02:46:53)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies


But this just started a few days ago. The problem wasn't there last
week.








 On 18. Máj, 08:02 h., Lawrence lkrub...@geocities.com wrote:

  We are now unable to run commands such as:

  symfony propel:build-all-load

  Because this seems to output between all the major steps:

  X-Powered-By: PHP/5.2.9
  Content-type: text/html; charset=iso-8859-1

  Which causes this:

  Fatal error: Class 'Content-type' not found in /home/apartments/php/
  symfony/plugins/sfPropelPlugin/lib/addon/sfPropelData.class.php on
  line 253

  What would cause such output?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: What might cause output to appear when running a command line script? We're getting: Content-type: text/html; charset=iso-8859-1

2009-05-18 Thread Eno

On Mon, 18 May 2009, Lawrence wrote:

 mybai...@mybailiwick.com [~/home/sfprojects/bw2]# php -v
 PHP 5.2.9 (cgi-fcgi) (built: May 18 2009 02:46:53)
 Copyright (c) 1997-2009 The PHP Group
 Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
 
 
 But this just started a few days ago. The problem wasn't there last
 week.

So there's been no software updates? What's weird is, on most platforms, 
the CGI binary is called php-cgi and the command-line is called just php.

Obviously, on your system, php is a CGI binary. On my system, php is a 
symbolic link to /usr/lib/php5/bin/php - maybe on yours its erroneously 
pointing to php-cgi instead. Or maybe you have an alias in play. I would 
also check what symfony is using as a path to the php binary.

$ php -v
PHP 5.2.9-pl2-gentoo with Suhosin-Patch 0.9.7 (cli) (built: Apr 24 2009 
14:13:10) Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with Suhosin v0.9.27, Copyright (c) 2007, by SektionEins GmbH

$ which php
/usr/bin/php

$ file /usr/bin/php
/usr/bin/php: symbolic link to `/usr/lib/php5/bin/php'

$ file /usr/bin/php-cgi
/usr/bin/php-cgi: symbolic link to `/usr/lib/php5/bin/php-cgi'



-- 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: What might cause output to appear when running a command line script? We're getting: Content-type: text/html; charset=iso-8859-1

2009-05-18 Thread Lawrence



On May 18, 4:43 pm, Eno symb...@gmail.com wrote:
 On Mon, 18 May 2009, Lawrence wrote:
  mybai...@mybailiwick.com [~/home/sfprojects/bw2]# php -v
  PHP 5.2.9 (cgi-fcgi) (built: May 18 2009 02:46:53)
  Copyright (c) 1997-2009 The PHP Group
  Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

  But this just started a few days ago. The problem wasn't there last
  week.

 So there's been no software updates? What's weird is, on most platforms,
 the CGI binary is called php-cgi and the command-line is called just php.

Well, I don't know. We keep the Symfony project in Subversion, but we
don't keep the whole server in Subversion, so there could have been
updates outside of the Symfony project. For that matter, if someone
edited any of the core Symfony files, that too would not show up in
Subversion.


 Obviously, on your system, php is a CGI binary. On my system, php is a
 symbolic link to /usr/lib/php5/bin/php - maybe on yours its erroneously
 pointing to php-cgi instead. Or maybe you have an alias in play. I would
 also check what symfony is using as a path to the php binary.

On our server:

$ which php
/usr/bin/php


$ file /usr/bin/php
/usr/bin/php: symbolic link to `/ramdisk/bin/php5'

$ file /ramdisk/bin/php5
/ramdisk/bin/php5: ELF 64-bit LSB executable, AMD x86-64, version 1
(SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs),
not stripped








--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: What might cause output to appear when running a command line script? We're getting: Content-type: text/html; charset=iso-8859-1

2009-05-18 Thread Jacob Coby


On May 18, 2009, at 5:34 PM, Lawrence wrote:

 So there's been no software updates? What's weird is, on most  
 platforms,
 the CGI binary is called php-cgi and the command-line is called  
 just php.

 Well, I don't know. We keep the Symfony project in Subversion, but we
 don't keep the whole server in Subversion, so there could have been
 updates outside of the Symfony project. For that matter, if someone
 edited any of the core Symfony files, that too would not show up in
 Subversion.

it's not a code issue.  your php cli binary is really a cgi-fcgi  
binary.  CGI requires at least the Content-type header from the binary  
so that's why you're seeing it output.


 $ file /usr/bin/php
 /usr/bin/php: symbolic link to `/ramdisk/bin/php5'

 $ file /ramdisk/bin/php5
 /ramdisk/bin/php5: ELF 64-bit LSB executable, AMD x86-64, version 1
 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs),
 not stripped

what else is in /ramdisk/bin/php*?  you might want to see what the  
configure statement looked like (php -i should report it at the top of  
its output).  it's possible that someone built the cgi binary as the  
cli or vice-versa.

side note: ramdisks are usually a waste of time at best.  or a waste  
of ram at worst.  especially for binaries.









 

--
Jacob Coby







--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---