php-windows Digest 11 Sep 2003 00:30:20 -0000 Issue 1905
Topics (messages 21339 through 21353):
Extracting images from active directory using php
21339 by: Simon Taylor
21343 by: Stephen
mysql+php query
21340 by: Exiang
21341 by: Bobo Wieland
21342 by: Bobo Wieland
Getting a pdf to open in Acrobat
21344 by: George Pitcher
21345 by: Simon Taylor
21347 by: George Pitcher
How to display part of a text field record in the browser with PHP?
21346 by: Marlene Burckhalter
free windows editor with ftp?
21348 by: Chris L
21349 by: Asendorf, John
21350 by: malte
21351 by: Jeremy Whitlock
21352 by: Stephen
Phantom Help
21353 by: S F Alim
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 ---
Hi All,
I am busy trying to display an image extracted from the active directory on
our intranet. This is what I have so far, I have searched the net on this
and come up with very little info.
The following just shows a page stating it could not display the image
because it had errors. If anyone has had experience with this please help...
<?php
$ldap_server = 'ldap://server.world.com';
$auth_user = '[EMAIL PROTECTED]';
$auth_pass = 'password';
$res=ldap_connect($ldap_server);
$bind=ldap_bind($res,$auth_user,$auth_pass);
$info = ldap_read($res,'CN=Joe
Bloggs,OU=Users,DC=world,DC=com','objectclass=*');
$ar = ldap_get_entries($res,$info);
$data = $ar[0]['thumbnailphoto'][0];
echo Header("Content-Type: image/jpg").$data;
?>
Cheers
Simon
--- End Message ---
--- Begin Message ---
I'm not familar with how LDAP works, so my comments are more general coding
type ones.
I suggest first checking your connection for error messages by removing this
bit
> echo Header("Content-Type: image/jpg").$data;
That should then mean that the php error messages become visable (or, if
there are none, a blank page will be displayed.
Secondly, I didn't think you used echo with the header function. Instead, I
normally do this:
Header( "Content-Type: image/jpg" );
echo $data;
This may or may not fix your problem, but some help is better than none!
With any luck someone with more experiance in this field will read your
email in the not to distant future.
Stephen
----- Original Message -----
From: "Simon Taylor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 10, 2003 1:19 PM
Subject: [PHP-WIN] Extracting images from active directory using php
> Hi All,
> I am busy trying to display an image extracted from the active directory
on
> our intranet. This is what I have so far, I have searched the net on this
> and come up with very little info.
> The following just shows a page stating it could not display the image
> because it had errors. If anyone has had experience with this please
help...
>
> <?php
> $ldap_server = 'ldap://server.world.com';
> $auth_user = '[EMAIL PROTECTED]';
> $auth_pass = 'password';
>
> $res=ldap_connect($ldap_server);
> $bind=ldap_bind($res,$auth_user,$auth_pass);
>
> $info = ldap_read($res,'CN=Joe
> Bloggs,OU=Users,DC=world,DC=com','objectclass=*');
>
>
> $ar = ldap_get_entries($res,$info);
> $data = $ar[0]['thumbnailphoto'][0];
>
> echo Header("Content-Type: image/jpg").$data;
> ?>
>
> Cheers
> Simon
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Hi, i hav a problem query a data value from my database
every setting is fine. the database is working too.just i dunno how to do it with php
let say i hav a username and a password in my database
i wanto query the password with given username
$SQL = "SELECT `password` FROM `table` WHERE `username` = '$user';";
$result = mysql_db_query($db,"$SQL",$cid);
but the result i hav is a Resource id #4 but not the value of password that i wan.
Pls help me..thanx.
--- End Message ---
--- Begin Message ---
$SQL = "SELECT 'password' FROM 'table' WHERE 'username' = '".$user."';";
$result = mysql_query($db,$SQL,$cid);
With the above you then do a:
$pass = mysql_fetch_object($result);
$pass->passord //is the password then...
.bobo
----- Original Message -----
From: "Exiang" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 10, 2003 3:00 PM
Subject: [PHP-WIN] mysql+php query
Hi, i hav a problem query a data value from my database
every setting is fine. the database is working too.just i dunno how to do it
with php
let say i hav a username and a password in my database
i wanto query the password with given username
$SQL = "SELECT `password` FROM `table` WHERE `username` = '$user';";
$result = mysql_db_query($db,"$SQL",$cid);
but the result i hav is a Resource id #4 but not the value of password that
i wan.
Pls help me..thanx.
--- End Message ---
--- Begin Message ---
$SQL = "SELECT 'password' FROM 'table' WHERE 'username' = '".$user."';";
$result = mysql_query($db,$SQL,$cid);
With the above you then do a:
$pass = mysql_fetch_object($result);
$pass->passord //is the password then...
.bobo
----- Original Message -----
From: "Exiang" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 10, 2003 3:00 PM
Subject: [PHP-WIN] mysql+php query
Hi, i hav a problem query a data value from my database
every setting is fine. the database is working too.just i dunno how to do it
with php
let say i hav a username and a password in my database
i wanto query the password with given username
$SQL = "SELECT `password` FROM `table` WHERE `username` = '$user';";
$result = mysql_db_query($db,"$SQL",$cid);
but the result i hav is a Resource id #4 but not the value of password that
i wan.
Pls help me..thanx.
--- End Message ---
--- Begin Message ---
Hi,
I use the following code to grab a pdf from a different disk and then pass
it out to a web-user.
= = = = = = = = =
<?php
$c_id=$_POST['c_id'];
$fpd = "E:\\icon_pdf\\" . $c_id . ".pdf";
$len = filesize($fpd);
header("Content-Type: application/pdf");
header("Content-Disposition: inline; filename=$fpd");
header("Content-Title: $fpd");
header("Content-Length: $len");
readfile($fpd);
?>
= = = = = = = = = =
The problem is that it always asks me which application to use to open the
file. What do I need to do so that 'open' will always launch Acrobat?
Cheers
George
--- End Message ---
--- Begin Message ---
George,
I think you will find that this is the local OS causing the problem. Does it
still do that if Acrobat Reader is installed on the machine browsing?
Cheers
Simon
"George Pitcher" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I use the following code to grab a pdf from a different disk and then pass
> it out to a web-user.
>
> = = = = = = = = =
> <?php
> $c_id=$_POST['c_id'];
> $fpd = "E:\\icon_pdf\\" . $c_id . ".pdf";
> $len = filesize($fpd);
> header("Content-Type: application/pdf");
> header("Content-Disposition: inline; filename=$fpd");
> header("Content-Title: $fpd");
> header("Content-Length: $len");
> readfile($fpd);
> ?>
> = = = = = = = = = =
>
> The problem is that it always asks me which application to use to open the
> file. What do I need to do so that 'open' will always launch Acrobat?
>
> Cheers
>
> George
--- End Message ---
--- Begin Message ---
Simon,
I have Reader 6 on my Win2k machine. I also have Full Acrobat 5 but I don't
get problems when accessing pdf files at other sites.
For info, I'm not serving this on my machine. Its on an NT machine a couple
of counties away.
George
> -----Original Message-----
> From: Simon Taylor [mailto:[EMAIL PROTECTED]
> Sent: 10 September 2003 3:19 pm
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: Getting a pdf to open in Acrobat
>
>
> George,
> I think you will find that this is the local OS causing the
> problem. Does it
> still do that if Acrobat Reader is installed on the machine browsing?
> Cheers
> Simon
>
> "George Pitcher" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi,
> >
> > I use the following code to grab a pdf from a different disk
> and then pass
> > it out to a web-user.
> >
> > = = = = = = = = =
> > <?php
> > $c_id=$_POST['c_id'];
> > $fpd = "E:\\icon_pdf\\" . $c_id . ".pdf";
> > $len = filesize($fpd);
> > header("Content-Type: application/pdf");
> > header("Content-Disposition: inline; filename=$fpd");
> > header("Content-Title: $fpd");
> > header("Content-Length: $len");
> > readfile($fpd);
> > ?>
> > = = = = = = = = = =
> >
> > The problem is that it always asks me which application to use
> to open the
> > file. What do I need to do so that 'open' will always launch Acrobat?
> >
> > Cheers
> >
> > George
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
XP - Apache - MySQL - PHP
Can someone give me a hint? Thanks for any help.
I have successfully pulled the text field record from the database, but need some
direction about how to only display part of the text:
$query = "SELECT youth_announce_num, youth_announce_text FROM
$youthannounce_tablename
WHERE youth_announce_start >= curdate()
ORDER BY youth_announce_date
LIMIT 7";
$result = mysql_query($query);
while($query_data = mysql_fetch_array($result)) {
$thetext = $query_data["youth_announce_text"];
...omit...
echo "$thetext<BR><BR>";
...omit...
Marlene
eJeb Solutions
--- End Message ---
--- Begin Message ---
Any recommendations for a free windows editor suitable for PHP that has FTP
built-in?
Also, recommendations for a decent free editor without FTP would be
welcomed. I am making recommendations to my students who are learning
PHP/MySQL and for whom Emacs is a bit much to ask :) Integrated FTP would
be useful, but not necessary...
--- End Message ---
--- Begin Message ---
The answer to both of those is HTML-Kit by Chamisoft...
---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit
> -----Original Message-----
> From: Chris L [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 10, 2003 11:34 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] free windows editor with ftp?
>
>
> Any recommendations for a free windows editor suitable for
> PHP that has FTP
> built-in?
>
> Also, recommendations for a decent free editor without FTP would be
> welcomed. I am making recommendations to my students who are learning
> PHP/MySQL and for whom Emacs is a bit much to ask :)
> Integrated FTP would
> be useful, but not necessary...
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
I use Maguma Studio. Its easy to use and has FTP funtionality. It is
available for free on
http://www.maguma.com/en/download.html
----- Original Message -----
From: "Chris L" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 10, 2003 5:34 PM
Subject: [PHP-WIN] free windows editor with ftp?
> Any recommendations for a free windows editor suitable for PHP that has
FTP
> built-in?
>
> Also, recommendations for a decent free editor without FTP would be
> welcomed. I am making recommendations to my students who are learning
> PHP/MySQL and for whom Emacs is a bit much to ask :) Integrated FTP would
> be useful, but not necessary...
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
I use Maguma too and the free version is great. It's FTP capabilities
is easy to use and powerful. Laters, Jeremy
-----Original Message-----
From: malte [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 10, 2003 11:50 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] free windows editor with ftp?
I use Maguma Studio. Its easy to use and has FTP funtionality. It is
available for free on
http://www.maguma.com/en/download.html
----- Original Message -----
From: "Chris L" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 10, 2003 5:34 PM
Subject: [PHP-WIN] free windows editor with ftp?
> Any recommendations for a free windows editor suitable for PHP that
has
FTP
> built-in?
>
> Also, recommendations for a decent free editor without FTP would be
> welcomed. I am making recommendations to my students who are learning
> PHP/MySQL and for whom Emacs is a bit much to ask :) Integrated FTP
would
> be useful, but not necessary...
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I have to agree with these two, although the latest non beta version has a
small problem with its code highlighting. However, this has (apparently)
been fixed in beta. It is the best program I have found, and it can open a
huge range of files!
Stephen
----- Original Message -----
From: "Jeremy Whitlock" <[EMAIL PROTECTED]>
To: "'PHP'" <[EMAIL PROTECTED]>
Sent: Wednesday, September 10, 2003 6:50 PM
Subject: RE: [PHP-WIN] free windows editor with ftp?
> I use Maguma too and the free version is great. It's FTP capabilities
> is easy to use and powerful. Laters, Jeremy
>
> -----Original Message-----
> From: malte [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 10, 2003 11:50 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] free windows editor with ftp?
>
> I use Maguma Studio. Its easy to use and has FTP funtionality. It is
> available for free on
>
> http://www.maguma.com/en/download.html
>
>
> ----- Original Message -----
> From: "Chris L" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 10, 2003 5:34 PM
> Subject: [PHP-WIN] free windows editor with ftp?
>
>
> > Any recommendations for a free windows editor suitable for PHP that
> has
> FTP
> > built-in?
> >
> > Also, recommendations for a decent free editor without FTP would be
> > welcomed. I am making recommendations to my students who are learning
> > PHP/MySQL and for whom Emacs is a bit much to ask :) Integrated FTP
> would
> > be useful, but not necessary...
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Dear All,
Please someone can send me this files by email (if possible), since I
don't have internet access.
1. http://www.php.net/extra/bindlib_w32.zip
2. http://www.php.net/extra/win32build.zip
thank you in advance :-).
really appreciate it
Regards,
S F Alim.
Tech Support,
Technical Deptt.,
VodaTel Riyadh.
Date: September 11, 2003.
--- End Message ---