Re: [PHP] Still trying to figure this out...

2006-06-19 Thread Robert Cummings
On Tue, 2006-06-20 at 02:37, Rob W. wrote:
> I still have not yet found anybody to help me with this.

You found PLENTY of people to help you on this. PLENTY of people gave
you perfectly valid solutions. YOU have a problem elsewhere that we are
unable to ascertain due to our current inability to read minds or
transcend our physical bodies to your location. The key to finding the
solution is to learn how to debug. Use lots of echos. Echo what you DID
receive from the database so that we know whether your query returns
what you think it does.

Right now all we know is what you tell us is in the database and what
you want us to do. We've given you answers, now it's time for you to
tell us what your query is actually getting, because if what we gave you
isn't working, then you sure as hell aren't getting what you say is in
your database... pretty ascii pictures notwithstanding... most of us on
this list aren't stupid.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Still trying to figure this out...

2006-06-19 Thread Rob W.
OMG Chris, Thankyou very much. That is exactally what I needed. If you wish 
for me to pay you some amount, I will be very happy to. Please send me a 
private email where I can paypal you. If not, Thank you again very much for 
the help.


Sorry everyone for the hastle for those of you wernt able to help with what 
I wanted.


- Rob

- Original Message - 
From: "Chris" <[EMAIL PROTECTED]>

To: "Rob W." <[EMAIL PROTECTED]>
Cc: 
Sent: Tuesday, June 20, 2006 1:39 AM
Subject: Re: [PHP] Still trying to figure this out...



Rob W. wrote:
I still have not yet found anybody to help me with this. All the code 
that people have given me has not worked at all. I still get no output. 
So to add a little more to this, I'm gonna define how the database looks.


--
|switchid|switchport |
--
|1  | 1  |
|1  | 2  |
|1  | 3  |
|1  | 4  |
|1  | 7  |
|1  | 10|
--


I'm sure the code that people have posted will work if you do more than 
just copy/paste it and try to understand it and match it to what you want.



$switch_ports_taken = array();

$query = "select switchport from table where switchid=1";
$result = mysql_query($query);

if (!$result) die("error: " . mysql_error());

while($row = mysql_fetch_assoc($result)) {
  array_push($switch_ports_taken, $row['switchport']);
}

echo "Got these ports: " . print_r($switch_ports_taken, true) . "";

$all_ports = range(1,24);

$unused_ports = array_diff($all_ports, $switch_ports_taken);

echo "Unused ports: " . print_r($unused_ports, true) . "";


If that doesn't work tell us what doesn't work and don't make us guess 
what's going on.


--
Postgresql & php tutorials
http://www.designmagick.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] Still trying to figure this out...

2006-06-19 Thread Chris

Rob W. wrote:
I still have not yet found anybody to help me with this. All the code 
that people have given me has not worked at all. I still get no output. 
So to add a little more to this, I'm gonna define how the database looks.


--
|switchid|switchport |
--
|1  | 1  |
|1  | 2  |
|1  | 3  |
|1  | 4  |
|1  | 7  |
|1  | 10|
--


I'm sure the code that people have posted will work if you do more than 
just copy/paste it and try to understand it and match it to what you want.



$switch_ports_taken = array();

$query = "select switchport from table where switchid=1";
$result = mysql_query($query);

if (!$result) die("error: " . mysql_error());

while($row = mysql_fetch_assoc($result)) {
  array_push($switch_ports_taken, $row['switchport']);
}

echo "Got these ports: " . print_r($switch_ports_taken, true) . "";

$all_ports = range(1,24);

$unused_ports = array_diff($all_ports, $switch_ports_taken);

echo "Unused ports: " . print_r($unused_ports, true) . "";


If that doesn't work tell us what doesn't work and don't make us guess 
what's going on.


--
Postgresql & php tutorials
http://www.designmagick.com/

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



Re: [PHP] php calendar

2006-06-19 Thread Ahmed Saad

On 19/06/06, Ryan A <[EMAIL PROTECTED]> wrote:

guess i am using special version of google...


an iGoogle? ;)

/ahmed

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



Re: [PHP] Still trying to figure this out...

2006-06-19 Thread Rob W.
I still have not yet found anybody to help me with this. All the code that 
people have given me has not worked at all. I still get no output. So to add 
a little more to this, I'm gonna define how the database looks.


--
|switchid|switchport |
--
|1  | 1  |
|1  | 2  |
|1  | 3  |
|1  | 4  |
|1  | 7  |
|1  | 10|
--

ect so on and so forth. There are other switch id's in there as well along 
with their switch port's which sorting the other switchid's is not a 
problem. I also know the maximum amount for each switchid so that's not a 
problem as well. I need to be able to display the missing numbers in there. 
I have no extra spaces in there for blank numbers. After a server has been 
entered in to the database, it take's that number that was not shown 
previously in the database and enters it in, there for displaying it and not 
making it available for the next time another server is added. I have no way 
to alter the database as I am trying to clone a program and this is the only 
thing haning me up as of right now. If I can find someone to solve this 
problem for me, I will be glad to send money via paypal for helping out 
solving this problem as I have been on it for 2 days now and this is the 
last bit of code for this program that is holding me up. Please read below 
for more information on what I am doing.


- Original Message - 
From: "Rob W." <[EMAIL PROTECTED]>

To: 
Sent: Monday, June 19, 2006 3:39 PM
Subject: [PHP] Still trying to figure this out...


Ok, I am still trying to get this figured out from what I tried doing last 
night. If anybody wants to try it, please be my guest. This is the deal. 
Create an INTEGER table. Put the numbers 1 - 24 in it. Leave out like number 
8, 9, 22, 23 ect.. Now create a php statement that will take and pull that 
out of the database, find out the missing numbers and display them as an 
html drop down selection.


And tedd in response to why, is because the values that are already located 
in the database represent in use already. They represent a server port that 
a server is sitting on, so that's not the problem. I could have done that 
along time ago.


Any help is appreciated but here is the current code that I have.


 $query="SELECT switchport FROM network";
 $result=mysql_query($query);
 $sql_range=mysql_fetch_array($result);
 $true_range=range(1,24);
 $next_range=array_diff($true_range,$sql_range);
 foreach ($next_range as $final_range) {
echo "$final_range\n";
 }

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



Re: [PHP] A way to stop spam on this list

2006-06-19 Thread MOKULEN_IMADICA
Dear Lyan and Tedd.

Thank you for your words.I am very glad.

> It would be nice if the English speaking people knew how to write English.

haha...yes,as a matter of fact,this list memberes are "very-familiar"
with English and I do sometimes not to understand what they want to
say.If we chatting in real world,I will say,"please say again".

>and Ithink people would have to be real small (more 
>like tiny) minded to dislike Japanese

yes,yes I know.

But when visiters of my sites who speaks English and Japanese know that
I join to the anti-spam-ring in Japan,they sometimes told me same: "it
has a purpose of making buy products and illegal softwares by most of
the English-spam,but most of Japanese spam are prostitution
relation".Actually,it is right(I know that and I think so,too).If Tedd
and Lyan read the all Japanese-spam which was sent to our list using
translation system provided by google,you will get to have such a
comment(and probably,Denis translated the japanese spam,I think).

>Creativity is great,but plagiarism is faster!

yes,it is exactly.We,the japanese,don't create one like PHP and Linux
and postfix and apache and so on in the net.Recently,the fact that the
professor of the art with authority in Japan had stolen the artwork of
the Italian wonderful painter was reported in Japan.The professer should
not steal but introduce the wonderful artist to us,the Japanese,I think.

Madoca



 

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



Re: [PHP] mysql_db_query & INSERT

2006-06-19 Thread John Nichel

Jay Blanchard wrote:

[snip]
How do I retrieve the auto generated primary key field 
in the first table during the first insert operation.

[/snip]

http://www.php.net/mysql_insert_id



You mean they have a manual for this stuff??

Holy Toledo!

--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com

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



Re: [PHP] GD problems

2006-06-19 Thread Chris

Beauford wrote:

What surprises me about this is that no one in the various forums,
newsgroups, email lists, etc. can offer a solution. I'm sure I'm not the
only one that's had this problem. I can't even get an answer from the gd
forums or faq's.


I offered the solution - install the header files and you'll be able to 
compile.


--
Postgresql & php tutorials
http://www.designmagick.com/

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



RE: [PHP] GD problems

2006-06-19 Thread Beauford
What surprises me about this is that no one in the various forums,
newsgroups, email lists, etc. can offer a solution. I'm sure I'm not the
only one that's had this problem. I can't even get an answer from the gd
forums or faq's.

I guess I'll have to see if I can find a captcha program that doesn't use
gd, or (shudder) move my web server to Windows.

Thanks again

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: June 19, 2006 10:14 PM
To: Beauford
Cc: php-general@lists.php.net
Subject: Re: [PHP] GD problems

Beauford wrote:
> Thanks for the reply, but what are these for then - libpng and 
> libjpeg? No where does it say I need anything else. I have searched 
> and searched for information on installing this and never have I seen 
> anything about -devel packages. Even in the link I gave it says 
> nothing about this. I've just spent the last hour searching for these 
> packages and can't even come close to finding anything - all I get is 
> the ones I've already installed, which I'm thinking are one and the 
> same - and they say Windows is bad. It only took me 5 minutes in 
> Windows to get this working.  As you can see I'm way pass frustrated.

Some things you learn from experience or asking questions :)

It's reasonably standard if you want to compile something into another
program, you need the headers (which are in the -devel package mostly). 
Databases are slightly different in that mysql and postgres (at least) give
you a mysql_config and pg_config to tell you about different stuff.

This of course all depends on which system you are running. Most package
based systems separate things out so the base package installs binaries
only, and the -devel package installs headers and things you need to compile
against it. Port systems (*bsd and gentoo for eg) of course are different
again.

I thought php told you what you needed, I know some other programs will stop
the configure script and say "to compile support for X you need package Y
installed". Obviously not..

--
Postgresql & php tutorials
http://www.designmagick.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] GD problems

2006-06-19 Thread David Robley
Beauford wrote:

> Thanks for the reply, but what are these for then - libpng and libjpeg? No
> where does it say I need anything else. I have searched and searched for
> information on installing this and never have I seen anything about -devel
> packages. Even in the link I gave it says nothing about this. I've just
> spent the last hour searching for these packages and can't even come close
> to finding anything - all I get is the ones I've already installed, which
> I'm thinking are one and the same - and they say Windows is bad. It only
> took me 5 minutes in Windows to get this working.  As you can see I'm way
> pass frustrated.
> 
> Thanks again
> 
> -Original Message-
> From: Chris [mailto:[EMAIL PROTECTED]
> Sent: June 19, 2006 9:10 PM
> To: Beauford
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] GD problems
> 
> Beauford wrote:
>> Hi again,
>> 
>> I started again to see if I could get it to work. I first removed
>> everything (libpng, libjpeg, zlib, and PHP). Then as before I followed
>> the info in the link below. Now I get the following when I run make
>> for PHP. Note also that I can not compile gd on it's own, I had to find a
> Slackware package for it.
>> Could this be the problem? Again, I have no idea what else to do as I
>> have followed all the info I could find on how to get this to work. I
>> have also included some info on gd below.
>> 
>> Thanks
>> 
>>  /home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c -o
>> ext/gd/libgd/gd_jpeg.o  && echo > ext/gd/libgd/gd_jpeg.lo
>> /home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:38:21: jpeglib.h: No
>> such file or directory
>> /home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:39:20: jerror.h: No such
>> file or directory
> 
> 
> You need the libjpeg-devel, libpng-devel and so on packages to compile
> support for these into php. I don't know slackware, so they might be
> called -dev or something, but you need the "dev" packages which contain
> the header files.
> 
> --
> Postgresql & php tutorials
> http://www.designmagick.com/

Slackware installs these header files in /usr/include by default - you may
need to add to your configure the following:

--with-jpeg-dir=/usr --with-png-dir=/usr


/var/log/packages contains files for each package you have installed - those
files contain details of what was instaled where.

GD should compile just fine on Slack - it does for me so you may be missing
something iwhen you do configure for gd??

Cheers
-- 
David Robley

Funny, only sensible people agree with me.
Today is Sweetmorn, the 25th day of Confusion in the YOLD 3172. 

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



RE: [PHP] mysql_db_query & INSERT

2006-06-19 Thread Jay Blanchard
[snip]
How do I retrieve the auto generated primary key field 
in the first table during the first insert operation.
[/snip]

http://www.php.net/mysql_insert_id

 

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



Re: [PHP] mysql_db_query & INSERT

2006-06-19 Thread Chris

Prathaban Mookiah wrote:
I have run into a tricky situation and need some help to work my way through 
the problem. I use MySQL.


I accept some data from the user and insert them into two tables.

1. I insert part of the data into the first table. I do not specify the 
primary key field. It is auto generated through auto_increment.  All the 
other fields can have duplicates.
2. Then I want to insert the other part of the data along with the primary 
key that was automatically generated during the previous insert operation 
into the second table.


My problem is this: How do I retrieve the auto generated primary key field 
in the first table during the first insert operation. I cannot go back to 
the table and query using the data I inserted since as I mentioned earlier 
there can be duplicates. I simply cannot retreive the maximum value since 
some other user could have inserted something during that time.


Any ideas?


http://www.php.net/mysql_insert_id

--
Postgresql & php tutorials
http://www.designmagick.com/

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



[PHP] mysql_db_query & INSERT

2006-06-19 Thread Prathaban Mookiah
I have run into a tricky situation and need some help to work my way through 
the problem. I use MySQL.

I accept some data from the user and insert them into two tables.

1. I insert part of the data into the first table. I do not specify the 
primary key field. It is auto generated through auto_increment.  All the 
other fields can have duplicates.
2. Then I want to insert the other part of the data along with the primary 
key that was automatically generated during the previous insert operation 
into the second table.

