php-general Digest 29 Mar 2003 18:30:54 -0000 Issue 1967

Topics (messages 141557 through 141600):

Re: possible?
        141557 by: Mike Brum
        141559 by: Maciek Ruckgaber Bielecki

Re: mysql ending at start up
        141558 by: Don Read
        141560 by: Joseph Bannon
        141562 by: Jason Wong
        141564 by: Joseph Bannon
        141598 by: Tim Burden

Re: A cool PHP tool - Pusher
        141561 by: Pete James

locate
        141563 by: Joseph Bannon
        141565 by: Kevin Waterson
        141566 by: Jason Wong
        141571 by: Nikunj Virani

Re: Is there a PHP for Dummies?
        141567 by: Haseeb Iqbal

Re: Importing emails
        141568 by: Jason Wong

Re: jason wong (was: locate)
        141569 by: Joseph Bannon
        141570 by: Leif K-Brooks
        141591 by: John W. Holmes

Re: PHP and Web Services (where to start?)
        141572 by: David Otton
        141579 by: Alexandru COSTIN
        141588 by: John W. Holmes

COM
        141573 by: Kiswa

ldap_read() and 'No such object'
        141574 by: Turbo Fredriksson

Help Cookies
        141575 by: Haseeb Iqbal
        141576 by: Daniel Guerrier

Re: Who is Tim O'Reilly?
        141577 by: Lars Tvedt

Problems with post data
        141578 by: Mark Douglas
        141590 by: John W. Holmes

Storing a graphic file in a MySQL database
        141580 by: Phil Schwarzmann
        141581 by: Mark Douglas
        141599 by: Boaz Yahav

Re: XML+XSLT or Smarty again??
        141582 by: rush

Removing a string from one area to another...
        141583 by: Al

Image size, (not weight) help
        141584 by: Webmaster MBT
        141585 by: Haseeb Iqbal

File Type Validation problem.
        141586 by: Webmaster MBT
        141587 by: Haseeb Iqbal

Cliend Side Support
        141589 by: Sancar Saran
        141592 by: John W. Holmes

Re: Can't connect to mysql
        141593 by: Jim Lucas
        141596 by: Tim Burden

combining multi-dimensional arrays from multiple parse_ini_file r esults
        141594 by: Merritt, Dave
        141595 by: Haseeb Iqbal

Re: Session Theft
        141597 by: Beauford.2002

Re: Is there any easy way to take out the mime of an email...
        141600 by: Al

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 ---
How I deal with images and resizing is by uploading the image to the server,
and at that time creating a thumbnail. I have the /images folder with a
/thumbs folder inside it for the thumbnails.

The database simply refers to the name of the image and it's ID and other
associations.

This is optimal for most web uses for many reason:

* Shorter DB access time
* Not processing expensive GD functions on every image load
* Don't have to worry about passing the proper content header

As for "printing the HTML size of the image", if you pass "width=300" to
your script, simply create your print statement similar to:

print "<img src='image.php?id=1' width='$width'>";

Though if image ID 1 is a LARGE image, then you'll still load the entire
image, even though it's being resized to 300px wide. It's not overly
bandwidth friendly if you have large images that are still being sent from
your server (another reason that keeping local thumbnails are a good idea).

Disk space is relatively cheap. Bandwidth is still more of a commodity.

-Mike

