php-windows Digest 9 Mar 2001 16:06:07 -0000 Issue 482 Topics (messages 5892 through 5912): ImageJpeg 5892 by: Barry CGI error? 5893 by: OoCobra97.aol.com Newbie: Help on mySQL !!! 5894 by: Mujahid what does this error message mean 5895 by: James Makunike HELP ON IIS4 & PHP4.0.4pl1 5896 by: Florian Poizac 5897 by: Mangiola Nunzio Datavia 5900 by: Phil Driscoll 5911 by: Florian Poizac png creation 5898 by: 0000051 Re: [PHP] Problem using readfile 5899 by: Fernando Madruga Re: gdImageColorAllocate(), self-explained 5901 by: Fernando Madruga PHP and IIS5 5902 by: Jimmy 5903 by: Phil Driscoll Strip text from HTML 5904 by: Mangiola Nunzio Datavia GD image error: Unable to Open Temp File 5905 by: John E. Haag Echoed Status and Content-type Problem 5906 by: Charles Williams \( CEO ACNS \) 5907 by: Vladimir V. Bashkirtsev 5908 by: Charles Williams \( CEO ACNS \) 5909 by: Vladimir V. Bashkirtsev Grabbing a Win2K username... 5910 by: Evan Roberts Help? GD Lib w/Win NT 4 Installing.......... 5912 by: Schollnick, Benjamin 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] ----------------------------------------------------------------------
Hello, I am using PHP 4.04 for windows as a cgi with the Website 2.5.8 server. I would like to resize some JPEG images. I see the int imagejpeg (int im [, string filename [, int quality]]) function to write a file. But the "quality" is not described in the manual I have. 1) Are the "Image" functions available in PHP 4.04 for win? Do I need to do anything special to use them? Is there a way to tell which if not all of the functions in the manual are actually available? 2) What is the quality range? Are higher numbers better quality/less compression? 3) Has anyone used these functions in PHP 4.04 Win? Thanks, Barry.
Hello everyone, This may be a simple answer, but ive looked through php.net and apache.org. I have both ISS5 and Apache on my windows 2000 machine. IIS5 has a setting under the extention mappings that let the server check if a file exists before sending it to the php executable...that way I get a 404 not found error instead of CGI Error: ect... Is there a setting similar to this that I can set in apache or php. I simply want a 404 errordocument to be shown if a php file is not on my server instead of the current CGI Error (in apache). Thanks for any help! ~Jeff
Hi, I been working on PHP/MySQL on Windows and to run some database script on MySQL, at the DOS command prompt I say >> mysql -u root -p < myscript.txt to run my script of inserts. Can anybody help me with an equlent at linux prompt ? TIA --
Cannot find module (IP-MIB): At line 0 in (none) Cannot find module (IF-MIB): At line 0 in (none) Cannot find module (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB): At line 0 in (none) Cannot find module (SNMPv2-MIB): At line 0 in (none) Cannot find module (SNMPv2-SMI): At line 0 in (none)
I had intall php with automated installation (CGI). I have a probleme on configuring php. it seem he can't read php.ini so i can't load library, change session file directory ... but i copy php.ini in c:\winnt, c:\winnt\system, c:\winnt\system32 Can anyone help me Thanks in advance
Did you read the install.txt and set up IIS4.0 to see the php.exe? > ---------- > From: Florian Poizac[SMTP:[EMAIL PROTECTED]] > Sent: Friday, March 09, 2001 10:32 AM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] HELP ON IIS4 & PHP4.0.4pl1 > > I had intall php with automated installation (CGI). > I have a probleme on configuring php. it seem he can't read php.ini so i > can't load library, change session file directory ... > but i copy php.ini in c:\winnt, c:\winnt\system, c:\winnt\system32 > > Can anyone help me > > Thanks in advance >
php.ini should be in c:\winnt, and nowhere else - otherwise it's anybody's guess which one will get used! Get rid of any copies you have made elsewhere, and then check that the php.ini in c:\winnt has read access for IUSR_<machinename>. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org
Thanks for your reponse I add total control for the system,admin,all the world to php.ini but this is again the same probleme So my WinNt install directory is c:\winnt.sbs does it can be the prob Cheers ----- Original Message ----- From: Phil Driscoll <[EMAIL PROTECTED]> To: Florian Poizac <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, March 09, 2001 11:13 AM Subject: Re: [PHP-WIN] HELP ON IIS4 & PHP4.0.4pl1 > php.ini should be in c:\winnt, and nowhere else - otherwise it's anybody's > guess which one will get used! Get rid of any copies you have made > elsewhere, and then check that the php.ini in c:\winnt has read access for > IUSR_<machinename>. > > Cheers > -- > Phil Driscoll > Dial Solutions > +44 (0)113 294 5112 > http://www.dialsolutions.com > http://www.dtonline.org > > > > -- > PHP Windows 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] > >
how can I compile PHP with GD library of image functions. png creation outputs empty box
What are the contents of $type? When opening the file directly, the browser will probably use the specified $type information, as opposed to the explorer using the file extension when the user saves it to disk, so the problem may be that $type is not correct... ;) HTH, Fernando Madruga -----Original Message----- From: Matias Pelenur [mailto:[EMAIL PROTECTED]] Sent: quarta-feira, 7 de Março de 2001 17:15 To: [EMAIL PROTECTED] Subject: Re: [PHP] Problem using readfile Well, I tried using different code (from a newer message by Mukul Sabharwal): header("Content-length: $size"); header("Content-type: $type"); $fp = fopen($actualfile, 'rb') or print('Could not open file!'); $read = fread($fp, $size) or print('Could not read file'); print($read); and this seems to work better, that is, files are download correctly. However, there is a strange behavior, at least with IE5, which I don't know if it's a bug on IE5 or not... When I click on a file, if I choose "save to disk" it works fine, but if I choose "Open from current location" it doesn't work. Anyone have any ideas on this? --Matias ""Matias Pelenur"" <[EMAIL PROTECTED]> wrote in message news:983od5$oc8$[EMAIL PROTECTED]... > Hi, > I'm trying to use readfile to send a file to the browser. The code I'm using > is: > > header("Content-length: $size"); > header("Content-type: $type"); > header("Content-disposition: attachment;filename=$filename"); > readfile($filename); > > It works fine for very small files, but for larger files it seems to send > only the first 600 bytes and then hang... I tried with both IE and Netscape > and > have the same problem. > > I'm using Apache 1.3.14 and PHP/4.0.4pl1 on Win2000 (using the PHP module > for Apache) > > Any hints appreciated. Thanks! > --Matias > > If you reply via email, please remove the -nospam- from the address. > > > > > > -- > 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] >
I don't think its an 'inexplicable' limitation... AFAIK, the gif file format is a palette-based file format, and it is limited to 256 colors... If the library was designed to create gif files, it should have the same limitations as the generated file format... Yours truly, Fernando Madruga -----Original Message----- From: Giuseppe D'Ambrosio [mailto:[EMAIL PROTECTED]] Sent: quinta-feira, 8 de Março de 2001 12:19 To: [EMAIL PROTECTED] Subject: gdImageColorAllocate(), self-explained ok, it seems the normal behaviour (but IMHO also an ugly, inexplicable limitation); you can read it on http://www.boutell.com/gd/#gdImageColorAllocate "In the event that all gdMaxColors colors (256) have already been allocated, gdImageColorAllocate will return -1 to indicate failure" (I didn't test the return code of gdImageColorAllocate() and so it's my fault) Giuse /--------------------------------\ | http://boltthrower.webhop.org/ | \--------------------------------/
Since we installed PHP on our webserve the Internet Service Manager take ages to start. This also occurs when we try to show properties for a file in the file system. Does anyone knows what the problem might be, and how i do to fix this?
If you've installed php as an ISAPI module, you could try installing it as a cgi instead (change script mappings from php4isapi.dll to php.exe and remover php4isapi.dll from the filters list). The cgi version is only run on demand so it can't possibly interfere with the management console. If you still have the same symptoms after doing this, then it's got nothing to do with php. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org
Hi I'd like to strip the first paragraph of a html document and display it. basically the introduction and no more. Is this possible?
Hi all, I have been using PHP for a long time, but have very little experience under Windows. I am also *not* the system admin for the box where PHP is running...but will pass along whatever you folks can offer... GD functionality is installed with PHP 4.0.4 pl1 running on an NT box. However, when I try to create an image, of any kind, I get: <b>Warning</b>: imagepng: unable to open temporary file in <b>c:\inetpub\wwwroot\jhaag\outreach\image_test.php</b> on line <b>11</b><br> Any ideas?? Is this a permission settings problem? Where is GD TRYING to create the image? I don't have control of that from within the script do I? Thanks in advance! - John E. Haag O N E P O W E R F U L C L I C K All4one Search Machine http://www.all4one.com All4one Submission Machine http://www.all4one.com/all4submit (614) 575-9897
Hey all, I have a weird problem here that maybe somebody out there can shed some light on. If you go to this URL: http://www.acns-online.com/chuck/stories/op/storiesView/sid/3/ you will notice at the top of the page the following output: Status: 200 OK Content-type: text/html This should not be there. There is a header() call in the redir.php3 script as follows: <snip> header("Status: 200 OK"); </snip> Why is this echoing on the browser screen? Also, the Content-type: text/html is nowhere in the scripts and still being echoed. Chuck ============================================== Charles Williams (Owner) Accent Computer & Network Services Markt 2 D-95679 Waldershof Tel: +49 (0) 9231 972670 Fax: +49 (0) 9231 972671 http://www.acns-online.com GB/CS/O/U d-- -p+ c+++ l++ u- e+ m+ s++/ !n h---- f !g w++ t+ r x** ============================================== **************Email Confidentiality Footer************** The information contained in this email and any attachments is intended for the named recipients only. It may contain privileged and confidential information and if you are not the intended recipient, you must not copy, distribute or take any action in reliance on it. If you have received this email in error, please return it to the originator advising of the error and delete all copies from your system.
> This should not be there. There is a header() call in the redir.php3 script > as follows: > > <snip> > header("Status: 200 OK"); > </snip> > > Why is this echoing on the browser screen? Also, the Content-type: > text/html is nowhere in the scripts and still being echoed. Because script redir.php3 must not have header command... Same header is generated by web server. Thus browser really receives such header twice - first used to control page contents and second one become page contents. If you will check page contents you will find this header before <html> tag... Vladimir
----- Original Message ----- From: "Vladimir V. Bashkirtsev" <[EMAIL PROTECTED]> To: "Charles Williams ( CEO ACNS )" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "Linuxsa" <[EMAIL PROTECTED]>; "Cobalt Users Group" <[EMAIL PROTECTED]>; "Apache Server mailing list" <[EMAIL PROTECTED]> Sent: Friday, March 09, 2001 3:28 PM Subject: Re: Echoed Status and Content-type Problem > > This should not be there. There is a header() call in the redir.php3 > script > > as follows: > > > > <snip> > > header("Status: 200 OK"); > > </snip> > > > > Why is this echoing on the browser screen? Also, the Content-type: > > text/html is nowhere in the scripts and still being echoed. > > Because script redir.php3 must not have header command... Same header is > generated by web server. Thus browser really receives such header twice - > first used to control page contents and second one become page contents. If > you will check page contents you will find this header before <html> tag... > Vladimir, Not quite true but close. In PHP you can send the header if you want. You don't have to but you can. However, in this case it doesn't seem to be working right. I have many other PHP scripts with the same line of code and it works fine. I just can't figure out why not here. Chuck
> > Because script redir.php3 must not have header command... Same header is > > generated by web server. Thus browser really receives such header twice - > > first used to control page contents and second one become page contents. > If > > you will check page contents you will find this header before <html> > tag... > > > > Vladimir, > > Not quite true but close. In PHP you can send the header if you want. You > don't have to but you can. However, in this case it doesn't seem to be > working right. I have many other PHP scripts with the same line of code and > it works fine. I just can't figure out why not here. > > Chuck Sorry... I'm slightly sleepy and it's hard for me to explain what I exactly mean now... :) When Apache starts script on server it expect content-type header from script. If script will return something else which Apache cannot understand then you will get error from Apache. So your script actually generate this header twice. See for yourself by running this script from shell - you will get two headers instead of one. Vladimir
Hey all, Here's sort of a weird off-the-wall question: Our network is primarily Win2K. Being in the purchasing department, I have created a form that will allow employees to fill out what they want and submit it, which then sends it as an email to their manager for approval. This takes a lot of work out of my hands since I don't have to run around anymore... The only problem is that they have to pull their name down from a menu, and this means that they could "spoof" names and give me a hassle... I have already thought about creating a log in script, but that takes away from the ease-of-use that I am striving for (lots of newbies here)... So, I was wondering if there was a way to grab the username of the user logged into that station, sort of along the lines of what "$REMOTE_ADDR" does... I can backtrack with an nslookup since this is a Linux machine, but it gives me the domain, not the username, and people tend to log into different computers from time to time, so that wouldn't work in determining who it is... If anyone has any idea of what I am talking about, please give me a heads up if this is possible or not... :-) Thanks for your time! Evan Roberts.
Folks, I just checked and this isn't in the faq, and I can't seem to figure this one out on my own... I'm evaluating DCL (Double Choco Latte) for use at work, and some of it's features require the GD Library... I can't seem to find: 1) How to "install" GD Lib into PHP....the GD Lib page has some precompiled kits for other languages, but nothing listed for PHP. 2) I can't find a Win32 (NT 4) precompiled library package.... While I do some programming, I don't have the inclination to do my own port of GD, nor do I have a C/C++ compiler handy to make it. So can anyone help straighten me out here? Am I missing something obvious? - Benjamin