|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help_at_lists.php.net
Date: Thu Nov 14 2002 - 11:26:41 CST
php-general Digest 14 Nov 2002 17:26:41 -0000 Issue 1704
Topics (messages 124384 through 124458):
Re: Help with project
124384 by: Brendon G
Re: Trivial newbie regex question
124385 by: Charles Wiltgen
session randomly loses objects
124386 by: Josh Bauguss
124391 by: Ernest E Vogelsinger
How to edit and ecternal .html file through a form
124387 by: mwenriqu.mweb.co.za
124388 by: Jason Wong
Re: can a popup window get the page referer?
124389 by: Jason Wong
php mail confirmation
124390 by: Martin Hudec
124395 by: Jason Wong
Syntax Help
124392 by: conbud
124393 by: Jason Wong
124397 by: Petre Agenbag
LDAP specific?
124394 by: Tony Earnshaw
124399 by: Chris Hewitt
124409 by: Krzysztof Dziekiewicz
124421 by: Tony Earnshaw
124431 by: BigDog
124432 by: BigDog
124451 by: Tony Earnshaw
Re: _POST incorrect output...
124396 by: Sebastian Konstanty Zdrojewski
Re: runing com
124398 by: kai
124404 by: Michael Hazelden
Re: Need Help in escaping " and\
124400 by: Per
Re: locale
124401 by: Bc. Radek Krejča
multiple file upload
124402 by: Funk-XL
124403 by: Funk-XL
124405 by: John W. Holmes
124406 by: Justin French
124407 by: Jason Wong
124423 by: Marek Kilimajer
124424 by: Marek Kilimajer
124425 by: Edward Peloke
124434 by: Javier Montserat
124447 by: Javier Montserat
Re: posible bug, require and symlinks
124408 by: Krzysztof Dziekiewicz
124422 by: Michael Sims
124426 by: Jonathan Sharp
connecting to a remote host through mysql.exe
124410 by: Mr. BuNgL3
124411 by: Jason Wong
124412 by: Brian McGarvie
Re: Would appreciate thoughts on session management
124413 by: Ford, Mike [LSS]
124414 by: Ford, Mike [LSS]
124457 by: Charles Wiltgen
Re: How do i make an upload script?
124415 by: Tweak2x
124417 by: Jon Haworth
124443 by: brucedickey
Re: small php engine
124416 by: Marek Kilimajer
Image from MIME email
124418 by: Christoph
124427 by: Erwin
Re: How to cache PHP on Apache
124419 by: Marek Kilimajer
how to generate ms-word files
124420 by: michael
124433 by: BigDog
124450 by: Tom Woody
PHP download problem IE5 on mac
124428 by: Javier Montserat
124436 by: Ernest E Vogelsinger
passing multiple variables in a url
124429 by: CJ
124430 by: pig pig
124435 by: BigDog
124437 by: Adam Williams
124438 by: CJ
124440 by: . Edwin
124442 by: . Edwin
scanning for non alpha characters
124439 by: CJ
124441 by: Coert Metz
124445 by: Ernest E Vogelsinger
124446 by: CJ
Swear word substitution
124444 by: CJ
124449 by: CJ
query question
124448 by: Steve Buehler
Re: PHP Auth with Apache
124452 by: ed.home.homes2see.com
124453 by: BigDog
124454 by: Ysrael Guzmán
124455 by: Adam Voigt
Re: Mail Question
124456 by: R'twick Niceorgaw
Run webscript from command line
124458 by: Aate Drageset
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
*slaps head*
*screams*
feel better now *gets back to work*
Cheers
Brendon
-----Original Message-----
From: Karl James [mailto:karl.james
verizon.net]
Sent: Thursday, November 14, 2002 3:41 AM
To: php-general
lists.php.net
Subject: [PHP] Help with project
Hello people
Im doing the fantasy football project
I have created a form for my owners to register there username and
passwords
So that it gets added to the dbase.
My question is what should be my next part?
Make a login page if so I would need help with that and wonder if there
is anyone
Out there that can help me.
Then from there, once you log in it will take you to your team action
page
Where you can add/delete trade players.
I need help with interface and login script as well.pleas email me.
Karl.
attached mail follows:
Hello,
Many thanks for the responses! It's working great now...
-- Charles
attached mail follows:
I've read about this before in spots. (like the bug report system)
I've got a fairly high traffic server. (30-50K uniques per day)
For the most part, everything works ok. We get plenty of orders (between
70-90 a day). However, I also get complaints from people who say they keep
losing their cart.
To try and track down what was going on. I started storing some fairly
simple stats from the site. Here is an example of one sent to me via e-mail
from my order.html page.
Person's cart failed?
Referring url is: http://www.t-shirtking.com/cart.php
User Agent is: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt;
Roadrunner)
Cookie output: c93856925c2ed796d3560d3729ebeb60
Other Session:
http://www.t-shirtking.com/catalog/136-00813/c93856925c2ed796d3560d3729ebeb6
0
Other Session: addProduct
new session is: c93856925c2ed796d3560d3729ebeb60
A quick description is as follows. If they come to the order.html page and
the script doesn't see the $_SESSION["cart"] variable, it sends me this
message. It sends me the referring url. (a lot of people hit checkout
instead of add to cart for some odd reason, so this is proof that this
particular person went through the cart) Then I grab the user agent to try
and narrow down the browsers with problems. Then I see if the session id is
in a cookie. Then, by looking at their session variable, I can see that
they went to cart.php via the given url. (I store the http_refferer as a
session variable on the cart.php page) Then, to prove to myself that the
cart function ran, I store the fact that the person came from the catalog
url and did indeed pass the cart command addProduct (via the form post
data). As a last test, I send myself the session_id that order.html is
using (to make sure the session wasn't restarted)
So, what can I gather from this....I only give one example. However, I get
about 10 of these messages a day. I'm sure there are even more than that
considering that some people may give up when they notice their cart isn't
holding their products and don't bother going to order.html. As you can
tell from above, it is clear that the session id is indeed intact. Also,
I'm actually able to pull information out of the session that was stored on
a previous page. (the addProduct command and the url stored in the session
by the cart.php page) However, the cart variable, which is an object, is no
longer there. (it is a simple object btw. Just an object with an array in
it and a few member functions)
I thought perhaps using the default php session manager, that it was having
problems. So I recently switched it to a mysql based manager. (just using
the session_save_handler). I still get the issue though. Therefore, I
cancel out blaming php's file storage method.
Where is my cart object going? It happens only randomly. It also happens
only to users of IE. (though 90% of our traffic are IE users) It happens to
IE6.0, IE5.5, IE5.0. It also happens at any time during the day (meaning,
high traffic times and low traffic times) I have also been able to
immediately look at my sessions table in the database when I receive a
message like the above. Sure enough, the session is there...it has
data...just no cart.
Of course, the biggest bitch of all....I can't reproduce the bug to save my
life. I've tested on 10 different machines using a variety of Windows
versions and IE versions. I've tested the cart well over 100 times. Yet, I
never seem to be able to break it. I even try to add the product that I
know the person who did lose the cart was trying to buy.
I'm pretty sure I'm losing orders because of this. I can't imagine how many
people are having issues. I'm in desperate help as my client would love me
if I could fix the number of orders per day to get back to 100. (he
switched to Miva a couple months ago and the dedicated Sun Solaris box
choked to death due to high server load. around 50-60 according to top.)
So we came in and very quickly implemented a php based solution. Of course,
it is working great except for this.
As a test, I just recently installed php4.3pre2 to see if it fixed the
issue. alas, it did not. I was previously using 4.2.3.
HELP!.
Thanks,
Josh Bauguss
attached mail follows:
At 07:39 14.11.2002, Josh Bauguss said:
--------------------[snip]--------------------
>I've got a fairly high traffic server. (30-50K uniques per day)
>
>For the most part, everything works ok. We get plenty of orders (between
>70-90 a day). However, I also get complaints from people who say they keep
>losing their cart.
>
>To try and track down what was going on. I started storing some fairly
>simple stats from the site. Here is an example of one sent to me via e-mail
>from my order.html page.
>
> [...]
--------------------[snip]--------------------
Hi,
maybe this could be because users are submitting carts twice,
doubleclicking the submit button?
What happens in this case would be something like this:
User hits submit button (Inst.1) PHP reads session data from file
User hits button again (Inst.2) PHP reads session data from file
I didn't find any hint in the docs that PHP would _not_ flush the session
upon an aborted connection. Having both instances using the same session
data it would be possible for instance 2 to complete before instance 1 gets
to flush its session data, effectively overwriting what instance 2 had saved.
In a closed environment this might be quite unlikely, but with a fairly
high load server it might very well be that the aborted apache fork sleeps
longer than the second instance needs to complete.
If this could be the cause of those intermittent problems there are a
number of solutions you could apply, from simple to complicated. I'll be
happy to submit some ideas here; don't have the time right now, but I'll be
back soon ;-)
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
attached mail follows:
Hi there everyone. If you have a spare moment please could you help me with the following.
I'm trying to do the following: =========================================== Have the contents of a an external (on same server).html file load in a form so that the user can edit its contents and save the file. The save function would need to save over everything that was previously in the .html file. ===========================================
Hi, as i'm sure is obvious by my posting i'm new to this so any help would be greatly appreciated.
Cheers and Best Regards Enrique
--------------------------------------------- This message was sent using M-Web Airmail. JUST LIKE THAT Are you ready for 10-digit dialling? To find out how this will affect your Internet connection go to www.mweb.co.za/ten http://airmail.mweb.co.za/
attached mail follows:
On Thursday 14 November 2002 14:51, mwenriqu
mweb.co.za wrote:
> Hi there everyone.
> If you have a spare moment please could
> you help me with the following.
>
> I'm trying to do the following:
> ===========================================
> Have the contents of a an external (on same
> server).html file load in a form so that the
> user can edit its contents and save the file.
> The save function would need to save over
> everything that was previously in the .html
> file.
> ===========================================
>
> Hi, as i'm sure is obvious by my posting i'm
> new to this so any help would be greatly
> appreciated.
The "Filesystem functions" section of the manual has all the info/functions you need. In particular file() and fopen(), fwrite(). The manual is full of examples, I suggest you try them out and play around with them, understand them, then modify them to your needs.
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* Reality always seems harsher in the early morning. */
attached mail follows:
On Thursday 14 November 2002 10:43, Martin Towell wrote:
> Unfortunately I didn't catch the start of this thread, bur no matter.... > In IE, all you need to do to bring up a window with an address bar is the > select the window you want to know the address of and press CTRL-N - there > you go, a new window, pointing to the same page, with the addess bar > showing exactly where the page is. I use this method quite often :)
This, for me, was one (amongst many) of the annoying things about IE. Nice to hear that someone has actually found a use for it :)
Have you found a use for the [right-click]>[open] function (as opposed to just a plain left-click)?
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* "I don't believe in sweeping social change being manifested by one person, unless he has an atomic weapon." -- Howard Chaykin */
attached mail follows:
Hello all,
I would like to ask how can I make registration confirmation by email...user will receive mail confirming his registration immediately after he registers in application.....is it possible to make mail() function filled with data from registration (email)?
-- Best regards, Martin mailto:corwincorwin.sk
attached mail follows:
On Thursday 14 November 2002 17:02, Martin Hudec wrote: > Hello all, > > I would like to ask how can I make registration confirmation by > email...user will receive mail confirming his registration immediately > after he registers in application.....
> is it possible to make mail() > function filled with data from registration (email)?
Yes, well why not? Just build up the body of your mail using the info from your form ($_POST or $_GET) and pass it to mail().
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* It's hard to get ivory in Africa, but in Alabama the Tuscaloosa. -- Groucho Marx */
attached mail follows:
Whats wrong here ?? The variables are getting the correct information from the form but for some reason as soon as I put the variables into the $sql they dont post the proper data to the database, its connecting to the database ok but just not updating the data.
$sql = "UPDATE updates SET member= '{$_POST['mem']}', email= '{$_POST['email']}', position= '{$_POST['pos']}', dateadded= '{$_POST['dateadded']}', descp= '{$_POST['descp']}', message= '{$_POST['message']}' where id= '{$_POST['id']}'";
$result = mysql_query($sql);
Lee
attached mail follows:
On Thursday 14 November 2002 17:22, conbud wrote: > Whats wrong here ?? The variables are getting the correct information from > the form but for some reason as soon as I put the variables into the $sql > they dont post the proper data to the database, its connecting to the > database ok but just not updating the data. > > $sql = "UPDATE updates SET member= '{$_POST['mem']}', email= > '{$_POST['email']}', position= '{$_POST['pos']}', dateadded= > '{$_POST['dateadded']}', descp= '{$_POST['descp']}', message= > '{$_POST['message']}' where id= '{$_POST['id']}'"; > > $result = mysql_query($sql);
Does echo($sql) look OK?
How about echo mysql_error()? Or executing $sql in the mysql command line interface?
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* SANTA CLAUS comes down a FIRE ESCAPE wearing bright blue LEG WARMERS ... He scrubs the POPE with a mild soap or detergent for 15 minutes, starring JANE FONDA!! */
attached mail follows:
What do you mean by "dont post proper data"?
Have you added slashes to the variables? (use addslashes() and then stripslashes() when reading the contents from the db) On Thu, 2002-11-14 at 11:22, conbud wrote: > Whats wrong here ?? The variables are getting the correct information from > the form but for some reason as soon as I put the variables into the $sql > they dont post the proper data to the database, its connecting to the > database ok but just not updating the data. > > $sql = "UPDATE updates SET member= '{$_POST['mem']}', email= > '{$_POST['email']}', position= '{$_POST['pos']}', dateadded= > '{$_POST['dateadded']}', descp= '{$_POST['descp']}', message= > '{$_POST['message']}' where id= '{$_POST['id']}'"; > > $result = mysql_query($sql); > > Lee > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
People,
I'm trying to produce a "book of mugs" (a 'mug' is a 'face') for people at work to be able to manage and change, as far as they are allowed to, their own personal details in the org's directory database.
It's based on PHP 4.2.3/Apache and Openldap 2.1.8 and above and/or Novell eDirectory NLDAP 8.0 or above.
One of the things I have to do, is show and change jpeg photos from the user's browser. Browsers are the latest IE, Netscape or Mozilla. No problem with that, only a problem with the following (Code sample below):
I can show a jpeg using a href with a target, either in a new page or a frame. To do this, PHP needs to be fed 'header("Content-type: image/jpeg")'. This can be put more or less anywhere in the very short script used for showing the jpeg and works. However, if I try to put any more html code into the script, i.e. 'print <html>';, print '<body>'; etc, *anywhere*, I get a "headers already sent" error. So I can't include code for changing the BGCOLOR, sizing the image or anything like that.
Anybody know a workaround? I've cheesed as much code as i can from the recoginized tools, such as LDAPExplorer, John Hallam's magnificent yet not widely known contrib. and the Wrox books, but none of them even attempts to address what I want.
Best,
Tony
P.s., thanks for what is probably the most *patient minded* and catholic mailing list on the Internet, and all the good advice.
<?php
// Code to show a jpeg from an attribute sent on a previous page // $headers = getallheaders(); // foreach ($headers as $name => $content) { // echo "headers[$name] = $content<br>\n"; // }
$ds=ldap_connect($Host, $Port);
if ($ds) {
$r=ldap_bind($ds);
if ($r) {
$these_attrs = array($Attribute);
$result = ldap_search($ds, $BaseDN, $target, $these_attrs);
if ($result) {
$result_id = ldap_first_entry($ds, $result);
if ($result_id) {
$foto=ldap_get_values_len($ds, $result_id, $Attribute);
header("Content-type:image/jpeg");
print $foto[0];
}
}
}
}
?>
--Tony Earnshaw
Cricketers are strange people. They wake up in October, only to find that their wives had left them in May.
e-post: tonni
billy.demon.nl www: http://www.billy.demon.nl
attached mail follows:
Tony Earnshaw wrote:
>frame. To do this, PHP needs to be fed 'header("Content-type: >image/jpeg")'. This can be put more or less anywhere in the very short >script used for showing the jpeg and works. However, if I try to put any >more html code into the script, i.e. 'print <html>';, print '<body>'; >etc, *anywhere*, I get a "headers already sent" error. So I can't > The headers must be the first thing that is sent to the browser. Do all your other html afterwards, or use output buffering.
HTH Chris
attached mail follows:
> I can show a jpeg using a href with a target, either in a new page or a > frame. To do this, PHP needs to be fed 'header("Content-type: > image/jpeg")'. This can be put more or less anywhere in the very short > script used for showing the jpeg and works. However, if I try to put any > more html code into the script, i.e. 'print <html>';, print '<body>'; > etc, *anywhere*, I get a "headers already sent" error.
You can not put any html code with image code. If you send some html you mean to send header("Content-Type: text/html") with header("Content-type: image/jpeg") Where do you want go to ?
You can do so: There is on the page http://xxx/user.html?name=smith some html code where a user can act. Among the html code you insert <img src="http://xxx/userfoto.html?name=smith"> On http://xxx/userfoto.html you send header("Content-type: image/jpeg") and the image content and no html code.
attached mail follows:
tor, 2002-11-14 kl. 11:14 skrev Chris Hewitt:
> >frame. To do this, PHP needs to be fed 'header("Content-type: > >image/jpeg")'. This can be put more or less anywhere in the very short > >script used for showing the jpeg and works. However, if I try to put any > >more html code into the script, i.e. 'print <html>';, print '<body>'; > >etc, *anywhere*, I get a "headers already sent" error. So I can't
> The headers must be the first thing that is sent to the browser. Do all > your other html afterwards, or use output buffering.
Thanks for the answer, Chris. I realise this, but that just does not work - been there, seen it, done it.
Wherever (even as 1st line) *any* PHP4 header stuff is put in the script, adding html code later results in the same "headers already sent" error. That's why I asked for a "workaround," by name.
Best,
Tony
--Tony Earnshaw
Cricketers are strange people. They wake up in October, only to find that their wives had left them in May.
e-post: tonni
billy.demon.nl www: http://www.billy.demon.nl
attached mail follows:
Why can u not do a page that displays the images as img src?
That should work for ya...instead of sending the headers. Are u saving the image in the ldap server?
On Thu, 2002-11-14 at 09:27, Tony Earnshaw wrote:
> People,
>
> I'm trying to produce a "book of mugs" (a 'mug' is a 'face') for people
> at work to be able to manage and change, as far as they are allowed to,
> their own personal details in the org's directory database.
>
> It's based on PHP 4.2.3/Apache and Openldap 2.1.8 and above and/or
> Novell eDirectory NLDAP 8.0 or above.
>
> One of the things I have to do, is show and change jpeg photos from the
> user's browser. Browsers are the latest IE, Netscape or Mozilla. No
> problem with that, only a problem with the following (Code sample
> below):
>
> I can show a jpeg using a href with a target, either in a new page or a
> frame. To do this, PHP needs to be fed 'header("Content-type:
> image/jpeg")'. This can be put more or less anywhere in the very short
> script used for showing the jpeg and works. However, if I try to put any
> more html code into the script, i.e. 'print <html>';, print '<body>';
> etc, *anywhere*, I get a "headers already sent" error. So I can't
> include code for changing the BGCOLOR, sizing the image or anything like
> that.
>
> Anybody know a workaround? I've cheesed as much code as i can from the
> recoginized tools, such as LDAPExplorer, John Hallam's magnificent yet
> not widely known contrib. and the Wrox books, but none of them even
> attempts to address what I want.
>
> Best,
>
> Tony
>
> P.s., thanks for what is probably the most *patient minded* and catholic
> mailing list on the Internet, and all the good advice.
>
> <?php
>
> // Code to show a jpeg from an attribute sent on a previous page
> // $headers = getallheaders();
> // foreach ($headers as $name => $content) {
> // echo "headers[$name] = $content<br>\n";
> // }
>
> $ds=ldap_connect($Host, $Port);
>
> if ($ds) {
>
$r=ldap_bind($ds);
>
> if ($r) {
>
$these_attrs = array($Attribute);
>
$result = ldap_search($ds, $BaseDN, $target, $these_attrs);
> if ($result) {
>
$result_id = ldap_first_entry($ds, $result);
> if ($result_id) {
>
$foto=ldap_get_values_len($ds, $result_id, $Attribute);
> header("Content-type:image/jpeg");
> print $foto[0];
> }
> }
> }
> }
> ?>
>
> --
>
> Tony Earnshaw
>
> Cricketers are strange people. They wake up
> in October, only to find that their wives had
> left them in May.
>
> e-post: tonni
billy.demon.nl
> www: http://www.billy.demon.nl
>
>
-- .: B i g D o g :.
attached mail follows:
This is how I do it.
I create a php page that gets the image and sends the correct header. Then in my other php page that displays the details about a user i call <img src="showperson.php?name=$fullname">. Then in showperson i send the correct image headers and the image is displayed properly.
HTH...
On Thu, 2002-11-14 at 10:50, Krzysztof Dziekiewicz wrote: > > I can show a jpeg using a href with a target, either in a new page or a > > frame. To do this, PHP needs to be fed 'header("Content-type: > > image/jpeg")'. This can be put more or less anywhere in the very short > > script used for showing the jpeg and works. However, if I try to put any > > more html code into the script, i.e. 'print <html>';, print '<body>'; > > etc, *anywhere*, I get a "headers already sent" error. > > You can not put any html code with image code. > If you send some html you mean to send > header("Content-Type: text/html") > with > header("Content-type: image/jpeg") > Where do you want go to ? > > You can do so: > There is on the page http://xxx/user.html?name=smith some html code where a user can act. > Among the html code you insert <img src="http://xxx/userfoto.html?name=smith"> > On http://xxx/userfoto.html you send header("Content-type: image/jpeg") and the > image content and no html code.
-- .: B i g D o g :.
attached mail follows:
tor, 2002-11-14 kl. 11:14 skrev Chris Hewitt:
> The headers must be the first thing that is sent to the browser. Do all > your other html afterwards, or use output buffering.
Please nobody else bother, it's my own stupid fault for not knowing enough.
I'm halfway there, output buffering will prove to be the answer and like everything else with PHP it's a question of reading and practicing. I'm an OS man rather than a programmer.
Best and thanks,
Tony
--Tony Earnshaw
Cricketers are strange people. They wake up in October, only to find that their wives had left them in May.
e-post: tonni
billy.demon.nl www: http://www.billy.demon.nl
attached mail follows:
The substitution is made only to array keys, not its values...
Brad Apps wrote: > Hey Again, > > I am doing the output from a _POST array and it seems to replace all spaces > and '.'s in the file names with '_'. so a file name brads doc.htm outputs > as brads_doc_htm. Any suggestions, PLEASE. > > Thanks. > >
-- Sebastian Konstanty Zdrojewski IT AnalystNeticon S.r.l. Via Valtellina 16 - 20159 Milano - MI - Italy
Phone (+39) 02.68.80.731 E-Mail s.zdrojewski
neticon.it Website http://www.neticon.it
attached mail follows:
Hi Michael, thanks for your reply.
> Firstly - that error would suggest to me that Word is not installed on your > machine.
Thats true thats why i've been trying to start other applications like wordpad, just to see some funktionality.
>... try looking it up in the registry to confirm the registration > for COM exists.
Maybe you can give me a little hint on that. I've been creating some com components in vb some time ago, but as I remember I had to register them with regsvr.exe but that was for dll's and stuff.
But hey I don't know exactly what you are suggesting, please help.
> Second ... why do you want to run media player to play a wave file on the > server? I would have thought you'd want to activate the script on the client
No, what I am trying to do is, if someone I know activates a button on my site, a sound file will play on my server, which is locate in my kitchen, to catch my attention.
Further more I'd like to control outlook for different tasks.
> Another good idea is to check over the event viewer on the server - there > are sometime some very revealing errors in there.
I've tried that, but did not see any entries related to my problem.
If your com code is running fine, maybe you can remember if you have some special settings in your php.ini, appache or win2k settings.
Any suggestion is welcome.
Thank you very much
KAi
"Michael Hazelden" <michael.hazelden
ocado.com> wrote in message
news:C1260EE72F22C44F833D033A17524AD702A4D159
lhoexc1...
> I've been having some fun with COM myself recently ... so I can suggest a
> couple of things ...
>
> Firstly - that error would suggest to me that Word is not installed on
your
> machine. Remember - in order to interface with an app - it has to be
there.
> If it is ... try looking it up in the registry to confirm the registration
> for COM exists.
>
> Second ... why do you want to run media player to play a wave file on the
> server? I would have thought you'd want to activate the script on the
client
> ...
>
> Another good idea is to check over the event viewer on the server - there
> are sometime some very revealing errors in there.
>
> Cheers,
>
> Michael.
>
> -----Original Message-----
> From: kai [mailto:kai_flash
hotmail.com]
> Sent: 14 November 2002 07:20
> To: php-general
lists.php.net
> Subject: [PHP] runing com
>
>
> hi guy's I have a problem running com+ code and would appreciate any help.
>
> What I like to do is have the mediaplayer run a wave file triggert from
php
> via com.
> but I can not run any example code from the help without errors.
>
>
> this code is from a the help and should work but doesn't on my mashine:
>
> // starting word
> $word = new COM("word.application") or die("Unable to instanciate Word");
> print "Loaded Word, version {$word->Version}\n";
>
> file://bring it to front
> $word->Visible = 1;
> file://open an empty document
> $word->Documents->Add();
> file://do some weird stuff
> $word->Selection->TypeText("This is a test...");
> $word->Documents[1]->SaveAs("Useless test.doc");
> file://closing word
> $word->Quit();
> file://free the object
> $word->Release();
> $word = null;
>
> This is all very basic code and should run.
> I do not have word so I tried with other apps. like wordpad or painbrush
> but allways recieve this error:
>
> Warning: Invalid ProgID, GUID string, or Moniker: Invalid syntax in
> D:\Apache\htdocs\ring.php on line 7
> Unable to instanciate ..........
>
> Now I tried to give the access right's on the particular apps in dcomcnfg
> and
> also edited php.ini to
> allow Distributed-COM calls
> com.allow_dcom = true
>
>
> Does anybody can give me a run down on what I have to do exactly to get
this
> code running for
> let's say wordpad.
>
> Thank you
>
> KAi
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> _____________________________________________________________________
> This message has been checked for all known viruses by the
> MessageLabs Virus Control Centre.
>
> This message has been checked for all known viruses by the MessageLabs
Virus Control Centre.
>
>
> *********************************************************************
>
> Notice: This email is confidential and may contain copyright material of
Ocado Limited (the "Company"). Opinions and views expressed in this message
may not necessarily reflect the opinions and views of the Company.
> If you are not the intended recipient, please notify us immediately and
delete all copies of this message. Please note that it is your
responsibility to scan this message for viruses.
>
> Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY
>
> *********************************************************************
attached mail follows:
Apologies all - that should have just gone to the Windows list ...
-----Original Message-----
From: Michael Hazelden [mailto:michael.hazelden
ocado.com]
Sent: 14 November 2002 10:18
To: 'kai'; php-windows
lists.php.net
Subject: [PHP-WIN] RE: [PHP] runing com
Kai,
I've moved this to the Windows list because someone else here might be able to add something.
I'm afaid I didn't have to adjust anything within the PHP ini or anything - for me it worked pretty much "out of the box".
With regards the registry - in order to check that you are using the appropriate application id - simply open up regedit and search for the name of the identifier you are using - if it's going to be used as a COM identifier - it has to be in there somewhere.
Finding out what that identifier is though (if you don't already know it) ... is another matter ... the easiest way (I think) ... is to use "HKEY_CLASSES_ROOT" in the registry ... browse through that list and look to see if there is something appropriate.
In your case - for Media Player - I found "Mediaplayer.mediaplayer" in my Windows 2000 server registry. It might be the one - but I haven't tried that to see whether it works.
Basically - if you don't have documentation on the functions contained within a COM object - you are a little shafted ... because it's going to be very hard to know what functions to access and how.
Luckily - in my case - the application I interface with has full COM documentation.
Sorry I can't be of more assistance.
Michael.
-----Original Message-----
From: kai [mailto:kai_flash
hotmail.com]
Sent: 14 November 2002 19:05
To: php-general
lists.php.net
Subject: Re: [PHP] runing com
Hi Michael, thanks for your reply.
> Firstly - that error would suggest to me that Word is not installed on your > machine.
Thats true thats why i've been trying to start other applications like wordpad, just to see some funktionality.
>... try looking it up in the registry to confirm the registration > for COM exists.
Maybe you can give me a little hint on that. I've been creating some com components in vb some time ago, but as I remember I had to register them with regsvr.exe but that was for dll's and stuff.
But hey I don't know exactly what you are suggesting, please help.
> Second ... why do you want to run media player to play a wave file on the > server? I would have thought you'd want to activate the script on the client
No, what I am trying to do is, if someone I know activates a button on my site, a sound file will play on my server, which is locate in my kitchen, to catch my attention.
Further more I'd like to control outlook for different tasks.
> Another good idea is to check over the event viewer on the server - there > are sometime some very revealing errors in there.
I've tried that, but did not see any entries related to my problem.
If your com code is running fine, maybe you can remember if you have some special settings in your php.ini, appache or win2k settings.
Any suggestion is welcome.
Thank you very much
KAi
"Michael Hazelden" <michael.hazelden
ocado.com> wrote in message
news:C1260EE72F22C44F833D033A17524AD702A4D159
lhoexc1...
> I've been having some fun with COM myself recently ... so I can suggest a
> couple of things ...
>
> Firstly - that error would suggest to me that Word is not installed on
your
> machine. Remember - in order to interface with an app - it has to be
there.
> If it is ... try looking it up in the registry to confirm the registration
> for COM exists.
>
> Second ... why do you want to run media player to play a wave file on the
> server? I would have thought you'd want to activate the script on the
client
> ...
>
> Another good idea is to check over the event viewer on the server - there
> are sometime some very revealing errors in there.
>
> Cheers,
>
> Michael.
>
> -----Original Message-----
> From: kai [mailto:kai_flash
hotmail.com]
> Sent: 14 November 2002 07:20
> To: php-general
lists.php.net
> Subject: [PHP] runing com
>
>
> hi guy's I have a problem running com+ code and would appreciate any help.
>
> What I like to do is have the mediaplayer run a wave file triggert from
php
> via com.
> but I can not run any example code from the help without errors.
>
>
> this code is from a the help and should work but doesn't on my mashine:
>
> // starting word
> $word = new COM("word.application") or die("Unable to instanciate Word");
> print "Loaded Word, version {$word->Version}\n";
>
> file://bring it to front
> $word->Visible = 1;
> file://open an empty document
> $word->Documents->Add();
> file://do some weird stuff
> $word->Selection->TypeText("This is a test...");
> $word->Documents[1]->SaveAs("Useless test.doc");
> file://closing word
> $word->Quit();
> file://free the object
> $word->Release();
> $word = null;
>
> This is all very basic code and should run.
> I do not have word so I tried with other apps. like wordpad or painbrush
> but allways recieve this error:
>
> Warning: Invalid ProgID, GUID string, or Moniker: Invalid syntax in
> D:\Apache\htdocs\ring.php on line 7
> Unable to instanciate ..........
>
> Now I tried to give the access right's on the particular apps in dcomcnfg
> and
> also edited php.ini to
> allow Distributed-COM calls
> com.allow_dcom = true
>
>
> Does anybody can give me a run down on what I have to do exactly to get
this
> code running for
> let's say wordpad.
>
> Thank you
>
> KAi
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> _____________________________________________________________________
> This message has been checked for all known viruses by the
> MessageLabs Virus Control Centre.
>
> This message has been checked for all known viruses by the MessageLabs
Virus Control Centre.
>
>
> *********************************************************************
>
> Notice: This email is confidential and may contain copyright material of
Ocado Limited (the "Company"). Opinions and views expressed in this message
may not necessarily reflect the opinions and views of the Company.
> If you are not the intended recipient, please notify us immediately and
delete all copies of this message. Please note that it is your
responsibility to scan this message for viruses.
>
> Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY
>
> *********************************************************************
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php_____________________________________________________________________ This message has been checked for all known viruses by the MessageLabs Virus Control Centre.
This message has been checked for all known viruses by the MessageLabs Virus Control Centre.
*********************************************************************
Notice: This email is confidential and may contain copyright material of Ocado Limited (the "Company"). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses.
Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY
*********************************************************************
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
This message has been checked for all known viruses by the MessageLabs Virus Control Centre.
*********************************************************************
Notice: This email is confidential and may contain copyright material of Ocado Limited (the "Company"). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses.
Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY
*********************************************************************
attached mail follows:
Hi \ is the escape character: $real_path=$real_path."\DefaultFld\SubFld\"; should be $real_path=$real_path."\\DefaultFld\\SubFld\\"; or $real_path .= "\\DefaultFld\\SubFld\\"; if you want to shorten it.
Ppf wrote: > Hi All: > I am trying to generate the directory path dynamically > to save the Uploaded file. when i try to concatnate > the string with"\ it generate an error, Hope you guys > can help me in this > here is the code > > $real_Path=realpath("../../index.php"); > $real_path=$real_path."\DefaultFld\SubFld\"; > Here is generate error, I don't know how to escape the > " and \ . I will appreciate your help > Thanks in advance > Prad > > __________________________________________________ > Do you Yahoo!? > U2 on LAUNCH - Exclusive greatest hits videos > http://launch.yahoo.com/u2
attached mail follows:
Hello,
sorry, I have no expiriences with this problem. I was looking for somethink about localo on OpenBSD and I find OpenBSD not support locale. I don't know what is localedef on OpenBSD or what I may do to use function SetLocale in PHP if I runnig it on OpenBSD. Could you help me with it, support PHP locale itself or in the future? Is another way? Thanks Radek
13. listopadu 2002, 16:16:29, jste napsal(a): MK> localedef should tell you
MK> Bc. Radek Krejča wrote:
>>Hi, >> >> I have problem with locale on PHP, how a may instal it, I use >> OpenBSD. >> Thanks >> Radek >> >> >>
-- S pozdravem, Bc. Radek Krejča Starnet, s. r. o. radekceskedomeny.cz +420 608 470980 http://www.ceskedomeny.cz http://www.skdomeny.com http://www.starnet.cz
attached mail follows:
Is it possible to upload multiple files at once without selecting each file with seperate form fields?
attached mail follows:
Hi All,
Is it posible to do multiple file upload without selecting each file manual in multiple form fields?
Rob
attached mail follows:
> Is it posible to do multiple file upload without selecting each file > manual > in multiple form fields?
No.
---John Holmes...
attached mail follows:
Hi,
on 14/11/02 8:12 PM, Funk-XL (robbie
weah.net) wrote:
> Is it posible to do multiple file upload without selecting each file manual > in multiple form fields?
Nope. Only way I can think of would be if the files were pre-zipped/stuffed/gzipped/etc, AND if you were able to decompress on the server, which would only be possible for some compression types.
I'm thinking there MIGHT be some way with a hugely complex Java (not javascript) program, but I'm no expert.
Justin French -------------------- http://Indent.com.au Web Developent & Graphic Design --------------------
attached mail follows:
On Thursday 14 November 2002 18:12, Funk-XL wrote: > Hi All, > > Is it posible to do multiple file upload without selecting each file manual > in multiple form fields?
Nope.
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* O Lord, grant that we may always be right, for Thou knowest we will never change our minds. */
attached mail follows:
Don't get mistaken. Sure it is possible:
<input type="file" name="file[]"> <input type="file" name="file[]"> <input type="file" name="file[]">
this will give you $_FILES['file']['name'][0],$_FILES['file']['name'][1],$_FILES['file']['name'][2], the same for [type],[tmp_name] and [size]
Funk-XL wrote:
>Hi All, > >Is it posible to do multiple file upload without selecting each file manual >in multiple form fields? > >Rob > > > > >
attached mail follows:
Sorry, now I read your question thoroughly, no this is not possible
Funk-XL wrote:
>Hi All, > >Is it posible to do multiple file upload without selecting each file manual >in multiple form fields? > >Rob > > > > >
attached mail follows:
I am probably missing something here, how would you select each file you want? Do you mean just using one form field? Seems like this would be ugly if it was even possible which it looks like it is not. I have a script that uses multiple form fields but one upload button and then just loops through each picture uploading it...this is what you will probably have to do.
Eddie
-----Original Message-----
From: Marek Kilimajer [mailto:kilimajer
webglobe.sk]
Sent: Thursday, November 14, 2002 8:32 AM
To: PHP
Subject: Re: [PHP] multiple file upload
Sorry, now I read your question thoroughly, no this is not possible
Funk-XL wrote:
>Hi All, > >Is it posible to do multiple file upload without selecting each file manual >in multiple form fields? > >Rob > > > > >
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
>Is it posible to do multiple file upload without selecting each file manual >in multiple form fields?
Yes. I have recently implemented an upload mechanism based on hotmails add attachment mechanism. haven't got time for a detailed explanation but here is the basic idea -
on your html page - // a file selector field <input type="file" name="userfile" tabindex="1" class="text"> // add remove files buttons <input type="submit" name="addFile" value=" Add " class="text" tabindex="2"> <input type="submit" name="delFile" value="Remove" class="text" tabindex="3"> // files in the upload list field <select name="selectedFileList[]" size=5 multiple tabindex="4" class="text"> <?php $FooObj->displayFileUploadList(); ?> </select>
file upload list is a database varchar field with each file id seperated with a pipe character -
fileID1|fileID2
add / remove event handlers write / remove entries from this list.
displayFileUploadList writes <option> tags for each file in the list
finally a doUpload function retrieves the file upload list and copies the files from the upload staging area to their final destination.
Incidentally the same mechanism works for lots of other stuff like sending email to multiple recipients etc.
Have Fun,
javier
_________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail
attached mail follows:
here's a couple of the more tricky code snippets which should make it easy for folks to see how a multiple file upload select can work - the rest is basically a lot of interaction with the database - storing / retrieving the upload list.
Its a bit tricky but worth it though - the users responcible for uploads via the system I built have been saying it makes their lives a lot easier.
If i get time i'll try and generalise the whole thing into an absract class that folks can use...
// remove a file from upload target list function removeFileFromUploadList() { $this->getFileUploadList(); // get the upload list from the database $selectedFileList = $_POST['selectedFileList']; // an array of selected values from the multiple select box // diff the arrays, store the new list if ((sizeof($this->uploadFileList) >= 1) && ($selectedFileList != "")) { $this->uploadFileList = array_values(array_diff($this->uploadFileList,$selectedFileList)); // subtract remove items $this->storeFileUploadList(); } }
// add pipe encoding to an array (file upload list) and return a string for storage in db function addPipeEncoding($array) { for ($i = 0; $i < sizeof($array); $i++) { $addPipe = ((sizeof($array) == 1) || ($i == sizeof($array)-1)) ? "" : "|"; $returnValue .= $array[$i].$addPipe; } return $returnValue; }
// remove pipe encoding from string function removePipeEncoding($encodedString) { $split = explode("|",$encodedString); for ($i = 0; $i < sizeof($split); $i++) { if ($split[$i] != "") { $returnArray[] = $split[$i]; } } return $returnArray; }
_________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail
attached mail follows:
> When I require a file from index.php, if there's no .. on the path (a relative > path, but not going back), the relative path is from where the original file > is, but if there's a .. on the path, the relative path is from where the > symlink is (although php identifies the script as the original file in the > error message).
??????? written too complicated.
attached mail follows:
On Wed, 13 Nov 2002 20:12:44 -0500, you wrote:
>When I require a file from index.php, if there's no .. on the path (a relative >path, but not going back), the relative path is from where the original file >is, but if there's a .. on the path, the relative path is from where the >symlink is (although php identifies the script as the original file in the >error message).
That certainly sounds like a bug to me, or at least inconsistent behavior. I'd report it on bugs.php.net...
attached mail follows:
Can you post some sample code as well as paths to symlinks etc.
-js
Michael Sims wrote: > On Wed, 13 Nov 2002 20:12:44 -0500, you wrote: > > >>When I require a file from index.php, if there's no .. on the path (a relative >>path, but not going back), the relative path is from where the original file >>is, but if there's a .. on the path, the relative path is from where the >>symlink is (although php identifies the script as the original file in the >>error message). > > > That certainly sounds like a bug to me, or at least inconsistent > behavior. I'd report it on bugs.php.net... >
attached mail follows:
Hi... How can i connect to a remote host database through mysql.exe? Thank you
attached mail follows:
On Thursday 14 November 2002 19:17, Mr. BuNgL3 wrote: > Hi... > How can i connect to a remote host database through mysql.exe? > Thank you
This is the PHP list, try asking on the MySQL list?
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* First study the enemy. Seek weakness. -- Romulan Commander, "Balance of Terror", stardate 1709.2 */
attached mail follows:
mysql -u username -pPASSWORD -h www.domain.com
"Mr. Bungl3" <mrbungle
netcabo.pt> wrote in message
news:20021114111727.44334.qmail
pb1.pair.com...
> Hi...
> How can i connect to a remote host database through mysql.exe?
> Thank you
>
>
attached mail follows:
> -----Original Message-----
> From: Charles Wiltgen [mailto:lists
wiltgen.net]
> Sent: 13 November 2002 18:28
>
> Here's what I
> was using:
>
> Form:
>
> <form method="post" action="http://domain.com/" name="the_form">
> <input type="hidden" name="foo" value="DUMMY">
> </form>
>
> Link:
>
> <a href="http://coremessaging.com/"
> onClick="document.the_form.foo.value='5';
> document.the_form.submit();">Next</a>
... but there's *still* no GET variables involved here: the form has method="post", and that's not going to change just because you submit it with JavaScript -- the information about "foo" will go in the POST section of your request, and nowhere near the visible URL.
Yours, even more confused,
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford
lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
Additionally...
> -----Original Message-----
> From: Charles Wiltgen [mailto:lists
wiltgen.net]
> Sent: 13 November 2002 18:28
>
> Ford, Mike [LSS] wrote...
>
> > ...But why would they even see that in the first place????
> If I want them
> > to click on a button to do something, I simply make it part
> of a <FORM METHOD=
> > "POST"> and the value gets fed to my script via $_POST
> without the user seeing
> > it in the URL. Why would I ever want to make it more
> complex than this?
>
> It's simpler than you're thinking. This method just allows
> you to use GET
> variables instead of POST variables, but without the GET
> drawback of the
> user seeing what you're sending in the address bar.
But why don't you want to just use POST? If POST gets the information to your script without exposing it in the URL, why are you insisting on using a method that puts it in the URL, and then jumping through hoops to hide it because you didn't really want to put there in the first place? In fact, why are you so desparately trying to avoid using something that so obviously does exactly what you want to do??
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford
lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
Ford, Mike [LSS] wrote...
>> <a href="http://coremessaging.com/" >> onClick="document.the_form.foo.value='5'; >> document.the_form.submit();">Next</a> > > ... but there's *still* no GET variables involved here...
I'm weighing the pros and cons of two different methods: "Invisible GET" and POST. That email described the invisible form + JavaScript POST method.
> But why don't you want to just use POST? If POST gets the information to your > script without exposing it in the URL, why are you insisting on using a method > that puts it in the URL, and then jumping through hoops to hide it because you > didn't really want to put there in the first place? In fact, why are you so > desparately trying to avoid using something that so obviously does exactly > what you want to do??
Two reasons:
- Invisible GET doesn't require JavaScript. I'm unsure whether it's considered fine for a mainstream site to require (not just "be cooler with") JavaScript.
- Invisible GET makes for much shorter web pages, since everything you can click on requires its own invisible form storage somewhere, plus JavaScript code. For example, a simple calendar using POST needs (I estimate) at least 5x the amount of data sent to the client.
-- Charles Wiltgen
attached mail follows:
ok, this is upload.php:
<form enctype="multipart/form-data" action="upload.php" method="post"> <input type="hidden" name="MAX_FILE_SIZE" value="1000"> Send this file: <input name="userfile" type="file"> <input type="submit" value="Send File"> </form>
what else do i need?
"
Edwin" <copperwalls
hotmail.com> wrote in message
news:20021112124140.71748.qmail
pb1.pair.com...
>
> "Tweak2x" <Tweak2x
Carolina.rr.com> wrote in message
> news:20021112123023.55841.qmail
pb1.pair.com...
> > How do i make an upload script?
>
> http://us.php.net/manual/en/features.file-upload.php
>
> - E
>
attached mail follows:
Hi,
> > > How do i make an upload script? > > > > http://us.php.net/manual/en/features.file-upload.php > > ok, this is upload.php: > > <form enctype="multipart/form-data" action="upload.php" method="post"> > <input type="hidden" name="MAX_FILE_SIZE" value="1000"> > Send this file: <input name="userfile" type="file"> > <input type="submit" value="Send File"> > </form>
Yup, copied and pasted from the manual page, that should work.
> > what else do i need?
1. A script to receive the uploads 2. A file to upload
The manual page you linked to above will be of use in completing stage 1 - there's a bit further down that you need to copy and paste as well. Read the user comments as well, as they will answer questions that will inevitably come up.
Stage 2 - well, you're on your own, but there should be something on your hard drive that's suitable.
Cheers Jon
attached mail follows:
Jon,
There's bulk-emailer on hotscripts.com. You could look at its code.
Bruce
-----Original Message-----
From: Jon Haworth [mailto:jhaworth
witanjardine.co.uk]
Sent: Thursday, November 14, 2002 5:37 AM
To: 'Tweak2x'; php-general
lists.php.net
Subject: RE: [PHP] Re: How do i make an upload script?
Hi,
> > > How do i make an upload script? > > > > http://us.php.net/manual/en/features.file-upload.php > > ok, this is upload.php: > > <form enctype="multipart/form-data" action="upload.php" method="post"> > <input type="hidden" name="MAX_FILE_SIZE" value="1000"> > Send this file: <input name="userfile" type="file"> > <input type="submit" value="Send File"> > </form>
Yup, copied and pasted from the manual page, that should work.
> > what else do i need?
1. A script to receive the uploads 2. A file to upload
The manual page you linked to above will be of use in completing stage 1 - there's a bit further down that you need to copy and paste as well. Read the user comments as well, as they will answer questions that will inevitably come up.
Stage 2 - well, you're on your own, but there should be something on your hard drive that's suitable.
Cheers Jon
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
I found this: http://hints.se.linuxfromscratch.org/hints/apache+php4+sql.hint.txt Not sure how small it gets
Maximilian Eberl wrote:
>Hi list, > >has anyone ever experimented to "melt down" the php engine to a few hundred KBs ? >By leaving out not needed libraries/functions ? > >What i am searching for is a very small webserver (exists) and a very small php-engine >through which the webserver can process php-scripts. > >We want to use it for demos. >We are developing dynamic files, but to create demos and send them to the client as as >zipped HTML we always have to rewrite things in html-hardcode or a type of javascript-mimikry > >if we had a php-engine of about 500 kB, a webserver of 200 kB and 100 kB scripts & images, >we could pack a whole, self-executing dynamic webpage demo into an e-Mail-attachement of 800 kB. > >We don't want to send a full Apache and MySQL and PHP engine binaries of about 25 megs via e-Mail. >Or Oracle .. > >Has anyone ever done something like this ? > >Max > > > >
attached mail follows:
Hello,
I'm currently programming a webmail interface with php 4.1.2 and c-client 2001. I'm getting the Mime data from the mail. Now I have the image data as text but how I can get it into an <img> field?
greetz peterschen
---- Liebe ist auch nach einem Bluescreen zu behaupten es gäbe keine Alternative.
attached mail follows:
Christoph wrote: > Hello, > > I'm currently programming a webmail interface with php 4.1.2 and > c-client 2001. > I'm getting the Mime data from the mail. > Now I have the image data as text but how I can get it into an <img> > field?
At first, you'll have to convert the data back to binary using the encoding specified in the header (of that MIME part). Then you'll have to save the image to the disk (or to a database), after which you can use the <img> tag. Be sure to give the filename the correct extension (which you can gain using the content-type, also specified in the header of that MIME-part).
Grtz Erwin
attached mail follows:
Do you use sessions? If so, try using session_cache_limiter() function. Otherwise connect directly to apache with telnet and see the headers yourself.
Luanna Silva wrote:
> Hello! > > I´m having major problems while trying to cache php scripts on Apache. > > Could you help me, please? I really dont know what to do anymore. > > I have a client, a reverse proxy and a Apache Web Server. The proxy is caching the static, but not the dynamic stuff. > > I´ve tried to use Apache mod_expires, like this: > ><IfModule mod_expires.c> > <FilesMatch "\.php$"> > ExpiresActive on > ExpiresDefault "access plus 1 hour" > </FilesMatch> ></IfModule> > > >but it didnt work. > > > Any help will be appreciated. > > Regards, > >Luanna > > >
attached mail follows:
hello
I'm trying to generate ms-word files with php. Until now, I can create a document and even insert page-breaks. Is there any tutorials going further (boxes, mergedocuments etc...)?
this is my code so far:
<?php header ('Content-type: application/msword '); header ('Content-Description: PHP Generated Data'); header ('Content-Disposition: inline; filename="test.doc"'); ?> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head>
<body> Text before PagBreak <br clear=all style='page-break-before:always'> Text after PagBreak</body> </html>
Thank you for any help. michael
attached mail follows:
You might want to do a search on google and see if someone has written a class on creating word documents.
I am almost certain that someone has created on.
This will save you much time...
On Thu, 2002-11-14 at 12:34, michael wrote: > hello > > I'm trying to generate ms-word files with php. Until now, I can create a > document and even insert page-breaks. Is there any tutorials going further > (boxes, mergedocuments etc...)? > > this is my code so far: > > <?php > header ('Content-type: application/msword '); > header ('Content-Description: PHP Generated Data'); > header ('Content-Disposition: inline; filename="test.doc"'); > ?> > <html> > <head> > <title></title> > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> > </head> > > <body> > Text before PagBreak > <br clear=all style='page-break-before:always'> > Text after PagBreak</body> > </html> > > Thank you for any help. > michael >
-- .: B i g D o g :.
attached mail follows:
http://sourceforge.net/projects/php-doc-xls-gen/
On 14 Nov 2002 08:22:00 +0000
BigDog <bigdog
venticon.com> wrote:
> You might want to do a search on google and see if someone has written > a class on creating word documents. > > I am almost certain that someone has created on. > > This will save you much time... > > On Thu, 2002-11-14 at 12:34, michael wrote: > > hello > > > > I'm trying to generate ms-word files with php. Until now, I can > > create a document and even insert page-breaks. Is there any > > tutorials going further(boxes, mergedocuments etc...)? > >
-- TomDon't throw your computer out the window, throw the Windows out of your computer!
attached mail follows:
I'm using this code to various files for download via a http header -
$filename = basename($filepath); header("Content-type: unknown/unknown"); header("Content-Disposition: attachment; filename=$filename"); readfile($filepath);
works fine in most cases - the save dialogue appears. However -
IE on a MAC loads the file inline rather than throwing the save prompt.
Any ideas?
Javier
_________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
attached mail follows:
At 15:13 14.11.2002, Javier Montserat spoke out and said: --------------------[snip]-------------------- >I'm using this code to various files for download via a http header - > >$filename = basename($filepath); >header("Content-type: unknown/unknown"); >header("Content-Disposition: attachment; filename=$filename"); >readfile($filepath); > >works fine in most cases - the save dialogue appears. However - > >IE on a MAC loads the file inline rather than throwing the save prompt. --------------------[snip]--------------------
Try the "application/octet-stream" content type. Any browser should ask to save this.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
attached mail follows:
I have a "contact us" php script on my site that allows users to email direct from the webiste. I want to be able to pass the to address and subject line to the script so I can call teh web page from elsewhere on the site and have it automatically choose the correct email address and subject line.
EG instad of using <a href=mailto:joe
bloggs.mail.com> which requires them
to have an email client set up on the machine I want to link to
<a href=contactus.php?email=director subject=job enquiry>
The script already handles the email=director by setting a default entry in
a drop down form but I can't get it to separate the first and second
variables in the URL.
Also is this a big security risk as I will be echoing the 2nd variable as the contents of a form field. Would it be possible for someone to type in the URL with HTML/php in it that would make a mess of everything? How can I protect against this? Would it be sufficient to just pase the 2nd variable for non alphabetic characters and remove them?
attached mail follows:
you will have to use "&" to separate the variables. ie <a href=contactus.php?email=director&subject=job enquiry>
Otherwise it will be deem as one variable instead
CK Ong
--- CJ <newsgroupcontact
seseaz.org.uk> wrote: > I
have a "contact us" php script on my site that
> allows users to email
> direct from the webiste. I want to be able to pass
> the to address and
> subject line to the script so I can call teh web
> page from elsewhere on the
> site and have it automatically choose the correct
> email address and subject
> line.
>
> EG instad of using <a
> href=mailto:joe
bloggs.mail.com> which requires them
> to have an email client set up on the machine I want
> to link to
> <a href=contactus.php?email=director subject=job
> enquiry>
> The script already handles the email=director by
> setting a default entry in
> a drop down form but I can't get it to separate the
> first and second
> variables in the URL.
>
> Also is this a big security risk as I will be
> echoing the 2nd variable as
> the contents of a form field. Would it be possible
> for someone to type in
> the URL with HTML/php in it that would make a mess
> of everything? How can I
> protect against this? Would it be sufficient to
> just pase the 2nd variable
> for non alphabetic characters and remove them?
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________ Do You Yahoo!? Play for a chance to win a trip to Sydney! http://sg.mobile.yahoo.com
attached mail follows:
Does this not work...
<a href=contactus.php?email=director&subject=job enquiry>
On Thu, 2002-11-14 at 14:11, CJ wrote:
> I have a "contact us" php script on my site that allows users to email
> direct from the webiste. I want to be able to pass the to address and
> subject line to the script so I can call teh web page from elsewhere on the
> site and have it automatically choose the correct email address and subject
> line.
>
> EG instad of using <a href=mailto:joe
bloggs.mail.com> which requires them
> to have an email client set up on the machine I want to link to
> <a href=contactus.php?email=director subject=job enquiry>
> The script already handles the email=director by setting a default entry in
> a drop down form but I can't get it to separate the first and second
> variables in the URL.
>
> Also is this a big security risk as I will be echoing the 2nd variable as
> the contents of a form field. Would it be possible for someone to type in
> the URL with HTML/php in it that would make a mess of everything? How can I
> protect against this? Would it be sufficient to just pase the 2nd variable
> for non alphabetic characters and remove them?
-- .: B i g D o g :.
attached mail follows:
Change the space in job enquiry to a +
Adam
On 14 Nov 2002, BigDog wrote:
> Does this not work...
>
> <a href=contactus.php?email=director&subject=job enquiry>
>
>
>
> On Thu, 2002-11-14 at 14:11, CJ wrote:
> > I have a "contact us" php script on my site that allows users to email
> > direct from the webiste. I want to be able to pass the to address and
> > subject line to the script so I can call teh web page from elsewhere on the
> > site and have it automatically choose the correct email address and subject
> > line.
> >
> > EG instad of using <a href=mailto:joe
bloggs.mail.com> which requires them
> > to have an email client set up on the machine I want to link to
> > <a href=contactus.php?email=director subject=job enquiry>
> > The script already handles the email=director by setting a default entry in
> > a drop down form but I can't get it to separate the first and second
> > variables in the URL.
> >
> > Also is this a big security risk as I will be echoing the 2nd variable as
> > the contents of a form field. Would it be possible for someone to type in
> > the URL with HTML/php in it that would make a mess of everything? How can I
> > protect against this? Would it be sufficient to just pase the 2nd variable
> > for non alphabetic characters and remove them?
>
attached mail follows:
that works fine thanks. Now for what to do with the variables (new post "scanning for non alpha characters")
"Bigdog" <bigdog
venticon.com> wrote in message
news:1037262239.10847.17.camel
pclnxrhunter.digitalglobe.com...
> Does this not work...
>
> <a href=contactus.php?email=director&subject=job enquiry>
>
>
>
> On Thu, 2002-11-14 at 14:11, CJ wrote:
> > I have a "contact us" php script on my site that allows users to email
> > direct from the webiste. I want to be able to pass the to address and
> > subject line to the script so I can call teh web page from elsewhere on
the
> > site and have it automatically choose the correct email address and
subject
> > line.
> >
> > EG instad of using <a href=mailto:joe
bloggs.mail.com> which requires
them
> > to have an email client set up on the machine I want to link to
> > <a href=contactus.php?email=director subject=job enquiry>
> > The script already handles the email=director by setting a default entry
in
> > a drop down form but I can't get it to separate the first and second
> > variables in the URL.
> >
> > Also is this a big security risk as I will be echoing the 2nd variable
as
> > the contents of a form field. Would it be possible for someone to type
in
> > the URL with HTML/php in it that would make a mess of everything? How
can I
> > protect against this? Would it be sufficient to just pase the 2nd
variable
> > for non alphabetic characters and remove them?
> --
> .: B i g D o g :.
>
>
attached mail follows:
And...
--- CJ <newsgroupcontact
seseaz.org.uk> wrote:
...[snip]...
> > Also is this a big security risk as I will be > > echoing the 2nd variable as the contents of a form field. > > Would it be possible for someone to type in > > the URL with HTML/php in it that would make a mess > > of everything?
Well, it is possible.
> > How can I protect against this?
Validate *everything* that comes in.
> > Would it be sufficient to just pase the 2nd variable > > for non alphabetic characters and remove them?
A better approach would be: 1. Use method="post" instead of the default method="get" 2. You can try "limiting" the subject that a person can choose
For #2, you could create a drop-down like this:
<select name="subject"> <option value="1">Enquiry</option> <option value="2">Comments</option> <!-- other options here --> </select>
Notice that your values are numeric so you can just is_numeric() to validate them. There's a catch though--inside your script you have to turn those numbers back into its corresponding description (e.g. "comments", etc.)
Of course, you just decide to NOT use the above way. You can have the descriptions being pass directly. (i.e. <option>Enquiry</option>, etc.) This time, perhaps, you can use regex or something to validate them.
HTH,
- E
attached mail follows:
And if you want your pages to be valid xhtml, make sure that you have quotes:
<a href="...">
Also, be sure to use "&" instead of just "&".
- E
"Adam Williams" <awilliam
mdah.state.ms.us> wrote:
> Change the space in job enquiry to a +
>
> Adam
>
> On 14 Nov 2002, BigDog wrote:
>
> > Does this not work...
> >
> > <a href=contactus.php?email=director&subject=job enquiry>
> >
...[snip]...
attached mail follows:
I want to scan the variables passed from teh url of my script for non alpha characters. The variables should only consist of a-z A-Z 0-9 and spaces, full stops and commas (Basically I don't want scripts to be passed via the variable to the server)
I've used perl a long time ago and its regular expressions seemed ideal for this kind of thing. Can enybody suggest a scrip to remove unwanted characters from my variable?
attached mail follows:
PHP also supports regular expressions Check the manual at php.net for more information (ereg_replace a.s.o)
Coert
Cj wrote: > I want to scan the variables passed from teh url of my script for non alpha > characters. The variables should only consist of a-z A-Z 0-9 and spaces, > full stops and commas (Basically I don't want scripts to be passed via the > variable to the server) > > I've used perl a long time ago and its regular expressions seemed ideal for > this kind of thing. Can enybody suggest a scrip to remove unwanted > characters from my variable? > >
attached mail follows:
At 16:32 14.11.2002, CJ spoke out and said: --------------------[snip]-------------------- >I want to scan the variables passed from teh url of my script for non alpha >characters. The variables should only consist of a-z A-Z 0-9 and spaces, >full stops and commas (Basically I don't want scripts to be passed via the >variable to the server) > >I've used perl a long time ago and its regular expressions seemed ideal for >this kind of thing. Can enybody suggest a scrip to remove unwanted >characters from my variable? --------------------[snip]--------------------
<?php $string = 'A string, with a lot of unwanted characters, more than 20 bytes long...'; echo "$string<br>"; echo preg_replace('/[^a-zA-Z0-9]/',null,$string), '<br>';
?>
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
attached mail follows:
Did check them, it suggested that it was an optional library! I'll look into ereg_replace.
Thanks
CJ
"Coert Metz" <coert
metzonline.nl> wrote in message
news:3DD3C27A.9070504
metzonline.nl...
> PHP also supports regular expressions
> Check the manual at php.net for more information
> (ereg_replace a.s.o)
>
> Coert
>
> Cj wrote:
> > I want to scan the variables passed from teh url of my script for non
alpha
> > characters. The variables should only consist of a-z A-Z 0-9 and
spaces,
> > full stops and commas (Basically I don't want scripts to be passed via
the
> > variable to the server)
> >
> > I've used perl a long time ago and its regular expressions seemed ideal
for
> > this kind of thing. Can enybody suggest a scrip to remove unwanted
> > characters from my variable?
> >
> >
>
attached mail follows:
I've got a mysql based website with a php scripted fromt end. I want to parse the output the php scripts get from the database before "printing it as html" for swear words and substitute these for more acceptable words (on a word for word basis). I need to do it this way as I want to keep the original posts in their "rude" form in case I need evidence for misuse of the site. I need to be able to check for words separated by non alpha characters in case people get clever and write obscenities separated w i t h s p a c e s or with o_t_h_e_r characters or even new l i n e s or wordsruntogetherintoonelongword. I also want a list of permitted words that contain swearwords such as "Scunthorpe" which won't get changed.
Has anybody done this? I have a feeling that there is a 1 line regular expression out there that will do this nicely.
Any help appreciated
Feeling rusty at coding...
CJ
attached mail follows:
I'm posting this again as i got a mail saying
Trend SMEX Content Filter has detected sensitive content.
Place = php-general
lists.php.net; ;
Sender = CJ
Subject = [PHP] Swear word substitution
Delivery Time = November 14, 2002 (Thursday) 23:40:23
Policy = Dirty Words
Action on this mail = Delete message
Warning message from administrator: Sender, Content filter has detected a sensitive e-mail.
There was not a swear word in my original post but there was a word that contained a swear word but is itself not a swear word. The word is Scu
n
thorpe
and I need a script to allow wordslike this but remove proper swearwords.
I've got a mysql based website with a php scripted fromt end. I want to parse the output the php scripts get from the database before "printing it as html" for swear words and substitute these for more acceptable words (on a word for word basis). I need to do it this way as I want to keep the original posts in their "rude" form in case I need evidence for misuse of the site. I need to be able to check for words separated by non alpha characters in case people get clever and write obscenities separated w i t h s p a c e s or with o_t_h_e_r characters or even new l i n e s or wordsruntogetherintoonelongword. I also want a list of permitted words that contain swearwords such as "Sc%%thorpe" which won't get changed.
Has anybody done this? I have a feeling that there is a 1 line regular expression out there that will do this nicely.
Any help appreciated
Feeling rusty at coding...
CJ
attached mail follows:
I have been trying to figure something out here and am having problems. What I have is a problem with outputting some info in a table. Here is what I have and the problem is in the "getstart_end" function. This should be a working copy if you want to run it and I have put in some sample times.
// $dend is actually how many hours from the start time. It is not a clock time in itself. // So that would mean that a $dstart of 07:00:00 and a $dend of 6:00:00 would actually make // the $dend time 13:00:00 (1pm) createtemptable(); populatetemptable(); $dstart="07:00:00"; $dend="6:00:00"; deletetimes($dstart,$dend); $dstart="18:00:00"; $dend="3:40:00"; deletetimes($dstart,$dend); getstart_end(); droptemptable();
// This just creates the table and works function createtemptable(){ $result=mysql_query("CREATE TEMPORARY TABLE IF NOT EXISTS aplayabletimes (`min` time ) TYPE=MyISAM"); }
// This just populates the table in 5 minute increments and works function populatetemptable(){ for($i=0;$i<1435;$i=$i+5){ $minutes=$minutes+5; if($minutes=="60"){ $minutes="00"; $hours=$hours+1; } $time="$hours:$minutes:$seconds"; $result=mysql_query("INSERT INTO aplayabletimes (min) values (\"$time\")"); } }
/ / This deletes times from the table and works function deletetimes($dstart,$dend){ list($hours,$minutes,$seconds)=split(":",$dstart); list($houre,$minutee,$seconde)=split(":",$dend); $minutee=$minutee+$minutes; $houre=$houre+$hours; if($minutee>=60){$minutee=$minutee-60;$houre=$houre=1;} $dend="$houre:$minutee:00"; $result=mysql_query("DELETE FROM aplayabletimes WHERE min > '$dstart' AND min < '$dend'"); }
// Here is where I am having problems. I need it to give me the start time // And the end time. There can be gaps in the table for times. // It starts at 00:00:00 and goes to 23:55:00 (in 5 minute increments). Once time frames are deleted, // it could have times from (example) 07:00:00 - 13:00:00 and another time frame from // 18:00:00 to 21:40:00. What I need it to do is to output like this: // "First Start Time - First End Time" newline // "Next Start Time - Next End Time" newline // etc....... (because there can be multiple start and end times) // To determine if there is a new time block, there would be more than a 5 minute gap between // the end of one time block and the start of another time block. // The $i is just to grab the first block and I know there has to be a better way then this to do that too. function getstart_end(){ $result=mysql_query("SELECT * FROM aplayabletimes ORDER BY min"); while(($row=mysql_fetch_object($result))){ if(!$i){ echo $row->min . " - "; }else{ } $i++; } }
// This just deletes the temporary table function droptemptable(){ $result=mysql_query("DROP TEMPORARY TABLE playabletimes"); }
Thank You in advance for any help that you can give me on the problem. Steve
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ow3
attached mail follows:
I'm now understanding how you can get PHP to present you with a username and password promt just like APache would do if you had a .htaccess file in the directory you were trying to enter. Great idea but it seems that it would be easier to just use the .htaccess file in the directory.
What I've been trying to find out is how to pass through a .htaccess file if someone has already passed an database authentication lookup in PHP.
I have an area on my site "Special Publications" where users login and their username and password is checked against a MySQL database. One field in their user records is the URL to their directory on our server. Each one of these directories is protected via .htaccess. What I would really like to do is have them redirected to their URL if they pass authentication and not have them enter their username and password again. Is their a way to do this?
Thanks,
Ed
On Wed, 13 Nov 2002, Ewout de Boer wrote:
> in httpd.conf
>
> <Directory /scriptdir>
> AllowOverride AuthConfig
> </Directory>
>
>
> More info at http://httpd.apache.org/docs/mod/core.html#allowoverride
>
>
> regards,
>
> Ewout
>
>
> ----- Original Message -----
> From: "Alexander Bemme" <ab
ovit.de>
> To: <php-general
lists.php.net>
> Sent: Wednesday, November 13, 2002 12:02 PM
> Subject: [PHP] PHP Auth with Apache
>
>
> > Hi,
> > i got a little problem (i hope so)
> >
> > I have installed Apache 1.3.26 and PHP 4.2.3 as module.
> >
> > I used the example from www.php.net to do a PHP authentication,
> > but it didn't work, the pop appears but i can't login.
> >
> > In PHPManual is someting about "AuthType" but nothing about how
> > to fix it.
> >
> > Can someone help out?
> >
> > Thanks
> >
> > --Alex
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
Ed,
When you do auth with mysql and they succeed then u can set the $_SERVER['PHP_AUTH_USER'] and in theory that should allow you to connect to the directory because that should be set for apache http authentication.
You might have to play with it, but i am sure you can get it to work.
On Thu, 2002-11-14 at 16:42, ed
home.homes2see.com wrote:
> I'm now understanding how you can get PHP to present you with a username
> and password promt just like APache would do if you had a .htaccess file
> in the directory you were trying to enter. Great idea but it seems that it
> would be easier to just use the .htaccess file in the directory.
>
> What I've been trying to find out is how to pass through a .htaccess file
> if someone has already passed an database authentication lookup in PHP.
>
> I have an area on my site "Special Publications" where users login and
> their username and password is checked against a MySQL database. One field
> in their user records is the URL to their directory on our server. Each
> one of these directories is protected via .htaccess. What I would really
> like to do is have them redirected to their URL if they pass
> authentication and not have them enter their username and password again.
> Is their a way to do this?
>
> Thanks,
>
> Ed
>
>
>
> On Wed, 13 Nov 2002, Ewout de Boer wrote:
>
> > in httpd.conf
> >
> > <Directory /scriptdir>
> > AllowOverride AuthConfig
> > </Directory>
> >
> >
> > More info at http://httpd.apache.org/docs/mod/core.html#allowoverride
> >
> >
> > regards,
> >
> > Ewout
> >
> >
> > ----- Original Message -----
> > From: "Alexander Bemme" <ab
ovit.de>
> > To: <php-general
lists.php.net>
> > Sent: Wednesday, November 13, 2002 12:02 PM
> > Subject: [PHP] PHP Auth with Apache
> >
> >
> > > Hi,
> > > i got a little problem (i hope so)
> > >
> > > I have installed Apache 1.3.26 and PHP 4.2.3 as module.
> > >
> > > I used the example from www.php.net to do a PHP authentication,
> > > but it didn't work, the pop appears but i can't login.
> > >
> > > In PHPManual is someting about "AuthType" but nothing about how
> > > to fix it.
> > >
> > > Can someone help out?
> > >
> > > Thanks
> > >
> > > --Alex
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
-- .: B i g D o g :.
attached mail follows:
Y have a problemm
Warning: Cannot send session cache limiter - headers already sent (output started at c:\foxserv\www\t-demo1\pedidos\prod_oficina.php:5) in c:\foxserv\www\t-demo1\pedidos\prod_oficina.php on line 6
Ysrael Guzmán Meza
-----Mensaje original-----
De: BigDog [mailto:bigdog
venticon.com]
Enviado el: Jueves, 14 de Noviembre de 2002 04:51 a.m.
Para: php-general
lists.php.net
Asunto: Re: [PHP] PHP Auth with Apache
Ed,
When you do auth with mysql and they succeed then u can set the $_SERVER['PHP_AUTH_USER'] and in theory that should allow you to connect to the directory because that should be set for apache http authentication.
You might have to play with it, but i am sure you can get it to work.
On Thu, 2002-11-14 at 16:42, ed
home.homes2see.com wrote:
> I'm now understanding how you can get PHP to present you with a
> username and password promt just like APache would do if you had a
> .htaccess file in the directory you were trying to enter. Great idea
> but it seems that it would be easier to just use the .htaccess file in
> the directory. > > What I've been trying to find out is how to pass through a .htaccess > file if someone has already passed an database authentication lookup > in PHP. > > I have an area on my site "Special Publications" where users login and
> their username and password is checked against a MySQL database. One > field in their user records is the URL to their directory on our > server. Each one of these directories is protected via .htaccess. What
> I would really like to do is have them redirected to their URL if they
> pass authentication and not have them enter their username and
> password again. Is their a way to do this?
>
> Thanks,
>
> Ed
>
>
>
> On Wed, 13 Nov 2002, Ewout de Boer wrote:
>
> > in httpd.conf
> >
> > <Directory /scriptdir>
> > AllowOverride AuthConfig
> > </Directory>
> >
> >
> > More info at
> > http://httpd.apache.org/docs/mod/core.html#allowoverride
> >
> >
> > regards,
> >
> > Ewout
> >
> >
> > ----- Original Message -----
> > From: "Alexander Bemme" <ab
ovit.de>
> > To: <php-general
lists.php.net>
> > Sent: Wednesday, November 13, 2002 12:02 PM
> > Subject: [PHP] PHP Auth with Apache
> >
> >
> > > Hi,
> > > i got a little problem (i hope so)
> > >
> > > I have installed Apache 1.3.26 and PHP 4.2.3 as module.
> > >
> > > I used the example from www.php.net to do a PHP authentication,
> > > but it didn't work, the pop appears but i can't login.
> > >
> > > In PHPManual is someting about "AuthType" but nothing about how to
> > > fix it. > > > > > > Can someone help out? > > > > > > Thanks > > > > > > --Alex > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > >
-- .: B i g D o g :.-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
You have a space or a tag or something before you call session_start, session_start has to be the very first thing, unless you use output buffering (ob_start, etc).
On Thu, 2002-11-14 at 11:54, Ysrael Guzmán wrote:
> Y have a problemm
>
> Warning: Cannot send session cache limiter - headers already sent
> (output started at c:\foxserv\www\t-demo1\pedidos\prod_oficina.php:5) in
> c:\foxserv\www\t-demo1\pedidos\prod_oficina.php on line 6
>
> Ysrael Guzmán Meza
>
>
> -----Mensaje original-----
> De: BigDog [mailto:bigdog
venticon.com]
> Enviado el: Jueves, 14 de Noviembre de 2002 04:51 a.m.
> Para: php-general
lists.php.net
> Asunto: Re: [PHP] PHP Auth with Apache
>
>
> Ed,
>
> When you do auth with mysql and they succeed then u can set the
> $_SERVER['PHP_AUTH_USER'] and in theory that should allow you to connect
> to the directory because that should be set for apache http
> authentication.
>
> You might have to play with it, but i am sure you can get it to work.
>
>
> On Thu, 2002-11-14 at 16:42, ed
home.homes2see.com wrote:
> > I'm now understanding how you can get PHP to present you with a
> > username and password promt just like APache would do if you had a
> > .htaccess file in the directory you were trying to enter. Great idea
> > but it seems that it would be easier to just use the .htaccess file in
>
> > the directory.
> >
> > What I've been trying to find out is how to pass through a .htaccess
> > file if someone has already passed an database authentication lookup
> > in PHP.
> >
> > I have an area on my site "Special Publications" where users login and
>
> > their username and password is checked against a MySQL database. One
> > field in their user records is the URL to their directory on our
> > server. Each one of these directories is protected via .htaccess. What
>
> > I would really like to do is have them redirected to their URL if they
>
> > pass authentication and not have them enter their username and
> > password again. Is their a way to do this?
> >
> > Thanks,
> >
> > Ed
> >
> >
> >
> > On Wed, 13 Nov 2002, Ewout de Boer wrote:
> >
> > > in httpd.conf
> > >
> > > <Directory /scriptdir>
> > > AllowOverride AuthConfig
> > > </Directory>
> > >
> > >
> > > More info at
> > > http://httpd.apache.org/docs/mod/core.html#allowoverride
> > >
> > >
> > > regards,
> > >
> > > Ewout
> > >
> > >
> > > ----- Original Message -----
> > > From: "Alexander Bemme" <ab
ovit.de>
> > > To: <php-general
lists.php.net>
> > > Sent: Wednesday, November 13, 2002 12:02 PM
> > > Subject: [PHP] PHP Auth with Apache
> > >
> > >
> > > > Hi,
> > > > i got a little problem (i hope so)
> > > >
> > > > I have installed Apache 1.3.26 and PHP 4.2.3 as module.
> > > >
> > > > I used the example from www.php.net to do a PHP authentication,
> > > > but it didn't work, the pop appears but i can't login.
> > > >
> > > > In PHPManual is someting about "AuthType" but nothing about how to
>
> > > > fix it.
> > > >
> > > > Can someone help out?
> > > >
> > > > Thanks
> > > >
> > > > --Alex
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > > >
> > > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> --
> .: B i g D o g :.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
-- Adam Voigt (adamcryptocomm.com) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQA909WgF9k9BmZXCWYRAtcPAKCUUw9yeu7cTDO6ClXQcYHw+gfoGwCeJaVZ j7qXqTUYK9oZdYDudqLqsOo= =x9// -----END PGP SIGNATURE-----
attached mail follows:
put the following line in the .qmail file for that user
|/path/to/your/script/yourscript.php
HTH R'twick
----- Original Message -----
From: "Mike D" <mike
awn.com>
To: <php-general
lists.php.net>
Sent: Wednesday, November 13, 2002 3:12 PM
Subject: [PHP] Mail Question
> Does anyone know of a way to achieve the following on
> linux/apache/qmail/php server
>
> > I want to have an email address that when people send a message to,
> a php script is triggered and the data of the email is extracted and
> inserted into a DB for use in a ticketing system.
>
> I know how to do all of the above except how to trigger a php script
> from an incoming email.
>
> Any ideas anyone?
>
> Thanks,
> Mike Dunlop
>
>
>
>
>
> Mike Dunlop
> Webmaster - AWN, Inc.
> [E] webmaster
awn.com
> [P] 323.606.4237
> [F] 323.466.6619
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
attached mail follows:
Not specifically php-problem, but.. How could i run a php-script from command line (cron.daily) using no GUI or X ?? There should be some way of using a browser or comparable. my PHP is not enabled for command line script. Regards Aate Drageset
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]