Re: [PHP] Fork PHP script X at a time.

2004-09-21 Thread John Wards
On Tue, 2004-09-21 at 13:58, John Wards wrote:
> Not sure if anyone is interested in what I have come up with, its busy
> running just now but it seems to be performing ok.

Again adding to this thread for future reference.

Its just compleated all 90 threads in 1 hour 50 minutes and that was
running 5 at a time.

Very sucessful bit of code, I'm quite cuffed ;-)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Fork PHP script X at a time.

2004-09-21 Thread John Wards
Not sure if anyone is interested in what I have come up with, its busy
running just now but it seems to be performing ok.

$do =0;
$ok =0;
$count=0;

while($do!=1){
if($ok==0){
$sql = "SELECT * FROM locations WHERE parent = '0' AND doing=0 and 
done !=1 ORDER BY num DESC LIMIT 0 , 1";
$res = mysql_query($sql) or die ($sql.mysql_error());
while($_data = mysql_fetch_array($res)){
$id = $county_data["id"];
$sql2 = "UPDATE locations SET doing = 1 WHERE id= '$id' AND 
siteid=1 AND parent = '0'";
$res3 = mysql_query($sql2);
exec("/usr/local/bin/php fork.php ".$data["id"]." > /dev/null 
&");
}
}
$sql = "SELECT * FROM locations WHERE parent = '0' AND doing=1 AND done=0";
$res = mysql_query($sql);
$oknumber = mysql_num_rows($res);
if($oknumber == 5) $ok=1;
else $ok=0;

$sql = "SELECT * FROM locations WHERE parent = '0' AND done=0";
$res2 = mysql_query($sql);
$donumber = mysql_num_rows($res2);
if($donumber==0) $do=1;
}

In my fork.php script I set it to done=1 and doing = 0 once it has
finished.

This is pretty rough and ready and as my shell account won't let me do a
"top" i can't tell what sort of drain my loop is having on the system,
but hopefully it will be ok.

Just thought it might be an idea to post up this solution in-case
someone else has the same problem.

John
On Mon, 2004-09-20 at 16:36, John Wards wrote:
> Hi, I have a bit of a cold today so I probably would have figured this
> out for myself eventually but hey ;-)
> 
> Right I have a script that I need to run around 90 times thru a cron job
> but passing a different i.d. to it each time.
> 
> I have experimented with running all 90 at once and its a no go as it
> just makes the server run to slow and the session cookies I use time out
> (I am doing some libcurl things).
> 
> Also running them in a loop one at a time is no use because it takes
> about 8 hours.
> 
> What I would like to do is fork off say 5-10 at a time and when one is
> done start another one in its place, as they all take different length
> of times to compleate.
> 
> Any clues at where to start? Here is my fork all 90+ code...
> 
> 
> $sql = "SELECT * FROM locations WHERE parent = '0'";
> $res = mysql_query($sql) or die ($sql.mysql_error());
> while($data = mysql_fetch_array($res)){
>   exec("/usr/local/bin/php fork.php ".$_data["id"]." > /dev/null &");
> }
> 
> Cheers
> John Wards

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Fork PHP script X at a time.

2004-09-20 Thread John Wards
On Mon, 2004-09-20 at 16:56, Marek Kilimajer wrote:
> play around with popen() and stream_select()

Oooh that looks handy.

More night time reading I think!

Any further ideas to save a man with a cold from using his brain would
be great!

Cheers
John

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Fork PHP script X at a time.

2004-09-20 Thread John Wards
On Mon, 2004-09-20 at 16:45, Wouter van Vliet wrote:
> > 
> > What I would like to do is fork off say 5-10 at a time and when one is
> > done start another one in its place, as they all take different length
> > of times to compleate.
> > 
> > Any clues at where to start? Here is my fork all 90+ code...
> > 
> > $sql = "SELECT * FROM locations WHERE parent = '0'";
> > $res = mysql_query($sql) or die ($sql.mysql_error());
> > while($data = mysql_fetch_array($res)){
> >exec("/usr/local/bin/php fork.php ".$_data["id"]." > /dev/null &");
> > }
> 
> You should be able to find out about the PID's for every forked
> process, and use a loop (advisable with a sleep() in it) to see how
> many procs are still running.. When the amount drops somewhat, spawn
> another ..

Hmm, first off how would I get the PID for each process?

I could store each PID and then sleep for a minute, then check to see if
those PIDs are still valid (How would I do that?!) then fork some more
and loop till fade...

Think I will sleep on it.

John

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Fork PHP script X at a time.

2004-09-20 Thread John Wards
Hi, I have a bit of a cold today so I probably would have figured this
out for myself eventually but hey ;-)

Right I have a script that I need to run around 90 times thru a cron job
but passing a different i.d. to it each time.

I have experimented with running all 90 at once and its a no go as it
just makes the server run to slow and the session cookies I use time out
(I am doing some libcurl things).

Also running them in a loop one at a time is no use because it takes
about 8 hours.

What I would like to do is fork off say 5-10 at a time and when one is
done start another one in its place, as they all take different length
of times to compleate.

Any clues at where to start? Here is my fork all 90+ code...


$sql = "SELECT * FROM locations WHERE parent = '0'";
$res = mysql_query($sql) or die ($sql.mysql_error());
while($data = mysql_fetch_array($res)){
exec("/usr/local/bin/php fork.php ".$_data["id"]." > /dev/null &");
}

Cheers
John Wards

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Best open source banner advertising application

2003-06-05 Thread John Wards
On Wednesday 04 Jun 2003 4:21 pm, esctoday.com | wouter van vliet wrote:
> Does any of both (or any other) banner advertising applications support
> langauge specific banners.. So that Greek visitors would get only the
> banners you have said to be Greek? And for example maybe even if you don't
> have any advertisements for Cyprus it would get the Greek ones
> automatically?
>
> (or am I asking too much now?)

Both have geocoding ablity but you have to pay for it in both cases.

Cheers
John

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Best open source banner advertising application

2003-06-05 Thread John Wards
On Wednesday 04 Jun 2003 3:07 pm, Awlad Hussain wrote:
> Since you have used both systems, would you kindly share with us whats pro
> & cons of them both systems??
> I have used phpadsnew and like their user interface.. very neat.. not much
> sure about oasis.

oooh errr put on the sport...

Pros for PhpAdsNew:

Simple to install
Simpleish admin area.
Runs on anything that runs apache/php

Pros For Oasis

Very powerfull and intergrates great into our major website (which phpadsnew 
didn't)
Fast as bits.
More features than phpadsnew (traffic shaping for one which is rather handy)
Pdf reports (Not sure if phpadsnew does that but I can't think of it.)
Can be set up to cluster so has the ablility to handle unlimited page views.
120+ page manual

Cons for Phpadsnew.

To simple...
Slows our system down due to the number of requests we were pushing to it. We 
do 150-200 thousand page views a day but when running phpadsnew we had about 
4 or 5 different advert loactions so it was producing about 1 million 
requests a day for adverts.

Cons for Oasis.

Install not for the wary
Need root access
Has trouble with FreeBSD shared memory (Took our server down a few times so we 
had to stop using it, we are now on linux and are busy installing it again)
120+ page manual

HTH

Cheers
John Wards
SportNetwork.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Best open source banner advertising application

2003-06-04 Thread John Wards
On Wednesday 04 Jun 2003 2:41 pm, Randum Ian wrote:
> The best one without a shadow of a doubt would be phpnewads.

I would have to disagree on that one ;-)

http://oasis.sourceforge.net/

It wipes the floor with phpadsnew, I have used both.

But it can be a bit overkill if you are only a small site.

Cheers
John Wards
SportNetwork.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Protecting Code source.

2003-03-27 Thread John Wards
On Thursday 27 Mar 2003 7:31 pm, Vincent M. wrote:
> The only trouble is the price (960$), it's a little expensive for the
> student I am :-/
>
> Does anyone know any other less expensive way to protect my source code ?

http://www.ioncube.com/

They have a web based version that you do on a per file basis and is much 
cheaper for small jobs

Cheers
John Wards
SportNetwork.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] BBS software in PHP?

2003-02-19 Thread John Wards
On Wednesday 19 Feb 2003 9:25 am, Jean-Christian Imbeault wrote:
> Can anyone recommend a simple (and free) BBS module/software written in
> PHP. preferably something that writes to a DB and preferably PoserSQL.

If you want a simple and non bloated forum software you could do worse than 
use www.phorum.org.

Cheers
John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] ImageJPEG?

2003-02-07 Thread John Wards
On Friday 07 Feb 2003 9:26 pm, you wrote:
> Other than that you're
> code looks good to me.

Arrrgh! Bl*0dy cacheing in my ftp programgr

Cheers for looking though!

John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] ImageJPEG?

2003-02-07 Thread John Wards
Quickie

I want to save a modified jpeg to a file. I can out put it by doing this:

Header("Content-type: image/jpeg");

imagejpeg($image_thum);

imagedestroy($image_thum);

I want to save it to this location:

/images/1000/

with its original filename but with a t_ attached to the begining.

I tried this:
$uploadpath = "/images/1000/";
$temp = "t_".$imagefilename;
$imagefilename = $temp;
$dest = $uploadpath.$imagefilename;
ImageJPEG($image_thum,$dest);

but that did nothing.

What am I doing wrong?

Cheers
John Wards

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP Framework

2003-02-03 Thread John Wards
On Monday 03 Feb 2003 2:01 pm, karthikeyan.balasubramanian wrote:
> Hi All,
>
>   I finally decided to upgrade my PHP.  Just want to know your thoughts on
> which Framework is the best with a clear seperation of content from
> presentation.
>
>   Please let me know which do you think is the best and why?

