Re: [PHP] Image Upload??

2001-05-16 Thread Brave Cobra

Done that, doesn't work!

Brave Cobra
- Original Message - 
From: Toby Dacre [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 16, 2001 3:29 AM
Subject: Re: [PHP] Image Upload??


 
 chmod the file or directory so that php can access it
 
 it doesn't run as you!
 
 
 
 -- 
 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 propaganda request

2001-05-16 Thread Sara Young

There are also PHP case studies at
http://www.zend.com/zend/cs/

Sara

On 15 May 2001, at 8:27, Philip Olson wrote:

 
 Greetings PHP friends,
 
 I'm compiling a list of PHP related propaganda, please send any that you
 know of.  Positive, Negative, Neutral ... all is welcome! ;-)  Thus far :
 
 Stats   :
 -
 * http://www.netcraft.com/survey/
 * http://www.php.net/usage.php
 * http://www.securityspace.com/s_survey/data/man.200103/apachemods.html 
 
 About PHP   :
 -
 * http://conf.php.net/
 * http://www.php.net/manual/en/introduction.php (intro/whatcando/history)
 * http://www.zend.com/zend/aboutphp.php
 
 Reviews, Comparisons and Discussions:
 -
 * http://www.infoworld.com/articles/op/xml/99/06/21/990621oppetreley.xml
 * http://www.intranetjournal.com/articles/25/php_05_30_00a.html
 * http://www.intranetjournal.com/articles/26/php_06_20_00a.html
 * http://www.intranetjournal.com/articles/28/php_08_30_00a.html
 * http://lw.itworld.com/linuxworld/lw-2001-01/lw-01-php.html
 * http://www.linuxplanet.com/linuxplanet/reviews/1891/1/
 * http://www.linuxpower.com/display.php?id=149
 * http://hotwired.lycos.com/webmonkey/radio/php.html
 * http://www.networkcomputing.com/1020/1020f1.html
 * http://www.slashdot.org/askslashdot/99/09/22/1157210.shtml
 * http://www.slashdot.org/developers/01/04/21/1432206.shtml
 * http://www.slashdot.org/apache/00/05/22/1858206_F.shtml (sorta but interesting)
 * http://www.techweb.com/se/directlink.cgi?NWC19991101S0014
 * http://www.webdevelopersjournal.com/articles/php.html
 * http://www.webdevelopersjournal.com/articles/why_php.html
 * http://php.weblogs.com/php_asp_7_reasons/
 * http://php.weblogs.com/php_vs_cold_fusion/
 * http://php.weblogs.com/php_versus_perl/
 * http://php.weblogs.com/popularity/
 * http://www.webreview.com/1999/07_09/developers/07_09_99_1.shtml
 * http://www.webreview.com/2000/01_21/developers/01_21_00_2.shtml
 * http://www.zdnet.com/pcmag/stories/reviews/0,6755,2713481,00.html
 * http://www.zdnet.com/enterprise/stories/main/0,10228,2646051,00.html
 * http://www.zdnet.com/enterprise/stories/linux/0,12249,2646052,00.html
 * http://www.zend.com/zend/art/enterprise.php
 * http://www.zend.com/zend/art/under-php4-hood.php
 * http://www.devshed.com/Server_Side/Zend/Interview/
 * 
http://www.computerweekly.com/cwarchive/gwfeat/19991209/cwcontainer.asp?name=F1.html
 * http://www-106.ibm.com/developerworks/web/library/wa-sssl.html?t=gr,p=PHP-Perl-JSP
 
 
 Some/most reviews are outdated, don't mind that.  Know of other places 
 that belong in the above categories or related? ... please share!
 
 regards,
 Philip
 
 



-- 
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] Deleting 1 file line

2001-05-16 Thread Tarrant Costelloe

Does anyone know what the code is, if you wanted to specify a specific line
in a file to delete and also to wipe clean the entire file?

Thanks in advance!

Taz

-- 
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] need some ideas here...

2001-05-16 Thread James Holloway

Hi Christian,

I have an account with f2s.com that I use for sampling scripts with - I set
up a mailform yesterday after reading this, using mail() to send the email
to myself.  It got here - albeit 6am today (I sent it yesterday
lunchtime)  Perhaps you're using the mail() function incorrectly?

James.

Christian Dechery [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 My free-web-hosting (www.f2s.com) does not allow PHP to send emails...
I've
 tried everything... the mail() function, my alternate function which calls
 popen(/usr/lib/sendmail -t) and even a script.cgi with '#!/usr/bin/php'
 and all that stuff...

 the mail simply won't go an mail() always returns false...
 I'm guessing there's no mail sending in this server...

 so what do I do?

 is it possible for me to call a script on another host from with a script
 and return something to it?




-- 
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] Deleting 1 file line

2001-05-16 Thread elias

Good question.
Never had to face such problems before...
but what I can do actually is:
1) Read file into variable till i reach that line
2) Skip that line
3) Continue reading till eof
4) writting back the buffer to the file.

Basically use file() then preg_replace() then fopen() fwrite() fclose()

-Elias
http://www.eassoft.cjb.net

Tarrant Costelloe [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Does anyone know what the code is, if you wanted to specify a specific
line
 in a file to delete and also to wipe clean the entire file?

 Thanks in advance!

 Taz

 --
 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] PHP for Win

2001-05-16 Thread elias

Any easy way to call Win32 API functions yet?

-elias



-- 
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] Uptime script?

2001-05-16 Thread Patrik Wallstrom

On Wed, 16 May 2001, Ben Cairns wrote:

 I know I've seen one before, and before I go write my own version, does
 anyone know of a PHP script that echoes the uptime of a server (Linux) in
 days,hour,minutes, etc?

 Does anyone know a script to do this under WinNT?

For Linux it is easy, just read the /proc/uptime file:
$uptimevalues = file(/proc/uptime);

The first value from /proc/uptime is the uptime, the second is the idle
time for the cpu.

NT is harder. I don't know anything about that.

--
 patrik wallstrom |  f o o d f i g h t
 tel: +46-8-6188428   |  s t o c k h o l m
 gsm: +46-708405080   |  - - - - - - - - -


-- 
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] zlib or gzip compression?

2001-05-16 Thread Alex Dupre

What are the differences between output_handler = ob_gzhandler and 
zlib.output_compression = On ?

Alex Dupre


-- 
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] Shopping with variables

2001-05-16 Thread Tarrant Costelloe

I am currently just messing around with a basic shopping cart, but have
stumbled onto a problem.
Bascially there is three input boxes all name DVD, VIDEO, CD and these are
also variables. Once the user has said they wanted 15 cd's for example,
the form then takes them onto the shop.php. Which say's something along the
lines of:

