Re: [PHP] mailing to 19000 users

2002-01-27 Thread Ben-Nes Michael

use mailman :)
http://www.gnu.org/software/mailman/mailman.html

every problem has a different solution
--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--

- Original Message - 
From: "Mostafa Al-Mallawani" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 28, 2002 8:23 AM
Subject: [PHP] mailing to 19000 users


> hi, does anyone know how to send mail to 19000 users using the mail()
> function, I need to create a mailing list of this number of users and
> looping on 19000 users takes up a heck of a lot of resources...any
> solutions? 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] installing php3 and php4 on the same server

2002-01-27 Thread Warren Vail

I have a follow-on question to this one.

I do implementations for clients in PHP and do my development and testing
under windows (OK, I know), and the systems are targeted for servers that
have PHP3 and others with PHP4.  I would think that I could direct files
with suffix php3 to use the php3 engine, and php to the php4 engine, but I
can't seem to get this to work.  Granted PHP4 will handle php3 code (as near
as I can tell), but I expect I will inject some php4 dependencies into the
code destined for a PHP3 server.  The clients using php3 don't control the
server so they can't their ISP to upgrade for them.  Moving them to a site
that will work with them is not the question here.  The question here is how
can PHP4 and PHP3 co exist, and where can I get information on how to set
that up on windows system.  I am running php4 successfully with apache and
mysql, trying to activate the php3 version, regardless of changes I have
made to httpd.conf, my php3 scripts invoke php4.

Thanks,

Warren Vail


-Original Message-
From:   Manu Verhaegen [mailto:[EMAIL PROTECTED]]
Sent:   Friday, January 18, 2002 12:59 AM
To: Alex Dowgailenko
Cc: [EMAIL PROTECTED]
Subject:Re: [PHP] installing php3 and php4 on the same server

We have the following problem, we have now apache 3 and php 3 ,we have
upgrade the apache and the php3 tot php4 evereting will working fine. 2
internetproviders in belgium will working with proxyservers if you want to
view a webpage on the lastversion of apache an php4 the page will not
correct viewed



Greetings,

- Original Message -
From: "Alex Dowgailenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 18, 2002 8:44 AM
Subject: RE: [PHP] installing php3 and php4 on the same server


>
> Question is, why would you want to?
>
> php3 scripts will work fine under php4.
> > -Original Message-
> > From: Manu Verhaegen [mailto:[EMAIL PROTECTED]]
> > Sent: January 18, 2002 2:39 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] installing php3 and php4 on the same server
> >
> >
> > Hi,
> > We have installed apache 3 and PHP3, can we install PHP4 on the
> > same server
> > the we can use PHP3 and PHP4
> >
> > Thanks,
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


--
PHP General Mailing List (http://www.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] mailing to 19000 users

2002-01-27 Thread Jason Wong

On Monday 28 January 2002 15:09, Manuel Lemos wrote:
> Hello,
>
> Mostafa Al-Mallawani wrote:
> > do you mean a mail server?
>
> No, he means a program that maintains a list of subscribers and is able
> to deliver efficiently invidividual messages to all of them at once.
>
> I don't know any good mailing list programs for Windows, but if you can
> use a Unix/Linux machine you may want to use qmail/ezmlm combination, it
> is used by Yahoo eGroups because it is very good for highly scalable
> mailing list servers.
>
> http://www.ezmlm.org/
> http://www.qmail.org/


There should be a bunch of mailing list type programs at www.davecentral.com.


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Scrubbing floors and emptying bedpans has as much dignity as the Presidency.
-- Richard Nixon
*/

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




Re: [PHP] Session updates ok first time only.

2002-01-27 Thread Jason Wong

On Monday 28 January 2002 14:27, you wrote:

Please keep discussion on the list!

> >>
> >> //pull value from session file:
> >> $page_views = $_SESSION['page_views'];
> >
> >No need for this, in fact this is what is preventing it from working! Once
> >you've used session_register('var'), $var is available for use.
>
> Still ng..  I've eliminated the line on each and both pages in turn
> but still no improvement.  The count is going from 0 to 1 on the first
> invoke, then from 1 to 3 after passed to the second page.  From there
> on it falls apart, repeating 1 to 2 or 1 to 3 depending on the page.
> The session file never sees a higher value once the initial 1 is
> input.  It just keeps starting over from that same point.
>
> >> print "Return Page";
> >> print "Before increment = $page_views";
> >>
> >> //increment the counter:
> >> $page_views++;
> >> $page_views++;
> >
> >You're inc'ing $page_views twice, this is what makes you *think* the
> > session is working when in fact it isn't!
> >
> >hth
>
> The double increment was to give me a different count for the second
> page just to tell where I was at any time.   I see the count go
> 1-2-1-3-1-2-1-3-1-2 etc., as it passes back and forth.

Ahh, but I thought that was what the "Send Page" and "Return Page" was for :)

> But it's still not climbing.

1) You could try reloading (F5 if using IE) the "Send Page", if sessions were 
working you should see the counter counting.

2) session.save_path = c:/tmp, I don't use PHP on Windows, but looking at the 
other settings, paths for Windows systems are specified with a backslash. Try

  session.save_path = c:\tmp


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Preserve wildlife -- pickle a squirrel today!
*/

-- 
PHP General Mailing List (http://www.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] mailing to 19000 users

2002-01-27 Thread John Meyer

How about croning the job and splitting up the load as you go.
- Original Message - 
From: "Mostafa Al-Mallawani" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, January 27, 2002 11:23 PM
Subject: [PHP] mailing to 19000 users


> hi, does anyone know how to send mail to 19000 users using the mail()
> function, I need to create a mailing list of this number of users and
> looping on 19000 users takes up a heck of a lot of resources...any
> solutions? 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] mailing to 19000 users

2002-01-27 Thread Manuel Lemos

Hello,

Mostafa Al-Mallawani wrote:
> 
> do you mean a mail server?

No, he means a program that maintains a list of subscribers and is able
to deliver efficiently invidividual messages to all of them at once.

I don't know any good mailing list programs for Windows, but if you can
use a Unix/Linux machine you may want to use qmail/ezmlm combination, it
is used by Yahoo eGroups because it is very good for highly scalable
mailing list servers.

http://www.ezmlm.org/
http://www.qmail.org/


> would the mail server of IIS handle this?

I am afraid not. Not because of IIS but because under Windows with PHP
you would have to relay on a SMTP server and SMTP is not very good for
handling messages with a large number of recipients. Injecting directly
the messages in the local mail queue with programs like sendmail and
qmail is much faster, but I'm afraid those programs are only available
for Unix/Linux like systems.

Regards,
Manuel Lemos


> "Jason Wong" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> > On Monday 28 January 2002 14:23, Mostafa Al-Mallawani wrote:
> > > hi, does anyone know how to send mail to 19000 users using the mail()
> > > function, I need to create a mailing list of this number of users and
> > > looping on 19000 users takes up a heck of a lot of resources...any
> > > solutions? thanks.
> >
> > You're probably better off using a "real" mailing list system :)
> >
> >
> > --
> > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> >
> > /*
> > Kramer's Law:
> > You can never tell which way the train went by looking at the tracks.
> > */

-- 
PHP General Mailing List (http://www.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] mailing to 19000 users

2002-01-27 Thread Mostafa Al-Mallawani

do you mean a mail server?
would the mail server of IIS handle this?
"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Monday 28 January 2002 14:23, Mostafa Al-Mallawani wrote:
> > hi, does anyone know how to send mail to 19000 users using the mail()
> > function, I need to create a mailing list of this number of users and
> > looping on 19000 users takes up a heck of a lot of resources...any
> > solutions? thanks.
>
> You're probably better off using a "real" mailing list system :)
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
>
> /*
> Kramer's Law:
> You can never tell which way the train went by looking at the tracks.
> */



-- 
PHP General Mailing List (http://www.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] Got a problem I cant figure out

2002-01-27 Thread Alex Vargas

That error is always a missing } somewhere...

:)

Alex.

- Original Message -
From: "Ben Turner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 28, 2002 5:55 AM
Subject: [PHP] Got a problem I cant figure out


Parse error: parse error in /var/www/docs/tacklebox/404handler.php on line
47

I am receiving this error on my page but the problem is that line 47 is the
?> and last line of the page.  Is their something Im missing here??

Thanks,
Ben



-- 
PHP General Mailing List (http://www.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] mailing to 19000 users

2002-01-27 Thread Jason Wong

On Monday 28 January 2002 14:23, Mostafa Al-Mallawani wrote:
> hi, does anyone know how to send mail to 19000 users using the mail()
> function, I need to create a mailing list of this number of users and
> looping on 19000 users takes up a heck of a lot of resources...any
> solutions? thanks.

You're probably better off using a "real" mailing list system :)


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Kramer's Law:
You can never tell which way the train went by looking at the tracks.
*/

-- 
PHP General Mailing List (http://www.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] mailing to 19000 users

2002-01-27 Thread Mostafa Al-Mallawani

hi, does anyone know how to send mail to 19000 users using the mail()
function, I need to create a mailing list of this number of users and
looping on 19000 users takes up a heck of a lot of resources...any
solutions? thanks.
 



Re: [PHP] Problem in mysql connection

2002-01-27 Thread Rio Uniwaly

first, u have to install  the mysql. :-)
and u have to know your mysql password...
maybe you can try this...

$connection=mysql_query("localhost","root","");
if ($connection) {
   echo "Connection to mysql Good";
   } else {
   echo "Connection to mysql Failed";
}

hope this can help u.. 

Rio Uniwaly
www.prio.mysite.de 

- Original Message - 
From: Uma Shankari T. <[EMAIL PROTECTED]> wrote:
> Hello,

> I have installed php4 rpm in my machine.while connecting php with
> mysql it is giving fatal error.I have given like this
> 
> mysql_connect("$servername","$username","$password");
> 
> Why it is so ..
> 
> Is there any other files i have to install to access the database??

> Regards,
> Uma



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




[PHP] Re: getmxrr() is not supported

2002-01-27 Thread Yasuo Ohgaki

Philip J. Newman wrote:
> I'm running PHP Version 4.0.5
> Php Says this:
> 
> Warning: getmxrr() is not supported in this PHP build in d:\website\myphp\test1.php 
>on line 5
> 
> The documents say:
> 
> (PHP 3, PHP 4 >= 4.0.0)
> 
> I'm condused.
> 

Some functions are missing in Windows version :)

-- 
Yasuo Ohgaki


