php-windows Digest 16 Aug 2001 09:17:10 -0000 Issue 705 Topics (messages 8884 through 8897): Problem with a socket in non-blockant state 8884 by: Cerel Re: how to show image from mssql server 8885 by: TopDog Re: Why am I getting a CGI error? 8886 by: Steve \"Neo Cerberus\" Juhnke Network Documents 8887 by: Thomas Davis 8888 by: Paul Smith 8889 by: CJD 8890 by: Mike Barber HTTP Server 8891 by: Ste why? 8892 by: Ronald Rapp opening pdf documents within php 8893 by: Andrew.Martin Installation failed ! Please Help! 8894 by: Jack A uniqe ID for every item 8895 by: Mad Nas Call SuperClass Constractor 8896 by: Mad Nas Re: .php opening as text document 8897 by: goodluckmo 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] ----------------------------------------------------------------------
Ok here is the story : I got a php script that comunicates with a game server (Half-life). This script uses socket_set_timeout. But the build of php i downloaded doesn't support socket_set_timeout(). So i started to modify the script to do without. Here is the prob : the script use the socket as blockant. But without socket_set_timeout it could be a problem.So i try with a non-blockant socket but i don't get any response from the game server. Here is a portion of the code : if (!$cssocket=fsockopen("udp://".$serveraddress,$portnumber,$errnr)) { $this->errmsg="No connection"; return ""; } socket_set_blocking($cssocket,false); fwrite($cssocket,$command,strlen($command)); // sleep(1); do { $data=fread($cssocket,1024); $serverdata.=$data; $serverdatalen=strlen($serverdata); $socketstatus=socket_get_status($cssocket); // } while ($socketstatus["unread_bytes"] ); } while (time()-$starttime<5 ); The main prob is that : in blockant mode it works fine. In non-blockant mode i don't receive anything. But if i do a sleep(1) before the first read (the commented line) then it works.. Another way of the problem : loop { readdata from socket; append to data akready read; } while moredata or not_timed_out In blockant mode it works. In non-blockant mode i never receive something !! WHY ?? I understand why it works in blockant mode : the read function waits untill the has arrived. But in non-blockant the read function should return the data already arrived then return. And the second time i launch it, it should give me the data that arrived since the last time. I think i missed something, but i cannot see what. Please help me. Sorry about my English, it's not my main language... :) See you later
OK, I'm pretty new to the windows/PHP combination, but I think I might have a clue for you. First for the following to work, I believe this only work with Apache. In the file which uses the graphic include HTML like this: <img src="image.php?whatever=someID" ... > In the file 'image.php', you need to send the appropriate HTTP header prior to streaming the image data: <?php header ("Content-Type: image/jpeg"); ?> I have used the IIS/ASP/VBasic equivelent of this, so in general the concept works. Hope this helps, John Burns "Sur-Php" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello php-windows, > > This is my query: > > $query= " select Image from ImageTable where MainCode='040191' "; > > it returns data like this.. > > 0x424d2e040000000000003e00000028000000770000003f000000010001000000 > 0000f00300000000000000000000020000000000000000000000ffffff00ffffff > fff03fffffffffffffffffff00f03fffffe01ffffffffffcff8fffff00e00fffff > cfcfff7ffffff8ff07ffff00cfc3ffff9fe7ff3ffffff87f33ffff00 > > i know that this is BLOB data... > (which are actually small bmp files) > so how can i show it in web page.... > > > > -- > Best regards, > sur-php mailto:[EMAIL PROTECTED] > >
I have a friend who is having this same problem - but we have tried it with multiple pages - and the odd part is that it seems like it is not even sending the php.exe compiler any data. He is using NT 4.0 IIS4 with 4.0.6 Php using the .exe itself not the isapi. I have personally had no problems with my install on NT 4 IIS4 nor 2Kpro running IIS5. He has also sent me images of his configuration and everything looks perfect. This is really something I would not expect ;-) It has to do with IIS itself, since you can type in the name of a page that does not even exsist and get the same error you would with one that does! Hope there can be a remedy found :o] - Steve "Flint Doungchak" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > Phil, > > Thanks for your response. I have gone through the install.txt and made the > configuration changes. I think you should know that this CGI Misbehaving > doesn't occur regularly nor on a consistant file. I have the checked the > check file exists box, and I still get the error (the Misbehaving one), once > in a while, rather than the 404 error I expect to get (probably meaning the > page is found but something weird happened). I'd say the error might pop up > 1 out of 100 page loads. > > It looks like it only occurs on pages with MS SQL (not MySQL) db connections > (so I'm going to check with Frank to see if has any ideas) AND only if the > Header (Location: xx/xxx.html) function is used in combination. Gathered > from others, it doesn't seem to happen in Apache, so it might just be IIS, > but the MS KB doesn't have anything at all. > > There are a lot of people reporting this one on the windows list (some who > have the PHP.exe or other extentions with wrong permissions or re-directing > to a page that doesn't exist). I orginially thought as you did, but, in > Jeff's case, ours, and many others, this is not true. So there is something > going on here and I don't know what it is. > > I did run php.exe -i on the command line, and it seems OK. I double checked > permissions on all the modules I am using, php.exe and php4dts.dll just in > case. Nada. > > Anyhoo, I'm going to keep working on it. Any ideas from anyone else would be > great. > > Thanks for all of the effort. > > -Flint > > -----Original Message----- > From: Phil Driscoll [mailto:[EMAIL PROTECTED]] > Sent: Saturday, August 11, 2001 4:33 AM > To: Flint Doungchak; 'Jeff Howard'; [EMAIL PROTECTED] > Subject: Re: [PHP-WIN] Why am I getting a CGI error? > > > On Friday 10 August 2001 20:26, Flint Doungchak wrote: > > It seems that a lot of us are getting this error and nothing has been > > resolved. I sent a bug report with information from my IIS logs. > There is no bug here - it is just incorrect configuration of IIS and/or > security settings on your php script/php.exe/php4ts.dll/php extensions > and/or > the fact that the file you think you are accessing doesn't actually exist in > > the place you think it does. > > install.txt takes you through the motions of getting to the bottom of the > problem. > > Cheers > -- > Phil Driscoll
Is there anything special about accessing php documents from a network share? I can not get php to respond to a document root that it recieves from another machine. if my webserver 2000/IIS5 running php CGI is named FOO. and I use machine \\BAR\htdocs as the document root, and inside \htdocs is a file called index.php that looks like this. <?phpinfo();?> I get this. CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: which I know really means can't find the document. But it can. Is anyone else using a remote host for your document root and using PHP? Thomas System Administrator
Try mapping the network drive. Thomas Davis wrote: > > Is there anything special about accessing php documents from a network share? > > I can not get php to respond to a document root that it recieves from another >machine. > > if my webserver 2000/IIS5 running php CGI is named FOO. > > and I use machine \\BAR\htdocs as the document root, and inside \htdocs > > is a file called index.php that looks like this. > > <?phpinfo();?> > > I get this. > > CGI Error > The specified CGI application misbehaved by not returning a complete set of HTTP >headers. The headers it did return are: > > which I know really means can't find the document. But it can. Is anyone else using >a remote host for your document root and using PHP? > > Thomas > System Administrator -- Paul Smith [EMAIL PROTECTED] http://www.dostuff.net
I get a similar problem, and it only occurs with 'dynamic' type documents. HTML files work fine, but the PHP files cause a CGI error. I have tried every configuration under the sun, but as yet have not solved this. It seems to be an issue with IIS accessing the documents over a share, no matter if it's mapped or UNC'd If anyone has a cure, or can actually do this, please post here, as I have met many other people in the same boat. CJD "Paul Smith" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Try mapping the network drive. > > Thomas Davis wrote: > > > > Is there anything special about accessing php documents from a network share? > > I can not get php to respond to a document root that it recieves from another machine.
Go into the Services :List Double click on the World Wide Web Publishing Service Click the "Log On" Tab Click on the DOT for "This account." clcik on Browse Find a user id that has permissions to access the share. Fill in the password for that user. Hit OK and restart the service. Try it again. ----- Original Message ----- From: "Paul Smith" <[EMAIL PROTECTED]> To: "Thomas Davis" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, August 15, 2001 9:32 PM > Subject: Re: [PHP-WIN] Network Documents > X-RCPT-TO: <[EMAIL PROTECTED]> > X-UIDL: 297364283 > Status: U > > Try mapping the network drive. > > Thomas Davis wrote: > > > > Is there anything special about accessing php documents from a network share? > > > > I can not get php to respond to a document root that it recieves from another >machine. > > > > if my webserver 2000/IIS5 running php CGI is named FOO. > > > > and I use machine \\BAR\htdocs as the document root, and inside \htdocs > > > > is a file called index.php that looks like this. > > > > <?phpinfo();?> > > > > I get this. > > > > CGI Error > > The specified CGI application misbehaved by not returning a complete set of HTTP >headers. The headers it did return are: > > > > which I know really means can't find the document. But it can. Is anyone else >using a remote host for your document root and using PHP? > > > > Thomas > > System Administrator > > -- > Paul Smith > [EMAIL PROTECTED] > http://www.dostuff.net > > -- > 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] > >
Hi im really new to PHP but would like learn it so first i think its best to set up PHP on my box (win98) then i can play around and test scripts to help me learn more about PHP so anyway so far i have downloaded and installed PHP on my computer but i cant find a *easy to set up* free HTTP server that supports PHP so dose anyone know where i can find one? thanx for reading!
why do I get this error message? Please, help. Thanks. 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) Ron
I'm creating a Content Management system in which the user will have to attach a pdf document to an article. This is no problem, I copy the document to a specific pdf folder and store the document name in the DB to use on the front end. On the front end I loop through all documents that are online and print the title, display pdf icon, print pdf name and description and link to the document (in the specific pdf folder) <a href='pdf/$pdf[$i]'><img src='images/icon_mini_pdf.gif' border='0'></a><i>$pdf[$i]</i> where $pdf[$i] is the pdf name (for each $i) I have tried this with a number of pdf documents, with certain documents I get parser errors! (Could there be problems with the document itself? On the majority I get the standard windows popup message asking to me to open online or save locally. If I open online nothing happens! Acrobat reader opens and then closes straight away! If I go to save, it automatically puts the extension html on the file name! If i change this to pdf I can save it ok and I can open it without problems. Are there certain options in the php.ini or Apache.conf file I need to enable to view pdf files in php? I have seen the extension ;extension=php_pdf.dll commented out. Anyone any ideas?
Dear all I had download the PHP 4 and was trying to get it work! Well actally i had get it work in my IIS Server!! But the Strange thing is, i had create serval different website inside IIS4.0, and i want all of them can work with PHP. So i created a site and i get it work with PHP, which it runs the script and the ISAPI filter shows that the PHP was loaded. Existing Setting for the Sucessful Website that can work with PHP: ISAPI Filter = PHP (c:\php\sapi\php4isapi.dll) Application Extension = C:\php\php.exe %s%s So i do the same setting as the other new create Website, but all of the other doesn't work! I even had changed the Application Extension point to the same file as the ISAPI Filter (Which is php4isapi.dll), the php status still remain not loaded! I had read a book which it ask me to point both ISAPI and APP Extension to "php4isapi.dll", but when i read some article from internet, some of them say that the Application Extension should point to "php.exe", so could anyone tell me which is the truth! and pls help me with that, because i got to get to other website working with PHP as well!! Thx Jack [EMAIL PROTECTED]
Hi all How can generate a uniqe id for every object of a class, for example class A { var $id; function A() { $this->id= // How genereate this , uniqe for class and all subclass } } $a= new A(); $b=new A(); $c=new A(); print($a->id); print($b->id); print($c->id); thanks for answer Mad Nas
Hi all How can call a super class constractor in PHP for example class A { var $name; function A($name) { $this->name=$name; } } class B { var $size; function B($name,$size) { // How can call A constractor for initialize name variable in here $this->size=$size; } } thanks for help mad nas
you must not correct install php. "Craig" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi > > I'm trying to set up hlstats which users hlstats.php but every time I try > run the file in IE the .php file opens as a text file and displays all the > code. > > I'm using Win 98 > Internet Explorer 5.5 > > >