?php print( You have asked to purchase $dvd $video $cd 's - Thank you) ?

This prints out, You have bought 16 - Thank you for example, see the
problem? How do I get it to print the variable name not just it's value?

Tarrant Costelloe
Software Developer
InsurE-com Ltd.

Tel:  +44 (0)1273 852014
[EMAIL PROTECTED]
http://www.insur-e.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]




[PHP] R: [PHP] Shopping with variables

2001-05-16 Thread Gabriele Biondo

 
 ?php print( You have asked to purchase $dvd $video $cd 's - 
 Thank you) ?
 
 This prints out, You have bought 16 - Thank you for example, see the
 problem? How do I get it to print the variable name not just it's value?

Try with replacing your print with the following one:

print( You have asked to purchase DVD: $dvd VIDEO: $video CD: $cd 's - ...

it should work.

Bye
Gabriele



-- 
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] Shopping with variables

2001-05-16 Thread Vitali Falileev

Hello Tarrant,

Wednesday, May 16, 2001, 12:12:43 PM, you wrote:
TC ?php print( You have asked to purchase $dvd $video $cd 's - Thank you) ?

TC This prints out, You have bought 16 - Thank you for example, see the
TC problem? How do I get it to print the variable name not just it's value?

Use

?php print( You have asked to purchase .
  ($dvd ? DVD: $dvd :'').
  ($video ? Video: $video :'').
  ($cd ? CD's: $cd :'').
   - Thank you) ?

-- 
Best regards,
Vitalimailto:[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] R: [PHP] Shopping with variables

2001-05-16 Thread Gabriele Biondo


 Thanks Gabriele :) Whilst waiting for your e-mail I figured out another
 way...Thought I would show you it just in case you ever find the 
 need to use
 this alternative:
 
 ?php print( You have asked to purchase .
   ($dvd ? DVD: $dvd :'').
   ($video ? Video: $video :'').
   ($cd ? CD's: $cd :'').
- Thank you) ?
 
 Best Regards
 
 Taz


This should work even better.

Ciao

Gabriele

-- 
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] Shopping with variables

2001-05-16 Thread Ralph Guzman

Might want to reconsider the way you are doing this, since this may not be
the most efficient way. An alternative might be to do this as follows:

In your web form set a field for Quantity and another for Item Name, so for
example:

FORM ACTION=script_name.php METHOD=post

...

Quantity: INPUT TYPE=text NAME=item_qty SIZE=2

SELECT NAME=item_type
OPTION VALUE=DVDDVD/OPTION
OPTION VALUE=VIDEOVIDEO/OPTION
OPTION VALUE=CDCD/OPTION
/SELECT

...

/FORM

then when you process the form all you would have to do to display your
thank you message:

print You have asked to purchase $item_qty $item_type. Thank You;

Nevertheless, if for some reason you must do things like you are doing them
now, try something like this:

if(isset($dvd)){
   $item_type = DVD(s);
   $item_qty = $dvd;
}

if(isset($video)){
   $item_type = VIDEO(s);
   $item_qty = $video;
}

if(isset($cd)){
   $item_type = CD(s);
   $item_qty = $cd;
}

print You have asked to purchase $item_qty $item_name;

Keep in mind that this is not the most efficient method since it will
require that you continue adding if(isset($variable)) statements, if you
ever decide to add more item types.


-Original Message-
From: Tarrant Costelloe [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 16, 2001 2:13 AM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Shopping with variables

I am currently just messing around with a basic shopping cart, but have
stumbled onto a problem.
Bascially there is three input boxes all name DVD, VIDEO, CD and these are
also variables. Once the user has said they wanted 15 cd's for example,
the form then takes them onto the shop.php. Which say's something along the
lines of:

?php print( You have asked to purchase $dvd $video $cd 's - Thank you) ?

This prints out, You have bought 16 - Thank you for example, see the
problem? How do I get it to print the variable name not just it's value?

Tarrant Costelloe
Software Developer
InsurE-com Ltd.

Tel:  +44 (0)1273 852014
[EMAIL PROTECTED]
http://www.insur-e.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]


-- 
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] nested functions

2001-05-16 Thread Hannes Schmiderer

elias wrote:
 good question...I might need an answer when you get one.

Why?
Ok, I have a perl-counter script which is included to shtml-pages with SSI.
Now I want to add some PHP pages to my site. So I need a PHP-function that
does the same as the perl-script does. In the script I have a lot of global
variables and some auxiliary functions. In PHP these variables became local
variables of the counter() function and the auxiliary functions became
nested functions. The auxiliary nested functions have to have access to a
lot of variables from the counter() function, and they even have to change
them. I already added all the variables (some with call by reference) but I
think it would have been easier if I had access the counter()-variables
within the nested auxiliary functions direct.

Hannes

PS: I wonder why my original message does not appear in Outlook Express
News-Folder... just the answers?



-- 
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] Image Upload??

2001-05-16 Thread Brave Cobra

Maybe I ought to mention that I don't have direct access to this server.
It's a F2S account, I'm trying to upload to.

BC
- Original Message -
From: Brave Cobra [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 16, 2001 10:01 AM
Subject: Re: [PHP] Image Upload??


 Done that, doesn't work!

 Brave Cobra
 - Original Message -
 From: Toby Dacre [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, May 16, 2001 3:29 AM
 Subject: Re: [PHP] Image Upload??


 
  chmod the file or directory so that php can access it
 
  it doesn't run as you!
 
 
 
  --
  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 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] Detect screen size

2001-05-16 Thread Mark Lo \(3\)

Hi,

I would like to know how to detect the screen size.  I mean the viewing
area.  etc. 800x600, 1028x728...

Thank you

Mark


-- 
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] Detect screen size

2001-05-16 Thread Maxim Maletsky

With javascript of course.

Again, go to look for the codes of these free tracking systems. Like Extreme
tracker. They've got those.

Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-Original Message-
From: Mark Lo (3) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 16, 2001 8:16 PM
To: ListPHP Mailing
Subject: [PHP] Detect screen size


Hi,

I would like to know how to detect the screen size.  I mean the viewing
area.  etc. 800x600, 1028x728...

Thank you

Mark


-- 
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] Image Upload??

2001-05-16 Thread Brave Cobra

And then I found the answer.
The PHP module of the Apache server at F2S is running in Safe mode(like the
error said), meaning that you can't do uploads in PHP. This safe mode
prohibits that.
The only alternative is uploading in CGI or Perl.
Another challange to let PHP and CGI work together!

BC
- Original Message -
From: Brave Cobra [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 16, 2001 12:52 PM
Subject: Re: [PHP] Image Upload??


 Maybe I ought to mention that I don't have direct access to this server.
 It's a F2S account, I'm trying to upload to.

 BC
 - Original Message -
 From: Brave Cobra [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, May 16, 2001 10:01 AM
 Subject: Re: [PHP] Image Upload??


  Done that, doesn't work!
 
  Brave Cobra
  - Original Message -
  From: Toby Dacre [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, May 16, 2001 3:29 AM
  Subject: Re: [PHP] Image Upload??
 
 
  
   chmod the file or directory so that php can access it
  
   it doesn't run as you!
  
  
  
   --
   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 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] MySQL database

2001-05-16 Thread \[Inf\] F!RE-WALL

Yo,

I'd like to use a MySQL database on my website. If I look at the PHP details
of my site (see for yourself at http://infinity.shrimpwars.be/phpinfo.php)
it says under the MySQL section: enabled. Well, if I create a testpage
with this as content:

?
mysql_connect(localhost, , )
or die (unable to connect to database);
?

I get this:

Warning: MySQL Connection Failed: Can't connect to local MySQL server
through socket '/var/lib/mysql/mysql.sock' (111) in
/clans/infinity/mysql.php on line 2
unable to connect to database

If I run the script on my local machine I get this:

Warning: MySQL Connection Failed: Can't connect to MySQL server on
'localhost' (10061) in e:\webserver\phptest\mysql.php on line 2
unable to connect to database


What is wrong? Do note that I don't know much about MySQL, I'm still
learning :-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] Detect screen size

2001-05-16 Thread Rudolf Visagie

Hi,

script language=JavaScript
!-- hide from none JavaScript Browsers
function PassScreenWidth(what) {
document.login_frm.screen_width.value=what
}

function GetScreenSize() {
var screen_width = screen.width;
return screen_width;
}
// - stop hiding --
/script

FORM ACTION=login1.php METHOD=POST  NAME=login_frm
input type=hidden name=screen_width
.
.
/form

Rudolf Visagie
[EMAIL PROTECTED]

-Original Message-
From: Mark Lo (3) [mailto:[EMAIL PROTECTED]]
Sent: 16 May 2001 01:16
To: ListPHP Mailing
Subject: [PHP] Detect screen size


Hi,

I would like to know how to detect the screen size.  I mean the viewing
area.  etc. 800x600, 1028x728...

Thank you

Mark


-- 
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] MySQL database

2001-05-16 Thread Julia A. Case

first off, is the MySQL database running?  you can do a ps -xa | grep 
mysql to see...  second you need to enter a username and password on the 
mysql_connect line..

Hope this helps,
Julia

Quoting [Inf] F!RE-WALL ([EMAIL PROTECTED]):
 Yo,
 
 I'd like to use a MySQL database on my website. If I look at the PHP details
 of my site (see for yourself at http://infinity.shrimpwars.be/phpinfo.php)
 it says under the MySQL section: enabled. Well, if I create a testpage
 with this as content:
 
 ?
 mysql_connect(localhost, , )
 or die (unable to connect to database);
 ?
 
 I get this:
 
 Warning: MySQL Connection Failed: Can't connect to local MySQL server
 through socket '/var/lib/mysql/mysql.sock' (111) in
 /clans/infinity/mysql.php on line 2
 unable to connect to database
 
 If I run the script on my local machine I get this:
 
 Warning: MySQL Connection Failed: Can't connect to MySQL server on
 'localhost' (10061) in e:\webserver\phptest\mysql.php on line 2
 unable to connect to database
 
 
 What is wrong? Do note that I don't know much about MySQL, I'm still
 learning :-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]

-- 
[  Julia Anne Case  ] [Ships are safe inside the harbor,   ]
[Programmer at large] [  but is that what ships are really for.]  
[   Admining Linux  ] [   To thine own self be true.   ]
[ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ]
  

-- 
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 database

2001-05-16 Thread Jack Dempsey

setup an account with a username and password and flush your
privileges...see if you can login on the command line...after that
works, then try it with php

-jack

[Inf] F!RE-WALL wrote:
 
 Yo,
 
 I'd like to use a MySQL database on my website. If I look at the PHP details
 of my site (see for yourself at http://infinity.shrimpwars.be/phpinfo.php)
 it says under the MySQL section: enabled. Well, if I create a testpage
 with this as content:
 
 ?
 mysql_connect(localhost, , )
 or die (unable to connect to database);
 ?
 
 I get this:
 
 Warning: MySQL Connection Failed: Can't connect to local MySQL server
 through socket '/var/lib/mysql/mysql.sock' (111) in
 /clans/infinity/mysql.php on line 2
 unable to connect to database
 
 If I run the script on my local machine I get this:
 
 Warning: MySQL Connection Failed: Can't connect to MySQL server on
 'localhost' (10061) in e:\webserver\phptest\mysql.php on line 2
 unable to connect to database
 
 What is wrong? Do note that I don't know much about MySQL, I'm still
 learning :-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 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 have a problem with phpMySqlAdmin

2001-05-16 Thread Enrique Ivorra Gómez

Sorry, but I dont speak Englich very well.

I have Apache, PHP and MYSQL which work well but I want to use phpMySQLAdmin
and I have an error:


Fatal error: Call to undefined function: mysql_connect() in lib.inc.php on
line 255

Can anybody help me?

Bye!


-- 
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] Sending Output Buffer contents to PDFLib

2001-05-16 Thread Matthew M. Boulter

Heya guys, I've just started to play with PDFLib v3 and was primarily experimenting to 
enable me to produce PDF versions of our HTML files on demand. I.e., like some sites 
have a 'Print this article' button, I want a 'Make a PDF' button.
I played with PDFLib and saw that to get text on the page you can use several 
functions (like PDF_show...) however I was wondering if I can avoid having to write a 
specific module for each type of PDF file I want to make. My pages I want to produce 
as PDF can have complex tables, pictures and lots of text. Is there anyway I can send 
the contents of say the output buffer containing a completed HTML.../HTML document 
to PDFLib or ClibPDF?
Like the way in the full Adobe Acrobat 4 software the 'Open Web Page' function.

Thanks in advance,
Matty.



[PHP] Test, bitte löschen

2001-05-16 Thread ws


Test, bitte löschen



Re: [PHP] Image Upload??

2001-05-16 Thread James Holloway

From phpinfo() on f2s.com

upload_max_filesize 2M

So, something like,

@copy($file, /path/to . $file_name)
or die (Blam, something's up!);

should work - haven't got time to try it at the moment.

James.


 What am I doing wrong here?
 Is there a way to get around the temporary folder?

 Tnx

 Brave Cobra





-- 
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] nested functions

2001-05-16 Thread Christian Reiniger

On Wednesday 16 May 2001 12:12, Hannes Schmiderer wrote:
 elias wrote:
  good question...I might need an answer when you get one.

 Why?
 Ok, I have a perl-counter script which is included to shtml-pages with
 SSI. Now I want to add some PHP pages to my site. So I need a
 PHP-function that does the same as the perl-script does. In the script
 I have a lot of global variables and some auxiliary functions. In PHP
 these variables became local variables of the counter() function and
 the auxiliary functions became nested functions. The auxiliary nested
 functions have to have access to a lot of variables from the counter()
 function, and they even have to change them. I already added all the
 variables (some with call by reference) but I think it would have been
 easier if I had access the counter()-variables within the nested
 auxiliary functions direct.

What about using classes instead of outer functions? Classes provide 
rather nice (nestable) scoping.

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Software is like sex: the best is for free -- Linus Torvalds

--
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] nested functions

2001-05-16 Thread Hannes Schmiderer

What about using classes instead of outer functions? Classes provide
rather nice (nestable) scoping.

You're right! If I had written it from scratch classes would be the best
way!
Although, I'm a newbie and I haven't read the PHP object oriented capter yet
;-).

Hannes



-- 
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] Shopping with variables

2001-05-16 Thread John Monfort



 That will work, assuming the user is not allowed to purchase multiple
items...

 -John

On Wed, 16 May 2001, Ralph Guzman wrote:

 Might want to reconsider the way you are doing this, since this may not be
 the most efficient way. An alternative might be to do this as follows:

 In your web form set a field for Quantity and another for Item Name, so for
 example:

 FORM ACTION=script_name.php METHOD=post

 ...

 Quantity: INPUT TYPE=text NAME=item_qty SIZE=2

 SELECT NAME=item_type
 OPTION VALUE=DVDDVD/OPTION
 OPTION VALUE=VIDEOVIDEO/OPTION
 OPTION VALUE=CDCD/OPTION
 /SELECT

 ...

 /FORM

 then when you process the form all you would have to do to display your
 thank you message:

 print You have asked to purchase $item_qty $item_type. Thank You;

 Nevertheless, if for some reason you must do things like you are doing them
 now, try something like this:

 if(isset($dvd)){
$item_type = DVD(s);
$item_qty = $dvd;
 }

 if(isset($video)){
$item_type = VIDEO(s);
$item_qty = $video;
 }

 if(isset($cd)){
$item_type = CD(s);
$item_qty = $cd;
 }

 print You have asked to purchase $item_qty $item_name;

 Keep in mind that this is not the most efficient method since it will
 require that you continue adding if(isset($variable)) statements, if you
 ever decide to add more item types.


 -Original Message-
 From: Tarrant Costelloe [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 16, 2001 2:13 AM
 To: '[EMAIL PROTECTED]'
 Subject: [PHP] Shopping with variables

 I am currently just messing around with a basic shopping cart, but have
 stumbled onto a problem.
 Bascially there is three input boxes all name DVD, VIDEO, CD and these are
 also variables. Once the user has said they wanted 15 cd's for example,
 the form then takes them onto the shop.php. Which say's something along the
 lines of:

 ?php print( You have asked to purchase $dvd $video $cd 's - Thank you) ?

 This prints out, You have bought 16 - Thank you for example, see the
 problem? How do I get it to print the variable name not just it's value?

 Tarrant Costelloe
 Software Developer
 InsurE-com Ltd.
 
 Tel:  +44 (0)1273 852014
 [EMAIL PROTECTED]
 http://www.insur-e.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]


 --
 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] I have a problem with phpMySqlAdmin

2001-05-16 Thread John Monfort



  Is your MySQl server on?

 What platform are you on?

 Also, make sure your username, password, and database name, are correct.

__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
The world is waiting, are you ready?
-+___+-

On Wed, 16 May 2001, [iso-8859-1] Enrique Ivorra Gómez wrote:

 Sorry, but I dont speak Englich very well.

 I have Apache, PHP and MYSQL which work well but I want to use phpMySQLAdmin
 and I have an error:


 Fatal error: Call to undefined function: mysql_connect() in lib.inc.php on
 line 255

 Can anybody help me?

 Bye!


 --
 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] I have a problem with phpMySqlAdmin

2001-05-16 Thread Robert Covell

I would check to make sure that your php installation has mysql compiled in.

Do this in phpinfo.php:
?php
phpinfo();
?

And look to see how it was compiled and if Mysql is listed there and or in
the list of valid options.

Sincerely,

Robert T. Covell
President / Owner
Rolet Internet Services, LLC
Web: www.rolet.com
Email: [EMAIL PROTECTED]
Phone: 816.210.7145
Fax: 816.753.1952

-Original Message-
From: John Monfort [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 16, 2001 8:05 AM
To: Enrique Ivorra Gómez
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] I have a problem with phpMySqlAdmin




  Is your MySQl server on?

 What platform are you on?

 Also, make sure your username, password, and database name, are correct.

__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
The world is waiting, are you ready?
-+___+-

On Wed, 16 May 2001, [iso-8859-1] Enrique Ivorra Gómez wrote:

 Sorry, but I dont speak Englich very well.

 I have Apache, PHP and MYSQL which work well but I want to use
phpMySQLAdmin
 and I have an error:


 Fatal error: Call to undefined function: mysql_connect() in lib.inc.php on
 line 255

 Can anybody help me?

 Bye!


 --
 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 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 database

2001-05-16 Thread \[Inf\] F!RE-WALL

