php-windows Digest 17 Feb 2002 01:12:32 -0000 Issue 1004
Topics (messages 12110 through 12115):
MING
12110 by: Josh Seward
Backgrounding PHP
12111 by: Cary
12112 by: DL Neil
12113 by: Cary
Re: access database over multiple pages
12114 by: Christoph Grottolo
12115 by: quincy
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 ---
For PHP 4.0.8 I had function that converted .jpg in .swf
-----------------
Ming_setScale(20);
$fp = fopen($dram,"r");
$end=10000000;
$i = fread($fp,$end);
$img = new SWFBitmap($i);
fclose($fp);
$m = new SWFMovie();
$m->setDimension(100,100);
$m->add($img);
$m->save("myURL/movie.swf");
ImageDestroy($new);
----------------------------
But whan I install PHP 4.1.1 function stops working on string $img = new
SWFBitmap($i);
and return "Sorry, can't tell what type of file ÿØÿà is in ".
I didn't change anything!
Help is much appreciated!
Thanks,
Josh Seward
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Hi all.
I'm new to php on Windows and to this list. This is probably a really basic
question for most of you, but I've searched the web for hours trying to
find an answer. Hopefully somebody here will be kind enough to clue me in.
Here's the question...
When running a php script from the task scheduler, how do you keep the
"mtask" window from popping up every time the task runs ?
Is there a command line witch for php.exe for this, or something just as
simple ?
Thanks for any help,
Cary
--- End Message ---
--- Begin Message ---
Hi Cary,
> I'm new to php on Windows and to this list. This is probably a really basic
> question for most of you, but I've searched the web for hours trying to
> find an answer. Hopefully somebody here will be kind enough to clue me in.
>
> Here's the question...
> When running a php script from the task scheduler, how do you keep the
> "mtask" window from popping up every time the task runs ?
> Is there a command line witch for php.exe for this, or something just as
> simple ?
I have always used AT/command line, until very recently, when I 'discovered' the 'new'
task scheduler facility.
Guess what, I asked exactly the same question!
If you use a separate userId for the batch job, than the userId running in the
foreground, the window will not
pop-up over what you're doing. I set up a special userId for batch work (and relevant
permissions).
Regards,
=dn
--- End Message ---
--- Begin Message ---
Thanks =dn !
Not only did you give me the solution but you made me feel "not so dense"
in the process :-)
Thanks again and hope I have a chance to help in the future.
Cary
At 10:42 AM 2/16/02, DL Neil wrote:
>Hi Cary,
>
> > I'm new to php on Windows and to this list. This is probably a really basic
> > question for most of you, but I've searched the web for hours trying to
> > find an answer. Hopefully somebody here will be kind enough to clue me in.
> >
> > Here's the question...
> > When running a php script from the task scheduler, how do you keep the
> > "mtask" window from popping up every time the task runs ?
> > Is there a command line witch for php.exe for this, or something just as
> > simple ?
>
>
>I have always used AT/command line, until very recently, when I
>'discovered' the 'new' task scheduler facility.
>Guess what, I asked exactly the same question!
>
>If you use a separate userId for the batch job, than the userId running in
>the foreground, the window will not
>pop-up over what you're doing. I set up a special userId for batch work
>(and relevant permissions).
>
>Regards,
>=dn
>
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi Quincy
Session variables are stored on the server, not on the client, so there is
no additional risk, if you don't send usernames and passwords back to the
client with your script. But usually you don't need to store
username/password because you don't need them in the scripts. You just store
a variable which confirms that the user already has authenticated (p.e.
$sess_auth=true;) which you can check in your scripts, and, if you need, the
userID.
Maybe you have a look at some ready-to-use auth solutions written in PHP.
Look at http://www.zend.com/codex.php?CID=341.
Christoph
"Quincy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
| I want to design a web application using php ,that allows the user to sign
| in once into the mysql database and then over the course of several pages
to
| perform several queries on the database using their name and password.
|
| My question is how can I do this without asking the user to enter his
name
| and password on every page so that a query can be performed on the
| database.My initial thoughts was to store the user name and password as
| session variables when the person initial signs in. My concern is if this
| safe enough as someone else may be able to access the session variables
and
| get the user name and password.
|
| Can anyone offer any suggestions on the safest way of accessing a mysql
| database over several pages using the same user name and password without
| asking the user to give this information on every page which needs to run
a
| query on the database.
|
|
|
|
--- End Message ---
--- Begin Message ---
Thanks.
Another related question. I know that to connect to a mysql database using
php you use the following statement
$link_id=mysql_connect("hostname","username","password");
My question is if the variable $link_id which is the handle to the database
can persist beyond the web page that create it. I was wondering if this
variable can be a session variable to be reused through the session.
The reason is that the user will be browsing through several web pages each
with a script to perform a particular query of the database. It seems to me
that on every page i would need to use the database connection statement
which means that I have to store the username and password. And you have
help because you have indicated that the session variables are stored on the
server so there is no addtional risk. I wanted to find out if there are any
other solutions besisdes storing the username and password like storing the
database handle $link_id as a session variable. Is this possible?
"Christoph Grottolo" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi Quincy
>
> Session variables are stored on the server, not on the client, so there is
> no additional risk, if you don't send usernames and passwords back to the
> client with your script. But usually you don't need to store
> username/password because you don't need them in the scripts. You just
store
> a variable which confirms that the user already has authenticated (p.e.
> $sess_auth=true;) which you can check in your scripts, and, if you need,
the
> userID.
>
> Maybe you have a look at some ready-to-use auth solutions written in PHP.
> Look at http://www.zend.com/codex.php?CID=341.
>
> Christoph
>
>
>
> "Quincy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> | I want to design a web application using php ,that allows the user to
sign
> | in once into the mysql database and then over the course of several
pages
> to
> | perform several queries on the database using their name and password.
> |
> | My question is how can I do this without asking the user to enter his
> name
> | and password on every page so that a query can be performed on the
> | database.My initial thoughts was to store the user name and password as
> | session variables when the person initial signs in. My concern is if
this
> | safe enough as someone else may be able to access the session variables
> and
> | get the user name and password.
> |
> | Can anyone offer any suggestions on the safest way of accessing a mysql
> | database over several pages using the same user name and password
without
> | asking the user to give this information on every page which needs to
run
> a
> | query on the database.
> |
> |
> |
> |
>
>
--- End Message ---