Re[2]: [PHP] Getting the filesize of an image?

2001-11-30 Thread faeton

Hello Matt,

filesize() works only on local filesystems.

MM> It scares me that nobody has answered with filesize() yet.
MM> Matt



Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com
::: Documentation - The worst part of programming. :::


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Getting the filesize of an image?

2001-11-30 Thread Matt McClanahan

On Fri, Nov 30, 2001 at 07:04:08PM -0500, Uchendu Nwachukwu wrote:

> Is there any easy way to get the filesize of an image on a remote server?
> 
> Please tell me there is! TIA

It scares me that nobody has answered with filesize() yet.

Matt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Don't tell me this isn't possible (object related question)

2001-11-30 Thread Matt McClanahan

On Sat, Dec 01, 2001 at 12:15:37AM +0100, Jeroen Olthof wrote:

> let's say I have made some objects
> $content = new Content();
> 
> and in object content a new object is created
> $person = new Person("Jeroen");
> 
> Person holds a var age
> 
> Now I want to do something like this in a normal PHP script
> 
> echo $content->getPerson("Jeroen")->getAge();
> or since PHP doesn't use private / prublic / etc..
> echo $content->getPerson("Jeroen")->age;
> 
> the point is , getPerson("Jeroen") returns an object. this object contains
> the function getAge() which return the var age
> but somehow this constuction isn't possible  ? Why 
> ... or is it but is there a strange syntax 

As someone else already mentioned, this isn't in PHP yet.  But it's coming. 
In the mean time, you have a couple options.  If you only have one Person
inside a Content, you can simply say $content->person->age;  If you have
more than one, they could be arranged in an array, so it becomes
$content->person['Jeroen']->age;

Another option is to define a method in Content which returns $person->age.

Matt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] call_user_func problem

2001-11-30 Thread faeton

Hello C,


That means that you should create a .htaccess file containing that:

php_value allow_call_time_pass_reference 1

That should work :)

C> Prior to 4.0.6 it worked fine, however, now when I try:

C> $result = call_user_func("foo", &$bar);

C> function foo( &$bar ) {
C>$bar .= 'foobar';
C>return 1;
C> }

C> I get this:

C> Warning: Call-time pass-by-reference has been deprecated - argument passed
C> by value; If you would like to pass it by reference, modify the declaration
C> of call_user_func(). If you would like to enable call-time
C> pass-by-reference, you can set allow_call_time_pass_reference to true in
C> your INI file. However, future versions may not support this any longer.

C> Does that mean I can't pass by reference anymore? I kinda need to (the two
C> functions above are not my actual functions btw)



Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com
::: Ñëîíû ïî äåpåâüÿì íå ëàçàþò. Îíè ìîãyò, íî èõ ëîìàåò. :::


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] file_exists problems

2001-11-30 Thread faeton

Hello Prolog,


Hm... And what about:
print '';
instead of readfile?


P>  if(file_exists(/images/$filename))
P>  {
P>   readfile(/images/$filename);
P>  }
P>  else
P>  {
P>   readfile(images/npat.jpg);
P>  }




Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com
::: Ñòîèò òîëüêî çàîñòðèòü âîïðîñ, êàê ñðàçó ïðîñÿò çàêðóãëÿòüñÿ. :::


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re[2]: [PHP] Getting the filesize of an image?

2001-11-30 Thread faeton

Hello Uchendu,

Maybe comething like that would do that:

http://www.foo.net/image.jpg";));
$size = strlen($fo);
?>

Eh? :)

UN> Not the dimensions. Of course I knew that.
UN> I want the file size, as in 'how many bytes'. GetImageSize() doesn't do
UN> that.



Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com
::: #95# Format C: complete. Format another? (Y/Y) :::


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] call_user_func problem

2001-11-30 Thread C

Prior to 4.0.6 it worked fine, however, now when I try:

$result = call_user_func("foo", &$bar);

function foo( &$bar ) {
   $bar .= 'foobar';
   return 1;
}

I get this:

Warning: Call-time pass-by-reference has been deprecated - argument passed
by value; If you would like to pass it by reference, modify the declaration
of call_user_func(). If you would like to enable call-time
pass-by-reference, you can set allow_call_time_pass_reference to true in
your INI file. However, future versions may not support this any longer.

Does that mean I can't pass by reference anymore? I kinda need to (the two
functions above are not my actual functions btw)

Thanks.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] why didnt you come watch me on my webcam? you said you would! w

2001-11-30 Thread

Below is the result of your feedback form.  It was submitted by
 ([EMAIL PROTECTED]) on Friday, November 30, 2001 at 20:45:27
---

: hey babe, it's karina remember me? if you don't im 5'8" with brown hair and blue 
:eyes with an ass you can bounce a quarter off of :) Im 21 years old and im in my 
:final year of college at OSU in OREGON! i just got my first webcam and i love meeting 
:new people on it and just showing my body off. i want you to come watch me do a 
:striptease! my website is located at: http://sepimpin.brinkster.net/ if that doesnt 
:work try http://karina.tk.ru/ ~ LOVE ALWAYS! -Karina XOXOXO<33

---


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] file_exists problems

2001-11-30 Thread Prolog

I had a script that was running beautiful that simply called up a database
and displayed the results in tables.  I went to add images to this script
and all hell broke loose.  This is the portion of the script that I added:


--

//filename is the item number + t.jpg -- t shorthand for thumbnail

  $itemnumber = "$myrow[item_number]";
  $filename = "$itemnumber t.jpg";

echo "";

//if the file exists then print it.  Otherwise print a generic image saying
it doesn't exist.

 if(file_exists(/images/$filename))
 {
  readfile(/images/$filename);
 }
 else
 {
  readfile(images/npat.jpg);
 }

-

Is there anything I need to know about "file_exists" that I'm not doing.
for some reason when this code is added it gives me an error on the line
after the close of the else statement.  That line was perfectly fine before
the addition.  Please help.

-Jordan



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] $PHP_AUTH_USER & $PHP_AUTH_PW Dialog?

2001-11-30 Thread Chris Boothe

Filling these variables seems to work, but what is the header to send for
a  valid login? I can't seem to suppress the dialog. I have an HTML form
which  calls login.php.

When I access the script through a redirection in the login, I don't want
to see the prompt.

There seems to be a lot of examples on how to show the dialog but not how
to suppress it.

Any ideas?

Thanks,

Chris Boothe
[EMAIL PROTECTED]



Re: [PHP] Getting the filesize of an image?

2001-11-30 Thread Uchendu Nwachukwu

Not the dimensions. Of course I knew that.

I want the file size, as in 'how many bytes'. GetImageSize() doesn't do
that.

--
Uchendu Nwachukwu
newsreply AT unndunn DOT com - www.unndunn.com

"Kurt Lieber" <[EMAIL PROTECTED]> wrote in message
E169xrH-0001ED-00@z8">news:E169xrH-0001ED-00@z8...
> Yes -- RTFM.
>
> http://php.net/getimagesize
>
> --kurt
>
> On Friday 30 November 2001 04:04 pm, Uchendu Nwachukwu wrote:
> > Is there any easy way to get the filesize of an image on a remote
server?
> >
> > Please tell me there is! TIA



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] XML and PHP - dynamic hell

2001-11-30 Thread Chris

I'm having one page output XML for other sites to parse. Unfortunately if I
give an RSS parser the site (the php file) it errors out. But if I put the
output in a XML file, and give that to the RSS parser everything works
perfectly. Does anyone know why it can't read it straight from the php file?
PHP Builder has it working, I have no idea why mine doesn't. Thanks

Source:

\n";
echo "http://my.netscape.com/publish/formats/rss-0.91.dtd\";>\n";
echo "\n";
echo "\n";
  $query = mysql_query("Select * from " . PREFIX . "news order by Date Desc
Limit 40");
  while($results = mysql_fetch_array($query))
  {
   echo "\n";
   echo "" . stripslashes($results["Subject"]) . "\n";
   echo "http://dod.stronger.org/\n";
   echo "$results[Name]\n";
   echo "" .
substr(htmlspecialchars(stripslashes($results["News"])),0,150) .
"...\n";
   echo "\n";
 }
?>
  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] 5928 Would you like to lose weight while you sleep? 537417

2001-11-30 Thread 753741ultimate

 As seen on NBC, CBS, CNN, and even Oprah! The health 
discovery that actually reverses aging while burning fat, 
without dieting or exercise! This proven discovery has even 
been reported on by the New England Journal of Medicine. 
Forget  aging and dieting forever! And it's Guaranteed!   

Click here:
http://ultimatehgh1000.81832.com

Would you like to lose weight while you sleep!
No dieting!
No hunger pains!
No Cravings!
No strenuous exercise!
Change your life forever! 

100% GUARANTEED!

1.Body Fat Loss82% improvement.
2.Wrinkle Reduction 61% improvement.
3.Energy Level   84% improvement.
4.Muscle Strength 88% improvement.
5.Sexual Potency   75% improvement.
6.Emotional Stability 67% improvement.
7.Memory62% improvement.


You are receiving this email as a subscriber
to the Opt-In America Mailing List. 
To remove yourself from all related maillists,
just click here:
mailto:[EMAIL PROTECTED]?Subject=REMOVE


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] [광고] 유용한 정보입니다!!!

2001-11-30 Thread 웹미디어스쿨


 



[PHP] Remote_User and Password reset

2001-11-30 Thread Michael J. Seely

Hi Folks,

I know I can get $REMOTE_USER info.  How can I reset the remembered 
user name and password in the browser for a specific URL from a PHP 
program?

-- 

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Michael Seely  408-777-9949




 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php without the php.ini

2001-11-30 Thread Paul Warner

> Hi,
> How can PHP work without the php.ini file? I have tried to find the
php.ini
> file on a RAQ3, to no success. Looking at the php info and then looking at
> the system directories doesnt yield anything.
> The same goes with a server running the Plesk control panel.
>
> Any ideas on how this is done?

Kunal-

/etc/httpd/php.ini and /etc/admserv/php.ini are on mine.
Try 'find / -name php.ini' from a telnet or ssh session.

-- P





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php without the php.ini

2001-11-30 Thread Jack Dempsey

are you sure its not there? where does phpinfo say its located? its really
not there?
hmm...i'm not sure, but php might just use its own internal defaults without
a php.ini present, but i thought it was needed..who knows..

jack

-Original Message-
From: Kunal Jhunjhunwala [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 30, 2001 7:52 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php without the php.ini


Hi,
How can PHP work without the php.ini file? I have tried to find the php.ini
file on a RAQ3, to no success. Looking at the php info and then looking at
the system directories doesnt yield anything.
The same goes with a server running the Plesk control panel.

Any ideas on how this is done?
Regards,
Kunal Jhunjhunwala


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Authenticating Users with their Windows Login - Desperate

2001-11-30 Thread Philip Hallstrom

What web server are you using?  You can do this within IIS directly... if
it's apache you might go here:

http://modules.apache.org/search

and search for "auth" or "windows"... I've seen some modules that do
this... never used them though.



On Fri, 30 Nov 2001, EDUMEXICO wrote:

> Hi all, I know that this is NOT the best answer, but maybe it works, so here it is: 
>when some people type a login and a password for access a secure page, you read that 
>values and the IP address of the user, then you tell smbclient to find the NT 
>password server (but if you know the addreess that is much easy) and connect to the 
>machine with the login and password the user typed. If you got a positive, YOU'RE 
>DONE!!!
>
> I hope this can help you.
>
> On Fri, Nov 30, 2001 at 04:49:32PM +0800, Feroze Md. Arif wrote:
> > Hi Again,
> >
> > I've searched high and low since my last post but I couldn't find anything
> > on how Users can be authenticated using their Windows NT server User IDs and
> > Passwords.  I do not want to authenticate users with a MySQL database etc.,
> > since that involves recreating all the user ids and passwords.  If my users
> > log into my intranet application with their NT or Windows2000 user id and
> > password, is there anyway I can access the Windows NT User ID/Password
> > respository and authenticate the users?
> >
> > Please help.  If anyone has some suggestions please let me know.
> >
> > Best Regards
> > Feroze
> >
> > Jar Jar Binks will be Jedi!
> >
> > ==
> > Hi,
> >
> > First of all, my apologies if this question has been asked earlier.  I am in
> > a hurry and I haven't checked the archives (Actually, I am in the process of
> > doing it but am trying to cover all the bases).
> >
> > I know that PHP has functions which will allow Users to be authenticated off
> > a NIS Server or a LDAP server.  Will it be possible to do something similar
> > in PHP with the User IDs and Passwords stored in a NT or Windows 2000
> > server?  I would appreciate it very much if anyone could point me to
> > resources that could help me or share some sample scripts :) :)
> >
> > Thanks in Advance,
> >
> > Feroze
> > ===
> > Jar Jar Binks will be Jedi!
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> Mauricio Téllez Jiménez
> Seguimiento Técnico EDUMEXICO
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> Zamora No. 25, Col. Centro
> C.P. 91000, Xalapa, Ver.
> Tel. 52(28)17-86-87, 17-73-80
> Fax. 52(28)18-64-13
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Hi, Friend! We wish You a pleasant and successful day!

2001-11-30 Thread Herdy Arbon

DEAR FRIEND!