Erm..I'm using windows.
And euhI have MySQL installed, but I don't know if it's running. Anyway,
the phpinfo() returns that MySQL is enabled.so I guess it must be
working.


Julia A. Case [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 first off, is the MySQL database running?  you can do a ps -xa | grep
 mysql to see...  second you need to enter a username and password on the
 mysql_connect line..

 Hope this helps,
 Julia

 Quoting [Inf] F!RE-WALL ([EMAIL PROTECTED]):
  Yo,
 
  I'd like to use a MySQL database on my website. If I look at the PHP
details
  of my site (see for yourself at
http://infinity.shrimpwars.be/phpinfo.php)
  it says under the MySQL section: enabled. Well, if I create a testpage
  with this as content:
 
  ?
  mysql_connect(localhost, , )
  or die (unable to connect to database);
  ?
 
  I get this:
 
  Warning: MySQL Connection Failed: Can't connect to local MySQL server
  through socket '/var/lib/mysql/mysql.sock' (111) in
  /clans/infinity/mysql.php on line 2
  unable to connect to database
 
  If I run the script on my local machine I get this:
 
  Warning: MySQL Connection Failed: Can't connect to MySQL server on
  'localhost' (10061) in e:\webserver\phptest\mysql.php on line 2
  unable to connect to database
 
 
  What is wrong? Do note that I don't know much about MySQL, I'm still
  learning :-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]

 --
 [  Julia Anne Case  ] [Ships are safe inside the harbor,   ]
 [Programmer at large] [  but is that what ships are really for.]
 [   Admining Linux  ] [   To thine own self be true.   ]
 [ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ]


 --
 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] MySQL database

2001-05-16 Thread \[Inf\] F!RE-WALL

Huh?
What about Windows?

Jack Dempsey [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 setup an account with a username and password and flush your
 privileges...see if you can login on the command line...after that
 works, then try it with php

 -jack

 [Inf] F!RE-WALL wrote:
 
  Yo,
 
  I'd like to use a MySQL database on my website. If I look at the PHP
details
  of my site (see for yourself at
http://infinity.shrimpwars.be/phpinfo.php)
  it says under the MySQL section: enabled. Well, if I create a testpage
  with this as content:
 
  ?
  mysql_connect(localhost, , )
  or die (unable to connect to database);
  ?
 
  I get this:
 
  Warning: MySQL Connection Failed: Can't connect to local MySQL server
  through socket '/var/lib/mysql/mysql.sock' (111) in
  /clans/infinity/mysql.php on line 2
  unable to connect to database
 
  If I run the script on my local machine I get this:
 
  Warning: MySQL Connection Failed: Can't connect to MySQL server on
  'localhost' (10061) in e:\webserver\phptest\mysql.php on line 2
  unable to connect to database
 
  What is wrong? Do note that I don't know much about MySQL, I'm still
  learning :-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 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] Uptime script?

2001-05-16 Thread Michael Kimsal



Ben Cairns wrote:

 I know I've seen one before, and before I go write my own version, does
 anyone know of a PHP script that echoes the uptime of a server (Linux) in
 days,hour,minutes, etc?

 Does anyone know a script to do this under WinNT?

http://is-it-true.org/nt/atips/atips228.shtml

There's a link there to a freeware utility called 'uptime'.  Haven't used it,
but I remember poking around months ago for something similar.  Ended up
not needing it, but I'd found this and a couple others. Search for 'nt uptime
dll'
on google.com.

Good luck.



-- 
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] bug? file(), newline (\n) comparison

2001-05-16 Thread Hannes Schmiderer

Hi!

$astrData = file($astrCounterFile[$i]);

echo |\n|br;
echo | . $astrData[0] . |br;
echo | . $astrData[1] . |br;
//$astrData[1] = \n;
//echo | . $astrData[1] . |br;
echo | . $astrData[2] . |br;

for($k = 0; strcmp($astrData[$k] , \n)  ($k  50); $k++)
//  for($k = 0; ($astrData[$k]  \n)  ($k  50); $k++)
{
 echo | . $astrData[$k] . | . br;
}

I use 4.0.5 Win32 CGI, At the moment FTP at my host is down, so I cannot
test it on another system.

I have a textfile with line breaks and some empty lines in it. I read it
with file() into an array. When I output the lines, I can see in the hex
editor that the second line contains only a newline (0D 0A). When I output
\n it is 0D 0A, too.

The strange thing is, that, when I compare this array element (with the
emtpy line)  with \n It is never true! Not with strcmp, strncmp or .
When I remove the comments (//) and set $astrData[1]=\n explicit it works!
Note that echo | . $astrData[1] . |br; befor and after the assignment
have the same output (in hex editor).

Is this a type problem, are newlines internaly handled differently to usual
strings?

Thanx for help
Hannes




-- 
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] need some ideas here...

2001-05-16 Thread Christian Dechery

At 09:27 16/5/2001 +0100, James Holloway wrote:
Hi Christian,

I have an account with f2s.com that I use for sampling scripts with - I set
up a mailform yesterday after reading this, using mail() to send the email
to myself.  It got here - albeit 6am today (I sent it yesterday
lunchtime)  Perhaps you're using the mail() function incorrectly?

Well.. maybe something is wrong with my account or something cuz I'm using 
it fine... I've tried 3 different ways to send mail that works everywhere 
else I just put up this little script to send a sample mail...

$to=[EMAIL PROTECTED];
$from=MySelf [EMAIL PROTECTED];
$subject=just testing;
$body=h1Hello! Just testing here/h1;
$headers=Content-type: text/html\nFrom: .$from;

$rs=mail($to,$subject,$body,$headers);
$result=($rs)?successfull.:failed.;
echo Mail to .$to.: .$result;

guess what was the output? Mail to [EMAIL PROTECTED]: failed.

what's wrong with the script above?


-- 
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] Compiled error.

2001-05-16 Thread Pellegrini Giuliano

linux 2.2.19 apache1.3.19,php-4.0.5,mod_ssl 2.8.2,mod_perl-1.25,mm-1.1.13

step a) compiled mm ./configure --disable-shared + make +make test + make
install  OK.

step b) compiled mod_ssl
 CC=egcs
 CFLAGS=-O9 ...
 .configure --with-apache=../apache-source-tree --with-crt=../.crt
--with-key=/.key  OK

step c ) compiled apache
   CC=egcs
   OPTIM=-O9...
   CFLASG=-DDYNAMIC_MODULE_LIMIT=0
   change HARD_SERVER_LIMIT 1024 in httpd.h
  ./configure   OK

step d) compiled php
  CC=egcs
  CFLAGS=-O9.. -fno-exceptions -I/usr/local/ssl
  .configure --with-apache=../apache-source-tree ( not src)
   --with-mysql --enable-track-vars --with-popmail=
  --disabled-debug --enable-safe-mode --with-mm
  --enable-inline-optimization --with-gnu-ld --enable-memory-limit
 make
 make installOK

step e) compiled perl   
  perl Makefile.PL EVERYTHING=1 APACHE_SRC=../apache-source-tree/src 
  USE_APACI=1 PREP_HTTPD=1 DO_HTTPD=1
  make
  make install  OK

step f) compiled apache
 CC=egcs
  OPTIM=-O9...
  CFLASG=-DDYNAMIC_MODULE_LIMIT=0
  ./configure  --add-module=src/modules/experimental/mod_mmap_static.c
  --add-module=src/modules/standard/mod_auth_db.c
 --add-module=src/modules/standard/mod_so.c
 --add-module=src/modules/frontpage/mod_frontpage.c
 --enable-module=ssl
--enable-rule=SSL_SDBM
--disable-rule=SSL_COMPAT
 --activate-module=src/modules/php4/libmodphp4.a
 --enable-module=modphp4
 --activate-module=src/modules/perl/libperl.module
 --enable-module=perl   OK

  make   : and here there are many problem with php

  mod_php4.c.28 : zend.h No such file or directory
  mod_php4.c.29 : php.h  No such file or directory and go on.

If I copy the header file zend.h from ../php-4.0.5/Zend to
/apache-source-tree/src/include, the error at line 28 doesn't
appear, but I don't want cpy the all .h in the include apaci directory.

How Can I resolve this problem ?

If i change the src/Configuration file with the new line
AddModules modules/php4/libmodphp4.a
+ ./Configuration  don't change nothing.

Sorry for my english.


Thanking in advance.

Pellegrini Giuliano.
Riva del Garda -Italy.








 
 

-- 
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] Image Upload??

2001-05-16 Thread Brave Cobra

But as you can see too : upload_tmp_dir has no value, so I'm guessing this
won't work. I'm still getting errors with PHP, no problem in CGI though.

BC
- Original Message -
From: James Holloway [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 16, 2001 2:47 PM
Subject: Re: [PHP] Image Upload??


 From phpinfo() on f2s.com

 upload_max_filesize 2M

 So, something like,

 @copy($file, /path/to . $file_name)
 or die (Blam, something's up!);

 should work - haven't got time to try it at the moment.

 James.


  What am I doing wrong here?
  Is there a way to get around the temporary folder?
 
  Tnx
 
  Brave Cobra
 
 



 --
 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] PDF

2001-05-16 Thread Keith Ng

Hi all,

With regards to the PDF library, I'm wondering if there are any
generators that generate the code for the pdf document instead of
manually hard-coding everything. Or is there an easy way out by
converting an already designed pdf document into the code which pdflib
recognises?

Thanks very much.


Regards,
Keith Ng
___
Senior Web Developer
K-Systems  Services
[EMAIL PROTECTED]

http://www.k-systems.com.sg/


-- 
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 have a problem with phpMySqlAdmin

2001-05-16 Thread Enrique Ivorra Gómez


I sent you my phpinfo().

I dont put on INTERNET becouse it's on a Intranet.



System Linux porky.devel.redhat.com 2.2.5-22smp #1 SMP Wed Jun 2 09:11:51
EDT 1999 i686 unknown
Build Date Aug 23 2000
Configure Command './configure' '--target=i386-redhat-linux' '--prefix=/usr'
'--with-config-file-path=/etc' '--disable-debug' '--enable-pic'
'--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs'
'--disable-static' '--with-exec-dir=/usr/bin' '--with-regex=system'
'--with-gettext' '--with-gd' '--with-jpeg-dir=/usr' '--with-png'
'--with-zlib' '--with-db2' '--with-db3' '--with-gdbm' '--enable-debugger'
'--enable-magic-quotes' '--enable-safe-mode' '--enable-sysvsem'
'--enable-sysvshm' '--enable-track-vars' '--enable-yp' '--enable-ftp'
'--without-mysql' '--with-xml'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc
ZEND_DEBUG disabled
Thread Safety disabled

 This program makes use of the Zend scripting language engine:
Zend Engine v1.0.1, Copyright (c) 1998-2000 Zend Technologies







PHP 4.0 Credits




Configuration
PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference
 On On
arg_separator
  
asp_tags
 Off Off
auto_append_file
 no value no value
auto_prepend_file
 no value no value
browscap
 no value no value
default_charset
 no value no value
default_mimetype
 text/html text/html
define_syslog_variables
 Off Off
disable_functions
 no value no value
display_errors
 On On
doc_root
 no value no value
enable_dl
 On On
error_append_string
 Off Off
error_log
 no value no value
error_prepend_string
 Off Off
error_reporting
 2039 2039
expose_php
 On On
extension_dir
 /usr/lib/php4 /usr/lib/php4
gpc_order
 GPC GPC
highlight.bg
 #FF #FF
highlight.comment
 #FF8000 #FF8000
highlight.default
 #BB #BB
highlight.html
 #00 #00
highlight.keyword
 #007700 #007700
highlight.string
 #DD #DD
ignore_user_abort
 Off Off
implicit_flush
 Off Off
include_path
 .:/usr/share/php .:/usr/share/php
log_errors
 Off Off
magic_quotes_gpc
 On On
magic_quotes_runtime
 Off Off
magic_quotes_sybase
 Off Off
max_execution_time
 30 30
open_basedir
 no value no value
output_buffering
 Off Off
precision
 14 14
register_argc_argv
 On On
register_globals
 On On
safe_mode
 Off Off
safe_mode_exec_dir
 no value no value
sendmail_from
 [EMAIL PROTECTED] [EMAIL PROTECTED]
sendmail_path
 /usr/sbin/sendmail -t /usr/sbin/sendmail -t
short_open_tag
 On On
SMTP
 localhost localhost
sql.safe_mode
 Off Off
track_errors
 Off Off
track_vars
 On On
upload_max_filesize
 2097152 2097152
upload_tmp_dir
 no value no value
user_dir
 no value no value
variables_order
 EGPCS EGPCS
y2k_compliance
 Off Off


imap
IMAP Support enabled
IMAP c-Client Version 4.1


ldap
LDAP Support enabled
RCS Version $Id: ldap.c,v 1.46 2000/06/27 09:28:05 thies Exp $
Total Links 0/unlimited


pgsql
PostgreSQL Support enabled
Active Persistent Links 0
Active Links 0

Directive Local Value Master Value
pgsql.allow_persistent
 On On
pgsql.max_links
 Unlimited Unlimited
pgsql.max_persistent
 Unlimited Unlimited


gd
GD Support enabled
GD Version 1.6.2 or higher
FreeType Support enabled
FreeType Linkage with TTF library
PNG Support enabled
JPG Support enabled


zlib
ZLib Support enabled
Compiled Version 1.1.3
Linked Version 1.1.3


yp
YP Support enabled


xml
XML Support active


standard
Regex Library System library enabled
Dynamic Library Support enabled
Path to sendmail /usr/sbin/sendmail -t
Directive Local Value Master Value
assert.active
 1 1
assert.bail
 0 0
assert.callback
 no value no value
assert.quiet_eval
 0 0
assert.warning
 1 1
safe_mode_allowed_env_vars
 PHP_ PHP_
safe_mode_protected_env_vars
 LD_LIBRARY_PATH LD_LIBRARY_PATH



session
Session Support enabled

Directive Local Value Master Value
session.auto_start
 Off Off
session.cache_expire
 180 180
session.cache_limiter
 nocache nocache
session.cookie_domain
 no value no value
session.cookie_lifetime
 0 0
session.cookie_path
 / /
session.entropy_file
 no value no value
session.entropy_length
 0 0
session.gc_maxlifetime
 1440 1440
session.gc_probability
 1 1
session.name
 PHPSESSID PHPSESSID
session.referer_check
 no value no value
session.save_handler
 files files
session.save_path
 /tmp /tmp
session.serialize_handler
 php php
session.use_cookies
 On On


posix
Revision $Revision: 1.17 $


pcre
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 3.1 09-Feb-2000


gettext
GNU GetText Support enabled


dba
V1 ($Id: dba.c,v 1.19 2000/06/27 22:25:27 jah Exp $) gdbm db2 db3


db
This is GDBM version 1.8.0, as of May 19, 1999.


apache
APACHE_INCLUDE
APACHE_TARGET
Apache Version Apache/1.3.12
Apache Release 10312100
Apache API Version 19990320
Hostname:Port localhost.localdomain:80
User/Group apache(48)/48
Max Requests Per Child: 100
Keep Alive: on
Max 

[PHP] RE: Any Golive Users?

2001-05-16 Thread Tim Ward

My best advice is don't go near it. I spend a lot of time reworking stuff
done in this and 90% of that is rewriting the crap html/javascript, not
adding the php, which is relatively easy.

Sorry to rant, and maybe the results are down to the user, but what I've
come across has caused me a lot of work.

Tim Ward
Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


 -Original Message-
 From: Michael O'Neal [mailto:[EMAIL PROTECTED]]
 Sent: 15 May 2001 16:32
 To: php
 Subject: Any Golive Users?
 
 
 Hi,
 
 I'm thinking about doing a PHP Extension for Adobe Golive.  
 Basically, it 
 would be some pre-made chunks of script (MySQL calls, etc...) 
 that you 
 could drag and drop from a PHP palette.
 
 If anyone uses/knows Golive 5, and wants to help ( I could 
 use it) please 
 drop me a line.
 
 mto
 
 Michael O'Neal
 Web Producer/ Autocrosser
 ST 28 '89 Civic Si
 -
  M   A   N   G   O
 B  O  U  L  D  E  R 
 -
 http://www.thinkmango.com
 [EMAIL PROTECTED]
 p-303.442.1821
 f-303.938.8507
 
 
 

-- 
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] Generate code bars

