Re: [PHP] Removing ^M

2002-06-08 Thread Dave Raven

why not just run
tr -d \r htmlfile.htm


- Original Message - 
From: Michael Hall [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Sunday, June 09, 2002 2:40 AM
Subject: [PHP] Removing ^M


 
 
 I am trying remove ^M characters (some kind of newline character) from an
 HTML file. I've tried all sorts of ereg_replace and sed possibilities
 but the
 things just won't go away. Does anyone have a way of removing such
 characters?
 
 TIA 
 
 Mick
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Tailing a log file {!?}

2002-05-05 Thread Dave Raven

check directory rights.

If need be, passwd the user and give it a shell.
then try on the console as the webserver user
to tail the file.

- Original Message - 
From: Liam MacKenzie [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Tom Rogers [EMAIL PROTECTED]
Sent: Saturday, May 04, 2002 11:26 AM
Subject: Re: [PHP] Tailing a log file {!?}


 That doesn't work either!
 Something's going on here...
 
 
 
 - Original Message -
 From: Tom Rogers [EMAIL PROTECTED]
 To: Liam MacKenzie [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Sunday, May 05, 2002 6:49 PM
 Subject: Re: [PHP] Tailing a log file {!?}
 
 
 Hi
 The following works for me, give it a try with the correct path.
 
 ?
 exec(tail -n 50 /usr/local/apache/logs/access_log,$result);
 echo count($result). results returned. br;
 if(count($result)  0){
  foreach($result as $line){
  echo $line.br;
  }
 }
 ?
 
 Tom
 
 
 At 06:25 PM 4/05/2002, Liam MacKenzie wrote:
 $cmd = exec(tail -n $len /www/hosting/domains/lanolot/logs/$open,
 $result);
 
 echo $cmd;
 
 Still returns nothing under the top text.
 
 All log files are chmodded 644 and are owned by the web server.
 The paths to the files are correct.
 
 I've run out of ideas  =(
 
 Thanks
 
 
 - Original Message -
 From: Jason Wong [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, May 05, 2002 6:22 PM
 Subject: Re: [PHP] Tailing a log file {!?}
 
 
 On Saturday 04 May 2002 16:09, Liam MacKenzie wrote:
   Sorry, I should have included this in the first email...
 
 [snip]
 
   When I call the page, I get the expected at the top:
   Excecuting: tail -n 150 /www/hosting/domains/lanolot/logs/error.log
   Displaying the last 150 lines of error.log...
  
   But there's nothing underneath it.
 
 1) Check that you have permissions to access the file
 2) Add a 'return_var' to your exec() call. And check what this contains.
 
 --
 Jason Wong - Gremlins Associates - www.gremlins.com.hk
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 
 /*
 DeVries' Dilemma:
 If you hit two keys on the typewriter, the one you don't want
 hits the paper.
 */
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] php permissions

2002-04-19 Thread Dave Raven

chown them to nobody.


- Original Message - 
From: ROBERT MCPEAK [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 19, 2002 7:53 PM
Subject: [PHP] php permissions


 php is running on our box  as nobody:nogroup.  I'm trying to write php
 code that will edit/delete files uploaded to the server by other users,
 and, obviously, I get a permissions error.
 
 My sysadmin is hesitant to give php more access until I do some
 research about the security issues involved, and I am a relative newbie
 and I'm not sure what the issues are or how to find out more about
 them.
 
 How do I give php permissions to delete files etc., without opening up
 an security hole?  Is this an issue at all?
 
 Help!
 
 Thanks!
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Rebooting

2002-04-09 Thread Dave Raven

Hello all
I need to reboot a FreeBSD 4.5-STABLE
computer using php + apache. I have a 
small wrapper which runs the reboot 
command as root, but it freezes half way
through and the box hangs. 

I'm thinking that the reboot process is 
killing apache, and in effect killing itself.
How might I get around this?

Thanks
Dave Raven.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php