If You show some interest and patience, and visit
http://www.escalix.com/freepage/goldflow/, You can earn up to $100,000 and
more during the following 120 days - it depends only on You. DOES IT SEEMS
TO BE IMPOSSIBLE??? Just visit link below and read attentively to be sure
there is no catch or deceit. If You are completely lazy - we beg Your pardon
for the
assumption!!! Then this is not for You!!! You'd better do something like
surfing either clicking on banners or not doing anything at all. If the
offer hasn't interested You, we bring our apologies and it is not necessary
to get angry - "spam" has its expenses, just as radio and TV, but do not
forget, that the first billionaire of the USA, Dale Carnegie said:
   "I'll better earn 1% as a result of the efforts of 100 men, than 100%
as a result of my own efforts".

RISE ON THE WAY TO THE FINANCIAL INDEPENDENCE AND FREEDOM!!!





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] php without the php.ini

2001-11-30 Thread Kunal Jhunjhunwala

Hi,
How can PHP work without the php.ini file? I have tried to find the php.ini
file on a RAQ3, to no success. Looking at the php info and then looking at
the system directories doesnt yield anything.
The same goes with a server running the Plesk control panel.

Any ideas on how this is done?
Regards,
Kunal Jhunjhunwala


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Authenticating Users with their Windows Login - Desperate

2001-11-30 Thread EDUMEXICO

Hi all, I know that this is NOT the best answer, but maybe it works, so here it is: 
when some people type a login and a password for access a secure page, you read that 
values and the IP address of the user, then you tell smbclient to find the NT password 
server (but if you know the addreess that is much easy) and connect to the machine 
with the login and password the user typed. If you got a positive, YOU'RE DONE!!!

I hope this can help you.

On Fri, Nov 30, 2001 at 04:49:32PM +0800, Feroze Md. Arif wrote:
> Hi Again,
> 
> I've searched high and low since my last post but I couldn't find anything
> on how Users can be authenticated using their Windows NT server User IDs and
> Passwords.  I do not want to authenticate users with a MySQL database etc.,
> since that involves recreating all the user ids and passwords.  If my users
> log into my intranet application with their NT or Windows2000 user id and
> password, is there anyway I can access the Windows NT User ID/Password
> respository and authenticate the users?
> 
> Please help.  If anyone has some suggestions please let me know.
> 
> Best Regards
> Feroze
> 
> Jar Jar Binks will be Jedi!
> 
> ==
> Hi,
> 
> First of all, my apologies if this question has been asked earlier.  I am in
> a hurry and I haven't checked the archives (Actually, I am in the process of
> doing it but am trying to cover all the bases).
> 
> I know that PHP has functions which will allow Users to be authenticated off
> a NIS Server or a LDAP server.  Will it be possible to do something similar
> in PHP with the User IDs and Passwords stored in a NT or Windows 2000
> server?  I would appreciate it very much if anyone could point me to
> resources that could help me or share some sample scripts :) :)
> 
> Thanks in Advance,
> 
> Feroze
> ===
> Jar Jar Binks will be Jedi!
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Mauricio Téllez Jiménez
Seguimiento Técnico EDUMEXICO
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Zamora No. 25, Col. Centro
C.P. 91000, Xalapa, Ver.
Tel. 52(28)17-86-87, 17-73-80
Fax. 52(28)18-64-13



msg41658/pgp0.pgp
Description: PGP signature


Re: [PHP] PHP Authentication

2001-11-30 Thread EDUMEXICO

Hi, there is a module for apache that autorizes with mysql, the name of the module is: 
mod_auth_mysql-2.20, that way you can protect files/directories with the .htaccess 
method. Bye.

PD. The module is at: www.mysql.com

On Thu, Nov 29, 2001 at 08:59:05PM +, Hippie wrote:
> I'm attempting authorise users from a MySQL database. The idea being,
> that upon access to the page they input their username and password
> and this is checked against a table from an SQL database. This page
> needs to be completely server independant which means that I can't
> make use of the $PHP_AUTH_USER as this relies on IIS or Apache to know
> how to authorise to my knowledge.
> 
> If anyone has any ideas on how to accomplish this I would be more than
> interested to hear of them. Also, failing this being possible if I can
> resort to checking it against Radius instead of SQL so any ideas on
> that would be great as well.
> 
> Hippie.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Mauricio Téllez Jiménez
Seguimiento Técnico EDUMEXICO
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Zamora No. 25, Col. Centro
C.P. 91000, Xalapa, Ver.
Tel. 52(28)17-86-87, 17-73-80
Fax. 52(28)18-64-13



msg41657/pgp0.pgp
Description: PGP signature


Re: [PHP] Re: I'm getting frustrated with this.

2001-11-30 Thread chip

Got it! Turns out to be one of those obvious left-it-out errors that happens 
when staring at the monitor too long. One other guy helped point this out 
off-list. I'm at home now and don't recall his name, the emails being at work.

Thanks to all,
Chip

On Friday 30 November 2001 12:09 pm, Fred wrote:
> If you want to know exactly why mysql functions fail you should always, and
> I do mean always, use this form:
> $Result = mysql_query($Query, $Connection)
> or die (mysql_error());
> You will always get a fairly descriptive error from mysql.  If you still do
> not understand the error, at least you have more specific information for
> this list.
>
> Fred
>
> Chip Wiegand <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> > Hi,
> > I just want a simple page that pulls the data from a database (got that
> > working fine, no problem),
> > and on that page I want to be able to have an option to delete entries. I
> > have tried what seems
> > to be the simplest method - using a form text field, enter the
> > appropriate info, and hit the submit
> > button. It should then be deleted from the database. I can delete from
> > the database on the
> > command line, but getting it to work in php is another story. I keep
> > getting 'not a valid mysql
> > result resource' errors. I have 3 php/mysql books and cannot get this to
> > work. I know it can't be
> > as difficult as it appears.
> > My goal is simple enough - I have a database that is populated from
> > online web forms. It contains
> > enduser names, addresses & email addresses. I made a form that the
> > marketing people can use
> > to view the database, search it and display it in various ways. I also
>
> gave
>
> > them a form that will
> > allow them to manually add enduser info into the database. That all works
> > fine. It's just the doggone
> > delete stuff that I just haven't got a handle on yet.
> > Is there a tutorial somewhere that shows the simplest method of setting
> > this up? That's all I need,
> > a reference to a location for a tutorial or info on this particular
> > subject.
> >
> > Thanks,
> > Chip

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Getting the filesize of an image?

2001-11-30 Thread Kurt Lieber

Yes -- RTFM.

http://php.net/getimagesize

--kurt

On Friday 30 November 2001 04:04 pm, Uchendu Nwachukwu wrote:
> Is there any easy way to get the filesize of an image on a remote server?
>
> Please tell me there is! TIA

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Getting the filesize of an image?

2001-11-30 Thread Uchendu Nwachukwu

Is there any easy way to get the filesize of an image on a remote server?

Please tell me there is! TIA

--
Uchendu Nwachukwu
newsreply AT unndunn DOT com - www.unndunn.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re[2]: [PHP] Strange problem...

2001-11-30 Thread faeton

Hello Daniel,

$date = $birth_year."-".$birth_month."-".$birth_day;

And you can try inserting such kind o' date to a DATETIME field.

There's an alternative way:
$time = mktime(0,0,0, $birth_month, $birth_day, $birth_year);
That would return a unix timestamp that can be written to a BIGINT
field and in future returned by using date("m.d.Y", $time) from your
sql query.

He.

DA> Thanks Jim.
DA> but how would i actually do that? I have studied the date() function in the
DA> manual - but can´t find a way of inserting a set value from user input as a
DA> valid date.
DA> - D



Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Strange problem...

2001-11-30 Thread Daniel Alsén

> You should really be storing your dates as datetime so you can take
> advantage of the date sorting functions. But then you'd need to use
> date() to format the string into -mm-dd format.

Thanks Jim.

but how would i actually do that? I have studied the date() function in the
manual - but can´t find a way of inserting a set value from user input as a
valid date.

- D


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Don't tell me this isn't possible (object related question)

2001-11-30 Thread l0t3k

Jeroen,
  this will be possible with ZE2 (check out the Zend site for more info)

Jeroen Olthof <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi,
>
> let's say I have made some objects
> $content = new Content();
>
> and in object content a new object is created
> $person = new Person("Jeroen");
>
> Person holds a var age
>
> Now I want to do something like this in a normal PHP script
>
> echo $content->getPerson("Jeroen")->getAge();
> or since PHP doesn't use private / prublic / etc..
> echo $content->getPerson("Jeroen")->age;
>
> the point is , getPerson("Jeroen") returns an object. this object contains
> the function getAge() which return the var age
> but somehow this constuction isn't possible  ? Why 
> ... or is it but is there a strange syntax 
>
>
> kind regards
> Jeroen Olthof
>
>
>
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re[10]: [PHP] Re: system(), flush() and so on...

2001-11-30 Thread faeton

Hello Darren,

Something quick is like that?
for($i = 0; $i < 10; $i++) {
print $i."\n";
flush();
sleep(3);
};

Yeah? There it is:
www.xemi.info/flush.php

DG> Then I'm not sure.  Perhaps someone in-the-know will respond to your
DG> question.  Else, file a bug report.  Your script runs fine on my 'puter,
DG> FYI.
DG> Otherwise, it would be worthwhile to write something quick to test flush()
DG> with.  If it is also not working, it will provide more evidence as to the
DG> cause of the problem.



Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: Re[8]: [PHP] Re: system(), flush() and so on...

2001-11-30 Thread Darren Gamble

Good day,

Then I'm not sure.  Perhaps someone in-the-know will respond to your
question.  Else, file a bug report.  Your script runs fine on my 'puter,
FYI.

Otherwise, it would be worthwhile to write something quick to test flush()
with.  If it is also not working, it will provide more evidence as to the
cause of the problem.


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: faeton [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 30, 2001 3:57 PM
To: Darren Gamble
Cc: PHP General List
Subject: Re[8]: [PHP] Re: system(), flush() and so on...


Hello Darren,

It's quick because of the fact that it's tracing a host near to my
server. If you have noticed - ping from my server to login.icq.com
that is being traced by default is only 10ms.

Try that: www.xemi.info/test.php?host=www.google.com
or something like that

I waited too long... And still haven't got any results.

DG> For whatever reason, your traceroute command is returning results very
DG> quickly.  It may be functioning normally.
DG> Perhaps you should try a command that will take much longer to execute,
such
DG> as "du / --max-depth=1".

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Don't tell me this isn't possible (object related question)

2001-11-30 Thread Jeroen Olthof

hi,

let's say I have made some objects
$content = new Content();

and in object content a new object is created
$person = new Person("Jeroen");

Person holds a var age

Now I want to do something like this in a normal PHP script

echo $content->getPerson("Jeroen")->getAge();
or since PHP doesn't use private / prublic / etc..
echo $content->getPerson("Jeroen")->age;

the point is , getPerson("Jeroen") returns an object. this object contains
the function getAge() which return the var age
but somehow this constuction isn't possible  ? Why 
... or is it but is there a strange syntax 


kind regards
Jeroen Olthof







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Strange problem...

2001-11-30 Thread Jim Musil


This may be a rough explanantion, but when you store numbers, the
length is not actually the number of digits, but the number of binary
digits it would use when converted from decimal to binary.

So, a length of 1, could only have 0 or 1 as inputs.

a length of 2 could only have 0,1,2,or 3

The equation to determine your limit (i think) is (2^n)-1

The length of your int is limited to 23.

Your date 20001129 is bigger than this.

You should really be storing your dates as datetime so you can take
advantage of the date sorting functions. But then you'd need to use
date() to format the string into -mm-dd format.

Jim

>Thanks guys...
>
>I guess it´s too late here now .) It fixed itself when i altered the field
>type to varchar. Although - i don´t really get why it can´t store the vlaue
>i am sendding it the field is of integer type.
>
>- Daniel
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
Jim Musil
-
Multimedia Programmer
Nettmedia
-
212-629-0004
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re[2]: [PHP] Strange problem...

2001-11-30 Thread faeton

Hello Daniel,

Maybe
$user_birthdate = (int) $birth_year.$birth_month.$birth_day;
would've solved the problem. :)
But i'm not 100% sure.

DA> I guess it´s too late here now .) It fixed itself when i altered the field
DA> type to varchar. Although - i don´t really get why it can´t store the vlaue
DA> i am sendding it the field is of integer type.



Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re[8]: [PHP] Re: system(), flush() and so on...

2001-11-30 Thread faeton

Hello Darren,

It's quick because of the fact that it's tracing a host near to my
server. If you have noticed - ping from my server to login.icq.com
that is being traced by default is only 10ms.

Try that: www.xemi.info/test.php?host=www.google.com
or something like that

I waited too long... And still haven't got any results.

DG> For whatever reason, your traceroute command is returning results very
DG> quickly.  It may be functioning normally.
DG> Perhaps you should try a command that will take much longer to execute, such
DG> as "du / --max-depth=1".


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Strange problem...

2001-11-30 Thread Daniel Alsén

Thanks guys...

I guess it´s too late here now .) It fixed itself when i altered the field
type to varchar. Although - i don´t really get why it can´t store the vlaue
i am sendding it the field is of integer type.

- Daniel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Strange problem...

