php-windows Digest 10 Sep 2007 14:11:37 -0000 Issue 3327
Topics (messages 28461 through 28467):
File-error code?
28461 by: Gustav Wiberg
28462 by: John Mertic
28467 by: Gustav Wiberg
Re: showing warnings
28463 by: Asim
28464 by: John Mertic
28465 by: Asim
28466 by: Asim
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
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 found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.485 / Virus Database: 269.13.12/997 - Release Date: 2007-09-09
10:17
--- End Message ---
--- Begin Message ---
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
> /Gustav Wiberg
>
>
> -----Original Message-----
> From: John Mertic [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 10, 2007 1:55 PM
> To: Gustav Wiberg
> Subject: Re: [PHP-WIN] File-error code?
>
> I guess my question is from where ( HTTP error code, etc ) and what
> choices are you looking for in terms of a sub code ( file not found,
> not readable, etc ).
>
> On 9/10/07, Gustav Wiberg <[EMAIL PROTECTED]> wrote:
> > Permission denied
> >
> > Best regards
> > /Gustav Wiberg
> >
> >
> > -----Original Message-----
> > From: John Mertic [mailto:[EMAIL PROTECTED]
> > Sent: Monday, September 10, 2007 1:30 PM
> > To: Gustav Wiberg
> > Subject: Re: [PHP-WIN] File-error code?
> >
> > Hi,
> >
> > What code are you looking for?
> >
> > John
> >
> > On 9/10/07, Gustav Wiberg <[EMAIL PROTECTED]> wrote:
> > > 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 found in this outgoing message.
> > > Checked by AVG Free Edition.
> > > Version: 7.5.485 / Virus Database: 269.13.12/997 - Release Date:
> > > 2007-09-09 10:17
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> > --
> > --
> > John Mertic "Explaining a joke
> > is like dissecting a frog: you
> > [EMAIL PROTECTED] understand it better,
> > but the frog dies in the
> > process."
> >
> > -Mark Twain
> >
> > No virus found in this outgoing message.
> > Checked by AVG Free Edition.
> > Version: 7.5.485 / Virus Database: 269.13.12/997 - Release Date: 2007-09-09
> > 10:17
> >
> >
> >
> >
>
>
> --
> --
> John Mertic "Explaining a joke
> is like dissecting a frog: you
> [EMAIL PROTECTED] understand it better,
> but the frog dies in the
> process."
>
> -Mark Twain
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.485 / Virus Database: 269.13.12/997 - Release Date: 2007-09-09
> 10:17
>
>
>
>
--
--
John Mertic "Explaining a joke
is like dissecting a frog: you
[EMAIL PROTECTED] understand it better,
but the frog dies in the
process."
-Mark Twain
--- End Message ---
--- Begin Message ---
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 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
> /Gustav Wiberg
>
>
> -----Original Message-----
> From: John Mertic [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 10, 2007 1:55 PM
> To: Gustav Wiberg
> Subject: Re: [PHP-WIN] File-error code?
>
> I guess my question is from where ( HTTP error code, etc ) and what
> choices are you looking for in terms of a sub code ( file not found,
> not readable, etc ).
>
> On 9/10/07, Gustav Wiberg <[EMAIL PROTECTED]> wrote:
> > Permission denied
> >
> > Best regards
> > /Gustav Wiberg
> >
> >
> > -----Original Message-----
> > From: John Mertic [mailto:[EMAIL PROTECTED]
> > Sent: Monday, September 10, 2007 1:30 PM
> > To: Gustav Wiberg
> > Subject: Re: [PHP-WIN] File-error code?
> >
> > Hi,
> >
> > What code are you looking for?
> >
> > John
> >
> > On 9/10/07, Gustav Wiberg <[EMAIL PROTECTED]> wrote:
> > > 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 found in this outgoing message.
> > > Checked by AVG Free Edition.
> > > Version: 7.5.485 / Virus Database: 269.13.12/997 - Release Date:
> > > 2007-09-09 10:17
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> > --
> > --
> > John Mertic "Explaining a joke
> > is like dissecting a frog: you
> > [EMAIL PROTECTED] understand it better,
> > but the frog dies in the
> > process."
> >
> > -Mark Twain
> >
> > No virus found in this outgoing message.
> > Checked by AVG Free Edition.
> > Version: 7.5.485 / Virus Database: 269.13.12/997 - Release Date: 2007-09-09
> > 10:17
> >
> >
> >
> >
>
>
> --
> --
> John Mertic "Explaining a joke
> is like dissecting a frog: you
> [EMAIL PROTECTED] understand it better,
> but the frog dies in the
> process."
>
> -Mark Twain
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.485 / Virus Database: 269.13.12/997 - Release Date: 2007-09-09
> 10:17
>
>
>
>
--
--
John Mertic "Explaining a joke
is like dissecting a frog: you
[EMAIL PROTECTED] understand it better,
but the frog dies in the
process."
-Mark Twain
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.485 / Virus Database: 269.13.12/997 - Release Date: 2007-09-09
10:17
--- End Message ---
--- Begin Message ---
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 = "SELECT Tune_Name,Tune_Type FROM Mobile_Tunes";
}
...........................................................................
function max_page($sql,$total_rows,$rows_per_page,$max_pages)
{
$all_rs = mysql_query($sql);
if(!$all_rs)
{
echo "Sorry! Try again.";
return false;
}
$total_rows = mysql_num_rows($all_rs);
mysql_free_result($all_rs);
//mysql_close($link);
$max_pages = ceil($total_rows/$rows_per_page);
return $max_pages;
}
when i use this function it shows following warning
Warning: mysql_query(): Your query requires a full tablescan (table
Mobile_Tunes, 5 rows affected). Use EXPLAIN to optimize your query. in
D:\Program Files\Apache Group\Apache2\htdocs\Breez\mtunes_main.php on line 47
now can you tell me some solution
bye
John Mertic <[EMAIL PROTECTED]> wrote:
Can you provide the script you are running and the exact error message
you are getting?
John
On 9/9/07, Asim wrote:
> Hi
>
>
> in my script when i scan whole table for result set to display in my page it
> shows warning that suggest me to use
>
>
> EXPLAIN statement but i donot need it as i have to show records on page
>
> how to avoid this warning?
>
> Bye
>
>
>
>
>
>
>
>
> Asim Jamil - 0092 345 4025907, Pakistan
>
> ---------------------------------
> Be a better Globetrotter. Get better travel answers from someone who knows.
> Yahoo! Answers - Check it out.
--
--
John Mertic "Explaining a joke
is like dissecting a frog: you
[EMAIL PROTECTED] understand it better,
but the frog dies in the
process."
-Mark Twain
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Asim Jamil - 0092 345 4025907, Pakistan
---------------------------------
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out.
--- End Message ---
--- Begin Message ---
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'],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 = "SELECT Tune_Name,Tune_Type FROM Mobile_Tunes";
> }
>
> ...........................................................................
>
> function
> max_page($sql,$total_rows,$rows_per_page,$max_pages)
> {
> $all_rs = mysql_query($sql);
> if(!$all_rs)
> {
> echo "Sorry! Try again.";
> return false;
> }
> $total_rows = mysql_num_rows($all_rs);
> mysql_free_result($all_rs);
> //mysql_close($link);
> $max_pages = ceil($total_rows/$rows_per_page);
> return $max_pages;
> }
>
>
> when i use this function it shows following warning
>
> Warning: mysql_query(): Your query requires a full tablescan (table
> Mobile_Tunes, 5 rows affected). Use EXPLAIN to optimize your query. in
> D:\Program Files\Apache
> Group\Apache2\htdocs\Breez\mtunes_main.php on line 47
>
>
>
> now can you tell me some solution
>
> bye
>
>
>
>
>
>
>
>
>
>
>
>
>
> John Mertic <[EMAIL PROTECTED]> wrote:
> Can you provide the script you are running and the exact error message
> you are getting?
>
> John
>
> On 9/9/07, Asim wrote:
> > Hi
> >
> >
> > in my script when i scan whole table for result set to display in my page
> it shows warning that suggest me to use
> >
> >
> > EXPLAIN statement but i donot need it as i have to show records on page
> >
> > how to avoid this warning?
> >
> > Bye
> >
> >
> >
> >
> >
> >
> >
> >
> > Asim Jamil - 0092 345 4025907, Pakistan
> >
> > ---------------------------------
> > Be a better Globetrotter. Get better travel answers from someone who
> knows.
> > Yahoo! Answers - Check it out.
>
>
> --
> --
> John Mertic "Explaining a joke
> is like dissecting a frog: you
> [EMAIL PROTECTED] understand it better,
> but the frog dies in the
> process."
>
> -Mark Twain
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
> Asim Jamil - 0092 345 4025907, Pakistan
>
> ________________________________
> Be a better Heartthrob. Get better relationship answers from someone who
> knows.
> Yahoo! Answers - Check it out.
>
>
--
--
John Mertic "Explaining a joke
is like dissecting a frog: you
[EMAIL PROTECTED] understand it better,
but the frog dies in the
process."
-Mark Twain
--- End Message ---
--- Begin Message ---
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'.
John
On 9/10/07, Asim wrote:
> 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 = "SELECT Tune_Name,Tune_Type FROM Mobile_Tunes";
> }
>
> ...........................................................................
>
> function
> max_page($sql,$total_rows,$rows_per_page,$max_pages)
> {
> $all_rs = mysql_query($sql);
> if(!$all_rs)
> {
> echo "Sorry! Try again.";
> return false;
> }
> $total_rows = mysql_num_rows($all_rs);
> mysql_free_result($all_rs);
> //mysql_close($link);
> $max_pages = ceil($total_rows/$rows_per_page);
> return $max_pages;
> }
>
>
> when i use this function it shows following warning
>
> Warning: mysql_query(): Your query requires a full tablescan (table
> Mobile_Tunes, 5 rows affected). Use EXPLAIN to optimize your query. in
> D:\Program Files\Apache
> Group\Apache2\htdocs\Breez\mtunes_main.php on line 47
>
>
>
> now can you tell me some solution
>
> bye
>
>
>
>
>
>
>
>
>
>
>
>
>
> John Mertic wrote:
> Can you provide the script you are running and the exact error message
> you are getting?
>
> John
>
> On 9/9/07, Asim wrote:
> > Hi
> >
> >
> > in my script when i scan whole table for result set to display in my page
> it shows warning that suggest me to use
> >
> >
> > EXPLAIN statement but i donot need it as i have to show records on page
> >
> > how to avoid this warning?
> >
> > Bye
> >
> >
> >
> >
> >
> >
> >
> >
> > Asim Jamil - 0092 345 4025907, Pakistan
> >
> > ---------------------------------
> > Be a better Globetrotter. Get better travel answers from someone who
> knows.
> > Yahoo! Answers - Check it out.
>
>
> --
> --
> John Mertic "Explaining a joke
> is like dissecting a frog: you
> [EMAIL PROTECTED] understand it better,
> but the frog dies in the
> process."
>
> -Mark Twain
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
> Asim Jamil - 0092 345 4025907, Pakistan
>
> ________________________________
> Be a better Heartthrob. Get better relationship answers from someone who
> knows.
> Yahoo! Answers - Check it out.
>
>
--
--
John Mertic "Explaining a joke
is like dissecting a frog: you
[EMAIL PROTECTED] understand it better,
but the frog dies in the
process."
-Mark Twain
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Asim Jamil - 0092 345 4025907, Pakistan
---------------------------------
Boardwalk for $500? In 2007? Ha!
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
--- End Message ---
--- Begin Message ---
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' and another on
'Tune_Name'.
John
On 9/10/07, Asim wrote:
> 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 = "SELECT Tune_Name,Tune_Type FROM Mobile_Tunes";
> }
>
> ...........................................................................
>
> function
> max_page($sql,$total_rows,$rows_per_page,$max_pages)
> {
> $all_rs = mysql_query($sql);
> if(!$all_rs)
> {
> echo "Sorry! Try again.";
> return false;
> }
> $total_rows = mysql_num_rows($all_rs);
> mysql_free_result($all_rs);
> //mysql_close($link);
> $max_pages = ceil($total_rows/$rows_per_page);
> return $max_pages;
> }
>
>
> when i use this function it shows following warning
>
> Warning: mysql_query(): Your query requires a full tablescan (table
> Mobile_Tunes, 5 rows affected). Use EXPLAIN to optimize your query. in
> D:\Program Files\Apache
> Group\Apache2\htdocs\Breez\mtunes_main.php on line 47
>
>
>
> now can you tell me some solution
>
> bye
>
>
>
>
>
>
>
>
>
>
>
>
>
> John Mertic wrote:
> Can you provide the script you are running and the exact error message
> you are getting?
>
> John
>
> On 9/9/07, Asim wrote:
> > Hi
> >
> >
> > in my script when i scan whole table for result set to display in my page
> it shows warning that suggest me to use
> >
> >
> > EXPLAIN statement but i donot need it as i have to show records on page
> >
> > how to avoid this warning?
> >
> > Bye
> >
> >
> >
> >
> >
> >
> >
> >
> > Asim Jamil - 0092 345 4025907, Pakistan
> >
> > ---------------------------------
> > Be a better Globetrotter. Get better travel answers from someone who
> knows.
> > Yahoo! Answers - Check it out.
>
>
> --
> --
> John Mertic "Explaining a joke
> is like dissecting a frog: you
> [EMAIL PROTECTED] understand it better,
> but the frog dies in the
> process."
>
> -Mark Twain
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
> Asim Jamil - 0092 345 4025907, Pakistan
>
> ________________________________
> Be a better Heartthrob. Get better relationship answers from someone who
> knows.
> Yahoo! Answers - Check it out.
>
>
--
--
John Mertic "Explaining a joke
is like dissecting a frog: you
[EMAIL PROTECTED] understand it better,
but the frog dies in the
process."
-Mark Twain
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Asim Jamil - 0092 345 4025907, Pakistan
---------------------------------
Need a vacation? Get great deals to amazing places on Yahoo! Travel.
--- End Message ---