RE: [PHP] What does this error mean

2002-09-22 Thread Daniel Kushner

Hi Randy,

It means that you are calling the function without the right amount of
parameters. The function mysql_query expects at least 1 (one) paramter:
the query String.
http://www.php.net/manual/en/function.mysql-query.php

Regards,
Daniel Kushner

Need hosting? http://thehostingcompany.us




-Original Message-
From: Randy Johnson [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, September 22, 2002 2:26 PM
To: Paul Nicholson; Bryan McLemore; PHP GEN LIST
Subject: [PHP] What does this error mean


What does this error mean?

Warning: Wrong parameter count for mysql_query() 


Thanks

Randy



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





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




Re: [PHP] What does this error mean

2002-09-22 Thread Randy Johnson

I found out what it was:

I mispelled a column in the insert statement.  it actually had nothing to do
with the parameters passed to the function  i passed $query and $link and
once i spelled the column right it went through just fine.   why would it
not just tell me that the column did not exist?

Randy
- Original Message -
From: Daniel Kushner [EMAIL PROTECTED]
To: 'Randy Johnson' [EMAIL PROTECTED]; 'Paul Nicholson'
[EMAIL PROTECTED]; 'Bryan McLemore' [EMAIL PROTECTED]; 'PHP
GEN LIST' [EMAIL PROTECTED]
Sent: Sunday, September 22, 2002 2:34 PM
Subject: RE: [PHP] What does this error mean


 Hi Randy,

 It means that you are calling the function without the right amount of
 parameters. The function mysql_query expects at least 1 (one) paramter:
 the query String.
 http://www.php.net/manual/en/function.mysql-query.php

 Regards,
 Daniel Kushner
 
 Need hosting? http://thehostingcompany.us




 -Original Message-
 From: Randy Johnson [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, September 22, 2002 2:26 PM
 To: Paul Nicholson; Bryan McLemore; PHP GEN LIST
 Subject: [PHP] What does this error mean


 What does this error mean?

 Warning: Wrong parameter count for mysql_query()


 Thanks

 Randy



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





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




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




Re: [PHP] What does this error mean?

2001-06-30 Thread infoz

The user the web server runs as (often 'nobody') does not have write access
to the logs directory.

- Tim
  http://www.phptemplates.org

- Original Message -
From: Jimi Malcolm [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 28, 2001 3:17 PM
Subject: [PHP] What does this error mean?


 I'm trying to from a file in a directory called 'logs'.  I've never seen
 this error before.  What does it mean?

 ERROR
 Warning: fopen(logs/993700800.log,w+) - Permission denied in
 /home/sites/site20/users/guide/web/counter.php on line 28



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] What does this error mean?

2001-06-30 Thread scott [gts]

it means that the script doesn't have write permission
to write the logs/993700800.log file... most probably
the directory or the file itself are not owned by the
webserver user.

it also looks like the authour of the script did a real
shoddy job of checking for errors, and tried to pass
the invalid file descriptor to other functions.
(which is what those next two errors are about)

one more reason why people *need* to put in error
handling code on *all* file or network operations.

to fix this the quick-n-dirty way, set correct
permissions on the 'logs' directory.

to fix this the correct way, first put some error
handling in the script, then set file permissions ;)



 -Original Message-
 From: Jimi Malcolm [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 28, 2001 3:17 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] What does this error mean?
 
 
 I'm trying to from a file in a directory called 'logs'.  I've never seen
 this error before.  What does it mean?
 
 ERROR
 Warning: fopen(logs/993700800.log,w+) - Permission denied in
 /home/sites/site20/users/guide/web/counter.php on line 28
 
 Warning: Supplied argument is not a valid File-Handle resource in
 /home/sites/site20/users/guide/web/counter.php on line 29
 
 Warning: Supplied argument is not a valid File-Handle resource in
 /home/sites/site20/users/guide/web/counter.php on line 30
 1
 END
 
 The last two errors are becuase the first fails to return a file handle.
 Here's the actual offending code.  It's just a simple counter.
 
 CODE
 ?PHP
 $iDate = mktime(0, 0, 0, date(m), date(d), date(Y));
 $iCount = 1;
 $sFile = logs/.$iDate..log;
 
 if (file_exists($sFile)) {
  $iCount = incCount($sFile);
 } else {
  createCountLog($sFile);
 }
 
 echo BFONT COLOR=BLUE$iCount/FONR/B;
 
 function incCount($sFile) {
  // Open and read existing count
  $hCounter = fopen($sFile, r);
  $iCount = fgets($hCounter, 1024);
  fclose($hCounter);
  // Write over it with the new count
  $hCounter = fopen($sFile, w);
  fputs($hCounter, ++$iCount);
  fclose($hCounter);
  return $iCount;
 }
 
 
 function createCountLog($sFile) {
  $hCounter = fopen($sFile, w+);
  fputs($hCounter, 1);
  fclose($hCounter);
 }
 
 ?
 END
 
 Usually I've been able to fix every PHP error I've gotten in the past -
 they've been pretty straightforward - but I've been playing around with this
 error for a few days now to no avail.
 
 I'm new to this mailing list and have never used it before so I'm not sure
 which one/s to join or post this specific message to.  I apologize if this
 is the wrong forum for this type of question.  Thank you for your time.
 
 --
 Jimi Malcolm
 Web Content Manager
 inburst Internet Media
 inburst.com
 jimi.malcolm@inburst
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] What does this error mean?

2001-06-30 Thread Mark Roedel

 -Original Message-
 From: Jimi Malcolm [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 28, 2001 2:17 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] What does this error mean?
 
 
 I'm trying to from a file in a directory called 'logs'.  I've 
 never seen
 this error before.  What does it mean?
 
 ERROR
 Warning: fopen(logs/993700800.log,w+) - Permission denied in
 /home/sites/site20/users/guide/web/counter.php on line 28

If this is a file that already exists, your script does not have
permission to write to it.  (Check file permissions.)

If the file doesn't already exist, your script does not have permission
to create a file in that location.  (Check directory permissions.)

In both cases, keep in mind that the script is most likely running as
whatever userID the web server runs as (commonly 'nobody'), not as your
own userID.  Make sure file and directory permissions are set
accordingly.


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]