I use SMARTY (smarty.php.net) and think its the dogs bolxs.

Its fast, its easy to use. The template pasing language is simple.

My site gets somewhere in the region on 100,000 p.v.s a day and it copes 
easily.

But, there is a pertender lurking in the shadows.

phorum.org, yes its a message board. But phorum 5 which is not pre alpha yet 
has its own built in templating system which I thnk with a bit of tweaking 
could be used as a full blown templating system.

John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] forum?

2002-12-24 Thread John Wards
www.google.com
www.hotscripts.com

- Original Message -
From: "Fatih Üstündað" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Tuesday, December 24, 2002 2:51 PM
Subject: [PHP] forum?


> do you know freeware forum in php I can easly use?
>
> thanks.
> fatih ustundag
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] RegExpres Prob

2002-12-19 Thread John Wards
On Thursday 19 Dec 2002 11:25 am, Wico de Leeuw wrote:
Preg_Replace('~src="(?!http://)~iS', 'src="http://www.domain.com/', $string);

Ha! Ta

I am all for quick fixes but I am new to RegExpresions...so could someone 
explain what its all doing for me.

Cheers
John


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RegExpres Prob

2002-12-19 Thread John Wards
I have a regexp problem

I want to go through some HTML and where  I want 
to change it to this http://www.domain.com/path/to/image.jpg";>

BUT

if the image tag is like this 

http://www.domain.com/path/to/image.jpg";>

already I don't want anything to happen

I thought this would do it:

ereg_replace("src=\"(^http)","src=\"http://www.domain.com/";, $string);

but it didn't...

Argh...

Cheers
John Wards

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] how to send an MSWORD email?

2002-12-13 Thread John Wards

>
>
> 3.some other better methods.

Have a look on pear.php.net for the mime mail class. It has things for 
attaching images and including them in an html email

Cheers
John Wards
SportNetwork.net

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Newline charactes causing problems

2002-12-05 Thread John Wards
On Thursday 05 Dec 2002 3:54 pm, Joshua E Minnie wrote:
> Already tried that.  Doesn't seem to change anything.
>
how about \r 

John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Newline charactes causing problems

2002-12-05 Thread John Wards
On Thursday 05 Dec 2002 3:48 pm, Joshua E Minnie wrote:
> A load of stuff..

I just read the fist few paragraphs and got bored;-)

but

Have you tried doing a str_replace for \n which is new line? just replate it 
with a blank string

John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: Re[2]: [PHP] need advice on template engine

2002-12-03 Thread John Wards
On Tuesday 03 Dec 2002 2:28 pm, Daniel Masson wrote:
> Ive been working with smarty and for me its awsome ... My advice is
> SMARTY !!!
>

I've just converted my 100,000 page views a day application to SMARTY and it 
is much quicker and it gives me much more control

Go for smarty it rocks..

John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How do I run a command as root?

2002-12-02 Thread John Wards
On Monday 02 Dec 2002 10:47 am, Luke van Blerk wrote:
> Hi
>
> I'm trying to find out how to run a command on the server as root. Does
> anybody know how to do this?
>

su root
password: your_root_password

then run your command

This is a php list not a *nix list

John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: [SMARTY] [Template - announce] Templeet 0.9.2 available

2002-11-07 Thread John Wards
Whats the point of this system? Someone explain this to me?

is it a template language? It doesn't look like one?

I am confuzed

On Thursday 07 Nov 2002 1:36 pm, Fabien Penso wrote:
> Hi everyone.
>
> I thought you would be interested about a new template system called
> Templeet. The way it works is fairly new. It's almost a new language
> which allows you to not have to do any PHP (when I say that, I think
> about the PHP syntax), but still offers all the PHP API, and much
> more. It focuses on performance.
>
> LinuxFr.org uses it since few weeks, as you can see the yearly load
> graph at http://linuxfr.org/images/load/load-yearly.png, since we have
> switched for Templeet, the load is much smaller. We handle about
> 600Khits/day theses days. Templeet is able to handle about 1 billion
> hits / month on a PII 400 depending of what you have to do.
>
> Templeet has a auto-install script which should make your life easy.
>
> To see an template's source :
>
> http://linuxfr.org/board/ is generated by
> http://linuxfr.org/template/board/index.tmpl
>
> Feedbacks are welcome, we always are interested about users wishes.
>
> http://templeet.org/ is the url.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] publishing php > mysql website on cd-rom

2002-11-06 Thread John Wards
Thinking about this more

A U.K. based electronics company has a CD which is Databse driven. It is
compleatly searchable etc

I think its either RS or Maplin.or it might be someone else ;-) but its a
company like them..

John
- Original Message -
From: "ROBERT MCPEAK" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "GUY CHALK" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, November 06, 2002 6:23 PM
Subject: Re: [PHP] publishing php > mysql website on cd-rom


> It's a database site, containing thousands of records, similar to a
products catalog like Amazon, for example.  Publishing as static pages is
not a viable option, and would greatly limit the search functionality.
>
> There must be a way to do this!  Thanks for all the feedback.
>
> >>> Maxim Maletsky <[EMAIL PROTECTED]> 11/06/02 12:10PM >>>
> Theoretically it is possible, but fact stays - you won't ever make it
> work well.
>
> So, try to find an alternative for this. Usually, this choice is made by
> the managers that know nothing about how webcontent works.
>
>
> --
> Maxim Maletsky
> [EMAIL PROTECTED]
>
>
>
> "ROBERT MCPEAK" <[EMAIL PROTECTED]> wrote... :
>
> > My organization has a need to publish some of our web content on a
CD-ROM.  I'm in search of suggestions on how to publish our dynamic content
(php/mysql templates) in some sort of "runtime" configuration that would let
users browse the site from cd.
> >
> > What's involved with this?  Is there such a thing as runtime mySQL?
What would it take to serve PHP from a CD?
> >
> > Help!  I don't know where to begin and am looking for advice.
> >
> > Thanks,
> >
> > Bob
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] publishing php > mysql website on cd-rom

2002-11-06 Thread John Wards
I dunno if its an old wives tail but I have heard that you can get 
apache/mysql and php running from a CD. You would of course need to turn off 
all logging etc.

Do a bit off google bashing.

John

On Wednesday 06 Nov 2002 9:50 am, .: B i g D o g :. wrote:
> That is going to be very hard to do...you might want to look at doing it
> all static...however, what are u going to do about the database
> connections...
>
> IMHO, i would take the php site and make it static and then put it on a
> CD-ROM...it might be out of date, however, it might be the fastest way
> for ya.
>
> Do you want them to access your site from the CD-ROM pages?
>
> You could create special pages on your site that the CD-ROM pages call.
> But that would require the user of the disc to have internet access.
>
> But running PHP from a cd-rom will probably not work unless you are
> doing some commandline cgi stuff...and i dont even want to think how
> that would work for ya...
>
> i would probably do something where static html pages pull data from
> your site...
>
> HTH...
>
> On Wed, 2002-11-06 at 16:44, ROBERT MCPEAK wrote:
> > My organization has a need to publish some of our web content on a
> > CD-ROM.  I'm in search of suggestions on how to publish our dynamic
> > content (php/mysql templates) in some sort of "runtime" configuration
> > that would let users browse the site from cd.
> >
> > What's involved with this?  Is there such a thing as runtime mySQL?  What
> > would it take to serve PHP from a CD?
> >
> > Help!  I don't know where to begin and am looking for advice.
> >
> > Thanks,
> >
> > Bob
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Who can tell me where I can get the cracked Zend Encoder3.0 ?

2002-10-31 Thread John Wards
On Thursday 31 Oct 2002 3:00 pm, jianking wrote:
> Who can tell me where I can get the cracked Zend Encoder 3.0 ?
Are you a muppet?

This list is run by the people who make Zend Encoder!

FOOL

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Flash and PHP?

2002-10-29 Thread John Wards
On Tuesday 29 Oct 2002 2:06 pm, Neil wrote:
> Does anyone use this?

Yes

next question..

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Error disabling

2002-10-04 Thread John Wards

A quickie woudl be put an @before every function that would report an error 
like mysql_query etc

John

On Friday 04 Oct 2002 11:51 am, Davíð Örn Jóhannsson wrote:
> I need to be able to disable error reporting on one page with php, I
> just don’t remember how to do this, if I remember correctly I could call
> some function in the begining of a php doc and tell it not to disply any
> errors that occur while parsing the doc.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Umm... Uh-oh

2002-10-04 Thread John Wards

ah never thought of that!

John

On Friday 04 Oct 2002 11:14 am, Stas Maximov wrote:
> The easiest and safest way to get around this problem is to place all your
> include files outside of your webroot directory (say one level up), so they
> will be accessible locally via includes, but NOT accessible via http.
>
> HTH, Stas
>
> - Original Message -
> From: "John Wards" <[EMAIL PROTECTED]>
> To: "PHP" <[EMAIL PROTECTED]>
> Sent: Friday, October 04, 2002 10:58 AM
> Subject: Re: [PHP] Umm... Uh-oh
>
>
> erm..would that alow hackers access? Say I have a database include file
> would hackers be able to get access to my database like this?
>
> (include('http://mysite.com/datainc.php');)
>
> I hope bloody not!!! if so how on earth do i get round that!
>
> John
>
> On Friday 04 Oct 2002 10:52 am, Marek Kilimajer wrote:
> > Use realpath() to check the path. I also suspect your script is
> > vulnarable to cross-site includes
> > (include('http://hacker.com/script.inc');)
> >
> > Rick Beckman wrote:
> > >Okay, I was mistaken... There is a gaping security hole in my simple
> > > li'l script... How do I modify it to only accept files from a certain
> > > path? I want the url format to be script.php?call=1 where "1" is the
> > > called file in the /includes/ directory. Just when I get optimistic I
> > > leave the entire system exposed. Yeah, that fits with my luck. :-)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Umm... Uh-oh