-----Original Message-----
From: Sebastian [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 29, 2003 12:58 AM
To: php list
Subject: [PHP] possible?


hello,

I have some images in mysql, currently the images aren't resize, and this
displays the image, like: image.php?id=1

But i'd like to resize the image with html tags: e.g. width="300" and
print/echo it.

since Content-type is for image is it even possible? If not then how about
dynamically resizing them such as:
image.php?id=1&width=300   is that possible? If so, please let me know how.

Thanks in advanced.

cheers,
Sebastian

<?php
$conn = mysql_connect("host", "root", "pass") OR DIE (mysql_error());
        @mysql_select_db("images", $conn) OR DIE (mysql_error());

$sql = ("SELECT * FROM images WHERE id = '$_GET[id]'");
$result = mysql_query($sql, $conn);

if (mysql_num_rows ($result ) > 0)
 {
 $row = @mysql_fetch_array($result);
 $image_type = $row['type'];
 $image = $row["image"];
 header ("Content-type: $image_type");
 print $image;
}
?>



--- End Message ---
--- Begin Message ---
Hi there mate i'll suggest you to have a look to ImageMagick to do
tricky things to images

heres the address:
http://www.imagemagick.org/

have fun!!
On Sat, Mar 29, 2003 at 12:58:17AM -0500, Sebastian wrote:
> hello,
> 
> I have some images in mysql, currently the images aren't resize, and this
> displays the image, like: image.php?id=1
> 
> But i'd like to resize the image with html tags: e.g. width="300" and
> print/echo it.
> 
> since Content-type is for image is it even possible? If not then how about
> dynamically resizing them such as:
> image.php?id=1&width=300   is that possible? If so, please let me know how.
> 
> Thanks in advanced.
> 
> cheers,
> Sebastian
> 
> <?php
> $conn = mysql_connect("host", "root", "pass") OR DIE (mysql_error());
>         @mysql_select_db("images", $conn) OR DIE (mysql_error());
> 
> $sql = ("SELECT * FROM images WHERE id = '$_GET[id]'");
> $result = mysql_query($sql, $conn);
> 
> if (mysql_num_rows ($result ) > 0)
>  {
>  $row = @mysql_fetch_array($result);
>  $image_type = $row['type'];
>  $image = $row["image"];
>  header ("Content-type: $image_type");
>  print $image;
> }
> ?>

-- 

Maciek Ruckgaber Bielecki
Programacion
http://colegiosenlinea.com

"We have penetrated far less deeply into the regularities obtaining within the realm 
of living things, but deeply enough nevertheless to sense at least the rule of fixed 
necessity ..... what is still lacking here is a grasp of the connections of profound 
generality, but not a knowledge of order itself."
--Albert Einstein--

--- End Message ---
--- Begin Message ---
On 29-Mar-2003 Joseph Bannon wrote:
> The mysql support list is slow, so I though I would
> post here since I know this list is more active.
> MySQL shuts down when I start it up...
>  
># Starting mysqld daemon with databases
> from /home/mysqldb
> 030328 09:29:32  mysqld ended

Joe you got a reply within 20 minutes on the MySQL list asking you this:

What does your <hostname>.err log have to say about it?

Let's find your database error log, as root type:

find / -name "*.err" -print | grep mysql

Whatever filename(s) it finds --do tail <filename>.
That'll give you important clues on why the server shutdown.

Regards,
-- 
Don Read                                       [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.Don Read       
                               [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
> Joe you got a reply within 20 minutes on the MySQL
> list asking you this:

Yeah, I did, but I'm use to the fast response of thsi
list.

 
> What does your <hostname>.err log have to say about
> it?

I don't have one.



> Let's find your database error log, as root type:
> 
> find / -name "*.err" -print | grep mysql


Came back with nothing.

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

--- End Message ---
--- Begin Message ---
On Saturday 29 March 2003 14:14, Joseph Bannon wrote:
> > Joe you got a reply within 20 minutes on the MySQL
> > list asking you this:
>
> Yeah, I did, but I'm use to the fast response of thsi
> list.

Please use the appropriate list. If you want a fast response take out a mysql 
support contract.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
YOU PICKED KARL MALDEN'S NOSE!!
*/


--- End Message ---
--- Begin Message ---
> Please use the appropriate list. If you want a fast
> response take out a mysql support contract.


Thanks Jason. You're such a supportive individual
-lol.

J.



__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

--- End Message ---
--- Begin Message ---
Wow, Joe!

You post to the wrong list, and your problem is sufficiently unusual (you
have no err log?) that we can't give quick supportive answers, and then you
whine at us.

Not too cool. Please use the appropriate list.

----- Original Message -----
From: "Joseph Bannon" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 29, 2003 2:20 AM
Subject: Re: [PHP] mysql ending at start up


> > Please use the appropriate list. If you want a fast
> > response take out a mysql support contract.
>
>
> Thanks Jason. You're such a supportive individual
> -lol.
>
> J.
>
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://platinum.yahoo.com


--- End Message ---
--- Begin Message --- Agreed. Now it allows searching and browsing without sign-up.

Thanks,
Pete

Manuel Lemos wrote:
Hello,

On 03/29/2003 01:22 AM, Pete James wrote:

Some of you may like to stay on top of the PHP world (as well as countless other worlds) without having to do too much work. To you I would suggest checking out

http://www.shaman.ca/pusher/

There are a number of news feeds here from various PHP sites.


It is hard to learn the interest of this without knowing what feeds are provided.





--- End Message ---
--- Begin Message ---
How do you update the locate database?

/var/lib/slocate/slocate.db

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

--- End Message ---
--- Begin Message ---
This one time, at band camp,
Joseph Bannon <[EMAIL PROTECTED]> wrote:

> How do you update the locate database?
> 
> /var/lib/slocate/slocate.db

udatedb

Kevin

-- 
 ______                              
(_____ \                             
 _____) )  ____   ____   ____   ____ 
|  ____/  / _  ) / _  | / ___) / _  )
| |      ( (/ / ( ( | |( (___ ( (/ / 
|_|       \____) \_||_| \____) \____)
Kevin Waterson
Port Macquarie, Australia

--- End Message ---
--- Begin Message ---
On Saturday 29 March 2003 15:14, Joseph Bannon wrote:
> How do you update the locate database?
>
> /var/lib/slocate/slocate.db

You really are taking advantage of people's generosity in answering your OT 
questions.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Keep America beautiful.  Swallow your beer cans.
*/


--- End Message ---
--- Begin Message ---
Not a PHP Question.

"updatedb" or "locate -u" should work on Linux systems.

Regards,
Nikunj Virani
----- Original Message ----- 
From: "Joseph Bannon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 29, 2003 12:44 PM
Subject: [PHP] locate


> How do you update the locate database?
> 
> /var/lib/slocate/slocate.db
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://platinum.yahoo.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 



--- End Message ---
--- Begin Message ---
if you don't find anything from the php manual or from the php lists then
you wont find it from any book.so i say you stick to this list and php
manual.
Haseeb.

--- End Message ---
--- Begin Message ---
On Friday 28 March 2003 00:15, Alexis Antonakis wrote:

> I am trying to set up a system whereby users can send data, in a
> pre-determined format, to a specified email address. I would then like to
> import the contents within each email into a database.
>
> The trouble I'm having is not knowing really where to start. Could any kind
> sole point me in the right direction. I've done a search of the site, but
> nothing has come up.

Take a look at this thread:

 http://marc.theaimsgroup.com/?l=php-general&m=104219587732145&w=2

Search the archives for similar threads ('process email' or 'parse email').

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Life -- Love It or Leave It.
*/


--- End Message ---
--- Begin Message ---
> You really are taking advantage of people's
> generosity in answering your OT questions.


Why are you such a jerk Jason? I'm trying to install
php / mysql and I got some questions regarding error
messages I get.

An OT question would be me asking something like,
whats the best temp for cooking a jason wong? Lighten
up.

J.



__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

--- End Message ---
--- Begin Message --- I have to agree with Jason Wong, this list if for PHP and PHP only. If you want to discuss something else, do it somewhere else. The volume of the list is high enough with legitimate questions...

Joseph Bannon wrote:

You really are taking advantage of people's
generosity in answering your OT questions.




Why are you such a jerk Jason? I'm trying to install
php / mysql and I got some questions regarding error
messages I get.

An OT question would be me asking something like,
whats the best temp for cooking a jason wong? Lighten
up.

J.



__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com




-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.



--- End Message ---
--- Begin Message ---
> > You really are taking advantage of people's
> > generosity in answering your OT questions.
> 
> 
> Why are you such a jerk Jason? I'm trying to install
> php / mysql and I got some questions regarding error
> messages I get.

Then learn how to ask a question. At least make an effort to relate it
to PHP. Your question was off topic and you know it. Now if you had
mentioned PHP installation and problems you were having, then at least
we would have understood why you were asking. 

Search the web on how to post a question.
 
> An OT question would be me asking something like,
> whats the best temp for cooking a jason wong? Lighten
> up.

What are you, 12 years old?

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



--- End Message ---
--- Begin Message ---
On Fri, 28 Mar 2003 20:12:27 -0800, you wrote:

>I'm a total newbie to programming, but I picked up PHP last month and redesigned my 
>website (I think it's great).
>
>What I want to do now, is create a price comparison engine of online bookstores using 
>PHP and whatever web services the vendors supply.
>
>My question is: where should I start? I've purchased the Professional PHP4 XML book 
>by Wrox (being shipped), but am wondering if anyone has coded something along these 
>lines.

The "right" way is to use something like NuSOAP
(http://sourceforge.net/projects/nusoap) (you'll find example code that
uses NuSOAP at Amazon), or Krysalis (I haven't used it, but there'll be
someone along to pimp it in a minute).

However, given  your experience level I'm not sure if these are the best
tools for you. You /may/ find it easier to chop the data you want out of
the raw XML with string handling and regular expression functions.

I guess the first thing you should do is try to get Amazon's example
code working, and take it from there. A google search for "Amazon PHP
API" should help if you get stuck.

(BTW, you should examine Amazon's T&Cs before you use their data in a
way that might encourage people to use competing booksellers.)


--- End Message ---
--- Begin Message ---
    Hello,
    You will find our open source Krysalis platform interesting for PHP web
services.

http://www.interakt.ro/products/Krysalis/

    We have just released the 2.4beta version with a lot of improvements.


You can also read my chapter for the Wrox (it's bancrupcy is a major
losss..) "Professional PHP Web Services" at
ftp://www.interakt.ro/pub/Krysalis/Professional%20web%20services%20with%20Kr
ysalis.pdf

We hope that this will give you a healthy start.

Krysalis does not include an API like (SOAPx4 or NuSOAP), but is based on
XML streaming and transformation, ans you will see an alternative of using
SOAP for other goals than RPC.

Alexandru


--
Alexandru COSTIN
Chief Operating Officer
http://www.interakt.ro/
+4021 411 2610
"Stacy Oliver" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi all,

I'm a total newbie to programming, but I picked up PHP last month and
redesigned my website (I think it's great).

What I want to do now, is create a price comparison engine of online
bookstores using PHP and whatever web services the vendors supply.

My question is: where should I start? I've purchased the Professional PHP4
XML book by Wrox (being shipped), but am wondering if anyone has coded
something along these lines.

Sorry for such a basic post, but I feel lost and don't know who to ask.

Thanks in advance!
Stacy
[EMAIL PROTECTED]
www.christianbookpreviews.com






--- End Message ---
--- Begin Message ---
Hi Alexandru,

I have to sand and paint a rocking chair this afternoon. Can Krysalis
help me with that? Apparently it's the answer to almost every question
on this list, as I have to delete your advertising several times a day. 

This may be the best program ever written, but can you lay off the
advertising a bit? Just my personal opinion, of course, but maybe you
should just start replying to the individual instead of the list. Don't
worry; there are plenty of Krysalis messages in the archives to give you
a good search ranking. 

I don't mean to be rude and if I'm the only one that thinks this, then
please ignore me.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

> -----Original Message-----
> From: Alexandru COSTIN [mailto:[EMAIL PROTECTED]
> Sent: Saturday, March 29, 2003 8:15 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: PHP and Web Services (where to start?)
> 
>     Hello,
>     You will find our open source Krysalis platform interesting for
PHP
> web
> services.
> 
> http://www.interakt.ro/products/Krysalis/
> 
>     We have just released the 2.4beta version with a lot of
improvements.
> 
> 
> You can also read my chapter for the Wrox (it's bancrupcy is a major
> losss..) "Professional PHP Web Services" at
>
ftp://www.interakt.ro/pub/Krysalis/Professional%20web%20services%20with%
20
> Kr
> ysalis.pdf
> 
> We hope that this will give you a healthy start.
> 
> Krysalis does not include an API like (SOAPx4 or NuSOAP), but is based
on
> XML streaming and transformation, ans you will see an alternative of
using
> SOAP for other goals than RPC.
> 
> Alexandru
> 
> 
> --
> Alexandru COSTIN
> Chief Operating Officer
> http://www.interakt.ro/
> +4021 411 2610
> "Stacy Oliver" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> Hi all,
> 
> I'm a total newbie to programming, but I picked up PHP last month and
> redesigned my website (I think it's great).
> 
> What I want to do now, is create a price comparison engine of online
> bookstores using PHP and whatever web services the vendors supply.
> 
> My question is: where should I start? I've purchased the Professional
PHP4
> XML book by Wrox (being shipped), but am wondering if anyone has coded
> something along these lines.
> 
> Sorry for such a basic post, but I feel lost and don't know who to
ask.
> 
> Thanks in advance!
> Stacy
> [EMAIL PROTECTED]
> www.christianbookpreviews.com
> 
> 
> 
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php




--- End Message ---
--- Begin Message ---
Server Win2000 +ISS5 +PHP
Trying to get access to an access DB through COM but i wont work. there is
no results generated.
Can anyone help me
Here is the code

$rownum =0;
$conn = &ADONewConnection('access');
$conn->PConnect('webdb.mdb');
$result = &$conn->Execute('SELECT Produkt, Artikelnr, Pris, Lagerstatus,
Beskrivning, Kategori, Bild FROM Data');

  while(odbc_fetch_row($result)){
  $Produkt = odbc_result($result, Produkt);
  $Artikelnr = odbc_result($result, Artikelnr);
  $Pris = odbc_result($result, Pris);
  $Lagerstatus = odbc_result($result, Lagerstatus);
  $Beskrivning = odbc_result($result, Beskrivning);
  $Kategori = odbc_result($result, Kategori);
  $Bild = odbc_result($result, Bild);



--- End Message ---
--- Begin Message ---
I'm using ldap_read() to get the namingContexts from the LDAP
server.

----- s n i p -----
$sr = ldap_read($this->ldap_linkid, '', '(objectClass=*)', array('namingContexts'));
if(! $sr) die("Can't find base dn - ".ldap_error($this->ldap_linkid));
$entry = ldap_get_entries($this->ldap_linkid, $sr);
----- s n i p -----

Unfortunatly, I get:
----- s n i p -----
   Warning: LDAP: Unable to perform the search: No such object in
   /afs/bayour.com/public/web/ldap/phpQLAdmin-CVS.latest/include/pql.inc on line 45
   Can't find base dn - No such object
----- s n i p -----

This only shows up if the namingContexts have a space in it (ie, base DN contains
a space):
----- s n i p -----
[papadoc.pts/9]$ /usr/bin/ldapsearch -x -LLL -h localhost -s base -b '' 
'(objectclass=*)' namingContexts
dn:
namingContexts: o=Turbo Fredriksson
----- s n i p -----

On my live server, I have 'namingContexts: dc=com', and the PHP page(s) work
on that...

Any ideas?

--- End Message ---
--- Begin Message ---
hi
how can i set the cookies life to non expireable
and what action should i take when the user signs out?
Regards.


--- End Message ---
--- Begin Message ---
http://www.php.net/manual/en/function.setcookie.php

You can set the expire date to be far of into the
future.
--- Haseeb Iqbal <[EMAIL PROTECTED]> wrote:
> hi
> how can i set the cookies life to non expireable
> and what action should i take when the user signs
> out?
> Regards.
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

--- End Message ---
--- Begin Message ---
i think this site suits your question pretty well:
http://nutshells.oreilly.com/
:)


"John Taylor-Johnston" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Who is Tim O'Reilly? In a nutshell?
>
> http://www.oreilly.com/catalog/opensources/book/tim.html
> http://oreilly.com/oreilly/about.html
>
> Perl guru?
> www.OpenSource.org founder?
> software publisher?
>



--- End Message ---
--- Begin Message ---
I'm having problems with my post variables. Here's the page I use to submit
data:

<FORM ACTION="test2.php" METHOD=POST />
    <INPUT TYPE=text SIZE=50 MAXLENGTH=50 NAME="new_area"
/>&nbsp;&nbsp;<INPUT TYPE=SUBMIT VALUE="Add New Skill Area" /><BR /><BR />
</FORM>

Here's the test2.php page:

<?php
print_r($_POST);
?>

This is all very simple, and works on one of my webservers. However, on
another webserver with a practically identical configuration, if I post
"testing" the result that I get is this:

Array ( [new_area] => testingnew_area=testing ) 

I've spent hours scouring my two configurations, changing options here and
there, and have had zero success in making the problem webserver work.

The server is a dual processor RedHat 8 system running apache 2.0.43, and
php 4.3.1. You can see the phpinfo at
http://inexorable.sagelikefool.net/phpinfo.htm (yes htm, not php). Any and
all help is appreciated!

--- End Message ---
--- Begin Message ---
I bet the web server that works is not running Apache 2, is it? Either
way, it's an Apache2 and PHP bug. It's in the bug tracker somewhere...
Use Apache 1.3.27 or whatever the latest is...

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

> -----Original Message-----
> From: Mark Douglas [mailto:[EMAIL PROTECTED]
> Sent: Saturday, March 29, 2003 7:57 AM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP] Problems with post data
> 
> I'm having problems with my post variables. Here's the page I use to
> submit
> data:
> 
> <FORM ACTION="test2.php" METHOD=POST />
>     <INPUT TYPE=text SIZE=50 MAXLENGTH=50 NAME="new_area"
> />&nbsp;&nbsp;<INPUT TYPE=SUBMIT VALUE="Add New Skill Area" /><BR
/><BR />
> </FORM>
> 
> Here's the test2.php page:
> 
> <?php
> print_r($_POST);
> ?>
> 
> This is all very simple, and works on one of my webservers. However,
on
> another webserver with a practically identical configuration, if I
post
> "testing" the result that I get is this:
> 
> Array ( [new_area] => testingnew_area=testing )
> 
> I've spent hours scouring my two configurations, changing options here
and
> there, and have had zero success in making the problem webserver work.
> 
> The server is a dual processor RedHat 8 system running apache 2.0.43,
and
> php 4.3.1. You can see the phpinfo at
> http://inexorable.sagelikefool.net/phpinfo.htm (yes htm, not php). Any
and
> all help is appreciated!
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php




--- End Message ---
--- Begin Message ---
Where can I find some information on storing a graphic file such as a JPG or
GIF into a MySQL database.  I'm assuming I have to convert it to a binary
format and store it that way.  Or maybe this isn't possible?

 

Thanks!


--- End Message ---
--- Begin Message ---
Here's a good start:

http://www.phpbuilder.com/columns/florian19991014.php3

-----Original Message-----
From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 29, 2003 7:56 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Storing a graphic file in a MySQL database


Where can I find some information on storing a graphic file such as a JPG or
GIF into a MySQL database.  I'm assuming I have to convert it to a binary
format and store it that way.  Or maybe this isn't possible?

 

Thanks!


--- End Message ---
--- Begin Message ---
Saving Images in MySQL
http://www.weberdev.com/index.php3?GoTo=ViewArticle.php3?ArticleID=3

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.



-----Original Message-----
From: Phil Schwarzmann [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 29, 2003 3:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Storing a graphic file in a MySQL database


Where can I find some information on storing a graphic file such as a
JPG or GIF into a MySQL database.  I'm assuming I have to convert it to
a binary format and store it that way.  Or maybe this isn't possible?

 

Thanks!


--- End Message ---
--- Begin Message ---
"Hardik Doshi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> During reading of XML+XSLT and Smarty, i have
> following two questions.

> Actually i dont know much about Advantages of XML+XSLT
> in web based application. What i know is Smarty's
> advantages. So if you have any idea then please let me
> know. I am more and more concern for perfect selection
> of template engine.

Hello,

>From my point of view, both XML+XSLT and smarty have "dirty" templates, in
sense, that their templates contain both html, and controling code. While
some people consider this nice, I prefer templates that do not contain logic
and controling code, so this is the way TemplateTamer works.

With TT templates contain only markers fot templates and variables, and
programmer is responsible for returning and array containing information
about templates to be displayed and values of variables, and TT framework
does the rest. This does have some resemblance to XML+XSLT approach but with
following differences:

a) there are no contol structures (or code) inside of templates
b) data tree is easier and much less costly to asssemble since it is
implemented with simple arrays
c) all other glueing is done by TT framework.

In addition to that, TemplateTamer offers:
* IDE, that can keep track of the project,
* tool to visualize template structures (which commes handy in more
comlicated and nested structures)
* example code generator.

rush
--
http://www.templatetamer.com/




--- End Message ---
--- Begin Message ---
Could use some help on trying to remove mime from an incoming email.
The emails (netscape or outlook) seem to clearly define...

Netscape
boundary="------------070304040709010903030405"
Outlook
boundary="----=_NextPart_000_0015_01C2F52F.777F61A0"


Then remove the first occurence to the next.....................


--------------070304040709010903030405
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

*TEST*

--------------070304040709010903030405

This would remove the mime from netscape or outlook...

Would be the part I would want to remove from the inforamtion....

So maybe with a preg_match on the boundary and then strip from that value until the next time you see the value??

Though now to put this in a language php understands??
Thanks
--Al


--- End Message ---
--- Begin Message ---
Hi:

I would like to know if there is a way to know the size foan image when
uploading it from a form page on PHP.
I know the weight can be measured with $file_size but what Im looking for is
to be able to validate if an image is more than 220pixels width or of
height.

Thanks in advance

EJB



--- End Message ---
--- Begin Message ---
here is something for you from php manual

The getimagesize() function will determine the size of any GIF, JPG, PNG,
SWF, SWC, PSD, TIFF, BMP or IFF image file and return the dimensions along
with the file type and a height/width text string to be used inside a normal
HTML IMG tag.

Returns an array with 4 elements. Index 0 contains the width of the image in
pixels. Index 1 contains the height. Index 2 is a flag indicating the type
of the image: 1 = GIF, 2 = JPG, 3 = PNG, 4 = SWF, 5 = PSD, 6 = BMP, 7 =
TIFF(intel byte order), 8 = TIFF(motorola byte order), 9 = JPC, 10 = JP2, 11
= JPX, 12 = JB2, 13 = SWC, 14 = IFF. These values correspond to the
IMAGETYPE constants that were added in PHP 4.3. Index 3 is a text string
with the correct height="yyy" width="xxx" string that can be used directly
in an IMG tag.



Friendship is always a sweet responsibility, never an opportunity.
HaSeEb IqBaL.
0300-4258030

--- End Message ---
--- Begin Message ---
Hi I am wondering if any one can help me please:

 

I'm trying to validate a file when uploading it. I want only to accept .jpg
and .gif files so I'm trying to use.

 

If(($file_type = = " image/JPEG") || ($file_type = = "image/GIF"))

 

But it will not let through even the .jpg or .gif images.

 

I was thinking of validating the filename to end up in .gif or .jpg, but
since it exists the $file_type, I'm sure I'm doing something wrong.

 

Your help is greatly appreciated.

 

LRC Elliot J. Balanza

CEO

M&B Trading Co., SA de CV

Bringing the world together

[EMAIL PROTECTED]

www.mbtradingco.com

58748874 

 


--- End Message ---
--- Begin Message ---
i think the comparision is case sensitive. try strlower for image types and
compare with lower cases.

also note that for IE image type for jpg is pjpeg so include this to


Friendship is always a sweet responsibility, never an opportunity.
HaSeEb IqBaL.
0300-4258030

--- End Message ---
--- Begin Message ---
Hello,
I see PHP5 news on /. , and noting about client side php support.

Does any one had any new news about client side PHP ? (not PHP+GTK)

Thanks.
-- 
Sancar Saran
Koytur Networks System Administrator



--- End Message ---
--- Begin Message ---
> I see PHP5 news on /. , and noting about client side php support.
> 
> Does any one had any new news about client side PHP ? (not PHP+GTK)

This was discussed on the list a while ago, but I think the general
consensus was that it's a bad idea. Why would you want to create another
client side language, aren't there enough of them and enough versions as
it is. You still wouldn't be able to rely on it for anything, since it's
client side, so what's the point?

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



--- End Message ---
--- Begin Message ---
if you are on redhat check and make sure you have the php_mysql... rpm
installed.

Jim
----- Original Message -----
From: "CDitty" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 28, 2003 9:07 PM
Subject: [PHP] Can't connect to mysql


> I just setup my home development server and I am having problems
connecting
> to the mysql server.  Mysql is isntalled and is configured correctly.  It
> is running.  Mysql is compiled into php,   When I try to connect using
> existing code, I get the following error.
>
> Fatal error: Call to undefined function: mysql_connect()
>
> I am using MySQL 4.0.12.  I installed MySQL from rpms and installed the
> following ones.
> client, devel, server, shared, embedded
>
> Anyone have any ideas?
>
> CDitty
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--- End Message ---
--- Begin Message ---
MySql is not compiled into PHP

What does phpinfo say? (And not just the configure line)

----- Original Message -----
From: "Cditty" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 29, 2003 12:07 AM
Subject: Can't connect to mysql


> I just setup my home development server and I am having problems
connecting
> to the mysql server.  Mysql is isntalled and is configured correctly.  It
> is running.  Mysql is compiled into php,   When I try to connect using
> existing code, I get the following error.
>
> Fatal error: Call to undefined function: mysql_connect()
>
> I am using MySQL 4.0.12.  I installed MySQL from rpms and installed the
> following ones.
> client, devel, server, shared, embedded
>
> Anyone have any ideas?
>
> CDitty
>


--- End Message ---
--- Begin Message ---
All,

How do I combine the multi-dimensional arrays returned from the
parse_ini_file function on two different ini files?  I tried:

$my_array = parse_ini_file('some_file', true);
$my_array[] = parse_ini_file['another_file', true);

Thanks

Dave
[EMAIL PROTECTED]


--- End Message ---
--- Begin Message ---
some information from php manual

array_merge() merges the elements of two or more arrays together so that the
values of one are appended to the end of the previous one. It returns the
resulting array.

If the input arrays have the same string keys, then the later value for that
key will overwrite the previous one. If, however, the arrays contain numeric
keys, the later value will not overwrite the original value, but will be
appended.

Friendship is always a sweet responsibility, never an opportunity.
HaSeEb IqBaL.
0300-4258030

--- End Message ---
--- Begin Message ---
Aside from SSL (which I wouldn't even know where to begin at this point). Is
there not a way to determine what gets sent with the headers or to block the
referring address from another site?

B.

----- Original Message -----
From: "Haseeb Iqbal" <[EMAIL PROTECTED]>
To: "Beauford.2002" <[EMAIL PROTECTED]>
Sent: Saturday, March 29, 2003 10:04 PM
Subject: Re: [PHP] Session Theft


> the session is created such that a file is created that (the file contains
> all the variables for that perticular user) referenced by the session id.
> now consider a situation where the user open a link to external site and
> that external site is recording all the link where the user is comming
> from.that is done by $_SERVER['HTTP_REFERER'] (in php). now suppose the
user
> did not closed the session and the external websites author (suppose is
not
> a person with ethics) uses that rederer address.and then what heppens.HE
IS
> IN another persons account.now he can do anything the REAL user can do.
> now you should have the idea how it can be stolen.
>
> now for the security. you can conduct everything over ssl. this is what i
> got when i posted my message on this list.
> what i am doing is i am gathering every bit of information from the
user.and
> storing that information along with some extra things this will minimize
the
> risk but it won't completly remove the risk.
>
> i am still learning how to master this field.if you get any idea lemme
know.
>
> regards
> Haseeb
>



--- End Message ---
--- Begin Message ---
Sorry maybe I used the incorrect terms...
When outlook sends and email, even if HTML format is chosen, the source
of the email still contains these lines....

This is a multi-part message in MIME format.

------=_NextPart_000_0015_01C2F52F.777F61A0
Content-Type: text/plain;
    charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Test Body

------=_NextPart_000_0015_01C2F52F.777F61A0

Then the HTML appears under this.
With Mozilla email set to HTML it is fine.

We have an online application that takes incoming emails and puts them
in the database.  HTML is the chosen format since it gives us some
features when showing the emails or reports.

Anyway I need to pull or by pass the above if it is there since it gets
thrown in the database with the rest of the body.

Here is the procmail end of it so far.

:0
* $RECIP ?? [EMAIL PROTECTED]
{
        :0
        | (formail -k -X To: -X From: -X Subject: |
/home/nepso/nepso-mail/report_gateway.php)

}
This is working so far with Mozilla as the client.  The nice thing too
is it by passes the attachment which was another problem I was having
since I do not want those.

Hope this is more clear and thanks Tyler for your time.
--Al

Tyler F. Creelan wrote:

On Mar 28 at 5:34pm -0500, Al Nutile wrote:

| We want only html emails for a post.  So if there is mime I was hoping
| to remove it and process the rest of the email.
| The only problem is Outlook has mime in the source even if the person
| chooses HTML..
| There have been some post on this but just seeing if there is a more
| funtional and clearer answer for this worn out searcher.
| --Al

Hmm... honestly I don't understand the question, I thought all
html-formatted email had to follow mime format... Are you trying to
archive email for a webpage or something?

Tyler

_______________________________________________
procmail mailing list
[EMAIL PROTECTED]
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail







--- End Message ---

Reply via email to