Re: [PHP] Re: Can't Delete File Using Unlink

2005-04-11 Thread Maerlyn
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
 
John Nichel wrote:

 Ahmed Abdel-Aliem wrote: snip

 $dest = $dest_dir . '/' .$this-File['name']; $r =
 move_uploaded_file($this-File['tmp_name'], $dest);
 $this-File_Name = $this-File['name'];
 chmod(files/.$this-File_Name, 777);


 I haven't messed with PHP/Apache on Windows in a long time but two
 things stick out to me that _may_ be a part of your issue.

 a) Can you even chmod on Windows? b) Paths in the MS world are
 with the backslash (\) and not the forward slash (/)

a, chmod doesn't work in Windows, but if you have NTFS then you can
set privileges.
b, Windows NT and later versions unterstand both / and \

Maerlyn

- --
Maerlyn
maerlyn[AT]citromail[DOT]hu
http://putraware.ini.hu
GnuPG Public Key ID: 0x0CE0A57
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
 
iD8DBQFCWsodMkyacQzgalcRAvtqAKCJjy0rUVykpsmzJRyUA1cfkdHMxwCgwjkl
72boetSgh8V5gdK5QuPS9Gw=
=XQgB
-END PGP SIGNATURE-

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



Re: [PHP] insert mysql data with safe mode on problem

2005-04-07 Thread Maerlyn
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
 
Chris wrote:

 I've been using a php script which loads a large (approximately
 40,000 records) data file into a mysql table. In the event that
 MySql's LOAD DATA INFILE capability is disabled, the script loads
 each record individually. The problem I'm facing is trying to run
 this script on a server which has safe mode enabled. Under safe
 mode the default script execution time is usually 30 seconds, and
 to process 40,000 records requires about 2-3 minutes.

 I'm now faced with a situation where I can't load the entire data
 file and wondered if anybody else has encountered this problem.

 Also, the following conditions are NOT available as an option. 1 -
 use phpmyadmin 2 - increase the script execution time in php.ini
 (set_time_limit doesn't work in safe mode) 3 - enable LOAD DATA
 INFILE by granting the MySql File_priv

You might make the script recursive, it processes for example 1000
records, then it calls itself to process the next 1000 records, and so
on until all the records are processed. You only have to add one post
or get variable.

- --
Maerlyn
maerlyn[AT]citromail[DOT]hu
http://putraware.ini.hu
GnuPG Public Key ID: 0x0CE0A57
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
 
iD8DBQFCVTwDMkyacQzgalcRAo/+AKDXdFsGH8N2xu+CmFM+zdRn+9ZogwCg6skf
EWGgp1IyweJiZaz785AYZJU=
=+H4V
-END PGP SIGNATURE-

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