2001-11-30 Thread faeton

Hello Daniel,

1  Dec 2001, 0:43:42, you've written:

What's the propery of field your are inserting your info to?
Is it INT or BIGINT or maybe TEXT? Try something new :)

DA> Hi,

DA> i have a strange problem.

DA> I get a users birthdate with three dropdown menus (year, month and day of
DA> month). I get these values into one string with:

DA> $user_birthdate = $birth_year . $birth_month . $birth_day;

DA> If i echo $user_birthdate after this it is correct (mmdd). But when i
DA> insert the value of $user_birthdate into MySql it gets the value '8388607'.
DA> It doesn´t matter what value $user_birthdate had originally - it always
DA> inserts as 8388607.
DA> Any ideas???



Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com
::: Â ïèàíèíî âíóòðè åñòü äîñêà, êîòîðàÿ íàõîäèòñÿ âíóòðè! :::


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: Re[6]: [PHP] Re: system(), flush() and so on...

2001-11-30 Thread Darren Gamble

Good day,

For whatever reason, your traceroute command is returning results very
quickly.  It may be functioning normally.

Perhaps you should try a command that will take much longer to execute, such
as "du / --max-depth=1".


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: faeton [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 30, 2001 3:32 PM
To: Darren Gamble
Cc: [EMAIL PROTECTED]
Subject: Re[6]: [PHP] Re: system(), flush() and so on...


Hello Darren,

You can try it yourself : www.xemi.info/test.php
What do you think?

Server config:
RedHat 7.1, Apache 1.3.20, PHP 4.0.6 loaded as a module.

PS. I tried everything. Simply everything.

DG> I am not sure what the problem is, then.  I presume that you installed
these
DG> via RPMs, and have PHP operating as an Apache module.  Does the simple
DG> script provided fail as well?
DG> Have you tried some simple scripts with sleep() and flush() to see if
DG> flush() works?
DG> If you don't hear from anyone else on the list, you may want to try
posting
DG> a bug report.


Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Strange problem...

2001-11-30 Thread Daniel Alsén

Hi,

i have a strange problem.

I get a users birthdate with three dropdown menus (year, month and day of
month). I get these values into one string with:

$user_birthdate = $birth_year . $birth_month . $birth_day;

If i echo $user_birthdate after this it is correct (mmdd). But when i
insert the value of $user_birthdate into MySql it gets the value '8388607'.
It doesn´t matter what value $user_birthdate had originally - it always
inserts as 8388607.

Any ideas???



The db question looks like this btw:

$query = "INSERT INTO users ";

$query .= "(user_name, user_birthdate, user_city, user_mail, user_icq,
user_msn, user_www, user_login, user_password) ";

$query .= " values('$user_name', '$user_birthdate', '$user_city',
'$user_mail', '$user_icq', '$user_msn', '$user_www', '$user_login',
'$user_password')";


Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED]  | +46 704 86 14 92 #
# ICQ: 63006462   | +46 8 694 82 22  #
# PGP: http://www.mindbash.com/pgp/  #


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re[6]: [PHP] Re: system(), flush() and so on...

2001-11-30 Thread faeton

Hello Darren,

You can try it yourself : www.xemi.info/test.php
What do you think?

Server config:
RedHat 7.1, Apache 1.3.20, PHP 4.0.6 loaded as a module.

PS. I tried everything. Simply everything.

DG> I am not sure what the problem is, then.  I presume that you installed these
DG> via RPMs, and have PHP operating as an Apache module.  Does the simple
DG> script provided fail as well?
DG> Have you tried some simple scripts with sleep() and flush() to see if
DG> flush() works?
DG> If you don't hear from anyone else on the list, you may want to try posting
DG> a bug report.


Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Stuck on array, need a little help.

2001-11-30 Thread Jim Musil



The script is still working right, you just need to nest another 
while loop into your current while loop.

Like so ...

if ($cat == 'bikes' && $sub_cat != 'Road') {
  while (list($val, $key)=each($bikes[$sub_cat])) {

echo "$val";

while (list($sub_val, $sub_key) = each($key)) {


  echo "\n";
  echo "$sub_val\n";


}
}
}

alternatively, if you know specifically what you want you could do this ...

if ($cat == 'bikes' && $sub_cat != 'Road') {
  while (list($val, $key)=each($bikes[$sub_cat]["Trek"])) {



  echo "\n";
  echo "$val\n";



}
}



