[PHP] Success Using PEAR?

2002-03-16 Thread Bryan Henry

anyone had success using PEAR?

I have read the documentation and been trying to use the PEAR
files that came with PHP 4.1.2 , PEAR cvs and PHP4/PEAR cvs 
with no success.  

I wish there was some updated documentation, and more explanation 
on which files to use for stable development.  Every answer I 
get from people developing PEAR is vague and contradictory.

~ b r y a n

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




Re: [PHP] renamed images are now corrupt...

2004-02-26 Thread Bryan Henry
Browser and FTP client act as if the image
files do not exist, even though the directory
contents can be views via FTP...
What did I do?
 Bryan




On Thu, 26 Feb 2004 17:56:25 -0600, Bryan Henry <[EMAIL PROTECTED]> 
wrote:

Hello all,

I wrote a small script to rename a few thousand images,
both gif and jpeg... After running the script, none of
the renamed images can be viewed or downloaded.
Trying to download these images from an FTP client fails.
FTP client attempts to download the images PASSIVE-ly
Unaltered images can be downloaded as binary files with
no problem..
I now have over 3000 images I cannot download or view
on our website. What about rename caused this?
Thank you,
Bryan Henry


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: renamed images are now corrupt...

2004-02-26 Thread Bryan Henry
Looking throught my FTP client it seems that the
permission are the same? Could this be incorrect?
Should I chmod or chown through a shell? or using PHP?

~ bryan



On Fri, 27 Feb 2004 00:01:47 +, Michael Nolan 
<[EMAIL PROTECTED]> wrote:

Check the permissions and ownership of the files, especially if you ran 
the script as some privileged user like root.  chmod or chown can be 
used to changed these.

Mike

Bryan Henry wrote:

Browser and FTP client act as if the image
files do not exist, even though the directory
contents can be views via FTP...
What did I do?
 Bryan




On Thu, 26 Feb 2004 17:56:25 -0600, Bryan Henry 
<[EMAIL PROTECTED]> wrote:

Hello all,

I wrote a small script to rename a few thousand images,
both gif and jpeg... After running the script, none of
the renamed images can be viewed or downloaded.
Trying to download these images from an FTP client fails.
FTP client attempts to download the images PASSIVE-ly
Unaltered images can be downloaded as binary files with
no problem..
I now have over 3000 images I cannot download or view
on our website. What about rename caused this?
Thank you,
Bryan Henry






--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] renamed images are now corrupt...

2004-02-26 Thread Bryan Henry
Here is the script I used to rename images.




foreach ($config as $line) {
 if ( $line == "" ) next($config);
 elseif ( $line == "\n" ) next($config);
 elseif ( strstr($line,"#")) next($config);
 else {
 $value = split(Chr(9),$line);
 $imgs[$value[0]] = $value[1];
 }
 }
foreach ($imgs as $k => $v)	{
	if ((strpos($v,'/s.gif') === FALSE) AND (strpos($v,'noimage') === FALSE) 
AND (strlen(trim($v)) >= 0)) {
		$tmp = split("/",$v);
		$cnt = count($tmp);
		$cnt = $cnt - 1;
		$re = explode(".", $tmp[$cnt]);
		$ext = $re[1];
		$renamed = strtolower($k).".".strtolower($ext);
		if (file_exists("Merchant2/".trim($v)) AND $cnt) {
			rename("Merchant2/".trim($v), "pi/".$renamed);
			$write .= $k.Chr(9)."graphics/0001/".$renamed.Chr(10);
		} else {
			$write .= $k.Chr(9).Chr(10);
			echo $k."";
		}
	} else {
		$write .= $k.Chr(9).Chr(10);
	}
}

fwrite($handle, $write);
fclose($handle);
clearstatcache();
?>
On Thu, 26 Feb 2004 16:21:55 -0800 (PST), Michal Migurski 
<[EMAIL PROTECTED]> wrote:

I wrote a small script to rename a few thousand images, both gif and
jpeg... After running the script, none of the renamed images can be
viewed or downloaded.
I now have over 3000 images I cannot download or view on our website.
What about rename caused this?
Well, on line 5 of your script... oh wait. /Where's your script?/

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] renamed images are now corrupt...

2004-02-26 Thread Bryan Henry


Chmod and file_exists report that the file does not exist,
even though I can view the files via the FTP client.
bryan

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


Re: [PHP] Re: renamed images are now corrupt...

2004-02-26 Thread Bryan Henry
I realized that I did not trim the end line characters off of the file 
extensions
after I grabbed all the file names from a text file. Now all the images 
have
end of line chracters as part of the extension.  I cannot access/edit the 
files
through SHH, PHP or FTP...

Oh well...

bryan





On Fri, 27 Feb 2004 00:01:47 +, Michael Nolan 
<[EMAIL PROTECTED]> wrote:

Check the permissions and ownership of the files, especially if you ran 
the script as some privileged user like root.  chmod or chown can be 
used to changed these.

Mike

Bryan Henry wrote:

Browser and FTP client act as if the image
files do not exist, even though the directory
contents can be views via FTP...
What did I do?
 Bryan




On Thu, 26 Feb 2004 17:56:25 -0600, Bryan Henry 
<[EMAIL PROTECTED]> wrote:

Hello all,

I wrote a small script to rename a few thousand images,
both gif and jpeg... After running the script, none of
the renamed images can be viewed or downloaded.
Trying to download these images from an FTP client fails.
FTP client attempts to download the images PASSIVE-ly
Unaltered images can be downloaded as binary files with
no problem..
I now have over 3000 images I cannot download or view
on our website. What about rename caused this?
Thank you,
Bryan Henry






--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] renamed images are now corrupt...

2004-02-26 Thread Bryan Henry
Hello all,

I wrote a small script to rename a few thousand images,
both gif and jpeg... After running the script, none of
the renamed images can be viewed or downloaded.
Trying to download these images from an FTP client fails.
FTP client attempts to download the images PASSIVE-ly
Unaltered images can be downloaded as binary files with
no problem..
I now have over 3000 images I cannot download or view
on our website. What about rename caused this?
Thank you,
Bryan Henry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php