php-windows Digest 29 Mar 2001 11:14:52 -0000 Issue 516

Topics (messages 6359 through 6365):

Help w/ exec()!!
        6359 by: SHAWN

Re: HELP!!! (PHP-WINDOWS98-APACHE)
        6360 by: Bhala
        6361 by: OoCobra97.aol.com
        6364 by: Patrick

Re: PHP and Filesystem
        6362 by: Mangiola Nunzio         Datavia

windows COM object +PHP
        6363 by: Glenn

time
        6365 by: 0000051

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]


----------------------------------------------------------------------


Using IIS5 on W2K Server, I can't get get the exec() or other similar
commands to work.
 
This is what I'm doing -
 
exec( "dir/a-d/b $dir_name", $arFiles )
 
The array doesn't contain anything!  I've tried it with cmd.exe before the
command, but it just seems to get stuck in a loop!  Can anyone tell me how
to successfully use this command?  Or if not, any other ideas on how to get
the files inside a directory into an array?
 
Thanks in Advance,
Shawn Sellars
 




still doesn't work =\ when I try to look at a php script it says file not
found
Darvin Andrioli <[EMAIL PROTECTED]> wrote in message
01C0B770.88834BA0@PCDARVIN">news:01C0B770.88834BA0@PCDARVIN...
Hi,

change the following lines:

from
ScriptAlias /php/ "php"
to
ScriptAlias /php/ "c:/path/to/your/php/directory/"

and the third line from
Action application/x-httpd-php "php/php.exe"
to
Action application/x-httpd-php "/php/php.exe"

At the end reboot Apache.

Darvin

-----Original Message-----
From: Bhala [SMTP:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 4:00 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] HELP!!! (PHP-WINDOWS98-APACHE)

I NEED HELP! For some resion Apache will not run the php scripts =\ I have
tryed different config variables in the httpd.config thing This is what I
have in there.

======================
ScriptAlias /php/ "php"

AddType application/x-httpd-php .php .phtml .php4 .php3

Action application/x-httpd-php "php/php.exe"

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

pls help!



--
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]







Hello again,
Ok, I began thinking about your problem, and I think I remeber something 
about this, I was not able to do just "php" on the actions and aliases, I had 
to do php4 for some reason.  but I loaded uup apache today and tried the cgi 
version, and it worked, heres the following thats located in my httpd.conf 
file:

(change D:/server/apps/php/ to your php location)

ScriptAlias /php4/ "D:/server/apps/php/"
Action application/x-httpd-php4 "/php4/php.exe"
AddType application/x-httpd-php4 .php


Hope this helps.

~Jeff





<[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello again,
> Ok, I began thinking about your problem, and I think I remeber something
> about this, I was not able to do just "php" on the actions and aliases, I
had
> to do php4 for some reason.  but I loaded uup apache today and tried the
cgi
> version, and it worked, heres the following thats located in my httpd.conf
> file:
>
> (change D:/server/apps/php/ to your php location)
>
> ScriptAlias /php4/ "D:/server/apps/php/"
> Action application/x-httpd-php4 "/php4/php.exe"
> AddType application/x-httpd-php4 .php
>
>
> Hope this helps.
>
> ~Jeff
>
this is what worked for me also is you php path set in your autoexec.bat
file that may help also.


 ScriptAlias /php/ "d:/php/"
    Action application/x-httpd-php "/php/php.exe"
    AddType application/x-httpd-php .php







According to what I understand of fgets() it will read the first
4096 bits of information and leave the rest behind. So
your pics will come out corrupt if they are larger than 4096 bit.

(Well at least I think it's bits. But then it might be bytes)

So all you have to do is make that number large enough to 
take the whole pic.

> ----------
> From:         Thomas W. Badera[SMTP:[EMAIL PROTECTED]]
> Sent:         Wednesday, March 28, 2001 6:20 PM
> To:   [EMAIL PROTECTED]
> Subject:      [PHP-WIN] PHP and Filesystem
> 
> Another question....
> 
> I've got a script that is supposed to read URLs out of a text file, open
> the
> image at the URL, then copy it to the local computer.  The code follows:
> 
> <?php
> 
> $input = fopen("d:\\webs\\sportspotonline.com\\data\\images.txt", "r");
> while (!feof($input))
> {
>  $buffer = trim(fgets($input, 4096));
>  if ($buffer != "Navigation")
>  {
>   $fnArray = explode("/", $buffer);
>   $fn = $fnArray[sizeof($fnArray)-1];
>   $fn = "d:\\webs\\sportspotonline.com\\data\\images\\".$fn;
>   $output = fopen($fn, "wb");
>   $grab = fopen($buffer, "rb");
>   while ($grabbed = fread($grab, 4096);)
>   {
>    $grabbed = stripslashes($grabbed);
>    fwrite($output, $grabbed, strlen($grabbed));
>   }
>   fclose($output);
>   fclose($grab);
>  }
> }
> fclose($input);
> 
> ?>
> 
> The images this saves are all corrupt.... openable, partially viewable,
> but
> corrupt.  Any idea?
> 
> --TWB
> 
> 
> ---
> Thomas W. Badera
> WebTeam Manager
> Clarkson University
> < [EMAIL PROTECTED] >
> 
> 
> 
> -- 
> 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]
> 




Hallo!

I have read the PHP manual but I can't get PHP load a COM object.
Can anybody help me :-)

Best regards.
//Glenn

_____________________________________________
Free email with personality! Over 200 domains!
http://www.MyOwnEmail.com





hi
I am having problem writing the code to set the time( it's in second ) in format like 
(xx h'  xx m' xx s)
Time is the field in the access db. It's not the real time(clock).

example
$cur= odbc_exec( $cnx, "select domain_name,user_name,full_name,time_spent from users" 
);
echo "<table border=1><tr><th>Domen</th><th>User 
name</th><th>Name</th><th>Time<th></tr>\n";
while( odbc_fetch_row( $cur ) )
{
$Index= odbc_result( $cur, 1 ); 
$user_name= odbc_result( $cur, 2 ); 
$full_name= odbc_result( $cur, 3 ); 
$time_spent= odbc_result( $cur, 4 ); 

$time= $time_spent/3600;


I need the $time to be integer and to take the remainder of and set it to be $time1




Reply via email to