My problem is this: How do I retrieve the auto generated primary key field 
in the first table during the first insert operation. I cannot go back to 
the table and query using the data I inserted since as I mentioned earlier 
there can be duplicates. I simply cannot retreive the maximum value since 
some other user could have inserted something during that time.

Any ideas?

Thanks in advance.

Cheers,

Prathap

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



Re: [PHP] GD problems

2006-06-19 Thread Chris

Beauford wrote:

Thanks for the reply, but what are these for then - libpng and libjpeg? No
where does it say I need anything else. I have searched and searched for
information on installing this and never have I seen anything about -devel
packages. Even in the link I gave it says nothing about this. I've just
spent the last hour searching for these packages and can't even come close
to finding anything - all I get is the ones I've already installed, which
I'm thinking are one and the same - and they say Windows is bad. It only
took me 5 minutes in Windows to get this working.  As you can see I'm way
pass frustrated.


Some things you learn from experience or asking questions :)

It's reasonably standard if you want to compile something into another 
program, you need the headers (which are in the -devel package mostly). 
Databases are slightly different in that mysql and postgres (at least) 
give you a mysql_config and pg_config to tell you about different stuff.


This of course all depends on which system you are running. Most package 
based systems separate things out so the base package installs binaries 
only, and the -devel package installs headers and things you need to 
compile against it. Port systems (*bsd and gentoo for eg) of course are 
different again.


I thought php told you what you needed, I know some other programs will 
stop the configure script and say "to compile support for X you need 
package Y installed". Obviously not..


--
Postgresql & php tutorials
http://www.designmagick.com/

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



Re: [PHP] A way to stop spam on this list

2006-06-19 Thread tedd
At 4:17 PM -0700 6/19/06, Ryan A wrote:
>--- MOKULEN_IMADICA <[EMAIL PROTECTED]> wrote:
>
> > Unfortunately I am not familiar with English to the
>> extent that I can
>> send advice to my dear list in each time,but I
>> always appreciate
> > members.
>>
>-snip-
>
>As for your English, I think its really good, I
>daresay if any of us (English speaking people) tried
>to write in your language it would be a lotlot
>worse.
>
>Cheers!
>Ryan

It would be nice if the English speaking people knew how to write English.

tedd
-- 

http://sperling.com  http://ancientstones.com  http://earthstones.com

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



RE: [PHP] GD problems

2006-06-19 Thread Beauford
Thanks for the reply, but what are these for then - libpng and libjpeg? No
where does it say I need anything else. I have searched and searched for
information on installing this and never have I seen anything about -devel
packages. Even in the link I gave it says nothing about this. I've just
spent the last hour searching for these packages and can't even come close
to finding anything - all I get is the ones I've already installed, which
I'm thinking are one and the same - and they say Windows is bad. It only
took me 5 minutes in Windows to get this working.  As you can see I'm way
pass frustrated.

Thanks again

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: June 19, 2006 9:10 PM
To: Beauford
Cc: php-general@lists.php.net
Subject: Re: [PHP] GD problems

Beauford wrote:
> Hi again,
> 
> I started again to see if I could get it to work. I first removed 
> everything (libpng, libjpeg, zlib, and PHP). Then as before I followed 
> the info in the link below. Now I get the following when I run make 
> for PHP. Note also that I can not compile gd on it's own, I had to find a
Slackware package for it.
> Could this be the problem? Again, I have no idea what else to do as I 
> have followed all the info I could find on how to get this to work. I 
> have also included some info on gd below.
> 
> Thanks
> 
>  /home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c -o 
> ext/gd/libgd/gd_jpeg.o  && echo > ext/gd/libgd/gd_jpeg.lo
> /home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:38:21: jpeglib.h: No 
> such file or directory
> /home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:39:20: jerror.h: No such 
> file or directory


You need the libjpeg-devel, libpng-devel and so on packages to compile
support for these into php. I don't know slackware, so they might be called
-dev or something, but you need the "dev" packages which contain the header
files.

--
Postgresql & php tutorials
http://www.designmagick.com/

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



Re: [PHP] GET, POST, REQUEST

2006-06-19 Thread Richard Lynch
On Sun, June 18, 2006 2:19 am, Satyam wrote:
> - Original Message -
> From: "Rory Browne" <[EMAIL PROTECTED]>
>
>>
>> Good code won't be vulnerable to register_globals either, but having
>> register_globals on is a security problem because there are security
>> flaws
>> that can only be exploited when register_globals is enabled.
>>
>
> Actually, code quality cannot overcome the vulnerability of
> register_globals.  Every program will have global variables.

You clearly do not really understand the meaning behind
"register_globals" and "global variables" in PHP... :-)

Or perhaps you don't consider initializing variables as code quality
issue.

Because if you initialize EVERY variable, register_globals on/off has
zero effect.

That said:

Sooner or later, somebody will make a mistake and not initialize a
variable, or even mis-type a variable name, or succumb to client
demands and install some icky badly-written forum, shopping cart,
blog, or whatever with un-initialized variables, and then you're
screwed.

So turn register_globals OFF.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] How to run one php app from another? RECAP

2006-06-19 Thread Chris

Richard Lynch wrote:

On Mon, June 19, 2006 8:13 pm, Chris wrote:

Manuel Amador (Rudd-O) wrote:

Excuse me... in which scenarios isn't fork() available?  As far as I
know, it even works on Windows (albeit slower... not that you'll be
gaining any performance by curl'ing your URL - that's actually
slower
than fork()).

It's (probably) not that the fork() etc commands don't work on
windows,
just that the php functions don't.

http://www.php.net/pcntl


fork() in anything other than CLI/CGI is dangerous because PHP
extensions (and/or web-server extensions) are not known to be
thread-safe.


I'm not debating any of that, he asked why the functions don't work in 
windows, I said that the php functions don't, not necessarily that 
fork() doesn't.


--
Postgresql & php tutorials
http://www.designmagick.com/

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



Re: [PHP] How to run one php app from another? RECAP

2006-06-19 Thread Richard Lynch
On Mon, June 19, 2006 8:13 pm, Chris wrote:
> Manuel Amador (Rudd-O) wrote:
>> Excuse me... in which scenarios isn't fork() available?  As far as I
>> know, it even works on Windows (albeit slower... not that you'll be
>> gaining any performance by curl'ing your URL - that's actually
>> slower
>> than fork()).
>
> It's (probably) not that the fork() etc commands don't work on
> windows,
> just that the php functions don't.
>
> http://www.php.net/pcntl

fork() in anything other than CLI/CGI is dangerous because PHP
extensions (and/or web-server extensions) are not known to be
thread-safe.

So, by definition, when you fork in a web-server, you are just ASKING
for an intermittent bug, that will be virtually impossible to catch
with QA and which will bite you in the ass when you are slashdotted,
i.e. at the worst possible time.

If your run a special PHP server with NOTHING loaded into it, no
mysql, no gd, no nothing, you could *MAYBE* have some reasonable
chance of it not puking all over you blue suede shoes...

But I sure wouldn't bet the company bottom line on it.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Still trying to figure this out...

2006-06-19 Thread Robert Cummings
On Mon, 2006-06-19 at 21:09, Rob W. wrote:
> $range = array_flip( range( 1, 24 ) );
> 
> $query = "SELECT switchport FROM network ";
> if( ($result = mysql_query( $query )) !== false )
> {
> while( ($row = mysql_fetch_array( $result )) !== false )
> {
> unset( $range[$row[0]] );
> }
> }
> 
> foreach( $range as $switchport => $foo )
> {
> echo ' value="'.$switchport.'">'.$switchport.''."\n";
> 
> $result = 0;
> }
> 
> 
> With that, I dont get anything, Not sure what you mean by empty to is_null 
> ect..


You have mixed up replies... either way I suggest you look at what YOU
are doing wrong. The above code is sound. (although I don't know who
slipped in "$result = 0;" since it serves no purpose.

What I suggest you do is add echo statements thoughout the loops. To see
which loops are entered and how many times etc. More than likely you
have some kind of error reporting disabled and you have a bug elsewhere
in your code of which none of us are privy.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] GET, POST, REQUEST

2006-06-19 Thread Richard Lynch
On Sat, June 17, 2006 1:25 pm, Ben Ramsey wrote:
> Using $_REQUEST is similar to using register_globals. You simply
> cannot
> trust the origin of the data. It's possible that a variable by the
> name
> of "foo" exists as a cookie, POST value, and GET value. If you use
> $_REQUEST, you cannot be assured that the value you are getting is
> from
> the scope you intend to retrieve it.

But it may well be that your script just doesn't CARE where the data
came from.

GET, POST, COOKIE, whatever.

If somebody is using my pagination script, and wants links or buttons
or whatever, I don't really give a damn where $page comes from.

It has to be a positive int, but I don't care how they code the user
interface.

$_REQUEST is very handy for that.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] How to run one php app from another? RECAP

2006-06-19 Thread Chris

Manuel Amador (Rudd-O) wrote:

Excuse me... in which scenarios isn't fork() available?  As far as I
know, it even works on Windows (albeit slower... not that you'll be
gaining any performance by curl'ing your URL - that's actually slower
than fork()).


It's (probably) not that the fork() etc commands don't work on windows, 
just that the php functions don't.


http://www.php.net/pcntl

--
Postgresql & php tutorials
http://www.designmagick.com/

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



Re: [PHP] GD problems

2006-06-19 Thread Chris

Beauford wrote:

Hi again,

I started again to see if I could get it to work. I first removed everything
(libpng, libjpeg, zlib, and PHP). Then as before I followed the info in the
link below. Now I get the following when I run make for PHP. Note also that
I can not compile gd on it's own, I had to find a Slackware package for it.
Could this be the problem? Again, I have no idea what else to do as I have
followed all the info I could find on how to get this to work. I have also
included some info on gd below.

Thanks

 /home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c -o ext/gd/libgd/gd_jpeg.o  &&
echo > ext/gd/libgd/gd_jpeg.lo
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:38:21: jpeglib.h: No such file
or directory
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:39:20: jerror.h: No such file
or directory



You need the libjpeg-devel, libpng-devel and so on packages to compile 
support for these into php. I don't know slackware, so they might be 
called -dev or something, but you need the "dev" packages which contain 
the header files.


--
Postgresql & php tutorials
http://www.designmagick.com/

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



Re: [PHP] Organizing a group project

2006-06-19 Thread Chris

Matt Palermo wrote:
Hello all.  I'm the webmaster and developer of all the software and content 
at SweetPHP.com.  I have a few ideas for some new scripts that I would love 
to work on, but don't have enough time to fully commit.  I would love to 
start up a group effort for a few things and be part of a development team, 
this way, I get to help out, but I won't have to carry the entire load 
myself.  I've seen the great products that come from great development 
teams.  Up until this point I've pretty much just been developing software 
on my own.  As a change of pace, I would love to start up a group project 
for a couple ideas I've had.  Does anyone know of good sites that might be a 
starting point for something like this?  Maybe a site where I could create 
the idea for a project and any interested people could sign up (or apply) to 
join the development team?  I could announce it on my site, but I don't know 
if I have too many developers visiting, so that might not be the best way. 
If anyone has done anything similar to this in the past, please give me your 
feedback.  I still plan on developing software on my own, but I'd love to 
opportunity work with and learn from other developers as well.


Sourceforge.net or freshmeat.net have everything you need to do all of 
this.. Create a new project, announce some "jobs", see what happens.. it 
has cvs etc all set up already so you don't have to.


I'm sure there are plenty of other sites like these, but these would be 
your more popular ones.


If it's database specific, there is forge.mysql.com for mysql, or 
pgfoundry.org for postgresql.


--
Postgresql & php tutorials
http://www.designmagick.com/

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



Re: [PHP] Still trying to figure this out...

2006-06-19 Thread Rob W.

   $range = array_flip( range( 1, 24 ) );

   $query = "SELECT switchport FROM network ";
   if( ($result = mysql_query( $query )) !== false )
   {
   while( ($row = mysql_fetch_array( $result )) !== false )
   {
   unset( $range[$row[0]] );
   }
   }

   foreach( $range as $switchport => $foo )
   {
   echo 'value="'.$switchport.'">'.$switchport.''."\n";


   $result = 0;
   }


With that, I dont get anything, Not sure what you mean by empty to is_null 
ect..


- Rob

- Original Message - 
From: "Xavier Casto" <[EMAIL PROTECTED]>

To: "'Rob W.'" <[EMAIL PROTECTED]>
Cc: 
Sent: Monday, June 19, 2006 7:37 PM
Subject: RE: [PHP] Still trying to figure this out...



Ok Rob,

I tested my code in Oracle (obviously changed for that database type)
and discovered I needed to change "empty" to "is_null" I had forgotten 
that

empty represents zero but we aren't getting a count so we needed to check
for a null.

it worked me for once I made that change and didn't need to do the other
change I had previously mentioned.

