php-windows Digest 29 Jun 2001 15:45:49 -0000 Issue 633 Topics (messages 8100 through 8105): What does this error mean? 8100 by: Jimi Malcolm 8101 by: Jimi Malcolm GDlib and PDF 8102 by: Randall Barber Problem with crypt() 8103 by: Alexandre Meslin Re: gd/apache1.3/WinNT 8104 by: Charlotte Owen Re: yet another http server for PHP 8105 by: Ruslan Ohitin 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] ----------------------------------------------------------------------
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 "<B><FONT 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
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 "<B><FONT 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
Hi there, What I am about to describe was working at one point in the past, and for some reason has stopped. Because it was working, I don't think its PHP. I'll ask here at any rate. I have a page displays a form to the user. The information on this form is then used to generate a PDF file with GDlib. Once the file is create, the script opens, and then I use the header() and passthru() commands to: first, tell the browser its an application/pdf mime type, and then to shove the info down the stream. The problem I'm getting is that the Adobe slash screen comes up and initializes, but then the file never shows. When I go and open the file by hand, it loads into Acrobat without mishap. So, 1) The file is being created properly. 2) Adobe IS being loaded properly. 3) It appears the PASSTHRU is dieing on me prematurely. Anyone else had troubles with this? Comments PLEASE... I really like what I had going and now it just plum doesn't do anything. <sigh>. Partial code follows: ----------------------------------------------------------------------------------------------- ///////////////////////////////////////////////////////// // Print PREPAID ///////////////////////////////////////////////////////// if($prepaid == "1") { pdf_show_xy($pdf, "Enclose prepaid return", 396-(pdf_stringwidth($pdf, "Enclose prepaid return")+27), 509); } ////////////////////////////////////////////////////////// // End the document ////////////////////////////////////////////////////////// pdf_end_page($pdf); pdf_close($pdf); fclose($fp); ////////////////////////////////////////////////////////// // Display the file to the user ////////////////////////////////////////////////////////// header("Content-type: application/pdf"); $fp = fopen($Name.".pdf", "r"); fpassthru($fp); fclose($fp); /////////////////////////////////////////////////////////// // Delete the file from the web server /////////////////////////////////////////////////////////// unlink($Name.".pdf"); } ?>
Hi, I'm using PHP version 4.0.7-dev from www.php4win.de and when I try to use crypt() function I receive this error message: Warning: crypt() is not supported in this PHP build in D:\Meus documentos\CURSOS\Programacao de Computadores\WebII\PHP\Exemplos_PHP\crypt.php on line 10 Do you know how to fix this? Thanks in advanced Meslin -- _______________________________________________ Get your free email from http://mymail.altavista.com
Hey, I encountered a very similar error when using W98, Xitami, and PHP 4.0.6. Everything worked fine until I installed the GD extension [trying to follow a tutorial example]. Suddenly the server started refusing to load PHP scripts, instead sitting there doing nothing for however long it took you to give up and stop the page loading. Removed GD and everything was fine. Hmmm. Charlie. -- "Severely edited life history..." Talk baby, talk! - 07968 443136 Her home - http://www.bondgrrl.com Type words - [EMAIL PROTECTED] ----- Original Message ----- From: Edmund <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 28, 2001 3:37 AM Subject: Re: [PHP-WIN] gd/apache1.3/WinNT > For me, it was pretty much a trial and error. I at first had most of > the > dll's included in the php.ini file (ie. extension=php_??.dll > uncommented). > Then I encountered the error, so I took out all of the extensions and > it worked. After a bit of trial and error, I discovered that if I > included php_gd.dll, the Apache server dumped an Internal server error. > If I commented it out, the Apache server worked. So enabling those > extensions that I needed (except gd), everything worked.
Hello Masato, Yes! It works on my office computer! :-) But I use .htaccess files and my home os is Win98 :-( -- Best regards, Ruslan Ohitin mailto:[EMAIL PROTECTED] MK> Hello PHP users, MK> I believe many people on this list run their PHP scripts MK> on IIS or Win32 Apache. I have released yet another HTTP server MK> that I belive is well suited for running PHP programs. MK> The program is still in development quality but I'd appreciate MK> any comments from PHP users here. MK> Orenosv HTTP server MK> http://hp.vector.co.jp/authors/VA027031/orenosv/index_en.html MK> Thank you MK> Masato