>No, all that will do is reverse the placement
>of the values. So now it prints out Array
>and puts the item in the URL. Still the same problem.
>
>
>>  -Original Message-
>>  From: Jim Musil [mailto:[EMAIL PROTECTED]]
>>  Sent: Friday, November 30, 2001 4:54 PM
>>  To: [EMAIL PROTECTED]
>>  Cc: [EMAIL PROTECTED]
>>  Subject: Re: [PHP] Stuck on array, need a little help.
>>
>>
>>  Your script is working like you are asking it to ...
>>
>>
>>  Change ...
>>
>>   while (list($val, $key)=each($bikes[$sub_cat])) {
>>
>>  To ...
>>
>>   while (list($key, $val)=each($bikes[$sub_cat])) {
>>
>>  and it should work like you WANT it to ...
>>
>>  >I'm stuck. $key returns "Array" how can I get at each
>>  >level of this array?
>>  >
>>  >if ($cat == 'bikes' && $sub_cat != 'Road') {
>>  > while (list($val, $key)=each($bikes[$sub_cat])) {
>>  > echo ">  HEIGHT=\"1\"
>>  >ALT=\"\" BORDER=\"0\">\n";
>>  > echo "$val\n";
>>  >
>>  >$bikes = array(
>>  >  "Road"  => array(
>>  >   "Trek"  => array(
>>  > "Trek 5200" => "road.php?brand=t5200"
>>  > ),
>>  >   "LeMond" => array(
>>  > "Zurich" => "road.php?brand=zurich",
>>  > "Chambery" => "road.php?brand=chambery",
>>  > "Alpe d'Huez" => "road.php?brand=alpe",
>>  > "BuenosAries" => "road.php?brand=bueno",
>>  > "Tourmalet" => "road.php?brand=tourmalet"
>>  > ),
>>  >   "Moots" => array(
>>  > "VaMoots"  => "road.php?brand=vamoots"
>>  > )
>>  >  ),
>>  >  "Mountain"  => array(
>>  >   "Trek"  => array(
>>  > "Fuel 100" => "mountain.php?brand=tfuel90",
>>  > "Fuel 90"  => "mountain.php?brand=schhg"
>>  > ),
>>  >   "Klein" => array(
>>  > "bike 1" => "URL",
>>  > "bike 2" => "URL"
>>  > ),
>>  >   "Gary Fisher" => array(
>>  > "bike 1" => "URL",
>>  > "bike 2" => "URL"
>>  > ),
>>  >   "Moots" => array(
>>  > "bike 1" => "URL",
>>  > "bike 2" => "URL"
>>  > )
>>  >  ),
>>  >
>>  >
>>  >--
>>  >PHP General Mailing List (http://www.php.net/)
>>  >To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  >For additional commands, e-mail: [EMAIL PROTECTED]
>>  >To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>
>>
>>  --
>>  Jim Musil
>>  -
>>  Multimedia Programmer
>>  Nettmedia
>>  -
>>  212-629-0004
>>  [EMAIL PROTECTED]
>>
>>  --
>>  PHP General Mailing List (http://www.php.net/)
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>  To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
Jim Musil
-
Multimedia Programmer
Nettmedia
-
212-629-0004
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: Re[4]: [PHP] Re: system(), flush() and so on...

2001-11-30 Thread Darren Gamble

Good day,

I am not sure what the problem is, then.  I presume that you installed these
via RPMs, and have PHP operating as an Apache module.  Does the simple
script provided fail as well?

Have you tried some simple scripts with sleep() and flush() to see if
flush() works?

If you don't hear from anyone else on the list, you may want to try posting
a bug report.


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: faeton [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 30, 2001 3:01 PM
To: Darren Gamble
Cc: [EMAIL PROTECTED]
Subject: Re[4]: [PHP] Re: system(), flush() and so on...


Hello Darren,

Linux RedHat 7.1, Apache 1.3.20, PHP 4.0.6

DG> Oops, you're right.  I did not read that line nor was I aware of that.
DG> I just tried  .  It works
DG> exactly as it says it should- outputs the lines as they come in.  I also
DG> know flush() works fine (at least for me).
DG> Perhaps you could provide some information about your O/S and PHP
version?



Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Speed of Images from DB

2001-11-30 Thread Matthew Loff



It would be mighty handy for MySQL to have a binary file column type,
like Oracle, where the file was stored externally, outside of the rest
of the table data...  Anyone heard of any plans to implement this?


-Original Message-
From: Julio Nobrega Trabalhando
[mailto:[EMAIL PROTECTED]] 
Sent: Friday, November 30, 2001 12:18 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Speed of Images from DB


> But that could be due to server capabilities of my ISP (if he has for
> example a high tech mysql-server and a relativly slow machine for
apache).

  Probaly :-)

  From this page:

http://www.mysql.com/information/presentations/presentation-oscon2000-20
0007
19/

  You can read on section 'General tips':

- Store BLOB's that you need to access as files in files. Store only the
file name in the database.

  But I guess it also depends on the image size.

--

Julio Nobrega

Don't eat the yellow snow.


"Stefan Rusterholz" <[EMAIL PROTECTED]> wrote in message
000701c179bb$33c4df30$3c01a8c0@quasimodo">news:000701c179bb$33c4df30$3c01a8c0@quasimodo...
> I did do that for a galery-script of myself. I don't have any numbers
if
> you'r looking for that but my personal impression was, that the
picture
> output from the mysql-db is actually faster than reading directly from
disk.
> But that could be due to server capabilities of my ISP (if he has for
> example a high tech mysql-server and a relativly slow machine for
apache).
>
> But with a quite fast mysql-server it shouldn't be a problem I think.
>
> And if it _would_ be a problem, I think there are still more positive
> aspects then negatives (easy handling, having stored all important
> informations together, fast searching of images with keywords and so
on)
>
> best regards
> Stefan Rusterholz, [EMAIL PROTECTED]
> --




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Stuck on array, need a little help.

2001-11-30 Thread Hank Marquardt

Well, it's saying that because $key is an array;)  For example,
"Mountain" is a $sub_cat:
>  "Mountain"  => array(
>   "Trek"  => array(
> "Fuel 100" => "mountain.php?brand=tfuel90",
> "Fuel 90"  => "mountain.php?brand=schhg"
> ),
>   "Klein" => array(
> "bike 1" => "URL",
> "bike 2" => "URL"
> ),
>   "Gary Fisher" => array(
> "bike 1" => "URL",
> "bike 2" => "URL"
> ),
>   "Moots" => array(
> "bike 1" => "URL",
> "bike 2" => "URL"
> )
>  ),

As you loop through, value will cycle "Trek","Klein","Gary
Fisher","Moots" ... $key will be the *array* that is referenced by each
of those $values --- while I understand what you're doing here, you are
really playing ass-backward with naming convention there:) ... normally
you deal in $key/$value pairs --

Bottom line is that you need to either cycle through $key array and
display multiple links, or you need to supply a subscript/key into the
array in your existing code.

Hank

On Fri, Nov 30, 2001 at 04:58:58PM -0500, Brian V Bonini wrote:
> I'm stuck. $key returns "Array" how can I get at each
> level of this array?
> 
> if ($cat == 'bikes' && $sub_cat != 'Road') {
> while (list($val, $key)=each($bikes[$sub_cat])) {
> echo " ALT=\"\" BORDER=\"0\">\n";
> echo "$val\n";
> 
> $bikes = array(
>  "Road"  => array(
>   "Trek"  => array(
> "Trek 5200" => "road.php?brand=t5200"
> ),
>   "LeMond" => array(
> "Zurich" => "road.php?brand=zurich",
> "Chambery" => "road.php?brand=chambery",
> "Alpe d'Huez" => "road.php?brand=alpe",
> "BuenosAries" => "road.php?brand=bueno",
> "Tourmalet" => "road.php?brand=tourmalet"
> ),
>   "Moots" => array(
> "VaMoots"  => "road.php?brand=vamoots"
> )
>  ),
>  "Mountain"  => array(
>   "Trek"  => array(
> "Fuel 100" => "mountain.php?brand=tfuel90",
> "Fuel 90"  => "mountain.php?brand=schhg"
> ),
>   "Klein" => array(
> "bike 1" => "URL",
> "bike 2" => "URL"
> ),
>   "Gary Fisher" => array(
> "bike 1" => "URL",
> "bike 2" => "URL"
> ),
>   "Moots" => array(
> "bike 1" => "URL",
> "bike 2" => "URL"
> )
>  ),
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
Hank Marquardt <[EMAIL PROTECTED]>
http://web.yerpso.net
GPG Id: 2BB5E60C
Fingerprint: D807 61BC FD18 370A AC1D  3EDF 2BF9 8A2D 2BB5 E60C
*** Web Development: PHP, MySQL/PgSQL - Network Admin: Debian/FreeBSD
*** PHP Instructor - Intnl. Webmasters Assn./HTML Writers Guild 
*** Beginning PHP -- Starts January 7, 2002 
*** See http://www.hwg.org/services/classes

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re[4]: [PHP] Re: system(), flush() and so on...

2001-11-30 Thread faeton

Hello Darren,

Linux RedHat 7.1, Apache 1.3.20, PHP 4.0.6

DG> Oops, you're right.  I did not read that line nor was I aware of that.
DG> I just tried  .  It works
DG> exactly as it says it should- outputs the lines as they come in.  I also
DG> know flush() works fine (at least for me).
DG> Perhaps you could provide some information about your O/S and PHP version?



Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Stuck on array, need a little help.

2001-11-30 Thread Brian V Bonini

No, all that will do is reverse the placement
of the values. So now it prints out Array
and puts the item in the URL. Still the same problem.


> -Original Message-
> From: Jim Musil [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 30, 2001 4:54 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Stuck on array, need a little help.
> 
> 
> Your script is working like you are asking it to ...
> 
> 
> Change ...
> 
>  while (list($val, $key)=each($bikes[$sub_cat])) {
> 
> To ...
> 
>  while (list($key, $val)=each($bikes[$sub_cat])) {
> 
> and it should work like you WANT it to ...
> 
> >I'm stuck. $key returns "Array" how can I get at each
> >level of this array?
> >
> >if ($cat == 'bikes' && $sub_cat != 'Road') {
> > while (list($val, $key)=each($bikes[$sub_cat])) {
> > echo " HEIGHT=\"1\"
> >ALT=\"\" BORDER=\"0\">\n";
> > echo "$val\n";
> >
> >$bikes = array(
> >  "Road"  => array(
> >   "Trek"  => array(
> > "Trek 5200" => "road.php?brand=t5200"
> > ),
> >   "LeMond" => array(
> > "Zurich" => "road.php?brand=zurich",
> > "Chambery" => "road.php?brand=chambery",
> > "Alpe d'Huez" => "road.php?brand=alpe",
> > "BuenosAries" => "road.php?brand=bueno",
> > "Tourmalet" => "road.php?brand=tourmalet"
> > ),
> >   "Moots" => array(
> > "VaMoots"  => "road.php?brand=vamoots"
> > )
> >  ),
> >  "Mountain"  => array(
> >   "Trek"  => array(
> > "Fuel 100" => "mountain.php?brand=tfuel90",
> > "Fuel 90"  => "mountain.php?brand=schhg"
> > ),
> >   "Klein" => array(
> > "bike 1" => "URL",
> > "bike 2" => "URL"
> > ),
> >   "Gary Fisher" => array(
> > "bike 1" => "URL",
> > "bike 2" => "URL"
> > ),
> >   "Moots" => array(
> > "bike 1" => "URL",
> > "bike 2" => "URL"
> > )
> >  ),
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> -- 
> Jim Musil
> -
> Multimedia Programmer
> Nettmedia
> -
> 212-629-0004
> [EMAIL PROTECTED]
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Stuck on array, need a little help.

2001-11-30 Thread Jim Musil

Your script is working like you are asking it to ...


Change ...

 while (list($val, $key)=each($bikes[$sub_cat])) {

To ...

 while (list($key, $val)=each($bikes[$sub_cat])) {

and it should work like you WANT it to ...

>I'm stuck. $key returns "Array" how can I get at each
>level of this array?
>
>if ($cat == 'bikes' && $sub_cat != 'Road') {
> while (list($val, $key)=each($bikes[$sub_cat])) {
> echo "ALT=\"\" BORDER=\"0\">\n";
> echo "$val\n";
>
>$bikes = array(
>  "Road"  => array(
>   "Trek"  => array(
> "Trek 5200" => "road.php?brand=t5200"
> ),
>   "LeMond" => array(
> "Zurich" => "road.php?brand=zurich",
> "Chambery" => "road.php?brand=chambery",
> "Alpe d'Huez" => "road.php?brand=alpe",
> "BuenosAries" => "road.php?brand=bueno",
> "Tourmalet" => "road.php?brand=tourmalet"
> ),
>   "Moots" => array(
> "VaMoots"  => "road.php?brand=vamoots"
> )
>  ),
>  "Mountain"  => array(
>   "Trek"  => array(
> "Fuel 100" => "mountain.php?brand=tfuel90",
> "Fuel 90"  => "mountain.php?brand=schhg"
> ),
>   "Klein" => array(
> "bike 1" => "URL",
> "bike 2" => "URL"
> ),
>   "Gary Fisher" => array(
> "bike 1" => "URL",
> "bike 2" => "URL"
> ),
>   "Moots" => array(
> "bike 1" => "URL",
> "bike 2" => "URL"
> )
>  ),
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
Jim Musil
-
Multimedia Programmer
Nettmedia
-
212-629-0004
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Stuck on array, need a little help.

2001-11-30 Thread Brian V Bonini

I'm stuck. $key returns "Array" how can I get at each
level of this array?

if ($cat == 'bikes' && $sub_cat != 'Road') {
while (list($val, $key)=each($bikes[$sub_cat])) {
echo "\n";
echo "$val\n";

$bikes = array(
 "Road"  => array(
  "Trek"  => array(
"Trek 5200" => "road.php?brand=t5200"
),
  "LeMond" => array(
"Zurich" => "road.php?brand=zurich",
"Chambery" => "road.php?brand=chambery",
"Alpe d'Huez" => "road.php?brand=alpe",
"BuenosAries" => "road.php?brand=bueno",
"Tourmalet" => "road.php?brand=tourmalet"
),
  "Moots" => array(
"VaMoots"  => "road.php?brand=vamoots"
)
 ),
 "Mountain"  => array(
  "Trek"  => array(
"Fuel 100" => "mountain.php?brand=tfuel90",
"Fuel 90"  => "mountain.php?brand=schhg"
),
  "Klein" => array(
"bike 1" => "URL",
"bike 2" => "URL"
),
  "Gary Fisher" => array(
"bike 1" => "URL",
"bike 2" => "URL"
),
  "Moots" => array(
"bike 1" => "URL",
"bike 2" => "URL"
)
 ),


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] declaring variables mandatory???

2001-11-30 Thread Brian V Bonini

change error level reporting
error_reporting()

-Brian

> -Original Message-
> From: Andy [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 30, 2001 2:38 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] declaring variables mandatory???
>
>
> Hello,
>
> I have a problem with my php installation. PHP runs, but all my variables
> have to be declared, othervise I am getting following error:
>
> Warning: Undefined variable: next in
> e:\projects\globosapiens\07_production\actual\forum\install.php on line 33
>
> I guess this is only on my system, since I have obtained other php code
> which workes on other systems, but not on mine.
>
> Thanx for any help
>
> Cheers,
>
> Andy
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: Re[2]: [PHP] Re: system(), flush() and so on...

2001-11-30 Thread Darren Gamble

Good day,

Oops, you're right.  I did not read that line nor was I aware of that.

I just tried  .  It works
exactly as it says it should- outputs the lines as they come in.  I also
know flush() works fine (at least for me).

Perhaps you could provide some information about your O/S and PHP version?


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: faeton [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 30, 2001 2:35 PM
To: Darren Gamble
Cc: [EMAIL PROTECTED]
Subject: Re[2]: [PHP] Re: system(), flush() and so on...


Hello Darren,

-- manual cut 
The system() call also tries to automatically flush the web server's
output buffer after each line of output if PHP is running as a server
module.
-- manual cut 

Hehe. The problem is not in flushing ability of system() foo, but
flush() itself is not working :(
I've tried to install PHP as a module (as written above), cgi,
compiled with apache. But nothing worked.

DG> flush() will just empty the contents of the output buffer when it's
called.
DG> You should do this after you output the command, yes, or the user will
have
DG> to wait until the rest of the page is loaded.  But this won't let you
see
DG> the output as it is generated by the system() function.

DG> You may want to try popen instead.  This gives you a pipe to the
process, so
DG> you _should_ be able to read in lines of the output and display them as
they
DG> appear, whilst using flush()  (although I have never tried this myself
so I
DG> can not vouch for it).



Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re[2]: [PHP] Re: system(), flush() and so on...

2001-11-30 Thread faeton

Hello Darren,

-- manual cut 
The system() call also tries to automatically flush the web server's
output buffer after each line of output if PHP is running as a server
module.
-- manual cut 

Hehe. The problem is not in flushing ability of system() foo, but
flush() itself is not working :(
I've tried to install PHP as a module (as written above), cgi,
compiled with apache. But nothing worked.

DG> flush() will just empty the contents of the output buffer when it's called.
DG> You should do this after you output the command, yes, or the user will have
DG> to wait until the rest of the page is loaded.  But this won't let you see
DG> the output as it is generated by the system() function.

DG> You may want to try popen instead.  This gives you a pipe to the process, so
DG> you _should_ be able to read in lines of the output and display them as they
DG> appear, whilst using flush()  (although I have never tried this myself so I
DG> can not vouch for it).



Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: system(), flush() and so on...

2001-11-30 Thread Darren Gamble

Good day,

flush() will just empty the contents of the output buffer when it's called.
You should do this after you output the command, yes, or the user will have
to wait until the rest of the page is loaded.  But this won't let you see
the output as it is generated by the system() function.

You may want to try popen instead.  This gives you a pipe to the process, so
you _should_ be able to read in lines of the output and display them as they
appear, whilst using flush()  (although I have never tried this myself so I
can not vouch for it).


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: faeton [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 30, 2001 2:21 PM
To: Julio Nobrega Trabalhando
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: system(), flush() and so on...


Hello Julio,

Hm... I don't even know what to specify :)
The exact problem is using system("traceroute host.com"), but it
should've returned its results line by line, instead of executing the
whole command and then outputting its result.

That is done by flush(), which is executed by system() foo itself, but
i couldn't understand why i have needed result on some servers and on
others - vice versa.

JNT>   Hi, please be more specific. Including what error you are getting,
what is
JNT> the tools being used, and their versions.
JNT>   Here's a quick help for producing better questions, wich will in turn
make
JNT> us answer faster and with more quality:
JNT> http://www.tuxedo.org/~esr/faqs/smart-questions.html
JNT>   PS: btw, I am far away from being a 'hacker', don't get me wrong
whole
JNT> list people :-)


Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: system(), flush() and so on...

2001-11-30 Thread faeton

Hello Julio,

Hm... I don't even know what to specify :)
The exact problem is using system("traceroute host.com"), but it
should've returned its results line by line, instead of executing the
whole command and then outputting its result.

That is done by flush(), which is executed by system() foo itself, but
i couldn't understand why i have needed result on some servers and on
others - vice versa.

JNT>   Hi, please be more specific. Including what error you are getting, what is
JNT> the tools being used, and their versions.
JNT>   Here's a quick help for producing better questions, wich will in turn make
JNT> us answer faster and with more quality:
JNT> http://www.tuxedo.org/~esr/faqs/smart-questions.html
JNT>   PS: btw, I am far away from being a 'hacker', don't get me wrong whole
JNT> list people :-)


Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: system(), flush() and so on...

2001-11-30 Thread Julio Nobrega Trabalhando

  Hi, please be more specific. Including what error you are getting, what is
the tools being used, and their versions.

  Here's a quick help for producing better questions, wich will in turn make
us answer faster and with more quality:

http://www.tuxedo.org/~esr/faqs/smart-questions.html

  PS: btw, I am far away from being a 'hacker', don't get me wrong whole
list people :-)

--

Julio Nobrega

Don't eat the yellow snow.


"Faeton" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Salute, PHP list :),
>
>   Aloha, ppl.
>   Could anybody explain 2 me what da heck is wrong with flush(). What
>   is needed for it to run as needed? :) If I'm to mistaken that should
>   be an php module for apache? And what if it's compiled together with
>   apache? I dunno what 2 do.
>
>
> 
> Ivan 'Faeton aka xetrix' Danishevsky
> ICQ(240266) [EMAIL PROTECTED] www.xemichat.com
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] SMS

2001-11-30 Thread Henrik Hansen

[EMAIL PROTECTED] (Dan McCullough) wrote:

 > somewhere in here ... I'm not familiar with the actual object, but if you have 
 >success withit I
 > would like to hear how you are doing with it.
 > http://www.simplewire.com/developers/code/

ahh yeah now i remember seing it :)

-- 
Henrik Hansen

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] system(), flush() and so on...

2001-11-30 Thread faeton

Salute, PHP list :),

  Aloha, ppl.
  Could anybody explain 2 me what da heck is wrong with flush(). What
  is needed for it to run as needed? :) If I'm to mistaken that should
  be an php module for apache? And what if it's compiled together with
  apache? I dunno what 2 do.



Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How to work with MySQL tables WITHOUT telnet, SSH or PhpMyAdmin

2001-11-30 Thread Dan McCullough

Yes most shared hosts will not allow the creation of multiple databases. Just one, so 
you will
have to make use with table creation.

dan mccullough
programming/enginnering
603.444.9808

--- Sverre Johan Tøvik <[EMAIL PROTECTED]> wrote:
> At 15:19 -0500 30-11-01, [EMAIL PROTECTED] wrote:
> 
> >  Our web host does not support telnet or SSH for its clients and is not
> >  interested in working with PhpMyAdmin at the moment (I think I need their
> >  assistance if I want to use PhpMyAdmin, right?). Is this rather typical of
> >  web hosts?
> 
> You do not need their assistance to use phpMyAdmin - it's just 
> another php site. All you need to do is edit its config file, where 
> you enter the database names, usernames and passwords for all your 
> databases. You can then choose a database from the phpMyAdmin "home 
> page".
> 
> The only limitation is I believe is that to create new databases, 
> you'll have to have "create" rights on the username for one of the 
> databases you set up, and choose that database in phpMyAdmin before 
> creating the new database with SQL.
> 
> 
>   Sverre
> -- 
>  I speak for myself only! 
> "to be yourself, in a world that tries, night and day, to make you just
> like everybody else - is to fight the greatest battle there ever is to
> fight, and never stop fighting" -- e.e. cummings
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] SMS

2001-11-30 Thread Dan McCullough

somewhere in here ... I'm not familiar with the actual object, but if you have success 
withit I
would like to hear how you are doing with it.
http://www.simplewire.com/developers/code/

--- Henrik Hansen <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] (Dan McCullough) wrote:
> 
>  > Heres a code snippet:
>  > Sorry for leading astray.
> >
>  > // load the swsms module 
>  > dl( "../swsms.so" ); 
> 
> never heard of a sms module in php, where can you get this?
> 
> -- 
> Henrik Hansen
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

=
Dan McCullough
---
"Theres no such thing as a problem unless the servers are on fire!"
h: 603.444.9808
w: McCullough Family
w: At Work

__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How to work with MySQL tables WITHOUT telnet, SSH orPhpMyAdmin

2001-11-30 Thread Sverre Johan Tøvik

At 15:19 -0500 30-11-01, [EMAIL PROTECTED] wrote:

>  Our web host does not support telnet or SSH for its clients and is not
>  interested in working with PhpMyAdmin at the moment (I think I need their
>  assistance if I want to use PhpMyAdmin, right?). Is this rather typical of
>  web hosts?

You do not need their assistance to use phpMyAdmin - it's just 
another php site. All you need to do is edit its config file, where 
you enter the database names, usernames and passwords for all your 
databases. You can then choose a database from the phpMyAdmin "home 
page".

The only limitation is I believe is that to create new databases, 
you'll have to have "create" rights on the username for one of the 
databases you set up, and choose that database in phpMyAdmin before 
creating the new database with SQL.


Sverre
-- 
 I speak for myself only! 
"to be yourself, in a world that tries, night and day, to make you just
like everybody else - is to fight the greatest battle there ever is to
fight, and never stop fighting" -- e.e. cummings

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] SMS

2001-11-30 Thread Dan McCullough

That example I sent was from a place where they have the swsms shared object which you 
can get in
a developers license, I havent actually tried it, but was looking at it for a project.

--- Henrik Hansen <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] (Dan McCullough) wrote:
> 
>  > I think you need an SMS server to "broadcast" the data.  Am I correct?
> 
> you can also send sms with the mail function, but a gsm modem is by
> far the best, so for a stabile service either rent a sms service or
> get somekind of a gsm modem. AFAIK
> 
> -- 
> Henrik Hansen
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


=
Dan McCullough
---
"Theres no such thing as a problem unless the servers are on fire!"
h: 603.444.9808
w: McCullough Family
w: At Work

__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: [PHP-WIN] BARE LF in Sending Mail from PHP

2001-11-30 Thread R'twick Niceorgaw

which line the error was on ? and what was the error ?
I can not see why it would give any parse error

I have run this test program and it worked fine.. without any parse error.
It may be somewhere else in your code.
Here's my sample code.

\r\n";
$Headers.="X-Mailer: PHP/" . phpversion()."\r\n";


 mail($fmail, $subject, $message, $Headers);
}
SendSite("R'twick Niceorgaw", "[EMAIL PROTECTED]","Test
Name",user@localhost);
?>

- Original Message -
From: "Eric Rosebrock" 
To: <[EMAIL PROTECTED]>
Sent: Friday, November 30, 2001 2:50 PM
Subject: Re: [PHP-WIN] BARE LF in Sending Mail from PHP


> Unfortunately, that code gave me a parse error.
>
>
> "R'Twick Niceorgaw" <[EMAIL PROTECTED]> wrote in message
> news:04af01c179d5$3503f010$[EMAIL PROTECTED]...
> > Eric,
> > Here is what I believe will work.
> > You need to put \r\n after the From Header and after the X-Mailer
header.
> > I have moved the from and X-Mailer to a separate header for clarity.
> > try it and let me know if you still getting the same error.
> >
> > Good luck
> >
> >  function SendSite($yname, $ymail, $fname, $fmail) {
> >  global $sitename, $slogan, $nukeurl, $ModName;
> >  $subject = ""._INTSITE." $sitename";
> >  $message = ""._HELLO." $fname:\n\n"._YOURFRIEND." $yname
"._OURSITE."
> >  $sitename "._INTSENT."\n\n\n"._FSITENAME."
> > $sitename\n$slogan\n"._FSITEURL."
> >  $nukeurl";
> >
> >
> > $Headers = "From: $yname<$ymail>\r\n";
> > $Headers.="X-Mailer: PHP/" . phpversion()."\r\n";
> >
> >
> >  mail($fmail, $subject, $message, $Headers);
> >
> >  // Header("Location: friend.php?op=SiteSent&fname=$fname");
> >  // Original commented out by adam_baum 07-07-2001 when moved to a
> >  module.
> >  echo " >  URL=modules.php?op=modload&name=$ModName&file=index\">";
> >  echo "";
> >  }
> >
> > - Original Message -
> > From: "Eric Rosebrock" 
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, November 30, 2001 2:11 PM
> > Subject: Re: [PHP-WIN] BARE LF in Sending Mail from PHP
> >
> >
> > > Ok,
> > >
> > > I am going to try go go into as much detail as I can for this one. I
> have
> > > done some modifications of the certain script that I am using and I am
> > > getting --- somewhere ---
> > >
> > > Starting off, Here's the original script and a copy of the mail log
from
> > my
> > > mail server for this transacition.
> > >
> > > Original Script:
> > >
> > > }
> > >
> > > function SendSite($yname, $ymail, $fname, $fmail) {
> > > global $sitename, $slogan, $nukeurl, $ModName;
> > > $subject = ""._INTSITE." $sitename";
> > > $message = ""._HELLO." $fname:\n\n"._YOURFRIEND." $yname
> "._OURSITE."
> > > $sitename "._INTSENT."\n\n\n"._FSITENAME."
> > $sitename\n$slogan\n"._FSITEURL."
> > > $nukeurl\n";
> > > mail($fmail, $subject, $message, "From: \"$yname\"
> <$ymail>\nX-Mailer:
> > > PHP/" . phpversion());
> > > // Header("Location: friend.php?op=SiteSent&fname=$fname");
> > > // Original commented out by adam_baum 07-07-2001 when moved to a
> > > module.
> > > echo " > > URL=modules.php?op=modload&name=$ModName&file=index\">";
> > > echo "";
> > > }
> > >
> > > Mail Log from the original script through my smtp server and where it
> > fails
> > > from the QMail server it's sending to:
> > >
> > > Thread 1: 18:58:53 [<---] : HELO xx.net
> > > Thread 1: 18:58:53 [--->] : 220 x.net ESMTP
> > > Thread 1: 18:58:53 [<---] : MAIL FROM: <[EMAIL PROTECTED]>
> > > Thread 1: 18:58:54 [--->] : 250 xxx.net
> > > Thread 1: 18:58:54 [<---] : RCPT TO: <[EMAIL PROTECTED]>
> > > Thread 1: 18:58:54 [--->] : 250 ok
> > > Thread 1: 18:58:54 [<---] : DATA
> > > Thread 1: 18:58:54 [--->] : 250 ok
> > > Thread 1: 18:58:54 [--->] : 354 go ahead
> > > Thread 1: 18:58:54 [<---] : QUIT
> > > Thread 1: 18:58:54 [--->] : 451 See
> > http://pobox.com/~djb/docs/smtplf.html.
> > >
> > >
> > >
> > > Modified Script (I tried to put the carriage returns in, but I think I
> am
> > > missing something):
> > >
> > > }
> > >
> > > function SendSite($yname, $ymail, $fname, $fmail) {
> > > global $sitename, $slogan, $nukeurl, $ModName;
> > > $subject = ""._INTSITE." $sitename";
> > > $message = ""._HELLO." $fname:\r\n"._YOURFRIEND." $yname
> "._OURSITE."
> > > $sitename "._INTSENT."\r\n"._FSITENAME."
> > > $sitename\r\n$slogan\r\n"._FSITEURL." $nukeurl\r\n";
> > > mail($fmail, $subject, $message, "From: \"$yname\"
> <$ymail>\nX-Mailer:
> > > PHP/" . phpversion());
> > > // Header("Location: friend.php?op=SiteSent&fname=$fname");
> > > // Original commented out by adam_baum 07-07-2001 when moved to a
> > > module.
> > > echo " > > URL=modules.php?op=modload&name=$ModName&file=index\">";
> > > echo "";
> > > }
> > >
> > >
> > > Mail log from the modified script through my SMTP server and it doesnt
> > > display an error message or anything at all on the last line:
> > >
> > > Thread 1: 19:51:58 [<---] : HELO x.net
> > > Thread 1: 

Re: [PHP] SMS

2001-11-30 Thread Henrik Hansen

[EMAIL PROTECTED] (Dan McCullough) wrote:

 > Heres a code snippet:
 > Sorry for leading astray.
>
 > // load the swsms module 
 > dl( "../swsms.so" ); 

never heard of a sms module in php, where can you get this?

-- 
Henrik Hansen

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] SMS

2001-11-30 Thread Henrik Hansen

[EMAIL PROTECTED] (Dan McCullough) wrote:

 > I think you need an SMS server to "broadcast" the data.  Am I correct?

you can also send sms with the mail function, but a gsm modem is by
far the best, so for a stabile service either rent a sms service or
get somekind of a gsm modem. AFAIK

-- 
Henrik Hansen

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: How to work with MySQL tables WITHOUT telnet, SSH or PhpMyAdmin

2001-11-30 Thread Julio Nobrega Trabalhando

>(I think I need their
> assistance if I want to use PhpMyAdmin, right?

  Most of the time, no. These are the lines you usually need to change on
PhpMyAdmin config file:

$cfgServers[1]['host']  = 'localhost'; // MySQL hostname
$cfgServers[1]['user']  = 'root';  // MySQL user (only needed
with basic auth)
$cfgServers[1]['password']  = '';  // MySQL password (only
needed with basic auth)

  Pretty standard for a php/mysql script configuration. It is hard to
believe it won't work, so I would give a shot.
(http://phpmyadmin.sourceforge.net).


--

Julio Nobrega

Don't eat the yellow snow.


<[EMAIL PROTECTED]> wrote in message
BB6D932A42D6D211B4AC0090274EBB1DA0F0FB@GLOBAL1">news:BB6D932A42D6D211B4AC0090274EBB1DA0F0FB@GLOBAL1...
> Our organization has a website that uses PHP and MySQL.  In fact, at least
> 75% of our webpages are generated dynamically.
>
> I want to run reports on the current MySQL database, create new databases
> and create, copy and alter existing tables.
>
> Our web host does not support telnet or SSH for its clients and is not
> interested in working with PhpMyAdmin at the moment (I think I need their
> assistance if I want to use PhpMyAdmin, right?). Is this rather typical of
> web hosts?
>
> Can I do the tasks above by designing up a php/web interface from scratch?
> Any help/suggestions will be greatly appreciated.
>
> Frustrated in Vermont - Shawna



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] How to work with MySQL tables WITHOUT telnet, SSH or PhpMyAdmin

2001-11-30 Thread sgibbs

Our organization has a website that uses PHP and MySQL.  In fact, at least
75% of our webpages are generated dynamically. 

I want to run reports on the current MySQL database, create new databases
and create, copy and alter existing tables.  

Our web host does not support telnet or SSH for its clients and is not
interested in working with PhpMyAdmin at the moment (I think I need their
assistance if I want to use PhpMyAdmin, right?). Is this rather typical of
web hosts?

Can I do the tasks above by designing up a php/web interface from scratch?
Any help/suggestions will be greatly appreciated.

Frustrated in Vermont - Shawna

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: I'm getting frustrated with this.

2001-11-30 Thread Fred

If you want to know exactly why mysql functions fail you should always, and
I do mean always, use this form:
$Result = mysql_query($Query, $Connection)
or die (mysql_error());
You will always get a fairly descriptive error from mysql.  If you still do
not understand the error, at least you have more specific information for
this list.

Fred

Chip Wiegand <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
> I just want a simple page that pulls the data from a database (got that
> working fine, no problem),
> and on that page I want to be able to have an option to delete entries. I
> have tried what seems
> to be the simplest method - using a form text field, enter the appropriate
> info, and hit the submit
> button. It should then be deleted from the database. I can delete from the
> database on the
> command line, but getting it to work in php is another story. I keep
> getting 'not a valid mysql
> result resource' errors. I have 3 php/mysql books and cannot get this to
> work. I know it can't be
> as difficult as it appears.
> My goal is simple enough - I have a database that is populated from online
> web forms. It contains
> enduser names, addresses & email addresses. I made a form that the
> marketing people can use
> to view the database, search it and display it in various ways. I also
gave
> them a form that will
> allow them to manually add enduser info into the database. That all works
> fine. It's just the doggone
> delete stuff that I just haven't got a handle on yet.
> Is there a tutorial somewhere that shows the simplest method of setting
> this up? That's all I need,
> a reference to a location for a tutorial or info on this particular
> subject.
>
> Thanks,
> Chip
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] chown/chgrp not working

2001-11-30 Thread Fred

I tackled a similar problem by running a root cron job that does the chown
and chgrp every x minutes.

Fred

Paul Warner <[EMAIL PROTECTED]> wrote in message
023601c179b6$a35bdd80$[EMAIL PROTECTED]">news:023601c179b6$a35bdd80$[EMAIL PROTECTED]...
> Ahh, it is not running with root priv., so this is the problem.  Sounds
like
> a good time to look
> for another way to skin this cat...
>
> Thanks!
>
> -- Paul
>
>
> - Original Message -
> From: "Darren Gamble" <[EMAIL PROTECTED]>
> To: "'Paul Warner'" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Friday, November 30, 2001 10:21 AM
> Subject: RE: [PHP] chown/chgrp not working
>
>
> > Good day,
> >
> > What user is the application running as?  Only the superuser can use
these
> > functions (this is documented with both of these functions).
> >
> > For security reasons, you may want to use an external sudo script to
> > accomplish this.  Be very, very careful...
> >
> > 
> > Darren Gamble
> > Planner, Regional Services
> > Shaw Cablesystems GP
> > 630 - 3rd Avenue SW
> > Calgary, Alberta, Canada
> > T2P 4L4
> > (403) 781-4948
> >
> >
> > -Original Message-
> > From: Paul Warner [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, November 30, 2001 8:24 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] chown/chgrp not working
> >
> >
> > I have a client that I made a image uploader/thumbnailer for
> > that insists on using FrontPage.  In order to make FP
> > happy, I need to set the owner to 'nobody' and the group
> > to 'site3' which are uid 99 and gid 117.  The uploaded file
> > is set as httpd/root and the thumbnail created by the script
> > comes out httpd/site3.
> >
> > First I tried:
> >
> >  chown($file_name, 99);
> >  chgrp($file_name, 117);
> >
> > Next I tried:
> >
> >  chown($file_name, '99');
> >  chgrp($file_name, '117');
> >
> > This fails to get the uid or gid, so the first syntax appears
> > to be correct.
> >
> > Finally I tried:
> >
> >  chown($file_name, 'nobody');
> >  chgrp($file_name, 'site3');
> >
> > Error message for first and third attempts is identical:
> >
> > Warning: chown failed: Operation not permitted in
> > /home/sites/site3/web/dev/maintenance.php on line 191
> >
> > Why is it 'not permitted' and how do I allow it?
> >
> > -- Paul
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] declaring variables mandatory???

2001-11-30 Thread R'twick Niceorgaw

Check this url. Your error_reporting is set to E_ALL in the php.ini file.
Change it to suit your need.
On my machine I have error_reporting set as below in the php.ini file.

error_reporting =   E_ALL & ~E_NOTICE


http://www.php.net/manual/en/function.error-reporting.php

- Original Message -
From: "Andy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 30, 2001 2:37 PM
Subject: [PHP] declaring variables mandatory???


> Hello,
>
> I have a problem with my php installation. PHP runs, but all my variables
> have to be declared, othervise I am getting following error:
>
> Warning: Undefined variable: next in
> e:\projects\globosapiens\07_production\actual\forum\install.php on line 33
>
> I guess this is only on my system, since I have obtained other php code
> which workes on other systems, but not on mine.
>
> Thanx for any help
>
> Cheers,
>
> Andy
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] generating text file from php

2001-11-30 Thread John S. Huggins

On Fri, 30 Nov 2001, David Tod Sigafoos wrote:

>-I have a script which generates html and writes out for users to
>-download.  The script works and the html file works.
>-
>-I build strings of html then writeout with fwrite.  
>-
>-My question is how can i add linefeeds to the strings?

\n

or maybe

\r

>-
>-Thanks
>-
>--- 
>-PHP General Mailing List (http://www.php.net/)
>-To unsubscribe, e-mail: [EMAIL PROTECTED]
>-For additional commands, e-mail: [EMAIL PROTECTED]
>-To contact the list administrators, e-mail: [EMAIL PROTECTED]
>-

**

John Huggins
VANet
7101 Oriole Avenue
Springfield, VA 22150
703-912-6453
703-912-4831 fax

[EMAIL PROTECTED]
http://www.va.net/

**


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] declaring variables mandatory???

2001-11-30 Thread Tyler Longren

I'm not sure, but I'd check the Error level settings in php.ini.  It might
be set to display stupid little warnings like this.

Good luck,
Tyler Longren

- Original Message -
From: "Andy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 30, 2001 1:37 PM
Subject: [PHP] declaring variables mandatory???


> Hello,
>
> I have a problem with my php installation. PHP runs, but all my variables
> have to be declared, othervise I am getting following error:
>
> Warning: Undefined variable: next in
> e:\projects\globosapiens\07_production\actual\forum\install.php on line 33
>
> I guess this is only on my system, since I have obtained other php code
> which workes on other systems, but not on mine.
>
> Thanx for any help
>
> Cheers,
>
> Andy
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] declaring variables mandatory???

2001-11-30 Thread Andy

Hello,

I have a problem with my php installation. PHP runs, but all my variables
have to be declared, othervise I am getting following error:

Warning: Undefined variable: next in
e:\projects\globosapiens\07_production\actual\forum\install.php on line 33

I guess this is only on my system, since I have obtained other php code
which workes on other systems, but not on mine.

Thanx for any help

Cheers,

Andy




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] generating text file from php

2001-11-30 Thread David Tod Sigafoos

I have a script which generates html and writes out for users to
download.  The script works and the html file works.

I build strings of html then writeout with fwrite.  

My question is how can i add linefeeds to the strings?

Thanks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: I'm getting frustrated with this.

2001-11-30 Thread Julio Nobrega Trabalhando

  Well, you could go to www.hotscripts.com/PHP article and tutorials
sections.

  But it is easy.

  Delete syntax is:

  This will boom every record.
  DELETE FROM table;

  This will boom every Joe:
  DELETE FROM table WHERE name='Joe';

  This will boom an id. That's probaly the way you want. Also it ensures (if
your id collumn is a PRIMARY or UNIQUE column) that the desired client will
be deleted:
  DELETE FROM table WHERE id='$id';

  But, what is $id? It's a value that you passed, for example, via a form.


  
$last_name, $name";
 }
?>
  


  Or your prefered way of passing the id value.

  On boom.php:

$sql = "DELETE FROM table WHERE id='$id'";
mysql_query($sql);

  But let's say you didn't make a client id field (wich is generally bad
practice), but you have the EXACTLY name, last name and address. I stress
the importance of exactly because the following line would not delete
'Street' if the value is 'Str.':

$sql = "DELETE FROM table WHERE name='$name' AND last_name = '$last_name'
AND address = '$address'";
mysq_query($sql);

  To make simpler for who's going to use the system, an idea. When
displaying client search results, put a little text/icon/image close to the
client name. A link like:

Boom this!

  Where $id is that field you got from your Primary or Unique mysql table
column.

  Well, that pretty much is the basic. The most important part if the WHERE
part of the sql clause. Just get it right and everything will be fine.

  And remember, never test anything like this on production enviroments! As
'DELETE FROM table' is evil.

--

Julio Nobrega

Don't eat the yellow snow.


"Chip Wiegand" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
> I just want a simple page that pulls the data from a database (got that
> working fine, no problem),
> and on that page I want to be able to have an option to delete entries. I
> have tried what seems
> to be the simplest method - using a form text field, enter the appropriate
> info, and hit the submit
> button. It should then be deleted from the database. I can delete from the
> database on the
> command line, but getting it to work in php is another story. I keep
> getting 'not a valid mysql
> result resource' errors. I have 3 php/mysql books and cannot get this to
> work. I know it can't be
> as difficult as it appears.
> My goal is simple enough - I have a database that is populated from online
> web forms. It contains
> enduser names, addresses & email addresses. I made a form that the
> marketing people can use
> to view the database, search it and display it in various ways. I also
gave
> them a form that will
> allow them to manually add enduser info into the database. That all works
> fine. It's just the doggone
> delete stuff that I just haven't got a handle on yet.
> Is there a tutorial somewhere that shows the simplest method of setting
> this up? That's all I need,
> a reference to a location for a tutorial or info on this particular
> subject.
>
> Thanks,
> Chip
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] I'm getting frustrated with this.

2001-11-30 Thread andre

look this:
http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial4.html
maybe it help you

andre

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 30, 2001 4:59 PM
Subject: [PHP] I'm getting frustrated with this.


> Hi,
> I just want a simple page that pulls the data from a database (got that
> working fine, no problem),
> and on that page I want to be able to have an option to delete entries. I
> have tried what seems
> to be the simplest method - using a form text field, enter the appropriate
> info, and hit the submit
> button. It should then be deleted from the database. I can delete from the
> database on the
> command line, but getting it to work in php is another story. I keep
> getting 'not a valid mysql
> result resource' errors. I have 3 php/mysql books and cannot get this to
> work. I know it can't be
> as difficult as it appears.
> My goal is simple enough - I have a database that is populated from online
> web forms. It contains
> enduser names, addresses & email addresses. I made a form that the
> marketing people can use
> to view the database, search it and display it in various ways. I also
gave
> them a form that will
> allow them to manually add enduser info into the database. That all works
> fine. It's just the doggone
> delete stuff that I just haven't got a handle on yet.
> Is there a tutorial somewhere that shows the simplest method of setting
> this up? That's all I need,
> a reference to a location for a tutorial or info on this particular
> subject.
>
> Thanks,
> Chip
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>

-
This mail has been sent by IceWarp Merak Mail Server, the coolest and the most
economical e-mail solution for ISP's, small and large businesses and DSL/cable
modem users. This installation is currently in a free trial expired mode. Click
the link to win a free unlimited IceWarp product http://www.icewarp.com/win/

IceWarp Software
E-mail: mailto:[EMAIL PROTECTED]
Web: http://www.icewarp.com/com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] I'm getting frustrated with this.

2001-11-30 Thread chip . wiegand

Hi,
I just want a simple page that pulls the data from a database (got that
working fine, no problem),
and on that page I want to be able to have an option to delete entries. I
have tried what seems
to be the simplest method - using a form text field, enter the appropriate
info, and hit the submit
button. It should then be deleted from the database. I can delete from the
database on the
command line, but getting it to work in php is another story. I keep
getting 'not a valid mysql
result resource' errors. I have 3 php/mysql books and cannot get this to
work. I know it can't be
as difficult as it appears.
My goal is simple enough - I have a database that is populated from online
web forms. It contains
enduser names, addresses & email addresses. I made a form that the
marketing people can use
to view the database, search it and display it in various ways. I also gave
them a form that will
allow them to manually add enduser info into the database. That all works
fine. It's just the doggone
delete stuff that I just haven't got a handle on yet.
Is there a tutorial somewhere that shows the simplest method of setting
this up? That's all I need,
a reference to a location for a tutorial or info on this particular
subject.

Thanks,
Chip


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] SMS

2001-11-30 Thread Dan McCullough

Heres a code snippet:
Sorry for leading astray.

// load the swsms module 
dl( "../swsms.so" ); 

// create the sms object 
$sms = create_sms(); 

// send the carrier list request 
carrierlist_send( &$sms ); 

// check if the request was a success 
if( ! $sms->success ) { 
// display error info 
print( "Unable to retreive a carrier list from Simplewire: " . $sms->errorDesc . 
"\n" ); 
print( "Error Code: " . $sms->errorCode . "\n" ); 
} 
else { 
// walk the carrier list array 
array_walk( $sms->carrierlist, displayCarrier ); 
} 

function displayCarrier( $c ) { 
// display the carrier info 
print( "ID: " . $c->id . "\n" ); 
print( "Title: " . $c->title . $c->subtitle . "\n\n" ); 
} 
--- Daniel Berwig <[EMAIL PROTECTED]> wrote:
> Does anyone know how could I send data from php through SMS to a cel phone?
> I simply can't find info about that.
> 
> Thanks in advance,
> 
> Daniel Berwig.
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


=
Dan McCullough
---
"Theres no such thing as a problem unless the servers are on fire!"
h: 603.444.9808
w: McCullough Family
w: At Work

__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] SMS