2002-10-04 Thread John Wards

so as my files are all .php I would be okay from an external hacking attempt?

I don't have any worry about internal as I am on a dedicated server

John

On Friday 04 Oct 2002 11:02 am, Justin French wrote:
> all my include files are *.inc, and I have a .htaccess file that makes
> apache refuse to serve those files directly thru http.
>
> Justin
>
> on 04/10/02 7:58 PM, John Wards ([EMAIL PROTECTED]) wrote:
> > erm..would that alow hackers access? Say I have a database include
> > file would hackers be able to get access to my database like this?
> >
> > (include('http://mysite.com/datainc.php');)
> >
> > I hope bloody not!!! if so how on earth do i get round that!
> >
> > John
> >
> > On Friday 04 Oct 2002 10:52 am, Marek Kilimajer wrote:
> >> Use realpath() to check the path. I also suspect your script is
> >> vulnarable to cross-site includes
> >> (include('http://hacker.com/script.inc');)
> >>
> >> Rick Beckman wrote:
> >>> Okay, I was mistaken... There is a gaping security hole in my simple
> >>> li'l script... How do I modify it to only accept files from a certain
> >>> path? I want the url format to be script.php?call=1 where "1" is the
> >>> called file in the /includes/ directory. Just when I get optimistic I
> >>> leave the entire system exposed. Yeah, that fits with my luck. :-)
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Umm... Uh-oh

2002-10-04 Thread John Wards

erm..would that alow hackers access? Say I have a database include file 
would hackers be able to get access to my database like this?

(include('http://mysite.com/datainc.php');)

I hope bloody not!!! if so how on earth do i get round that!

John

On Friday 04 Oct 2002 10:52 am, Marek Kilimajer wrote:
> Use realpath() to check the path. I also suspect your script is
> vulnarable to cross-site includes
> (include('http://hacker.com/script.inc');)
>
> Rick Beckman wrote:
> >Okay, I was mistaken... There is a gaping security hole in my simple li'l
> >script... How do I modify it to only accept files from a certain path? I
> >want the url format to be script.php?call=1 where "1" is the called file
> > in the /includes/ directory. Just when I get optimistic I leave the
> > entire system exposed. Yeah, that fits with my luck. :-)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Call HTML from php

2002-10-01 Thread John Wards

what is on line 3?

is the 
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 01, 2002 9:35 PM
Subject: Re: [PHP] Call HTML from php


> First thanks a lot, but
>
> I have the following code:
>
>  $database="PH";
> mysql_connect(localhost,"test","test");
> @mysql_select_db($database);
> $query = "SELECT ph_user.FIRST_NAME, FROM ph_user  WHERE
(ph_user.FIRST_NAME
> = \"test\"  )";
> $result=mysql_query($query);
> $num=mysql_num_rows($result);
> mysql_close();
> if ($num > 0){ Header("Location: file://c:/Test/company.html"); }
> else { Header("Location: file://c:/Test/register.html"); }
> ?>
>
> And I become an error message:
>
> Warning: Cannot add header information - headers already sent by (output
> started at C:\Program Files\Apache Group\Apache2\htdocs\redirect.php:3) in
> C:\Program Files\Apache Group\Apache2\htdocs\redirect.php on line 11
>
> What can I do?
>
> Thanks!
>
>
> "John Wards" <[EMAIL PROTECTED]> az alábbiakat írta a következo
> hírüzenetben: [EMAIL PROTECTED]
> > header("location:http://yourstuff";);
> >
> > Do this before any output to the user. eg echos or displaying html
> >
> > John
> > - Original Message -
> > From: "Anna Gyor" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, October 01, 2002 8:40 PM
> > Subject: [PHP] Call HTML from php
> >
> >
> > > Hi,
> > >
> > > how can I call a html site from my php script? I want to redirect the
> user
> > > to different html site depends on the php script result.
> > >
> > > Thanks!
> > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Call HTML from php

2002-10-01 Thread John Wards

header("location:http://yourstuff";);

Do this before any output to the user. eg echos or displaying html

John
- Original Message -
From: "Anna Gyor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 01, 2002 8:40 PM
Subject: [PHP] Call HTML from php


> Hi,
>
> how can I call a html site from my php script? I want to redirect the user
> to different html site depends on the php script result.
>
> Thanks!
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] mailing-list and forum combination?

2002-09-27 Thread John Wards

Well Phorum.org can sort of do it but its not very well documented.

It has a script in the scripts dir called phroum mail. Which takes email in 
and posts it to the selected forum and you can then set the forum to email 
all posts to an address

I have yet to get my head around it but I think this would do the 
tricksort of.

John

On Friday 27 Sep 2002 4:51 pm, taylor wrote:
> hi,
>
> does anyone know of a php-based combined mailing list and bulletin
> board/forum?
> something like a php lovechild of majordomo and yabbse?
>
> any pointers greatly appreciated!
>
> taylor


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] editor php

2002-09-19 Thread John Wards

Zend Studio if you can afford it...

www.zend.com

My work paid for it aint I lucky.

John Wards
SportNetwork.net
- Original Message - 
From: "Gian Michele" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 19, 2002 4:57 PM
Subject: [PHP] editor php


> Hi,
> does any body knows a cool editor for php that run under redhat 7.x and 
> where i can find?
> tanks  -- Gian Michele
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Join - problem

2002-09-18 Thread John Wards

not having the time to look at your code I am not sure but do this to see if
its mysql causeing the errors

$result = mysql_query($query) or die(mysql_error());
- Original Message -
From: "Henning" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 18, 2002 5:12 PM
Subject: [PHP] Join - problem


> Hello
> I'm using PHP4 and MySQL on Apache webserver.
> I have a table valled "liste" with names of some people, and a table
> called "postnummer" with zip-codes and citynames.
> My select should join the adress and zip from one table with the
> cityname from the other table.
> But my join-line does not work.   =:(
>
> My code results in this line:
>
> Warning: Supplied argument is not a valid MySQL result resource in
> /var/www/html/find/resultat.php on line 27
>
> The code is:
> mysql_select_db("adresser");
> $query = ("SELECT fornavn, efternavn, gade, liste.postnummer,
> postnummer.postbynavn FROM liste
> left join postnummer on liste.postnummer = postnummer.postnummer
> WHERE MATCH (fornavn, efternavn) AGAINST ('$search');");
> $result = mysql_query($query);
> while(list( $fornavn, $efternavn, $gade, $postnummer, $postbynavn) =
> mysql_fetch_row($result))
>
print("$fornavn$efternavn$gade$postnummer
$postbynavn\n");
>
>
> What is going on?
> The select is ok if I do not join, but then I'm not able to get the
> field "postbynavn" from the other table.
>
> PLEASE HELP!
>
> Henning
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] stopping repeated posts to a Bulletin Board

2002-09-17 Thread John Wards

Use some javascritp to blank out the submit button when its clicked. is a
quick and easyway.

Also try storing the sent data in sessions and compairing any new data sent
to the previous data.

John Wards
SportNetwork.net
- Original Message -
From: "Resarch and Development" <[EMAIL PROTECTED]>
To: "PHP General List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 17, 2002 2:52 PM
Subject: [PHP] stopping repeated posts to a Bulletin Board


> What is the best way to avoid the "repeated comment/post" syndrome
> caused by the user clicking the submit button one too many times
> because he/she did not wait for the browser to return a confirmation
> page or the script took too long to execute.
>
> Thanks in advance
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] mail() question

2002-09-17 Thread John Wards

is that definatly your SMTP mail connection?

I notice that you are using outlook. Do this to make sure:

Click tools(in outlook) then Accounts the click on your default acount the
click properties. CLick the server tab then note down the value in the Out
going mail server box and use this in your SMTP seting in php.ini.

Also have you restarted apache(or what ever server u are using) since you
changed the php.ini file
- Original Message -
From: "Meltem Demirkus" <[EMAIL PROTECTED]>
To: "John Wards" <[EMAIL PROTECTED]>
Sent: Tuesday, September 17, 2002 3:14 PM


> NCOMP>
> Subject: Re: [PHP] mail() question
> Date: Tue, 17 Sep 2002 17:15:15 +0300
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: 7bit
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Mailer: Microsoft Outlook Express 5.50.4522.1200
> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
>
> I changed it like this...
> but still not conneting problem occurs .
>
> [mail function]
> ; For Win32 only.
> SMTP = mail.momentum-dmt.com
>
> ; For Win32 only.
> sendmail_from = [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] mail() question

2002-09-17 Thread John Wards

You need to edit you php.ini file

Depending on you instlation it should be fount in either c:\windows\php.ini
or c:\winnt\php.ini

If it is not search for php.ini

Then edit the values:

[mail function]
; For Win32 only.
SMTP = localhost

; For Win32 only.
sendmail_from = [EMAIL PROTECTED]

Your SMTP setting would be what ever you send your mail with currently.
Looking at you email address somthing like mail.momentum-dmt.com and your
sendmail_from setting would just be your email address

Cheers
John
- Original Message -
From: "Meltem Demirkus" <[EMAIL PROTECTED]>
To: "John Wards" <[EMAIL PROTECTED]>
Sent: Tuesday, September 17, 2002 2:55 PM
Subject: Re: [PHP] mail() question


> how can I do them?..I am sorry maybe I am asking silly questions .It is
> because I am new on php...
> thnaks ..
> meltem
> - Original Message -
> From: "John Wards" <[EMAIL PROTECTED]>
> To: "Meltem Demirkus" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 17, 2002 4:50 PM
> Subject: Re: [PHP] mail() question
>
>
> > Have you set up you php.ini file correctly?
> >
> > You need to set up your SMTP settings and your sendmail_from settings
> >
> > John
> > - Original Message -
> > From: "Meltem Demirkus" <[EMAIL PROTECTED]>
> > To: "John Wards" <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Tuesday, September 17, 2002 2:43 PM
> > Subject: Re: [PHP] mail() question
> >
> >
> > > windows 2000
> > > by the way my whole code is this:
> > >
> > >  > >
> > > $msg = "Sender Name:\t$_POST[sender_name]\n";
> > > $msg .= "Sender E-Mail:\t$_POST[sender_email]\n";
> > > $msg .= "Message:\t$_POST[message]\n\n";
> > >
> > > $recipient = "mailto:[EMAIL PROTECTED];
> > > $subject = "Web Site Feedback";
> > >
> > > $mailheaders = "From: My Web Site <> \n";
> > > $mailheaders .= "Reply-To: $_POST[sender_email]\n\n";
> > >
> > > mail($recipient, $subject, $msg, $mailheaders);
> > >
> > > echo "Form Sent!";
> > > echo "Thank You, $_POST[$sender_name]";
> > > echo "Your feedback has been sent.";
> > > echo "";
> > >
> > >
> > >
> > >
> > > ?>
> > >
> > >
> > > - Original Message -
> > > From: "John Wards" <[EMAIL PROTECTED]>
> > > To: "Meltem Demirkus" <[EMAIL PROTECTED]>
> > > Cc: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, September 17, 2002 4:40 PM
> > > Subject: Re: [PHP] mail() question
> > >
> > >
> > > > Meltem
> > > >
> > > > What is you system set up? OS etc?
> > > >
> > > > Cheers
> > > > John Wards
> > > > SportNetwork.net
> > > > - Original Message -
> > > > From: "Meltem Demirkus" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Tuesday, September 17, 2002 2:35 PM
> > > > Subject: [PHP] mail() question
> > > >
> > > >
> > > > > Hi,
> > > > > I am trying to send an email by using the function mail().
> > > > > Although I use  in a form of mail($to, $subject, $message,
> $headers),
> > it
> > > > is
> > > > > giving this error:
> > > > > Failed to Connect
> > > > >
> > > > > So I think I am missing something ...
> > > > > Can anybody help me ?..
> > > > >
> > > > > thanks alot
> > > > >
> > > > > meltem demirkus
> > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] mail() question

