RE: [PHP-WIN] File-error code?

2007-09-10 Thread Gustav Wiberg
Hi! I have solved the problem, but I just wondered if there were any options. I use @scandir, and when no error occurs then it shows folders from the specified folder in scandir-function. But this doesn't seem like "good" programming practice... ;-) Best regards /Gustav Wiberg -Original

RE: [PHP-WIN] Re: Memory leak occurs when exec() function is used on Windows platform

2007-09-10 Thread Gustav Wiberg
Hi! Can't you just test if the file contains anything, and if it doesn THEN run exec-command? Best regards /Gustav Wiberg -Original Message- From: Melmack [mailto:[EMAIL PROTECTED] Sent: Monday, September 10, 2007 8:17 PM To: php-windows@lists.php.net Subject: [PHP-WIN] Re: Memory le

[PHP-WIN] showing warnings

2007-09-10 Thread Asim
Hi this result is shown by mysql on running command prompt mysql> explain SELECT Tune_Name,Tune_Type FROM Mobile_Tunes; +--+--+---+--+-+--+--+---+ | table| type | possible_keys | key | key_len | ref | rows | Extra | +--

[PHP-WIN] Re: Memory leak occurs when exec() function is used on Windows platform

2007-09-10 Thread Melmack
Thank you for your reply. Unfortunately your method also causes memory leak. I have tested operating system and I have discovered that batch script listed below causes the same memory leak. That is why I think now that it is however not PHP fault but Windows bug. The Windows batch script contains:

Re: [PHP-WIN] File-error code?

2007-09-10 Thread John Mertic
For the most part yes. Please elaborate if there is something particular you are looking for? John On 9/10/07, Gustav Wiberg <[EMAIL PROTECTED]> wrote: > Hi! > > Ok. That is the only option then? > > Best regards > /Gustav Wiberg > > > -Original Message- > From: John Mertic [mailto:[EMAIL

RE: [PHP-WIN] File-error code?

2007-09-10 Thread Gustav Wiberg
Hi! Ok. That is the only option then? Best regards /Gustav Wiberg -Original Message- From: John Mertic [mailto:[EMAIL PROTECTED] Sent: Monday, September 10, 2007 2:10 PM To: Gustav Wiberg; php windows Subject: Re: [PHP-WIN] File-error code? You can use is_file() and is_readable() to

Re: [PHP-WIN] showing warnings

2007-09-10 Thread Asim
Hi i have added index on both columns but still same warning is issued by mysql then what i do now? BYE John Mertic <[EMAIL PROTECTED]> wrote: Is the table 'Mobile_Tunes' indexed at all? If not, you may want to consider adding one at least one 'Tune_Type

Re: [PHP-WIN] showing warnings

2007-09-10 Thread Asim
Hi i have added index on both columns but still same warning is issued by mysql then what i do now John Mertic <[EMAIL PROTECTED]> wrote: Is the table 'Mobile_Tunes' indexed at all? If not, you may want to consider adding one at least one 'Tune_Type' and another on 'Tune_Name'. Joh

Re: [PHP-WIN] showing warnings

2007-09-10 Thread John Mertic
Is the table 'Mobile_Tunes' indexed at all? If not, you may want to consider adding one at least one 'Tune_Type' and another on 'Tune_Name'. John On 9/10/07, Asim <[EMAIL PROTECTED]> wrote: > Hi > > script is following > > if(isset($_GET['SearchTune'])) > { > $tunename = substr($_GET['tune_name

Re: [PHP-WIN] showing warnings

2007-09-10 Thread Asim
Hi script is following if(isset($_GET['SearchTune'])) { $tunename = substr($_GET['tune_name'],0,3); $tunetype = $_GET['tune_type']; $sql = "SELECT Tune_Name,Tune_Type FROM Mobile_Tunes WHERE Tune_Name LIKE '".$tunename."%' AND Tune_Type = '".$tunetype."'"; } else { $sql = "SELE

Re: [PHP-WIN] File-error code?

2007-09-10 Thread John Mertic
You can use is_file() and is_readable() to determine if the file exists and is readable. That's not really getting you any sort of "error code", but it least it helps narrow things down. John On 9/10/07, Gustav Wiberg <[EMAIL PROTECTED]> wrote: > Hi! > > Yes, that's correct. > > Best regards > /G

[PHP-WIN] File-error code?

2007-09-10 Thread Gustav Wiberg
Hi! I test using readfile($filename) and that's ok. When I'm logged in with "incorrect user" I get permission denied... Is there any way of retrieving the "permission denied" code? when using readfile? (or any other error regarding to readfile-function? Best regards /Gustav Wiberg No virus