Problems with copy() on SunOS

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
axis
Forum Newbie
Posts: 2
Joined: Tue Sep 02, 2003 7:50 am

Problems with copy() on SunOS

Post by axis »

Hi
Seems there are some strange behavor.

I simply trying to make
copy ($source, $dest);
It does but only untill the file size do not exceed 4M. If so then it create the file, but cut out all the content above 4 M.
Is it bug or provider trick?

Secondly then I try to make fopen() and fread() large files I got 500

Really it is weird.
User avatar
Stoker
Forum Regular
Posts: 782
Joined: Thu Jan 23, 2003 9:45 pm
Location: SWNY
Contact:

Post by Stoker »

I really have no idea why, perhaps something to do with memory limits of the owning process.. you could try letting the os do it with something like

exec ('/bin/cp '.escapeshellarg($source).' '.escapeshellarg($dest));
axis
Forum Newbie
Posts: 2
Joined: Tue Sep 02, 2003 7:50 am

Safe mode on

Post by axis »

Thanks Stoker
It is a good advice but I'm bounded with safe_mode. May be someone know how to work around the access to shell with safe_mode_on.
Post Reply