2002-09-17 Thread John Wards

Have you set up you php.ini file correctly?

You need to set up your SMTP settings and your sendmail_from settings

John
- Original Message -
From: "Meltem Demirkus" <[EMAIL PROTECTED]>
To: "John Wards" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, September 17, 2002 2:43 PM
Subject: Re: [PHP] mail() question


> windows 2000
> by the way my whole code is this:
>
> 
> $msg = "Sender Name:\t$_POST[sender_name]\n";
> $msg .= "Sender E-Mail:\t$_POST[sender_email]\n";
> $msg .= "Message:\t$_POST[message]\n\n";
>
> $recipient = "mailto:[EMAIL PROTECTED];
> $subject = "Web Site Feedback";
>
> $mailheaders = "From: My Web Site <> \n";
> $mailheaders .= "Reply-To: $_POST[sender_email]\n\n";
>
> mail($recipient, $subject, $msg, $mailheaders);
>
> echo "Form Sent!";
> echo "Thank You, $_POST[$sender_name]";
> echo "Your feedback has been sent.";
> echo "";
>
>
>
>
> ?>
>
>
> - Original Message -
> From: "John Wards" <[EMAIL PROTECTED]>
> To: "Meltem Demirkus" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 17, 2002 4:40 PM
> Subject: Re: [PHP] mail() question
>
>
> > Meltem
> >
> > What is you system set up? OS etc?
> >
> > Cheers
> > John Wards
> > SportNetwork.net
> > - Original Message -
> > From: "Meltem Demirkus" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, September 17, 2002 2:35 PM
> > Subject: [PHP] mail() question
> >
> >
> > > Hi,
> > > I am trying to send an email by using the function mail().
> > > Although I use  in a form of mail($to, $subject, $message, $headers),
it
> > is
> > > giving this error:
> > > Failed to Connect
> > >
> > > So I think I am missing something ...
> > > Can anybody help me ?..
> > >
> > > thanks alot
> > >
> > > meltem demirkus
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] mail() question

2002-09-17 Thread John Wards

Meltem

What is you system set up? OS etc?

Cheers
John Wards
SportNetwork.net
- Original Message -
From: "Meltem Demirkus" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 17, 2002 2:35 PM
Subject: [PHP] mail() question


> Hi,
> I am trying to send an email by using the function mail().
> Although I use  in a form of mail($to, $subject, $message, $headers), it
is
> giving this error:
> Failed to Connect
>
> So I think I am missing something ...
> Can anybody help me ?..
>
> thanks alot
>
> meltem demirkus
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP mem leaks

2002-09-13 Thread John Wards

Hmm I am unsure as my server crashed on me this morning and restarted it
self so every thing is back to normal (15meg per process)

But I can never remeber noticing a much smaller Apache process. So I would
gues at yes the parent process gets larger too.

I though it was mod_ssl causing the problem but I have commented that out
from http.conf but that made no difference

Cheers
John Wards


> Is the apache parent process ( the one running under root) getting
> larger too?
>
> John Wards wrote:
>
> >After being told off on the dev list I have posted this on this list (I
> >thought it was techie enough to go on that list but I was wrong)
> >
> >I am running a large PHP/MySQL/Apache driven website and I am finding
that
> >the apache Processes get larger and larger as the days go on. When I
> >stop/start apache the processes are around 16-17 meg each and after a
week
> >they are about 40meg each and if we then get a large in flux of traffic
say
> >a Monday lunch time the server just pages out and dies...
> >
> >I have been on the apache list given them all my modules that I have
running
> >and they pointed the finger at PHP, I was told to change
maxrequestsperchild
> >to 100 but this made no difference. Is there a fix for this? or a planned
> >fix for this?
> >
> >Oh and here are the modules I am using:
> >
> >We are running Apache/1.3.26, PHP/4.2.2 mod_ssl/2.8.9 under FreeBSD 4.6.
> >Apache modules:
> >
> >mod_php4, mod_ssl, mod_setenvif, mod_so, mod_auth, mod_access, mod_alias,
> >mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir,
> >mod_autoindex, mod_include, mod_status, mod_negotiation, mod_mime,
> >mod_log_config, mod_env, http_core
> >
> >all compiled in except for mod_php4 and mod_ssl which are loaded using
> >LoadModule.
> >
> >Cheers
> >John Wards
> >SportNetwork.net
> >
> >
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] A mailing list

2002-09-13 Thread John Wards

Tony,

You are a star! I can't for the life of me get mailman working with qmail
and I have read every readme i can get my hands on.

I will probably go for one of the others you recomended!!

Your a life saver!

Cheers
John
- Original Message -
From: "Tony Earnshaw" <[EMAIL PROTECTED]>
To: "John Wards" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, September 13, 2002 10:50 AM
Subject: Re: [PHP] A mailing list

This is 100% OT, but very quickly said/written:

Stick at Mailman. Or explore alternatives such as ezmlm or Majordomo.
This is custom-written software and one couldn't *possibly* equal it
with a PHP-based approach.

I've implemented Mailman with Exim smtp server for different firms and
customers; there's a complete Exim how to and so on and so on.

Don't know what smtp software you run, or whether you're using procmail
or what, doesn't matter. Stick at Mailman.

Best,

Tony



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] A mailing list

2002-09-13 Thread John Wards

Guys and Gals sorry if this is off topic but I hope someone can answer this
question.

I need some mailing list software that works like this list i.e. its all
done through email and has a web based archive.

I know of mailman but I cannot get it to work and my questions go unanswered
on the mailman help list.

This is pretty urgent please help!

Cheers
John Wards
SportNetwork.net


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] A question about .php file extension

2002-09-12 Thread John Wards

make a .htaccess file like this


ForceType application/x-httpd-php


ForceType application/x-httpd-php


ForceType application/x-httpd-php


This makes the file main boards read php files

What we do with it is make dynamic pages look like dirs for example
sportnetwork.net/main/s85.php would just be sportnetwork.net/main.php?s=85
we use eregs to get the values out.

Cheers
John Wards
- Original Message -
From: "LI DONG" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 12, 2002 3:23 PM
Subject: [PHP] A question about .php file extension


> Hello everyone,
>
> It is a question about .php file extension. Is there any way to access
PHP4
> script in Apache 1.3.x without .php extension? For example, how to use
>
> http://localhost/phptest?id=22
>
> instead of
>
> http://localhost/phptest.php?id=22
>
> Thanks a lot!
>
> ld.
>
> _
> ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£http://www.hotmail.com/cn
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP mem leaks

2002-09-12 Thread John Wards

After being told off on the dev list I have posted this on this list (I
thought it was techie enough to go on that list but I was wrong)

I am running a large PHP/MySQL/Apache driven website and I am finding that
the apache Processes get larger and larger as the days go on. When I
stop/start apache the processes are around 16-17 meg each and after a week
they are about 40meg each and if we then get a large in flux of traffic say
a Monday lunch time the server just pages out and dies...