2001-11-30 Thread Dan McCullough

I think you need an SMS server to "broadcast" the data.  Am I correct?
Anyone
--- Daniel Berwig <[EMAIL PROTECTED]> wrote:
> Does anyone know how could I send data from php through SMS to a cel phone?
> I simply can't find info about that.
> 
> Thanks in advance,
> 
> Daniel Berwig.
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


=
Dan McCullough
---
"Theres no such thing as a problem unless the servers are on fire!"
h: 603.444.9808
w: McCullough Family
w: At Work

__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] SMS

2001-11-30 Thread Dan McCullough

I think you need an SMS server to "broadcast" the data.  Am I correct?
Anyone
--- Daniel Berwig <[EMAIL PROTECTED]> wrote:
> Does anyone know how could I send data from php through SMS to a cel phone?
> I simply can't find info about that.
> 
> Thanks in advance,
> 
> Daniel Berwig.
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


=
Dan McCullough
---
"Theres no such thing as a problem unless the servers are on fire!"
h: 603.444.9808
w: McCullough Family
w: At Work

__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] SMS

2001-11-30 Thread Daniel Berwig

Does anyone know how could I send data from php through SMS to a cel phone?
I simply can't find info about that.

Thanks in advance,

Daniel Berwig.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Speed of Images from DB

