php-windows Digest 8 Feb 2002 14:42:34 -0000 Issue 992

Topics (messages 11905 through 11913):

SWFBitmap jpg to swf?
        11905 by: Josh Seward
        11909 by: Martin Lindhe

Problems with php4, iis and mssql70
        11906 by: Ken Kelly

PHP 4.1.1 - MSSQL 8
        11907 by: chris

fsockopen via MS-Proxy authentification
        11908 by: Kriegers Horst

Building a list of filenames (w2k)
        11910 by: George Pitcher
        11912 by: Asendorf, John

why doesnt this work?
        11911 by: chris
        11913 by: Nicole Amashta

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 ---
Why does this:
$img="image.jpg";
10 $fp = fopen($img,"rb");
11 $i = fread($fp,filesize($img));
12  $s = new SWFBitmap($i);

Produce this:

Fatal error: Sorry, can't tell what type of file ÿØÿà is in 
C:\Inetpub\wwwroot\dawndusk\serlient\test.php on line 12

When I print $i; I get the correct binary jpg text.

I am taking the code from php.net and it did work before I switched to 4.1.1

Any help is appreciated!


--- End Message ---
--- Begin Message ---
> Why does this:
> $img="image.jpg";
> 10 $fp = fopen($img,"rb");
> 11 $i = fread($fp,filesize($img));
> 12  $s = new SWFBitmap($i);
> 
> Produce this:
> 
> Fatal error: Sorry, can't tell what type of file ÿØÿà is in 
> C:\Inetpub\wwwroot\dawndusk\serlient\test.php on line 12
> 
> When I print $i; I get the correct binary jpg text.
> 
> I am taking the code from php.net and it did work before I 
> switched to 4.1.1

Read the documentation for SWFBitmap(), it says it takes a filename for a
jpeg as a parameter.
So try

$img="image.jpg";
$s = new SWFBitmap($img);

/Martin
--- End Message ---
--- Begin Message ---
I have tried this on both NT4 and Win2000.

I am running IIS with php4.  My database is Sql server 7.0.  I have
uncommented the php_mssql.dll in php.ini and made sure the dll is in the
extensions folder.  I set up the SQL server client network utility.  IIS and
php start up and work fine.  Actual queries to the database either causes a
DR. Watson error (on NT 4) saying sql server is not running or the page
times out ( on win 2k).

On the very same win2k machine, I installed apache (stopped IIS) and
everything works fine.  (same php, php.ini, dll's, etc).  Queries come back
as expected.

Has anyone ever run into something similar?

Thanks.


--- End Message ---
--- Begin Message ---
I can get my tables from my DB but how can i get column names displayed
above the result?

Chris


--- End Message ---
--- Begin Message ---
Hi all,

I wish to fetch an internet web page.
Oour internet access is through MS-Proxy server 2.0 with NTLM
authentification (domain\user:password).
I experience an access probleme.

Here you are the result:
proxy_srv_01:80 is available
HTTP/1.0 407 Proxy Access Denied Server: Microsoft-IIS/3.0 Date: Fri, 08 Feb
2002 08:15:35 GMT Proxy-Authenticate: NTLM Proxy-Authenticate: Basic
realm="proxy_srv_01.stg.swiss" 


Here you are my code:

<?
$user="lnt_01\test";    // DomainNT\UserName
$pass="test";           // UserPassword


$proxy_s = "proxy_srv_01";      // Proxy server to Internet
$proxy_p = "80";                        // Proxy port

$myfiles = "http://www.phpscripts-fr.net";;      // URL to fetch
              
$datei = fsockopen($proxy_s, $proxy_p, &$errno,&$errstr, 30);

if( !$datei )
        {
        echo "<font color=red><b>$proxy_s:$proxy_p isn't available
!</b></font>";
          exit();
        } else {
          echo "<font color=green><b>$proxy_s:$proxy_p is
available</b></font><br>";
          fputs($datei,"GET $myfiles/ HTTP/1.0 \r\n\r\n");
                
          while (!feof($datei))
                {
                        echo $zeile = fread($datei,1000);
                }
        }
?>

Is something erroneous in my code?

If somebody can help me, I will be really happy
Thanks

Horst

--- End Message ---
--- Begin Message ---
Hi all,

I want to build a list of filenames from a particular directory. I can't
find anything like this in the manual or on the list archive so any pointers
would be appreciated.

George

--- End Message ---
--- Begin Message ---
I'm sure I stole this code from somewhere else...

//Load Directory Into Array 
$path = "D:Program Files/Adobe/Acrobat 4.0/PDF Output/";
$handle=opendir($path);
while ($file = readdir($handle)) 
$retVal[count($retVal)] = $file; 

//Clean up and reverse sort 
closedir($handle); 
rsort($retVal);
echo "<table>";
while (list($key, $file) = each($retVal)) {

      $flename = "$file";
        echo "<tr><td>$flename</td></tr>";

}



---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit


> -----Original Message-----
> From: George Pitcher [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 08, 2002 6:09 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Building a list of filenames (w2k)
> 
> 
> Hi all,
> 
> I want to build a list of filenames from a particular 
> directory. I can't
> find anything like this in the manual or on the list archive 
> so any pointers
> would be appreciated.
> 
> George
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
i get this message when i try to open this page : PHP Warning: Undefined
variable: submit in c:\inetpub\wwwroot\testsite\registrer.php on line 8


form method="post" action="registRer.php">
Fornavn: <input type="text" name="fornavn"><br>
Etternavn: <input type="text" name="etternavn"><br>
<input type="Submit" name="submit" value="Registrer"><br> </form>
<?
IF ($submit) // this is line 8
{
}
?>

If you know why it doesnt work please help.



--- End Message ---
--- Begin Message ---
Check your PHP.ini file for the line:

error_reporting  =

This is where you set how PHP will report errors and warnings, notices, etc.

Use this line in place of what you have already:

error_reporting  =  E_ALL & ~E_NOTICE


This will stop the warnings of you not predefining and initializing
variables (which isn't really necessary in PHP).


Try that and see if it helps ...

~nicole

==========================

"Chris" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> i get this message when i try to open this page : PHP Warning: Undefined
> variable: submit in c:\inetpub\wwwroot\testsite\registrer.php on line 8
>
>
> form method="post" action="registRer.php">
> Fornavn: <input type="text" name="fornavn"><br>
> Etternavn: <input type="text" name="etternavn"><br>
> <input type="Submit" name="submit" value="Registrer"><br> </form>
> <?
> IF ($submit) // this is line 8
> {
> }
> ?>
>
> If you know why it doesnt work please help.
>
>
>


--- End Message ---

Reply via email to