I have been on the apache list given them all my modules that I have running
and they pointed the finger at PHP, I was told to change maxrequestsperchild
to 100 but this made no difference. Is there a fix for this? or a planned
fix for this?

Oh and here are the modules I am using:

We are running Apache/1.3.26, PHP/4.2.2 mod_ssl/2.8.9 under FreeBSD 4.6.
Apache modules:

mod_php4, mod_ssl, mod_setenvif, mod_so, mod_auth, mod_access, mod_alias,
mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir,
mod_autoindex, mod_include, mod_status, mod_negotiation, mod_mime,
mod_log_config, mod_env, http_core

all compiled in except for mod_php4 and mod_ssl which are loaded using
LoadModule.

Cheers
John Wards
SportNetwork.net



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Cry for help

2002-09-12 Thread John Wards

I started also from a book Begining PHP 4 by wrox. I had a good
understanding of programming languages before I started as I had experience
of Delphi and some Java. oh and BASIC which I also learned what I was about
6! on a spectrum by any chance?

If you have a grasp of programming languages then PHP is dead easy to pick
up. I only started learning PHP about 9 months ago and I have designed a
website that is pulling 3 million hits a month (http://sportnetwork.net) and
I got a Job as a PHP programmer.

I would suggest looking for some basic programming books to get your head
around how programming languages work.if statments, for loops, while
loops, case statments etc these are used in most if not all programming
languages. And if you are brave you can look at object orrientated!! I have
just become brave enough!

On the install front. I got one of these multi purpose install things that
install apache,php, mysql and phpmyadmin at once which got me started but
after a we while i uninstalled it all and did each thing individually. I
just wanted to know where every thing went!

Anyhooo good luck and have fun!

John Wards
SportNetwork.net
- Original Message -
From: "lallous" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 12, 2002 11:22 AM
Subject: [PHP] Re: Cry for help


> Hello Chad,
>
> I started PHP from a book.
> I believe a book is a good way to start as it organized and well written
to
> make sure you're progressing chapter by chapter.
> After that, I read articles and tutorials as I needed to expand my skills.
>
> just my 2cents,
> Elias
>
>
> "Chad Winger" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I need to learn PHP and databases. If I had those skills, I would be so
> much
> > more succesful with my web designs. What I usually do, is make the html
> > templates, and then hire someone, usually expensively, to do the PHP and
> > MySQL bankend.
> >
> > Unfortunately, my programming skill is ZERO. Ok, maybe not zero, I do
have
> a
> > little bit of PERL experience, but it mainly comes in the form of
> > downloading prewritten scripts, and lots of trial and error in editing
> them
> > using common sense and drawing on my experience of BASIC which I learned
> > when I was 6 years old!
> >
> > I have browsed hours on the net looking for help in this sort of thing.
I
> > have downloaded programs, I have read hours of documents and "manuals",
> and
> > still, I am no further along than where I started. Programming and
> databases
> > are more of a mystery to me than women are. I'm absolutely CLUELESS.
> >
> > So basically, I need to learn this stuff as soon as humanly possible,
but
> I
> > have NO IDEA where to start. Let me tell you first what I have done
> thusfar.
> >
> > First thing I did was download something called mySQL Max version
3.23.49
> > directly from the website of mysql. I was under the impression that this
> > program would be something along the lines of MS Access in the
standpoint
> of
> > user interface, and it would allow you to create tables etc. (I do know
> how
> > to create some rudimentary tables in MS Access). So after I installed
this
> > program, I clicked on the icon to start it, and to my surprise, the only
> > thing that happened was the an MS-Dos box popped up for about 2/10ths of
a
> > second and then disappeared. So to me it was a waste of 2 hours of
> > downloading.
> >
> > After a bit more of prodding I saw that there was some configuring to
do.
> > For the life of me, I have no idea where to look, and even if I did, I
> > wouldnt have any idea what I need to configure anyways. Basically I want
> to
> > have this installed so that during my learning process of PHP, I can
test
> > and run things on my local machine, and not have to connect to the
> internet,
> > upload files etc.
> >
> >
> > Secondly, I downloaded something similar, called Easy PHP. The website
> said
> > it would install this and that and then something else that would allow
> you
> > to run PHP scripts on your local machine as well as being an editor to
> help
> > you write scripts. So I downloaded this as well. So 27 MB and 3 hours
> later
> > I have yet another useless program with no interfaces nothing. Just
> > something that runs in the background.
> >
> > So now I talked with my roommate and explained these issues to him. He
> > pointed me to a software called CodeCharge. So I downloaded that and
spent
> > hours looking through the "templates" and what not, and although I can
s

Re: [PHP] Re:[PHP]question

2002-09-11 Thread John Wards

Meltem,

Your english is very good but you have lost me :) could you explain more
slowly

John
- Original Message -
From: "Meltem Demirkus" <[EMAIL PROTECTED]>
To: "John Wards" <[EMAIL PROTECTED]>
Sent: Wednesday, September 11, 2002 3:32 PM
Subject: Re: [PHP] Re:[PHP]question