2001-05-16 Thread Sandra Ruivo Grilo


I have a problem: how can I generate code bars in php ?

Thanks in advance,
Sandra.

-- 
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] Generate code bars

2001-05-16 Thread Kurth Bemis

Code bars?  like Barcodes?  I do it with gd and free type with a barcode
font. Works like a charm.  Currently i'm looking at using it on an online
ticking system for conventions.

~kurth

On Wed, 16 May 2001, Sandra Ruivo Grilo wrote:


 I have a problem: how can I generate code bars in php ?

 Thanks in advance,
 Sandra.

 --
 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] I have a problem with phpMySqlAdmin

2001-05-16 Thread Miles Thompson

Enrique,

1. Are you running MySQL and have you tested it at the console?

2. You do not have MySQL support compiled into PHP.
See the last line of Configure Command where it says '--without-mysql'.
You will have to recompile PHP with MySQL support.

If you hae installed Apache, MySQL and PHP using RPM's I'd strongly 
recommend you obtain the source files and compiles from source. There is an 
excellent tutorial on this called LAMP(For Linux Apache MySQL and PHP). If 
you search Google for a string like LAMP MySQL Apache or
Soothingly Seamless Install you will get two excellent tutorials.

Good luck - Miles Thompson

At 04:00 PM 5/16/01 +0200, Enrique Ivorra Gómez wrote:

I sent you my phpinfo().

I dont put on INTERNET becouse it's on a Intranet.



System Linux porky.devel.redhat.com 2.2.5-22smp #1 SMP Wed Jun 2 09:11:51
EDT 1999 i686 unknown
Build Date Aug 23 2000
Configure Command './configure' '--target=i386-redhat-linux' '--prefix=/usr'
'--with-config-file-path=/etc' '--disable-debug' '--enable-pic'
'--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs'
'--disable-static' '--with-exec-dir=/usr/bin' '--with-regex=system'
'--with-gettext' '--with-gd' '--with-jpeg-dir=/usr' '--with-png'
'--with-zlib' '--with-db2' '--with-db3' '--with-gdbm' '--enable-debugger'
'--enable-magic-quotes' '--enable-safe-mode' '--enable-sysvsem'
'--enable-sysvshm' '--enable-track-vars' '--enable-yp' '--enable-ftp'
'--without-mysql' '--with-xml'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc
ZEND_DEBUG disabled
Thread Safety disabled

  This program makes use of the Zend scripting language engine:
Zend Engine v1.0.1, Copyright (c) 1998-2000 Zend Technologies







PHP 4.0 Credits




Configuration
PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference
  On On
arg_separator
   
asp_tags
  Off Off
auto_append_file
  no value no value
auto_prepend_file
  no value no value
browscap
  no value no value
default_charset
  no value no value
default_mimetype
  text/html text/html
define_syslog_variables
  Off Off
disable_functions
  no value no value
display_errors
  On On
doc_root
  no value no value
enable_dl
  On On
error_append_string
  Off Off
error_log
  no value no value
error_prepend_string
  Off Off
error_reporting
  2039 2039
expose_php
  On On
extension_dir
  /usr/lib/php4 /usr/lib/php4
gpc_order
  GPC GPC
highlight.bg
  #FF #FF
highlight.comment
  #FF8000 #FF8000
highlight.default
  #BB #BB
highlight.html
  #00 #00
highlight.keyword
  #007700 #007700
highlight.string
  #DD #DD
ignore_user_abort
  Off Off
implicit_flush
  Off Off
include_path
  .:/usr/share/php .:/usr/share/php
log_errors
  Off Off
magic_quotes_gpc
  On On
magic_quotes_runtime
  Off Off
magic_quotes_sybase
  Off Off
max_execution_time
  30 30
open_basedir
  no value no value
output_buffering
  Off Off
precision
  14 14
register_argc_argv
  On On
register_globals
  On On
safe_mode
  Off Off
safe_mode_exec_dir
  no value no value
sendmail_from
  [EMAIL PROTECTED] [EMAIL PROTECTED]
sendmail_path
  /usr/sbin/sendmail -t /usr/sbin/sendmail -t
short_open_tag
  On On
SMTP
  localhost localhost
sql.safe_mode
  Off Off
track_errors
  Off Off
track_vars
  On On
upload_max_filesize
  2097152 2097152
upload_tmp_dir
  no value no value
user_dir
  no value no value
variables_order
  EGPCS EGPCS
y2k_compliance
  Off Off


imap
IMAP Support enabled
IMAP c-Client Version 4.1


ldap
LDAP Support enabled
RCS Version $Id: ldap.c,v 1.46 2000/06/27 09:28:05 thies Exp $
Total Links 0/unlimited


pgsql
PostgreSQL Support enabled
Active Persistent Links 0
Active Links 0

Directive Local Value Master Value
pgsql.allow_persistent
  On On
pgsql.max_links
  Unlimited Unlimited
pgsql.max_persistent
  Unlimited Unlimited


gd
GD Support enabled
GD Version 1.6.2 or higher
FreeType Support enabled
FreeType Linkage with TTF library
PNG Support enabled
JPG Support enabled


zlib
ZLib Support enabled
Compiled Version 1.1.3
Linked Version 1.1.3


yp
YP Support enabled


xml
XML Support active


standard
Regex Library System library enabled
Dynamic Library Support enabled
Path to sendmail /usr/sbin/sendmail -t
Directive Local Value Master Value
assert.active
  1 1
assert.bail
  0 0
assert.callback
  no value no value
assert.quiet_eval
  0 0
assert.warning
  1 1
safe_mode_allowed_env_vars
  PHP_ PHP_
safe_mode_protected_env_vars
  LD_LIBRARY_PATH LD_LIBRARY_PATH



session
Session Support enabled

Directive Local Value Master Value
session.auto_start
  Off Off
session.cache_expire
  180 180
session.cache_limiter
  nocache nocache
session.cookie_domain
  no value no value
session.cookie_lifetime
  0 0
session.cookie_path
  / /
session.entropy_file
  no value no value
session.entropy_length
  0 0
session.gc_maxlifetime
  1440 1440

Re: [PHP] bug? file(), newline (\n) comparison

2001-05-16 Thread Chris Lee

on my linux based system 

echo ord(\n);

is 10 which is 0A in hex. windows machings usually consider newline to be 0A0D or 0D0A 
mac's usually are 0D I would convert your file. I have to do this often with file 
uploads.

// convert all 0A0D and 0D0A to 0A0A
$data = str_replace(chr(13), chr(10), $data);
// convert all 0A0A to 0A
$data = str_replace(chr(10).chr(10), chr(10), $data);

this will standardize it for you.

-- 

 Chris Lee
 [EMAIL PROTECTED]


Hannes Schmiderer [EMAIL PROTECTED] wrote in message 
9dtv8b$cud$[EMAIL PROTECTED]">news:9dtv8b$cud$[EMAIL PROTECTED]...
Hi!

$astrData = file($astrCounterFile[$i]);

echo |\n|br;
echo | . $astrData[0] . |br;
echo | . $astrData[1] . |br;
//$astrData[1] = \n;
//echo | . $astrData[1] . |br;
echo | . $astrData[2] . |br;

for($k = 0; strcmp($astrData[$k] , \n)  ($k  50); $k++)
//  for($k = 0; ($astrData[$k]  \n)  ($k  50); $k++)
{
 echo | . $astrData[$k] . | . br;
}

I use 4.0.5 Win32 CGI, At the moment FTP at my host is down, so I cannot
test it on another system.

I have a textfile with line breaks and some empty lines in it. I read it
with file() into an array. When I output the lines, I can see in the hex
editor that the second line contains only a newline (0D 0A). When I output
\n it is 0D 0A, too.

The strange thing is, that, when I compare this array element (with the
emtpy line)  with \n It is never true! Not with strcmp, strncmp or .
When I remove the comments (//) and set $astrData[1]=\n explicit it works!
Note that echo | . $astrData[1] . |br; befor and after the assignment
have the same output (in hex editor).

Is this a type problem, are newlines internaly handled differently to usual
strings?

Thanx for help
Hannes




-- 
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] Sending Output Buffer contents to PDFLib

2001-05-16 Thread Chris Lee

I can't say this is for sure, but I am almost 100% sure adobe function, not a pdflib 
function to convert html - pdf.  sorry I dnt have any recommendations, I had to write 
a special convert_pdf page for every page.

-- 

 Chris Lee
 [EMAIL PROTECTED]