2001-11-30 Thread Julio Nobrega Trabalhando

> But that could be due to server capabilities of my ISP (if he has for
> example a high tech mysql-server and a relativly slow machine for apache).

  Probaly :-)

  From this page:

http://www.mysql.com/information/presentations/presentation-oscon2000-27
19/

  You can read on section 'General tips':

- Store BLOB's that you need to access as files in files. Store only the
file name in the database.

  But I guess it also depends on the image size.

--

Julio Nobrega

Don't eat the yellow snow.


"Stefan Rusterholz" <[EMAIL PROTECTED]> wrote in message
000701c179bb$33c4df30$3c01a8c0@quasimodo">news:000701c179bb$33c4df30$3c01a8c0@quasimodo...
> I did do that for a galery-script of myself. I don't have any numbers if
> you'r looking for that but my personal impression was, that the picture
> output from the mysql-db is actually faster than reading directly from
disk.
> But that could be due to server capabilities of my ISP (if he has for
> example a high tech mysql-server and a relativly slow machine for apache).
>
> But with a quite fast mysql-server it shouldn't be a problem I think.
>
> And if it _would_ be a problem, I think there are still more positive
> aspects then negatives (easy handling, having stored all important
> informations together, fast searching of images with keywords and so on)
>
> best regards
> Stefan Rusterholz, [EMAIL PROTECTED]
> --




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] MySQL: copying entire columns