> then it is what I want ..:)) thanks alot..but one last thing I did not
> understand which part calling the whole form page (the other paragraphs
> written on the ame  page beside the form ) ..
> meltem
> - Original Message -
> From: "John Wards" <[EMAIL PROTECTED]>
> To: "Meltem Demirkus" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 11, 2002 5:26 PM
> Subject: Re: [PHP] Re:[PHP]question
>
>
> > oh missed something out...
> > function your_form_html($var_1=null, $var_2=null){
> >  global $message
> >
> > echo $message;
> > ?>etc...
> >
> > This will print out your form again with the variables the user submited
> > plus the message.
> >
> > Is this what you need?
> > John
> >
> > > I think it only prints out the message .. am I wrong?
> > >
> > > - Original Message -
> > > From: "John Wards" <[EMAIL PROTECTED]>
> > > To: "Meltem Demirkus" <[EMAIL PROTECTED]>;
> > > <[EMAIL PROTECTED]>
> > > Sent: Wednesday, September 11, 2002 5:09 PM
> > > Subject: Re: [PHP] Re:[PHP]question
> > >
> > >
> > > > right...
> > > >  > > > function your_form_html($var_1=null, $var_2=null){
> > > > global $message;
> > > > ?>
> > > > 
> > > >   
> > > >   
> > > >   
> > > > 
> > > >   
> > > > 
> > > >  > > > }
> > > > if($Submit =="Submit){
> > > > if($var_1 != "whatever" OR $var_2 != "this") {
> > > > $message = "You did wrong...";
> > > > your_form_html($var_1, $var_2);
> > > > }
> > > > else{
> > > > echo "whoo hoo done";
> > > > }
> > > > }else{
> > > > your_form_html();
> > > > }
> > > >
> > > > Is that what you are after?
> > > >
> > > > John
> > > > - Original Message -
> > > > From: "Meltem Demirkus" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Wednesday, September 11, 2002 2:53 PM
> > > > Subject: Fw: [PHP] Re:[PHP]question
> > > >
> > > >
> > > > > I think because of my bad english I made you misunderstand..I ment
> > this
> > > :
> > > > > for example  when a person miss an input  to fill on the from  and
> > then
> > > > > press the submit button I want him to be back to the same form
page
> > with
> > > a
> > > > > special message that I entered (something like :you left .
place
> > > > > empty).But I dont want to copy the same form page accoring to the
> > > possible
> > > > > mistakes .. I want to learn if there is an easier way to do
this...
> > > > > thanks to everyone..
> > > > >
> > > > > meltem
> > > > > - Original Message -
> > > > > From: "Meltem Demirkus" <[EMAIL PROTECTED]>
> > > > > To: <[EMAIL PROTECTED]>
> > > > > Sent: Wednesday, September 11, 2002 4:40 PM
> > > > > Subject: [PHP] Re:[PHP]question
> > > > >
> > > > >
> > > > > >
> > > > > > Thanks ...But I know this way about carrying data from one page
to
> > > > > another..
> > > > > > I want this message to be seen on the page without my doing
> > > > > anythingand
> > > > > > I cant do that?..
> > > > > >
> > > > > > - Original Message -
> > > > > > From: "John Wards" <[EMAIL PROTECTED]>
> > > > > > To: "Meltem Demirkus" <[EMAIL PROTECTED]>;
> > > > > > <[EMAIL PROTECTED]>
> > > > > > Sent: Wednesday, September 11, 2002 4:36 PM
> > > > > > Subject: Re: [PHP] question
> > > > > >
> > > > > >
> > > &g

Re: [PHP] Re:[PHP]question

2002-09-11 Thread John Wards

oh missed something out...
function your_form_html($var_1=null, $var_2=null){
 global $message

echo $message;
?>etc...

This will print out your form again with the variables the user submited
plus the message.

Is this what you need?
John

> I think it only prints out the message .. am I wrong?
>
> - Original Message -----
> From: "John Wards" <[EMAIL PROTECTED]>
> To: "Meltem Demirkus" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Wednesday, September 11, 2002 5:09 PM
> Subject: Re: [PHP] Re:[PHP]question
>
>
> > right...
> >  > function your_form_html($var_1=null, $var_2=null){
> > global $message;
> > ?>
> > 
> >   
> >   
> >   
> > 
> >   
> > 
> >  > }
> > if($Submit =="Submit){
> > if($var_1 != "whatever" OR $var_2 != "this") {
> > $message = "You did wrong...";
> > your_form_html($var_1, $var_2);
> > }
> > else{
> > echo "whoo hoo done";
> > }
> > }else{
> > your_form_html();
> > }
> >
> > Is that what you are after?
> >
> > John
> > - Original Message -
> > From: "Meltem Demirkus" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, September 11, 2002 2:53 PM
> > Subject: Fw: [PHP] Re:[PHP]question
> >
> >
> > > I think because of my bad english I made you misunderstand..I ment
this
> :
> > > for example  when a person miss an input  to fill on the from  and
then
> > > press the submit button I want him to be back to the same form page
with
> a
> > > special message that I entered (something like :you left . place
> > > empty).But I dont want to copy the same form page accoring to the
> possible
> > > mistakes .. I want to learn if there is an easier way to do this...
> > > thanks to everyone..
> > >
> > > meltem
> > > - Original Message -
> > > From: "Meltem Demirkus" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Wednesday, September 11, 2002 4:40 PM
> > > Subject: [PHP] Re:[PHP]question
> > >
> > >
> > > >
> > > > Thanks ...But I know this way about carrying data from one page to
> > > another..
> > > > I want this message to be seen on the page without my doing
> > > anythingand
> > > > I cant do that?..
> > > >
> > > > - Original Message -
> > > > From: "John Wards" <[EMAIL PROTECTED]>
> > > > To: "Meltem Demirkus" <[EMAIL PROTECTED]>;
> > > > <[EMAIL PROTECTED]>
> > > > Sent: Wednesday, September 11, 2002 4:36 PM
> > > > Subject: Re: [PHP] question
> > > >
> > > >
> > > > > pass the message as a variable
> > > > >
> > > > > header:location.php?message=$message
> > > > >
> > > > >
> > > > > - Original Message -
> > > > > From: "Meltem Demirkus" <[EMAIL PROTECTED]>
> > > > > To: <[EMAIL PROTECTED]>
> > > > > Sent: Wednesday, September 11, 2002 2:31 PM
> > > > > Subject: [PHP] question
> > > > >
> > > > >
> > > > > > Hi,
> > > > > > I am working on a process which turn to the previous page when
the
> > > user
> > > > > > enter something wrong in the form on a page .But I also want to
> warn
> > > the
> > > > > > user with an error message on this page ...I know using heder :
> > > location
> > > > > but
> > > > > > I couldn't  add the message ...
> > > > > > can anybody help me ? How can I add this message to the page..
> > > > > > thanks alot
> > > > > >
> > > > > > metos
> > > > > >
> > > > > >
> > > > > > --
> > > > > > PHP General Mailing List (http://www.php.net/)
> > > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re:[PHP]question

2002-09-11 Thread John Wards

right...


  
  
  

  


To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 11, 2002 2:53 PM
Subject: Fw: [PHP] Re:[PHP]question


> I think because of my bad english I made you misunderstand..I ment this :
> for example  when a person miss an input  to fill on the from  and then
> press the submit button I want him to be back to the same form page with a
> special message that I entered (something like :you left . place
> empty).But I dont want to copy the same form page accoring to the possible
> mistakes .. I want to learn if there is an easier way to do this...
> thanks to everyone..
>
> meltem
> - Original Message -
> From: "Meltem Demirkus" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 11, 2002 4:40 PM
> Subject: [PHP] Re:[PHP]question
>
>
> >
> > Thanks ...But I know this way about carrying data from one page to
> another..
> > I want this message to be seen on the page without my doing
> anythingand
> > I cant do that?..
> >
> > - Original Message -
> > From: "John Wards" <[EMAIL PROTECTED]>
> > To: "Meltem Demirkus" <[EMAIL PROTECTED]>;
> > <[EMAIL PROTECTED]>
> > Sent: Wednesday, September 11, 2002 4:36 PM
> > Subject: Re: [PHP] question
> >
> >
> > > pass the message as a variable
> > >
> > > header:location.php?message=$message
> > >
> > >
> > > - Original Message -
> > > From: "Meltem Demirkus" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Wednesday, September 11, 2002 2:31 PM
> > > Subject: [PHP] question
> > >
> > >
> > > > Hi,
> > > > I am working on a process which turn to the previous page when the
> user
> > > > enter something wrong in the form on a page .But I also want to warn
> the
> > > > user with an error message on this page ...I know using heder :
> location
> > > but
> > > > I couldn't  add the message ...
> > > > can anybody help me ? How can I add this message to the page..
> > > > thanks alot
> > > >
> > > > metos
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] question

2002-09-11 Thread John Wards

pass the message as a variable

header:location.php?message=$message


- Original Message -
From: "Meltem Demirkus" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 11, 2002 2:31 PM
Subject: [PHP] question


> Hi,
> I am working on a process which turn to the previous page when the user
> enter something wrong in the form on a page .But I also want to warn the
> user with an error message on this page ...I know using heder : location
but
> I couldn't  add the message ...
> can anybody help me ? How can I add this message to the page..
> thanks alot
>
> metos
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] sessions nightmare

2002-09-11 Thread John Wards

I can't see anything sticking out...but why have you done this...

$test2Url = "test2.php?PHPSESSID=" . session_id(  );

You don't need to do this. Try doing this

$test2Url = "test2.php";

Your server might be set up to use a different name for sessions

John Wards
SportNetwork.net
- Original Message -
From: "Chris" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 11, 2002 9:47 AM
Subject: [PHP] sessions nightmare


> Greetings,
>
> I am a new user to php and sessions and for the life of me I
> cannot figure this out
>
> I want to be able to have a user login (which is completed), they goto a
> search page (completed), and search for a particular item (completed). A
> page will display all the links for the items searched for (completed).
> What I want out of sessions is to when they click on the link for a
> particular item, the item number stay in a session so it can be called
> through out each page they goto. What I have as a base of test code is the
> following (this was taken from someone's example):
>
> test1.php:
>
>  session_start(  );
> session_register("SESSION");
>
> *** THE FOLLOWING VARIABLE ($retrived_itemno) WOULD NEED TO BE SET ON THE
> *** SEARCH PAGE ***
> $SESSION["item"] = $retrived_itemno;
>
> $test2Url = "test2.php?PHPSESSID=" . session_id(  );
>
> ?>
>
> Goto next page
>
>
> test2.php:
>
>  session_start( );
> echo "the retrived value equals: $SESSION[item]";
> ?>
>
>
>
> After you click the hyperlink on test1.php, test2.php will load and the
> session ID is in the URL, but nothing is displayed in the echo for
> $SESSION[item] in test2.php. What is going on?!#!#!$#
>
>
> Thanks a million in advance!!
> - Chris
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Session problem

2002-09-09 Thread John Wards

h I dunno why but if I returned $data from my function and registered it
out side the function it works fine and yes my session_start() is above my
function

John


> I am having problems with my sessions.
>
> This function registered my username password and userid in the session no
> problem.
>
> function login_chk($username, $password){
>  global $user_id;
>  $user_res = mysql_query("SELECT * FROM fan_users WHERE name = '$username'
> and password ='$password'") or die("Line 21 ".mysql_error());
>  $count = mysql_num_rows($user_res);
>  if($count ==1){
>   $user_data = mysql_fetch_row($user_res);
>   $user_id = $user_data[0];
>   if(!session_is_registered("user_id")) session_register("user_id");
>   if(!session_is_registered("username")) session_register("username");
>   if(!session_is_registered("password")) session_register("password");
>   $ok = 2;
>  }
>  else $ok =1;
>
>  return $ok;
> }//E-OF login_chk()
>
> But this function will not  register the details in the session. It
> registeres the variable but puts an ! before it.
>
> function get_data($user_id){
>  global $user_id;
>  $data_res = mysql_query("SELECT t.*, l.* FROM fan_teams as t, fan_league
as
> l WHERE t.league_id = l.lid AND user_id =$user_id") or die("Line 93
> ".mysql_error());
>  $count = mysql_num_rows($data_res);
>  if($count != 1){
>   setup_team_html($user_id);
>   exit();
>  }
>  else{
>   $data = mysql_fetch_row($data_res);
>   if(!session_is_registered("data")) session_register("data");
>  }
>
> }//E-OF get_data($user_id)
>
> The $data array is definatly an array as I have done foreach echo tests
and
> it dumps the information i am needing. but it won't put it in the session.
>
> Would it have anything to do with me testing it on my windoze box?
>
> Cheers
> John Wards
> SportNetwork.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Session problem

2002-09-09 Thread John Wards

I am having problems with my sessions.

This function registered my username password and userid in the session no
problem.

function login_chk($username, $password){
 global $user_id;
 $user_res = mysql_query("SELECT * FROM fan_users WHERE name = '$username'
and password ='$password'") or die("Line 21 ".mysql_error());
 $count = mysql_num_rows($user_res);
 if($count ==1){
  $user_data = mysql_fetch_row($user_res);
  $user_id = $user_data[0];
  if(!session_is_registered("user_id")) session_register("user_id");
  if(!session_is_registered("username")) session_register("username");
  if(!session_is_registered("password")) session_register("password");
  $ok = 2;
 }
 else $ok =1;

 return $ok;
}//E-OF login_chk()

But this function will not  register the details in the session. It
registeres the variable but puts an ! before it.

function get_data($user_id){
 global $user_id;
 $data_res = mysql_query("SELECT t.*, l.* FROM fan_teams as t, fan_league as
l WHERE t.league_id = l.lid AND user_id =$user_id") or die("Line 93
".mysql_error());
 $count = mysql_num_rows($data_res);
 if($count != 1){
  setup_team_html($user_id);
  exit();
 }
 else{
  $data = mysql_fetch_row($data_res);
  if(!session_is_registered("data")) session_register("data");
 }

}//E-OF get_data($user_id)

The $data array is definatly an array as I have done foreach echo tests and
it dumps the information i am needing. but it won't put it in the session.

Would it have anything to do with me testing it on my windoze box?

Cheers
John Wards
SportNetwork.net


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Newbie "Parse" error

2002-09-02 Thread John Wards

$subject = "Message From MCV Contact Form"
 you have missed out a ; on the above line

use your eyes...:-)

John
- Original Message - 
From: "Chase Knott" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 02, 2002 4:18 PM
Subject: [PHP] Newbie "Parse" error


> I am sure that someone here can see somehting that I am too stupid to... 
>   Here is my error:
> 
> Parse error: parse error, unexpected T_VARIABLE in send_contact_form.php 
> on line 13
> 
> Here is the code for the page:
> 
>  
> $msg = "E-Mail From MCV Contact Form\n";
> $msg .= "Sender's Name: \t$sender.name\n";
> $msg .= "Sender's E-Mail Address: \t$sender.email\n";
> $msg .= "Sender's Subject: \t$sender.subject\n";
> $msg .- "Sender's Message: \t$sender.message\n\n";
> 
> $to = "\t$recipient";
> 
> $subject = "Message From MCV Contact Form"
> 
> $mailheaders = "From MyComputerVendor\n";
> $mailheaders .= "Reply-To: $sender.email\n\n";
> 
> mail($to, $subject, $msg, $mailheaders);
> 
> 
> 
> Message Sent!
> 
> 
> 
> The Following Message Was Sent To: 
> Name:
> 
> E-Mail Address:
> 
> Subject:
> 
> Message:
> 
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Drawing graphs

2002-09-02 Thread John Wards

erm jgraph is what i use but for the life of me I cannot remeber the url

Try searching for it on hotscripts.com or http://php.resourceindex.com/

John
- Original Message - 
From: "Ivens Porto" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 02, 2002 2:35 PM
Subject: [PHP] Drawing graphs


> Hello,
> 
> I need to draw graphs in PHP (bar graphs, pie graphs, line/dot graphs,
> etc.). 
> 
> I know I can do that using the image creation and manipulation
> functions, but I would like to use a library, or something, so I don't
> have to write all the low level manipulation code.
> 
> Is there any graphs libraty available I can use with PHP?
> 
> 
> Regards,
> -- 
>   _/_/_/   _/_/_/_/_/_/
> Ivens Porto _/ _/_/_/
> OSE - Open Systems Engineering _/ _/_/_/
> http://www.ose.com.br _/ _/  _/_/_/  _/_/_/_/
> Phone: (55) 34 - 3214-5995   _/ _/_/_/
> Fax:   (55) 34 - 3214-5994  _/ _/_/_/
>  _/_/_/_/_/_/   _/_/_/
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] problem with include

2002-08-30 Thread John Wards

hmmbeyond my scope...but I did the following to test







And it echoed "onetwothree"

must be some setting on your system but what I don't knwo

John
- Original Message -
From: "skitum" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 30, 2002 12:06 PM
Subject: Re: [PHP] problem with include


> The same problem with require
>
> ----- Original Message -
> From: "John Wards" <[EMAIL PROTECTED]>
> To: "skitum" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Friday, August 30, 2002 1:02 PM
> Subject: Re: [PHP] problem with include
>
>
> > hmm.
> >
> > It should have nothing to do with cookies unless you are using cookies
in
> > the scripts.
> >
> > Try using require rather than include to see if that makes any
difference
> >
> > Cheers
> > John Wards
> > SportNetwork.net
> > p.s. your english is as good as mine and i am scottish..
> > - Original Message -
> > From: "skitum" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, August 30, 2002 11:53 AM
> > Subject: [PHP] problem with include
> >
> >
> > Hi all,
> >
> > Look at this code:
> >
> > // one.php
> > 
> > --- html code ---
> > // end file one.php
> >
> > // two.php
> > 
> > --- html code ---
> > //end two.php
> >
> > well, when I see in my browser www.myweb.com/two.php this shows two.php
> plus
> > the include file in it "three.php", so this works ok, but when i see in
my
> > browser (IE 6.0) www.myweb.com/one.php this shows one.php plus two.php,
> but
> > not three.php that is include into two.php
> >
> > What am I doing wrong?
> > Could be this because of cookies?
> >
> > Thanks for help
> > Peace & Love
> > skitum
> >
> > P.S. Forgive my bad english.
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] problem with include

2002-08-30 Thread John Wards

hmm.

It should have nothing to do with cookies unless you are using cookies in
the scripts.

Try using require rather than include to see if that makes any difference

Cheers
John Wards
SportNetwork.net
p.s. your english is as good as mine and i am scottish..
- Original Message -
From: "skitum" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 30, 2002 11:53 AM
Subject: [PHP] problem with include


Hi all,

Look at this code:

// one.php

--- html code ---
// end file one.php

// two.php

--- html code ---
//end two.php

well, when I see in my browser www.myweb.com/two.php this shows two.php plus
the include file in it "three.php", so this works ok, but when i see in my
browser (IE 6.0) www.myweb.com/one.php this shows one.php plus two.php, but
not three.php that is include into two.php

What am I doing wrong?
Could be this because of cookies?

Thanks for help
Peace & Love
skitum

P.S. Forgive my bad english.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP IDEs

2002-08-21 Thread John Wards

I use Zend Studio 2.5 it is very time saveing as it prompts me for variables
i have used before classws and function i have used before etc even if they
are in an include file. The projects feature is very usefull as I have two
major projects at the moment and I can easily switch between then and have
all my files at hand. If you can afford it get it!

For Mysql I use DBtools as I have many databases over many different servers
so it lets me have access to them all in one place and i can test out my
queries before i use them in a script which is very usefull.

I used to use PHPcoder but it is far too buggy to use on a day to day bases.

John
- Original Message -
From: "Jaski" <[EMAIL PROTECTED]>
To: "PHP General(E-mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, August 21, 2002 2:27 PM
Subject: Re: [PHP] PHP IDEs


> Even I would be very interested to know what every one out there
> uses for these. I use PhpMyAdmin for creating tables. Textpad for
> coding.
>
> Jaski
>
> On Wed, 21 Aug 2002 Michael Egan wrote :
> >I know similar threads have come up on this in the past but I
> >suspect it's a constantly changing picture.
> >
> >I recently saw a favourable review of Zend Studio 2.5 but
> >wondered, out of curiosity, what sort of tools people use to
> >develop PHP scripts and MySQL databases, tables and queries.
> >
> >Up until now, in an attempt to try and get to grips with these
> >packages, I've been using a variety of text editors from VI to
> >Kwrite.  But I'm wondering whether it might speed up development
> >times if I start to use one of the tools out there for working
> >with PHP and MySQL.
> >
> >Any thoughts?
> >
> >Michael Egan
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Simple Security Clarification

2002-08-21 Thread John Wards

Andre

Doc root = http://www.yoursite.com/
'/var/www/html/secure' = http://www.yoursite.com/secure/

So its not secure

You could use .htaccess files but I am not that clued up on them

John
- Original Message -
From: "Andre Dubuc" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 21, 2002 1:11 PM
Subject: [PHP] Simple Security Clarification


> In another thread [How do you protect individual files], Justin French
stated:
>
> "In real short, you want to store the files outside your htdocs root (so
they
> can't be served by http) . . ."
>
> My PHP setup serves files from DOCUMENT_ROOT=/var/www/html. If I place
files
> in '/var/www/html/secure' would this provide any isolation for file
access?
> Am I correct in thinking that 'below' is not the same as 'outside'
doc_root,
> and that i this case, no protection would be afforded?
>
> Tia,
> Andre
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Passing a PHP variable to javascript

2002-08-19 Thread John Wards

alert()
- Original Message -
From: "Michael" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 19, 2002 1:54 PM
Subject: [PHP] Passing a PHP variable to javascript


> Hello everyone,
>
> This may seem a newbie question...
>
> I have a PHP variable containing the text of the alert I want to display
> ($text) and I want to have it displayed in a javascript alert box
> (something like alert($text) ).
> I couldn't find out how to sort this out...
>
> Regards,
> Michael
>
>
>

__
> Pour mieux recevoir vos emails, utilisez un PC plus performant !
> Découvrez la nouvelle gamme DELL en exclusivité sur i (france)
> http://www.ifrance.com/_reloc/signhdell
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Apache 2.0 and PHP

2002-08-19 Thread John Wards

Guys and Girls got a question for you.

Is Apache 2.0 any good and is there any advantages to installing it?

Does it work fine enough with PHP and MySQL?

Would I be able to install it along side 1.3 and run it on a separate port?

Cheers
John Wards
SportNetwork.net


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] create header and redirecting

2002-08-15 Thread John Wards

Or maybe not

whats line 16?

John
- Original Message - 
From: "Reymond " <[EMAIL PROTECTED]>
To: "'John Wards'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, August 15, 2002 11:29 AM
Subject: RE: [PHP] create header and redirecting


> That's my randSession Function
> 
> function randSession()
> {
> $pass_len=8 ;
> $allchars = 'abcdefghijklmnopqrstuvwxyz0123456789';
> $string = '';
> mt_srand((double)microtime()*100);
> 
> for ($i=0;$i<$pass_len;$i++)
> {
> $string .= $allchars{mt_rand(0,strlen($allchars))};
> }
> 
> return $string;
> 
> }
> 
> -Original Message-
> From: John Wards [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, August 15, 2002 5:00 PM
> To: Reymond 
> Subject: Re: [PHP] create header and redirecting
> 
> $session_id = randSession();
>  
> Think this must be sending out a header
> 
> John
> - Original Message - 
> From: "Reymond " <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, August 15, 2002 11:00 AM
> Subject: [PHP] create header and redirecting
> 
> 
> > I have tree pages, we call it first.php, second.php, third.php 
> > On My first.php page, I have form (LOGIN FORM)  and I'd action it to
> > second page. Like this Below
> >  ..
> > 
> > In my second page I'd tried to use header, for redirecting to
> third.php
> > after check the session, in my Session table in my Database, (and I've
> > got the session on my database.
> >  second.php 
> > ..
> > if ($row["result"]=="0") 
> > {
> > header("location: http://www.blabla/blablba/second.php?message= > color=red>Incorrect Password");
> > }
> > elseif ($row["result"]!= 0) 
> > {
> > $id = $result_data['id'];
> > mysql_query("Delete from Session where user = '$id'", $cnx);
> > $session_id = randSession();
> > mysql_query("Insert into Session values('$id','$session_id')");
> > if ($result_data["level"]==1)
> > {
> > header("location:
> > third.php?id=$id&session_id=$session_id");<--LINE 33
> > }
> > else
> > {
> > header("location: third.php?id=$id&session_id=$session_id");
> > }
> > 
> > }
> > ..
> > ---
> > 
> > doesn't got redirecting to the third.php but I got error message  on
> my
> > second.php..., like this below.
> > 
> > Warning: Cannot add header information - headers already sent by
> (output
> > started at /home/unri/ketahanan-pangan/second.php:16) in
> > /home/unri/ketahanan-pangan/second.php on line 32
> > 
> > 1. so how to use buffer for redirecting 
> > 2. is it right if I give the action(I mean Action Form) in my
> first.php
> > page to the second.php page..???,  
> > 
> > note : I have check my Session table On My database (MYSQL), and I got
> > it...
> > 
> > Help... 
> > 
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Persistant Connections

2002-08-14 Thread John Wards

I am running a website which generates around 100,000 pageviews a day and I
am wondering if I stop using persistent conections to the database and use
normal open and close conections this would reduce the load onto my server?

Most conections are either made through my "main" file or the phorum message
board system.

Thanks in advance
John Wards



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP lib again

2002-08-13 Thread John Wards

Sorry to bother folks again but I have a few phplib questions again.

set_file() what does this do and would this be display() in smarty?

set_block() this one is baffeling me...can't think what it woudl be in
smarty!

parse() now is this display in smarty...oh me head...

p() argh is this display()!!

Thanks for any help!

John







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Php lib?

2002-08-13 Thread John Wards

Again ta!

I had sort of figured it out while waiting for someone to get back to
me.

Mental note..must learn objects.no argh

John

> Hi,
> sets the value of the var to be parsed later.
>
> HTH
>
> Andrey
>
> - Original Message -
> From: "John Wards" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, August 13, 2002 12:58 PM
> Subject: Re: [PHP] Php lib?
>
>
> > Thanks for that rather handy!
> >
> > Does anyone know what the function set_var() does in template.inc in
> phplib?
> > I persume it has something to do with the template system.but thats
as
> > much as I have figured out!!
> >
> > I am going to replace the phplib template system with Smarty there is
not
> a
> > converter for this(wishful thinking! anything for an easy life)
> >
> > My boss set me this task before he went on holiday...I am sure he is
> bloody
> > laghing his socks off right now! I wondered why he never bothered
porting
> > this for PHP4!
> >
> > Arrgh!
> >
> > John
> > > > Anyone got any handy hints on how to convert scripts running
> > > > on PHP3 and
> > > > PHPlib?
> > >
> > > 1. Roughly speaking, page_open() goes to session_start():
> > >
> > > Old:
> > > page_open(array("sess" => "my_web_Session"));
> > >
> > > New:
> > > session_start();
> > >
> > > 2. page_close() goes away; if you don't have time to remove all those
> > calls,
> > > write your own page_close() function that simply returns true.
> > >
> > > 3. Use functions instead of methods for managing the session
variables.
> > For
> > > example, for the object $sess created in step 1 above:
> > >
> > > Old:
> > > $sess->register('firstName');
> > >
> > > New:
> > > session_register('firstName');
> > >
> > > Brings back fond memories - not! ;)
> > >
> > > Kirk
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Php lib?

2002-08-13 Thread John Wards

Thanks for that rather handy!

Does anyone know what the function set_var() does in template.inc in phplib?
I persume it has something to do with the template system.but thats as
much as I have figured out!!

I am going to replace the phplib template system with Smarty there is not a
converter for this(wishful thinking! anything for an easy life)

My boss set me this task before he went on holiday...I am sure he is bloody
laghing his socks off right now! I wondered why he never bothered porting
this for PHP4!

Arrgh!

John
> > Anyone got any handy hints on how to convert scripts running
> > on PHP3 and
> > PHPlib?
>
> 1. Roughly speaking, page_open() goes to session_start():
>
> Old:
> page_open(array("sess" => "my_web_Session"));
>
> New:
> session_start();
>
> 2. page_close() goes away; if you don't have time to remove all those
calls,
> write your own page_close() function that simply returns true.
>
> 3. Use functions instead of methods for managing the session variables.
For
> example, for the object $sess created in step 1 above:
>
> Old:
> $sess->register('firstName');
>
> New:
> session_register('firstName');
>
> Brings back fond memories - not! ;)
>
> Kirk
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] dates greater than 2002-01-18 create error

2002-08-12 Thread John Wards

right am i missing something or is that not just an other Y2K "bug" waiting
to happen?

Not that I plan to be coding php in 2038 but my kids might be.:-P

John
- Original Message -
From: "Adam Voigt" <[EMAIL PROTECTED]>
To: "Jay Blanchard" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, August 12, 2002 5:26 PM
Subject: RE: [PHP] dates greater than 2002-01-18 create error


> Dude, did you read the PHP Date manual page?
>
> I quote:
>
> Note:  The valid range of a timestamp is typically from Fri, 13 Dec 1901
> 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that
> correspond to the minimum and maximum values for a 32-bit signed
> integer). On windows this range is limited from 01-01-1970 to
> 19-01-2038.
>
> Adam Voigt
> [EMAIL PROTECTED]
>
> On Mon, 2002-08-12 at 12:23, Jay Blanchard wrote:
> > [snip]
> >  > $day = "2038-01-19";
> >
> > $day_temp = date("d", strtotime("$day"));
> > $month_temp = date("m", strtotime("$day"));
> > $year_temp = date("Y", strtotime("$day"));
> > $temp_date = mktime (0,0,0,$month_temp  ,$day_temp+1 ,$year_temp);
> > echo date ("Y-m-d", $temp_date);
> >
> > ?>
> > [/snip]
> >
> > I take out '+1' and the result is 1969-12-31
> > I put in the '+1' and the result is 1970-01-01
> >
> > I change '2038-01-19' to '2002-01-19' and it works. Which is what the
> > subject of your message was, not  [PHP] dates greater than 2038-01-18
create
> > error
> >
> > HTH!
> >
> > Jay
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Php lib?

2002-08-12 Thread John Wards

Anyone got any handy hints on how to convert scripts running on PHP3 and
PHPlib?

Its doing my head in!

John Wards
SportNetwork.net


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP form port

2002-08-10 Thread John Wards

either do this

$your vars = value
include process.php;

or

header "process.php?your_var=value&your other stuff";

or

$url = http://www.yourserver.com/process.php?your_var=value&etc;
$contents = file($send);
This will execute your php file and return into $contents the html that is
outputed. You don't need to use the html if you don't want to.

John Wards
SportNetwork.net
- Original Message -
From: "Daniel Guerrier" <[EMAIL PROTECTED]>
To: "php user group" <[EMAIL PROTECTED]>
Sent: Saturday, August 10, 2002 5:14 PM
Subject: [PHP] PHP form port


> How do i execute a form post with php?
> I want to validate CCard info etc.. then perform the
> post with no furtheraction from the user.
>
> Basically If not valid stay here and show whats wrong
> ELSE post form to process.php
>
> __
> Do You Yahoo!?
> HotJobs - Search Thousands of New Jobs
> http://www.hotjobs.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Linux PHP editor

2002-08-09 Thread John Wards

Try Zend studio if you have the mulla it rocks!

http://www.zend.com/store/products/zend-studio.php

John Wards
SportNetwork.net
- Original Message -
From: "Negrea Mihai" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 09, 2002 12:21 PM
Subject: Re: [PHP] Re: Linux PHP editor


> try nedit from nedit.org
> you can download the patterns from the site to do php syntax highlight..
>
> I have combined it with cervisia from kde 3 and made it look smth like an
IDE
> :) .. and I've been working 4-6 hours per day for about half an year with
it
> with no problems.
>
> I also have tried Quanta but it is too huge for nothing... but if you need
> syntax completion maybe you should take a look at it.
>
> Good luck in your open source trip ;)
>
> --
> Negrea Mihai
> web: http://www.negrea.net
>
>
> On Friday 09 August 2002 02:11 pm, [EMAIL PROTECTED] wrote:
> > JJ Harrison\ writes:
> > > I just switched over to Red Hat Linux from Win2k...
> > >
> > > Only to find my fav editor only works on windows systems...
> > >
> > > could someone suggest a good replacement?
> > >
> > >
> > > --
> > > JJ Harrison
> > > [EMAIL PROTECTED]
> > > www.tececo.com
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> > simply vi or vim of pico :)
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php