-- 
PHP General Mailing List (http://www.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] getmxrr() is not supported

2002-01-27 Thread Philip J. Newman

I'm running PHP Version 4.0.5
Php Says this:

Warning: getmxrr() is not supported in this PHP build in d:\website\myphp\test1.php on 
line 5

The documents say:

(PHP 3, PHP 4 >= 4.0.0)

I'm condused.

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012



Re: [PHP] Got a problem I cant figure out

2002-01-27 Thread Richard Crawford

Very likely a missing closing brace somewhere in your program.  Look for
unpaired {'s or ('s or ['s.


On Sun, 2002-01-27 at 20:55, Ben Turner wrote:
> Parse error: parse error in /var/www/docs/tacklebox/404handler.php on line 47
> 
> I am receiving this error on my page but the problem is that line 47 is the ?> and 
>last line of the page.  Is their something Im missing here??  
> 
> Thanks,
> Ben
-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED]  http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

"It is only with the heart that we see rightly; what is essential is
invisible to the eye."  --Antoine de Saint Exupery

"Push the button, Max!"



-- 
PHP General Mailing List (http://www.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] Got a problem I cant figure out

2002-01-27 Thread Ben Turner

Parse error: parse error in /var/www/docs/tacklebox/404handler.php on line 47

I am receiving this error on my page but the problem is that line 47 is the ?> and 
last line of the page.  Is their something Im missing here??  

Thanks,
Ben



php-general Digest 28 Jan 2002 03:40:38 -0000 Issue 1137

2002-01-27 Thread php-general-digest-help


php-general Digest 28 Jan 2002 03:40:38 - Issue 1137

Topics (messages 82288 through 82353):

Re: HOT!!! PHP4.1.x - Step by Step Installation manual
82288 by: Olexandr Vynnychenko

ereg(i) for form input validation for SQL - tutorial?
82289 by: Simon H

Re: Memory usage with Apache
82290 by: Paul A. Procacci

Re: Write to file?
82291 by: Paul A. Procacci

binary file + fread
82292 by: Michael Agbaglo
82294 by: Paul A. Procacci
82296 by: Michael Agbaglo

fread + binary file
82293 by: Michael Agbaglo

Re: PHP in the University and Corporation [was RE: [PHP ] Computer Science and PHP]
82295 by: Chris Lott

Porting from Linux to Windows!?$#
82297 by: Andre Amaral
82298 by: Sterling Hughes
82299 by: Andre Amaral
82311 by: Michael Sims

Re: CGI vs. ISAPI
82300 by: Michael Kimsal

a quick question..
82301 by: Tauntz
82303 by: Miles Thompson
82304 by: Edward van Bilderbeek - Bean IT
82305 by: Nick Wilson
82307 by: Miles Thompson
82308 by: Tauntz
82309 by: Paul A. Procacci
82310 by: Nick Wilson

undefined symbol: uncompress
82302 by: David Jackson
82306 by: Miles Thompson
82312 by: Michael Sims
82313 by: David Jackson
82317 by: Michael Sims
82325 by: David Jackson
82331 by: Miles Thompson

Re: set_time_limit() in a loop
82314 by: Matthew Delmarter

Only one value.
82315 by: Philip J. Newman
82318 by: Michael Kimsal
82319 by: Mark Charette
82320 by: Michael Kimsal

Session updates ok first time only.
82316 by: Floyd Baker
82353 by: Jason Wong

Substitute for getenv() when using ISAPI ??
82321 by: Christian Blichmann

Upload file to system
82322 by: Duky Yuen
82330 by: sundogcurt
82333 by: Duky Yuen
82348 by: sundogcurt

phplib
82323 by: Kunal Jhunjhunwala
82326 by: Nick Wilson
82327 by: Kunal Jhunjhunwala

Trying to remove bad charactors.
82324 by: Philip J. Newman
82352 by: Jason Wong

MySQL-PHP-RAQ4 dilemma!
82328 by: Greg Conway
82329 by: Michael Kimsal

File uploading like hotmail
82332 by: Duky Yuen

PHP and MYSQL Security`
82334 by: Duky Yuen
82338 by: Fred
82345 by: Brian Clark
82347 by: Alan McFarlane

Ouch that hurts
82335 by: Philip J. Newman
82339 by: Jeff Sheltren

Back button to Query Pages
82336 by: phantom

Re: [PHP-DB] [PHP] PHP and MYSQL Security`
82337 by: Miles Thompson
82343 by: Gurhan Ozen

[PHP-DB] Re: [PHP] PHP and MYSQL Security`
82340 by: Paul DuBois

PHP SITE ERROR
82341 by: Philip J. Newman

One error after another.
82342 by: Philip J. Newman
82344 by: Jeff Sheltren

install error (NS + PHP + UNIX) !
82346 by: Sang-Kyu Ahn

Server Communication.
82349 by: Philip J. Newman
82351 by: Jason Wong

Is it possible to bypass max time limit?
82350 by: Alan McFarlane

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

--- Begin Message ---

Hello Andre,

Friday, January 25, 2002, 3:16:38 AM, you wrote:

AA> Hi all. Here is my first attempt to make easy Step by Step installation
AA> manual for PHP4.1.x on Windows 2000 based systems running IIS5 using CGI or
AA> ISAPI. Here is the link that will ake a lot of people happy. :)
AA> http://www.experttek.com/php/installation.txt

AA> Fell free to contact me. Contacts are in the manual.

HTTP 404 - File not found

-- 
Best regards,
 Olexandrmailto:[EMAIL PROTECTED]



--- End Message ---
--- Begin Message ---

Does anyone know of a good tutorial for using ereg and eregi to validate
standard fields for SQL input (i'm using PearDB).  Typically the type of
validation that I think I need would be, firstly to detect invalid
characters, or special characters, or things that can screw up the SQL
Query.  Others would be the alpha only, string lengths, email address, dates
and times, phone numbers.

These are standard items in a lot of systems...surely there's a tutorial out
there somewhere, or a sample script or something.  I've only just discovered
regex, so its all a bit h at the moment.

Any links for tutorials or sample scripts would be much appreciated.

Thanks

Simon H


--- End Message ---
--- Begin Message ---

How are you executing top?  Sounds like you need to use the -d option for
top.  Example:

$exec - exec("top -d1");

This way, top won't, run and run and run, and run, and run, etc, etc, etc.

Try that

Paul

"Thomas E. Ruth" wrote:

> Hello,
>
> I'm using PHP 4.0.4pl1 wi

Re: [PHP] Session updates ok first time only.

2002-01-27 Thread Jason Wong

On Monday 28 January 2002 04:37, Floyd Baker wrote:
> Can someone tell me why this is not working right?  Two pages are
> basically the same, passing an accumulating value back and forth.
> There is no other session being created.  The first time it increments
> and passes to the second page, and is picked up.  It puts a 1 in the
> session file.  After that, it seems to try, as in editor wanting to
> reload, but the contents don't increase beyond 1.
>
> I have 4.1, register globals off, on Windows 98.
>
> TIA




> //pull value from session file:
> $page_views = $_SESSION['page_views'];

No need for this, in fact this is what is preventing it from working! Once 
you've used session_register('var'), $var is available for use.



> print "Return Page";
> print "Before increment = $page_views";
>
> //increment the counter:
> $page_views++;
> $page_views++;

You're inc'ing $page_views twice, this is what makes you *think* the session 
is working when in fact it isn't!

hth
-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
On the road, ZIPPY is a pinhead without a purpose, but never without a POINT.
*/

-- 
PHP General Mailing List (http://www.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] Trying to remove bad charactors.

2002-01-27 Thread Jason Wong

On Monday 28 January 2002 06:24, Philip J. Newman wrote:
> I'm trying to replace !@#$%^&*() with nothing how ever every thing that I
> try it takes out the space too which is bad. Siggestions
>
> $q=preg replace("!","",$q);


Use str_replace(). Only use preg() and friends *IF* you need to search for 
regular expressions.


  $q = str_replace(array('!', '@', '#'), '', $q);


Also, please do not cross-post.


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Slow day.  Practice crawling.
*/

-- 
PHP General Mailing List (http://www.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] Server Communication.

2002-01-27 Thread Jason Wong

On Monday 28 January 2002 10:42, Philip J. Newman wrote:
> I'm trying to get the following ingotmation from my server.
>
> The Actual ip# that the user has connected to the server with;

$_SERVER['HTTP_X_FORWARDED_FOR']


> The Prioxy ip# that the user has connected to the server with;

$_SERVER['REMOTE_ADDR']


*NB* if user didn't connect through proxy (or NAT) then 
$_SERVER['HTTP_X_FORWARDED_FOR'] would be empty and Actual ip# would be 
$_SERVER['REMOTE_ADDR']



> The DNS name that the user has connected to the server with;

use gethostbyaddr()


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
You mean you don't want to watch WRESTLING from ATLANTA?
*/

-- 
PHP General Mailing List (http://www.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] Is it possible to bypass max time limit?

2002-01-27 Thread Alan McFarlane

I've got a live script which occasional has to retrieve a file via ftp,
download to the server, post-process it then display it.

I use caching to check to see if I've already got the file, but if I don't I
have to process the ftp_get operation which occasionally times out.

So, is it possible to trap the time limit exceeded error and return a fail
code?

For example:

function GetFileViaFTP( $filename )
{
if (file_exists("cache/" . $filename))
{
return true;
}

$ftp = ftp_connect("some host");
ftp_login($ftp, "some username", "some password");
ftp_chdir($ftp, "some path");

if (ftp_get($ftp, "cache/" . $filename, $filename, FTP_BINARY))  // This
will sometimes fail
{
ftp_quit($ftp);

return true;
}

ftp_quit($ftp);

return false;
}

function GetFile( $filename )
{
if (file_exists("cache/" . $filename) || GetFileViaFTP($cache))
{
return file("cache/" . $filename);
}

return "Sorry, the file {$filename} could not be located";
}




-- 
PHP General Mailing List (http://www.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] Server Communication.

2002-01-27 Thread Philip J. Newman

I'm trying to get the following ingotmation from my server.

The Actual ip# that the user has connected to the server with;
The Prioxy ip# that the user has connected to the server with;
The DNS name that the user has connected to the server with;

Is this possable with PHP?

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012



Re: [PHP]Upload file to system

2002-01-27 Thread sundogcurt

You could try contacting your server admin and seeing if he / she will 
increase the limit...

That would be where I would start.
If  that doesn't work, my hosting fees are quite reasonable  ahah



[EMAIL PROTECTED] wrote:

>Thnx. it's working now. But.. Howcome I can only upload files no bigger
>then 100 kb? I have changed the MAX_FILE_SIZE to 10. Also, I can't
>change the php.ini, coz the webserver isn't mine.. what to do now??
>
>Sundogcurt wrote:
>
>>http://www.php.net/manual/en/features.file-upload.php
>>http://www.faqts.com/knowledge_base/view.phtml/aid/988
>>
>>: )
>>
>>[EMAIL PROTECTED] wrote:
>>
>>>I want to make something like when you are attaching something to an
>>>email in hotmail. I want to make something that searches your own
>>>computer for files on your harddisk that you want to upload to the
>>>server.
>>>
>>>But I don't know if this is possible. If this is possible.Can somebody
>>>tell me which function I should use? Or if someone have an example...
>>>please...
>>>
>>>Duky
>>>
>>>
>
>




Re: [PHP] PHP and MYSQL Security`

2002-01-27 Thread Alan McFarlane

If you know you are running on an apache server, you could try using a
simple .htaccess file in a (say) etc directory which contains any or all
files you wish to secure.

ie:

/index.php
/etc/config.php
/etc/.htaccess

--index.php


--etc/config.php
$config['db_host']="sql";
$config['db_name']="root";
$config['db_pass']="hooray";
?>

--etc/.htaccess
deny from all


And that's it!


Duky Yuen <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How can I secure my username and password? In 1 of my files, it contains
> the following:
>
> $conn = mysql_connect( "12.34.56.78", "username", "password");
> mysql_select_db("database",$conn);
>
> What should I do, so people can't get this information?
>
> Duky
>



-- 
PHP General Mailing List (http://www.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] install error (NS + PHP + UNIX) !

2002-01-27 Thread Sang-Kyu Ahn

Hi everyone !

  I try to install PHP in the following environment.
O/S : solaris 2.7
PHP version : 4.0.6
Web Server : Nestscape Enterprise 3.6

  But, I have some problems in installing PHP4.
  I referenced the following document fully.
   http://benoit.noss.free.fr/php/install-php4.html

  I had no problems until  "configure", "make" and "make install" the
PHP4.
  But, When I restarted the web server after I configured the
file,"obj,conf",
  the following error message occurred.

   ERROR : pclose() failed.(2 : Unknown early startup error)

  I added followig 2-lines to the "obj.conf" files.

Init fn="load-modules"
funcs="php4_init,php4_close,php4_execute,php4_auth_trans"
shlib="/usr/local/netscape/server4/bin/libphp4.so"
Init fn="php4_init" errorString="Failed to initialize PHP!"

  If I remove the second line('Init fn="php4_init" errorString="Failed
to initialize PHP!"'), there is no error message but PHP is don't work.


  What is the problem?  I cannot solve this problem.
  Please help me.


-- 
PHP General Mailing List (http://www.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 and MYSQL Security`

2002-01-27 Thread Brian Clark

* Miles Thompson ([EMAIL PROTECTED]) [Jan 27. 2002 19:55]:

Hi Miles,

[...]

> $hostname = "12.34.56.78";
> $user = "username";
> $password = "password";
> $dbname = "database";

> and change your connection string as follows:
>  include 'params.inc';
> //maybe some other stuff her
> $conn = mysql_connect( '$hostname', '$user', '$password');
> mysql_select_db('$dbname',$conn) or die( mysql_errno()." : 
> ".mysql_error());

Careful there.

'$hostname', '$user', '$password', and '$dbname' aren't interpolated.
They're literally taken as the string $hostname, etc.

Leave off the 's or surround the variables in double quotes. But you
know that. ;-D

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Always proofread carefully to see if 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]




Re: [PHP] One error after another.

2002-01-27 Thread Jeff Sheltren

Can you paste the code please?  You must send the cookie before you send 
anything else.

Jeff

At 02:20 PM 1/28/2002 +1300, Philip J. Newman wrote:
>Warning: Cannot send session cookie - headers already sent by (output 
>started at d:\website\myphp\fitness\index.php:7) in 
>d:\website\myphp\fitness\config.php on line 3
>
>Warning: Cannot send session cache limiter - headers already sent (output 
>started at d:\website\myphp\fitness\index.php:7) in 
>d:\website\myphp\fitness\config.php on line 3
>
>A
>
>Philip J. Newman
>Philip's Domain - Internet Project.
>http://www.philipsdomain.com/
>[EMAIL PROTECTED]
>Phone: +64 25 6144012



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




[PHP] RE: [PHP-DB] [PHP] PHP and MYSQL Security`

2002-01-27 Thread Gurhan Ozen

The actual content of the .php files won't be seen from the net since it is
server side scripting language.. But if you are still concerned you can put
database connection info into another file (preferably .php file) and place
it somewhere outside your web directory and access it thru require() or
include() functions inside your actual web page.
  But if your concern is for local users' access to those file , just set
your file/directory permissions accordingly.

Gurhan

-Original Message-
From: Duky Yuen [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 27, 2002 7:38 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-DB] [PHP] PHP and MYSQL Security`


How can I secure my username and password? In 1 of my files, it contains
the following:

$conn = mysql_connect( "12.34.56.78", "username", "password");
mysql_select_db("database",$conn);

What should I do, so people can't get this information?

Duky


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


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




[PHP] One error after another.

2002-01-27 Thread Philip J. Newman

Warning: Cannot send session cookie - headers already sent by (output started at 
d:\website\myphp\fitness\index.php:7) in d:\website\myphp\fitness\config.php on line 3

Warning: Cannot send session cache limiter - headers already sent (output started at 
d:\website\myphp\fitness\index.php:7) in d:\website\myphp\fitness\config.php on line 3

A

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012



[PHP] PHP SITE ERROR

2002-01-27 Thread Philip J. Newman

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; 
If you would like to pass it by reference, modify the declaration of similar_text(). 
If you would like to enable call-time pass-by-reference, you can set 
allow_call_time_pass_reference to true in your INI file. However, future versions may 
not support this any longer. in /www/sites/nz.php.net/htdocs/quickref.php on line 41

hehe

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012



[PHP] [PHP-DB] Re: [PHP] PHP and MYSQL Security`

2002-01-27 Thread Paul DuBois

At 16:59 -0800 1/27/02, Fred wrote:
>If this file has a .php extension remote users will not have access to the
>variables because the file is parsed by php and they never see the actual
>file contents when requesting the document via the web.  If you are
>concerned with users on localhost having access to the file, simply give it
>the correct permissions so that no one else has read access.

No so easy.  The server itself must have read access.  If other users on
the local host can install scripts that the server executes, any of those
scripts can read the text of your scripts.

What then? You're hosed.

>
>If you are concerned about web users having access, if, for example, the php
>parser crashed and apache tried to pass the file through without parsing,
>you can put the default server, user and pass variables in the php.ini file
>which is not in the document root for apache.  Of course, this only works if
>all of your scripts use the same server, user and password.
>
>Fred
>
>Duky Yuen <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>>  How can I secure my username and password? In 1 of my files, it contains
>>  the following:
>>
>>  $conn = mysql_connect( "12.34.56.78", "username", "password");
>>  mysql_select_db("database",$conn);
>>
>>  What should I do, so people can't get this information?
>>
>>  Duky
>>
>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Ouch that hurts

2002-01-27 Thread Jeff Sheltren

It seems that you are running the script on a windows machine... Yet, I 
think that your php.ini must be trying to store session files in /tmp 
(which does not exist on windows).  Perhaps if you change the session path 
in the php.ini file it will fix the problem...

Jeff

At 01:50 PM 1/28/2002 +1300, Philip J. Newman wrote:
>Warning: open(/tmp\sess_00fe5002ea636ad76223e15f3841da02, O_RDWR) failed: 
>m (2) in d:\website\index.php on line 2
>
>What dose this mean?
>
>Philip J. Newman
>Philip's Domain - Internet Project.
>http://www.philipsdomain.com/
>[EMAIL PROTECTED]
>Phone: +64 25 6144012



-- 
PHP General Mailing List (http://www.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 and MYSQL Security`

2002-01-27 Thread Fred

If this file has a .php extension remote users will not have access to the
variables because the file is parsed by php and they never see the actual
file contents when requesting the document via the web.  If you are
concerned with users on localhost having access to the file, simply give it
the correct permissions so that no one else has read access.

If you are concerned about web users having access, if, for example, the php
parser crashed and apache tried to pass the file through without parsing,
you can put the default server, user and pass variables in the php.ini file
which is not in the document root for apache.  Of course, this only works if
all of your scripts use the same server, user and password.

Fred

Duky Yuen <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How can I secure my username and password? In 1 of my files, it contains
> the following:
>
> $conn = mysql_connect( "12.34.56.78", "username", "password");
> mysql_select_db("database",$conn);
>
> What should I do, so people can't get this information?
>
> Duky
>



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




[PHP] Re: [PHP-DB] [PHP] PHP and MYSQL Security`

2002-01-27 Thread Miles Thompson


For a start, please don't cross-post.

Secondly, people don't see these files because the PHP engine parses them. 
However, you could remove each of the parameters to an include file outside 
the web tree and have PHP read it.

Set the include_path in php.ini

Thus in a file named parameters.inc you can have these lines:

$hostname = "12.34.56.78";
$user = "username";
$password = "password";
$dbname = "database";

and change your connection string as follows:
  include 'params.inc';
 //maybe some other stuff her
 $conn = mysql_connect( '$hostname', '$user', '$password');
 mysql_select_db('$dbname',$conn) or die( mysql_errno()." : 
".mysql_error());

There has been a lot of discussion on this topic, even within the past ten 
days, so a search of the archives will give you the full discussion.

Regards - Miles Thompson

At 01:37 AM 1/28/2002 +0100, Duky Yuen wrote:
>How can I secure my username and password? In 1 of my files, it contains
>the following:
>
> $conn = mysql_connect( "12.34.56.78", "username", "password");
> mysql_select_db("database",$conn);
>
>What should I do, so people can't get this information?
>
>Duky
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] Back button to Query Pages

2002-01-27 Thread phantom

Page 1 is a list of people's names (queried by State).

Page 2 is each person's profile.

When I hit the back button on Page 2 it tells me it has to requery the
List on Page 1 (apparently not stored in the client's browser cache).
Is there anyway to make it use the cached copy instead of requeurying
the database?  I know using Active Server Pages you could do 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]




[PHP] Ouch that hurts

2002-01-27 Thread Philip J. Newman

Warning: open(/tmp\sess_00fe5002ea636ad76223e15f3841da02, O_RDWR) failed: m (2) in 
d:\website\index.php on line 2

What dose this mean?

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012



[PHP] PHP and MYSQL Security`

2002-01-27 Thread Duky Yuen

How can I secure my username and password? In 1 of my files, it contains
the following:

$conn = mysql_connect( "12.34.56.78", "username", "password");
mysql_select_db("database",$conn);

What should I do, so people can't get this information?

Duky


-- 
PHP General Mailing List (http://www.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]Upload file to system

2002-01-27 Thread Duky Yuen

Thnx. it's working now. But.. Howcome I can only upload files no bigger
then 100 kb? I have changed the MAX_FILE_SIZE to 10. Also, I can't
change the php.ini, coz the webserver isn't mine.. what to do now??

Sundogcurt wrote:

> http://www.php.net/manual/en/features.file-upload.php
> http://www.faqts.com/knowledge_base/view.phtml/aid/988
>
> : )
>
> [EMAIL PROTECTED] wrote:
>
> >I want to make something like when you are attaching something to an
> >email in hotmail. I want to make something that searches your own
> >computer for files on your harddisk that you want to upload to the
> >server.
> >
> >But I don't know if this is possible. If this is possible.Can somebody
> >tell me which function I should use? Or if someone have an example...
> >please...
> >
> >Duky
> >
> >


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




[PHP] File uploading like hotmail

2002-01-27 Thread Duky Yuen

I want to make something like when you are attaching something to an
email in hotmail. I want to make something that searches your own
computer for files on your harddisk that you want to upload to the
server.

But I don't know if this is possible. If this is possible.Can somebody
tell me which function I should use? Or if someone have an example...
please...

Duky


-- 
PHP General Mailing List (http://www.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] undefined symbol: uncompress

2002-01-27 Thread Miles Thompson


Try it t wo ways ...
1. w/o the with-mysql, run a script containing phpinfo() and see what it returns. 
MySQL support is compiled in by default to a default location.

2. Check that the with-mysql parameter is correct. On one system I had a path that was 
/usr/local/mysql/bin/mysql
and yes, that fina lmysql was a directory. It caused so me problems.

It would help if the error messages were clearer, but they're still better than Winows 
GPF's.

Miles Thompson

On Sunday 27 January 2002 03:50 pm, David Jackson wrote:
> Mike --
> Thanks for you reply, I made the changes an am stilling getting the same
> error?
> On the other hand if I compile PHP with out specifing mysql home. I
> don't get the error.
>
> David Jackson
>
> Miles Thompson wrote:
> > Add the path to libphp4.so to the file /etc/ld.conf.so
> > and run ldconfig
> >
> > or
> >
> > copy libphp4.so to the libexec directory found beneath the main apach
> > directory. It's most likely in the libs directory of your php source
> > directory.
> >
> > The second way is probably the best.
> >
> > HTH - Miles Thompson
> >
> > On Sunday 27 January 2002 03:11 pm, David Jackson wrote:
> > > I've seen similar question in the archive, but here it goes?
> > > Setup: Slackware-8.0, Apache-1.3.23, mysql-3.23.47-pc-linux-gnu-i686
> > > Config options:
> > > Apache: ./configure --prefix=/usr/local/www --with-modules=most
> > > compiles and run fine.
> > >
> > > MySQl from binaires run fine into /usr/local/mysql (set ld.so.conf to
> > > correct value).
> > >
> > > PHP-4.1.1: ./configure --with-apxs=/usr/local/www/bin/apxs
> > > --with-mysql=/usr/local/mysql
> > > cp php-ini-recommanded /usr/local/lib/php.ini
> > > Added AddType statement to httpd.conf
> > >
> > >
> > > Results in following error when I try to start Apache:
> > >
> > > Syntax error on line 236 of /usr/local/www/conf/httpd.conf:
> > > Cannot load /usr/local/www/libexec/libphp4.so into server:
> > > /usr/local/www/libexec/libphp4.so: undefined symbol: uncompress
> > >
> > > Line 236 of http.conf:
> > > LoadModule php4_modulelibexec/libphp4.so
> > >
> > >
> > > Thanks for you help.
> > > David Jackson

-- 
PHP General Mailing List (http://www.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]Upload file to system

2002-01-27 Thread sundogcurt

http://www.php.net/manual/en/features.file-upload.php
http://www.faqts.com/knowledge_base/view.phtml/aid/988

: )

[EMAIL PROTECTED] wrote:

>I want to make something like when you are attaching something to an
>email in hotmail. I want to make something that searches your own
>computer for files on your harddisk that you want to upload to the
>server.
>
>But I don't know if this is possible. If this is possible.Can somebody
>tell me which function I should use? Or if someone have an example...
>please...
>
>Duky
>
>



-- 
PHP General Mailing List (http://www.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: MySQL-PHP-RAQ4 dilemma!

2002-01-27 Thread Michael Kimsal

Greg Conway wrote:

> Hi all,

> So, my question is, how can I tell if PHP has been compiled with 
> MySQL support or not, and if not, how can I add it in without 
> breaking whatever's already there!! I presume PHP will be an RPM 
> (or even a .PKG?), so can I specify these options within RPM installation?
> 
> Many thanks for any help.
> 
> Regards,
> 
> Greg Conway.
> 


make a page with



That'll give you the PHP internal information and you can see pretty 
quickly what's 'in' and what's 'not in'.

Michael Kimsal
http://www.tapinternet.com/php
PHP Training Courses
734-480-9961






-- 
PHP General Mailing List (http://www.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-PHP-RAQ4 dilemma!

2002-01-27 Thread Greg Conway

Hi all,
 
I'm trying to add MySQL to my RaQ4. It came 
by default with PHP4 but no MySQL.  

I've installed all 4 RPMs (including the developer part and 
everything) of the latest version, and MySQL is working fine. 
I've got DbTools (fantastic!) to interact with it, no probs.

However, I have reason to believe that PHP has been compiled 
without MySQL support. Namely 'cause phpMyAdmin doesn't work and 
I'm clutching at the only thing on the install list that I didn't 
do myself (ie php4 was pre-installed and is built into the GUI, 
unlike my RaQ3 where I added it in).

When I first started tinkering around with adding PHP4 to my 
other RaQ3, I remember using tarballs with switches to ensure 
MySQL support was installed.

So, my question is, how can I tell if PHP has been compiled with 
MySQL support or not, and if not, how can I add it in without 
breaking whatever's already there!! I presume PHP will be an RPM 
(or even a .PKG?), so can I specify these options within RPM installation?

Many thanks for any help.

Regards,

Greg Conway.

 --
+---+
|  Greg Conway, Technical Director  | 
|GML Networking Technologies|
+---+
 Email/MSN:mailto:[EMAIL PROTECTED]
 ICQ#: 100219981
 mobile tel.:   +44 (0) 7974 666 967
 mobile fax:+44 (0) 7970 087 935
 Internet:  http://www.gmlnt.com
 office tel.:   +44 (0) 1255 672 103
 office fax:+44 (0) 1255 679 909
+---+
| GMLNT ** Sensible Smart Solutions |
+---+
***
This is a confidential communication between sender and addressee. If you are not the 
intended recipient of this message, please notify the sender and do not read, copy, 
use or disclose this communication to others. Any opinions or views expressed are 
those of the individual, and unless otherwise stated, are not those of the company. 
All attachments and intellectual rights remain the property of GML (NT) Limited.
***

-- 
PHP General Mailing List (http://www.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] phplib

2002-01-27 Thread Kunal Jhunjhunwala

Well, when giving the flexibility to the user to change the look of a
program, it is impossible to track wether the user leaves your program copy
right code in the template... so, if the {copyright} variable doesnt exist,
just display the copy right info.. if {copyright} exists, replace it...
simple...

Regards,
Kunal Jhunjhunwala
- Original Message -
From: "Nick Wilson" <[EMAIL PROTECTED]>
To: "php-list" <[EMAIL PROTECTED]>
Sent: Monday, January 28, 2002 3:57 AM
Subject: Re: [PHP] phplib


> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> * and then Kunal Jhunjhunwala blurted
> > hey...
> > i was wondering, is there any way to check wether the replacing of a
> > variable failed or no? example :
> > {one}
> >
> > $t->set_var("one", "1");
> >
> > I want to know wether one was replaced by 1.. or wether the term "one"
> > exists at all in the template.. any ideas on how to find this out?
>
> No. Not AFAIK
> What are the circumstances Kunal?
>
> - --
>
> Nick Wilson
>
> Tel: +45 3325 0688
> Fax: +45 3325 0677
> Web: www.explodingnet.com
>
>
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (GNU/Linux)
>
> iD8DBQE8VH7vHpvrrTa6L5oRAttnAJ0cE6ispcu22bd+mnnuN8PEljOx+QCfUKvE
> 69/xTQAg2jM28XU2rglVFtQ=
> =EUJK
> -END PGP SIGNATURE-
>
> --
> PHP General Mailing List (http://www.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] phplib

2002-01-27 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Kunal Jhunjhunwala blurted
> hey...
> i was wondering, is there any way to check wether the replacing of a
> variable failed or no? example :
> {one}
> 
> $t->set_var("one", "1");
> 
> I want to know wether one was replaced by 1.. or wether the term "one"
> exists at all in the template.. any ideas on how to find this out?

No. Not AFAIK
What are the circumstances Kunal?

- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8VH7vHpvrrTa6L5oRAttnAJ0cE6ispcu22bd+mnnuN8PEljOx+QCfUKvE
69/xTQAg2jM28XU2rglVFtQ=
=EUJK
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.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] undefined symbol: uncompress

2002-01-27 Thread David Jackson

Micheal --
Thanks for your replys.
What I see in /usr/local/mysql/lib is:

libmysqlclient.a 

I'm wondering if the MySQL binaaries use static libs?



Thanks, 
David


Michael Sims wrote:
> 
> At 12:50 PM 1/27/2002 -0700, David Jackson wrote:
> >Mike --
> >Thanks for you reply, I made the changes an am stilling getting the same
> >error?
> >On the other hand if I compile PHP with out specifing mysql home. I
> >don't get the error.
> 
> Check and see which directory libmysqlclient.so is in, and make sure that
> directory is listed in /etc/ld.so.conf and rerun ldconfig.  Then try to
> start the server.

-- 
PHP General Mailing List (http://www.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] Trying to remove bad charactors.

2002-01-27 Thread Philip J. Newman

I'm trying to replace !@#$%^&*() with nothing how ever every thing that I try it takes 
out the space too which is bad. Siggestions

$q=preg replace("!","",$q);

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012



[PHP] phplib

2002-01-27 Thread Kunal Jhunjhunwala

hey...
i was wondering, is there any way to check wether the replacing of a
variable failed or no? example :
{one}

$t->set_var("one", "1");

I want to know wether one was replaced by 1.. or wether the term "one"
exists at all in the template.. any ideas on how to find this out?

Regards,
Kunal Jhunjhunwala


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




[PHP]Upload file to system

2002-01-27 Thread Duky Yuen

I want to make something like when you are attaching something to an
email in hotmail. I want to make something that searches your own
computer for files on your harddisk that you want to upload to the
server.

But I don't know if this is possible. If this is possible.Can somebody
tell me which function I should use? Or if someone have an example...
please...

Duky


-- 
PHP General Mailing List (http://www.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] Substitute for getenv() when using ISAPI ??

2002-01-27 Thread Christian Blichmann

Hi there!
Sorry for posting this again, but I got no
answers...
Does anybody know a replacement for the
built-in getenv()-function, since according
to the manual it's not supported, when
running as an ISAPI-module under Internet
Information Server 5.0 on Windows 2k
Professional.
I've created a small counter that looks up the
user's IP in a database in order to prevent
duplicate hits when user is reloding the page
and to track how many users are "currently
online".

Suggestions welcome

BTW, this is the code I'm using now
(temporarily running the CGI version):

=== CUT HERE ===
   // ...
   // Get user's IP and user agent (-->>> problem arises here <<<--)
   $ip = ip2long(($tmp = getenv("HTTP_X_FORWARD_FOR")) ? $tmp :
getenv("REMOTE_ADDR"));

   // -->>> and here <<<--
   $useragent = getenv("HTTP_USER_AGENT");

   // Check if visit already counted
   $id = 0;
   $counted = false;
   $r = mysql_query("SELECT visitor.id, visitor.ip, visitor.useragent,
visits.timestamp FROM visitor, visits WHERE visitor.id = visits.visitor_id
ORDER BY visitor.id DESC");
   // ...
=== CUT HERE ===

Christian Blichmann

_
don't hesitate - email me with your thoughts:
e-mail: [EMAIL PROTECTED]
 - please remove the ".nospam" from address.
_
do you want to know more?
web:http://www.blichmann.de



-- 
PHP General Mailing List (http://www.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: Only one value.

2002-01-27 Thread Michael Kimsal

Mark Charette wrote:


>>
> 
> Almost right. DISTINCT is not a SQL function:
> 
> select distinct iName from tablename
> 
> would be the correct syntax.
> 
> 


Seems to work fine on every version of MySQL I've used for the past few 
years, and I believe SQL Server 6.5 and 7, if memory serves correct.




-- 
PHP General Mailing List (http://www.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: Only one value.

2002-01-27 Thread Mark Charette

From: "Michael Kimsal" <[EMAIL PROTECTED]>

> Philip J. Newman wrote:
>
> > Don't know is this is a Mysql problem or PHP, but I have a table with
100 records in it.  One of the field names is $iName.
> >
> > When listing all the records I want only the 1st Uneak value to be
displayed.
> >
> > For excample
> >
> > if values where, Bob, Jan, Mike, James, Bob, James, James, Mike ...
> >
> > I would like to call: Bob, Jan, Mike, James ... Any Idenas
> >
>
>
> I suspect you mean the mysql field name is 'iName', not '$iname' ($iName
> being the PHP variable name).
>
> try
>
> select distinct(iName) from tablename
>
> and loop through those result sets.

Almost right. DISTINCT is not a SQL function:

select distinct iName from tablename

would be the correct syntax.




-- 
PHP General Mailing List (http://www.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: Only one value.

2002-01-27 Thread Michael Kimsal

Philip J. Newman wrote:

> Don't know is this is a Mysql problem or PHP, but I have a table with 100 records in 
>it.  One of the field names is $iName.
> 
> When listing all the records I want only the 1st Uneak value to be displayed. 
> 
> For excample
> 
> if values where, Bob, Jan, Mike, James, Bob, James, James, Mike ...
> 
> I would like to call: Bob, Jan, Mike, James ... Any Idenas
> 


I suspect you mean the mysql field name is 'iName', not '$iname' ($iName 
being the PHP variable name).

try

select distinct(iName) from tablename

and loop through those result sets.



Michael Kimsal
http://www.tapinternet.com/php/
PHP Training Courses
734-480-9961


-- 
PHP General Mailing List (http://www.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] undefined symbol: uncompress

2002-01-27 Thread Michael Sims

At 12:50 PM 1/27/2002 -0700, David Jackson wrote:
>Mike --
>Thanks for you reply, I made the changes an am stilling getting the same
>error?
>On the other hand if I compile PHP with out specifing mysql home. I
>don't get the error.

Check and see which directory libmysqlclient.so is in, and make sure that 
directory is listed in /etc/ld.so.conf and rerun ldconfig.  Then try to 
start the server.


-- 
PHP General Mailing List (http://www.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] Session updates ok first time only.

2002-01-27 Thread Floyd Baker



Can someone tell me why this is not working right?  Two pages are
basically the same, passing an accumulating value back and forth.
There is no other session being created.  The first time it increments
and passes to the second page, and is picked up.  It puts a 1 in the
session file.  After that, it seems to try, as in editor wanting to
reload, but the contents don't increase beyond 1.
 
I have 4.1, register globals off, on Windows 98.

TIA


session_start(); 

print "";
print "";

// determine session id
$session = $_REQUEST['session'];
if ($session == ''){
$session = session_id();}

print "SESSION = $session";

// create a registered variable.
session_register('page_views');


//pull value from session file:
$page_views = $_SESSION['page_views'];

print "Send Page";
print "Before increment = $page_views";

$page_views++;

print "After increment = $page_views";

// go to next page with session id:
print "";
print "";
print " < or > ";
?>





session_start();  

print "";
print "";
print "";
print "";

//determine a session id:
$session = $_REQUEST['session'];
if ($session == ''){
$session = session_id();
}
print "SESSION = $session";

// create a registered variable.  
// alredy done.
//session_register('page_views'); 

//pull a value from the session file:
$page_views = $_SESSION['page_views'];

print "Return Page";
print "Before increment = $page_views";

//increment the counter:
$page_views++;
$page_views++;

print "After increment = $page_views";

//going to next page with session id:
print "";
print "";
print " < or > ";

?>





php.ini  

[Session]
session.save_handler = files
session.save_path = c:/tmp
session.use_cookies = 
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_maxlifetime = 1440
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 1
url_rewriter.tags =
"a=href,area=href,frame=src,input=src,form=fakeentry"

--


-- 
PHP General Mailing List (http://www.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] Only one value.

2002-01-27 Thread Philip J. Newman

Don't know is this is a Mysql problem or PHP, but I have a table with 100 records in 
it.  One of the field names is $iName.

When listing all the records I want only the 1st Uneak value to be displayed. 

For excample

if values where, Bob, Jan, Mike, James, Bob, James, James, Mike ...

I would like to call: Bob, Jan, Mike, James ... Any Idenas

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012



RE: [PHP] set_time_limit() in a loop

2002-01-27 Thread Matthew Delmarter

Thanks for your reply Paul.

The script is getting subscriber details from a database and then
firing our personalised emails in HTML and text format. The while
statement loops through the query results and fires out the emails
using the mail() command.

It works well so far and indeed does finish the loop OK - but as
mentioned the script is still running 13 hours later. I don't get it.

Any ideas? Is it possible to kill a script via PHP code?

Matthew

PS Here is the script again



-Original Message-
From: Paul Roberts [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 27, 2002 12:08 AM
To: Matthew Delmarter
Cc: PHP Mailing List
Subject: Re: [PHP] set_time_limit() in a loop


what are you doing a while on

if while never ends and you reset the time out each loop and use
ignore_user_abort(true), it will still be going 13 hours latter.

maybe if you send the full code so we can look at it.

Paul Roberts
[EMAIL PROTECTED]

- Original Message -
From: "Matthew Delmarter" <[EMAIL PROTECTED]>
To: "Martin Towell" <[EMAIL PROTECTED]>
Cc: "PHP Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 25, 2002 12:55 AM
Subject: RE: [PHP] set_time_limit() in a loop


> I should also mention that the loop is sending mail using mail().
>
> Is it possible that this is the problem somehow?
>
> -Original Message-
> From: Martin Towell [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 25, 2002 1:16 PM
> To: 'Matthew Delmarter'; PHP Mailing List
> Subject: RE: [PHP] set_time_limit() in a loop
>
> your first thought was correct - it sets it to 1800, it's NOT
> accumulative.
>
> it would have something to do with  ignore_user_abort(true); and
also
> is your while loop's exit check working?
>
> Martin
>
>
> -Original Message-
>
> Just wondering about set_time_limit() in a loop.
>
> The current code looks something like this:
>
>   ignore_user_abort(true);
>  set_time_limit(1800);
>  while:
> do stuff;
> set_time_limit(1800);
>  endwhile;
> ?>
>
> Does this reset the timeout to 1800 seconds every time it loops? Or
> does it accumulate so that the timeout has 1800 seconds added to it
> every time?
>
> The reason I ask is that my ISP informs me that the script is still
> running 13 hours later! Or is this related to the ignore_user_abort?
>
> Regards,
> Matthew Delmarter
>
>
>
> --
> PHP General Mailing List (http://www.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] undefined symbol: uncompress

2002-01-27 Thread David Jackson

Mike --
Thanks for you reply, I made the changes an am stilling getting the same
error?
On the other hand if I compile PHP with out specifing mysql home. I
don't get the error.

David Jackson

Miles Thompson wrote:
> 
> Add the path to libphp4.so to the file /etc/ld.conf.so
> and run ldconfig
> 
> or
> 
> copy libphp4.so to the libexec directory found beneath the main apach directory.
> It's most likely in the libs directory of your php source directory.
> 
> The second way is probably the best.
> 
> HTH - Miles Thompson
> 
> On Sunday 27 January 2002 03:11 pm, David Jackson wrote:
> > I've seen similar question in the archive, but here it goes?
> > Setup: Slackware-8.0, Apache-1.3.23, mysql-3.23.47-pc-linux-gnu-i686
> > Config options:
> > Apache: ./configure --prefix=/usr/local/www --with-modules=most
> > compiles and run fine.
> >
> > MySQl from binaires run fine into /usr/local/mysql (set ld.so.conf to
> > correct value).
> >
> > PHP-4.1.1: ./configure --with-apxs=/usr/local/www/bin/apxs
> > --with-mysql=/usr/local/mysql
> > cp php-ini-recommanded /usr/local/lib/php.ini
> > Added AddType statement to httpd.conf
> >
> >
> > Results in following error when I try to start Apache:
> >
> > Syntax error on line 236 of /usr/local/www/conf/httpd.conf:
> > Cannot load /usr/local/www/libexec/libphp4.so into server:
> > /usr/local/www/libexec/libphp4.so: undefined symbol: uncompress
> >
> > Line 236 of http.conf:
> > LoadModule php4_modulelibexec/libphp4.so
> >
> >
> > Thanks for you help.
> > David Jackson

-- 
PHP General Mailing List (http://www.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] undefined symbol: uncompress

2002-01-27 Thread Michael Sims

At 12:11 PM 1/27/2002 -0700, David Jackson wrote:
>I've seen similar question in the archive, but here it goes?
>Setup: Slackware-8.0, Apache-1.3.23, mysql-3.23.47-pc-linux-gnu-i686
[...]
>Config options:
>Syntax error on line 236 of /usr/local/www/conf/httpd.conf:
>Cannot load /usr/local/www/libexec/libphp4.so into server:
>/usr/local/www/libexec/libphp4.so: undefined symbol: uncompress

I had this problem on RedHat 7.2.  Turns out I needed zlib support 
(libz.so).  Not sure how to do it on Slackware, but on RedHat 7.2 you need 
two RPMs, both zlib-1.1.3-24 and zlib-devel-1.1.3-24.  After I installed 
these RPMs I had to do a make clean, rm config.cache, and then configure 
again adding "--with-zlib" to the configure command.

(I saw some saying that you needed to add "-ld" to the LTLIBRARY_LDFLAGS 
line in the top level Makefile but this did not work for me.)

To be honest, I have no idea why any of this was needed, I got all this 
info from various sources on Google Groups.  But it worked for me.  Maybe 
this can point you in the right direction...


-- 
PHP General Mailing List (http://www.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] Porting from Linux to Windows!?$#

2002-01-27 Thread Michael Sims

At 01:02 PM 1/27/2002 -0500, Andre Amaral wrote:
>Thank you for the wuick response.
>Now. Can I make a script that works in both Linux and Windows without much
>headache?

I'm currently working with a few developers to redesign my company's 
website using PHP.  I am developing on a Linux platform while some of the 
other developers are using Windows.  We are using CVS to merge our 
individual changes into one main source tree.

So far this has been working really well.  I've found that it's much easier 
to develop on Linux first and then tweak any oddities on the Windows 
side.  For example, the following is only valid on Windows:

$file = "some\\relative\\path\\filename.ext";

But the following is valid on either platform:

$file = "some/relative/path/filename.ext";

Another example is case sensitivity.  To Windows, "SomePath/filename.ext" 
is the same as "somepath/filename.ext" but not on Linux.  Since Linux is 
the more picky of the two (for good reason) then it's easier to make sure 
the case is correct on the Linux side.  Just be careful and don't create 
"Filename.ext" and "filename.ext" as two different files on the Linux side, 
because Windows obviously won't be able to handle that.

I would say for 95% of basic scripts, you are not going to have any 
troubles.  You could run into problems would be scripts that work with the 
filesystem (for example, umask() doesn't work on Windows).  COM components 
can only be used on Windows, so avoid them if your goal is platform 
independence.  Most DB functions behave exactly the same way, with minor 
differences (for example, mssql_next_result() does not work if you are 
using Linux/FreeTDS but it does on Windows)etc.  I've found that the 
mail() function works exactly the same on either platform assuming you have 
both servers configured properly.

My best advice is to develop on Linux first, periodically testing your 
scripts on Windows and tweaking the oddities.  It's not too tricky.  Let me 
know if you have questions...


-- 
PHP General Mailing List (http://www.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] a quick question..

2002-01-27 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Paul A. Procacci blurted
> He meant push

Hehe, I didn't think of that. Actually I didn't mean push /or/ pop in
the array sense of the word, I meant *put* as in create!
I'll take more care in future :-)
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8VFjiHpvrrTa6L5oRAjIyAJ0bT5tu/fwjSzyNgcpy1EcVk3yjlACfe3KK
ETC08e6y2v6ePJPj8JRgBkg=
=PNvr
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.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] a quick question..

2002-01-27 Thread Paul A. Procacci

He meant push

Nick Wilson wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> * and then Tauntz blurted
> > If I have n variables:
> > $nr1 = "some text";
> > $nr2 = "some other text"
> > $nr3
> > 
> > and I want to print the text "randomly" (like if I enter the page.. it displays 
>$nr1... next time it displays $nr 5.. etc)
> > how can I achieve it ?
>
> Pop them all into an array and use array_rand()
> See manual for details.
>
> HTH
> - --
>
> Nick Wilson
>
> Tel:+45 3325 0688
> Fax:+45 3325 0677
> Web:www.explodingnet.com
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (GNU/Linux)
>
> iD8DBQE8VFSFHpvrrTa6L5oRAg7iAKCAvzPSf8E5LGXOF5AjYEhwJXmqrQCfVWYE
> ycfLyu31AB+QDQmkcKaJKe0=
> =pkfe
> -END PGP SIGNATURE-


-- 
PHP General Mailing List (http://www.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] a quick question..

2002-01-27 Thread Tauntz

Thank you, it worked :)


- Original Message -
From: "Nick Wilson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, January 27, 2002 9:27 PM
Subject: Re: [PHP] a quick question..


> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> * and then Tauntz blurted
> > If I have n variables:
> > $nr1 = "some text";
> > $nr2 = "some other text"
> > $nr3
> > 
> > and I want to print the text "randomly" (like if I enter the page.. it
displays $nr1... next time it displays $nr 5.. etc)
> > how can I achieve it ?
>
>
> Pop them all into an array and use array_rand()
> See manual for details.
>
> HTH
> - --
>
> Nick Wilson
>
> Tel: +45 3325 0688
> Fax: +45 3325 0677
> Web: www.explodingnet.com
>
>
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (GNU/Linux)
>
> iD8DBQE8VFSFHpvrrTa6L5oRAg7iAKCAvzPSf8E5LGXOF5AjYEhwJXmqrQCfVWYE
> ycfLyu31AB+QDQmkcKaJKe0=
> =pkfe
> -END PGP SIGNATURE-
>
> --
> PHP General Mailing List (http://www.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] a quick question..

2002-01-27 Thread Miles Thompson

Even better!
mt

On Sunday 27 January 2002 03:27 pm, you wrote:
> * and then Tauntz blurted
>
> > If I have n variables:
> > $nr1 = "some text";
> > $nr2 = "some other text"
> > $nr3
> > 
> > and I want to print the text "randomly" (like if I enter the page.. it
> > displays $nr1... next time it displays $nr 5.. etc) how can I achieve it
> > ?
>
> Pop them all into an array and use array_rand()
> See manual for details.
>
> HTH

-- 
PHP General Mailing List (http://www.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] undefined symbol: uncompress

2002-01-27 Thread Miles Thompson


Add the path to libphp4.so to the file /etc/ld.conf.so  
and run ldconfig

or

copy libphp4.so to the libexec directory found beneath the main apach directory. 
It's most likely in the libs directory of your php source directory.

The second way is probably the best.

HTH - Miles Thompson


On Sunday 27 January 2002 03:11 pm, David Jackson wrote:
> I've seen similar question in the archive, but here it goes?
> Setup: Slackware-8.0, Apache-1.3.23, mysql-3.23.47-pc-linux-gnu-i686
> Config options:
> Apache: ./configure --prefix=/usr/local/www --with-modules=most
> compiles and run fine.
>
> MySQl from binaires run fine into /usr/local/mysql (set ld.so.conf to
> correct value).
>
> PHP-4.1.1: ./configure --with-apxs=/usr/local/www/bin/apxs
> --with-mysql=/usr/local/mysql
> cp php-ini-recommanded /usr/local/lib/php.ini
> Added AddType statement to httpd.conf
>
>
> Results in following error when I try to start Apache:
>
> Syntax error on line 236 of /usr/local/www/conf/httpd.conf:
> Cannot load /usr/local/www/libexec/libphp4.so into server:
> /usr/local/www/libexec/libphp4.so: undefined symbol: uncompress
>
> Line 236 of http.conf:
> LoadModule php4_modulelibexec/libphp4.so
>
>
> Thanks for you help.
> David Jackson

-- 
PHP General Mailing List (http://www.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] a quick question..

2002-01-27 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Tauntz blurted
> If I have n variables:
> $nr1 = "some text";
> $nr2 = "some other text"
> $nr3
> 
> and I want to print the text "randomly" (like if I enter the page.. it displays 
>$nr1... next time it displays $nr 5.. etc)
> how can I achieve it ?


Pop them all into an array and use array_rand()
See manual for details.

HTH
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8VFSFHpvrrTa6L5oRAg7iAKCAvzPSf8E5LGXOF5AjYEhwJXmqrQCfVWYE
ycfLyu31AB+QDQmkcKaJKe0=
=pkfe
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.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] a quick question..

2002-01-27 Thread Edward van Bilderbeek - Bean IT

Or, if you've already set your massive list of variables...:

$varname = "nr".rand(0, $n);
print ${$varname};

- Original Message -
From: "Miles Thompson" <[EMAIL PROTECTED]>
To: "Tauntz" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, January 27, 2002 8:15 PM
Subject: Re: [PHP] a quick question..


> Try this:
>
> Store variables in an array, say $msg_array. (For those of Hungarian
preference, $arrMessages.)
> $index = rand (0, $n)
> echo $msg_array[ $index ]
>
> Now this will require a bit of messing about, seeding the randomizer,
etc., but you get the idea.
>
> Miles Thompson
>
>
> On Sunday 27 January 2002 03:00 pm, Tauntz wrote:
> > If I have n variables:
> > $nr1 = "some text";
> > $nr2 = "some other text"
> > $nr3
> > 
> > and I want to print the text "randomly" (like if I enter the page.. it
> > displays $nr1... next time it displays $nr 5.. etc) how can I achieve it
?
> >
> > [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] a quick question..

2002-01-27 Thread Miles Thompson

Try this:

Store variables in an array, say $msg_array. (For those of Hungarian preference, 
$arrMessages.)
$index = rand (0, $n)
echo $msg_array[ $index ]

Now this will require a bit of messing about, seeding the randomizer, etc., but you 
get the idea.

Miles Thompson


On Sunday 27 January 2002 03:00 pm, Tauntz wrote:
> If I have n variables:
> $nr1 = "some text";
> $nr2 = "some other text"
> $nr3
> 
> and I want to print the text "randomly" (like if I enter the page.. it
> displays $nr1... next time it displays $nr 5.. etc) how can I achieve it ?
>
> [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] undefined symbol: uncompress

2002-01-27 Thread David Jackson

I've seen similar question in the archive, but here it goes?
Setup: Slackware-8.0, Apache-1.3.23, mysql-3.23.47-pc-linux-gnu-i686
Config options:
Apache: ./configure --prefix=/usr/local/www --with-modules=most
compiles and run fine.

MySQl from binaires run fine into /usr/local/mysql (set ld.so.conf to
correct value).

PHP-4.1.1: ./configure --with-apxs=/usr/local/www/bin/apxs
--with-mysql=/usr/local/mysql
cp php-ini-recommanded /usr/local/lib/php.ini
Added AddType statement to httpd.conf


Results in following error when I try to start Apache:

Syntax error on line 236 of /usr/local/www/conf/httpd.conf:
Cannot load /usr/local/www/libexec/libphp4.so into server:
/usr/local/www/libexec/libphp4.so: undefined symbol: uncompress

Line 236 of http.conf:
LoadModule php4_modulelibexec/libphp4.so


Thanks for you help.
David Jackson

-- 
PHP General Mailing List (http://www.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] a quick question..

2002-01-27 Thread Tauntz

If I have n variables:
$nr1 = "some text";
$nr2 = "some other text"
$nr3

and I want to print the text "randomly" (like if I enter the page.. it displays 
$nr1... next time it displays $nr 5.. etc)
how can I achieve it ?

[EMAIL PROTECTED]



[PHP] Re: CGI vs. ISAPI

2002-01-27 Thread Michael Kimsal

Benjamin Deruyter wrote:

> I'm fairly new to PHP, having worked with ColdFusion in the past.  Can
> somebody shed some light on to the key differences between the CGI
> installation and the ISAPI installation.  I working with IIS on Win2k and
> using MySQL for a db server.  Thanks.
> 
>  - Ben
> 
> 

 From all practical accounts the ISAPI is still not stable under 
Windows.  The claim is that PHP itself is stable, but the majority of 
the DLL files which provide the additional functionality (IMAP, GD, etc) 
are NOT stable (threadsafety I think is the issue) so unless you're 
doing something extremely basic ISAPI may not be the answer.

Only you can tell for certain - set it up on your system and if it 
works, great.  If it starts to crash, don't waste hours or days or weeks 
trying to fix it - it's not your problem.  Just go back to CGI.  If 
you're an experienced C coder under Windows, jump in and try to help 
debug and patch it, otherwise just stick with CGI.

Michael Kimsal
http://www.tapinternet.com/php/
PHP Training Courses
734-480-9961


-- 
PHP General Mailing List (http://www.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] Porting from Linux to Windows!?$#

2002-01-27 Thread Andre Amaral

Thank you for the wuick response.
Now. Can I make a script that works in both Linux and Windows without much
headache?


"Sterling Hughes" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi all,
> >
> > I would like to ask my experienced friends here if its possible to port
a
> > script made for linux to run in windows IIS. I've been trying to make
linux
> > scripts run on my server and some of them do and some don't. I also
notice
> > that the problem relies how Linux and Windows refer to firectories.
> >
> > Linux Ex.
> > $base_dir = "/home/somescript/"
> >
> > Windows Ex.
> > $base_dir = "C:\home\somescript"
> >
> > Now. My question is... Is there any way to use script made for Linux in
> > Windows? If YES what have to be done in order to make it to work?
> >
> > Thank you,
> > Andre
> >
> >
> Well, that depends on the script greatly.  Both Win32 and Linux have
> difference sets of functions, and features.  Issues such as relative
> path's are easy enough to solve, however, it would greatly depend on
> what other features the piece of code use.
>
> In most cases, it is possible to port a script from Win32 to
> Linux, and vice-versa, with a few hours of hair-pulling and a little
> bit of luck...  But then again, this question depends on the
> application.
>
> -Sterling
>
>
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
> --
> I wish I may, I wish I might, GIMME STUFF!
> http://www.amazon.com/exec/obidos/wishlist/E7I1IWUJDPB4/
> :)))



-- 
PHP General Mailing List (http://www.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] Porting from Linux to Windows!?$#

2002-01-27 Thread Sterling Hughes

> Hi all,
> 
> I would like to ask my experienced friends here if its possible to port a
> script made for linux to run in windows IIS. I've been trying to make linux
> scripts run on my server and some of them do and some don't. I also notice
> that the problem relies how Linux and Windows refer to firectories.
> 
> Linux Ex.
> $base_dir = "/home/somescript/"
> 
> Windows Ex.
> $base_dir = "C:\home\somescript"
> 
> Now. My question is... Is there any way to use script made for Linux in
> Windows? If YES what have to be done in order to make it to work?
> 
> Thank you,
> Andre
> 
>
Well, that depends on the script greatly.  Both Win32 and Linux have
difference sets of functions, and features.  Issues such as relative
path's are easy enough to solve, however, it would greatly depend on
what other features the piece of code use.

In most cases, it is possible to port a script from Win32 to
Linux, and vice-versa, with a few hours of hair-pulling and a little
bit of luck...  But then again, this question depends on the
application.

-Sterling


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

-- 
I wish I may, I wish I might, GIMME STUFF! 
http://www.amazon.com/exec/obidos/wishlist/E7I1IWUJDPB4/
:)))

-- 
PHP General Mailing List (http://www.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] Porting from Linux to Windows!?$#

2002-01-27 Thread Andre Amaral

Hi all,

I would like to ask my experienced friends here if its possible to port a
script made for linux to run in windows IIS. I've been trying to make linux
scripts run on my server and some of them do and some don't. I also notice
that the problem relies how Linux and Windows refer to firectories.

Linux Ex.
$base_dir = "/home/somescript/"

Windows Ex.
$base_dir = "C:\home\somescript"

Now. My question is... Is there any way to use script made for Linux in
Windows? If YES what have to be done in order to make it to work?

Thank you,
Andre



-- 
PHP General Mailing List (http://www.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: binary file + fread

2002-01-27 Thread Michael Agbaglo



[...]

> $fd = fopen( $filename, "rb" ); //Notice the "b"
> $a = fread( $fd, 4 );
> $b = fread( $fd, 4 );
> printf( "a= %lx b=%lx", $a, $b);
> fclose( $fd );
> ?>
> 
> notice the "b" in the fopen, it stand for binary.
[...]


I noticed the 'b' like in but - it's also mentioned in the 
documentation, BUT it doesn't seem to work !


-- 
PHP General Mailing List (http://www.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: PHP in the University and Corporation [was RE: [PHP] Computer Science and PHP]

2002-01-27 Thread Chris Lott

I agree about going to technical colleges and other areas. In fact, I made
that very point. There is no reason that these kinds of programs even NEED
to be four year degrees.

I don't want to get into a debate about certifications. As one who hires
programmers, I can say this for myself and many others: certification mreans
squat to myself and to most people I know. They have become as devalued as
Argentinian currency :)

On the other hand, the general truth is that certification WILL open doors
in some places, particularly those that are technologically clueless in the
first place. They may or may not be jobs worth having, it may or may not
happen for the job you are pursuing now or the job you might pursue in the
future. 

My real point in all of this is that establishing a LAMP certification, for
instance, or a PHP certification, is no panacea and is no guarantee of
opening any doors, not to mention the possibility of such certifications
becoming a joke as MCSE and other Microsoft Certs (for instance, and a cert
I can speak of with firsthand experience :) have become in many circles and
actually having as much negative impact as positive.

c
--
Chris Lott
http://www.chrislott.org/

-- 
PHP General Mailing List (http://www.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: binary file + fread

2002-01-27 Thread Paul A. Procacci

Try


notice the "b" in the fopen, it stand for binary.

Paul

Michael Agbaglo wrote:

> Hi !
>
> I've some trouble w/ the following peace of code... Althoug the file
> doesn't contain zeros at the beginning the output is
> a= 0 b=0
>
> Is there a problem w/ fread ? (php 4.0.6, RedHat 7.2)
>
>  $filename = "/export/html/log";
> $fd = fopen( $filename, "r" );
> $a = fread( $fd, 4 );
> $b = fread( $fd, 4 );
> printf( "a= %lx b=%lx", $a, $b);
> fclose( $fd );
> ?>


-- 
PHP General Mailing List (http://www.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] fread + binary file

2002-01-27 Thread Michael Agbaglo

Hello !

I've some tourble w/ the following piece of code. The file to read 
doesn't contain zeros at the beginning, but the output is

a= 0 b=0

is there a problem w/ fread ? (php 4.0.6, RedHat 7.2)







-- 
PHP General Mailing List (http://www.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] binary file + fread

2002-01-27 Thread Michael Agbaglo

Hi !

I've some trouble w/ the following peace of code... Althoug the file 
doesn't contain zeros at the beginning the output is
a= 0 b=0

Is there a problem w/ fread ? (php 4.0.6, RedHat 7.2)







-- 
PHP General Mailing List (http://www.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: Write to file?

2002-01-27 Thread Paul A. Procacci

Try inserting a "\n" at the end of each string you write.  This is a new-
line character.

Paul

Mårten andersson wrote:

> Hello folks…
>
> I want to write to a textfile, but I want a row for each string I write
> to the file.
> As it is now when I write to the file it just starts writing where the
> last string ends..
>
> What should I do? =)
>
> Thanks! //M.
>
> 
> --
> Mårten Andersson
> Loddbygatan 2
> 60218 Norrköping
> Sverige
>
> ICQ: 86515830
> URL: http://www.vanvett.net/marten
>


-- 
PHP General Mailing List (http://www.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: Memory usage with Apache

2002-01-27 Thread Paul A. Procacci

How are you executing top?  Sounds like you need to use the -d option for
top.  Example:

$exec - exec("top -d1");

This way, top won't, run and run and run, and run, and run, etc, etc, etc.

Try that

Paul

"Thomas E. Ruth" wrote:

> Hello,
>
> I'm using PHP 4.0.4pl1 with Apache 1.3.14.
>
> I have a PHP script that accumulates data for insertion into a database.
> This script runs in peices and unset()'s variables that contain the data
> periodically in hopes of freeing memory for the next batch of records.
> Apparently it's not working that way. When I run top and run my PHP
> script, the httpd process runs up to 125M of memory usage, and
> segfaults.
>
> Is there a parameter somewhere that says that httpd can't grow to over
> 128M of memory usage, or that PHP can't grow to more then this amount
> that I can change to prevent my web server from crashing? Or perhaps a
> garbage cleanup routine in PHP that actually frees memory that is no
> longer being used (these arrays hold max 5X25 of small <10 char
> strings). I unset these arrays after they are placed in the database
> (and I free the result for the database), but memory just climbs and
> climbs until the script ends (if I run it with arguments that yield
> smaller results).
>
> Thanks,
>
> Tom


-- 
PHP General Mailing List (http://www.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] ereg(i) for form input validation for SQL - tutorial?

2002-01-27 Thread Simon H

Does anyone know of a good tutorial for using ereg and eregi to validate
standard fields for SQL input (i'm using PearDB).  Typically the type of
validation that I think I need would be, firstly to detect invalid
characters, or special characters, or things that can screw up the SQL
Query.  Others would be the alpha only, string lengths, email address, dates
and times, phone numbers.

These are standard items in a lot of systems...surely there's a tutorial out
there somewhere, or a sample script or something.  I've only just discovered
regex, so its all a bit h at the moment.

Any links for tutorials or sample scripts would be much appreciated.

Thanks

Simon H


-- 
PHP General Mailing List (http://www.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] HOT!!! PHP4.1.x - Step by Step Installation manual

2002-01-27 Thread Olexandr Vynnychenko

Hello Andre,

Friday, January 25, 2002, 3:16:38 AM, you wrote:

AA> Hi all. Here is my first attempt to make easy Step by Step installation
AA> manual for PHP4.1.x on Windows 2000 based systems running IIS5 using CGI or
AA> ISAPI. Here is the link that will ake a lot of people happy. :)
AA> http://www.experttek.com/php/installation.txt

AA> Fell free to contact me. Contacts are in the manual.

HTTP 404 - File not found

-- 
Best regards,
 Olexandrmailto:[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 Digest 27 Jan 2002 15:12:56 -0000 Issue 1136

2002-01-27 Thread php-general-digest-help


php-general Digest 27 Jan 2002 15:12:56 - Issue 1136

Topics (messages 82263 through 82287):

Re: Get FILE NAME and EXTENSION??
82263 by: Jason Wong

Re: Control Panel
82264 by: Miles Thompson
82281 by: Chris Kay

Re: PHP and XHTML
82265 by: Tom Rogers

Re: Any Ideas
82266 by: Alok K. Dhir

A The Space is gone.
82267 by: Philip J. Newman
82269 by: CC Zona
82270 by: Philip J. Newman
82271 by: CC Zona

Re: getting a LAMP job in this economy
82268 by: michael kimsal
82275 by: Chris Lott
82276 by: michael kimsal
82277 by: John Lewis

what's equivalent of DBI quote
82272 by: Peter J. Schoenster

On the fly unzipping
82273 by: sean.interconnect.is.it

PHP in the University and Corporation [was RE: [PHP] Computer Sci ence and PHP]
82274 by: Chris Lott
82286 by: Mike Frazer

Re: Correct URL's
82278 by: David Robley
82282 by: Dave Brotherstone
82285 by: Alan McFarlane

Re: date and time triggerring
82279 by: David Robley

Re: eval()
82280 by: Jason Wong

CGI vs. ISAPI
82283 by: Benjamin deRuyter
82284 by: David

Re: php login scripts
82287 by: John Cuthbert

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

--- Begin Message ---

On Sunday 27 January 2002 11:10, Dani wrote:
> Hi everyone!
>
> I'm trying to put  file names into variables which later I put into my
> DB (MySQL) as text (only the filename and the extension).
>
> I tried to use the upload format form before:
> 
>
> 
>
> 

>
> .
>
> When I retrived the value of the variables, I did not get the FILE NAME
> and the file extension.
> What I got is all the path of the file and the file name changed into
> .TMP or some sort.
>
> How do I retrived file names and it's extension in this situation?

Please read the manual chapter "Handling file uploads"


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
"Are you sure you're not an encyclopedia salesman?"
No, Ma'am.  Just a burglar, come to ransack the flat."
-- Monty Python
*/

--- End Message ---
--- Begin Message ---

Spare us1

Miles Thompson

On Saturday 26 January 2002 09:39 pm, karthikeyan wrote:
> Hi Guys,
>
>   I want a affordable and the best control panel for my website.  Though i
> can make it myself but it make some time to do that.  Do any of you guys
> and gals know about this do let me know.
>
>   Looking forward for yours earliest reponse.
>
> karthikeyan.

--- End Message ---
--- Begin Message ---

Love the rsponce Miles

If you could make it then make it

I mean what use would a control panel be on a website, why on earth
Would you want suck features as "Add / Remove Programes" and "Internet
Options"
On a website :)...

If you want it to be the best then a pre built script(s) is not going to
be good for you,
Because the best would have all features you need and more and something
out there is not made for you alone.

Building it would be your best choice...

Regards
Chris Kay

-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, 27 January 2002 1:52 PM
To: karthikeyan; [EMAIL PROTECTED]
Subject: Re: [PHP] Control Panel


Spare us1

Miles Thompson

On Saturday 26 January 2002 09:39 pm, karthikeyan wrote:
> Hi Guys,
>
>   I want a affordable and the best control panel for my website.  
> Though i can make it myself but it make some time to do that.  Do any 
> of you guys and gals know about this do let me know.
>
>   Looking forward for yours earliest reponse.
>
> karthikeyan.

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




--- End Message ---
--- Begin Message ---

Hi
use single quotes and it is simpler

echo '';

Tom
At 09:40  27/01/02, Frans Englich wrote:

>This works just perfectly:
>
>  "); ?>
>
>
>  regards,
>  Cyth
>
>  ---
>
>-BEGIN PGP SIGNED MESSAGE-
>Hash: SHA1
>
>
>* and then Jeff Sheltren blurted
>
> > Hi.  Have you tried something like:
> >
> > \n"); ?>
>
>*Good* idea, tell us if it works!
>
>- --
>
>Nick Wilson
>
>Tel:+45 3325 0688
>Fax:+45 3325 0677
>Web:www.explodingnet.com
>
>
>
>-BEGIN PGP SIGNATURE-
>Version: GnuPG v1.0.6 (GNU/Linux)
>
>iD8DBQE8UzhFHpvrrTa6L5oRAtEiAJ0b1D5tHcQMSpWCitYvIbmiHpkvpgCgkONa
>lBx9rwVVindWYbIifw4EyVs=
>=WHxj
>-END PGP SIGNATURE-
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact

[PHP] Re: php login scripts

2002-01-27 Thread John Cuthbert

$user = $HTTP_GET_VARS["user"];
$pass = $HTTP_GET_VARS["pass"];

$real =  "superduperunlieklytobeguesedpass";
if($user == $validuser && $pass == $real)
{
echo "thank you for logging in here is the page";
?>

etc

and call the page as
http://superdomain.com/login.php?user=Imasuperduperuser&pass=superduperunlie
klytobeguesedpass

You'd need to alter it obviously. Its good for secureing one page if you
want multi page you ... need to work on Sessions :S Im working on em now :S
scarry stuff :S

"Laserjetter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Depending on how secure the login information needs to be, you could just
> store it in a text file, maybe using password() to encrypt passwords. You
> could then access it using fopen() and save the contents of the file in an
> array.
>
> I'm not too hot on login and authentication though myself! I did get it
> working, there was a useful example in the PHP manual.
>
> LJ
>
> "XX XX" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > hi. im new. i installed a login script on my site and after a few days,
it
> > stopped working. i reinstalled it and it still refused to work after a
dew
> > days. can anyone send me a good login script preferably with no MySql?
im
> > very busy atm with all my school stuff.
> >
> > Thanks
> > aron
> >
> > _
> > Get your FREE download of MSN Explorer at
> http://explorer.msn.com/intl.asp.
> >
>
>



-- 
PHP General Mailing List (http://www.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 in the University and Corporation [was RE: [PHP] Computer Science and PHP]

2002-01-27 Thread Mike Frazer

In order to make a living as a programmer, unless you can seriously wow your
potential employers with raw ability, it's difficult to make any real money
unless you have a little piece of paper that says "Look what I can do!"
I've been programming in PHP, Perl, ASP, Java, Visual Basic, C and C++ to
some extent for the last seven years, but aside from a 1-year certification
in VB that has since expired I simply haven't been able to afford a
certification course.  The also only offer your standard Computer and
Information Science degree here at the University of Delaware, nothing in
Web.

Here's something to do, though: most of the major universities I've looked
into do *not* offer a Web Development degree.  Lobby to have it added, but
in the meantime look to your local community college or technical college.
They more often than not WILL offer courses and ultimately an associate's or
bachelor's degree in Web Development.  More and more are offering courses in
open source solutions because the world appears to be getting over it's fear
of free products ("if they aren't charging for it, it can't be that good"
mentality).  Certifications/degrees are not only just the difference between
getting and not getting certain jobs, but for the ones you can get it's also
the difference between $25,000/yr and $75,000/yr unless you really *are*
God's gift to programming.

Take care,
Mike Frazer


"Chris Lott" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Computer science is considered an engineering discipline in most
> institutions. And I think that's good... we need people out there to
develop
> OS's, create database servers, etc. PHP can be effectively used in this
> curriculum, but C seems a lot more to the point.
>
> The place where PHP could (and should) make inroads is in the web
> development curriculum that is generally split off from the formal
computer
> science programs. I think that split is a good thing even if it is made
for
> the wrong reasons... and while one can quibble about "real programmers"
and
> such, these programs that encompass web design, web mastering, systems
admin
> and networking are the real ground for advancing PHP.
>
> Many institutions, like the one I teach for, are entrenched in ASP and
Java
> because that is understood by administrators as "a good thing to do" and
> because it is often easier to find instructors with these skills (or at
> least the certifications). But there are inroads being made. I have
> typically taught web design, internet and networking. Now I finally am
> getting a chance to teach a PHP/MySQL class as part of the web development
> curriculum (finally as in we finally found good instructors to take the
> other courses so that I would have time).
>
> Also, these programs are typically staffed by a cadre of aduncts. If you
> have PHP skills and teaching skills and you  can basically donate your
time
> for the peanuts that are offered (and the fun of it), there is a place for
> YOU to help promote PHP.
>
> Someone else remarked that certifications would advance PHP. There is
> something to that, particularly in the corporate marketplace to USE it.
More
> often, in my experience, PHP is slow to be adopted in the corporate
> environment because MS is so entrenched, and because MS' firm
establishment
> on the desktop means hiring MS people, who naturally promote and hire
other
> MS people, and administrators often equate using other technologies with
> abandoning their desktops.
>
> Certification has an equally negative aspect, though, unless stringently
and
> particularly administered and granted, which would defeat the marketing
> ends.
>
> c
> --
> Chris Lott
> http://www.chrislott.org/



-- 
PHP General Mailing List (http://www.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] Correct URL's

2002-01-27 Thread Alan McFarlane

> > > Please do not send HTML messages.
> > Sorry, Outlook is crap and I'm just too lazy to buy (on Win you have to

??? Outlook does not ~need~ to send HTML messages, it can be configured to
send text-only messages

Sheesh, It's about time you guys started looking properly at your
environments and learning how to use properly instead of just slanging MS

David Robley <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> In article <007901c1a588$120a6150$3c01a8c0@quasimodo>,
> [EMAIL PROTECTED] says...
> > - Original Message -
> > From: "Alexander Weber" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, January 25, 2002 10:34 AM
> > Subject: Re: [PHP] Correct URL's
> >
> >
> > > Stefan Rusterholz wrote
> 
> > > Please do not send HTML messages.
> > Sorry, Outlook is crap and I'm just too lazy to buy (on Win you have to
buy
> > almost everything) another e-mail client for my working machine.
>
> http://www.pegasus.org/
>
> It's free and a bit more virus resistant than a certain M$ product (well,
> any M$ product)
>
> --
>
> --
> David Robley
> Temporary Kiwi!



-- 
PHP General Mailing List (http://www.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: CGI vs. ISAPI

2002-01-27 Thread David

 use the ISAPI module since you are using with IIS

>'m fairly new to PHP, having worked with ColdFusion in the >past. Can somebody shed 
>some light on to the key >differences between the CGI installation and the ISAPI 
>>installation. I working with IIS on Win2k and using MySQL >for a db server. Thanks. 

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




[PHP] CGI vs. ISAPI

2002-01-27 Thread Benjamin deRuyter

I'm fairly new to PHP, having worked with ColdFusion in the past.  Can
somebody shed some light on to the key differences between the CGI
installation and the ISAPI installation.  I working with IIS on Win2k and
using MySQL for a db server.  Thanks.

 - Ben


-- 
PHP General Mailing List (http://www.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] Correct URL's

2002-01-27 Thread Dave Brotherstone

> >
> > > Stefan Rusterholz wrote
> 
> > > Please do not send HTML messages.
> > Sorry, Outlook is crap and I'm just too lazy to buy (on Win you
> have to buy
> > almost everything) another e-mail client for my working machine.
>
> http://www.pegasus.org/
>
> It's free and a bit more virus resistant than a certain M$ product (well,
> any M$ product)
>
> --

www.pmail.com ?  pegasus.org is *definately* virus free, (it's a yachting
team!!!)


-- 
PHP General Mailing List (http://www.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] Control Panel

2002-01-27 Thread Chris Kay

Love the rsponce Miles

If you could make it then make it

I mean what use would a control panel be on a website, why on earth
Would you want suck features as "Add / Remove Programes" and "Internet
Options"
On a website :)...

If you want it to be the best then a pre built script(s) is not going to
be good for you,
Because the best would have all features you need and more and something
out there is not made for you alone.

Building it would be your best choice...

Regards
Chris Kay

-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, 27 January 2002 1:52 PM
To: karthikeyan; [EMAIL PROTECTED]
Subject: Re: [PHP] Control Panel


Spare us1

Miles Thompson

On Saturday 26 January 2002 09:39 pm, karthikeyan wrote:
> Hi Guys,
>
>   I want a affordable and the best control panel for my website.  
> Though i can make it myself but it make some time to do that.  Do any 
> of you guys and gals know about this do let me know.
>
>   Looking forward for yours earliest reponse.
>
> karthikeyan.

-- 
PHP General Mailing List (http://www.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: eval()

2002-01-27 Thread Jason Wong

On Monday 21 January 2002 12:17, Alex Dowgailenko wrote:
> After getting very frustrated with arrays, I ended up using eval() in the
> following way:
>
> function top10() {
>   $i = 0;
>   $res = mysql_query("SELECT orders.pid, products.pid, orders.amount,
> products.pname FROM orders, products WHERE orders.uid!='' AND
> orders.pid=products.pid") or die(mysql_error());
>   while (list($opid, $ppid, $amount, $pname) = mysql_fetch_row($res)) {
>   $eval = '$temp["'.$pname.'"] = $temp["'.$pname.'"] + '.$amount.';';
>   eval($eval);
>   $i++;
>   }
>   arsort($temp);
>   return $temp;
> }

If you're using php4.03+ you could try:

  while ($row = mysql_fetch_assoc($res) {
$temp[$row['pname']] = $row['pname'] + $row['amount'];
$i++;
  }



-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Life is a sexually transmitted disease with 100% mortality.
*/

-- 
PHP General Mailing List (http://www.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: date and time triggerring

2002-01-27 Thread David Robley

In article <007b01c1a582$f9d67ec0$[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> Hi there,
> 
> Is there any one who could give me an idea regarding the date and time
> triggering PHP script. This date and time script whould gives an output if
> ever it hit "Jan 1" and print's it's  year.
> 
> Any idea?
> 
> Thanks in advance, and also to all who keeps on helping a newbie like me.

This can be done under *nix using cron, or Windows using Task Scheduler. 
You'll need a cgi version of PHP to run scripts this way.


-- 
David Robley
Temporary Kiwi!

-- 
PHP General Mailing List (http://www.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] Correct URL's

2002-01-27 Thread David Robley

In article <007901c1a588$120a6150$3c01a8c0@quasimodo>, 
[EMAIL PROTECTED] says...
> - Original Message -
> From: "Alexander Weber" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, January 25, 2002 10:34 AM
> Subject: Re: [PHP] Correct URL's
> 
> 
> > Stefan Rusterholz wrote

> > Please do not send HTML messages.
> Sorry, Outlook is crap and I'm just too lazy to buy (on Win you have to buy
> almost everything) another e-mail client for my working machine.

http://www.pegasus.org/

It's free and a bit more virus resistant than a certain M$ product (well, 
any M$ product)

-- 

-- 
David Robley
Temporary Kiwi!

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