2001-11-30 Thread Chris Hobbs



Tom Churm wrote:

>$sql = "Insert into $table_name(Address, Phone, Name)
>values('$Address','$Phone','$Name')";
>
>if this is true, it'll save me a lot of useless time trying to reorder
>my tables.
>
That be it :)

-- 
   ___  ____    _
Chris Hobbs   / \ \/ / |  | |/ ___\|  __ \
Head Geek| (___  \ \  / /| |  | | (___ | |  | |
WebMaster \___ \  \ \/ / | |  | |\___ \| |  | |
PostMaster) |  \  /  | |__| |) | |__| |
  \/\/\/ \/|_/
  http://www.silvervalley.k12.ca.us
  [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Session Help

2001-11-30 Thread Papp Gyozo


PHP automatically calls the appropiate function instead if you.
But consider that the save handler is not called on individual 
session_register functions, only when all output is gone, and 
the whole session - each registered variable - must be saved.


Note: The "write" handler is not executed until after the output stream is closed. 
Thus, output from debugging statements in the "write" handler will never be seen in 
the browser. If debugging output is necessary, it is suggested that the debug output 
be written to a file instead. 


- Original Message - 
From: "phantom" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 30, 2001 10:10 AM
Subject: [PHP] Session Help


| I am trying to set my session data to be stored in MySQL so I am using
| session_set_save_handler() which sets the six user-level session storage
| functions (which I have already defined).
| 
| Will session_set_save_handler automatically run the appropiate storage
| function when required (like when i say session_register("Variable"))
| --OR-- do I specifically have to run that function
| (mysql_sessions_write(SID,$Value))  from my script when I want to save
| info to the session table?
| 
| I would appreciate any scripts anyone might have that would illustrate
| how this works, the PHP manual and online examples I have found just are
| not cutting it.
| 
| Thank you.  [EMAIL PROTECTED]
| 
| 
| -- 
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
| To contact the list administrators, e-mail: [EMAIL PROTECTED]
| 



[PHP] ZendOptimizer.so apache

2001-11-30 Thread Bas Jobsen


Hello,

I want start ZendOptimizer with a .htaccess

this is in my .htaccess:
--
php_value zend_optimizer.optimization_level 15
php_value zend_extension "ZendOptimizer.so"
--

ZendOptimizer.so is in the same directory.

It does'nt seem to word. Do i someythnig wrong?

Tnx,

Bas

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Speed of Images from DB

2001-11-30 Thread Stefan Rusterholz

I did do that for a galery-script of myself. I don't have any numbers if
you'r looking for that but my personal impression was, that the picture
output from the mysql-db is actually faster than reading directly from disk.
But that could be due to server capabilities of my ISP (if he has for
example a high tech mysql-server and a relativly slow machine for apache).

But with a quite fast mysql-server it shouldn't be a problem I think.

And if it _would_ be a problem, I think there are still more positive
aspects then negatives (easy handling, having stored all important
informations together, fast searching of images with keywords and so on)

best regards
Stefan Rusterholz, [EMAIL PROTECTED]
--
interaktion gmbh
Stefan Rusterholz
Zürichbergstrasse 17
8032 Zürich
--
T. +41 1 253 19 55
F. +41 1 253 19 56
W3 www.interaktion.ch
--
- Original Message -
From: "Jim Musil" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 30, 2001 4:47 PM
Subject: [PHP] Speed of Images from DB


>
> I've been searching for the best way to store images that would be
> used in a dynamic site. In this situation, a site admin would upload
> images via a php script. Obviously this creates several problems.
>
> To prevent naming problems, I have php name all the uploaded images
> and store the name in a mysql db. Then, when needed, php will query
> to get the name and insert the image name into the image tag. This
> has always seemed like an incomplete solution because it's hard to
> manage the files later.
>
> Using mySQL to do the whole thing is appealing. I've never tried
> storing the actual data in my mysql db. It seems like it would be too
> slow to query, transfer, and passthru.
>
> Does anyone have any wisdom on this subject?
>
>
> --
> Jim Musil
> -
> Multimedia Programmer
> Nettmedia
> -
> 212-629-0004
> [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Database + Form

2001-11-30 Thread TD - Sales International Holland B.V.

Hey there,

once again... sorry but I'm not on the list so please CC me :-)

I was in the assumption that you needed to use addslashes on a var you 
retrieve from a form to properly insert it into the database. Well I'm not 
using it and I can put ",\n,\t etc in my webform but SQL won't evaluate them 
although!! I use double quotes ("var") to insert them. Can anyone explain? 
Cuz I'm sortta trying to crack my own database by making malicious statements 
like entering into the form
", "next data value", "next data value"); Hack_sql_statement; error on the 
rest of the values that sql is trying to parse.
but i'm not succeeding. Which I find totally cool but I don't understand 
it I truely am/was under the assumption that I needed to prevent such 
things by using addslashes() but I guess I'm wrong.

Just curious :-)

Have a nice weekend fellow scripters

Regards

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] php + apache 2.0.28 / windows

2001-11-30 Thread TISSANDIE Francois

Hi all,
I try to install new 2.0.28 apache on window NT.
Apache works fine, but I cannot run php scripts.
I think I missed something on .conf to load php, but what ?
any idea ?
Yhanks for help

François Tissandié.


Embrassez ceux que vous aimez


Atos-Infogérance
Tour MANHATTAN
6 Place de l'Iris
92400 Courbevoie Cedex
Tél. : 01.70.92.49.67
Fax. : 01.70.92.48.57
e-mail : [EMAIL PROTECTED]

"Ce message est strictement confidentiel. Son intégrité n'est pas assurée
sur Internet. Le contenu de ce message ne peut engager la responsabilité
d'Atos Origin.
Si vous n'êtes pas destinataire du message, merci d'en avertir immédiatement
l'expéditeur et de le détruire.

This e-mail is privileged and may contain confidential information intended
only for the people named above. If you receive this e-mail in error, please
notify the adressee immediately by telephone or return e-mail."





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: [PHP-DB] R: [PHP-DB] PHP/Mysql

2001-11-30 Thread Andrey Hristov

Set include_path to the place where is your php_mysql.so
and uncomment
extension=php_mysql.so

Regards,
Andrey Hristov

Bye
- Original Message -
From: "Riccardi Moreno" <[EMAIL PROTECTED]>
To: "Andrey Hristov" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, November 30, 2001 5:45 PM
Subject: [PHP-DB] R: [PHP-DB] PHP/Mysql