Matthew M. Boulter [EMAIL PROTECTED] wrote in message 
001401c0de03$31ff3190$bc2886cb@enki">news:001401c0de03$31ff3190$bc2886cb@enki...
Heya guys, I've just started to play with PDFLib v3 and was primarily experimenting to 
enable me to produce PDF versions of our HTML files on demand. I.e., like some sites 
have a 'Print this article' button, I want a 'Make a PDF' button.
I played with PDFLib and saw that to get text on the page you can use several 
functions (like PDF_show...) however I was wondering if I can avoid having to write a 
specific module for each type of PDF file I want to make. My pages I want to produce 
as PDF can have complex tables, pictures and lots of text. Is there anyway I can send 
the contents of say the output buffer containing a completed HTML.../HTML document 
to PDFLib or ClibPDF?
Like the way in the full Adobe Acrobat 4 software the 'Open Web Page' function.

Thanks in advance,
Matty.



--
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] Custom Session Func?

2001-05-16 Thread Chris Lee

common mistake, your session_register() is before you assign the variable, you must 
have it after. Ive done this myself. oi.

  session_start();  
  if ( ! session_is_registered(user_key) ) {
$user_key = dummy;
session_register(user_key);
  }  

I'll include my session file. this will allways set $SID and will also allow you to 
transfer session's across multiple domains. handy.  somesites dont want to fork the 
money out to purchase their own ssl certificates, so we transfer them to our server 
where they can use our certificate (different domain obviously).

?php
 include_once('time.egn');

 if ( isset($HTTP_COOKIE_VARS['PHPSESSID']) )
 {
  if ( isset($HTTP_GET_VARS['PHPSESSID']) )
   $new_sessid = $HTTP_GET_VARS['PHPSESSID'];
  if ( isset($HTTP_POST_VARS['PHPSESSID']) )
   $new_sessid = $HTTP_POST_VARS['PHPSESSID'];

  if ( isset($new_sessid) )
   session_id($new_sessid);
 }

 session_start();

 if (!isset($HTTP_SESSION_VARS['SessionID']))
 {
  $SessionID = mtime();
  session_register('SessionID');
 }

 $PHPSESSID = session_id();
 $SID = PHPSESSID=$PHPSESSID;

?

-- 

 Chris Lee
 [EMAIL PROTECTED]



Elan [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi,

Problem: I register a session variable and assign a value to it. The
value is lost when I try to access it from a different webpage later.
Must I use custom session_save_handler functions if I want to extend the
life of a variable's value from Webpage to Webpage?

Details:
I'm using PHP's session management (PHP 4.0.3pl1). session.save_handler
is set by default to files. According to the manual track_vars is always
enabled for this version of PHP.
I use the following code to manage my session. It is contained in a
include file that is shared by all PHP pages:

  session_save_path(/usr/some/path/html/sessions/);
  session_start();  
  $registered_user_key = false;
  if ( ! session_is_registered(user_key) ) {
session_register(user_key);
$HTTP_SESSION_VARS[user_key] = dummy;
$registered_user_key = true;
  }  
  
  function log_user_key($user_key = false) {
global $HTTP_SESSION_VARS, $set_user_key, $get_user_key;

$HTTP_SESSION_VARS[user_key] = $user_key;
$set_user_key = $user_key;
$get_user_key = get_session_key(user_key);
  }
  
  function log_session() {
  }
  
  function get_session_key($key_name) {
global $HTTP_SESSION_VARS;  
return($HTTP_SESSION_VARS[$key_name]);
  }

testing 
I submit a Webpage that includes a value for user_key.

note A session file is created in the subdirectory sessions. This
file's filename coincides with the reported cookie session id.
/note

processing The function log_user_key(...) is called with a legal value
in response to my user input. 
/processing

verification In response to the user's input I generate webpage that
reports the value that was saved. I report this value using the function
log_user_key().
/verficiation

failure I submit another Webpage. This Webpage reports:
a) The registration of the variable user_key was apparently preserved.
How I know that? Because $registered_user_key is set to false, which
means that the body of the if (! sesson_is_registerd ...) {} wasn't
visited. 
b) I report the result of session_is_registered and it report 1 (i.e.
true).
c) get_session_key(user_key) does not return the value I previously
assigned to user_key using the log_user_key function.
/failure

I checked the session file in the sessions/ subdirectory. It is empty.
Doesn't PHP's session manager keep its info in there? If it does, why
wasn't it written to the file? Doesn't the default files
session_save_handler take care of that? Or must I supply a custom
handler set to ensure that the values are saved?

TIA,

Elan

-- 
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] Continue Script after readfile()

2001-05-16 Thread Joseph Koenig

is it possible for a script to continue running after calling
readfile()? I have a function that uses readfile(), after the file has
been read, I need to update a database. Any reason my script would just
stop executing? At first I thouht it may be a time limit, issue, but I
set time limit to 0 and it still doesn't work. Any ideas? Thanks,

Joe

-- 
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 can I enable magic_quotes_gpc without editing PHP.ini

2001-05-16 Thread SED

Hi,

I need to enable magic_quotes_qpc for one session (or a script) but I can no
access to the php.ini on the server. Is it possible to do it? And if so,
how?

Regards,
Sumarlidi Einar Dadason

SED - Graphic Design

--
Phone:   (+354) 4615501
Mobile:  (+354) 8960376
Fax: (+354) 4615503
E-mail:  [EMAIL PROTECTED]
Homepage:www.sed.is - New Homepage!
--


-- 
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] Inserting and Selecting an IMAGE from the DB

2001-05-16 Thread Felipe Moreno


Hi list members!

I have a doubt regarding how can I INSERT and SELECT an IMAGE from a MYSQL
database. I'm using , in the DB, the BLOB field, so, I will be able to
receive binary data. Thnaks for any help!

Best Regards,

Felipe Moreno


-- 
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 can I enable magic_quotes_gpc without editing PHP.ini

2001-05-16 Thread Keith Ng

