php-windows Digest 2 Nov 2004 17:50:28 -0000 Issue 2451

Topics (messages 24866 through 24870):

Re: session expiration problem
        24866 by: Jason Barnett
        24870 by: nightwalker

Re: Displaying An Image / Non-Web accessible Dir
        24867 by: Jason Barnett

mysql_connect() undefined procedure
        24868 by: Khashan

exec() IIS 5 php
        24869 by: Xavier Barmaz

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 --- Nightwalker wrote:
Hi.
When I set session expiration using:
ini_set('session.gc_maxlifetime','3');
and I refresh page after 10 seconds or even change my system time to a few hours ahead, the session variables still exist. It doesn't work even

Hmmm, do you mean the old session values are being carried forward? Perhaps some code is in order here.

--- End Message ---
--- Begin Message --- Jason Barnett wrote:
Hmmm, do you mean the old session values are being carried forward? Perhaps some code is in order here.

Yes. I also tried to increase the gc_probability value, so there will be 100% chance that the session data will be seen as garbage, but it still doesn't work.
Of course I can manually add a function that will act as some expiration mechanism, but I thought it would be better to be implemented on server.
I guess I will do it like that.

--- End Message ---
--- Begin Message ---
Can you or someone suggest how I can access an image file on my drive
which is not part of the http-accessible directories (say in
C:\images\somepic.jpg) and display the filetype? I think once I can at
least get that to work, the rest should be fairly simple.

If all goes well, the only thing you should need to do to open that file would be to open a file with a file pointer and then do whatever you want with the file pointer. Your PHP user will need read and / or write access to the file(s) in question, you can right-click them to check on this.


<?php

// any file, so long as PHP user can read it
$file = 'C:\\images\\somepic.jpg';
$fp = fopen($file, 'r');
// do stuff, not sure what you wanted ewxactly but this gives you an idea
echo 'Is this a directory?  ';
echo is_dir($fp) ? 'yes' : 'no';
echo '<pre>';
print_r(fstat($fp));
echo '</pre>';
// etc.

?>
--- End Message ---
--- Begin Message ---
HI all. 
Just get a new system to port a demo from windows 2000 to
windows xp, IIS. While at it, i figures i will download the
latest. BIG mistake. I installed mysql 4.1.7 and php 5 in
c\mysql and c\PHP. as well as eclipse and java. I set the
system path to include c\php and c:\php\ext.
php.ini is in c:\Windows and libmysql.dll and php_mysql.dll
are there too.
   I had some php scripts that worked fine with mysql
4.0.16 and php 3.4.3. One the new system, Eclipse find
mysql and my java code works. So i know the system knows
how to read php files.
  when i try to connect to mysql useing mysql_connect(), i
get 3 types of errors depending on how i set up the php.ini
file:
1- if i don't comment the php_mysql.dll, i get an error :
call to undefined procedure.
2- if i uncomment php_mysql.dll i get an error PHP startup:
unable to load dynamic library c:\php\ext\php_mysql.dll,
the specified procedure could not be found.
3- if i include libmysql.dll in the init file, i get the
same error as in 2.
BTW, libmysql.dll and php_mysql.dll are both in Windows,
system32 and in c:/php/ext/. The enviornment variable path
is set to look in c:\php\ext.

 I will keep digging and googling for an explaination but
if someone can save me some aggrivation i would appriciate
it. I have to get this demo working in 2 days.

Thanks in advance.


                
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 

--- End Message ---
--- Begin Message ---
Hello,

I'm running php 4.3.4 on IIS 5 with ISAPI. I want to execute a script which
open Matlab (mathematical software) and then open a specific file into
matlab. Everything works the way I want on the serveur through the command
line php.exe.
However, with a php script through a web browser the following happens : the
progress bar hangs for ages and if I go to the task manager I see matlab
using the memory but no CPU time (only the 2-5 first seconds).

I would like to know if someone has already used the exec() function on IIS.
It works fine with exec and a batch, but not with exec and another script.

My script is like this
*****************************************************
<?php
echo "Starting the program!!!";

$cmd = "\"C:\MATLAB6p5\bin\win32\matlab.exe\" /nosplash /nodesktop /r -c
E:\\SSN\\cognetics\\amp_fit_power_with_mex\\test2.m";
exec($cmd,$output,$rv);

echo "program started!!!";
?>
******************************************************

Any help, even not related to matlab will be appreciated. I'm really
desperate to make it work one day

Thanks

--- End Message ---

Reply via email to