-Original Message-
From: Rob W. [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 6:50 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Still trying to figure this out...

Yeah, that's what i'm trying to print is the missing numbers in the db.

That's what I've been trying to figure out this whole time.

- Original Message -
From: "Xavier Casto" <[EMAIL PROTECTED]>
To: "'Rob W.'" <[EMAIL PROTECTED]>
Cc: 
Sent: Monday, June 19, 2006 6:34 PM
Subject: RE: [PHP] Still trying to figure this out...




Are there any numbers missing in your database table between 0 and the
number you assigned to $maxport?

-Original Message-
From: Rob W. [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 6:26 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Still trying to figure this out...

Yep, and still nothing output's.


- Original Message - 
From: "Xavier Casto" <[EMAIL PROTECTED]>

To: "'Rob W.'" <[EMAIL PROTECTED]>
Cc: 
Sent: Monday, June 19, 2006 6:20 PM
Subject: RE: [PHP] Still trying to figure this out...



You did make sure to assign a numerical value to $maxport?

-Original Message-
From: Rob W. [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 6:15 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Still trying to figure this out...

This also didnt work, Still giving me no output just like the last try.
 - Original Message - 
 From: Xavier Casto

 To: Rob W.
 Cc: php-general@lists.php.net
 Sent: Monday, June 19, 2006 4:33 PM
 Subject: Re: [PHP] Still trying to figure this out...


 Have you ever thought of doing something like this:

 for($i = 0; $i <= $maxport; $i++)
 {
 $query="SELECT switchport FROM network WHERE switchport = ".$i;
 $result=mysql_query($query);
 if(empty($result))
 {
 echo "$i";
 }
 }


 It should only return the ones that aren't in the table and they will
automatically be sorted in ascending order.



 On 6/19/06, Rob W. <[EMAIL PROTECTED]> wrote:
   Ok, I am still trying to get this figured out from what I tried doing
last night. If anybody wants to try it, please be my guest. This is the
deal. Create an INTEGER table. Put the numbers 1 - 24 in it. Leave out
like
number 8, 9, 22, 23 ect.. Now create a php statement that will take and
pull
that out of the database, find out the missing numbers and display them
as
an html drop down selection.

   And tedd in response to why, is because the values that are already
located in the database represent in use already. They represent a 
server
port that a server is sitting on, so that's not the problem. I could 
have

done that along time ago.

   Any help is appreciated but here is the current code that I have.


 $query="SELECT switchport FROM network";
 $result=mysql_query($query);
 $sql_range=mysql_fetch_array($result);
 $true_range=range(1,24);
 $next_range=array_diff($true_range,$sql_range);
 foreach ($next_range as $final_range) {
echo "$final_range\n";
 }








--
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] Still trying to figure this out...

2006-06-19 Thread Rob W.

Nope, still does nothing.


- Original Message - 
From: "Xavier Casto" <[EMAIL PROTECTED]>

To: "'Rob W.'" <[EMAIL PROTECTED]>
Cc: 
Sent: Monday, June 19, 2006 6:49 PM
Subject: RE: [PHP] Still trying to figure this out...



I think the problem is I forgot to reset $result to 0



 for($i = 0; $i <= $maxport; $i++)
 {
 $query="SELECT switchport FROM network WHERE switchport = ".$i;
 $result=mysql_query($query);
 if(empty($result))
 {
 echo "$i";


  $result=0;


 }
 }



Though I still haven't tested it, I don't have a current installation of
MySQL...

-Original Message-
From: Xavier Casto [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 6:34 PM
To: 'Rob W.'
Cc: php-general@lists.php.net
Subject: RE: [PHP] Still trying to figure this out...


Are there any numbers missing in your database table between 0 and the
number you assigned to $maxport?

-Original Message-
From: Rob W. [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 6:26 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Still trying to figure this out...

Yep, and still nothing output's.


- Original Message - 
From: "Xavier Casto" <[EMAIL PROTECTED]>

To: "'Rob W.'" <[EMAIL PROTECTED]>
Cc: 
Sent: Monday, June 19, 2006 6:20 PM
Subject: RE: [PHP] Still trying to figure this out...



You did make sure to assign a numerical value to $maxport?

-Original Message-
From: Rob W. [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 6:15 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Still trying to figure this out...

This also didnt work, Still giving me no output just like the last try.
 - Original Message - 
 From: Xavier Casto

 To: Rob W.
 Cc: php-general@lists.php.net
 Sent: Monday, June 19, 2006 4:33 PM
 Subject: Re: [PHP] Still trying to figure this out...


 Have you ever thought of doing something like this:

 for($i = 0; $i <= $maxport; $i++)
 {
 $query="SELECT switchport FROM network WHERE switchport = ".$i;
 $result=mysql_query($query);
 if(empty($result))
 {
 echo "$i";
 }
 }


 It should only return the ones that aren't in the table and they will
automatically be sorted in ascending order.



 On 6/19/06, Rob W. <[EMAIL PROTECTED]> wrote:
   Ok, I am still trying to get this figured out from what I tried doing
last night. If anybody wants to try it, please be my guest. This is the
deal. Create an INTEGER table. Put the numbers 1 - 24 in it. Leave out
like
number 8, 9, 22, 23 ect.. Now create a php statement that will take and
pull
that out of the database, find out the missing numbers and display them 
as

an html drop down selection.

   And tedd in response to why, is because the values that are already
located in the database represent in use already. They represent a server
port that a server is sitting on, so that's not the problem. I could have
done that along time ago.

   Any help is appreciated but here is the current code that I have.


 $query="SELECT switchport FROM network";
 $result=mysql_query($query);
 $sql_range=mysql_fetch_array($result);
 $true_range=range(1,24);
 $next_range=array_diff($true_range,$sql_range);
 foreach ($next_range as $final_range) {
echo "$final_range\n";
 }








--
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] Organizing a group project

2006-06-19 Thread Matt Palermo
Hello all.  I'm the webmaster and developer of all the software and content 
at SweetPHP.com.  I have a few ideas for some new scripts that I would love 
to work on, but don't have enough time to fully commit.  I would love to 
start up a group effort for a few things and be part of a development team, 
this way, I get to help out, but I won't have to carry the entire load 
myself.  I've seen the great products that come from great development 
teams.  Up until this point I've pretty much just been developing software 
on my own.  As a change of pace, I would love to start up a group project 
for a couple ideas I've had.  Does anyone know of good sites that might be a 
starting point for something like this?  Maybe a site where I could create 
the idea for a project and any interested people could sign up (or apply) to 
join the development team?  I could announce it on my site, but I don't know 
if I have too many developers visiting, so that might not be the best way. 
If anyone has done anything similar to this in the past, please give me your 
feedback.  I still plan on developing software on my own, but I'd love to 
opportunity work with and learn from other developers as well.

Thanks,

Matt Palermo
http://sweetphp.com 

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



Re: [PHP] mime.magic adding more types

2006-06-19 Thread Jochem Maas
Mark Steudel wrote:
> Hi there,
> 
> I'm writing some code that looks at a video file given to it and writes up
> the correct embed html and outputs it to the browser. I though that I would
> use mime_content_type() function to detect the type of each video, but after
> enabling it, I found that it doesn't have the mime type for windows media
> player. After some researching I had some following questions:
> 
> 1. Can someone explain what each column means in the magic.mime file:
> 
> 0 short   0143561 application/x-bcpio
> 
> 2. Does anyone have any windows media, realplayer mime types they'd like to
> share for the magic.mime file
> 
> 3. I saw that the mime_type extension have been deprecated in favor of pecl
> fileinfo, is installing and using the pecl extension as easy as pear install

I believe that it should be:

pecl install fileinfo

> fileinfo? Does it detect windows media, real player, and quicktime videos?

I have no idea. reading the source of the extension gives me the impression
that it may rely on the same magic.mime file you have been looking at (I
might very well be completely wrong) - at any rate it relies on some kind of
'mime db'

> 
> 4. Any other suggestions on detecting what type of video file is being
> processed? I suppose looking at file extensions is another method, though I
> like the idea of mime type detection over file extension examination.

looking at the file extension is a bit lame and definitely insecure ...
going the route of checking the mimetype (i.e. using code that actually checks
the file to try to determine what it is) would be the way to go.

then again maybe you could do both to cover all bases (e.g. file extension 
check fallback)?

[just thinking out loud]

> 
> Thanks, Mark
> 

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



Re: [PHP] running conditions while looping through arrays....

2006-06-19 Thread Richard Lynch
On Mon, June 19, 2006 11:05 am, IG wrote:
> I want to run filters on an pop3 inbox.

You may want to just use IMAP protocol...

> I have the following arrays which I'll get from the database-
>
> $subject
> $email
> $body
> $subject_like
> $email_like
> $body_like
>
> I then go through each email in turn using this loop-

I do it just like this:

http://l-i-e.com/imap/index.phps

> $popy = "{".$pop3."/pop3:110}INBOX";
>$mailbox = imap_open($popy, $un, $pw);
>  $num_messages = imap_num_msg($mailbox);
> if ($num_messages <= $no_srch) {$rrt = 0;} else {$rrt =
> $num_messages-$no_srch;}
>for($i=$num_messages; $i>($rrt); $i--) {
>
>
> What I want to do is to check if the email address or subject or body
> of
> each email is exactly like any of the details stored in the arrays
> $subject, $email, $body and to check if the email address or subject
> or
> body contains a word or phrase from the arrays $subject_like,
> $email_like, $body_like.
>
> For example-
>
> $subject[0] = "SPAM";   $email[0]= "";
> $body[0] = "";
> $subject_like[0] = "";
> $email_like[0] = "";
> $body_like[0] = "";
> // If the subject of the email = "spam"
>
> $subject[1] = "";   $email[1]= "[EMAIL PROTECTED]";
> $body[1] = "";
> $subject_like[1] = "";
> $email_like[1] = "";
> $body_like[1] = "";
> // if the email address of the email = "[EMAIL PROTECTED]"
>
> $subject[2] = "";   $email[2]= "";
> $body[2] = "spam body text";
> $subject_like[2] = "";
> $email_like[2] = "";
> $body_like[2] = "";
> // if the body of the email = "spam body text"
>
> $subject[3] = "SPAM";   $email[3]= "[EMAIL PROTECTED]";
> $body[3] = "";
> $subject_like[3] = "";
> $email_like[3] = "";
> $body_like[3] = "";
> // if the subject of the email = "SPAM" AND the email address =
> "[EMAIL PROTECTED]"
>
> $subject[4] = "SPAM";   $email[4]= "";
> $body[4] = "";
> $subject_like[4] = "";
> $email_like[4] = "";
> $body_like[4] = "spam text";
> // if the subject of the email = "SPAM" AND the body contains "spam
> text"
>
>
> If any of the above conditions are met then the email message is then
> stored in a database and deleted of the POP3 server.
>
> Is there a quick way of doing the above?  The only way I can think of
> is
> by looping through each array for every email. This is really really
> slow. I'd be grateful for some help here

I found that using SpamAssassin (SA), and setting up a different
directory for each 'score' in SA and then sorting my incoming email
for a month by 'score' into those boxes...

pretty much, everything scoring higher than 1 or 2 was spam.

After I trashed all 3+ SA, my own personal spam filters in PHP were
pretty superfluous.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] PHP Automation

2006-06-19 Thread Richard Lynch
On Mon, June 19, 2006 8:32 am, Jef Sullivan wrote:
> I have a situation that I'm not sure how it can be done with PHP. I
> have
> written a web-application that produces
>
> a monthly statement for our customers. Now, I need to automate the
> printing of these monthly statements.
>
> The way I was thinking of doing this was through Perl. However, I have
> discovered that a Perl script will not
> work.

E.   A Perl script would work if you could learn Perl...

> I know I can build the URL to the monthly statement. What I don't know
> how to do is automate this process

On Un*x, use "man 5 crontab" in the shell, or Google for it.
On Windows, set up a "Scheduled Task"

> and get it to print to a specific printer. Any help would be greatly
> appreciated.

You're on your own for getting a printer to work...

-- 
Like Music?
http://l-i-e.com/artists.htm



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



RE: [PHP] GD problems

2006-06-19 Thread Beauford
Hi again,

I started again to see if I could get it to work. I first removed everything
(libpng, libjpeg, zlib, and PHP). Then as before I followed the info in the
link below. Now I get the following when I run make for PHP. Note also that
I can not compile gd on it's own, I had to find a Slackware package for it.
Could this be the problem? Again, I have no idea what else to do as I have
followed all the info I could find on how to get this to work. I have also
included some info on gd below.

Thanks

 /home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c -o ext/gd/libgd/gd_jpeg.o  &&
echo > ext/gd/libgd/gd_jpeg.lo
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:38:21: jpeglib.h: No such file
or directory
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:39:20: jerror.h: No such file
or directory
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:49: error: parse error before
"cinfo"
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c: In function
`fatal_jpeg_error':
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:54: error: `cinfo' undeclared
(first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:54: error: (Each undeclared
identifier is reported only once
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:54: error: for each function
it appears in.)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c: At top level:
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:96: error: parse error before
"cinfo"
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c: In function `gdImageJpegCtx':
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:100: error: storage size of
`cinfo' isn't known
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:101: error: storage size of
`jerr' isn't known
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:104: error: syntax error
before "row"
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:105: error: `JSAMPROW'
undeclared (first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:107: error: `JDIMENSION'
undeclared (first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:107: error: parse error before
"nlines"
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:117: error: `row' undeclared
(first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:130: error: `JCS_RGB'
undeclared (first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:133: error: `TRUE' undeclared
(first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:143: error: parse error before
"_safe_emalloc"
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:144: error: `JSAMPLE'
undeclared (first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:145: error: `rowptr'
undeclared (first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:150: error: `JPEG_LIB_VERSION'
undeclared (first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:154: error: `JPEG_COM'
undeclared (first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:171: error: `nlines'
undeclared (first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:194:2: #error IJG JPEG library
BITS_IN_JSAMPLE value must be 8 or 12
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c: At top level:
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:230: error: parse error before
"cinfo"
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c: In function
`gdImageCreateFromJpegCtx':
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:240: error: storage size of
`cinfo' isn't known
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:241: error: storage size of
`jerr' isn't known
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:244: error: syntax error
before "row"
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:246: error: `JSAMPROW'
undeclared (first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:246: error: parse error before
"rowptr"
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:249: error: `JDIMENSION'
undeclared (first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:249: error: parse error before
"nrows"
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:260: error: `row' undeclared
(first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:276: error: `JPEG_APP0'
undeclared (first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:278: error: `TRUE' undeclared
(first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:279: error: `JPEG_HEADER_OK'
undeclared (first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:300: error: `JCS_CMYK'
undeclared (first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:300: error: `JCS_YCCK'
undeclared (first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:303: error: `JCS_RGB'
undeclared (first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:330: error:
`jpeg_saved_marker_ptr' undeclared (first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:330: error: parse error before
"marker"
/hom

Re: [PHP] IMAP Search

2006-06-19 Thread Jochem Maas
CodeHeads wrote:

...

> 
> U, you referred me to a page about smart questions..what about
> your TOP posting?

Richard has more than enough karma on this list to get away with a top-post
every half hour or so.

> 
> Nevermind, I see the PHP list is filled with smart asses so I will find it
> out on my own.



> 
> And YES, there was a question in there, I guess everyone has a simple mind.

I suppose we have to infer the question?

> 
> Will
> 

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



Re: [PHP] An annoying session problem

2006-06-19 Thread Richard Lynch
On Mon, June 19, 2006 10:26 am, Alex Major wrote:
> Hi there.
> I'm working my way through a new script, but I've stumbled into a
> problem.
> Some data that I've set into a session, won't be processed by part of
> my php
> code, but then later on in the page I can get the session value to
> output.
>
> Also, just so that its clear, the mysql code is correct (I can put it
> into
> phpmyadmin and get results from it.
>
> Heres the code (this code is 'included' in another page, where the
> session
> originates and session_start(); is set.)
>
>  // Lets see how much the person has at the moment.
> $current_resource_query = "SELECT food, wood, stone, gold,
> population
> FROM game_resources WHERE user_id = '".$_SESSION['user_id']."'";

First, figure out if the query you THINK you are sending is what you
are sending:
echo $current_resource_query;

Yes, I know you said you did this, but keep it in here for debugging
for  awhile.

Most crucial, is to make SURE the 'user_id' really is what you expect,
and not just glance at the 32-character gobbledy-gook and say "Yeah,
that's right."

> $current_resource_result = mysql_query($current_resource_query);

Next, you HAVE to do error-checking with mysql_error();

> $current_resource = mysql_fetch_assoc($current_resource_result);
>
> ?>
> 
>   
>   ?>
>   
>   
> Food: 
> Wood: 
> Stone: 
> Gold: 
> Session id is:  ''.$_SESSION['user_id'].''
> ?>
>   
> 
>
> The error may not necessarily be to do with the session, but non of
> the
> $current_resources are showing.
>
> Thanks for any help guys/gals.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Simulating mysql_real_escape_string

2006-06-19 Thread Richard Lynch


Honestly, just connect to the database earlier in your code...

if you insist on not doing that, use mysql_escape_strign and just
forget ever moving to Unicode data.

On Mon, June 19, 2006 3:58 pm, Tim Traver wrote:
> Hi all,
>
> ok, have a relatively complicated architecture of php scripts in
> place,
> and after reading more about SQL injection, want to make sure that I
> clean my data completely before I enter it into a MySQL db.
>
> I tend to clean the data on the way into the app, which has many
> subroutines that process the data. I've written generic functions to
> wrap queries to the database.
>
> So, because I don't yet have an open connection to the database when
> the
> data comes in the front door, or even when I am constructing the
> query,
> I cannot use mysql_real_escape_string to clean the data.
>
> Is there a way to essentially duplicate the mysql_real_escape_string
> if
> you already know the character set that the MySQL db is using ???
>
> When I'm constructing a query, it doesn't make sense to open the
> connection just to use that function.
>
> Can I just use the depricated mysql_escape_string ? or is there maybe
> a
> sequence of addcslashes parameters that can accomplish the same thing
> ???
>
> Thanks,
>
> Tim.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] GD problems

2006-06-19 Thread Richard Lynch
On Mon, June 19, 2006 5:43 pm, Beauford wrote:
> I finally broke down and reinstalled PHP using the info from the site
> below,
> but GD is still not working. Phpinfo() shows it is enabled, as are the
> other
> libraries. So I'm lost as to what I am missing?
>
> http://tanksoftware.com/tutes/installingphp.html

If phpinfo() shows GD and all the cool libraries, then you're
definitely on the right track.

Now you just have to tell us what makes you think it's "not working"
and what you mean by "not working" and what your code looks like
and...

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Still trying to figure this out...

2006-06-19 Thread Jochem Maas
Rob W. wrote:
> Nope, I still dont get anything back from that.


it will AT THE VERY LEAST return the string:

''

do you have any idea what you have in your database???

and have you ever heard of print_r() or var_dump()? you can use them
to *investigate* your problem.

...

>> $sqlRange = array();
>> if ($res = mysql_query('SELECT switchport FROM network')) {
>> while ($row = mysql_fetch_array($res)) $sqlRange[] = $row['switchport'];
>> }

var_dump($sqlRange, array_diff(range(1,24), $sqlRange));

>>
>> echo '';
>> foreach (array_diff(range(1,24), $sqlRange) as $port) {
>> echo '',$port,'';
>> }
>> echo '';
>>
>> /*
>>
>> NOTE:
>>
>> 1. you have to loop your mysql result to get each port that is already
>> used in the DB into you array
>> 2. try to output something that resembles proper HTML (an 
>> without a closing tag sucks)
>>
>> */
>>
>>
> 

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



Re: [PHP] Still trying to figure this out...

2006-06-19 Thread Richard Lynch
On Mon, June 19, 2006 3:39 pm, Rob W. wrote:
>   $query="SELECT switchport FROM network";
>   $result=mysql_query($query);

//If you wanna use fetch_array or whatever, fine.
//But I dunno how to use it and don't care to learn.
//And haven't felt the need for a decade now.
//So there :-)
while (list($switchport) = msyql_fetch_row($result)){

//>   $sql_range=mysql_fetch_array($result);

  $sql_range[] = $switchport;
}


>   $true_range=range(1,24);
>   $next_range=array_diff($true_range,$sql_range);
>   foreach ($next_range as $final_range) {
>  echo "$final_range\n";
>   }

Your previous code had only one (1) switchport from the DB, the first
one in use.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Still trying to figure this out...

2006-06-19 Thread Rob W.

Yeah, that's what i'm trying to print is the missing numbers in the db.

That's what I've been trying to figure out this whole time.

- Original Message - 
From: "Xavier Casto" <[EMAIL PROTECTED]>

To: "'Rob W.'" <[EMAIL PROTECTED]>
Cc: 
Sent: Monday, June 19, 2006 6:34 PM
Subject: RE: [PHP] Still trying to figure this out...




Are there any numbers missing in your database table between 0 and the
number you assigned to $maxport?

-Original Message-
From: Rob W. [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 6:26 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Still trying to figure this out...

Yep, and still nothing output's.


- Original Message - 
From: "Xavier Casto" <[EMAIL PROTECTED]>

To: "'Rob W.'" <[EMAIL PROTECTED]>
Cc: 
Sent: Monday, June 19, 2006 6:20 PM
Subject: RE: [PHP] Still trying to figure this out...



You did make sure to assign a numerical value to $maxport?

-Original Message-
From: Rob W. [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 6:15 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Still trying to figure this out...

This also didnt work, Still giving me no output just like the last try.
 - Original Message - 
 From: Xavier Casto

 To: Rob W.
 Cc: php-general@lists.php.net
 Sent: Monday, June 19, 2006 4:33 PM
 Subject: Re: [PHP] Still trying to figure this out...


 Have you ever thought of doing something like this:

 for($i = 0; $i <= $maxport; $i++)
 {
 $query="SELECT switchport FROM network WHERE switchport = ".$i;
 $result=mysql_query($query);
 if(empty($result))
 {
 echo "$i";
 }
 }


 It should only return the ones that aren't in the table and they will
automatically be sorted in ascending order.



 On 6/19/06, Rob W. <[EMAIL PROTECTED]> wrote:
   Ok, I am still trying to get this figured out from what I tried doing
last night. If anybody wants to try it, please be my guest. This is the
deal. Create an INTEGER table. Put the numbers 1 - 24 in it. Leave out
like
number 8, 9, 22, 23 ect.. Now create a php statement that will take and
pull
that out of the database, find out the missing numbers and display them 
as

an html drop down selection.

   And tedd in response to why, is because the values that are already
located in the database represent in use already. They represent a server
port that a server is sitting on, so that's not the problem. I could have
done that along time ago.

   Any help is appreciated but here is the current code that I have.


 $query="SELECT switchport FROM network";
 $result=mysql_query($query);
 $sql_range=mysql_fetch_array($result);
 $true_range=range(1,24);
 $next_range=array_diff($true_range,$sql_range);
 foreach ($next_range as $final_range) {
echo "$final_range\n";
 }








--
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 way to stop spam on this list

2006-06-19 Thread Ryan A


--- MOKULEN_IMADICA <[EMAIL PROTECTED]> wrote:

> Dear Denis and List members,
> 
> > I am very tired of deleting spam messages received
> from PHP mailing lists
>   
> uu...I was tired more than you
> are,Denis,undoubtedly.
> Because I am a Japanese.I think that the person who
> can not read
> Japanese spam is fortunate.
> 
> > As I can see most of the spam messages are in
> Chinese / Japanese.  
> 
> The Japanese spammer is sending spam to us from
> "pair.com".
> So I added in a header_checks file of my postfix:
> 
> /message-ID:.*pair.com/ DISCARD
> 
> .Since I added that,the japanse spam doesnt't reach.
> 
> The list may lock mails of contents(body) written in
> japanese,I think.
> The PHP mailing list for the people who read and
> write Japanese exists
> in Japan.I don't join in that my-home-ground's
> list,because I can buy
> books related with PHP which was written in
> Japanese.There is good
> introducers of PHP in Japan(there is not only
> spammer but also good
> programmer in Japan!).The reason why I join to this
> English version is
> that I wants to get advices earlier than publishing
> new books related
> with PHP in Japan.
> 
> Unfortunately I am not familiar with English to the
> extent that I can
> send advice to my dear list in each time,but I
> always appreciate
> members.
> 
> Wishing not to dislike Japanese because of Japanese
> spammer.
> 
> Thank you for reading.
> 
> With Love,
> 
> Madoca

Madoca,
Spammers are scum no matter which nationality they
come from so dont bother too much about it, and I
think people would have to be real small (more like
tiny) minded to dislike Japanese (or the Japanese
people) due to one rotten apple.

As for your English, I think its really good, I
daresay if any of us (English speaking people) tried
to write in your language it would be a lotlot
worse.

Cheers!
Ryan

--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: [PHP] Still trying to figure this out...

2006-06-19 Thread Robert Cummings
On Mon, 2006-06-19 at 16:39, Rob W. wrote:
> Ok, I am still trying to get this figured out from what I tried doing last 
> night. If anybody wants to try it, please be my guest. This is the deal. 
> Create an INTEGER table. Put the numbers 1 - 24 in it. Leave out like number 
> 8, 9, 22, 23 ect.. Now create a php statement that will take and pull that 
> out of the database, find out the missing numbers and display them as an html 
> drop down selection.
> 
> And tedd in response to why, is because the values that are already located 
> in the database represent in use already. They represent a server port that a 
> server is sitting on, so that's not the problem. I could have done that along 
> time ago.
> 
> Any help is appreciated but here is the current code that I have.
> 
> 
  $query="SELECT switchport FROM network";
>   $result=mysql_query($query);
>   $sql_range=mysql_fetch_array($result);
>   $true_range=range(1,24);
>   $next_range=array_diff($true_range,$sql_range);
>   foreach ($next_range as $final_range) {
>  echo "$final_range\n";
>   }

 $foo )
{
echo ''.$switchport.''."\n";
}

?>

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Still trying to figure this out...

2006-06-19 Thread Rob W.

Nope, I still dont get anything back from that.

So i'm still stuck in the mud.


- Original Message - 
From: "Jochem Maas" <[EMAIL PROTECTED]>

To: "Rob W." <[EMAIL PROTECTED]>
Cc: 
Sent: Monday, June 19, 2006 4:05 PM
Subject: Re: [PHP] Still trying to figure this out...



Rob W. wrote:
Ok, I am still trying to get this figured out from what I tried doing 
last night. If anybody wants to try it, please be my guest. This is the 
deal.

Create an INTEGER table. Put the numbers 1 - 24 in it.
Leave out like number 8, 9, 22, 23 ect..


I'll assume the DB creation and filling is something you have already 
covered/dealt with.


Now create a php statement that will take and pull that out of the 
database,


this you have already (as per your example code).

find out the missing numbers and display them as an html drop down 
selection.
And tedd in response to why, is because the values that are already 
located in the
database represent in use already. They represent a server port that a 
server is sitting on

, so that's not the problem. I could have done that along time ago.


huh? whats not a problem, what could have done a long time ago? (and why 
didn't you?)



Any help is appreciated but here is the current code that I have.



try the apples below



  $query="SELECT switchport FROM network";
  $result=mysql_query($query);
  $sql_range=mysql_fetch_array($result);
  $true_range=range(1,24);
  $next_range=array_diff($true_range,$sql_range);
  foreach ($next_range as $final_range) {
 echo "$final_range\n";
  }



$sqlRange = array();
if ($res = mysql_query('SELECT switchport FROM network')) {
while ($row = mysql_fetch_array($res)) $sqlRange[] = $row['switchport'];
}

echo '';
foreach (array_diff(range(1,24), $sqlRange) as $port) {
echo '',$port,'';
}
echo '';

/*

NOTE:

1. you have to loop your mysql result to get each port that is already 
used in the DB into you array
2. try to output something that resembles proper HTML (an  without 
a closing tag sucks)


*/




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



Re: [PHP] IMAP Search

2006-06-19 Thread CodeHeads
On Mon, June 19, 2006 7:12 pm, Richard Lynch wrote:
> Of all the functions to use @ with, and to ignore error messages and
> warnings, IMAP is the *last* one you want to do that with.
>
> Add some error checking, and just forget using @
>
> Meanwhile, both your questions didn't actually have a question, nor
> any explanation of what was going wrong or right or...
>
> http://www.catb.org/~esr/faqs/smart-questions.html
>
> On Mon, June 19, 2006 5:00 pm, CodeHeads wrote:
>> Hello all,
>>
>> I am having a problem trying to get the subject corenspond with the
>> message ID on a search.
>>
>> here is my code so far:
>> echo "Search Results";
>> $WORDS = $_POST['words'];
>> $search1 = "BODY \"$WORDS\"";
>> $SEARCH = @imap_search($conn, $search1, SE_UID);
>> $arrData = $SEARCH;
>> $mailHeader = @imap_headerinfo($conn, $arrData);
>> if($SEARCH == FALSE) {
>>  echo "Sorry, did not find anything you were searching for";
>> } else {
>> foreach ($arrData as $ID) {
>>echo "$ID - TOOK OUT THE HTML\n";
>> }
>> }
>>
>> This is the first for messing with IMAP! LOL
>>
>> Thanks in advance,
>> Will
>>

U, you referred me to a page about smart questions..what about
your TOP posting?

Nevermind, I see the PHP list is filled with smart asses so I will find it
out on my own.

And YES, there was a question in there, I guess everyone has a simple mind.

Will

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



[PHP] GD problems

2006-06-19 Thread Beauford
I finally broke down and reinstalled PHP using the info from the site below,
but GD is still not working. Phpinfo() shows it is enabled, as are the other
libraries. So I'm lost as to what I am missing?

http://tanksoftware.com/tutes/installingphp.html

Any help is appreciated.

B

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



Re: [PHP] Still trying to figure this out...

2006-06-19 Thread Rob W.

Yep, and still nothing output's.


- Original Message - 
From: "Xavier Casto" <[EMAIL PROTECTED]>

To: "'Rob W.'" <[EMAIL PROTECTED]>
Cc: 
Sent: Monday, June 19, 2006 6:20 PM
Subject: RE: [PHP] Still trying to figure this out...



You did make sure to assign a numerical value to $maxport?

-Original Message-
From: Rob W. [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 6:15 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Still trying to figure this out...

This also didnt work, Still giving me no output just like the last try.
 - Original Message - 
 From: Xavier Casto

 To: Rob W.
 Cc: php-general@lists.php.net
 Sent: Monday, June 19, 2006 4:33 PM
 Subject: Re: [PHP] Still trying to figure this out...


 Have you ever thought of doing something like this:

 for($i = 0; $i <= $maxport; $i++)
 {
 $query="SELECT switchport FROM network WHERE switchport = ".$i;
 $result=mysql_query($query);
 if(empty($result))
 {
 echo "$i";
 }
 }


 It should only return the ones that aren't in the table and they will
automatically be sorted in ascending order.



 On 6/19/06, Rob W. <[EMAIL PROTECTED]> wrote:
   Ok, I am still trying to get this figured out from what I tried doing
last night. If anybody wants to try it, please be my guest. This is the
deal. Create an INTEGER table. Put the numbers 1 - 24 in it. Leave out 
like
number 8, 9, 22, 23 ect.. Now create a php statement that will take and 
pull

that out of the database, find out the missing numbers and display them as
an html drop down selection.

   And tedd in response to why, is because the values that are already
located in the database represent in use already. They represent a server
port that a server is sitting on, so that's not the problem. I could have
done that along time ago.

   Any help is appreciated but here is the current code that I have.


 $query="SELECT switchport FROM network";
 $result=mysql_query($query);
 $sql_range=mysql_fetch_array($result);
 $true_range=range(1,24);
 $next_range=array_diff($true_range,$sql_range);
 foreach ($next_range as $final_range) {
echo "$final_range\n";
 }








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



Re: [PHP] Still trying to figure this out...

2006-06-19 Thread Rob W.
This also didnt work, Still giving me no output just like the last try.
  - Original Message - 
  From: Xavier Casto 
  To: Rob W. 
  Cc: php-general@lists.php.net 
  Sent: Monday, June 19, 2006 4:33 PM
  Subject: Re: [PHP] Still trying to figure this out...


  Have you ever thought of doing something like this:

  for($i = 0; $i <= $maxport; $i++)
  {
  $query="SELECT switchport FROM network WHERE switchport = ".$i;
  $result=mysql_query($query);
  if(empty($result)) 
  {
  echo "$i";
  }
  }


  It should only return the ones that aren't in the table and they will 
automatically be sorted in ascending order.



  On 6/19/06, Rob W. <[EMAIL PROTECTED]> wrote:
Ok, I am still trying to get this figured out from what I tried doing last 
night. If anybody wants to try it, please be my guest. This is the deal. Create 
an INTEGER table. Put the numbers 1 - 24 in it. Leave out like number 8, 9, 22, 
23 ect.. Now create a php statement that will take and pull that out of the 
database, find out the missing numbers and display them as an html drop down 
selection. 

And tedd in response to why, is because the values that are already located 
in the database represent in use already. They represent a server port that a 
server is sitting on, so that's not the problem. I could have done that along 
time ago. 

Any help is appreciated but here is the current code that I have.


  $query="SELECT switchport FROM network";
  $result=mysql_query($query);
  $sql_range=mysql_fetch_array($result);
  $true_range=range(1,24); 
  $next_range=array_diff($true_range,$sql_range);
  foreach ($next_range as $final_range) {
 echo "$final_range\n";
  }





Re: [PHP] IMAP Search

2006-06-19 Thread Richard Lynch
Of all the functions to use @ with, and to ignore error messages and
warnings, IMAP is the *last* one you want to do that with.

Add some error checking, and just forget using @

Meanwhile, both your questions didn't actually have a question, nor
any explanation of what was going wrong or right or...

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

On Mon, June 19, 2006 5:00 pm, CodeHeads wrote:
> Hello all,
>
> I am having a problem trying to get the subject corenspond with the
> message ID on a search.
>
> here is my code so far:
> echo "Search Results";
> $WORDS = $_POST['words'];
> $search1 = "BODY \"$WORDS\"";
> $SEARCH = @imap_search($conn, $search1, SE_UID);
> $arrData = $SEARCH;
> $mailHeader = @imap_headerinfo($conn, $arrData);
> if($SEARCH == FALSE) {
>   echo "Sorry, did not find anything you were searching for";
> } else {
> foreach ($arrData as $ID) {
>echo "$ID - TOOK OUT THE HTML\n";
> }
> }
>
> This is the first for messing with IMAP! LOL
>
> Thanks in advance,
> Will
>


-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Still trying to figure this out...

2006-06-19 Thread Jochem Maas
John Nichel wrote:
> Jochem Maas wrote:
> 
>> echo '',$port,'';
> 
>> 2. try to output something that resembles proper HTML (an 
>> without a closing tag sucks)
>>
> 
> P  I never close my option tags that way
> 
> Bar

but that's different, you have your official dr. Evil's certification
of evilHTML(tm) engineering. :->

> 
> :-p
> 

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



RE: [PHP] Want some PHP e-book

2006-06-19 Thread tedd
At 3:17 PM -0700 6/19/06, Daevid Vincent wrote:
> > http://www.hudzilla.org/phpbook/
>
>WOW! That online book is awesome. I consider myself an expert at PHP/mySQL
>and there were some things in there that I didn't know.
>
>Thanks Ligaya,
>
>DÆVID

Same here and I'm not an expert. :-)

tedd
--

http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Still trying to figure this out...

2006-06-19 Thread tedd
At 5:48 PM -0400 6/19/06, Jon Anderson wrote:
>John Nichel wrote:
>>P  I never close my option tags that way
>>
>>Bar
>>
>>:-p
>>
>I didn't think this would compute as proper XHTML...Sure enough 
>validator.w3c.org says:
>
>Error /Line 10 column 10/: character data is not allowed here.
>
>|*t*est|
>
>You have used character data somewhere it is not permitted to appear. Mistakes 
>that can cause this error include putting text directly in the body of the 
>document without wrapping it in a container element (such as a 
>aragraph) or forgetting to quote an attribute value (where characters 
>such as "%" and "/" are common, but cannot appear without surrounding quotes).

It depends upon what DOCTYPE you use.

For example, if you use:

http://www.w3.org/TR/html4/strict.dtd";>

There's nothing wrong with closing, or not closing, an option tag in just about 
any fashion you want. In fact all four below will validate:

 item

 item

 item 

 item 

As far as using "value=", I believe the DOCTYPE determines what tags are 
allowed what attributes.

As for XHTML, I find that an unusual bird for validation and getting things to 
work well.

tedd

-- 

http://sperling.com  http://ancientstones.com  http://earthstones.com

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



RE: [PHP] Want some PHP e-book

2006-06-19 Thread Daevid Vincent
> http://www.hudzilla.org/phpbook/

WOW! That online book is awesome. I consider myself an expert at PHP/mySQL
and there were some things in there that I didn't know. 

Thanks Ligaya,

DÆVID  

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



[PHP] IMAP Search

2006-06-19 Thread CodeHeads
Hello all,

I am having a problem trying to get the subject corenspond with the
message ID on a search.

here is my code so far:
echo "Search Results";
$WORDS = $_POST['words'];
$search1 = "BODY \"$WORDS\"";
$SEARCH = @imap_search($conn, $search1, SE_UID);
$arrData = $SEARCH;
$mailHeader = @imap_headerinfo($conn, $arrData);
if($SEARCH == FALSE) {
echo "Sorry, did not find anything you were searching for";
} else {
foreach ($arrData as $ID) {
   echo "$ID - TOOK OUT THE HTML\n";
}
}

This is the first for messing with IMAP! LOL

Thanks in advance,
Will

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



[PHP] IMAP Multiple Pages

2006-06-19 Thread CodeHeads
Hello again,
Here is another problem I am having. I would like to setup multiple pages on
a IMAP archive reader I am working on.

I cannot seem to get the multiple pages working right.
Here is my code.

$threads = imap_thread($conn);
foreach ($threads as $key => $val) {
  $tree = explode('.', $key);
  if ($tree[1] == 'num') {
   $header = @imap_headerinfo($conn, $val);
   echo "\n\tTOOK OUT HTML CODE\n"; 
} elseif ($tree[1] == 'branch') { 
echo "\t\n\n"; }
}

Sorry, still learning. :)

Will


signature.asc
Description: PGP signature


[PHP] IMAP Search

2006-06-19 Thread CodeHeads
Hello all,

I am having a problem trying to get the subject corenspond with the
message ID on a search.

here is my code so far:
echo "Search Results";
$WORDS = $_POST['words'];
$search1 = "BODY \"$WORDS\"";
$SEARCH = @imap_search($conn, $search1, SE_UID);
$arrData = $SEARCH;
$mailHeader = @imap_headerinfo($conn, $arrData);
if($SEARCH == FALSE) {
echo "Sorry, did not find anything you were searching for";
} else {
foreach ($arrData as $ID) {
   echo "$ID - TOOK OUT THE HTML\n";
}
}

This is the first for messing with IMAP! LOL

Thanks in advance,
Will


signature.asc
Description: PGP signature


Re: [PHP] Serving a graphic downloads it instead of displaying it

2006-06-19 Thread Brian Dunning

On Jun 17, 2006, at 12:06 PM, a couple of guys wrote:


header("Content-type: image/jpeg");
notice "jpeg" - not "jpg".


Thanks all - this was indeed the problem.  :)

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



Re: [PHP] Still trying to figure this out...

2006-06-19 Thread Jon Anderson

John Nichel wrote:

P  I never close my option tags that way

Bar

:-p

I didn't think this would compute as proper XHTML...Sure enough 
validator.w3c.org says:


Error /Line 10 column 10/: character data is not allowed here.

|*t*est|

You have used character data somewhere it is not permitted to appear. 
Mistakes that can cause this error include putting text directly in the 
body of the document without wrapping it in a container element (such as 
a aragraph) or forgetting to quote an attribute value (where 
characters such as "%" and "/" are common, but cannot appear without 
surrounding quotes).


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



Re: [PHP] Still trying to figure this out...

2006-06-19 Thread John Nichel

Jochem Maas wrote:


echo '',$port,'';



2. try to output something that resembles proper HTML (an  without a 
closing tag sucks)



P  I never close my option tags that way

Bar

:-p

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] Simulating mysql_real_escape_string

2006-06-19 Thread John Nichel

Tim Traver wrote:

Hi all,

ok, have a relatively complicated architecture of php scripts in place, 
and after reading more about SQL injection, want to make sure that I 
clean my data completely before I enter it into a MySQL db.


I tend to clean the data on the way into the app, which has many 
subroutines that process the data. I've written generic functions to 
wrap queries to the database.


So, because I don't yet have an open connection to the database when the 
data comes in the front door, or even when I am constructing the query, 
I cannot use mysql_real_escape_string to clean the data.


Is there a way to essentially duplicate the mysql_real_escape_string if 
you already know the character set that the MySQL db is using ???


When I'm constructing a query, it doesn't make sense to open the 
connection just to use that function.


Can I just use the depricated mysql_escape_string ? or is there maybe a 
sequence of addcslashes parameters that can accomplish the same thing ???




mysql_escape_string() should be fine.  The only difference between the 
two is that 'real' uses your connection to determine the current 
character set.


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] Still trying to figure this out...

2006-06-19 Thread Jochem Maas
Rob W. wrote:
> Ok, I am still trying to get this figured out from what I tried doing last 
> night. If anybody wants to try it, please be my guest. This is the deal. 
> Create an INTEGER table. Put the numbers 1 - 24 in it. 
> Leave out like number 8, 9, 22, 23 ect.. 

I'll assume the DB creation and filling is something you have already 
covered/dealt with.

> Now create a php statement that will take and pull that out of the database, 

this you have already (as per your example code).

> find out the missing numbers and display them as an html drop down selection.
> And tedd in response to why, is because the values that are already located 
> in the 
> database represent in use already. They represent a server port that a server 
> is sitting on
> , so that's not the problem. I could have done that along time ago.

huh? whats not a problem, what could have done a long time ago? (and why didn't 
you?)

> Any help is appreciated but here is the current code that I have.
> 

try the apples below

> 
>   $query="SELECT switchport FROM network";
>   $result=mysql_query($query);
>   $sql_range=mysql_fetch_array($result);
>   $true_range=range(1,24);
>   $next_range=array_diff($true_range,$sql_range);
>   foreach ($next_range as $final_range) {
>  echo "$final_range\n";
>   }
> 

$sqlRange = array();
if ($res = mysql_query('SELECT switchport FROM network')) {
while ($row = mysql_fetch_array($res)) $sqlRange[] = $row['switchport'];
}

echo '';
foreach (array_diff(range(1,24), $sqlRange) as $port) {
echo '',$port,'';
}
echo '';

/*

NOTE:

1. you have to loop your mysql result to get each port that is already used in 
the DB into you array
2. try to output something that resembles proper HTML (an  without a 
closing tag sucks)

 */

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



[PHP] Simulating mysql_real_escape_string

2006-06-19 Thread Tim Traver

Hi all,

ok, have a relatively complicated architecture of php scripts in place, 
and after reading more about SQL injection, want to make sure that I 
clean my data completely before I enter it into a MySQL db.


I tend to clean the data on the way into the app, which has many 
subroutines that process the data. I've written generic functions to 
wrap queries to the database.


So, because I don't yet have an open connection to the database when the 
data comes in the front door, or even when I am constructing the query, 
I cannot use mysql_real_escape_string to clean the data.


Is there a way to essentially duplicate the mysql_real_escape_string if 
you already know the character set that the MySQL db is using ???


When I'm constructing a query, it doesn't make sense to open the 
connection just to use that function.


Can I just use the depricated mysql_escape_string ? or is there maybe a 
sequence of addcslashes parameters that can accomplish the same thing ???


Thanks,

Tim.

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



[PHP] Still trying to figure this out...

2006-06-19 Thread Rob W.
Ok, I am still trying to get this figured out from what I tried doing last 
night. If anybody wants to try it, please be my guest. This is the deal. Create 
an INTEGER table. Put the numbers 1 - 24 in it. Leave out like number 8, 9, 22, 
23 ect.. Now create a php statement that will take and pull that out of the 
database, find out the missing numbers and display them as an html drop down 
selection.

And tedd in response to why, is because the values that are already located in 
the database represent in use already. They represent a server port that a 
server is sitting on, so that's not the problem. I could have done that along 
time ago.

Any help is appreciated but here is the current code that I have.


  $query="SELECT switchport FROM network";
  $result=mysql_query($query);
  $sql_range=mysql_fetch_array($result);
  $true_range=range(1,24);
  $next_range=array_diff($true_range,$sql_range);
  foreach ($next_range as $final_range) {
 echo "$final_range\n";
  }


RE: [PHP] remove keys from array

2006-06-19 Thread Daevid Vincent
http://www.php.net/manual/en/function.unset.php

So if you had:
$foo = Array ( [0] => 2, [ID] => 2, [1] => asdasd, [CategoryName] => asdasd
) );

unset($foo[0]);
unset($foo[1]);

Yields:

$foo = Array ( [ID] => 2, [CategoryName] => asdasd ) );

DÆVID  

> -Original Message-
> From: Richard Lynch [mailto:[EMAIL PROTECTED] 
> Sent: Monday, June 12, 2006 12:49 PM
> To: Ahmed Abdel-Aliem
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] remove keys from array
> 
> On Sun, June 11, 2006 6:57 am, Ahmed Abdel-Aliem wrote:
> > hi all
> > when i have array in the form of :
> > Array ( [0] => 2 [ID] => 2 [1] => asdasd [CategoryName] => 
> asdasd ) )
> > how can i make it in the form of :
> > Array ( [ID] => 2 [CategoryName] => asdasd ) )
> >
> > can anyone help me with that plz ?
> 
> 
> I don't even understand the question...
> 
> Where did this array come from?
> 
> 
> -- 
> Like Music?
> http://l-i-e.com/artists.htm
> 
> -- 
> 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] SMS with php recommendation (a bit 0T i guess)

2006-06-19 Thread Daevid Vincent
For what it's worth, most cell phone providers have an email gateway which
works just as good as an SMS message (and it's free!).

Just find the email address to send to for each carrier and store in a
table.

For example, for my Cingular (AT&T) phone, it is my [EMAIL PROTECTED]
Where the X's represent the phone number.

Cheers,

DÆVID  

> -Original Message-
> From: Ryan A [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, June 18, 2006 11:17 AM
> To: php php
> Subject: [PHP] SMS with php recommendation (a bit 0T i guess)
> 
> Hey,
> 
> Right now I am using PSWIN to send SMS messages from
> my php scripts, can anybody recommend a (reliable)
> company that i can use instead?
> 
> We "fill up" on 25euros everytime on pswin, so i am
> not looking for a "free" provider, just a reliable and
> good priced one.
> 
> PSwin is good, problem is they are charging us a euro
> .20 per day just for using the service, so even if we
> dont send a single sms per day we are getting
> charged...not good. 
> 
> Thanks,
> Ryan
> 
> --
> - The faulty interface lies between the chair and the keyboard.
> - Creativity is great, but plagiarism is faster!
> - Smile, everyone loves a moron. :-)
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.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] A way to stop spam on this list

2006-06-19 Thread MOKULEN_IMADICA
Dear Denis and List members,

> I am very tired of deleting spam messages received from PHP mailing lists
  
uu...I was tired more than you are,Denis,undoubtedly.
Because I am a Japanese.I think that the person who can not read
Japanese spam is fortunate.

> As I can see most of the spam messages are in Chinese / Japanese.  

The Japanese spammer is sending spam to us from "pair.com".
So I added in a header_checks file of my postfix:

/message-ID:.*pair.com/ DISCARD

.Since I added that,the japanse spam doesnt't reach.

The list may lock mails of contents(body) written in japanese,I think.
The PHP mailing list for the people who read and write Japanese exists
in Japan.I don't join in that my-home-ground's list,because I can buy
books related with PHP which was written in Japanese.There is good
introducers of PHP in Japan(there is not only spammer but also good
programmer in Japan!).The reason why I join to this English version is
that I wants to get advices earlier than publishing new books related
with PHP in Japan.

Unfortunately I am not familiar with English to the extent that I can
send advice to my dear list in each time,but I always appreciate
members.

Wishing not to dislike Japanese because of Japanese spammer.

Thank you for reading.

With Love,

Madoca

ps:I use the hn, "MOKULEN", in the net.
”MOKULEN” is the magnolia to say in English.
There is a meaning that "I love nature" in "MOKULEN".


http://imadica.jp/
http://www.mokulen.com/
https://mokulen.jp 

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



RE: [PHP] regex brain-toot

2006-06-19 Thread Jay Blanchard
[snip]
Do you have to use ereg?  The preg_match pattern I posted works fine. 
It will return an array, first element being the whole string it 
matched, next element will be what it matched _inside_ the parentheses 
(less the parentheses) (if it matches anything that is).
[/snip]

Thanks Johnthe brain fart continued. I was echoing $regs[0] instead
of $regs[1]too many hours, not enough caffeine or sleep. I am
getting too old

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



Re: [PHP] regex brain-toot

2006-06-19 Thread John Nichel

Jay Blanchard wrote:

[snip]
Anot PCRE.  Can't help you there, as I've never used the ereg 
functions.  However...


preg_match ( "/\((\d{1,}.*?)\)/", "Upper Voltage (124.1)", $regs );
[/snip]

Still returns parentheses

ereg("[^\(][0-9\.]*" , "Upper Voltage (124.1)", $regs );

gets rid of opening bracket, but

ereg("[^\(][0-9\.]*[^\)]" , "Upper Voltage (124.1)", $regs );

doesn't



Do you have to use ereg?  The preg_match pattern I posted works fine. 
It will return an array, first element being the whole string it 
matched, next element will be what it matched _inside_ the parentheses 
(less the parentheses) (if it matches anything that is).


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



RE: [PHP] regex brain-toot

2006-06-19 Thread Jay Blanchard
[snip]
Anot PCRE.  Can't help you there, as I've never used the ereg 
functions.  However...

preg_match ( "/\((\d{1,}.*?)\)/", "Upper Voltage (124.1)", $regs );
[/snip]

Still returns parentheses

ereg("[^\(][0-9\.]*" , "Upper Voltage (124.1)", $regs );

gets rid of opening bracket, but

ereg("[^\(][0-9\.]*[^\)]" , "Upper Voltage (124.1)", $regs );

doesn't

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



Re: [PHP] regex brain-toot

2006-06-19 Thread John Nichel

Jay Blanchard wrote:

[snip]
\(([0-9]*)\)
[/snip]

I had done this before and still get the parenthesis...

ereg("\(([0-9]*)\)", "Upper Voltage (124.1)", $regs); 



Anot PCRE.  Can't help you there, as I've never used the ereg 
functions.  However...


preg_match ( "/\((\d{1,}.*?)\)/", "Upper Voltage (124.1)", $regs );

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



RE: [PHP] regex brain-toot

2006-06-19 Thread Jay Blanchard
[snip]
You won't match the dot btw:

\(([.0-9]*)\)

Which is crude since it will match more than one dot :)
[/snip]

Typo on my part \(([0-9\.]*)\)...but still gets parenthesis

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



RE: [PHP] regex brain-toot

2006-06-19 Thread Jay Blanchard
[snip]
\(([0-9]*)\)
[/snip]

I had done this before and still get the parenthesis...

ereg("\(([0-9]*)\)", "Upper Voltage (124.1)", $regs); 

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



Re: [PHP] regex brain-toot

2006-06-19 Thread Robert Cummings
On Mon, 2006-06-19 at 14:42, John Nichel wrote:
> Jay Blanchard wrote:
> > I have a field that contains a value in parenthesis', but also contains
> > other text, for instance; (it is a legacy app that I am working with,
> > and by legacy I am saying pre-1980)
> > 
> > Upper voltage (124.1)
> > 
> > I know that \([0-9]*\) will get me (124.1), but I am totally forgetting
> > how to get 124.1 without the parenthesis without trimming ...ack. Swift
> > kickage appreciated.
> > 
> \(([0-9]*)\)

Jay,

You won't match the dot btw:

\(([.0-9]*)\)

Which is crude since it will match more than one dot :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] regex brain-toot

2006-06-19 Thread John Nichel

Jay Blanchard wrote:

I have a field that contains a value in parenthesis', but also contains
other text, for instance; (it is a legacy app that I am working with,
and by legacy I am saying pre-1980)

Upper voltage (124.1)

I know that \([0-9]*\) will get me (124.1), but I am totally forgetting
how to get 124.1 without the parenthesis without trimming ...ack. Swift
kickage appreciated.


\(([0-9]*)\)


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



[PHP] regex brain-toot

2006-06-19 Thread Jay Blanchard
I have a field that contains a value in parenthesis', but also contains
other text, for instance; (it is a legacy app that I am working with,
and by legacy I am saying pre-1980)

Upper voltage (124.1)

I know that \([0-9]*\) will get me (124.1), but I am totally forgetting
how to get 124.1 without the parenthesis without trimming ...ack. Swift
kickage appreciated.

Thanks!

Jay Blanchard
Pocket Communications
Systems Manager
210-447-1221 

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



Re: [PHP] An annoying session problem

2006-06-19 Thread Alex Major
Hmpf, well I feel like a real tit now.
I tried all the posted suggestions, and still couldn't figure out why it
wasn't working. 
I went back to re-code the whole page from scratch, started off with include
'connection.php', then it hit me...i hadn't included the connection file in
the parent file to the include, so it wasn't (and couldn't) connect to the
database. I put the connection file into the parent file, and now its
working!

Sorry to have taken so much time up with such a silly little thing.

Regards, 
Alex.


On 19/6/06 18:52, "tedd" <[EMAIL PROTECTED]> wrote:

> At 12:27 AM +0700 6/20/06, Gmail nya Suprie wrote:
>> tedd wrote:
>>> Alex Major wrote:
>>> 
 And I'm still not getting the output correctly.
 I don't think that the SELECT query is working properly, is there  problem
 with how I've put:
   WHERE user_id = '".$_SESSION['user_id']."'
   
>>> 
>>> Maybe I'm all wet here, but what's the the periods?
>>> 
>>> Why isn't it:
>>> 
>>> WHERE user_id = '"$_SESSION['user_id']"'
>>> 
>> 
>> I don't think the script will work... the period is used to combine two
>> variables or string
>> example :
>> $foo = "hai ";
>> $bar = "there ";
>> so $foo.$bar will produce "hai there"
> 
> Yes, I understand concatenation operators -- but I don't think they will work
> in this setting.
> 
> Just try my suggestion and see if it will work.
> 
> tedd

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



RE: [PHP] A way to stop spam on this list

2006-06-19 Thread Ryan A


--- Robert Cummings <[EMAIL PROTECTED]> wrote:

> On Mon, 2006-06-19 at 03:34, Denis Gerasimov wrote:
> > Hello Robert,
> > 
> > > I think you should quit whining like a spoilt
> brat *lol*. I get
> > > something like 3 a day. Big fricking whoop.
> > 
> > I am subscribed to most of the PHP mailing lists,
> not only to PHP general.
> > There is the same problem too. So receive
> something more than just "3 a
> > day".
> 
> I'm subscribed to 6 PHP mailing lists. Are you going
> somewhere with
> this? Should we pull down our pants next and
> measure?
 
Ummm, I'm for the measuring thing, once and for all, I
want to be know as the freak., gotta save for that
operation to lose a few inches

:p

Cheers,
Ryan

--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



[PHP] mime.magic adding more types

2006-06-19 Thread Mark Steudel
Hi there,

I'm writing some code that looks at a video file given to it and writes up
the correct embed html and outputs it to the browser. I though that I would
use mime_content_type() function to detect the type of each video, but after
enabling it, I found that it doesn't have the mime type for windows media
player. After some researching I had some following questions:

1. Can someone explain what each column means in the magic.mime file:

0   short   0143561 application/x-bcpio

2. Does anyone have any windows media, realplayer mime types they'd like to
share for the magic.mime file

3. I saw that the mime_type extension have been deprecated in favor of pecl
fileinfo, is installing and using the pecl extension as easy as pear install
fileinfo? Does it detect windows media, real player, and quicktime videos?

4. Any other suggestions on detecting what type of video file is being
processed? I suppose looking at file extensions is another method, though I
like the idea of mime type detection over file extension examination.

Thanks, Mark

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



Re: [PHP] An annoying session problem

2006-06-19 Thread tedd
At 12:27 AM +0700 6/20/06, Gmail nya Suprie wrote:
>tedd wrote:
>>Alex Major wrote:
>> 
>>>And I'm still not getting the output correctly.
>>>I don't think that the SELECT query is working properly, is there  problem
>>>with how I've put:
>>>   WHERE user_id = '".$_SESSION['user_id']."'
>>>   
>>
>>Maybe I'm all wet here, but what's the the periods?
>>
>>Why isn't it:
>>
>>WHERE user_id = '"$_SESSION['user_id']"'
>> 
>
>I don't think the script will work... the period is used to combine two 
>variables or string
>example :
>$foo = "hai ";
>$bar = "there ";
>so $foo.$bar will produce "hai there"

Yes, I understand concatenation operators -- but I don't think they will work 
in this setting.

Just try my suggestion and see if it will work.

tedd

-- 

http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] An annoying session problem

2006-06-19 Thread tedd

Alex Major wrote:
>And I'm still not getting the output correctly.
>I don't think that the SELECT query is working properly, is there  problem
>with how I've put:
>WHERE user_id = '".$_SESSION['user_id']."'

Maybe I'm all wet here, but what's the the periods?

Why isn't it:

WHERE user_id = '"$_SESSION['user_id']"'

or as I like to do.

$user_id = $_SESSION['user_id'];

WHERE user_id = '$user_id'

hth's & that I'm right.

tedd
-- 

http://sperling.com  http://ancientstones.com  http://earthstones.com

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



[PHP] Re: running conditions while looping through arrays....

2006-06-19 Thread Adam Zey

IG wrote:

I want to run filters on an pop3 inbox.

I have the following arrays which I'll get from the database-

$subject
$email
$body
$subject_like
$email_like
$body_like

I then go through each email in turn using this loop-



$popy = "{".$pop3."/pop3:110}INBOX";
  $mailbox = imap_open($popy, $un, $pw);
$num_messages = imap_num_msg($mailbox);
if ($num_messages <= $no_srch) {$rrt = 0;} else {$rrt = 
$num_messages-$no_srch;}

  for($i=$num_messages; $i>($rrt); $i--) {


What I want to do is to check if the email address or subject or body of 
each email is exactly like any of the details stored in the arrays 
$subject, $email, $body and to check if the email address or subject or 
body contains a word or phrase from the arrays $subject_like, 
$email_like, $body_like.


For example-

$subject[0] = "SPAM";   $email[0]= "";
$body[0] = "";
$subject_like[0] = "";
$email_like[0] = "";
$body_like[0] = "";
// If the subject of the email = "spam"

$subject[1] = "";   $email[1]= "[EMAIL PROTECTED]";
$body[1] = "";
$subject_like[1] = "";
$email_like[1] = "";
$body_like[1] = "";
// if the email address of the email = "[EMAIL PROTECTED]"

$subject[2] = "";   $email[2]= "";
$body[2] = "spam body text";
$subject_like[2] = "";
$email_like[2] = "";
$body_like[2] = "";
// if the body of the email = "spam body text"

$subject[3] = "SPAM";   $email[3]= "[EMAIL PROTECTED]";
$body[3] = "";
$subject_like[3] = "";
$email_like[3] = "";
$body_like[3] = "";
// if the subject of the email = "SPAM" AND the email address = 
"[EMAIL PROTECTED]"


$subject[4] = "SPAM";   $email[4]= "";
$body[4] = "";
$subject_like[4] = "";
$email_like[4] = "";
$body_like[4] = "spam text";
// if the subject of the email = "SPAM" AND the body contains "spam text"


If any of the above conditions are met then the email message is then 
stored in a database and deleted of the POP3 server.


Is there a quick way of doing the above?  The only way I can think of is 
by looping through each array for every email. This is really really 
slow. I'd be grateful for some help here


Ian




Unless I'm mistaken,

for ( $x = 0; $x < count($subject); $x++ )
{
	if ( $subject[$x] == "SPAM" || $email[$x] == "[EMAIL PROTECTED]" || 
$body[$x] == "spam body text")

{
# Mail is spam! Do something.
}
}

Or something like that. I'm not exactly sure what your criteria are. 
What I'm doing above is looping through the mail messages one at a time, 
and checking all aspects of that email in each loop iteration. If you're 
doing complex analysis on each message, then that is probably the 
fastest way.


If you're simply searching for things, you could always do array 
searches. So, search through $email with array_search or perhaps 
array_intersect. Then you don't need to loop at all.


Regards, Adam Zey.

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



[PHP] Re: Slow loading (was Re: [PHP] Re: How to run one php app from another? RECAP)

2006-06-19 Thread tedd
Manuel:

Thank you for your most detailed explanation -- I must admit most of it is over 
my head. However, I shall study the concept further and place your email in my 
"to learn" collection (I have one and it's growing faster than I can keep up).

But as of now, I can now run one php application from another, which was the 
request that started this thread.

tedd




At 3:48 AM -0500 6/19/06, Manuel Amador (Rudd-O) wrote:
>PHP tends to send output in content transfer encoding "chunked" (I think
>this is true when output buffering is on).   blocks usually have
>their output sent in one chunk.  The browser renders the chunks as they
>come, but oftentimes they delay rendering until a sensible number of
>HTML closing tags have arrived.
>
>Now, on to the real answer to your question.  No, under normal
>conditions you can't have your users' browsers interact with a live PHP
>script.  Web programming is Web REQUEST->PHP RESPONSE, and you must use
>support technology (like sessions, cookies or manual carryover of form
>data) to make session state persistence possible.
>
>In other words: no, if the user clicks a button, it doesn't "call a
>function or branch in an if/then control statement" immediately.
>Rather, an entirely new PHP process, totally unaware of the former one,
>is called upon to service that request.
>
>Now, while in the PHP realm, there *is* one way to have your web client
>follow the pattern "REQUEST->RESPONSE,RESPONSE,RESPONSE" ad infinitum.
>
>This is called slow loading (or Comet), and basically involves:
>
>- having the web client load a PHP script through a hidden IFRAME
>- having the PHP script *never* finish execution (unless, of course, the
>user hits Stop in his browser window), and continually send data through
>the connection (plus one ob_flush() after each chunk just to be
>politically correct).  Usually, data payloads ("page updates") are to be
>carried on via JavaScript snippets, because that's about the only
>technology that allows for browser state manipulation "in vivo", I mean,
>live as the connection goes and never finishes.
>
>Given a properly architected solution, this kind of technology can
>outperform the famous AJAX, both in response times and in server load.
>Given a poorly done solution, this kind of technology can be as bad or
>dramatically worse than AJAX.
>
>Plus, you gotta remember that PHP usually has a maximum duration on
>scripts, so you need to architect around that (which isn't hard to do,
>namely you have a counter and as the counter approaches the maximum load
>time, just a few seconds earlier you send a location.href
>= ... to have the browser reload the IFRAME, and exit() your
>PHP script.
>
>
>
>El vie, 16-06-2006 a las 17:04 -0400, tedd escribió:
>> At 3:52 PM -0500 6/16/06, Richard Lynch wrote:
>> >On Fri, June 16, 2006 8:26 am, tedd wrote:
>> >> At 2:35 PM +0200 6/16/06, Barry wrote:
>> >>>But once output is made. You can't remove it.
>> >>>
>> >>>That isn't possible with PHP.
>> >>
>> >> I think I get it now.
>> >>
>> >> PHP does everything before the user see's anything.
>> >
>> >This is not quite 100% correct...
>> >
>> >PHP output is buffered, possibly by PHP with ob_start and friends, and
>> >then possibly by Apache, and then possibly by TCP packets and their
>> >ordered arrival (or not) and then by the browser, but...
>> >
>> >It is entirely possible to construct a trivial example proving that
>> >PHP can still be runing and finishing output while the browser has
>> >rendered the beginning of the page.
>> >
>> >You can mostly THINK of it as PHP finishing before user sees anything,
>> >as that will get you in a lot less trouble than thinking the other way
>> >around, but to be pedantic, you should be aware it's not quite that
>> >simple.
>>
>> Good explanation and point.
>>
>> How's this for the obvious -- the user doesn't see anything until php is 
>> done with it. That doesn't mean that the entire operation must be finished, 
>> but rather anything that the user see's (while and after loading) php has 
>> already finished with.
> >
>> That about right?
>>
>> tedd
>> --
>> 
>> http://sperling.com  http://ancientstones.com  http://earthstones.com
>>


--

http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] An annoying session problem

2006-06-19 Thread Stut

Alex Major wrote:

Thanks for pointing that out, however I've changed the code to:

// Lets see how much the person has at the moment.

$current_resource_query = "SELECT food, wood, stone, gold, population
FROM game_resources WHERE user_id = '".$_SESSION['user_id']."'";
$current_resource_result = mysql_query($current_resource_query);
$current_resource = mysql_fetch_assoc($current_resource_result);

?>


  

  
  
Food: 
Wood: 
Stone: 
Gold: 
Session user_id is: 
  


And I'm still not getting the output correctly.
I don't think that the SELECT query is working properly, is there  problem
with how I've put:
WHERE user_id = '".$_SESSION['user_id']."'
  


1. Check $current_resource_result for equivalence (===) to false and 
print mysql_error() if it is. That will tell you if the SQL query failed 
and why.
2. You may also want to print $current_resource_query to confirm that 
the session variable actually exists.

3. There is no 3, but there certainly is a spoon.

-Stut

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



RE: [PHP] A way to stop spam on this list

2006-06-19 Thread Robert Cummings
On Mon, 2006-06-19 at 03:34, Denis Gerasimov wrote:
> Hello Robert,
> 
> > I think you should quit whining like a spoilt brat *lol*. I get
> > something like 3 a day. Big fricking whoop.
> 
> I am subscribed to most of the PHP mailing lists, not only to PHP general.
> There is the same problem too. So receive something more than just "3 a
> day".

I'm subscribed to 6 PHP mailing lists. Are you going somewhere with
this? Should we pull down our pants next and measure?

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] A way to stop spam on this list

2006-06-19 Thread tedd
At 10:05 AM +0200 6/19/06, Rory Browne wrote:
>Do you know who the list admin is?
>
>php-general has been traditionally "admined" by users flaming people posting
>"bad content".

That works surprisingly well. :-)

>This doesn't work for spam.
>
>Having that said, feel free to set up procmail or something like that, to
>block message with chinese/japanese characters.

Every spam I receive via this list, I report to spamcop (provided that it's 
less than 3 hours old).

I don't know if that does anything, but at least I "feel" like I'm doing 
something.

tedd


-- 

http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] An annoying session problem

2006-06-19 Thread Alex Major
Thanks for pointing that out, however I've changed the code to:



  

  
  
Food: 
Wood: 
Stone: 
Gold: 
Session user_id is: 
  


And I'm still not getting the output correctly.
I don't think that the SELECT query is working properly, is there  problem
with how I've put:
WHERE user_id = '".$_SESSION['user_id']."'

Regards, 
Alex.


On 19/6/06 16:51, "phpninja" <[EMAIL PROTECTED]> wrote:

>   
> 
> that should be  or  $_SESSION['username']; ?>
> 
> its all in how you call the variables..   isint telling the
> variable to do anything.
> 
> -phpninja

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



[PHP] running conditions while looping through arrays....

2006-06-19 Thread IG

I want to run filters on an pop3 inbox.

I have the following arrays which I'll get from the database-

$subject
$email
$body
$subject_like
$email_like
$body_like

I then go through each email in turn using this loop-



$popy = "{".$pop3."/pop3:110}INBOX";
  $mailbox = imap_open($popy, $un, $pw);
$num_messages = imap_num_msg($mailbox);
if ($num_messages <= $no_srch) {$rrt = 0;} else {$rrt = 
$num_messages-$no_srch;}

  for($i=$num_messages; $i>($rrt); $i--) {


What I want to do is to check if the email address or subject or body of 
each email is exactly like any of the details stored in the arrays 
$subject, $email, $body and to check if the email address or subject or 
body contains a word or phrase from the arrays $subject_like, 
$email_like, $body_like.


For example-

$subject[0] = "SPAM";   $email[0]= "";
$body[0] = "";
$subject_like[0] = "";
$email_like[0] = "";
$body_like[0] = "";
// If the subject of the email = "spam"

$subject[1] = "";   $email[1]= "[EMAIL PROTECTED]";
$body[1] = "";
$subject_like[1] = "";
$email_like[1] = "";
$body_like[1] = "";
// if the email address of the email = "[EMAIL PROTECTED]"

$subject[2] = "";   $email[2]= "";
$body[2] = "spam body text";
$subject_like[2] = "";
$email_like[2] = "";
$body_like[2] = "";
// if the body of the email = "spam body text"

$subject[3] = "SPAM";   $email[3]= "[EMAIL PROTECTED]";
$body[3] = "";
$subject_like[3] = "";
$email_like[3] = "";
$body_like[3] = "";
// if the subject of the email = "SPAM" AND the email address = 
"[EMAIL PROTECTED]"


$subject[4] = "SPAM";   $email[4]= "";
$body[4] = "";
$subject_like[4] = "";
$email_like[4] = "";
$body_like[4] = "spam text";
// if the subject of the email = "SPAM" AND the body contains "spam text"


If any of the above conditions are met then the email message is then 
stored in a database and deleted of the POP3 server.


Is there a quick way of doing the above?  The only way I can think of is 
by looping through each array for every email. This is really really 
slow. I'd be grateful for some help here


Ian



Re: [PHP] trouble getting PDO going on ubuntu 6.06 installation

2006-06-19 Thread Richard Harding

Richard Harding wrote:
I am trying to get PDO going on a new desktop with Ubuntu 6.06. I have 
installed php5, php5-dev, etc and have php5 working with no problems. I 
then did a pecl install pdo and that installed ok. When I run phpinfo() 
I get that PDO is activated and the drivers has no value.


I am now trying to install pdo_mysql and getting the following:
checking for PDO includes... checking for PDO includes... 
/usr/include/php/ext

configure: error:
You've configured extension pdo_mysql, which depends on extension pdo,
but you've either not enabled pdo, or have disabled it.

ERROR: `/tmp/tmptDnQ5L/PDO_MYSQL-1.0.2/configure' failed

When I list the contents of /usr/include/php/ext I get:
ls /usr/include/php/ext/pdo
php_pdo_driver.h  php_pdo.h

Any ideas as to where i need to go from here?


I ended up just finding instructions on manually building the pdo_mysql 
driver.


http://bhiv.com/category/linux/

I'll go and post a bug in the Ubuntu package lists and see if there is 
anything that can be done about how the packages are built, but at least 
I have a not so bad answer. I can build my php install 90% from packages 
and build one myself.


Thanks for the help.

Rick

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



Re: [PHP] A way to stop spam on this list

2006-06-19 Thread tedd
At 5:10 PM +0200 6/19/06, Barry wrote:
>Jochem Maas schrieb:
>>Rory Browne wrote:
>>>Do you know who the list admin is?
>>>
>>>php-general has been traditionally "admined" by users flaming people
>>>posting
>>>"bad content".
>>>
>>>This doesn't work for spam.
>>
>>just wait till we have spambots with AI and emotion subroutines ;-)
>>
>Oh yeah then i will have it to bring me some beer when i watch football :D

No, it will be watching football drinking your beer.

tedd
-- 

http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] PHP Session

2006-06-19 Thread tedd
At 10:04 AM +0100 6/19/06, James Nunnerley wrote:
>Hi Folks,
>
>-snip-
>
>Are we missing something, or is it really magic?

It's really magic.

I've written a very simple example (code included) at:

http://www.weberdev.com/get_example-4349.html

and demo at:

http://xn--ovg.com/session

As for CAPTCHA, check out:

http://xn--ovg.com/captcha

hth's

tedd
-- 

http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Array

2006-06-19 Thread John Nichel

Rob W. wrote:

  $query="SELECT switchport FROM network";
  $result=mysql_query($query);
  $sql_range=array($result['switchport']);


Anybody tell me what i'm doing wrong and why this isnt going in to an array?


Because you're not understanding what the function mysql_query() is 
doing.  Look at the manual to learn about the MySQL functions.


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



RE: [PHP] An annoying session problem

2006-06-19 Thread phpninja

 

that should be  or 

its all in how you call the variables..   isint telling the
variable to do anything.

-phpninja


-Original Message-

From: Alex Major [*mailto:[EMAIL PROTECTED] <[EMAIL PROTECTED]>]


Sent: Monday, June 19, 2006 8:26 AM

To: php-general@lists.php.net

Subject: [PHP] An annoying session problem

Hi there.

I'm working my way through a new script, but I've stumbled into a problem.

Some data that I've set into a session, won't be processed by part of my php
code, but then later on in the page I can get the session value to output.

Also, just so that its clear, the mysql code is correct (I can put it into
phpmyadmin and get results from it.

Heres the code (this code is 'included' in another page, where the session
originates and session_start(); is set.)







 





Food: 

Wood: 

Stone: 

Gold: 

Session id is: 





The error may not necessarily be to do with the session, but non of the
$current_resources are showing.

Thanks for any help guys/gals.

--

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


[PHP] An annoying session problem

2006-06-19 Thread Alex Major
Hi there.
I'm working my way through a new script, but I've stumbled into a problem.
Some data that I've set into a session, won't be processed by part of my php
code, but then later on in the page I can get the session value to output.

Also, just so that its clear, the mysql code is correct (I can put it into
phpmyadmin and get results from it.

Heres the code (this code is 'included' in another page, where the session
originates and session_start(); is set.)



  
 
  
  
Food: 
Wood: 
Stone: 
Gold: 
Session id is: 
  


The error may not necessarily be to do with the session, but non of the
$current_resources are showing.

Thanks for any help guys/gals.

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



Re: [PHP] Array

2006-06-19 Thread Brad Bonkoski

Your result variable is a result identifier, not the actual data...

check out:
http://www.php.net/manual/en/function.mysql-fetch-row.php

or something similar...
-Brad

Rob W. wrote:


 $query="SELECT switchport FROM network";
 $result=mysql_query($query);
 $sql_range=array($result['switchport']);


Anybody tell me what i'm doing wrong and why this isnt going in to an array?
 



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



RE: [PHP] Array

2006-06-19 Thread Jay Blanchard
[snip]
  $query="SELECT switchport FROM network";
  $result=mysql_query($query);
  $sql_range=array($result['switchport']);


Anybody tell me what i'm doing wrong and why this isnt going in to an
array?
[/snip]

Use mysql_fetch_array()

$sql_range = mysql_fetch_array($result);

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



Re: [PHP] A way to stop spam on this list

2006-06-19 Thread Barry

Jochem Maas schrieb:

Rory Browne wrote:

Do you know who the list admin is?

php-general has been traditionally "admined" by users flaming people
posting
"bad content".

This doesn't work for spam.


just wait till we have spambots with AI and emotion subroutines ;-)


Oh yeah then i will have it to bring me some beer when i watch football :D

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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



[PHP] Array

2006-06-19 Thread Rob W.
  $query="SELECT switchport FROM network";
  $result=mysql_query($query);
  $sql_range=array($result['switchport']);


Anybody tell me what i'm doing wrong and why this isnt going in to an array?

RE: [PHP] A way to stop spam on this list

2006-06-19 Thread Dan Parry

just wait till we have spambots with AI and emotion subroutines ;-)


It'll be worse if we get spammers with actual intelligence...

-- 
Dan Parry
Senior Developer
Virtua Webtech Ltd
http://www.virtuawebtech.co.uk 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.0/368 - Release Date: 16/06/2006
 

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



Re: [PHP] A way to stop spam on this list

2006-06-19 Thread Jochem Maas
Rory Browne wrote:
> Do you know who the list admin is?
> 
> php-general has been traditionally "admined" by users flaming people
> posting
> "bad content".
> 
> This doesn't work for spam.

just wait till we have spambots with AI and emotion subroutines ;-)

> 
> Having that said, feel free to set up procmail or something like that, to
> block message with chinese/japanese characters.
> 

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



Re: [PHP] trouble getting PDO going on ubuntu 6.06 installation

2006-06-19 Thread Jochem Maas
Richard Harding wrote:
> Jochem Maas wrote:
>> Richard Harding wrote:
>>  
>>> I am trying to get PDO going on a new desktop with Ubuntu 6.06. I have
>>> installed php5, php5-dev, etc and have php5 working with no problems. I
>>> then did a pecl install pdo and that installed ok. When I run phpinfo()
>>> I get that PDO is activated and the drivers has no value.
>>>
>>> I am now trying to install pdo_mysql and getting the following:
>>> checking for PDO includes... checking for PDO includes...
>>> /usr/include/php/ext
>>> configure: error:
>>> You've configured extension pdo_mysql, which depends on extension pdo,
>>> but you've either not enabled pdo, or have disabled it.
>>> 
>>
>> you need to have '--with-pdo_mysql' and '--with-pdo' in your configure
>> line
>> '--with-pdo' may need to be something like '--with-pdo=shared'
>>
>> does that help?
>>   
> I was trying to look at that, but since I'm installing via pecl and not
> building from source how do you get those option in there? I see that
> pecl downloads the file to /var/tmp/pear-build-root but there are no
> files in there once the pecl install dies.

this bug report may also describe the problem you are having:
http://pecl.php.net/bugs/bug.php?id=5010

what is your configure line for php5? (see phpinfo())

also what version of php5 do you have? I suggest you grab 5.1

also given that it is a development/personal machine your running on
why not build php from source? - it's actually quite easy - heck I can do it,
and I know Jack Shit - just ask Jasper Byrant-Greene)

> 
> Thanks
> Rick
> 

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



Re: [PHP] trouble getting PDO going on ubuntu 6.06 installation

2006-06-19 Thread Richard Harding

Jochem Maas wrote:

Richard Harding wrote:
  

Jochem Maas wrote:


Richard Harding wrote:
 
  

I am trying to get PDO going on a new desktop with Ubuntu 6.06. I have
installed php5, php5-dev, etc and have php5 working with no problems. I
then did a pecl install pdo and that installed ok. When I run phpinfo()
I get that PDO is activated and the drivers has no value.

I am now trying to install pdo_mysql and getting the following:
checking for PDO includes... checking for PDO includes...
/usr/include/php/ext
configure: error:
You've configured extension pdo_mysql, which depends on extension pdo,
but you've either not enabled pdo, or have disabled it.



you need to have '--with-pdo_mysql' and '--with-pdo' in your configure
line
'--with-pdo' may need to be something like '--with-pdo=shared'

does that help?
  
  

I was trying to look at that, but since I'm installing via pecl and not
building from source how do you get those option in there? I see that
pecl downloads the file to /var/tmp/pear-build-root but there are no
files in there once the pecl install dies.



this bug report may also describe the problem you are having:
http://pecl.php.net/bugs/bug.php?id=5010

what is your configure line for php5? (see phpinfo())

also what version of php5 do you have? I suggest you grab 5.1

also given that it is a development/personal machine your running on
why not build php from source? - it's actually quite easy - heck I can do it,
and I know Jack Shit - just ask Jasper Byrant-Greene)
  

Version 5.1.2
Configure: There is no configure command field in the phpinfo output.
I don't build it from source because I like to use packages that I run 
on the server. Actually I run backports on the server, but it looks like 
I'm going to run into the same issues on the server that I am having 
here. If I had just compiled the source I would never have realized that 
the server will have the same issues. I figure that if I can install on 
this machine the same process should then apply to the server when I try 
to update it.


The bug you pointed to is close, but not quite. The bug appears fixed in 
5.1 and the problem I am having is not the lack of finding the .h file. 
It just seems that it is not picking up PDO is enabled even though it is 
for some reason.


Thanks for the help.

Rick

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



Re: [PHP] trouble getting PDO going on ubuntu 6.06 installation

2006-06-19 Thread Jochem Maas
Richard Harding wrote:
> I am trying to get PDO going on a new desktop with Ubuntu 6.06. I have
> installed php5, php5-dev, etc and have php5 working with no problems. I
> then did a pecl install pdo and that installed ok. When I run phpinfo()
> I get that PDO is activated and the drivers has no value.
> 
> I am now trying to install pdo_mysql and getting the following:
> checking for PDO includes... checking for PDO includes...
> /usr/include/php/ext
> configure: error:
> You've configured extension pdo_mysql, which depends on extension pdo,
> but you've either not enabled pdo, or have disabled it.

you need to have '--with-pdo_mysql' and '--with-pdo' in your configure line
'--with-pdo' may need to be something like '--with-pdo=shared'

does that help?

> 
> ERROR: `/tmp/tmptDnQ5L/PDO_MYSQL-1.0.2/configure' failed
> 
> When I list the contents of /usr/include/php/ext I get:
> ls /usr/include/php/ext/pdo
> php_pdo_driver.h  php_pdo.h
> 
> Any ideas as to where i need to go from here?
> 
> Thanks for the help.
> 
> Rick
> 

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



Re: [PHP] trouble getting PDO going on ubuntu 6.06 installation

2006-06-19 Thread Richard Harding

Jochem Maas wrote:

Richard Harding wrote:
 

I am trying to get PDO going on a new desktop with Ubuntu 6.06. I have
installed php5, php5-dev, etc and have php5 working with no problems. I
then did a pecl install pdo and that installed ok. When I run phpinfo()
I get that PDO is activated and the drivers has no value.

I am now trying to install pdo_mysql and getting the following:
checking for PDO includes... checking for PDO includes...
/usr/include/php/ext
configure: error:
You've configured extension pdo_mysql, which depends on extension pdo,
but you've either not enabled pdo, or have disabled it.



you need to have '--with-pdo_mysql' and '--with-pdo' in your configure 
line

'--with-pdo' may need to be something like '--with-pdo=shared'

does that help?
  
I was trying to look at that, but since I'm installing via pecl and not 
building from source how do you get those option in there? I see that 
pecl downloads the file to /var/tmp/pear-build-root but there are no 
files in there once the pecl install dies.


Thanks
Rick

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



  1   2   >