In reply to [EMAIL PROTECTED]:

 Return-Path: [EMAIL PROTECTED]
 Received: from toye.php.net (va.php.net [198.186.203.51])
 by cobalt1.intermedia.com.sg (8.10.2/8.10.2) with SMTP id f4GEsVZ09896
 for [EMAIL PROTECTED]; Wed, 16 May 2001 22:54:31 +0800
 Received: (qmail 7963 invoked by uid 1013); 16 May 2001 14:57:06 -
 Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
 Precedence: bulk
 list-help: mailto:[EMAIL PROTECTED]
 list-unsubscribe: mailto:[EMAIL PROTECTED]
 list-post: mailto:[EMAIL PROTECTED]
 Delivered-To: mailing list [EMAIL PROTECTED]
 Received: (qmail 7957 invoked from network); 16 May 2001 14:57:06 -
 Reply-To: [EMAIL PROTECTED]
 From: SED [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Date: Wed, 16 May 2001 15:00:23 -
 Message-ID: [EMAIL PROTECTED]
 MIME-Version: 1.0
 Content-Type: text/plain;
 charset=iso-8859-1
 Content-Transfer-Encoding: 7bit
 X-Priority: 3 (Normal)
 X-MSMail-Priority: Normal
 X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
 In-Reply-To: 9du3pi$te4$[EMAIL PROTECTED]
 Importance: Normal
 Subject: [PHP] How can I enable magic_quotes_gpc without editing PHP.ini
 X-UIDL: BlS!FI`!LJI!a2_!!

 Hi,

 I need to enable magic_quotes_qpc for one session (or a script) but I can no
 access to the php.ini on the server. Is it possible to do it? And if so,
 how?

 Regards,
 Sumarlidi Einar Dadason

 SED - Graphic Design

 --
 Phone:   (+354) 4615501
 Mobile:  (+354) 8960376
 Fax: (+354) 4615503
 E-mail:  [EMAIL PROTECTED]
 Homepage:www.sed.is - New Homepage!
 --



set_magic_quotes_runtime();


Regards,
Keith Ng
___
Co-founder
K-Designs Incorporated
[EMAIL PROTECTED]

http://www.k-designs.com.sg/


-- 
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] sending mail alternatives...

2001-05-16 Thread Christian Dechery

I have an account at f2s.com and it seems to me that is IMPOSSIBLE to send 
mail... I've got answers from other users there that got it working... I 
don't know how

below are listed all the things I've tried to do:

1 - use mail() function (even tested with the most basic 
mail(myemail,test,test), and it returned false)
2 - use my alternate smail() function that calls 'sendmail' (it actually 
works until the popen(), then it stops...)
2 - placed a sendmail.php script in another site I have that can send 
emails... this sendmail.php receives querystring parameters to send the 
email... so I do an 
fopen(http://thisothersite.com/sendmail.php?to=emailfrom=lalal... etc...) 
and it works fine... I've tested it from a lot of sites...
the error it displays (after 60 seconds) is 'Bad file descriptor'
4 - built a function that sends mail with fsockopen (which also works, as 
tested) and call it with my local smtp server... for whatever smtp I place 
there it gives me timeout...

so I'm guessing there's a firewall there that blocks any access right?
why? Sending email is really that hazardous?
_
. Christian Dechery - CTO
.. WebDeveloper @ Webstyle!
.. http://www.webstyle.com.br
.. http://www.tanamesa.com.br


-- 
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] Custom Session Func?

2001-05-16 Thread Johnson, Kirk

Chris, is this requirement spelled out in the manual anywhere? I have never
seen any effect of the order of calling session_register() and assigning a
value in my own code.  In fact, I almost always register a variable before
assigning a value.

Just curious.

Kirk

 -Original Message-
 From: Chris Lee [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 16, 2001 6:58 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Custom Session Func?
 
 
 common mistake, your session_register() is before you assign 
 the variable, you must have it after. Ive done this myself. oi.
 
   session_start();  
   if ( ! session_is_registered(user_key) ) {
 $user_key = dummy;
 session_register(user_key);
   }  

[major snippage] 

-- 
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: ANN:Visual PHP Studio 1.0 Field Test 1 B156 New release!

2001-05-16 Thread Michael O'Neal

On Wed, 16 May 2001 00:28:21 +0200, José León Serna
[EMAIL PROTECTED] successfully typed:

Hello:
   The next release of Visual PHP Studio is out!!!.

I have reserved the domain visualphpstudio.com and I have moved the web site
to a new host to avoid some problems with the old one. The most exciting
feature on this release is the ability to work with HTML Forms, a new
palette contains all the components you need to create HTML Forms. Even you
don't like Visual PHP Studio to develop your pages, maybe you could use it
to design your forms, because it's very easy and powerful.


Hopefully when/if you make a Linux version, you can port it to Mac OS X
as well!

mto

Michael O'Neal
Web Producer/ Autocrosser
ST 28 '89 Civic Si
-
 M   A   N   G   O
B  O  U  L  D  E  R
-
http://www.thinkmango.com
[EMAIL PROTECTED]
p-303.442.1821
f-303.938.8507



--
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] working on array of different number of indices

2001-05-16 Thread Dennis Gearon

I want to pass in a scalar int, or an array of ints (indices) to a
function in a class. The scalar or array will be a class variable. 

Without knowing the max size of each index, or the number of indices,
(as is required is most other languages), I can't figure out how to
access the array in a flexible fashion.  What I **WANT** to use as a
clue is whether the passed $index value is a scalar, or how many
elements are in the array.

examples:

function work_on_array( $value, $index ){
  blah to $this-value_s_holder;
   .. 
   ..
}

work_on_array( 7, array(4,5) );
work_on_array( 23, 1 );

The number of INDICES will not change during program execution, although
I do not want to have to predict the range of the scalar/indices.

any ideas?

-- 
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 is there no socket support for Win32?

2001-05-16 Thread Todd

If I am incorrect in this belief, please tell me how to enable this.



-- 
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] bug? file(), newline (\n) comparison

2001-05-16 Thread Hannes Schmiderer

Ok, now I got it.
I already knew that the newline is coded differently in Unix/Win/Mac. But I
did not know, that in PHP on Win32 \n is 0D 0A when outputed, but 0A
otherwise. Confusing...

Hannes



-- 
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] Does anyone know where I can get mcrypt.dll?

2001-05-16 Thread Brandon Orther

Does anyone know where I can get mcrypt.dll?

Thanks Brandon

-- 
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: Processing time in PHP. better to use php tags inline or print(html);

2001-05-16 Thread Merio, Quinn


Sorry to nag,  i hadnt recieved any responses on this post yet.. would like
to re-request..  I wanted to know if there is drawbacks or benefits to using
the php alternate syntax?

 1.) Is it possible (and if so, how do i) get the time it took to process
 the page (seconds or milliseconds)?
 
 2.) This is where the first q arose from:  I am trying to ascertain which
 is faster, outputting a query using the print function or using the
 alternate syntax.  I know that in ASP, jumping in and out of the asp code
 slows down the page processing.
 
 Here is the two ways i am outputting my recordset:
 
 1.-  from within the php code -
 
 table cellpadding=4 cellspacing=4 border=2
 ?php 
 
  for ($i = 1; $i = $nr; $i++){
$row = mysql_fetch_assoc ($rs);
   
   print(tr);
   print(td);
   print($row['projectId']);
   print(/tdtd);
   print('a
 href=mylink.php?linkId='.$row['projectId'].''.$row['projectName'].'/a
 ');
   print(/tdtd);
 print($row['projectStatus']);
   print(/tr);
   
   } // End Loop rows
   
   ?
   
  /table
 
 
 2. inline code with the html --
 
 table cellpadding=4 cellspacing=4 border=2
 ? for ($i = 1; $i = $nr; $i++): ?
 ? $row = mysql_fetch_assoc ($rs);?
  tr
  td?print($row['projectId']);?/td
  tda
 href=myfile?blah=?=$row['projectId']??print($row['projectName']);?
 /a/td
  td?print($row['projectStatus']);?/td
  /tr
   ? endfor; ?
  /table
 
 Any thoughts from the experts? I love being able to mix html and php tags,
 but am worried about efficiency.
 
 TIA,
 
 Quinn Merio
 Vir2lAlliance Inc.
 www.vir2lalliance.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] Kill a cookie....

2001-05-16 Thread Tristan . Pretty



I am using setCookie(cookie1, $form_variable)

Is there a command like killCookie?

I am finding that my pages are remembering cookies after they are needed.

I've looked on php.net, but couldn't find anything.
Tris...




**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**

-- 
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: Processing time in PHP. better to use php tags inlineor pri nt(html);

2001-05-16 Thread Rasmus Lerdorf

Why don't you just benchmark both?

On Wed, 16 May 2001, Merio, Quinn wrote:
 Sorry to nag,  i hadnt recieved any responses on this post yet.. would like
 to re-request..  I wanted to know if there is drawbacks or benefits to using
 the php alternate syntax?

  1.) Is it possible (and if so, how do i) get the time it took to process
  the page (seconds or milliseconds)?
 
  2.) This is where the first q arose from:  I am trying to ascertain which
  is faster, outputting a query using the print function or using the
  alternate syntax.  I know that in ASP, jumping in and out of the asp code
  slows down the page processing.
 
  Here is the two ways i am outputting my recordset:
 
  1.-  from within the php code -
 
  table cellpadding=4 cellspacing=4 border=2
  ?php
 
   for ($i = 1; $i = $nr; $i++){
 $row = mysql_fetch_assoc ($rs);
 
  print(tr);
  print(td);
  print($row['projectId']);
  print(/tdtd);
  print('a
  href=mylink.php?linkId='.$row['projectId'].''.$row['projectName'].'/a
  ');
  print(/tdtd);
  print($row['projectStatus']);
  print(/tr);
 
} // End Loop rows
 
?
 
   /table
 
 
  2. inline code with the html --
 
  table cellpadding=4 cellspacing=4 border=2
  ? for ($i = 1; $i = $nr; $i++): ?
  ? $row = mysql_fetch_assoc ($rs);?
   tr
   td?print($row['projectId']);?/td
   tda
  href=myfile?blah=?=$row['projectId']??print($row['projectName']);?
  /a/td
   td?print($row['projectStatus']);?/td
   /tr
? endfor; ?
   /table
 
  Any thoughts from the experts? I love being able to mix html and php tags,
  but am worried about efficiency.
 
  TIA,
 
  Quinn Merio
  Vir2lAlliance Inc.
  www.vir2lalliance.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] Kill a cookie....

2001-05-16 Thread Rasmus Lerdorf

http://php.net/setcookie is quite clear on this subject, I think.

-Rasmus

On Wed, 16 May 2001 [EMAIL PROTECTED] wrote:



 I am using setCookie(cookie1, $form_variable)

 Is there a command like killCookie?

 I am finding that my pages are remembering cookies after they are needed.

 I've looked on php.net, but couldn't find anything.
 Tris...




 **
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the system manager.

 This footnote also confirms that this email message has been swept by
 MIMEsweeper for the presence of computer viruses.


 **




-- 
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]




AW: [PHP] Kill a cookie....

2001-05-16 Thread Sebastian Stadtlich

you kill a cookie by setting an emty one with the same name
www.php.net/setcookie

sebastian

 -Ursprungliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Gesendet: Mittwoch, 16. Mai 2001 18:39
 An: [EMAIL PROTECTED]
 Betreff: [PHP] Kill a cookie
 
 
 
 
 I am using setCookie(cookie1, $form_variable)
 
 Is there a command like killCookie?
 
 I am finding that my pages are remembering cookies after they 
 are needed.
 
 I've looked on php.net, but couldn't find anything.
 Tris...
 
 
 
 
 **
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the system manager.
 
 This footnote also confirms that this email message has been swept by
 MIMEsweeper for the presence of computer viruses.
 
 
 **
 
 -- 
 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] working on array of different number of indices

2001-05-16 Thread Rasmus Lerdorf

On Wed, 16 May 2001, Dennis Gearon wrote:

 I want to pass in a scalar int, or an array of ints (indices) to a
 function in a class. The scalar or array will be a class variable.

 Without knowing the max size of each index, or the number of indices,
 (as is required is most other languages), I can't figure out how to
 access the array in a flexible fashion.  What I **WANT** to use as a
 clue is whether the passed $index value is a scalar, or how many
 elements are in the array.

 examples:

 function work_on_array( $value, $index ){
   blah to $this-value_s_holder;
..
..
 }

 work_on_array( 7, array(4,5) );
 work_on_array( 23, 1 );

 The number of INDICES will not change during program execution, although
 I do not want to have to predict the range of the scalar/indices.

 any ideas?

I am having trouble parsing this question.

Are you simply asking if there is away to check whether the $index
parameter is a scalar or an array?  If so, see php.net/gettype

-Rasmus


-- 
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] changing pixelsize of a picture via php

2001-05-16 Thread Andreas Pucko

Hi there,

I am trying to change the size of picture (.jpg or.gif) on the server via
php. In order to get a smaller file size for a thumb.

Has anybody a idea how to do that??

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]




Re: [PHP] Does anyone know where I can get mcrypt.dll?

2001-05-16 Thread Johannes Janson

Hi,

 Does anyone know where I can get mcrypt.dll?

I'm  not sure but it might be included in the dist from
www.php4win.de

johannes




-- 
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] Sessions question.

2001-05-16 Thread Brandon Orther

Hello,

Is there a way to get the name of each variable in a session?

Thanks
Brandon

-- 
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] Shopping with variables

2001-05-16 Thread scott [gts]

why not use serialized arrays stored in cookies to 
store a growing list of things that the user is purchasing?

then, it'd be as easy as having this array
stored as a single cookie... ;)

$items = array(
#indexed by item ID
'1003045' = array(
'name'  ='The best movie',
'type'='DVD',
'quan'=1,
),

);


then you could loop thru the array and have
all the information right at your fingertips

print You ordered $items[$current]['quan'] of $items[$current]['type'];



 -Original Message-
 From: John Monfort [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 16, 2001 9:02 AM
 To: Ralph Guzman
 Cc: Tarrant Costelloe; [EMAIL PROTECTED]
 Subject: RE: [PHP] Shopping with variables
 
 
 
 
  That will work, assuming the user is not allowed to purchase multiple
 items...
 
  -John
 
 On Wed, 16 May 2001, Ralph Guzman wrote:
 
  Might want to reconsider the way you are doing this, since this may not be
  the most efficient way. An alternative might be to do this as follows:
 
  In your web form set a field for Quantity and another for Item Name, so for
  example:
 
  FORM ACTION=script_name.php METHOD=post
 
  ...
 
  Quantity: INPUT TYPE=text NAME=item_qty SIZE=2
 
  SELECT NAME=item_type
  OPTION VALUE=DVDDVD/OPTION
  OPTION VALUE=VIDEOVIDEO/OPTION
  OPTION VALUE=CDCD/OPTION
  /SELECT
 
  ...
 
  /FORM
 
  then when you process the form all you would have to do to display your
  thank you message:
 
  print You have asked to purchase $item_qty $item_type. Thank You;
 
  Nevertheless, if for some reason you must do things like you are doing them
  now, try something like this:
 
  if(isset($dvd)){
 $item_type = DVD(s);
 $item_qty = $dvd;
  }
 
  if(isset($video)){
 $item_type = VIDEO(s);
 $item_qty = $video;
  }
 
  if(isset($cd)){
 $item_type = CD(s);
 $item_qty = $cd;
  }
 
  print You have asked to purchase $item_qty $item_name;
 
  Keep in mind that this is not the most efficient method since it will
  require that you continue adding if(isset($variable)) statements, if you
  ever decide to add more item types.
 
 
  -Original Message-
  From: Tarrant Costelloe [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 16, 2001 2:13 AM
  To: '[EMAIL PROTECTED]'
  Subject: [PHP] Shopping with variables
 
  I am currently just messing around with a basic shopping cart, but have
  stumbled onto a problem.
  Bascially there is three input boxes all name DVD, VIDEO, CD and these are
  also variables. Once the user has said they wanted 15 cd's for example,
  the form then takes them onto the shop.php. Which say's something along the
  lines of:
 
  ?php print( You have asked to purchase $dvd $video $cd 's - Thank you) ?
 
  This prints out, You have bought 16 - Thank you for example, see the
  problem? How do I get it to print the variable name not just it's value?
 
  Tarrant Costelloe
  Software Developer
  InsurE-com Ltd.
  
  Tel:  +44 (0)1273 852014
  [EMAIL PROTECTED]
  http://www.insur-e.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]
 
 
  --
  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 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] changing pixelsize of a picture via php

2001-05-16 Thread Rasmus Lerdorf

 I am trying to change the size of picture (.jpg or.gif) on the server via
 php. In order to get a smaller file size for a thumb.

 Has anybody a idea how to do that??

The best way, albeit somewhat slow, is to use the new ImageCopyResampled()
function provided by GD2.  See http://php.net/imagecopyresampled

-Rasmus


-- 
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] Sessions question.

2001-05-16 Thread Rasmus Lerdorf

 Is there a way to get the name of each variable in a session?

Just walk through $HTTP_SESSION_VARS

-Rasmus


-- 
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] need help

2001-05-16 Thread Fai

Can anybody tell me what does the following mean?

$path=substr(__FILE__, 0, strlen(__FILE__) - strlen(basename(__FILE__)) -
1);

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]




Re: [PHP] need help

2001-05-16 Thread Rasmus Lerdorf

 Can anybody tell me what does the following mean?

 $path=substr(__FILE__, 0, strlen(__FILE__) - strlen(basename(__FILE__)) -
 1);

It's silly code written by someone who doesn't realize that the dirname()
function exists.  dirname(__FILE__) would do exactly the same thing.  See
php.net/dirname

-Rasmus


-- 
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] need help

2001-05-16 Thread Johnson, Kirk

__FILE__ is a constant predefined by PHP. See
http://www.php.net/manual/en/language.constants.php

For help on the basename() function, see
http://www.php.net/manual/en/function.basename.php

Kirk

 -Original Message-
 From: Fai [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 16, 2001 11:19 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] need help
 
 
 Can anybody tell me what does the following mean?
 
 $path=substr(__FILE__, 0, strlen(__FILE__) - 
 strlen(basename(__FILE__)) -
 1);
 
 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]




RE: [PHP] need help

2001-05-16 Thread scott [gts]

wow, that's quite a mouthfull ;)

use dirname

 
 $path=substr(__FILE__, 0, strlen(__FILE__) - strlen(basename(__FILE__)) -
 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] Continue Script after readfile()

2001-05-16 Thread Rasmus Lerdorf

 is it possible for a script to continue running after calling
 readfile()? I have a function that uses readfile(), after the file has
 been read, I need to update a database. Any reason my script would just
 stop executing? At first I thouht it may be a time limit, issue, but I
 set time limit to 0 and it still doesn't work. Any ideas? Thanks,

There is no reason your script should be terminating after a readfile()
call.

-Rasmus


-- 
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] Inserting and Selecting an IMAGE from the DB

2001-05-16 Thread scott [gts]

use a BLOB field type

read the docs for mysql, or whatever
DB you happen to be using.

 -Original Message-
 From: Felipe Moreno [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 16, 2001 11:02 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Inserting and Selecting an IMAGE from the DB
 Importance: High
 
 
 
 Hi list members!
 
 I have a doubt regarding how can I INSERT and SELECT an IMAGE from a MYSQL
 database. I'm using , in the DB, the BLOB field, so, I will be able to
 receive binary data. Thnaks for any help!
 
 Best Regards,
 
 Felipe Moreno
 
 
 -- 
 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: Processing time in PHP. better to use php tags inline or pri nt(html);

2001-05-16 Thread Ethan Schroeder

The following code is not mine, so I take no credit for it.  It seems to
work fine for me, though:
?

 class  c_Timer  {
 var  $t_start  =  0;
 var  $t_stop  =  0;
 var  $t_elapsed  =  0;


 function  start()  {  $this-t_start  =  microtime();  }

 function  stop(){  $this-t_stop=  microtime();  }

 function  elapsed()  {
 if  ($this-t_elapsed)  {
 return  $this-t_elapsed;
 }  else  {
 $start_u  =  substr($this-t_start,0,10);
 $start_s  =  substr($this-t_start,11,10);
   $stop_u=  substr($this-t_stop,0,10);
 $stop_s=  substr($this-t_stop,11,10);
 $start_total  =  doubleval($start_u)  +  $start_s;
   $stop_total=  doubleval($stop_u)  +
$stop_s$

 $this-t_elapsed  =  $stop_total  -  $start_total;

 return  $this-t_elapsed;
 }
 }
 };

 /*  Here's  an  example  usage:

 $timer  =  new  c_Timer;

 $timer-start();
 echo  hr;
 $timer-stop();

 echo  $timer-elapsed();

 */
 ?


- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Merio, Quinn [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, May 16, 2001 9:47 AM
Subject: Re: [PHP] RE: Processing time in PHP. better to use php tags inline
or pri nt(html);


 Why don't you just benchmark both?

 On Wed, 16 May 2001, Merio, Quinn wrote:
  Sorry to nag,  i hadnt recieved any responses on this post yet.. would
like
  to re-request..  I wanted to know if there is drawbacks or benefits to
using
  the php alternate syntax?
 
   1.) Is it possible (and if so, how do i) get the time it took to
process
   the page (seconds or milliseconds)?
  
   2.) This is where the first q arose from:  I am trying to ascertain
which
   is faster, outputting a query using the print function or using the
   alternate syntax.  I know that in ASP, jumping in and out of the asp
code
   slows down the page processing.
  
   Here is the two ways i am outputting my recordset:
  
   1.-  from within the php code -
  
   table cellpadding=4 cellspacing=4 border=2
   ?php
  
for ($i = 1; $i = $nr; $i++){
  $row = mysql_fetch_assoc ($rs);
  
   print(tr);
print(td);
   print($row['projectId']);
   print(/tdtd);
   print('a
  
href=mylink.php?linkId='.$row['projectId'].''.$row['projectName'].'/a
   ');
   print(/tdtd);
   print($row['projectStatus']);
   print(/tr);
  
 } // End Loop rows
  
 ?
  
/table
  
  
   2. inline code with the html --
  
   table cellpadding=4 cellspacing=4 border=2
   ? for ($i = 1; $i = $nr; $i++): ?
   ? $row = mysql_fetch_assoc ($rs);?
tr
td?print($row['projectId']);?/td
tda
  
href=myfile?blah=?=$row['projectId']??print($row['projectName']);?
   /a/td
td?print($row['projectStatus']);?/td
/tr
 ? endfor; ?
/table
  
   Any thoughts from the experts? I love being able to mix html and php
tags,
   but am worried about efficiency.
  
   TIA,
  
   Quinn Merio
   Vir2lAlliance Inc.
   www.vir2lalliance.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]




[PHP] RE: Sending attachments via mail()

2001-05-16 Thread Daniel BI

Yep, it was *very* much discussed last time :)

first need to prepare your image to meet the base 64
and chunked standards:

$content = chunk_split ( base64_encode ( $your_image ) );

then you need something like this in the additional
header info of the php mail function:

$boundary = 'NEXT_PART';

$head = "Content-Type: multipart/mixed; boundary='$boundary'\n";
$head .= "Mime-Version: 1.0\n";

then in the message:

$message = "--$boundary\n";
$message .= "Content-Type: image/jpeg; name='my_image.jpg'\n";
$message .= "Content-Transfer-Encoding: base64\n";
$message .= "Content-Disposition: attachment\n\n";

$message = $content;

That's all! and it works! This way you can include html content too,
changing the content-type.

hope it helps.
Daniel BI


-- 
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: Processing time in PHP. better to use php tags inline or pri nt(html);

2001-05-16 Thread Ethan Schroeder

Sorry, I think that code got chopped off, try this:
?

 class  c_Timer  {
 var  $t_start  =  0;
 var  $t_stop  =  0;
 var  $t_elapsed  =  0;


 function  start()  {  $this-t_start  =  microtime();  }

 function  stop(){  $this-t_stop=  microtime();  }

 function  elapsed()  {
 if  ($this-t_elapsed)  {
 return  $this-t_elapsed;
 }  else  {
 $start_u  =  substr($this-t_start,0,10);
 $start_s  =  substr($this-t_start,11,10);
   $stop_u=  substr($this-t_stop,0,10);
 $stop_s=  substr($this-t_stop,11,10);
 $start_total  =  doubleval($start_u)  +  $start_s;
   $stop_total=  doubleval($stop_u)  +
$stop_s;

 $this-t_elapsed  =  $stop_total  -  $start_total;

 return  $this-t_elapsed;
 }
 }
 };

 /*  Here's  an  example  usage:

 $timer  =  new  c_Timer;

 $timer-start();
 echo  hr;
 $timer-stop();

 echo  $timer-elapsed();

 */
 ?

- Original Message -
From: Ethan Schroeder [EMAIL PROTECTED]
To: Merio, Quinn [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, May 16, 2001 12:57 PM
Subject: Re: [PHP] RE: Processing time in PHP. better to use php tags inline
or pri nt(html);


 The following code is not mine, so I take no credit for it.  It seems to
 work fine for me, though:
 ?

  class  c_Timer  {
  var  $t_start  =  0;
  var  $t_stop  =  0;
  var  $t_elapsed  =  0;


  function  start()  {  $this-t_start  =  microtime();  }

  function  stop(){  $this-t_stop=  microtime();  }

  function  elapsed()  {
  if  ($this-t_elapsed)  {
  return  $this-t_elapsed;
  }  else  {
  $start_u  =  substr($this-t_start,0,10);
  $start_s  =  substr($this-t_start,11,10);
$stop_u=  substr($this-t_stop,0,10);
  $stop_s=  substr($this-t_stop,11,10);
  $start_total  =  doubleval($start_u)  +
$start_s;
$stop_total=  doubleval($stop_u)  +
 $stop_s$

  $this-t_elapsed  =  $stop_total  -
$start_total;

  return  $this-t_elapsed;
  }
  }
  };

  /*  Here's  an  example  usage:

  $timer  =  new  c_Timer;

  $timer-start();
  echo  hr;
  $timer-stop();

  echo  $timer-elapsed();

  */
  ?


 - Original Message -
 From: Rasmus Lerdorf [EMAIL PROTECTED]
 To: Merio, Quinn [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Wednesday, May 16, 2001 9:47 AM
 Subject: Re: [PHP] RE: Processing time in PHP. better to use php tags
inline
 or pri nt(html);


  Why don't you just benchmark both?
 
  On Wed, 16 May 2001, Merio, Quinn wrote:
   Sorry to nag,  i hadnt recieved any responses on this post yet.. would
 like
   to re-request..  I wanted to know if there is drawbacks or benefits to
 using
   the php alternate syntax?
  
1.) Is it possible (and if so, how do i) get the time it took to
 process
the page (seconds or milliseconds)?
   
2.) This is where the first q arose from:  I am trying to ascertain
 which
is faster, outputting a query using the print function or using the
alternate syntax.  I know that in ASP, jumping in and out of the asp
 code
slows down the page processing.
   
Here is the two ways i am outputting my recordset:
   
1.-  from within the php code -
   
table cellpadding=4 cellspacing=4 border=2
?php
   
 for ($i = 1; $i = $nr; $i++){
   $row = mysql_fetch_assoc ($rs);
   
print(tr);
 print(td);
print($row['projectId']);
print(/tdtd);
print('a
   
 href=mylink.php?linkId='.$row['projectId'].''.$row['projectName'].'/a
');
print(/tdtd);
print($row['projectStatus']);
print(/tr);
   
  } // End Loop rows
   
  ?
   
 /table
   
   
2. inline code with the html --
   
table cellpadding=4 cellspacing=4 border=2
? for ($i = 1; $i = $nr; $i++): ?
? $row = mysql_fetch_assoc ($rs);?
 tr
 td?print($row['projectId']);?/td
 tda
   
 href=myfile?blah=?=$row['projectId']??print($row['projectName']);?
/a/td
 td?print($row['projectStatus']);?/td
 /tr
  ? endfor; ?
 /table
   
Any thoughts from the experts? I love being able to mix html and php
 tags,
but am worried about efficiency.
   
TIA,
   
Quinn Merio
Vir2lAlliance Inc.
www.vir2lalliance.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 

RE: [PHP] EREGI -- Help

2001-05-16 Thread Johnson, Kirk

Give this a try:

if(!ereg(^([0-9]{5}([-]{1}[0-9]{4})?)$,$data)) {

Kirk

 -Original Message-
 From: Jason Caldwell [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 15, 2001 8:16 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] EREGI -- Help
 
 
 I'm just trying to create a eregi expression that will evaluate a zip
 code... and I cannot get it to work... can anyone assist me 
 with this?  --
 also, is there a site that shows regular expression examples 
 for checking
 fields like, zip codes, phone numbers, etc...
 
 if(!(eregi((^[0-9]{5})(\\-([0-9]{4}$))?, $data)))
  $err[] = $desc .  - Invalid Zip Code  . $req;
 
 Thanks
 Jason

-- 
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: Processing time in PHP. better to use php tags inline or pri nt(html);

2001-05-16 Thread Merio, Quinn


Thank you for your help, gentlemen, sorry about the re-post.

In case you were wondering about the results on that, the pages both
processed at almost identical times:

0.0023289918899536 - 1st hit
0.0022320411682129  - refresh 2
0.0017479658126831 -refresh 3

Cheers,
q.

Quinn Merio
www.vir2lalliance.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] Continue Script after readfile()

2001-05-16 Thread Joseph Koenig

OK, I think I failed to see what was realling happening. The script is
continuing after the readfile(), however, I want the page to reload
after the file is done. The link that lets the user download the file is
really a link to $PHP_SELF with some variables set. Everything in the
script will continue to run, but the page will not reload. I also tried
sending a header(Location: ...) and that didn't work. Is this
possible? Thanks,

Joe

Rasmus Lerdorf wrote:
 
  is it possible for a script to continue running after calling
  readfile()? I have a function that uses readfile(), after the file has
  been read, I need to update a database. Any reason my script would just
  stop executing? At first I thouht it may be a time limit, issue, but I
  set time limit to 0 and it still doesn't work. Any ideas? Thanks,
 
 There is no reason your script should be terminating after a readfile()
 call.
 
 -Rasmus
 
 --
 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] PrimalScript Users

2001-05-16 Thread Phillip Bow

For anyone using PrimalScript as their IDE I have put together an updated
php.sense file with mostly all(theoretically) the PHP functions available as
of PHP 4.04pl1(the sense files are what allow the autocompletion of
functions, and shows the param list).  I have seen a lot of complaints about
problems in 4.05 so I haven't installed it, but if I can get some feedback
on whether or not its a good upgrade then I can release a new php.sense with
any updates that have been made.

I will get around to adding the GTK functions I think in the next week or
so.  If you find any missing functions, or sets of functions please let me
know.

You can get the file at http://phpini.com/sense/ (or
http://phpini.com/sense/php.sense if you don't wanna read my comments :)
--
phill




-- 
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] zlib or gzip compression?

2001-05-16 Thread Jakob Kruse

As I understood it: performance.

zlib.output_compression should be a lot more effective than using
output_handlers. I don't really have a basis for comparing them, but I have
been using zlib.output_compression since the day 4.0.5 was released and it
works beautifully and very, very fast.

Regards,
Jakob Kruse

Alex Dupre [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 What are the differences between output_handler = ob_gzhandler and
 zlib.output_compression = On ?

 Alex Dupre




-- 
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] Uptime script?

2001-05-16 Thread Christian Reiniger

On Wednesday 16 May 2001 15:16, Matthew Schroebel wrote:
 Why would you want to advertise that?  Seems like you would be leaking
 information to crackers ...

It's very difficult to imagine how 'uptime' information could be used to 
cause mischief...

chris@server:~$ uptime
  8:55pm  up 45 days, 13:42,  1 user,  load average: 0.07, 0.03, 0.00

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

...1000100011010101101010110100111010113...

--
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] Passing vars between functions (with POSTs)

2001-05-16 Thread Rasmus Lerdorf

 I've tried other ways but my problem still continues... I can not pass
 $login var out of the function.

 I don't have this problem in the two previous functions because I pass this
 variable as function argument, but this last function that doesn't have
 arguments I can't see the $login (even if is setup on the previous function
 as global). I don't know why I PHP doesn't allow to setup a $login as global
 to all functions (this will solve this problem).

It does.  You simply have to declare in the function you wish to access
the global variable that you want the global variable by using the global
keyword in that function.

Please read the Variables Scope chapter in the manual:

http://php.net/manual/en/language.variables.scope.php

-Rasmus


-- 
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 as CGI

2001-05-16 Thread Beech Rintoul

Hi,

I'm new to pgp and I'm trying to configure it as an Apache cgi. What do I 
need to put into the httpd.conf to enable it? I tried the example from the 
manual, but it doesn't work. Also will php3 scripts work in php4?
I'm using php4 and apache-1.3.19 with mysql.
Any assistance would be appreciated.

Beech
-- 
---
 Beech Rintoul - IT Manager - Instructor - [EMAIL PROTECTED]
/\   ASCII Ribbon Campaign  | Anchorage Gospel Rescue Mission
\ / - NO HTML/RTF in e-mail  | P.O. Box 230510
 X  - NO Word docs in e-mail | Anchorage, AK 99523-0510
/ \ -












-- 
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] Uptime script?

2001-05-16 Thread Ryan Christensen

That's what I was wondering.. hehe.. I just want to be able to show users
that the server is stable.. (this is for a server-status page.. shows
general information.. only for members of the site anyways.)

Ryan

  -Original Message-
  From: Christian Reiniger [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 16, 2001 11:19 AM
  To: Matthew Schroebel; [EMAIL PROTECTED]
  Subject: Re: [PHP] Uptime script?
 
 
  On Wednesday 16 May 2001 15:16, Matthew Schroebel wrote:
   Why would you want to advertise that?  Seems like you would be leaking
   information to crackers ...
 
  It's very difficult to imagine how 'uptime' information could be used to
  cause mischief...
 
  chris@server:~$ uptime
8:55pm  up 45 days, 13:42,  1 user,  load average: 0.07, 0.03, 0.00
 
  --
  Christian Reiniger
  LGDC Webmaster (http://sunsite.dk/lgdc/)
 
  ...1000100011010101101010110100111010113...
 
  --
  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] php as CGI

2001-05-16 Thread scott [gts]

you need to:

./configure [whatever options]
make
make test
make install (as root)

then you need to edit Apache httpd.conf
appropriately and restart the daemon.

then, it should work

 -Original Message-
 From: Beech Rintoul [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 16, 2001 2:33 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] php as CGI
 
 
 Hi,
 
 I'm new to pgp and I'm trying to configure it as an Apache cgi. What do I 
 need to put into the httpd.conf to enable it? I tried the example from the 
 manual, but it doesn't work. Also will php3 scripts work in php4?
 I'm using php4 and apache-1.3.19 with mysql.
 Any assistance would be appreciated.
 
 Beech
 -- 
 ---
  Beech Rintoul - IT Manager - Instructor - [EMAIL PROTECTED]
 /\   ASCII Ribbon Campaign  | Anchorage Gospel Rescue Mission
 \ / - NO HTML/RTF in e-mail  | P.O. Box 230510
  X  - NO Word docs in e-mail | Anchorage, AK 99523-0510
 / \ -
 
 
 
 
 
 
 
 
 
 
 
 
 -- 
 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] still not friends with RegExps..

2001-05-16 Thread scott [gts]

yes... i agree.

if you know pregs, you have the added benefit of
knowing how to write regexps for PHP *and* perl
(should you ever have to program in perl)

i personally prefer pregs becuase i think that the
syntax is cleaner and more concise...

 -Original Message-
 From: Christian Reiniger [mailto:[EMAIL PROTECTED]]
 Subject: Re: [PHP] still not friends with RegExps..
 
 
 On Tuesday 15 May 2001 22:35, Gyozo Papp wrote:
  I mean that it seems to me most of the mailers use preg funtions
  instead of simple ereg functions. Up to now I used only the latter
  ones.
 
 Well, actually preg is more simple IMHO :)
 Anyway - preg are the Perl-style regexps, so any perl regular expression 
 documentation should be fine. Also the preg expression syntax page in 
 the manual is very good.

-- 
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] Passing vars between functions (with POSTs)

2001-05-16 Thread Miguel Ribeiro

Thanks for your reply but for example, my problem is more like the following
php3:

?
$login='';

Function login() {
 global $login;
 echo('form enctype=multipart/form-data method=post
action=test.php3?s=1');
 echo(' pLogin/pinput type=text name=login size=10');
 echo('input type=submit value=Submit name=B1');
 echo('/form');
}

function vrf_passwd($f1) {
 printf(Login=%s,$f1);
}

switch($s) {
 case 1:  vrf_passwd($login);
   break;
 default: login();
   break;
}
?





Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I've tried other ways but my problem still continues... I can not pass
  $login var out of the function.
 
  I don't have this problem in the two previous functions because I pass
this
  variable as function argument, but this last function that doesn't have
  arguments I can't see the $login (even if is setup on the previous
function
  as global). I don't know why I PHP doesn't allow to setup a $login as
global
  to all functions (this will solve this problem).

 It does.  You simply have to declare in the function you wish to access
 the global variable that you want the global variable by using the global
 keyword in that function.

 Please read the Variables Scope chapter in the manual:

 http://php.net/manual/en/language.variables.scope.php

 -Rasmus


 --
 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] Permission Problems

2001-05-16 Thread John Vanderzwet

One of my scripts must create a directory, then a file in it.  This part
works great, although when another script tries to delete the file (and
directory afterwards) it doesn't work because of the permissions.  The user
on the created file is 'httpd', from apache.  The owner of the script is
called 'zeus'.  How can I create this file under the owner of 'zeus' so that
they can be deleted?  Right now they're sitting on my web server and I don't
have permission to delete them.. and after 6 tests the directory is getting
kinda nasty. :P

I was thinking of using chown right after creating the file to set the
owner, however the documentation on php.net says that this can only be used
when executed by a superuser user.  Any ideas or suggestions?



-- 
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] Free Database Design Program

2001-05-16 Thread Chris Worth

That's a good plan.

promote THEFT.

maybe somebody will think if they crack your front door they then realize all the 
stuff in 
your house is free?





On Sun, 13 May 2001 17:18:45 -0300 (EST), Augusto Cesar Castoldi wrote:

The software can be really a freeware (better) or...

can be cracked..., than he becomes free.

regards,

Augusto Cesar Castoldi

On Fri, 11 May 2001, Anuradha Ratnaweera wrote:

 
 On Sat, 5 May 2001, Augusto Cesar Castoldi wrote:
 
  Anyone know a Free database Design program? I'm needing to organize my
  MySQL databases and design new databases.
 
 In what sence do you mean Free? Just curious;
 
 Anuradha
 
 
 --
 a href=http://www.bee.lk/people/anuradha/;home page/a
 
 
 -- 
 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 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] deleting a file

2001-05-16 Thread Joseph Bannon

What is the file function to remove/delete a file from a server?

Joseph


Say I'm Hot! - Post Your Picture!
http://www.sayimhot.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] deleting a file

2001-05-16 Thread Johnson, Kirk

http://www.php.net/manual/en/function.unlink.php

Kirk

 -Original Message-
 From: Joseph Bannon [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 16, 2001 1:53 PM
 To: PHP (E-mail)
 Subject: [PHP] deleting a file
 
 
 What is the file function to remove/delete a file from a server?
 
 Joseph

-- 
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] [annoucement] Smarty template engine 1.4.1 available

2001-05-16 Thread Monte Ohrt

A minor bug fix release.

http://www.phpinsider.com/php/code/Smarty/

Version 1.4.1
-
- fix LOCK_EX logic for all windows platforms (Monte)
- fixed indexing by section properties with the new syntax. (Andrei)
- updated Smarty to use absolute paths when requiring/including
Smarty
  components. (Andrei, John Lim)




Monte

-- 
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] Uptime script?

2001-05-16 Thread Ben Gollmer

Uptime.exe is available on the WinNT / Win2k resource kit. You can also 
download it here:

http://www.microsoft.com/ntserver/nts/downloads/management/uptime/default.
asp

On NT, you need at least Service Pack 4 to run it.


Ben


On Wednesday, May 16, 2001, at 01:55 PM, Ryan Christensen wrote:

 That's what I was wondering.. hehe.. I just want to be able to show 
 users
 that the server is stable.. (this is for a server-status page.. shows
 general information.. only for members of the site anyways.)

 Ryan

 -Original Message-
 From: Christian Reiniger [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 16, 2001 11:19 AM
 To: Matthew Schroebel; [EMAIL PROTECTED]
 Subject: Re: [PHP] Uptime script?


 On Wednesday 16 May 2001 15:16, Matthew Schroebel wrote:
 Why would you want to advertise that?  Seems like you would be leaking
 information to crackers ...

 It's very difficult to imagine how 'uptime' information could be used 
 to
 cause mischief...

 chris@server:~$ uptime
   8:55pm  up 45 days, 13:42,  1 user,  load average: 0.07, 0.03, 0.00

 --
 Christian Reiniger
 LGDC Webmaster (http://sunsite.dk/lgdc/)

 ...1000100011010101101010110100111010113...

 --
 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: php-list-
 [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] References Object XML-Parser

2001-05-16 Thread Peter Dudley

I am new to PHP's OO (though not to OO or to PHP), but here's a fix and my
assessment of why it works:

In your tag functions, you need to change the $this reference to instead
refer to your $xml_parser object, thus:

function tag_open($parser,$tag,$attributes) {
global $xml_parser;
$xml_parser-result .= TAG: .$tag.br;
}

My speculation as to why this happens is that the actual parsing is going on
in the parser object you create in the xml() function.  The tag_open
function is being called not as a method in your xml class but rather as a
simple callback function, so it does not get all the context of the xml
object... instead, it has the context of the parser object.  So if you bring
the $xml_parser variable in as a global and then use it to set your result
variable, you should see the results you're looking for (I did).

Pete.


Mirek Novak [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 I'm new to this list, and was forced to join because of following
 problem, BTW searching through the archive ended without any useable
 results. The problem is in following code - which is little extended
 source from example in manual entry for xml_set_object() function. I've
 added one member variable called result and there I'm storing everything
 what is parsed through parser - I want to have control over what is
 parsed - then, when I wanted to show the result - variable was empty,
 but when u'll  uncomments line in tag_open() function, will see
 interesting results - var. is being updated.
 Where is mistake?

 Mirek Novak

 -  PHP code follows
 
 ?
 class xml {
 var $parser;
 var $result;

 function xml() {
 $this-parser = xml_parser_create();
 $this-result=bruresult/ubr;
 xml_set_object($this-parser,$this);
 xml_set_element_handler($this-parser,tag_open,tag_close);
 xml_set_character_data_handler($this-parser,cdata);
 }

 function parse($data) {
 xml_parse($this-parser,$data);
 }
 function tag_open($parser,$tag,$attributes) {
 var_dump($parser,$tag,$attributes);
 $this-result.=TAG: .$tag.br;

 // if u uncomment line below, U'll see, that $this-result really
 contains what it shoud
 // echo $this-result;
 }

 function cdata($parser,$cdata) {
 var_dump($parser,$cdata);
 $this-result.=DATA: .$cdata.br;
 }

 function tag_close($parser,$tag) {
 var_dump($parser,$tag);
 }

 }


 $xml_parser = new xml();
 $xml_parser-parse(A ID=\hallo\PHP/A);
 echo $xml_parser-result;

 ?




-- 
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-directing

2001-05-16 Thread B. van Ouwerkerk



If you're hosting on a apache box you could have something like

DirectoryIndex start.php

Forgot to mention: You can add this to .htaccess

Bye,


B.


-- 
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] \nhelp

2001-05-16 Thread jtjohnston

Hi,

I am parsing the contents of a text file.

I have certain lines that start with 4; I would like to attach these
lines to the previous line as follows. But I don't know how. I figure I
have to search and replace for \n4; but ... ?

BEFORE:
Here is an example of before.
4; here is the second line.

AFTER:
Here is an example of after. 4; here is the second line.

Thanks,
John
(An email post  reply would be helpful. :)


-- 
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   >