> This is the value:
> ;
> ; Paths and Directories ;
> 3;1H;
> include_path=   ; UNIX: "/path1:/path2"  Windows: "\path1;\path2"
> doc_root=   ; the root
> of th
> user_dir=   ; the
> directory
> ;upload_tmp_dir =   ; temporary directory for HTTP
> uploaded
> upload_max_filesize = 2097152   ; 2 Meg default limit on file uploads
> extension_dir   =   /usr/lib/apache/php ;
> direct
>
> -Messaggio originale-
> Da: Andrey Hristov [mailto:[EMAIL PROTECTED]]
> Inviato: venerdì 30 novembre 2001 16.26
> A: Riccardi Moreno
> Cc: [EMAIL PROTECTED]
> Oggetto: Re: [PHP-DB] PHP/Mysql
>
>
> Fatal error: Call to undefined function: mysql_connect() means to things.
> php is not built with integrated mysql support, or php
> cannot find php_mysql.so on your comp. What is the value of php.ini variable
> include_path or something similar.
>
> Regards,
> Andrey Hristov
> - Original Message -
> From: "Riccardi Moreno" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, November 30, 2001 5:21 PM
> Subject: [PHP-DB] PHP/Mysql
>
>
> > Hello,
> > I've got cobalt raq4 with php(work) and mysql(work) but when I try to
> > connect via mysql_connect() this error happens:
> > Fatal error: Call to undefined function: mysql_connect()
> > This is my php.ini:
> > [MySQL]
> > mysql.allow_persistent  =   On  ; allow or prevent persistent link
> > mysql.max_persistent=   -1  ; maximum number of persistent
> > links. -1 means no limit
> > mysql.max_links =   -1  ; maximum number of links
> > (persistent+non persistent).  -1 means no
> > mysql.default_port  =   ; default port number for
> > mysql_connect().  If unset,
> > ;
> > mysql_connect() will use the $MYSQL_TCP_PORT, or
> > ; entry in
> > /etc/services, or the compile-time defin
> > ; (in that
> > order).  Win32 will only look at MYSQL_P
> > mysql.default_host  =   ; default host for
> > mysql_connect() (doesn't apply in safe mode)
> > mysql.default_user  =   ; default user for
> > mysql_connect() (doesn't apply in safe mode)
> > mysql.default_password  =   ; default password for
> > mysql_connect() (doesn't apply in safe mode)
> > ; Note
> that
> > this is generally a *bad* idea to store
> > ; in this
> > file.  *Any* user with PHP access can run
> > ; 'echo
> > cfg_get_var("mysql.default_password")' and
> > ;
> password!
> > And of course, any users with read acc
> > ; file
> will
> > be able to reveal the password as well.
> > And this is my httpd.conf:
> > # Extra Modules
> > #LoadModule php_module
> > #LoadModule php3_modul
> > LoadModule php4_module
> >
> > # because mod_perl lea
> > #LoadModule perl_modul
> >
> > # make sure that this
> > LoadModule ssl_module
> >
> > #  Reconstruction of t
> > #  (static and shared
> > #  [WHENEVER YOU CHANG
> > #ClearModuleList
> >
> > # Extra Modules
> > AddModule mod_php4.c
> > #AddModule mod_php.c
> > #AddModule mod_php3.c
> > #AddModule mod_perl.c
> > #AddModule mod_casp2.c
> > I thing that it's all ok but it doesn't work.
> > Any Ideas?
> > Hi
> >
> > 
> >
> > - Moreno Riccardi
> >
> > 
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: HTTP_POST_VARS truncated

2001-11-30 Thread CC Zona

In article ,
 [EMAIL PROTECTED] (Mweb) wrote:

> > One or more options in each select field are selected, right?  Fields 
> > having no values (such as unchecked radio buttons, etc.) don't get passed.
> 
> Yes, I know empty values are not passed, and, yes, the options were
> selected (I tried with different values because I started thinking
> I was having some browser cache problem: other variable were always
> printed with the latest value, except the select ones)

Hmm.  Have you validated the HTML too?  Maybe there's some subtle 
syntactical error that's preventing the select values from being passed...??

When you var_dump($HTTP_POST_VARS) or print_r($HTTP_POST_VARS), the selects 
aren't showing there, either, I assume...

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] chown/chgrp not working

2001-11-30 Thread Paul Warner

Ahh, it is not running with root priv., so this is the problem.  Sounds like
a good time to look
for another way to skin this cat...

Thanks!

-- Paul


- Original Message -
From: "Darren Gamble" <[EMAIL PROTECTED]>
To: "'Paul Warner'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, November 30, 2001 10:21 AM
Subject: RE: [PHP] chown/chgrp not working


> Good day,
>
> What user is the application running as?  Only the superuser can use these
> functions (this is documented with both of these functions).
>
> For security reasons, you may want to use an external sudo script to
> accomplish this.  Be very, very careful...
>
> 
> Darren Gamble
> Planner, Regional Services
> Shaw Cablesystems GP
> 630 - 3rd Avenue SW
> Calgary, Alberta, Canada
> T2P 4L4
> (403) 781-4948
>
>
> -Original Message-
> From: Paul Warner [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 30, 2001 8:24 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] chown/chgrp not working
>
>
> I have a client that I made a image uploader/thumbnailer for
> that insists on using FrontPage.  In order to make FP
> happy, I need to set the owner to 'nobody' and the group
> to 'site3' which are uid 99 and gid 117.  The uploaded file
> is set as httpd/root and the thumbnail created by the script
> comes out httpd/site3.
>
> First I tried:
>
>  chown($file_name, 99);
>  chgrp($file_name, 117);
>
> Next I tried:
>
>  chown($file_name, '99');
>  chgrp($file_name, '117');
>
> This fails to get the uid or gid, so the first syntax appears
> to be correct.
>
> Finally I tried:
>
>  chown($file_name, 'nobody');
>  chgrp($file_name, 'site3');
>
> Error message for first and third attempts is identical:
>
> Warning: chown failed: Operation not permitted in
> /home/sites/site3/web/dev/maintenance.php on line 191
>
> Why is it 'not permitted' and how do I allow it?
>
> -- Paul
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Speed of Images from DB

2001-11-30 Thread Jim Musil


I've been searching for the best way to store images that would be 
used in a dynamic site. In this situation, a site admin would upload 
images via a php script. Obviously this creates several problems.

To prevent naming problems, I have php name all the uploaded images 
and store the name in a mysql db. Then, when needed, php will query 
to get the name and insert the image name into the image tag. This 
has always seemed like an incomplete solution because it's hard to 
manage the files later.

Using mySQL to do the whole thing is appealing. I've never tried 
storing the actual data in my mysql db. It seems like it would be too 
slow to query, transfer, and passthru.

Does anyone have any wisdom on this subject?


-- 
Jim Musil
-
Multimedia Programmer
Nettmedia
-
212-629-0004
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: [PHP-DB] PHP/Mysql

2001-11-30 Thread Paul Warner

> > Hello,
> > I've got cobalt raq4 with php(work) and mysql(work) but when I try to
> > connect via mysql_connect() this error happens:
> > Fatal error: Call to undefined function: mysql_connect()
> > This is my php.ini:



> > I thing that it's all ok but it doesn't work.
> > Any Ideas?
> > Hi
> >
> > 
> >
> > - Moreno Riccardi
> >
> > 
> >

Moreno-

If you just updated to PHP 4.0.6 on a Raq you need to add
'extension=mysql.so' to /etc/httpd/php.ini

-- P




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: [PHP-DB] PHP/Mysql

2001-11-30 Thread Paul Warner

> > Hello,
> > I've got cobalt raq4 with php(work) and mysql(work) but when I try to
> > connect via mysql_connect() this error happens:
> > Fatal error: Call to undefined function: mysql_connect()
> > This is my php.ini:



> > I thing that it's all ok but it doesn't work.
> > Any Ideas?
> > Hi
> >
> > 
> >
> > - Moreno Riccardi
> >
> > 
> >

Moreno-

If you just updated to PHP 4.0.6 on a Raq you need to add
'extension=mysql.so' to /etc/httpd/php.ini

-- P



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] chown/chgrp not working

2001-11-30 Thread Darren Gamble

Good day,

What user is the application running as?  Only the superuser can use these
functions (this is documented with both of these functions).

For security reasons, you may want to use an external sudo script to
accomplish this.  Be very, very careful...


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Paul Warner [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 30, 2001 8:24 AM
To: [EMAIL PROTECTED]
Subject: [PHP] chown/chgrp not working


I have a client that I made a image uploader/thumbnailer for
that insists on using FrontPage.  In order to make FP
happy, I need to set the owner to 'nobody' and the group
to 'site3' which are uid 99 and gid 117.  The uploaded file
is set as httpd/root and the thumbnail created by the script
comes out httpd/site3.

First I tried:

 chown($file_name, 99);
 chgrp($file_name, 117);

Next I tried:

 chown($file_name, '99');
 chgrp($file_name, '117');

This fails to get the uid or gid, so the first syntax appears
to be correct.

Finally I tried:

 chown($file_name, 'nobody');
 chgrp($file_name, 'site3');

Error message for first and third attempts is identical:

Warning: chown failed: Operation not permitted in
/home/sites/site3/web/dev/maintenance.php on line 191

Why is it 'not permitted' and how do I allow it?

-- Paul


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: [PHP-DB] PHP/Mysql

2001-11-30 Thread Andrey Hristov

Fatal error: Call to undefined function: mysql_connect() means to things. php is not 
built with integrated mysql support, or php
cannot find php_mysql.so on your comp. What is the value of php.ini variable 
include_path or something similar.

Regards,
Andrey Hristov
- Original Message -
From: "Riccardi Moreno" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 30, 2001 5:21 PM
Subject: [PHP-DB] PHP/Mysql


> Hello,
> I've got cobalt raq4 with php(work) and mysql(work) but when I try to
> connect via mysql_connect() this error happens:
> Fatal error: Call to undefined function: mysql_connect()
> This is my php.ini:
> [MySQL]
> mysql.allow_persistent  =   On  ; allow or prevent persistent link
> mysql.max_persistent=   -1  ; maximum number of persistent
> links. -1 means no limit
> mysql.max_links =   -1  ; maximum number of links
> (persistent+non persistent).  -1 means no
> mysql.default_port  =   ; default port number for
> mysql_connect().  If unset,
> ;
> mysql_connect() will use the $MYSQL_TCP_PORT, or
> ; entry in
> /etc/services, or the compile-time defin
> ; (in that
> order).  Win32 will only look at MYSQL_P
> mysql.default_host  =   ; default host for
> mysql_connect() (doesn't apply in safe mode)
> mysql.default_user  =   ; default user for
> mysql_connect() (doesn't apply in safe mode)
> mysql.default_password  =   ; default password for
> mysql_connect() (doesn't apply in safe mode)
> ; Note that
> this is generally a *bad* idea to store
> ; in this
> file.  *Any* user with PHP access can run
> ; 'echo
> cfg_get_var("mysql.default_password")' and
> ; password!
> And of course, any users with read acc
> ; file will
> be able to reveal the password as well.
> And this is my httpd.conf:
> # Extra Modules
> #LoadModule php_module
> #LoadModule php3_modul
> LoadModule php4_module
>
> # because mod_perl lea
> #LoadModule perl_modul
>
> # make sure that this
> LoadModule ssl_module
>
> #  Reconstruction of t
> #  (static and shared
> #  [WHENEVER YOU CHANG
> #ClearModuleList
>
> # Extra Modules
> AddModule mod_php4.c
> #AddModule mod_php.c
> #AddModule mod_php3.c
> #AddModule mod_perl.c
> #AddModule mod_casp2.c
> I thing that it's all ok but it doesn't work.
> Any Ideas?
> Hi
>
> 
>
> - Moreno Riccardi
>
> 
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: HTTP_POST_VARS truncated

2001-11-30 Thread mweb


> One or more options in each select field are selected, right?  Fields
> having no values (such as unchecked radio buttons, etc.) don't get passed.

Yes, I know empty values are not passed, and, yes, the options were
selected (I tried with different values because I started thinking
I was having some browser cache problem: other variable were always
printed with the latest value, except the select ones)

mweb


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] chown/chgrp not working

2001-11-30 Thread Paul Warner

I have a client that I made a image uploader/thumbnailer for
that insists on using FrontPage.  In order to make FP
happy, I need to set the owner to 'nobody' and the group
to 'site3' which are uid 99 and gid 117.  The uploaded file
is set as httpd/root and the thumbnail created by the script
comes out httpd/site3.

First I tried:

 chown($file_name, 99);
 chgrp($file_name, 117);

Next I tried:

 chown($file_name, '99');
 chgrp($file_name, '117');

This fails to get the uid or gid, so the first syntax appears
to be correct.

Finally I tried:

 chown($file_name, 'nobody');
 chgrp($file_name, 'site3');

Error message for first and third attempts is identical:

Warning: chown failed: Operation not permitted in
/home/sites/site3/web/dev/maintenance.php on line 191

Why is it 'not permitted' and how do I allow it?

-- Paul


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: HTTP_POST_VARS truncated

2001-11-30 Thread CC Zona

In article ,
 [EMAIL PROTECTED] (Mweb) wrote:

> foreach (var, key) in HTTP POST VARS {
> 
>   print "VAR: $var KEY = $key
> }
> 
> It works, (meaning that php code is correct, html output is displayed,
> and no error are reported) but only prints three lines, i.e. the two select 
> fields are missing.

One or more options in each select field are selected, right?  Fields 
having no values (such as unchecked radio buttons, etc.) don't get passed.

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] URGENT-HELP !!!!!!

2001-11-30 Thread Jim Musil


If you mail via pfsockopen, then you specify the sender which must be 
real, but you also specify the From: header which can be anything you 
want.

ex:

$smtp_server = "your.smtp.server";
$port = 25;
$mydomain = "yourdomain.com";
$sender = "[EMAIL PROTECTED]";
$recipient = "[EMAIL PROTECTED]";
$subject = "Test";

$text_content = "Hi Bar, This is a test.";

$handle = fsockopen("$smtp_server","$port");
fputs($handle, "HELO $mydomain\n");
fputs($handle, "MAIL FROM: $sender \n");
$echo .=  fgets($handle,255)."\n";
fputs($handle, "RCPT TO: $recipient \n");
$echo .=  fgets($handle,255)."\n";
fputs($handle, "DATA\n");
$echo .= fgets($handle,255)."\n";
fputs($handle, "To: $recipient\n");

/* NOTE THAT HERE YOU SET WHAT APPEARS IN THE FROM: PART */

fputs($handle, "From: \n");


fputs($handle, "Subject: $email_subject\n");
fputs($handle, "Content-Type: text/plain; \n");

fputs($handle, $text_content."\n\n");

fputs($handle, ".\n");

$echo .= fgets($handle,255)."\n";

fputs($handle, "QUIT\n");

$echo .= fgets($handle,255)."\n";

echo "$echo";

Works here, but results may vary.


>>I am talking about the final SMTP host.. it will do a reverse lookup on the
>>From: domain and if it dont resolve to the IP of the sending STMP host it
>>will reject it.
>>
>yes I know. But it the final SMTP tries to resolve the host 
>(localhost) it will get a response from it self? I haven't tried it, 
>but I think it would work.
>
>By the way... the most of the SMTP doesn't check at the FROM header, 
>but from the sender SMTP.
>So if you got a nonexisting e-mail it would accept it too, but it 
>the sender host isn't valid it will reject it.
>
>Regards,
>
>Johan
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
Jim Musil
-
Multimedia Programmer
Nettmedia
-
212-629-0004
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Problem connecting to mysql via odbc

2001-11-30 Thread Andrew Hill

Mweb,

Set your ODBCINI environment variable (and others) as per the HOWTO at
www.iodbc.org.
This HOWTO is for iODBC, but the concepts are the same for this error
condition.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access & Data Integration Technology Providers

> -Original Message-
> From: mweb [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 30, 2001 12:02 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PHP] Problem connecting to mysql via odbc
>
>
> Hello,
> I have a page whoch should connect to a mysql database via odbc,
> on a RH 7.2 PC with the relevant rpm listed below.
>
> I know what to do when the db is reachable, but can't start:
>
> the instruction:
> $conn=odbc_connect("db9,"","");
> just yelds this result:
> Warning: SQL error: [unixODBC][Driver Manager]Data source name
> not found, and
> no default driver specified, SQL state IM002 in SQLConnect in
> one.php on line
> 20
>
> Warning: Supplied argument is not a valid ODBC-Link resource in
> one.php on
> line 22
>
> THis is certainly something wrong with my odbc setup, but can't figure it
> out. I saw a thread couple of days ago about myodbc dsn creation,
> but can't
> relate it to my problem. Actually, I only have odbcinst, not the commands
> mentioned in that message.
>
> Any help is appreciated!
>
>   Thanks,
>   mweb
>
> RPM list
>
> php-ldap-4.0.6-7
> unixODBC-devel-2.0.7-3
> mod_auth_mysql-1.11-1
> mysqlclient9-3.23.22-6
> php-mysql-4.0.6-7
> unixODBC-2.0.7-3
> asp2php-0.75.17-1
> php-imap-4.0.6-7
> php-pgsql-4.0.6-7
> mysql-3.23.41-1
> MyODBC-2.50.37-2
> mysql-server-3.23.41-1
> php-manual-4.0.6-7
> php-odbc-4.0.6-7
> libodbc++-0.2.2pre4-12
> php-4.0.6-7
> mysql-devel-3.23.41-1
> perl-DBD-MySQL-1.2216-4
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] help with images

2001-11-30 Thread Gav

First of all please excuse my ignorance if anything that I ask here is
impossible or a common question, I have searched but not found the answer.
I'm working with composite images which at the moment are dynamically
produced and set in html layers.  The problem is that I want the user to be
able to save the image.  This is not possible at the moment because the
browser only sees one part of the composite image.  Is there any way that
php4 can 'flatten' an image to preferably jpeg and then show it on the
screen.

Thanks for any guidance,

Gav



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] is_int with HTML FORM

2001-11-30 Thread Matt Williams


> or remove the  {$len} to not check for a length
> 

Sorry I meant replace the above with *

m:

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




  1   2   >