[PHP] Netscape6 and Javascript

2002-05-18 Thread wolf

Hi, I need help for an non-php-problem.

I've a frameset with 2 frames.
There is a TOPframe with the name "topframe"
who contains an input-Field.
  
in the form named "mainform".

The BOTTOMframe contains a link.
With the link I have to change the value
of the input field in the TOPframe.
The Javascript command
parent.topframe.mainform.txt.value=val;
doesn't work in Netscape 6.

Tell me the correct syntax.

Thanx



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




RE: [PHP] while-question

2008-11-17 Thread Wolf
> Dabbling?
> 
> I think that making a living from it isn't dabbling, so I may not be 
> qualified to speak for the dabblers.
> 
> But for me, I was writing code before there were such courses. Later, 
> when I went to college I was taught adventures in keypunching and 
> received several "next to worthless" degrees.
> 
> I say "next to worthless" only because what they taught really wasn't 
> applicable to real world programming. As for management, clients, and 
> hr types, the degrees mattered, but not for much more than that.
> 
> In any event, I doubt if any college courses are keeping up with 
> current web technology -- there has always been a lag between what's 
> practiced and what's taught. What I've seen of college web sites, 
> seems to support that claim.
> 
> If I was taught in college all I needed to know, then what am I doing 
> with these dozens of web books scattered about my office? I probably 
> read a new book every other week.

I don't "dabble" in it either, unless you consider making my living from being 
a dabbler, in which case I'll continue to dabble and see the pay for it.  My 
alma-mater tried to stay current to some degree, but when they let someone who 
wrote the C++ book try to teach it, well they gave that person more rope then 
they needed.

Tedd, glad you got hooked on Phonics.  One of these days I hope from graduating 
from just looking at the pictures, but right now the pictures are oh so 
enticing!. ;)  

Wolf

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



Re: [PHP] Help with understanding an error

2008-11-24 Thread Wolf

 Terion Miller <[EMAIL PROTECTED]> wrote: 
> Can anyone help explain what I need to do to fix this:
> 
> Error: *Warning*: mysql_fetch_object(): supplied argument is not a valid
> MySQL result resource in *
> C:\Inetpub\wwwroot\WorkOrderSystem\ViewWorkOrder.php* on line *57*
> 
> *Warning*: mysql_num_rows(): supplied argument is not a valid MySQL result
> resource in *C:\Inetpub\wwwroot\WorkOrderSystem\ViewWorkOrder.php* on line *
> 65
> 
> 
> Code:
> line 57: $row = mysql_fetch_object ($result);
> line 65: if (mysql_num_rows($result) == 0) {
> ?>
> *

STFW as Google has the answer..

But... you need to actually provide MORE of the code, since the error pretty 
much tells you that you don't have a connection to your database.  Not a PHP 
issue really.

Wolf

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



Re: [PHP] Help with understanding an error

2008-11-24 Thread Wolf
Bottom POST when mailing the list.

My responses inline and at the bottom

 Terion Miller <[EMAIL PROTECTED]> wrote: 
> this was the code I posted that accidentally only went to Wolf:
> 
> what does  STFW mean?

http://www.google.com/search?q=STFW&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

>  include("inc/dbconn_open.php");
Change the include to require (should barf faster)

 
> $result = mysql_query ($sql);
change this to:
$result = mysql_query ($sql) or die(mysql_error());

> $row = mysql_fetch_object ($result);
> 
> $sql2 = "SELECT Date_FORMAT(CreatedDate,'%m/%e/%Y %h:%i %p') AS OrderDate,
> Location, WorkOrderName, Status FROM workorders ";
> $sql2 .= "WHERE WorkOrderID='$WorkOrderID'";
> $result2 = mysql_query ($sql2);
Change this one as well to add the die statement
> $row2 = mysql_fetch_object ($result2);
> 


And as I said before, your error code tells you that the connection to the 
database is invalid.  Making the changes to the code I wrote above should point 
you in the right direction to get it figured out.

Wolf

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



Re: [PHP] PostTrack Reminder

2008-11-24 Thread Wolf

 Daniel Brown <[EMAIL PROTECTED]> wrote: 
> Folks;
> 
> Just as a reminder, the PostTrack/ListWatch system is back to
> recording and reporting data on the list for the Friday summary
> reports and list metrics.  If you do not want your email address to
> show up in the reports and have not already told me, please let me
> know ASAP and I will permanently remove you from the reports.  Note
> that this will *NOT* unsubscribe you from the list, just keep you from
> showing metrics in the weekly reports.
> 
> Thanks, all.  And a happy upcoming holiday to my fellow US Americans.
> 
> Everyone stay safe.
> 

Sure Dan, just pad your metrics with yet another post...  :)

Have a good Thanksgiving as well!  Make sure to eat lots of turkey so you sleep 
through the list emails!

Wolf

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



RE: [PHP] question about corrupt db?

2008-12-01 Thread Wolf


-Original Message-
From: Terion Miller <[EMAIL PROTECTED]>
Sent: Monday, December 01, 2008 4:23 PM
To: Micah Gersten <[EMAIL PROTECTED]>
Cc: PHP General 
Subject: Re: [PHP] question about corrupt db?

On Mon, Dec 1, 2008 at 3:12 PM, Micah Gersten <[EMAIL PROTECTED]> wrote:

> Terion Miller wrote:
> > could a corrupt db make php pages stop functioning?
> > My pages no longer go anywhere, I went back found the original scripts
> and
> > still it didn't fix the problem (thought I had messed the code up) so it
> has
> > to be something external of the code its doing this locally on my box and
> on
> > the live server.
> >
> > thanks
> > terion
> >
> >
> Have you checked the PHP error logs?
>
> Thank you,
> Micah Gersten
> onShore Networks
> Internal Developer
> http://www.onshore.com
>
>   I put this:



> ini_set('error_reporting', E_ALL);
> ini_set('display_errors', true);

in the top of the pages but no errors are showing
--

Then that answer would be no

You need to actually look at your error logs as if the server is set up right 
it won,'t allow ini bypasses.

Wolf

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



RE: [PHP] $_POST suddenly empty; $_GET and _$REQUEST fine

2008-12-03 Thread Wolf
-Original Message-
From: Alex Kirk 

I've got an Apache 2.2.3 server running PHP 5.2.6 on top of FreeBSD  
6.2. It's worked quite well for over a year now. However, as of some  
time last night, phpBB broke; upon investigation, I realized that the  
problem was that $_POST was never getting populated, even on properly  
formed HTML forms.

Testing this to try to find the issue, I used the following script:

\n";
?>

http://www.newmars.com/test.php  
name=formname enctype="multipart/form-data">




It works like a charm on a different machine with an essentially  
identical config (it's a newer version of FreeBSD, but that's about  
it); however, it never displays the contents of $_POST['testvar'] on  
the machine that suddenly quit functioning right last night.

Meanwhile, the rest of PHP seems to be working fine, as the phpBB  
forum is accessible in a read-only fashion.

I've searched all over, and done things like restarting Apache;  
checking phpinfo() for the POST data (it's not there on the broken  
server, but it is on the functional one); writting a quick Perl script  
that took POST input to verify that my browser was sending such data  
properly (it is); and scouring the Apache/PHP error logs. The worst  
part is, I didn't touch the config at all between when it worked and  
when it didn't. So now I'm at a total loss as to what could be causing  
this, or how I should go about troubleshooting...

==

Did you check the apache logs or the php error logs?

How about disk space on the server location where it is storing it's temp files 
for the server?

I've seen something similar when disk space was nil after some scripts ran 
amok.  

HTH, 
Wolf

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



Re: [PHP] Will not report errors what can I do

2008-12-04 Thread Wolf


Jim Lucas wrote:
> Johny John wrote:
>> HI Terion,
>> Please put the error reporting on top of the page and try. If you have
>> any
>> errors in the include file, it won't execute the rest of commands.
>> Make the
>> changes to code as follows.
>>
>> > error_reporting(E_ALL);
>> ini_set('display_errors', '1');
>> include("inc/dbconn_open.php");
>>
>> ?>
>>
>> Regards,
>>
>> Johny John
>>
> 
> This still doesn't address his possible parse error problem.  If he has
> a parse error, it makes no difference where he places the above lines.
> Nothing is going to work.
> 
> It should be done via one of the three methods that mention in my other
> email.

Putting it in the file is ideal if he can't set up his server to do it
via one of the other methods, however if he HAS set it up via other
methods, you normally HAVE to restart the server processes so that they
re-read the PHP.ini file so they actually will DO the changes that you
have made to them.

Otherwise you are just wasting more time.

HTH,
Wolf


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



Re: [PHP] Downloading file from local network machine

2008-12-05 Thread Wolf
 
> I  would like to present users to our internal intranet with a link to
> download a file from a folder on a different machine on our local
> network (such as \\computername\folder\file)
 

Map the drive to the server so that it is accessible as /folder/file on the 
website.

Voila, no more problem.

HTH,
Wolf

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



Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-05 Thread Wolf
 Terion Miller <[EMAIL PROTECTED]> wrote: 
> I have a huge form to validate and wonder which is better javascript
> validation or php, the page is a php page, I actually put js validation on
> it but then it stopped working (stopped inserting into the db) not sure if
> that had anything to do with it
> What does everyone prefer?
> 
> Terion who is actually finally learning stuff to her surprise!!

Never trust users to give you the data you expect.

Javascript/Ajax is a nicety but even when adding more things it can be broken.  
Always double-check and validate everything on the server side.

Wolf

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



RE: [PHP] php client

2008-12-14 Thread Wolf

idan72 wrote:
> Hi,
>
> I am new to PHP.
> I want to write a web client in PHP that will data to a server written in
> Java.
> I want that the client will send an object to the server.
>
> What is the best way to do that?
> Where can I find an example for doing that ?
>   
JAVA is on the client side. That is, it runs in the users browser.

PHP is on the server side, and there is no direct interaction between 
PHP and the user.

It seems from what you write that you need a "form" in a web page, and a 
PHP script to process the data the user enters and submits from the 
form. You may not need JAVA at all.

If this is what you want to go, Google, "PHP forms"

Stephen
-- 

For that, you don't even need PHP!  You can do that directly with HTML.  Forms 
are html and css, php would only be needed to process the data received from 
the forms.

But then, you can do that with CGI/Perl as well...

But at this point, stfw and go for forms.  Htmlgoodies.com is a good tutorial 
place to go..

Wolf

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



Re: [PHP] Require error

2008-12-19 Thread Wolf
Bottom Post

 sean greenslade  wrote: 
> No. The file is called testing.php and it is trying to include sql.inc
> 
> On Fri, Dec 19, 2008 at 12:36 PM, Kyle Terry  wrote:
> 
> >
> >
> > On Fri, Dec 19, 2008 at 9:28 AM, sean greenslade 
> > wrote:
> >
> >> So, I have this code in a php file called testing.php:
> >> $incl = '/webs/www.zootboy.com/sl/sql.inc';
> >>  if(!is_readable($incl)) die('ERROR: MySQL Include file does not
> >> exist??!?');
> >>  require $incl or die('MySQL page not found. Unable to continue.');
> >>
> >>
> >> When I run the code in command line, it outputs this:
> >>
> >> [r...@localhost ~]# php -f /webs/www.zootboy.com/sl/testing.php
> >> PHP Warning:  require(1): failed to open stream: No such file or directory
> >> in /webs/www.zootboy.com/sl/testing.php on line 13
> >> PHP Fatal error:  require(): Failed opening required '1'
> >> (include_path='/var/php/inc/') in /webs/www.zootboy.com/sl/testing.php on
> >> line 13
> >>
> >> I have no idea what's going on. All the files have 777 perms.
> >>
> >> --
> >> --Zootboy
> >>
> >
> > Are you trying to require itself?

Change your line to:
require('$incl') or die('File not found');

Require can be dork about things like this, I normally wind up handling to 
fiddle with the coding for them.

Wolf

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



Re: [PHP] Require error

2008-12-19 Thread Wolf

 sean greenslade  wrote: 
> On Fri, Dec 19, 2008 at 12:43 PM, Wolf  wrote:
> 
> > Bottom Post
> >
> >  sean greenslade  wrote:
> > > No. The file is called testing.php and it is trying to include sql.inc
> > >
> > > On Fri, Dec 19, 2008 at 12:36 PM, Kyle Terry  wrote:
> > >
> > > >
> > > >
> > > > On Fri, Dec 19, 2008 at 9:28 AM, sean greenslade <
> > zootboys...@gmail.com>wrote:
> > > >
> > > >> So, I have this code in a php file called testing.php:
> > > >> $incl = '/webs/www.zootboy.com/sl/sql.inc';
> > > >>  if(!is_readable($incl)) die('ERROR: MySQL Include file does not
> > > >> exist??!?');
> > > >>  require $incl or die('MySQL page not found. Unable to continue.');
> > > >>
> > > >>
> > > >> When I run the code in command line, it outputs this:
> > > >>
> > > >> [r...@localhost ~]# php -f /webs/www.zootboy.com/sl/testing.php
> > > >> PHP Warning:  require(1): failed to open stream: No such file or
> > directory
> > > >> in /webs/www.zootboy.com/sl/testing.php on line 13
> > > >> PHP Fatal error:  require(): Failed opening required '1'
> > > >> (include_path='/var/php/inc/') in /webs/
> > www.zootboy.com/sl/testing.php on
> > > >> line 13
> > > >>
> > > >> I have no idea what's going on. All the files have 777 perms.
> > > >>
> > > >> --
> > > >> --Zootboy
> > > >>
> > > >
> > > > Are you trying to require itself?
> >
> > Change your line to:
> > require('$incl') or die('File not found');
> >
> > Require can be dork about things like this, I normally wind up handling to
> > fiddle with the coding for them.
> >
> > Wolf
> >
> 
> Sorry, GMail defaults to top post. Also, I had tried that before. Same
> errors.
> 

Keep replies on the list too, in case someone else stumbles in...  :)

Did you try switching it from require to include?

Did you try just using the full path to the file?

Wolf

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



Re: [PHP] Require error

2008-12-19 Thread Wolf

 Kyle Terry  wrote: 
> On Fri, Dec 19, 2008 at 9:43 AM, Wolf  wrote:
> 
> > Bottom Post
> >
> >  sean greenslade  wrote:
> > > No. The file is called testing.php and it is trying to include sql.inc
> > >
> > > On Fri, Dec 19, 2008 at 12:36 PM, Kyle Terry  wrote:
> > >
> > > >
> > > >
> > > > On Fri, Dec 19, 2008 at 9:28 AM, sean greenslade <
> > zootboys...@gmail.com>wrote:
> > > >
> > > >> So, I have this code in a php file called testing.php:
> > > >> $incl = '/webs/www.zootboy.com/sl/sql.inc';
> > > >>  if(!is_readable($incl)) die('ERROR: MySQL Include file does not
> > > >> exist??!?');
> > > >>  require $incl or die('MySQL page not found. Unable to continue.');
> > > >>
> > > >>
> > > >> When I run the code in command line, it outputs this:
> > > >>
> > > >> [r...@localhost ~]# php -f /webs/www.zootboy.com/sl/testing.php
> > > >> PHP Warning:  require(1): failed to open stream: No such file or
> > directory
> > > >> in /webs/www.zootboy.com/sl/testing.php on line 13
> > > >> PHP Fatal error:  require(): Failed opening required '1'
> > > >> (include_path='/var/php/inc/') in /webs/
> > www.zootboy.com/sl/testing.php on
> > > >> line 13
> > > >>
> > > >> I have no idea what's going on. All the files have 777 perms.
> > > >>
> > > >> --
> > > >> --Zootboy
> > > >>
> > > >
> > > > Are you trying to require itself?
> >
> > Change your line to:
> > require('$incl') or die('File not found');
> >
> > Require can be dork about things like this, I normally wind up handling to
> > fiddle with the coding for them.
> >
> > Wolf
> >
> 
> Actually, single quoted will be string literal. He would need to encase them
> in double quotes so the parser knows it might be looking for a variable.
> require("$incl") is what he wants.
> 

See!  I told you I always have problems with those!  :)

Normally I'm not so literal though. 

so yeah:
require("$incl");
include("$incl");

I prefer the includes over the requires, but that is personal preference.

Wolf

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



Re: [PHP] First record not diplaying

2008-12-22 Thread Wolf
 Gary Maddock-Greene  wrote: 
> Hi, I seem to have a bug in my code but can't see why. My first record does 
> not display when I run a search. Can anyone spot what I have done wrong? 
> Thanks
> 
> if (0 == $totalRows_rsSearch) {
> echo "Sorry no products were found";
> } else {
> echo "Please click on a product for further information.";
> while ($row_rsSearch = mysql_fetch_assoc($rsSearch)){
> echo " $row_rsSearch['product_image']."\">
> 
> - Gary Maddock-Greene 

Is this another one of your classes?  I see your email address links to a web 
page created for a class.

Without the rest of the code (the code above what you have placed) and the end 
of the echo line you have provided, all any of us can do is a guess.

However one thing to note, this list was not created to help you with your 
homework and with the previous postings you have written, it is pointedly 
answering different places you have stumbled in your work and haven't checked 
your book, the online resources, or a TA.

Wolf

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



Re: [PHP] RSS Feed on my PHP site

2009-01-05 Thread Wolf

 DanBarker85  wrote: 
> 
> Hi
> 
> i'm new to RSS Feeds, but how would it be possible to have a BBC News Feed
> added to my website?
> 
> I've searched for some kind of tutorial but haven't found anything.

You STFW but haven't found anything?  Wow... Google sure had a number of 
responses...

http://www.google.com/search?q=adding+RSS+feeds+to+site&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

HTH,
Wolf

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



Re: [PHP] Couple of beginner questions

2009-01-09 Thread Wolf

 Gary  wrote: 
> I've done a number of sites in html and am now venturing into php.
> 
> Can I create a page in html and insert php code that will work? (for 
> example, take an existing page and insert a date command)
Yup

 
> Can I create a page with the php extension that contains only contains html 
> and no php?  If so are there advantages/disadvantages?
Yujp
 
> Can I mix and match file formats (php/html) in a single site?
Yup

> Thanks for any input.
> 
> Gary 
> 
> 
> 
> -- 
> 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] Couple of beginner questions

2009-01-09 Thread Wolf

 Eric Butera  wrote: 
> On Fri, Jan 9, 2009 at 12:22 PM, Wolf  wrote:
> >
> >  Gary  wrote:
> >> I've done a number of sites in html and am now venturing into php.
> >>
> >> Can I create a page in html and insert php code that will work? (for
> >> example, take an existing page and insert a date command)
> > Yup
> 
> Um... if the file ext is .html and php isn't set to run that then nope.

That's a very good point  Getting PHP up and running will require the OP to 
read and follow the documentation.

But after that, you can mix and mingle at will, however good programming 
practices dictate that you become smart about your coding instead of dumping 
things in the original HTML and just playing.

Gotta be smart about things.

Wolf

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



Re: [PHP] Can this be done?

2009-05-05 Thread Wolf

 "Miller wrote: 
> Ok I have a script that grabs data from a page and puts it in a db, I need
> to run this script 26 times on 26 different pages on the same site, is there
> a way to do this without making 26 different scripts load? Should I post the
> script?
> 
> Thanks, 
> T.Miller
> 

Sure it can be done...

Change your script so that it has the following:
1. array with the page names/urls in it
2. foreach loop right after the array to parse it
3. in the current place of the file name, but the variable
4. Make sure to close the foreach loop

IE:


HTH,
Wolf

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



Re: [PHP] Can this be done?

2009-05-05 Thread Wolf
 "Miller wrote: 
> 
> 
> 
> On 5/5/09 9:23 AM, "Wolf"  wrote:
> 
> 
> 
>  "Miller wrote:
> > Ok I have a script that grabs data from a page and puts it in a db, I need
> > to run this script 26 times on 26 different pages on the same site, is there
> > a way to do this without making 26 different scripts load? Should I post the
> > script?
> >
> > Thanks,
> > T.Miller
> >
> 
> Sure it can be done...
> 
> Change your script so that it has the following:
> 1. array with the page names/urls in it
> 2. foreach loop right after the array to parse it
> 3. in the current place of the file name, but the variable
> 4. Make sure to close the foreach loop
> 
> IE:
>  
> $pages=array("page1.php","page2.php",,"page26.php");
> foreach ($pages as $page)
> {
> // do all the grabbing and db throwing
> }
> 
> ?>
> 
> HTH,
> Wolf
> 
> 
> Hi this is what I'm working with as of now but still getting the blank page 
> of death...clues please:
> 


To find your reasons for blank pages:
1) check the php_error log if you have set it up
2) run the file via the command-line (php $filename) and see what happens, what 
errors you are getting back...
3) add the following to the top of your script after the http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What is this called?

2009-07-06 Thread Wolf

 "Miller wrote: 
> Ok, say you have a database with 16000 records in it, but you only want to
> call out say 2000 records at a time as the search/query is performed, then
> store the first 2000 in a session and then retrieve the next 2000 etc etc as
> a way to minimize server strain?
> 
> (I'm tasked to do this and )
> 1. don't know what this is called to google it...partioning results/data ???
> 
> 2. Is there a better way to deal with retrieval of large amounts of data
> from a large table without choking the server.
> 
> 3. Is it possible at all
> 
> Basically I need to know what it is I'm looking to do, it's not getting
> explained in an understandable way herewhich makes google useless
> 

Basically, go smack whomever told you to load all that stuff into a session.  
It's a paging query that you want to do, but I'd not recommend doing it to 
store it in a session.

You can store all that stuff into a session, but you risk putting a greater 
load on the users session then you would be putting on the database server.

If you are running MySQL, go get a 486, put Fedora on it and use it for the 
heavy queries.  

HTH,
Wolf

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



Re: [PHP] Clean break.

2009-08-04 Thread Wolf
Paul Halliday wrote:
> Whats the cleanest (I have a really ugly) way to break this:
> 
> [21/Jul/2009:00:00:47 -0300]
> 
> into:
> 
> date=21/jul/2009
> time=00:00:47
> 
> Caveats:
> 
> 1) if the day is < 10 the beginning of the string will look like 
> "[1/...
> 2) the "-0300" will differ depending on DST or TZ. I don't need it
> though, it just happens to be there.
> 
> This is what I have (it works unless day < 10):
> 
> $theParts = split("[\"]", $theCLF);
> 
> // IP and date/time
> $tmpParts = explode(" ", $theParts[0]);
> $theIP = $tmpParts[0];
> $x = explode(":", $tmpParts[3]);
> $theDate = str_replace("[","", $x[0]);
> $theTime = "$x[1]:$x[2]:$x[3]";
> 
> the full text for this part looks like:
> 
> 10.0.0.1 - - [21/Jul/2009:00:00:47 -0300] ... more stuff here
> 
> Anyway, any help would be appreciated.
> 
> thanks.
> 

unset ($STRING,$pos,$pos2,$pos3,$L,$D,$T,$pos4,$NString);
$STRING="10.0.0.1 - - [21/Jul/2009:00:00:47 -0300] ... more stuff here"
$pos=strpos($STRING,"[");
$pos2=strpos($STRING,"]");
$L=$pos2-$pos;
$NString=substr($STRING,$pos,$L);
$pos3=strpos($NString,":");
$D=substr($NString,0,$pos3);
$pos4=$pos3++;
$T=substr($NString,$pos4,8);
echo "date=$D";
echo "time=$T";

untested, but that should be pretty much all you need.

HTH,
Wolf


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



Re: [PHP] Re: Dan Brown

2009-08-04 Thread Wolf
Congratulations Dan!

On a side note, next time you go down the glorious path to having a
munchkin, go and get a puppy.  Between the labor pains and the morning
sickness, the wife can break you in on getting up at night with the
puppy.   :)

Glad to hear that the family is doing well.  Always a good thing.

Wolf


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



Re: [PHP] Time keeping in DB

2009-08-05 Thread Wolf

 Shawn McKenzie  wrote: 
> So, obviously not PHP related, but I'm looking for thoughts on the best
> way to record time sheets in a DB.  A time sheet for hours worked per
> day, not like a time clock where you start and stop.
> 
> The two possibilities that I have thought of are (these are simplistic,
> of course I'll be storing references to the user, the project code etc.):
> 
> 1. One record for each 7 day week (year, week_num, d1, d2, d3, d4, d5,
> d6, d7) where the dX field holds the hours worked
> 2. One record for each day (date, hours)
> 
> -- 
> Thanks!
> -Shawn
> http://www.spidean.com

Depends on what you are looking to do..

Are you also needing to keep whether or not a specific project?  
If it is regular time/Overtime? 

It may be easier to set the database up: user,week,day,project,hours,type

Then you can query the info/user off that, it should allow you to expand as 
needed.

HTH,
Wolf

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



[PHP] PHP Site Hacking Tools Revealed

2007-03-04 Thread Wolf
Folks,

I have been busy with life over the last number of months and have
finally been able to sit down and take the time to construct a site to
house the scripts that people have used to try to take down my server.
The following URL links to the majority of the hack tools that have been
tried.  They are set to display their source only, a couple of them do
not display their Source, but I am sure that if you look on the web for
them as they are named on the link, that you will find what you seek.

http://ambiguous.dnsalias.net/

Wolf

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



Re: [PHP] Can a Form Action transfer to another file that is a form?

2007-03-15 Thread Wolf
You can either split them off, or you will need to POST encode the data
and pass it along to the next page.  I'd have to see how the entire
process/scripts were running to give you a good code sample, but if you
want info to pass from one page to the next, POST it

Stephen wrote:
> I have a script file that is both the form and action handle (using
> isset), which is a menu selection.
> 
> If the action handler is executing it is a switch statement that will
> chose the next form.
> 
> I would like to transfer to another script file that is also a
> combination form and handler.
> 
> Can I do this without using a redirect? I have no need to bounce back to
> the user's browser.
> 
> Or should I just separate my forms and their action handlers?
> 
> Thanks
> Stephen
> 

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



Re: [PHP] simple form web site up date

2007-04-15 Thread Wolf
I cheat for some of mine.  I just write what I want/need to a MySQL with 
form inputs and then the page just queries the database.  takes it 0 
time to do it that way, and in case there is something screwed up 
date-wise, they can go in and fix it without too much hassle.


Wolf

Joker7 wrote:
I have said I would host a couple of friends CV's as a web page,here's the 
situation I'd like to set it up so that it can updated it via a simple 
form.I've googled the subject a fair bit and all I can come up with is big 
full solutions when I only need a simple form and say a flat file system.Any 
one have an idea or better still know of a pre-made form ect.


Cheers
Chris



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



Re: [PHP] CSS vs. Tables OT

2007-04-18 Thread Wolf

OK, so I like sticking my nose in sometimes...

Accessibility Standards and being bobby approved.

http://webxact2.watchfire.com/report.asp?t=2#priority3
on
http://lonewolf.homelinux.net/

Is just about as good as http://www.csszengarden.com

Just the same 1 error

:)

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



Re: [PHP] CSS vs. Tables OT

2007-04-19 Thread Wolf
That, and the big OT at the end means Off-Topic...  So if you don't want 
to get OT, just hit delete.  ;)


tedd wrote:

At 8:59 AM +1200 4/19/07, Bruce Cowin wrote:

Now can we please close this thread!  There are better forums to discuss
this - it has nothing to do with PHP!!

Lori


Lori:

True, it has nothing to do with php programming other than compliance, 
accessibility, data gathering and data presentation.


If php lived in a vacuum where computation was all there was, then that 
would not be a concern. However, we use other languages to grab our 
input and present our findings. IMO, to be "well rounded" we have to 
understand other languages such as html, xml, mysql, css, javascript and 
even ajax. These languages have both good and bad practices and carry 
with them responsibilities to our clients and adherence to standards and 
compliance issues. It's more than just pounding code.


I think it's good that we discuss these things because it brings about 
an understanding and appreciation of issues where our actions may have 
far reaching influence on important matters of which we may not be 
aware. Knowledge carries with it responsibility.


Cheers,

tedd



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



Re: [PHP] How Best to Maintain Sort Order Field

2007-04-20 Thread Wolf
IMO, you don't WANT to change that behavior.  The category_id should 
remain as a auto-fill field for the database itself, then just sort the 
results of your categories by name or order instead of by id when 
displaying out to the page.


HTH,
Wolf

Stephen wrote:
I have created some PHP scripts that use MySQL to organize the 
photographs on my web site.


They are grouped into categories and the table for categories has these 
fields:


Category_id
Category_order
Category_name
Category_description

When creating a category, the category_id field is blank

I want to create another form to allow populating and/or changing this 
field and then updating the database.


I will select all category rows, dynamically build the form and update 
the database, of course.


But the next level of detail is not clear to me.

What should I make the form look like? Can I do it so that after the 
update order values will always go from 1 to n where n is the number of 
categories?


Thanks
Stephen



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



Re: [PHP] PHP & Text Messaging

2007-04-20 Thread Wolf

What I found to work was @provider.whatever

The pain was just in finding out which provider used what sub-domain for 
their clients.


But it works for all of them that I have needed to send to.

HTH,
Wolf

Philip Thompson wrote:
Hi. I have attempted to look at the archives for this, but keep getting 
redirected back to the main PHP site when I click on the archive link. 
With that said, does anyone know of any good resources for sending text 
messages using PHP? I have Googled this topic and found a few, but find 
it hard to judge which ones are "good." I have also looked at the SAM 
package, but wasn't sure how much that is being used by the community.


Thanks in advance,
~Philip

--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 simple PHP script to generate a Pie Chart based on SQL query

2007-08-27 Thread Wolf
http://www.hotscripts.com/PHP/Scripts_and_Programs/Graphs_and_Charts/index.html

or 

http://www.phpclasses.org/browse/package/1063.html

or

http://www.google.com/search?q=PHP%3A+Pie+Chart&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

I've used the PHP classes one onces before, and used the one on hotscripts for 
another project.  There are some pay-for ones as well, but either of those 2 
should give you a good starting point even if you want to roll your own.

Robert


 "Ali wrote: 
> Hello All,
> 
> I am looking for a simple PHP script that can generate Pie Chart based
> on SQL query resultset.
> 
> I don't want a reporting system, as we are already using Crystal
> Reports for that.
> 
> Any suggestions?
> 
> Saqib Ali
> 
> -- 
> 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] date formatting

2007-08-29 Thread Wolf
Just have your input form get it in sections, then piece it all together when 
dumping it to MySQL

This way you can transparent the code on the front to users, but have it in the 
right format in the backend.

 Mike Ryan <[EMAIL PROTECTED]> wrote: 
> I would like to have my users input the date formate as mm-dd- mysql
> wants the data to come down as -mm-dd.
> 
> The question I have is how do I convert from the mm-dd- to -mm-dd so
> that I can write it out to the database?
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

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



Re: [PHP] Re: Public Announcement

2007-09-10 Thread Wolf
It's such a good bit of software, the website to learn more about it is 
completely useless.

Gotta love it...



 "M. Sokolewicz" <[EMAIL PROTECTED]> wrote: 
> 1. Who are you?
> 2. What is this?
> 3. Why should I care?
> 4. Don't spam.
> 
> Sascha Braun - CEO @ Braun Networks wrote:
> > The Spectral Authoring System is able to keep
> > round about 300.000 Document Kategories in one
> > Application.
> > 
> > 1.4 Million Screentexts are in use, while still
> > providing fast access.
> > 
> > The complete Application is Google Standard com-
> > pliant, without use of mod_rewrite, allowing long
> > directory pathes.
> > 
> > Its containing the only forum software worldwide
> > which is completely complying to the google stan-
> > dard for websites, without leaving holes in its
> > stucture.
> > 
> > As well there is an ajax driven webmail frontend
> > comparable to hotmail or yahoo mail included, which
> > easely can get scaled to keep more than a million
> > e-mail accounts, in a multidomain environment.
> > 
> > The Blog Module is following the actual blogging
> > standards, while remaining google compliant as
> > well as its completely fulltext searchable even
> > in an multiblog environment.
> > 
> > The shop system is not containing query urls any-
> > more, without use of mod_rewrite.
> > 
> > It is the best ecommerce and shopping plattform
> > worldwide.
> > 
> > Its written in PHP5.
> 
> -- 
> 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] look at all files, then go elsewhere

2007-09-11 Thread Wolf
All,

I'm trying to figure out the logic piece, and I'm pretty sure I am missing 
something simple.

I have a script that I want to check all files in a directory for information, 
if it doesn't find it when all done, I want it to go elsewhere, however if it 
does find it, I want it to break out of the search and perform a function.

CODE:
if ($userinfo == "")
{
 if ($handle = opendir('./bp_csv/')) {
  while (false !== ($file = readdir($handle))) {
   if($file != '..' && $file != '.') {
if(is_dir($file)) { //Diretory skipped
 } else {
 $command = 'cat ./bp_csv/' . $file . ' | grep '"';
 $user = $_POST[userid];
 $command .= $user . '"'';
 $userinfo=exec($command);
// here's where it is multi-looping
 if ($userinfo =="")
 { 
   echo "$user not found in any BP_CSV files, now running LDAP check";
   ldap_check($user);
 }
 else
 {
  // ok, found the person, run the function
  userprofile($userinfo);
 }
}
   }
  }
 } 
}
else
{
 //original data has contents, go after user data
 userprofile($userinfo);
}

--- END CODE

Wolf

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



Re: [PHP] Getting line count of a text file

2007-09-12 Thread Wolf
$command=  escapeshellcmd("cat {$file} | wc -l"); 
// Run command and capture results 
$count  =  exec($command); 



 "Frank J. Schima" <[EMAIL PROTECTED]> wrote: 
> Hi all,
> 
> 
> In PHP 5, I'm counting the number of lines in a text file using the  
> following code:
> $myfile = file ( '/path/to/myfile.txt');
> $count = count ($myfile);
> 
> However, sometimes it fails with the following error:
>   PHP Fatal error:  Allowed memory size of  bytes exhausted (tried  
> to allocate 35 bytes) in /path/to/myprogram.php on line 16
> 
> Line 16 is the first line above.
> 
> I'm sure there is a better - more memory efficient - way to do this.  
> Any suggestions?
> 
> 
> Thanks!
> Frank Schima
> Foraker Design
> 
> 
>

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



Re: [PHP] Getting line count of a text file

2007-09-12 Thread Wolf
We all know REAL servers are *nix...

:)

And his path is *nix based...

:)


 Nathan Nobbe <[EMAIL PROTECTED]> wrote: 
> On 9/12/07, Wolf <[EMAIL PROTECTED]> wrote:
> >
> > $command=  escapeshellcmd("cat {$file} | wc -l");
> > // Run command and capture results
> > $count  =  exec($command);
> 
> 
> 
> that would work on *nix, but not windows.
> 
>  "Frank J. Schima" <[EMAIL PROTECTED]> wrote:
> > > Hi all,
> > >
> > >
> > > In PHP 5, I'm counting the number of lines in a text file using the
> > > following code:
> > > $myfile = file ( '/path/to/myfile.txt');
> > > $count = count ($myfile);
> > >
> > > However, sometimes it fails with the following error:
> > >   PHP Fatal error:  Allowed memory size of  bytes exhausted
> > (tried
> > > to allocate 35 bytes) in /path/to/myprogram.php on line 16
> > >
> > > Line 16 is the first line above.
> > >
> > > I'm sure there is a better - more memory efficient - way to do this.
> > > Any suggestions?
> > >
> > >
> > > Thanks!
> > > Frank Schima
> > > Foraker Design
> > > <http://www.foraker.com>
> > >
> > >
> >
> 
> if you want a cross-platform solution (not that i use windows :))
> or you dont want to use exec() or related functions look to the stream
> functions.  they support buffered reading, so theorectically a script could
> read portions of a file and count lines as it read through the portions.
> 
> -nathan

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



RE: [PHP] Getting line count of a text file

2007-09-12 Thread Wolf
Novel approach...  But mine's less typing.  :)

never thought of using awk for it though.  Good one! :)

 bruce <[EMAIL PROTECTED]> wrote: 
> hey...
> 
> if you're going to do the system approach, go ahead and use awk/cut...
> 
> wc -l foo.txt | awk -F' ' '{print $1}'
> 
> should work assuming you're on linux.
> 
> 
> 
> -Original Message-
> From: mike [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 12, 2007 12:46 PM
> To: Frank J. Schima
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Getting line count of a text file
> 
> 
> On 9/12/07, Frank J. Schima <[EMAIL PROTECTED]> wrote:
> > In PHP 5, I'm counting the number of lines in a text file using the
> > following code:
> >  $myfile = file ( '/path/to/myfile.txt');
> >  $count = count ($myfile);
> >
> > However, sometimes it fails with the following error:
> >PHP Fatal error:  Allowed memory size of  bytes exhausted (tried
> > to allocate 35 bytes) in /path/to/myprogram.php on line 16
> >
> > Line 16 is the first line above.
> >
> > I'm sure there is a better - more memory efficient - way to do this.
> > Any suggestions?
> 
> it's sloppy but you could use system("wc -l $file") and grab the first
> part before the space (doesn't seem to be an option to NOT display the
> filename again)
> 
> -- 
> 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] 500 Internal Server Error

2007-09-30 Thread Wolf

Either change your PHP installation to be C:\php

Or you need to learn how to write:
C:\progra~1\php


Wolf

Francisco Frost wrote:
No, it's not, but I found out by enabling the show errors in php.ini 
that for about 80 items it's saying "PHP Startup: Unable to load dynamic 
library 'C:\Program Files\PHP\ext\" then the DLL's file name, then "The 
specified module was not found" but all the files are there.


"Per Jessen" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

Francisco Frost wrote:


I'm getting an error with my PHP, I'm running Apache 2.2.6 and every
time I try to access a PHP page on the Apache server, it says HTTP 500
Internal Server Error, can anyone help?


Check your apache error logs.  My guess is that PHP is making apache
segfault.


/Per Jessen, Zürich 




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



Re: [PHP] manipulating CSV files

2007-10-01 Thread Wolf
/
 $filename=""; // Name of your CSV file
 $file_path = ""; // whatever your files are pathed
 $filename = $file_path.$filename;
 $handle = @fopen($filename, "r");
 $k=0;
 $entry = $file_path . "entry_file.txt"; // I use this to make a new entry file
 $entry_file = fopen($entry, 'w');
 $file_data = "dummy";
 if (!$entry_file){die("Unable to open $entry_file");}
 if ($handle)
 {
  echo "$filename opened successfully!";
  flush();
  while (!feof($handle)) 
  {
   $file_date = $name;  // use this for adding the name for each one
   $file_data .= fgets($handle, 4096);
   fwrite($entry_file, $file_data);
   echo "$file_data written to $entry";
   flush();
  }
 }
 fclose($handle);
 fclose($entry_file);
}
else
{ die("Error opening $filename"); }

/


 pere roca <[EMAIL PROTECTED]> wrote: 
> 
>   hi folks,
>   
>   I have a CSV file. Data is separated by ','. For example:
>   -94.86524,42.059444,A,B,X
>   -96.86524,42.059444,A,B,Y1
>   -99.86524,42.059444,A,B,C1 
> 
>   I want to interactively insert the user_name (passed by a php variable)
> into the first "field" to insert then on my DataBase. 
> 
>   Peter,-94.86524,42.059444,A,B,X
>   Jan,-96.86524,42.059444,A,B,Y1
>   ...
>   I know there is a command (fwrite) to write, but I can't figure out how to
> start with it... 
>   Afet open csv, etc. I think I should first check when there is a "return"
> (we change of file), then I add the "user_name" parameter and repeat it as
> long as there is some record.  
>   
>   Any workaround or code doing something similar for a newbie in php,
> please?
>   Thanks,
> 
>Pere
> -- 
> View this message in context: 
> http://www.nabble.com/manipulating-CSV-files-tf4548721.html#a12980387
> Sent from the PHP - General mailing list archive at Nabble.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] manipulating CSV files

2007-10-03 Thread Wolf
Sure, just use the code I/we provided as the basis for what you need.

When you get stuck, post your code and we'll be happy to look at it for you.

Wolf

 pere roca <[EMAIL PROTECTED]> wrote: 
> 
>   hi Wolf and Jim, thanks for the answer!  Very useful.
>   Now  It would be wondeful if I can pick up the values from a CSV file
> (coordinates) and apply a postGIS/postgreSQL function (Select ...) to this
> data and add the resulting values as a new filed in the CSV !
> 
>   Is that possible?
> 
>   Thanks,
>   Pere
> 
> Wolf-6 wrote:
> > 
> > /
> >  $filename=""; // Name of your CSV file
> >  $file_path = ""; // whatever your files are pathed
> >  $filename = $file_path.$filename;
> >  $handle = @fopen($filename, "r");
> >  $k=0;
> >  $entry = $file_path . "entry_file.txt"; // I use this to make a new entry
> > file
> >  $entry_file = fopen($entry, 'w');
> >  $file_data = "dummy";
> >  if (!$entry_file){die("Unable to open $entry_file");}
> >  if ($handle)
> >  {
> >   echo "$filename opened successfully!";
> >   flush();
> >   while (!feof($handle)) 
> >   {
> >$file_date = $name;  // use this for adding the name for each one
> >$file_data .= fgets($handle, 4096);
> >fwrite($entry_file, $file_data);
> >echo "$file_data written to $entry";
> >flush();
> >   }
> >  }
> >  fclose($handle);
> >  fclose($entry_file);
> > }
> > else
> > { die("Error opening $filename"); }
> > 
> > /
> > 
> > 
> >  pere roca <[EMAIL PROTECTED]> wrote: 
> >> 
> >>   hi folks,
> >>   
> >>   I have a CSV file. Data is separated by ','. For example:
> >>   -94.86524,42.059444,A,B,X
> >>   -96.86524,42.059444,A,B,Y1
> >>   -99.86524,42.059444,A,B,C1 
> >> 
> >>   I want to interactively insert the user_name (passed by a php variable)
> >> into the first "field" to insert then on my DataBase. 
> >> 
> >>   Peter,-94.86524,42.059444,A,B,X
> >>   Jan,-96.86524,42.059444,A,B,Y1
> >>   ...
> >>   I know there is a command (fwrite) to write, but I can't figure out how
> >> to
> >> start with it... 
> >>   Afet open csv, etc. I think I should first check when there is a
> >> "return"
> >> (we change of file), then I add the "user_name" parameter and repeat it
> >> as
> >> long as there is some record.  
> >>   
> >>   Any workaround or code doing something similar for a newbie in php,
> >> please?
> >>   Thanks,
> >> 
> >>Pere
> >> -- 
> >> View this message in context:
> >> http://www.nabble.com/manipulating-CSV-files-tf4548721.html#a12980387
> >> Sent from the PHP - General mailing list archive at Nabble.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
> > 
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/manipulating-CSV-files-tf4548721.html#a13016318
> Sent from the PHP - General mailing list archive at Nabble.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] This, then that.

2007-10-19 Thread Wolf
actually, you could run it by 

1.  making the page
2. flushing the output buffer (which puts it in the screen)
3. run the 2nd script

 tedd <[EMAIL PROTECTED]> wrote: 
> At 12:06 AM -0400 10/19/07, Nathan Hawks wrote:
> >If by "creates a web page" you just mean it echos output to the browser,
> >and you want to do something else after that, then:
> >
> >After you have sent your  and have no more output for the
> >browser, just use the include() function to run your extra process.
> >
> >e.g
> >
> >
> >
> >
> 
> No, includes don't work that way.
> 
> Your secondary_script.php will be run before your html is shown.
> 
> You have to try it to understand.
> 
> Cheers,
> 
> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Can a PHP script process a file on a remote computer?

2007-10-24 Thread Wolf
Go into your php.ini file and increase the script timeout length, which should 
allow the upload to finish.


 Jon Westcot <[EMAIL PROTECTED]> wrote: 
> Hi all:
> 
> I'm working on a project that requires frequent updating of a large 
> amount of data to a MySQL database.  Currently, I'm trying to transfer a CSV 
> file to the server, have it process the file, and then delete it once the 
> processing is complete.  Rather than waste the up-front time of having to 
> upload the file (which is currently timing out without fully uploading the 
> file and I have no idea how to resolve this!), is it possible to have the 
> server open the specified file remotely and read it using the fgetcsv() 
> function?  If so, how?
> 
> Any help you can give me will be GREATLY appreciated!
> 
> Thanks,
> 
> Jon

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



Re: [PHP] SMTP unable to relay

2007-10-25 Thread Wolf
As previously posted, you need to work with your mail server admin.

sendmail is not normally on WinDoze boxes, so do some googling for the
setup you have, and talk with your admins to see what you need to do to
get it set up to work correctly.

Wolf

Diana wrote:
> I have tried settiing my php.ini to
> SMTP = localhost
> as well as using the SMTP of my regular mail, and I keep on getting this.
> Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to 
> relay for [EMAIL PROTECTED] in C:\Inetpub\wwwroot\intranet\test.php 
> on line 11
> 

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



Re: [PHP] Re: SMTP

2007-10-25 Thread Wolf
As previously posted, you need to work with your mail server admin.

sendmail is not normally on WinDoze boxes, so do some googling for the
setup you have, and talk with your admins to see what you need to do to
get it set up to work correctly.

Wolf

Daniel Brown wrote:
> On 10/25/07, Jens Kleikamp <[EMAIL PROTECTED]> wrote:
>> Diana schrieb:
>>> I dont know what I did but now I get this message Failed to connect to
>>> mailserver at "localhost" port 25, verify your "SMTP"
>>>
>> Do you have a smtp server running on localhost?
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> 
> Diana,
> 
> Try to keep all of the messages in a single thread so that people
> searching the archives can benefit from your solution as well.
> 
> Check into the following:
> 
> 1.) Is there an SMTP server running on port 25 on the local machine?
> 2.) Is there a firewall blocking incoming or outgoing connections
> on that port?
> 3.) Is PHP able to connect to any remote SMTP servers, or by domain name?
> 

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



[PHP] Compilers

2007-10-30 Thread Wolf
Anyone use compilers (linux based or Windoze) and which do you use?

Looking for something free (best) or low cost as we are doing some 
investigation on what methods are best for some of the stuff we have, and I'm 
thinking a compiled PHP app should run faster.

Thanks!
Wolf

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



Re: [PHP] Generating HTML table from MySQL table based on some criteria

2007-11-01 Thread Wolf
Sudheer,

Post the code you are using and we'll better be able to point you in the right 
direction to get your code working.

Wolf

 Sudheer Satyanarayana <[EMAIL PROTECTED]> wrote: 
> Hello,
> 
> I have a MySQL table with four columns - userid, created_date, username 
> and path_to_picture. path_to_picture column contains the path to the 
> image files of those users who have uploaded pictures. An example path 
> stored in path_to_picture column is picture/username.png.  There are  
> some  users that don't have their pictures uploaded. The column contains 
> nothing for these usernames.
> 
> I want to generate an HTML table with 20 recent users who have uploaded 
> their pictures. Each row in the HTML table should contain 5 columns. 
> Thus the HTML table would contain 4 rows.
> 
> How can I accomplish this?
> 
> I hope I have provided enough information to describe my problem. I 
> would be glad to provide more details if required.
> 
> I tried few permutations and combinations with ORDER BY and LIMIT 
> clauses to no avail. I have been scratching my head from few hours to 
> get this to work. Any help would be greatly appreciated.
> 
> 
> 
> 
> -- 
> With Warm Regards,
> Sudheer. S
> http://www.binaryvibes.co.in
> 
> -- 
> 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] More info on timeout problem

2007-11-05 Thread Wolf
One thing to note, if you have not upped the max file size to be over what you 
are trying to load, the server will hang.

;;;
; Resource Limits ;
;;;

max_execution_time = 7200 ; Maximum execution time of each script, in 
seconds
max_input_time = 7200   ; Maximum amount of time each script may spend parsing 
request data
memory_limit = 2G  ; Maximum amount of memory a script may consume


; Maximum size of POST data that PHP will accept.
post_max_size = 8M  // CHANGE THIS!!

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M  // CHANGE THIS!!

Also look in any php.ini files in apache's conf.d directory for files that set 
it back to these default limits

You'll notice, I have increased my max execution times, input times, and memory 
limit but not my upload sizes, but that is only due to the server I snagged it 
from not doing uploads.  I have another server which has a 879M upload limit 
and has no problems with large files getting to it.

Wolf

 Jon Westcot <[EMAIL PROTECTED]> wrote: 
> Hi Instruct ICC:
> 
> > > I'm now wondering if some error is occurring that, for some reason,
> is
> > > silently ending the routine.  I'm building what may be a very long SQL
> > > INSERT statement for each line in the CSV file that I'm reading; could
> > > I be hitting some upper limit for the length of the SQL code?  I'd think
> > > that an error would be presented in this case, but maybe I have to do
> > > something explicitly to force all errors to display?  Even warnings?
> > >
> > > Another thing I've noticed is that the "timeout" (I'm not even
> certain
> > > the problem IS a timeout any longer, hence the quotation marks) doesn't
> > > happen at the same record every time.  That's why I thought it was a
> > > timeout problem at first, and assumed that the varying load on the
> server
> > > would account for the different record numbers processed.  If I were
> > > hitting some problem with the SQL statement, I'd expect it to stop at
> > > the same record every time.  Or is that misguided thinking, too?
> >
> > 1) When you say, "doesn't happen at the same record every time" are you
> > using the same dataset and speaking about the same line number?  Or are
> > you using different datasets and noticing that the line number varies?  If
> it's
> > the same dataset, it sounds like "fun" -- as in "a pain in the assets".
> 
> Yup, same dataset.  It took me forever to upload it, so I'm trying to
> keep it there until I know it's been successfully loaded.  It's got about
> 30,000 records in it, and each one has 240 fields.
> 
> > 2) I'm writing something similar; letting a user upload a CSV file via a
> > webpage, then creating an SQL query with many records.  So now I'll
> > be watching your thread.  For debugging purposes, create your SQL
> > statement and print it out on the webpage (or save it somewhere --
> > maybe a file).  Don't have your webpage script execute the query.
> > Then see if you get the complete query you expect.  Then copy that
> > query into a database tool like phpmyadmin and see if you get errors
> > when executing the query.
> 
> Sounds much like what I'm trying to do.  I have had to give up, for the
> time being, on using PHP to upload the datafile; it's about 56 MB in size
> and nothing I do seems to let me upload anything larger than a 2MB file. :(
> 
> How do I save the individual query statements to a file?  That may give
> me a good option for checking a "log" of activity when the process fails
> again.
> 
> Thanks for your suggestions!
> 
> Jon
> 
> -- 
> 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] Can I make a process run in background?

2007-11-06 Thread Wolf
You could CRON the script, write a simple bash script that polls the server and 
if the php script is not running, restarts it.

* * * * * * /path/to/php 

Wolf


 Jim Lucas <[EMAIL PROTECTED]> wrote: 
> oops, didn't mean to reply off list.  SORRY LIST!
> 
> here is what I said.
> 
> This method will work until you log out, when you log out all your background 
> processes are killed.
> 
> If it were to be a CLI and you wanted it to run constantly and you manually 
> wanted to control it, I 
> would use "screen".  Screen allows you to start a new terminal, start 
> something, and then "detach" 
> from that screen.  Then you are allowed to log out and the next time you log 
> in, you are able to 
> resume the previous terminal session.
> 
> 
> 
> Per Jessen wrote:
> > Jim Lucas wrote:
> > 
> >> This method will work until you log out, when you log out all your
> >> background processes are killed.
> > 
> > man nohup.  
> 
> good point
> 
> > 
> > 
> > /Per Jessen, Zürich
> > 
> 
> 
> -- 
> Jim Lucas
> 
> "Some men are born to greatness, some achieve greatness,
> and some have greatness thrust upon them."
> 
> Twelfth Night, Act II, Scene V
>  by William Shakespeare
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

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



Re: [PHP] PHP Programmers Needed

2007-11-12 Thread Wolf
It amazes me that you attack in one post then beg for help in another.

Neither of which have you followed basic concepts such as:
1. posting your code
2. posting your output
3. describing your problem

As for this post, it is common practice for contractors to post they are 
seeking some contract workers.  If you are interested in applying for it, 
contact the person posting the job.  If you aren't, then delete the post.



 mvh <[EMAIL PROTECTED]> wrote: 
> 
> You are who and where ?
> Who would want to be hired without knowing if the hirer can compensate the
> hired.
> Even Microsoft advertises full page looking for employess (here in
> India)
> I dont know where you are.
> 
> 
> [EMAIL PROTECTED] wrote:
> > 
> > I am looking to hire PHP programmers to help me in various projects I have
> > going on.  They all involve PHP, MySQL extensive knowledge and JavaScript
> > would be a plus.  Please email me if you're interested.  Please include
> > references for people you've done jobs for in the past, work history,
> > knowledge of PHP & MySQL & JavaScript, desired compensation.  This
> > opportunity could result in full-time work if we are successful and it's
> > something you're looking for.  Please let me know ASAP.
> > 
> > Thanks,
> > 
> > Ben
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/PHP-Programmers-Needed-tf4789283.html#a13707329
> Sent from the PHP - General mailing list archive at Nabble.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] How to query google pagerank from PHP

2007-11-12 Thread Wolf
Understandably you have found the code in perl here, but what PHP code have you 
written and are you stuck on in transmuting to PHP?

Wolf

 mvh <[EMAIL PROTECTED]> wrote: 
> 
> I found it here
> http://cpan.uwinnipeg.ca/dist/WWW-Google-PageRank
> 
> Hemanth
> www.ValueAds.Biz
> 
> 
> Stut wrote:
> > 
> > Port the Perl code. Won't be too hard. Where's the Perl code?
> > 
> 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/How-to-query-google-pagerank-from-PHP-tf4791385.html#a13707254
> Sent from the PHP - General mailing list archive at Nabble.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] freeing resourses after the end of the session

2007-11-19 Thread Wolf
Depending on how you are doing the session/image you could do the following:



Then save that as a cron job that runs every minute or every 5 and (depending 
on site needs) and you should be good to go.

Wolf
 Fernando <[EMAIL PROTECTED]> wrote: 
> Hello,
> 
> I made a image validation code, wich generate a image every time the 
> user enters a page.
> 
> The name of the image uses the session id, and I save it in a temporary 
> directory.
> 
> When the user close the browser (or leave the site) I would have to 
> delete the image (or else I will start to have many garbage images in the 
> temp directory).
> 
> Is there any way to do that? From PHP?
> 
> Fernando Bonafé
> Artista Plástico
> (19) 81184401
> (19) 32322239
> [EMAIL PROTECTED]
> _
> www.opapagaiorinoceronte.net 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Wolf
Since it is not in the assignment, find out how to do things within the 
parameters of your assignment.

http://www.google.com
php: {issue}

Googling "PHP: mail bcc" (sans quotes) has 5 viable workings on how to do it.  
If it fails, then you need to be examing the php.ini file for information or 
talking with the server admins as to what piece is wrong.  Also, if you are 
error checking your own stuff, then the error log should be able to tell you 
what has failed out.

I'm glad your professor is teaching you how to learn, but shouldn't this be 
something you should be able to do already?  

And wasn't this whole thing started with you looking for something that you 
were "already too much money into" to change for the next roll-out?  So now you 
are fessing up to trying to get the PHP board to do your assignments for you?

I sure hope your instructor is on this board too...

Wolf

 Brad <[EMAIL PROTECTED]> wrote: 
> PHP mailer is not in the assignment and will be counted against me!
> 
> -Original Message-
> From: Stut [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 19, 2007 3:43 PM
> To: Brad
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] two small issues with php mail
> 
> Brad wrote:
> > Implementing Bcc and smtp.
> 
> "Here we go again"
> 
> > #1 email is only being sent to a few recipients.
> > 
> > I need to implement 
> > 
> > $smtp = ‘localhost’; 
> > 
> > Somewhere, but I keep getting parse errors?
> 
> Those are not normal quotes, but I'm guessing you actually typed that in 
> the evil that is Outlook.
> 
> > #2 trying to do a Bcc but that gives me parse errors as well
> > 
> > It should be as easy as?
> > 
> > $Bcc [EMAIL PROTECTED]; $eol = "\r\n";
> 
> That's not valid code. Ok, the second bit is, but still rather pointless.
> 
> > Here is the working code, but if I implement the above needed inserts
> > anywhere, I get a big ‘ol fat parse error
> > 
> > Any assistance would be truly appreciated.
> > 
> > An explanation of why would really help since this is for a school
> project.
> 
> Ahh, suddenly everything becomes clear. You can't use PHPMailer because 
> that would mean that you didn't learn it yourself you just used somebody 
> elses work. So instead you ask here rather than reading the PHPMailer 
> source code. Nice.
> 
> > Working code as is:
> > 
> >  > 
> > $email = $_REQUEST['email'];
> > 
> > $fromaddress = '[EMAIL PROTECTED]';
> > 
> > $fromname = 'Zone of success Club'; $eol = "\r\n";
> > 
> > $headers  = 'From: '.$fromname.' <'.$fromaddress.'>'.$eol;
> > 
> > // $headers = 'bcc: '[EMAIL PROTECTED]';
> 
> This should work. However, because you're assigning this to $headers 
> rather than concatenating it you're trampling over the From line above.
> 
> BTW, Bcc usually has a capital letter. Probably wouldn't cause any 
> problems but has the potential to stop it working.
> 
> > $headers .= 'Reply-To: '.$fromname.' <'.$fromaddress.'>'.$eol;
> > 
> > $headers .= 'Return-Path: '.$fromname.' <'.$fromaddress.'>'.$eol;
> > 
> > $headers .= 'X-Mailer: PHP '.phpversion().$eol;
> > 
> > $headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;
> > 
> > $headers .= 'Content-Transfer-Encoding: 8bit';
> > 
> > $subject = 'Your free book!';
> > 
> > $body = ' > href="http://www.zoneofsuccessclub.com/freePDF/autopilotebook.pdf";>"Click
> > ME"  Here is your FREE autopilot book';
> 
> "Click ME" indeed. I'm guessing this isn't an HCI course you're doing.
> 
> > mail($email, $subject, $body, $headers);
> > 
> > ?>
> 
> Try the veal.
> 
> -Stut
> 
> -- 
> http://stut.net/
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
> 5:15 PM
>  
> 
> No virus found in this outgoing message.
> Checked by AVG Free Edition. 
> Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
> 5:15 PM
>  
> 
> --
> 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] two small issues with php mail

2007-11-19 Thread Wolf
Guidance:
1.  Learn the syntax of PHP, including how to concatenate information to 
variables.
2.  Learn the syntax of coding standards for the language you are using.
3.  Learn the proper way to ask for help
4.  Learn the proper way to read answers provided, since this is difficult for 
you...
A. Remove head from @$$
B. Read email top to bottom (printing it out sometimes helps)
C. Mark through the bits of working code that you provided
D. Re-Read non-working code with helpful tips from those whom have given 
you answers
E. THANK THE ANSWERERS FOR THEIR HELP
F. Fully document your code with the markings where you received further 
insight or code pieces themselves to show where you got it

If you don't like sarcasm or want people to do your homework for you, go to 
another list.  Many of us on here code daily, using pieces of our own and 
helping others and each other out (OK, I can't EVER remember helping Stut with 
something), but we are here because we like to help and pass on information.  
We are NOT here to write code for your business or homework.

You should be learning these principals in your class, you must have been 
skipping or asleep during them.

And yes, Stut's answers are great for the issue at hand, but you need to go 
back and follow the steps (possibly making sure to step A multiple times)... 
And I'd love to hear you recite the entire page.  What's your number and I'll 
speaker-phone it.  :-D

Wolf

 Brad <[EMAIL PROTECTED]> wrote: 
> This is why I am on this mailing instead of the php site for their mailer
> which is utterly useless!
> 
> I could probably recite the entire page by heart and gained nothing compared
> to the insight and reading material offered by this list.
> 
> Just seeking knowledgeable guidance!
> 
> Any assistance on methods to solve my issue would be duly appreciated!
> 
> -Original Message-
> From: Stut [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 19, 2007 4:17 PM
> To: Brad
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] two small issues with php mail
> 
> Brad wrote:
> > This information is pulled directly off the php website when used for
> other
> > applications, so if I am wrong, then so are they.
> > 
> > As for php mailer, my professor explained it very well today,
> > Learn the in's and out's of the programming and it's quarks to understand
> > the logic and then he will show us the tricks.
> 
> I wouldn't call PHPMailer a trick as such, but your professor is 
> absolutely right about learning the in's and out's of programming. 
> Unfortunately your posts so far have demonstrated that you haven't yet 
> grasped the syntactic basics yet but it doesn't seem to bother you.
> 
> > Yes, here we go again!
> > 
> > I am just seeking valid knowledge and understanding. Reading material is
> > great too as long as it is relevant.
> 
> The use of BCC with the PHP mail function is pretty well-explained on 
> the PHP manual page for said function.
> 
> > Sarcasm does not help with the learning curve sir!
> 
> You will find that if you read my reply carefully the answers you seek 
> are in there. I rarely answer a question with sarcasm alone, but I'm a 
> little ashamed to say that it does happen occasionally.
> 
> I hang about on this list for entertainment. I get that from helping 
> people and mocking those I think deserve it. If you don't like it feel 
> free to ignore me or add me to your kill list, but don't ask me to stop.
> 
> -Stut
> 
> -- 
> http://stut.net/
> 
> > -Original Message-
> > From: Stut [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, November 19, 2007 3:43 PM
> > To: Brad
> > Cc: php-general@lists.php.net
> > Subject: Re: [PHP] two small issues with php mail
> > 
> > Brad wrote:
> >> Implementing Bcc and smtp.
> > 
> > "Here we go again"
> > 
> >> #1 email is only being sent to a few recipients.
> >>
> >> I need to implement 
> >>
> >> $smtp = ‘localhost’; 
> >>
> >> Somewhere, but I keep getting parse errors?
> > 
> > Those are not normal quotes, but I'm guessing you actually typed that in 
> > the evil that is Outlook.
> > 
> >> #2 trying to do a Bcc but that gives me parse errors as well
> >>
> >> It should be as easy as?
> >>
> >> $Bcc [EMAIL PROTECTED]; $eol = "\r\n";
> > 
> > That's not valid code. Ok, the second bit is, but still rather pointless.
> > 
> >> Here is the working code, but if I implement the above needed inserts
> >> anyw

RE: [PHP] two small issues with php mail

2007-11-19 Thread Wolf
1.  Always copy the list back
2.  HERE is the right word you want, since you can't HEAR someone's on email or 
when reading the system files.  Maybe you should take English & Grammar 101 for 
your next course.
3.  Who says you need access to the server backend...  Google phpinfo() - > 
very basic,  ALL books say to make this page when verifying PHP is installed 
correctly.

I didn't assume anything, merely followed the threads.  And since from the 
looks of things the thread has not changed, the back-story has...  Well draw 
your own conclusions there.

Wolf

 Brad <[EMAIL PROTECTED]> wrote: 
> Wolf write!
> ###
> Since it is not in the assignment, find out how to do things within the
> parameters of your assignment.
> 
> http://www.google.com
> php: {issue}
> 
> Googling "PHP: mail bcc" (sans quotes) has 5 viable workings on how to do
> it.  If it fails, then you need to be examing the php.ini file for
> information or talking with the server admins as to what piece is wrong.
> 
> ##
> 
> Me
> 
> No access to the server backend!
> 
> #
>   Also, if you are error checking your own stuff, then the error log should
> be able to tell you what has failed out.
> 
> ###
> Me
> 
> Doing it, but since these are situational and specific to my problem alone,
> I am batting zero and now on the list!
> 
> 
> I'm glad your professor is teaching you how to learn, but shouldn't this be
> something you should be able to do already?  
> 
> And wasn't this whole thing started with you looking for something that you
> were "already too much money into" to change for the next roll-out?  So now
> you are fessing up to trying to get the PHP board to do your assignments for
> you?
> 
> ###
> Me
> 
> You are assuming hear and one guarantee about assumptions is that they are
> 99% incorrect.
> 
> ##
> 
> I sure hope your instructor is on this board too...
> 
> Wolf
>  

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Wolf
I didn't say TO edit the php.ini file, but it will tell you what the setup of 
said server is, including compiled in pieces and smtp settings.

Are you aware of .htaccess files?  google override php.ini using .htaccess and 
you should get some good hits there.  But then that is probably outside the 
scope of your assignment.  However some professors see that as insightful, YMMV.

Wolf


 Brad <[EMAIL PROTECTED]> wrote: 
> I am very much aware of phpinfo()
> Which has nothing to do with being able to edit the php.ini file!
> 
> -Original Message-
> From: Wolf [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 19, 2007 4:59 PM
> To: Brad; php-general
> Subject: RE: [PHP] two small issues with php mail
> 
> 1.  Always copy the list back
> 2.  HERE is the right word you want, since you can't HEAR someone's on email
> or when reading the system files.  Maybe you should take English & Grammar
> 101 for your next course.
> 3.  Who says you need access to the server backend...  Google phpinfo() - >
> very basic,  ALL books say to make this page when verifying PHP is installed
> correctly.
> 
> I didn't assume anything, merely followed the threads.  And since from the
> looks of things the thread has not changed, the back-story has...  Well draw
> your own conclusions there.
> 
> Wolf
> 
>  Brad <[EMAIL PROTECTED]> wrote: 
> > Wolf write!
> > ###
> > Since it is not in the assignment, find out how to do things within the
> > parameters of your assignment.
> > 
> > http://www.google.com
> > php: {issue}
> > 
> > Googling "PHP: mail bcc" (sans quotes) has 5 viable workings on how to do
> > it.  If it fails, then you need to be examing the php.ini file for
> > information or talking with the server admins as to what piece is wrong.
> > 
> > ##
> > 
> > Me
> > 
> > No access to the server backend!
> > 
> > #
> >   Also, if you are error checking your own stuff, then the error log
> should
> > be able to tell you what has failed out.
> > 
> > ###
> > Me
> > 
> > Doing it, but since these are situational and specific to my problem
> alone,
> > I am batting zero and now on the list!
> > 
> > 
> > I'm glad your professor is teaching you how to learn, but shouldn't this
> be
> > something you should be able to do already?  
> > 
> > And wasn't this whole thing started with you looking for something that
> you
> > were "already too much money into" to change for the next roll-out?  So
> now
> > you are fessing up to trying to get the PHP board to do your assignments
> for
> > you?
> > 
> > ###
> > Me
> > 
> > You are assuming hear and one guarantee about assumptions is that they are
> > 99% incorrect.
> > 
> > ##
> > 
> > I sure hope your instructor is on this board too...
> > 
> > Wolf
> >  
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
> 5:15 PM
>  
> 
> No virus found in this outgoing message.
> Checked by AVG Free Edition. 
> Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
> 5:15 PM
>  

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Wolf
Brad,

Take 3 steps away from the computer.  Now take a few deep breaths.  Good.

Stut is NOT Jessen, make sure that the person who called you a dumbass is given 
the proper credit for doing so.  

Stut has tried to be helpful and if you take the time to read through it (are 
you on a deadline for having your homework done and partied too hard this 
weekend?) and you should be able to get your stuff handled.

BCC is the only way to send email without putting the recipients in the CC or 
To field.  But do make sure you follow the correct syntax to include them.

Wolf

 Brad <[EMAIL PROTECTED]> wrote: 
> As per your email!
> 
> #
> 
> Brad wrote:
> 
> > $headers = 'bcc: [EMAIL PROTECTED]';
> > 
> > Works but corrupts the "from" portion and changes it to "nobody"
> > Which I think goes back too the smtp portion.
> 
> There is no bcc: header. BCC'ing someone is normally done by sending them
> the email without listing them explicitly in to: or cc:.
> 
> 
> /Per Jessen, Zürich
> 
> 
> 
> -Original Message-
> From: Stut [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 19, 2007 5:18 PM
> To: Brad
> Cc: 'Wolf'; php-general@lists.php.net
> Subject: Re: [PHP] two small issues with php mail
> 
> Brad wrote:
> > Well, since
> > 
> > http://forums.hostmysite.com/about1171.html
> > 
> > states
> > 
> > $headers .= "CC: [EMAIL PROTECTED]";
> > 
> > Which does not work for me AT ALL and Stut called me a [EMAIL PROTECTED] 
> > for doing
> > it, I am assuming that all this key wording on google is not going to and
> > the problem appears to be else where!
> 
> I don't believe I did that at all (if I did can someone else please let 
> me know - it's never my intention).
> 
> Since you don't seem willing to properly read my original reply to you, 
> the one with the answer in it, I give up. I wish your professor luck.
> 
> -Stut
> 
> -- 
> http://stut.net/
> 
> > -Original Message-
> > From: Wolf [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, November 19, 2007 4:39 PM
> > To: Brad
> > Cc: php-general@lists.php.net; 'Stut'
> > Subject: RE: [PHP] two small issues with php mail
> > 
> > Since it is not in the assignment, find out how to do things within the
> > parameters of your assignment.
> > 
> > http://www.google.com
> > php: {issue}
> > 
> > Googling "PHP: mail bcc" (sans quotes) has 5 viable workings on how to do
> > it.  If it fails, then you need to be examing the php.ini file for
> > information or talking with the server admins as to what piece is wrong.
> > Also, if you are error checking your own stuff, then the error log should
> be
> > able to tell you what has failed out.
> > 
> > I'm glad your professor is teaching you how to learn, but shouldn't this
> be
> > something you should be able to do already?  
> > 
> > And wasn't this whole thing started with you looking for something that
> you
> > were "already too much money into" to change for the next roll-out?  So
> now
> > you are fessing up to trying to get the PHP board to do your assignments
> for
> > you?
> > 
> > I sure hope your instructor is on this board too...
> > 
> > Wolf
> > 
> >  Brad <[EMAIL PROTECTED]> wrote: 
> >> PHP mailer is not in the assignment and will be counted against me!
> >>
> >> -Original Message-
> >> From: Stut [mailto:[EMAIL PROTECTED] 
> >> Sent: Monday, November 19, 2007 3:43 PM
> >> To: Brad
> >> Cc: php-general@lists.php.net
> >> Subject: Re: [PHP] two small issues with php mail
> >>
> >> Brad wrote:
> >>> Implementing Bcc and smtp.
> >> "Here we go again"
> >>
> >>> #1 email is only being sent to a few recipients.
> >>>
> >>> I need to implement 
> >>>
> >>> $smtp = ‘localhost’; 
> >>>
> >>> Somewhere, but I keep getting parse errors?
> >> Those are not normal quotes, but I'm guessing you actually typed that in 
> >> the evil that is Outlook.
> >>
> >>> #2 trying to do a Bcc but that gives me parse errors as well
> >>>
> >>> It should be as easy as?
> >>>
> >>> $Bcc [EMAIL PROTECTED]; $eol = "\r\n";
> >> That's not valid code. Ok, the second bit is, but st

RE: [PHP] two small issues with php mail

2007-11-19 Thread Wolf
Why is what?  Sorry, you are going to have to go back and phrase this into a 
complete sentence.

"it makes no sense" refers to what exactly?

No, you don't have clearance since you haven't passed syntax 101 along with 
English and Grammar 101.  Once you have completed these courses, the answers to 
your questions should be as obvious as the keyboard in front of you.

If Stut's answer does not make sense to you, google concatenate in the 
dictionary (dictionay: concatenate), then re-read his answer.

Your professor MUST have a bottle stored somewhere...

Wolf


 Brad <[EMAIL PROTECTED]> wrote: 
> Why is this?
> 
> It makes no sense?
> 
> Can anyone show me where an "order of operations" for php mail might be
> hidden?
> Or is this "top secret" information requiring clearance "which I have"?
> 
> 
> Wrong bit. I also said...
> 
>  > // $headers = 'bcc: '[EMAIL PROTECTED]';
> 
> This should work. However, because you're assigning this to $headers rather
> than concatenating it you're trampling over the From line above.
> 
> BTW, Bcc usually has a capital letter. Probably wouldn't cause any problems
> but has the potential to stop it working.
> 
> Fin.
> 
> -Stut
> ###
> 
> -Original Message-
> From: Stut [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 19, 2007 5:25 PM
> To: Brad
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] two small issues with php mail
> 
> Brad wrote:
> > You say
> > 
> >> The use of BCC with the PHP mail function is pretty well-explained on 
> >> the PHP manual page for said function.
> > 
> > I say,
> > 
> > No it doesn't, I tried everything on that page and it either parse
> error'ed
> > or didn't work.
> 
> Wrong bit. I also said...
> 
>  > // $headers = 'bcc: '[EMAIL PROTECTED]';
> 
> This should work. However, because you're assigning this to $headers 
> rather than concatenating it you're trampling over the From line above.
> 
> BTW, Bcc usually has a capital letter. Probably wouldn't cause any 
> problems but has the potential to stop it working.
> 
> Fin.
> 
> -Stut
> 
> -- 
> http://stut.net/
> 
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
> 5:15 PM
>  
> 
> No virus found in this outgoing message.
> Checked by AVG Free Edition. 
> Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
> 5:15 PM
>  
> 
> -- 
> 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] two small issues with php mail

2007-11-19 Thread Wolf
belligerent?  Moi?  Smart-ass yes, pointed yes.  belligerent? No.  But I don't 
take kind to pointed attacks at people who help many others and have tried 
repeatedly to help you without just changing the coding to work for you.  Why?  
Because they and I have helped and been helped by people on here and attacking 
them does not help anyone.  But the sarcasm will get people laughing.  And 
humor/laughter is the best medicine.

You combine the from along with the BCC because they are all part of the 
headers.  What you were doing instead was assigning both to headers as a 
variable.  Which means you no longer had a from.  But if you had concatenated 
them in the first place, that would not have been an issue.  

"" versus '' is syntax, pure and simple.  Some work different ways depending on 
how they are being operated on.  For instance you can do the following:


As for understanding "" versus '' ...  Well they both have their uses and you 
will need to see what works best for your current instant issues, and if one of 
them fails, then you will need to massage the code.  Notice that the last 
example I wrote concatenated the variable with the string to give me the proper 
output.

If you play with mail enough, you will find that your stuff will work when 
dumped into $header whereas it will fail when placed into others.  As for WHY 
that is, blame it on smtp.

If your email is going to some but not all, then the some more then likely are 
getting filtered.  Possibly by the sending server, possibly by a middle server 
that the recipients have set up, possibly by a filter on their end.  Email 
either works or does not.  If all of the email addresses are in the same field 
(to, cc, bcc) and some have received and some have not, then the bet is either 
1.  bad addresses, or 2. filtered.  Again, it's not a mail problem attributable 
to PHP but to either the person entering the email addresses, bad information 
or a filter (which could be done multiple ways).

If you had taken the breaths and calmed down when Stut wrote you, Chris would 
not have had to rewrite your own code to show the simple syntax flub that was 
partially causing your issue.

And as for the note about email addresses and URLs, this list IS actively 
parsed for those things, so make sure your mail filters are up to snuff.  And 
advise anyone who's email and/or URL you have sent out to make sure theirs is 
as well.  And as for sending the phpinfo output...  Well I'd just make sure the 
server admins are aware of it and have proper security in place as well.

You will find that those who try to answer you won't just give you a straight 
answer for the most part but will try to guide you to see what you did.  
Especially for something syntax.  We all make a mistake on it once in a while 
(well maybe not Stut and Chris) but even I will get a coworker to read through 
the code.  The important thing is making sure your () and {} are properly done 
and your ; are in the right spot, the rest normally takes some massaging to get 
right for what your needs are.

As for the grammar and security clearance and whatnot  well let's just say 
that when you took the breath and came back without attacking that it showed 
you thought things through.  

Wolf


 Brad <[EMAIL PROTECTED]> wrote: 
> Why are you being to belligerent?
> English 101-104 I have aced.
> Top secret security clearance I maintain.
> Concatenate I know well (why would I combine the from, and the bcc?)
> 
> A logical explanation as to the order these guys get plugged into in an
> array and why one requires a "" another a '' and the other a "\r\n" with
> little to no documentation available on google or the text book,
> If this is representation to my ignorance in syntax, then yes, I am guilty!
> 
> I am simply trying to understand..
> 
> 
> 
> -Original Message-
> From: Wolf [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 19, 2007 6:23 PM
> To: Brad
> Cc: php-general@lists.php.net; 'Stut'
> Subject: RE: [PHP] two small issues with php mail
> 
> Why is what?  Sorry, you are going to have to go back and phrase this into a
> complete sentence.
> 
> "it makes no sense" refers to what exactly?
> 
> No, you don't have clearance since you haven't passed syntax 101 along with
> English and Grammar 101.  Once you have completed these courses, the answers
> to your questions should be as obvious as the keyboard in front of you.
> 
> If Stut's answer does not make sense to you, google concatenate in the
> dictionary (dictionay: concatenate), then re-read his answer.
> 
> Your professor MUST have a bottle stored somewhere...
> 
> Wolf
> 
> 
>  Brad <[EMAIL PROTECTED]> wrote: 
> > Why is this?
> > 

Re: [PHP] two small issues with php mail

2007-11-20 Thread Wolf
 Jim Lucas <[EMAIL PROTECTED]> wrote: 
> Per Jessen wrote:
> > Brad wrote:

> 
> remember, he is wanting to setup SMTP auth.  So he will not be using 
> PHP's mail() function.
> 
> He needs to talk directly to the SMTP server.
> 
> Jim
 Jim,

At this point, we need to just get his homework assignment parameters from 
"Brad" so we can see what next questions he'll have...  I'm not sure he needs 
to do SMTP auth but even if he does, he's going to need to be able to write 
correct syntax and debug his code along the way...

Wolf

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



Re: [PHP] two small issues with php mail

2007-11-20 Thread Wolf
 Jim Lucas <[EMAIL PROTECTED]> wrote: 
> Wolf wrote:
> >  Jim Lucas <[EMAIL PROTECTED]> wrote: 
> >> Per Jessen wrote:
> >>> Brad wrote:
> > 
> >> remember, he is wanting to setup SMTP auth.  So he will not be using 
> >> PHP's mail() function.
> >>
> >> He needs to talk directly to the SMTP server.
> >>
> >> Jim
> >  Jim,
> > 
> > At this point, we need to just get his homework assignment parameters from 
> > "Brad" so we can see what next questions he'll have...  I'm not sure he 
> > needs to do SMTP auth but even if he does, he's going to need to be able to 
> > write correct syntax and debug his code along the way...
> > 
> > Wolf
> 
> Well, re-reading his first post, it does seem like the only two things 
> he is interested in solving, besides syntax and formatting, are SMTP 
> auth and using the BCC to send to additional addresses.
> 
> -- 
> Jim Lucas
> 

Actually, reading his "first post" tells you that he is trying to get this to 
work "for his business" and he's too much "into this guy for $$$" to go with a 
MySQL databased mailing list setup to get his email sent...

Wolf

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



Re: [PHP] two small issues with php mail OT

2007-11-21 Thread Wolf

 Daniel Brown <[EMAIL PROTECTED]> wrote: 
> On Nov 21, 2007 11:38 AM, Dimiter Ivanov <[EMAIL PROTECTED]> wrote:
> >
> > On Nov 21, 2007 2:29 AM, Børge Holen <[EMAIL PROTECTED]> wrote:
> > > On Wednesday 21 November 2007 00:53:14 Jochem Maas wrote:
> > > > Stephen Johnson wrote:
> > > > > Who says you can't please them all... ;)
> > > >
> > > > Erin Brokovich.
> > >
> > > nah you sure? why cant i remember that.
> > > must be that early  altzheimers syndrome or something
> > >
> > > >
> > > > > --
> > > > > Stephen Johnson c | eh
> > > > > The Lone Coder
> > > > >
> > > > > http://www.thelonecoder.com
> > > > > continuing the struggle against bad code
> > > > >
> > > > > http://www.thumbnailresume.com
> > > > > --
> > > > >
> > > > >> From: Jay Blanchard <[EMAIL PROTECTED]>
> > > > >> Date: Tue, 20 Nov 2007 14:25:21 -0600
> > > > >> To: Stephen Johnson <[EMAIL PROTECTED]>,
> > > > >>  Conversation: [PHP] two small issues with
> > > > >> php mail OT
> > > > >> Subject: RE: [PHP] two small issues with php mail OT
> > > > >>
> > > > >> [snip]
> > > > >> I wrote about this a long time ago ... In a galaxy far far away...
> > > > >>
> > > > >> http://www.thelonecoder.com/Blog/?p=7
> > > > >>
> > > > >> Be good lemmings and do as you're told...
> > > > >> [/snip]
> > > > >>
> > > > >> Sitting squarely on the fence he is
> > > > >>
> > > > >> --
> > > > >> PHP General Mailing List (http://www.php.net/)
> > > > >> To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > >
> > > --
> > > ---
> > > Børge Holen
> > > http://www.arivene.net
> > >
> > > --
> > >
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> > Since it's the OT thread, i can mention some of Brad's most memorable
> > postings (for me) in this list.
> >
> > I played around with the gmail search function, i dug this one :
> >
> > http://marc.info/?l=php-general&m=117921190509410&w=2
> >
> > --
> >
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> I nearly forgot all about that!  HA!
> 
> 
> -- 
> Daniel P. Brown
> [office] (570-) 587-7080 Ext. 272
> [mobile] (570-) 766-8107
> 
> If at first you don't succeed, stick to what you know best so that you
> can make enough money to pay someone else to do it for you.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

Anyone else besides me laughing their @$$ off at the fact that brad is one of 2 
people who are "Federal Technologies Networks" sole contacts?  And that their 
website has a flashy front page but drops to nothingness after that?

I did make sure to email the lady mentioned in all of those previous emails of 
his code about the probable increase of spam as well as the probably server 
attacks.

For any who aren't aware, sites such as this are culled for email/server 
information.  So don't post stuff out here unless you're prepared for it.  
Course I use Thunderbird's filtering/learning and it gets 99% of it.  :)

Wolf

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



Re: [PHP] two small issues with php mail OT

2007-11-21 Thread Wolf

 "Zoltán Németh" <[EMAIL PROTECTED]> wrote: 
> 2007. 11. 21, szerda keltezéssel 18.38-kor Dimiter Ivanov ezt írta:
> > On Nov 21, 2007 2:29 AM, Børge Holen <[EMAIL PROTECTED]> wrote:
> > > On Wednesday 21 November 2007 00:53:14 Jochem Maas wrote:
> > > > Stephen Johnson wrote:
> > > > > Who says you can't please them all... ;)
> > > >
> > > > Erin Brokovich.
> > >
> > > nah you sure? why cant i remember that.
> > > must be that early  altzheimers syndrome or something
> > >
> > > >
> > > > > --
> > > > > Stephen Johnson c | eh
> > > > > The Lone Coder
> > > > >
> > > > > http://www.thelonecoder.com
> > > > > continuing the struggle against bad code
> > > > >
> > > > > http://www.thumbnailresume.com
> > > > > --
> > > > >
> > > > >> From: Jay Blanchard <[EMAIL PROTECTED]>
> > > > >> Date: Tue, 20 Nov 2007 14:25:21 -0600
> > > > >> To: Stephen Johnson <[EMAIL PROTECTED]>,
> > > > >>  Conversation: [PHP] two small issues with
> > > > >> php mail OT
> > > > >> Subject: RE: [PHP] two small issues with php mail OT
> > > > >>
> > > > >> [snip]
> > > > >> I wrote about this a long time ago ... In a galaxy far far away...
> > > > >>
> > > > >> http://www.thelonecoder.com/Blog/?p=7
> > > > >>
> > > > >> Be good lemmings and do as you're told...
> > > > >> [/snip]
> > > > >>
> > > > >> Sitting squarely on the fence he is
> > > > >>
> > > > >> --
> > > > >> PHP General Mailing List (http://www.php.net/)
> > > > >> To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > >
> > > --
> > > ---
> > > Børge Holen
> > > http://www.arivene.net
> > >
> > > --
> > >
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > 
> > 
> > Since it's the OT thread, i can mention some of Brad's most memorable
> > postings (for me) in this list.
> > 
> > I played around with the gmail search function, i dug this one :
> > 
> > http://marc.info/?l=php-general&m=117921190509410&w=2
> > 
> 
> OMG I didn't even realize that this Brad with the homework stuff thread
> was the same as that Brad who bragged about being engineer for military
> and stuff... comparing the things he said in a couple of his mails shows
> that he is at least 3 different people... that must be hard ;)
>  
> greets,
> Zoltán Németh
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

Yeah, same guy...  and from looking at the previous thread, it looks like the 
website he was working on was done by someone else.  It really looks like he 
has a shell company he is trying to get out there and failing on.  Kinda sad 
really, since his aced English and Grammar courses didn't teach him the 
difference between hear and here...

Wolf

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



Re: [PHP] CVS TO ICAL

2007-11-27 Thread Wolf
cvs to ical from google:
http://www.google.com/search?q=convert%3A+cvs+to+ical&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

mysql to ical from google:
http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=hBP&q=convert%3A+mysql+to+ical&btnG=Search

Looks like lots of ways to do it...

Where is your script busted?

Wolf

 Mohamed Jama <[EMAIL PROTECTED]> wrote: 
>  
> 
> Hey Guys just wondering if there is a away to convert a cvs to ical file
> or how to import from mysql to ical format?
> 
> M. Jama
> 
> big:interactive
> 91 Princedale Road
> Holland Park
> London W11 4NS
> Email: [EMAIL PROTECTED]
> Direct: +44 (0)20 7313 2262
> www.biggroup.co.uk
>  icrosoft\Signatures\www.biggroup.co.uk> 
> 
>  
> 

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



Re: [PHP] Nested include/require not working in 5.2

2007-11-27 Thread Wolf

 Mike Yrabedra <[EMAIL PROTECTED]> wrote: 
> on 11/27/07 1:43 PM, Wolf at [EMAIL PROTECTED] wrote:
> 
> > 
> >  Mike Yrabedra <[EMAIL PROTECTED]> wrote:
> >> on 11/27/07 11:46 AM, Jochem Maas at [EMAIL PROTECTED] wrote:
> >> 
> >>> Mike Yrabedra wrote:
> >>>> 
> >>>> I am not able to use includes or requires in nested files using php 5.2.3
> >>>> (osx)
> >>>> 
> >>>> Including or Requiring files directly works.
> >>>> 
> >>>> Including files, that also have includes in them, does not.
> >>>> 
> >>>> Say you have this...
> >>>> 
> >>>> -TopDirectory
> >>>> --index.php (contains include("includes/top.php"); )
> >>>> --includes (folder)
> >>>> ---config.php (contains echo "crap"; )
> >>>> ---top.php (contains include("config.php"); )
> >>>> 
> >>>> When you load the index.php file you would expect the word "crap" to 
> >>>> show,
> >>>> but it does not. I think the getcwd is staying specific to the top 
> >>>> folder,
> >>>> so the path stays the same throughout.
> >>>> 
> >>>> This does not happen in 5.1.6
> >>> 
> >>> nothing changed in php - the CWD has always been the dir in which the
> >>> explicitly
> >>> called script lives in and it does not change because your inside an
> >>> included
> >>> file.
> >>> 
> >>> my guess is your include_path no longer includes '.' so php is not trying 
> >>> to
> >>> find the file
> >>> in the directory of the script which is doing the include.
> >>> 
> >>>> 
> >>>> Is there a fix for this or is it PHP causing the problem?
> >>>> 
> >>>> 
> >>> 
> >> 
> >> 
> >> Here is what I have for include_path...
> >> 
> >> include_path = ".:/usr/local/pear"
> >> 
> >> Everything seems to be in order?
> >> 
> >> -- 
> >> Mike Yrabedra B^)>
> >> 
> >> -- 
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> > The first question I have is what does the Error log show?
> > 
> > You should have error reporting turned on so you can see where the script is
> > barfing on the coding.
> > 
> > Wolf
> 
> 
> One more thing, it only does this IF the nested include file is named
> 'config.php'.
> 
> No error is thrown because it is pulling the 'config.php' file from
> somewhere, I just do not know where.
> 
> If I change the name of the file from 'config.php' to 'config1.php', then
> everything works fine.
> 
> Is there a way to figure out where and why it is pulling this mystery
> 'config.php' file from?
> 
> -- 
> Mike Yrabedra B^)>

What does the error message log tell you?  It should be readily available in 
it

Wolf

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



Re: [PHP] Nested include/require not working in 5.2

2007-11-27 Thread Wolf

 Mike Yrabedra <[EMAIL PROTECTED]> wrote: 
> on 11/27/07 11:46 AM, Jochem Maas at [EMAIL PROTECTED] wrote:
> 
> > Mike Yrabedra wrote:
> >> 
> >> I am not able to use includes or requires in nested files using php 5.2.3
> >> (osx)
> >> 
> >> Including or Requiring files directly works.
> >> 
> >> Including files, that also have includes in them, does not.
> >> 
> >> Say you have this...
> >> 
> >> -TopDirectory
> >> --index.php (contains include("includes/top.php"); )
> >> --includes (folder)
> >> ---config.php (contains echo "crap"; )
> >> ---top.php (contains include("config.php"); )
> >> 
> >> When you load the index.php file you would expect the word "crap" to show,
> >> but it does not. I think the getcwd is staying specific to the top folder,
> >> so the path stays the same throughout.
> >> 
> >> This does not happen in 5.1.6
> > 
> > nothing changed in php - the CWD has always been the dir in which the
> > explicitly
> > called script lives in and it does not change because your inside an 
> > included
> > file.
> > 
> > my guess is your include_path no longer includes '.' so php is not trying to
> > find the file
> > in the directory of the script which is doing the include.
> > 
> >> 
> >> Is there a fix for this or is it PHP causing the problem?
> >> 
> >> 
> > 
> 
> 
> Here is what I have for include_path...
> 
> include_path = ".:/usr/local/pear"
> 
> Everything seems to be in order?
> 
> -- 
> Mike Yrabedra B^)>
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

The first question I have is what does the Error log show?

You should have error reporting turned on so you can see where the script is 
barfing on the coding.

Wolf

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



Re: [PHP] Nested include/require not working in 5.2

2007-11-27 Thread Wolf

 Mike Yrabedra <[EMAIL PROTECTED]> wrote: 
> on 11/27/07 1:53 PM, Wolf at [EMAIL PROTECTED] wrote:
> 
> > 
> >  Mike Yrabedra <[EMAIL PROTECTED]> wrote:
> >> on 11/27/07 1:43 PM, Wolf at [EMAIL PROTECTED] wrote:
> >> 
> >>> 
> >>>  Mike Yrabedra <[EMAIL PROTECTED]> wrote:
> >>>> on 11/27/07 11:46 AM, Jochem Maas at [EMAIL PROTECTED] wrote:
> >>>> 
> >>>>> Mike Yrabedra wrote:
> >>>>>> 
> >>>>>> I am not able to use includes or requires in nested files using php 
> >>>>>> 5.2.3
> >>>>>> (osx)
> >>>>>> 
> >>>>>> Including or Requiring files directly works.
> >>>>>> 
> >>>>>> Including files, that also have includes in them, does not.
> >>>>>> 
> >>>>>> Say you have this...
> >>>>>> 
> >>>>>> -TopDirectory
> >>>>>> --index.php (contains include("includes/top.php"); )
> >>>>>> --includes (folder)
> >>>>>> ---config.php (contains echo "crap"; )
> >>>>>> ---top.php (contains include("config.php"); )
> >>>>>> 
> >>>>>> When you load the index.php file you would expect the word "crap" to
> >>>>>> show,
> >>>>>> but it does not. I think the getcwd is staying specific to the top
> >>>>>> folder,
> >>>>>> so the path stays the same throughout.
> >>>>>> 
> >>>>>> This does not happen in 5.1.6
> >>>>> 
> >>>>> nothing changed in php - the CWD has always been the dir in which the
> >>>>> explicitly
> >>>>> called script lives in and it does not change because your inside an
> >>>>> included
> >>>>> file.
> >>>>> 
> >>>>> my guess is your include_path no longer includes '.' so php is not 
> >>>>> trying
> >>>>> to
> >>>>> find the file
> >>>>> in the directory of the script which is doing the include.
> >>>>> 
> >>>>>> 
> >>>>>> Is there a fix for this or is it PHP causing the problem?
> >>>>>> 
> >>>>>> 
> >>>>> 
> >>>> 
> >>>> 
> >>>> Here is what I have for include_path...
> >>>> 
> >>>> include_path = ".:/usr/local/pear"
> >>>> 
> >>>> Everything seems to be in order?
> >>>> 
> >>>> -- 
> >>>> Mike Yrabedra B^)>
> >>>> 
> >>>> -- 
> >>>> PHP General Mailing List (http://www.php.net/)
> >>>> To unsubscribe, visit: http://www.php.net/unsub.php
> >>> 
> >>> The first question I have is what does the Error log show?
> >>> 
> >>> You should have error reporting turned on so you can see where the script 
> >>> is
> >>> barfing on the coding.
> >>> 
> >>> Wolf
> >> 
> >> 
> >> One more thing, it only does this IF the nested include file is named
> >> 'config.php'.
> >> 
> >> No error is thrown because it is pulling the 'config.php' file from
> >> somewhere, I just do not know where.
> >> 
> >> If I change the name of the file from 'config.php' to 'config1.php', then
> >> everything works fine.
> >> 
> >> Is there a way to figure out where and why it is pulling this mystery
> >> 'config.php' file from?
> >> 
> >> -- 
> >> Mike Yrabedra B^)>
> > 
> > What does the error message log tell you?  It should be readily available in
> > it
> > 
> > Wolf
> 
> 
> The include tag is not throwing any error.
> 
> If I call the same file with a read file method, then I get this error
> 
> Warning: readfile(config.php) [function.readfile]: failed to open stream: No
> such file or directory in
> 
> Even though the file calling it is in the same directory as 'config.php'
> 

Your include path should be along the lines of:
include_path = ".:/usr/local/pear:/server/path/to/web/includes/folder"
so if your server root is /var/htdocs/www it would look like:
include_path = ".:/var/htdocs/www/includes:/usr/local/pear"

Notice that I changed the order to look local first, then go to the includes 
folder.

HTH,
Wolf

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



Re: [PHP] CVS TO ICAL

2007-11-28 Thread Wolf
Always make sure you reply to the list...

And yes, you can export as an ical format, just look at an ical file and
format your output to it.  It's just like doing the CSV/CVS/TXT or any
other file, you just have to put it in the right format with the right
extension when exporting.

Wolf

Mohamed Jama wrote:
> Thanks for the reply Wolf, sorry if I wasn't clear I meant as in php
> class I already have a class to export from my mysql database to cvs,
> just wondering if its possible to do it the same and export as ical
> format ?
> 
> -Original Message-
> From: Wolf [mailto:[EMAIL PROTECTED] 
> Sent: 27 November 2007 17:52
> To: Mohamed Jama
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] CVS TO ICAL
> 
> cvs to ical from google:
> http://www.google.com/search?q=convert%3A+cvs+to+ical&ie=utf-8&oe=utf-8&;
> aq=t&rls=org.mozilla:en-US:official&client=firefox-a
> 
> mysql to ical from google:
> http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen
> -US%3Aofficial&hs=hBP&q=convert%3A+mysql+to+ical&btnG=Search
> 
> Looks like lots of ways to do it...
> 
> Where is your script busted?
> 
> Wolf
> 
>  Mohamed Jama <[EMAIL PROTECTED]> wrote: 
>>  
>>
>> Hey Guys just wondering if there is a away to convert a cvs to ical
> file
>> or how to import from mysql to ical format?
>>
> 
> 

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



Re: [PHP] Join question

2007-11-29 Thread Wolf
 tedd <[EMAIL PROTECTED]> wrote: 
> Hi gang:
> 
> I'm trying to understand joins,
> 
> Here's the situation. I have two tables (user1, user2) in one database:
> 
> The common field between the two tables is "username". I want to take 
> fields "login" and "password" from user2 and populate the same fields 
> in user1.
> 
> Currently, the table user1 has 5303 entries, whereas user2 has 5909.
> 
> What I want at the end of this is for table user1 to have the same 
> number of entries as table user2.
> 
> Now, how do I set up the query?
> 
> TIA for any suggestions.
> 
> Cheers,
> 
> tedd
> 
> PS: Side note -- will safe_mode ON cause problems with this?
> 
You should be only "joined" on entries with the same amounts, so if username 
george is in both, it should join.

However if username george_by_george only exists in table 2, then you don't get 
a join happening.

What you would instead want to do is run a loop through the second table and 
grep the username against the first table.  If it exists, give them command to 
write table2.pass into table1.pass  
If it doesn't exist you want to write table2.user and table2.pass into table1

HTH,
Wolf

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



Re: [PHP] Join question [solved]

2007-11-30 Thread Wolf
 tedd <[EMAIL PROTECTED]> wrote: 
> Hi gang:
> 
> I found why the JOIN didn't work for me in this instance, which was I 
> needed to create a third table and JOIN what I needed in that table 
> from the other two.
> 
> My problem was that I was trying to alter one of the tables in the 
> JOIN. While that might be possible it didn't appear so in my current 
> problem.
> 
> Thanks for letting me bounce ideas off you peoples.
> 
> Cheers,
> 
> tedd

Glad you found an answer tedd, I was going to start digging through my old 
MySQL stuff and see what I could dig up, it's been a couple of years since 
doing any DB work that needed any of that.   Looks like the language and fun 
have changed since then!

Gotta love improvements.

Wolf

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



Re: [PHP] Banned from #php

2007-12-03 Thread Wolf
SUre, considering he only regexed the ID, though it would require 
1) realizing it was a regex
2) being able to read the regex
3) going into the #php channel and not ask RTFM or STFW questions

And no, I am not on IRC nor am I wolfpaws


Wolf


 Nathan Nobbe <[EMAIL PROTECTED]> wrote: 
> couldnt you always like come back w/ a different username?
> 
> i mean seriously; how are those bans structured anyway?
> 
> -nathan

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



[PHP] Securing your Sites

2007-12-16 Thread Wolf
For all of you with an upload/access page to your site that is
world-viewable I have made available copies of scripts that kiddies have
tried to use to take over my own server.  As my upload page has yet to
be broken nor my site taken over, I wanted to share them with everyone
as a way to learn how kiddies are trying/doing things as well as
educating everyone on what they need to do to secure their own site.

The specially hardened site for the scripts:
http://ambiguous.dnsalias.net/

A long time ago I saw a post about how to lock down your server, if I
can find it, I'll post it.  But until then, go through the scripts and
poke around on your own development sites and see if you can lock your
own system down.

Wolf

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



Re: [PHP] Securing your Sites

2007-12-17 Thread Wolf
Funny, they should all be PHPS, source only and my last check only did
them on the source viewing.  None of them are executable in that folder.

You got it from elsewhere.

[EMAIL PROTECTED] wrote:
> I want to personally thank you for 6 hours of work to remove the 
> PHP-Back-door Trojan, that download from your site to my PC while viewing 
> that POS you call a help line.
> 
> 

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



Re: [PHP] Securing your Sites

2007-12-17 Thread Wolf
2 things I've done to them to try to catch all...

1. GZiped them all (you'll have to download them to a machine and look
at the source yourself, taking your own precautions and YES, they will
scan malicious in this setup as they are all trojans/backdoors)
2. changed their extension to .txt on the server

I'll also modify the server folder they are running on to disable php
entirely later tonight so they can never execute it on it.

When I reloaded them in my windoze box, my AV picked up on them in the
cache as the trojans they are and disabled access to them in my
browser's cache.  Since I don't run php on the windoze box, there really
was nothing to worry about and I could view the source in the browser.

But if you didn't run AV on the system you looked at them at, installed
them to your own local area and started playing with them, then you
pretty much borked yourself.  They are live code (hence why they were
phps and should have just been source to view) and the only way to
really pick them apart to view them.

Considering that the code was phps and the server treated them as such
never did my server execute them.

Wolf

Dan Parry wrote:
>> -Original Message-
>> From: Wolf [mailto:[EMAIL PROTECTED]
>> Sent: 17 December 2007 16:00
>> To: [EMAIL PROTECTED]
>> Cc: php-general@lists.php.net
>> Subject: Re: [PHP] Securing your Sites
>>
>> Funny, they should all be PHPS, source only and my last check only did
>> them on the source viewing.  None of them are executable in that
>> folder.
>>
>> You got it from elsewhere.
> 
> I thought that too as I checked the site this morning and they all were .phps
> 
> However, wandering back over there sees that they are all now .tar.gz files 
> and, upon scanning, do carry a malicious payload
> 
> Dan
> 
>> [EMAIL PROTECTED] wrote:
>>> I want to personally thank you for 6 hours of work to remove the
>>> PHP-Back-door Trojan, that download from your site to my PC while
>> viewing that POS you call a help line.
>>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>> No virus found in this incoming message.
>> Checked by AVG Free Edition.
>> Version: 7.5.503 / Virus Database: 269.17.4/1187 - Release Date:
>> 16/12/2007 11:36
>>
> 
> No virus found in this outgoing message.
> Checked by AVG Free Edition. 
> Version: 7.5.503 / Virus Database: 269.17.4/1187 - Release Date: 16/12/2007 
> 11:36
>  
> 
> 

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



Re: [PHP] Securing your Sites

2007-12-17 Thread Wolf
ALL of them should report trojan if you download them to your cache but
only should be an issue if you have PHP installed on that machine and
then execute that code in your own php server.

They are all trojans/back door.

But if you view the source then you aren't going to bork yourself.

As they are now all tar.gz the AV scanners should all catch them as
trojans, so you will need to tell your scanner to all you to access that
folder, save it to your local drive and view the source in your favorite
text editor to look at them.

Wolf

Dan Parry wrote:
>> -Original Message-
>> From: Wolf [mailto:[EMAIL PROTECTED]
>> Sent: 17 December 2007 16:00
>> To: [EMAIL PROTECTED]
>> Cc: php-general@lists.php.net
>> Subject: Re: [PHP] Securing your Sites
>>
>> Funny, they should all be PHPS, source only and my last check only did
>> them on the source viewing.  None of them are executable in that
>> folder.
>>
>> You got it from elsewhere.
> 
> Sorry, update
> 
> Scanning with AVG reveals that c99-2, 3 and 4 report backdoor Trojan 
> infections but it occurs to me that maybe AVG is just finding the malicious 
> payload you are demonstrating?
> 
> I'd like to thank you for supplying the source for these exploits... If I've 
> made a mistake and compounded an incorrect situation I do apologise
> 
> Dan
> 
>> [EMAIL PROTECTED] wrote:
>>> I want to personally thank you for 6 hours of work to remove the
>>> PHP-Back-door Trojan, that download from your site to my PC while
>> viewing that POS you call a help line.
>>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>> No virus found in this incoming message.
>> Checked by AVG Free Edition.
>> Version: 7.5.503 / Virus Database: 269.17.4/1187 - Release Date:
>> 16/12/2007 11:36
>>
> 
> No virus found in this outgoing message.
> Checked by AVG Free Edition. 
> Version: 7.5.503 / Virus Database: 269.17.4/1187 - Release Date: 16/12/2007 
> 11:36
>  
> 

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



Re: [PHP] control browser with tag

2007-12-18 Thread Wolf
>From a UI standpoint, this would be a reason why I would visit your site
once then never again.  If you don't want them to touch a page, make the
current browser window change.

And what you are looking to do uses javascript

Wolf

Hiep Nguyen wrote:
> hi friends,
> 
> i have two pages: list.php and update.php
> 
> list.php will have a hyper link that when click on, it will open a new window 
> for user to update info.  once user clicks update button on update.php page, 
> i want to close update.php and return to list.php.  however if user doesn't 
> click update button, i don't want user to go back to list.php.  in other 
> word, freeze up list.php until user closes or clicks update button on 
> update.php.
> 
> is this possible to do with php?
> 
> thanks

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



Re: [PHP] Re: fopen() for http:// sometimes working, sometimes not

2007-12-28 Thread Wolf
DNS issues

Albert Wiersch wrote:
> I'm now using PHP 5.2.5.
> 
> Well, it seems to still be happening. This describes the problem but I 
> haven't found a solution that works for me yet:
> http://bugs.php.net/bug.php?id=11058
> 
> Is it a PHP problem or DNS? It works sometimes but not other times.. 
> something strange is going on.
> 
> Example messages:
> [Fri Dec 28 11:59:04 2007] [error] [client 192.168.0.51] PHP Warning: 
> fopen() [function.fopen]: 
> php_network_getaddresses: getaddrinfo failed: Name or service not known
> [Fri Dec 28 11:59:04 2007] [error] [client 192.168.0.51] PHP Warning: 
> fopen(http://www.lantanalinks.com) [ href='function.fopen'>function.fopen]: failed to open stream: Success
> 
> I suppose I could adjust the script to try again if it fails the first time, 
> but I shouldn't have to.
> 
> Some additional info, when it fails with this problem, it fails very quickly 
> (in less than half a second)... its like it doesn't even try to look up the 
> name.
> 

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



Re: [PHP] First stupid post of the year.

2008-01-02 Thread Wolf

 tedd <[EMAIL PROTECTED]> wrote: 
> Hi gang:
> 
> I have a
> 
> $submit = $_POST['submit'];
> 
> The string contains:
> 
>        A       
> 
> (it's there to make a submit button wider)
> 
> How can I strip out the " " from the $submit string leaving "A"?
> 
> I've tried
> 
> trim($submit);
> 
> but, that don't work.
> 
> Neither does:
> 
> $submit = str_replace(' ','',$submit);
> 
> or this:
> 
> $submit = str_replace(' ';','',$submit);
> 
> I should know what to do, but in this case I don't.
> 
> Help is always appreciated.
> 
> Cheers,
> 
> 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



Wolf

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



Re: [PHP] First stupid post of the year.

2008-01-02 Thread Wolf

 tedd <[EMAIL PROTECTED]> wrote: 
> At 1:25 PM -0600 1/2/08, Jack Mays wrote:
> >>>
> >>>>On Jan 2, 2008 1:34 PM, tedd <[EMAIL PROTECTED]> wrote:
> >>>from this:
> >>>
> >>>       A       
> >>>
> >>>to this A
> >
> >Read the docs for trim, you can't use it inline with other 
> >functions, it will not trim the input.  you have to seperate it out, 
> >e.g.:
> >
> >  $submit = str_replace(' ','',$submit);
> >  $submit = trim($submit);
> 
> But, that still doesn't work.
> 
> Go from here:
> 
>        A       
> 
> to here:
> 
> A
> 
> Cheers,
> 
> 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
$string="       A       ";
$string=str_replace(" ","",$string);
$string=ltrim(rtrim($string)));
echo "The string is now:$string\n";

Outputs:
The string is now:A

Wolf

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



Re: [PHP] Sample script files with 3 different select boxes withmysql conditions in select boxes

2008-01-03 Thread Wolf

 "Børge Holen" <[EMAIL PROTECTED]> wrote: 
> On Thursday 03 January 2008 16:55:41 Robert Cummings wrote:
> > On Thu, 2008-01-03 at 09:52 -0600, Jay Blanchard wrote:
> > > [snip]
> > > I don't suppose any of you punks know the meaning of rhetorical? ;)
> > > [/snip]
> > >
> > > Rhetorical?
> >
> > Rhetorical??
> 
> what???
> 
> >
Reminds me of an old programming book I had, under Functions, Recursive it said 
see Recursive Functions...   And when you looked at Recursive Functions it said 
see Functions, Recursive...

Gotta love teachers who write their own books and lawyers who proof them...

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



RE: [PHP] client time zone?

2008-01-08 Thread Wolf
Sure, have a look on google for php: time zone class and you should be good to 
go!

What code have you written so far to try using the  data from the server?

Wolf

-Original Message-
From: jekillen <[EMAIL PROTECTED]>
Sent: Saturday, January 05, 2008 10:51 PM
To: PHP General list 
Subject: [PHP] client time zone?

Hello;
I am running a server that is using UTC
and I want to be able to convert to
clients local time in some display presentations.
Is this indicated by $_SERVER["REQUEST_TIME"]?
If not, is there a way to get the requesting host's
time zone so I can offset the servers clock value correctly?
Thank you for info:
Jeff K

-- 
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] Posting Summary for Week Ending 4 January, 2008: php-general@lists.php.net

2008-01-08 Thread Wolf
Looks like your cron job is set for every minute Don!  Please disable it until 
you get the kinks worked out of it!

-Original Message-
From: Daniel Brown <[EMAIL PROTECTED]>
Sent: Friday, January 04, 2008 7:24 PM
To: PostTrack [Dan Brown] <[EMAIL PROTECTED]>
Cc: php-general@lists.php.net
Subject: Re: [PHP] Posting Summary for Week Ending 4 January, 2008: 
php-general@lists.php.net

It must be something on the mailing list side of things, because
I'm getting them, too, but there's nothing at all in my outgoing
queue.

On Jan 4, 2008 5:48 PM, PostTrack [Dan Brown]
<[EMAIL PROTECTED]> wrote:
>
>
> Posting Summary for PHP-General List
> Week Ending: Friday, 4 January, 2008
>
> Messages| Bytes   | Sender
> +-+--
> 4 (100%) 4305 (100%)  EVERYONE
> 2(0.5%)  1100(0.26%)  "Daniel Brown" <[EMAIL 
> PROTECTED]>
> 1(0.25%)  1532(0.36%)  "TG" <[EMAIL PROTECTED]>
> 1(0.25%)  1673(0.39%)  "Miren Urkixo" <[EMAIL 
> PROTECTED]>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

-- 
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] /etc/php.init changes not honored

2008-01-10 Thread Wolf
reload apache


 "Ryan H. Madison" <[EMAIL PROTECTED]> wrote: 
> Hello,
> 
> I am trying to increase upload_max_filesize beyond the 2M
> limit. I've set this in my /etc/php.ini file, but every time I look at
> the output of phpinfo(); the changes I make in /etc/php.init don't seem
> to be honored. This isn't limited to upload_max_filesize, I've changed
> the Engine & safe_mode values, but these don't seem to make any
> difference either. I've looked in the /etc/php.d directory, and those
> files only reference other libraries. I've even removed the /etc/php.ini
> file which doesn't seem to make a difference. 
> 
> What am I missing? 
> 
> -Thanks, RYAN
> 
>  
> 
> I'm running a default installation of CentOS 5.
> 
>  
> 
> [EMAIL PROTECTED] etc]$ cat /etc/redhat-release
> 
> CentOS release 5 (Final)
> 
> [EMAIL PROTECTED] etc]$ rpm -qa | grep php
> 
> php-5.1.6-5.el5
> 
> php-pdo-5.1.6-5.el5
> 
> php-pear-1.4.9-4
> 
> php-common-5.1.6-5.el5
> 
> php-cli-5.1.6-5.el5
> 
> php-mysql-5.1.6-5.el5
> 
> [EMAIL PROTECTED] etc]$ rpm -qa | grep httpd
> 
> httpd-2.2.3-6.el5.centos.1
> 
> httpd-manual-2.2.3-6.el5.centos.1
> 
> [EMAIL PROTECTED] etc]$
> 
>  
> 
> Ryan Madison
> 
> Senior Systems Administrator, UNIX Services
> 
> Internet Services and Servers
> 
> Department of Information Technology
> 
> State of Nevada
> 
> p. 775.684.4313
> 
> f. 775.684.4324
> 
> e. [EMAIL PROTECTED]  
> 
> w. http://sug.state.nv.us  
> 
> P Please consider the environment before printing this email.
> 
> This communication, including any attachments, may contain confidential
> information and is intended only for the individual or entity to it is
> addressed. Any review, dissemination or copying of this communication by
> anyone other than the intended recipient is strictly prohibited. If you
> are not the intended recipient, please contact the sender by reply
> e-Mail and delete all copies of the original message.
> 
>  
> 
>  
> 
>  
> 

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



Re: [PHP] /etc/php.init changes not honored

2008-01-10 Thread Wolf
restart the server process that is reading it, otherwise the server is using 
the original settings.

You can do some override by using the .htaccess file and setting specific 
things in specific folders, but if you are setting global changes, you have to 
restart the server process for the changes to be read.

Wolf

 "Ryan H. Madison" <[EMAIL PROTECTED]> wrote: 
> Hello,
> 
> I am trying to increase upload_max_filesize beyond the 2M
> limit. I've set this in my /etc/php.ini file, but every time I look at
> the output of phpinfo(); the changes I make in /etc/php.init don't seem
> to be honored. This isn't limited to upload_max_filesize, I've changed
> the Engine & safe_mode values, but these don't seem to make any
> difference either. I've looked in the /etc/php.d directory, and those
> files only reference other libraries. I've even removed the /etc/php.ini
> file which doesn't seem to make a difference. 
> 
> What am I missing? 
> 
> -Thanks, RYAN
> 
>  
> 
> I'm running a default installation of CentOS 5.
> 
>  
> 
> [EMAIL PROTECTED] etc]$ cat /etc/redhat-release
> 
> CentOS release 5 (Final)
> 
> [EMAIL PROTECTED] etc]$ rpm -qa | grep php
> 
> php-5.1.6-5.el5
> 
> php-pdo-5.1.6-5.el5
> 
> php-pear-1.4.9-4
> 
> php-common-5.1.6-5.el5
> 
> php-cli-5.1.6-5.el5
> 
> php-mysql-5.1.6-5.el5
> 
> [EMAIL PROTECTED] etc]$ rpm -qa | grep httpd
> 
> httpd-2.2.3-6.el5.centos.1
> 
> httpd-manual-2.2.3-6.el5.centos.1
> 
> [EMAIL PROTECTED] etc]$
> 
>  
> 
> Ryan Madison
> 
> Senior Systems Administrator, UNIX Services
> 
> Internet Services and Servers
> 
> Department of Information Technology
> 
> State of Nevada
> 
> p. 775.684.4313
> 
> f. 775.684.4324
> 
> e. [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
> 
> w. http://sug.state.nv.us <http://sug.state.nv.us/> 
> 
> P Please consider the environment before printing this email.
> 
> This communication, including any attachments, may contain confidential
> information and is intended only for the individual or entity to it is
> addressed. Any review, dissemination or copying of this communication by
> anyone other than the intended recipient is strictly prohibited. If you
> are not the intended recipient, please contact the sender by reply
> e-Mail and delete all copies of the original message.
> 
>  
> 
>  
> 
>  
> 

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



Re: [PHP] Posting Summary for Week Ending 11 January, 2008: php-general@lists.php.net

2008-01-11 Thread Wolf
I dunno Dan, my posts aren't showing up in the list, and this tracker has 92 of 
the 226 posts...

;)


 "PostTrack [Dan Brown]" <[EMAIL PROTECTED]> wrote: 
> 
>   Posting Summary for PHP-General List
>   Week Ending: Friday, 11 January, 2008
> 
>   Messages| Bytes   | Sender
>   +-+--
>   226 (100%) 255776 (100%)  EVERYONE
>   81(0.36%)  43996(0.17%)  "PostTrack [Dan Brown]" 
> <[EMAIL PROTECTED]>
>   20(0.09%)  23643(0.09%)  "Daniel Brown" <[EMAIL 
> PROTECTED]>
>   11(0.05%)  5291(0.02%)  "PostTrack [Dan Brown]" <[EMAIL 
> PROTECTED]>
>   8(0.04%)  11635(0.05%)  tedd <[EMAIL PROTECTED]>
>   5(0.02%)  4685(0.02%)  John Gunther <[EMAIL PROTECTED]>
>   5(0.02%)  2946(0.01%)  Chris <[EMAIL PROTECTED]>
>   4(0.02%)  4793(0.02%)  "A.smith" <[EMAIL PROTECTED]>
>   4(0.02%)  5191(0.02%)  Afan Pasalic <[EMAIL PROTECTED]>
>   4(0.02%)  6792(0.03%)  "Alain Roger" <[EMAIL PROTECTED]>
>   4(0.02%)  9012(0.04%)  mike <[EMAIL PROTECTED]>
>   4(0.02%)  5485(0.02%)  "chris smith" <[EMAIL PROTECTED]>
>   4(0.02%)  6038(0.02%)  jekillen <[EMAIL PROTECTED]>
>   3(0.01%)  5749(0.02%)  Casey <[EMAIL PROTECTED]>
>   3(0.01%)  10120(0.04%)  Nisse =?utf-8?Q?Engstr=C3=B6m?= 
> <[EMAIL PROTECTED]>
>   3(0.01%)  6216(0.02%)  Simon Welsh <[EMAIL PROTECTED]>
>   3(0.01%)  5666(0.02%)  "TG" <[EMAIL PROTECTED]>
>   3(0.01%)  7811(0.03%)  "Miren Urkixo" <[EMAIL 
> PROTECTED]>
>   2(0.01%)  4533(0.02%)  "Steve Finkelstein" <[EMAIL 
> PROTECTED]>
>   2(0.01%)  4335(0.02%)  "Nathan Nobbe" <[EMAIL 
> PROTECTED]>
>   2(0.01%)  2047(0.01%)  "Leonidas Safran" <[EMAIL 
> PROTECTED]>
>   2(0.01%)  580(0%)  Wan Chaowei <[EMAIL PROTECTED]>
>   2(0.01%)  1516(0.01%)  steve <[EMAIL PROTECTED]>
>   2(0.01%)  1555(0.01%)  
> "=?ISO-8859-1?Q?Olav_M=F8rkrid?=" <[EMAIL PROTECTED]>
>   2(0.01%)  3475(0.01%)  Bastien Koert <[EMAIL PROTECTED]>
>   2(0.01%)  2457(0.01%)  "peeyush gulati" <[EMAIL 
> PROTECTED]>
>   2(0.01%)  3623(0.01%)  Jim Lucas <[EMAIL PROTECTED]>
>   2(0.01%)  2870(0.01%)  "Dave Goodchild" <[EMAIL 
> PROTECTED]>
>   2(0.01%)  1180(0%)   Per Jessen <[EMAIL PROTECTED]>
>   2(0.01%)  3291(0.01%)  Manuel Lemos <[EMAIL PROTECTED]>
>   2(0.01%)  3129(0.01%)  "Richard Lynch" <[EMAIL 
> PROTECTED]>
>   2(0.01%)  3915(0.02%)  
> "=?ISO-8859-1?Q?=D3lafur_Waage?=" <[EMAIL PROTECTED]>
>   2(0.01%)  1952(0.01%)  "Warren Vail" <[EMAIL PROTECTED]>
>   1(0%)  1611(0.01%)  "Andy Smith" <[EMAIL PROTECTED]>
>   1(0%)  1768(0.01%)  Robert Cummings <[EMAIL PROTECTED]>
>   1(0%)  922(0%)  "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
>   1(0%)  1808(0.01%)  Larry Garfield <[EMAIL PROTECTED]>
>   1(0%)  2188(0.01%)  Mary Anderson <[EMAIL PROTECTED]>
>   1(0%)  1467(0.01%)  Anup Shukla <[EMAIL PROTECTED]>
>   1(0%)  468(0%)  Al <[EMAIL PROTECTED]>
>   1(0%)  486(0%)  tedd <[EMAIL PROTECTED]>
>   1(0%)  689(0%)  Richard Heyes <[EMAIL PROTECTED]>
>   1(0%)  1381(0.01%)  =?ISO-8859-1?Q?Zolt=E1n_N=E9meth?= 
> <[EMAIL PROTECTED]>
>   1(0%)  737(0%)  "Christoph Boget" <[EMAIL PROTECTED]>
>   1(0%)  1584(0.01%)  "Cyril Chacko" <[EMAIL PROTECTED]>
>   1(0%)  4562(0.02%)  [EMAIL PROTECTED]
>   1(0%)  2125(0.01%)  "Yang Yang" <[EMAIL PROTECTED]>
>   1(0%)  885(0%)  "Balasubramanyam A" <[EMAIL PROTECTED]>
>   1(0%)  1746(0.01%)  =?iso-8859-1?q?B=F8rge_Holen?= 
> <[EMAIL PROTECTED]>
>   1(0%)  640(0%)  Reese <[EMAIL PROTECTED]>
>   1(0%)  2872(0.01%)  "Yui Hiroaki" <[EMAIL PROTECTED]>
>   1(0%)  3311(0.01%)  =?utf-8?q?B=C3=B8rge_Holen?= 
> <[EMAIL PROTECTED]>
>   1(0%)  644(0%)  Brady Mitchell <[EMAIL PROTECTED]>
>   1(0%)  1972(0.01%)  =?iso-8859-1?Q?Andr=E9s_Robinet?= 
> <[EMAIL PROTECTED]>
>   1(0%)  3693(0.01%)  "Miles Thompson" <[EMAIL PROTECTED]>
>   1(0%)  1302(0.01%)   Colin Guthrie <[EMAIL PROTECTED]>
>   1(0%)  602(0%)  Breno <[EMAIL PROTECTED]>
>   1(0%)  191 

[PHP] changing the ini from a file

2008-01-16 Thread Wolf
I'm using .htaccess to do
php_value auto_prepend_file "auth.php"

The problem is that there are very specific files that I want to be able to NOT 
run that in.  I guess I could just move them to a directory and use .htaccess 
to perform a 
php_value auto_prepend_file ""

But I was hoping to not have to make a separate folder for that.  Anyone 
encoutered being able to change/disable the  setting on the fly in a specific 
file?

Thanks!

Wolf

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



Re: [PHP] changing the ini from a file

2008-01-16 Thread Wolf
 Daniel Brown <[EMAIL PROTECTED]> wrote: 
> On Jan 16, 2008 11:10 AM, Wolf <[EMAIL PROTECTED]> wrote:
> > I'm using .htaccess to do
> > php_value auto_prepend_file "auth.php"
> >
> > The problem is that there are very specific files that I want to be able to 
> > NOT run that in.  I guess I could just move them to a directory and use 
> > .htaccess to perform a
> > php_value auto_prepend_file ""
> >
> > But I was hoping to not have to make a separate folder for that.  Anyone 
> > encoutered being able to change/disable the  setting on the fly in a 
> > specific file?
> 
> At that point, wouldn't it be just as easy to  require('auth.php'); ?> as the first line of each file you want it in,
> and omit the line in those you don't?  Or are there a lot of files?
> 
> -- 
LOTS of files, hence wanting to do it sporadic, mostly just for diagnostic 
pages.

I can always just drop them and use the .htaccess to disable the prepend for 
that folder/files but was wondering if I could do it on the fly.

Seems like the prepend can't but figured I would check with the folks here 
before I completely gave up.

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



Re: [PHP] changing the ini from a file

2008-01-16 Thread Wolf
 Daniel Brown <[EMAIL PROTECTED]> wrote: 
> On Jan 16, 2008 11:33 AM, Wolf <[EMAIL PROTECTED]> wrote:
> >  Daniel Brown <[EMAIL PROTECTED]> wrote:
> [snip]
> > > At that point, wouldn't it be just as easy to  > > require('auth.php'); ?> as the first line of each file you want it in,
> > > and omit the line in those you don't?  Or are there a lot of files?
> > >
> > > --
> > LOTS of files, hence wanting to do it sporadic, mostly just for diagnostic 
> > pages.
> >
> > I can always just drop them and use the .htaccess to disable the prepend 
> > for that folder/files but was wondering if I could do it on the fly.
> >
> > Seems like the prepend can't but figured I would check with the folks here 
> > before I completely gave up.
> 
> If it's strictly for testing purposes, you could use a switch to
> include a file.  This is NOT SAFE, and NOT SANITIZED, so read it as a
> DISCLAIMER: NOT FOR PRODUCTION USE.  Just to get that out of the way
> for the lawyers out there.  Not clean, not pretty, not anything more
> than a hack job.  Maybe a suggestion that could lead you to a better
> idea though.
> 


I'm trying to NOT prepend the file, not have to modify every other file out 
there.  I'd use other includes if that was the case, but I don't need them, so 
it's more along the lines of disabling something preset for the site for a few 
files.

Wolf

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



Re: [PHP] changing the ini from a file

2008-01-16 Thread Wolf

 Jim Lucas <[EMAIL PROTECTED]> wrote: 
> Jim Lucas wrote:
> > Wolf wrote:
> >> I'm using .htaccess to do
> >> php_value auto_prepend_file "auth.php"
> >>
> >> The problem is that there are very specific files that I want to be 
> >> able to NOT run that in.  I guess I could just move them to a 
> >> directory and use .htaccess to perform a php_value auto_prepend_file ""
> >>
> >> But I was hoping to not have to make a separate folder for that.  
> >> Anyone encoutered being able to change/disable the  setting on the fly 
> >> in a specific file?
> >>
> >> Thanks!
> >>
> >> Wolf
> >>
> > 
> > Just had an interesting way of solving this problem come to mind.
> > 
> > I would like others to way in on this.
> > 
> > You can do this completely from within apache.


I love the idea and I might reverse it to handle the case of NOT prepending the 
file...

That or I'll just make a clean/diag directory, then put a .htaccess file in the 
folder and use it to remove the prepend...

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



Re: [PHP] Question About Blocking Email Addresses in Forms

2008-01-18 Thread Wolf

 Eric Butera <[EMAIL PROTECTED]> wrote: 
> On Jan 18, 2008 9:50 AM, Javier Huerta <[EMAIL PROTECTED]> wrote:
> > I am wondering if there is a way to block out email addresses in specific
> > format from a form?  We ahve a form that people have to enter an email
> > address, and the form has been getting used by bots to send spam to a
> > listserv.  The email address they enter is in this type of format
> > [EMAIL PROTECTED], and of course it is always just a bit different every
> > time.  Any help is greatly appreciated.
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> Hi Javier!
> 
> At my work we had tons of issues with spam bots randomly hitting our
> contact forms.  They would inject all sorts of random garbage along
> with the standard email header injection attempts to try and send mass
> mails through the forms.
> 
> We've worked on a standardized form processing script that has some
> basic ideas implemented that has cut down on 99% of the spam in our
> forms yet also does _not_ use any horrible CAPTCHA crap.  If you use
> one of those you're basically saying you hate your users and want to
> make them miserable.
> 
> Here are a few of the ideas we use:
> 
> - Require a user enter an email address and then validate this address
> using PEAR::Validate::email() with the true parameter to resolve host
> names.  That would always require at least a valid domain name.
> 
> - Filter all the fields against a set of invalid keywords.  Also make
> this set of keywords extendable on a per site basis because some sites
> get hit with different keywords.  Here is a set you can start with
> array('to:','from:','cc:','bcc:','href=','url=')
> 
> - Trick the bots.  I noticed lots of forms spam scripts will use some
> sort of regex to find all form fields and then inject them with any
> value that they want.  Just because your form uses a select dropdown
> or hidden field doesn't mean that is what you're going to get back.
> Most of these things in my experience are automated so they just do a
> mass search for name="".  I use this to my advantage by doing two
> things.  First I have a commented out field that if it is submitted I
> fail the post.  Then I also have a hidden field that has a constant
> value that must remain the same.  If this value is changed (only a
> spammer would do it since it's hidden) fail the post.
> 
> - Add a configurable option to ignore posts that contain the domain
> name in them.  Lots of these bots will send out a test that uses
> random@ as a test.  I usually enable
> this feature after the client has tested their form and are happy with
> it.
> 
> Make sure that if any of these conditions fail you show the form back
> to the user with a helpful error message.  This way if a real user
> accidently triggers any of the security measures you can let them know
> how to fix it, such as removing href= from input fields.
> 
> Good luck!
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


Those are pretty sweet suggestions there Eric, I hadn't thought about the 
constant field or the commented on to check on.  :)

Thanks for sharing!!

Wolf

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



Re: [PHP] Foreach

2008-01-18 Thread Wolf
Steve,

This should work as some basic sudo code.  You are running into a number of 
issues with your usage of the foreach as it sounds like what you really want to 
do is walk through one array and grab the corresponding value from another.

'.mysql_error());
  }
 }
}
?>

HTH,
Wolf

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



Re: [PHP] Foreach

2008-01-18 Thread Wolf

 Eric Butera <[EMAIL PROTECTED]> wrote: 
> On Jan 18, 2008 11:38 AM, Wolf <[EMAIL PROTECTED]> wrote:
> > Steve,
> >
> > This should work as some basic sudo code.  You are running into a number of 
> > issues with your usage of the foreach as it sounds like what you really 
> > want to do is walk through one array and grab the corresponding value from 
> > another.
> >
> >  > // First check to make sure you are getting both fields
> > if(isset($_POST['name']) && is_array($_POST['name']) && 
> > isset($_POST['order']) && is_array($_POST['order']))
> > {
> >  // Now assign them to easier to play with variables
> >  $names=$_POST['name'];
> >  $orders=$_POST['orders'];
> >  // This tests for the same number of items as names
> >  if (count($names) == count($orders))
> >  {
> >   $i=0;
> >   while($i<=count($names))
> >   {
> >$update_data = "UPDATE sections SET `order` = '$orders[$i]' WHERE name = 
> > '$names[$i]'";
> >$response = mysql_query( $update_data, $cnx );
> >if(mysql_error()) die ('database error'.mysql_error());
> >   }
> >  }
> > }
> > ?>
> >
> > HTH,
> > Wolf
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> Hi Wolf,
> 
> Your code is missing data validation!  Hopefully you don't do stuff
> like that either.
> 
> function super_duper_escaper($value, $db) {
>   if (!get_magic_quotes_gpc()) {
>   $value = mysql_real_escape_string($value, $db);
>   }
>   return $value;
> }
> 
> $_sql = "UPDATE sections SET `order` = %d WHERE name = '%s'";
> $sql = sprintf(
>   $_sql,
>   (int)$orders[$i],
>   super_duper_escaper($names[$i], $cnx)
> );
> 
> What we're doing here is making sure that the order is a number and
> that the name is a string that properly escapes out the quotes to make
> sure people can't break out of the context of data and into commands.
> Look up SQL injection for more information.
> 
> Don't rely on magic quotes, etc as it is a server specific setting, is
> going away in php6, and does not take character sets into
> consideration.  The mysql extension is just as bad as it wont allow
> you to update the character set context from the mysql server default.
>  So use mysqli or pdo unless everything matches across the board.


Of course it was missing the data validation, I don't write a whole page/app 
for anyone just out of the blue.  I was expecting Steve to make sure he handled 
the data validation on his side before implementing the code fully.  As it is, 
I would have used a function and array_walk to check the validness of each 
field and assign it to a new array if it was valid, then use the new arrays to 
actually be pushed into the mysql queries.  :)

I also tend to put in a referrer checker to make sure the page is coming where 
it should be coming from and depending on how nice I am either redirecting back 
to my page and my form, or heading them off to other fun places (like ratemypoo 
or something similar)  :)

Wolf

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



Re: [PHP] Posting Summary for Week Ending 18 January, 2008: php-general@lists.php.net

2008-01-19 Thread Wolf
Sending to the LIST this time...  I personally replied, how dumb was *I* 
this morning...  And top posted...  Twice...


Dang Jay, you feeling OK?  You've been quiet the last week...  Or did 
Richard just tie you up so you couldn't post and he could get top honors 
this week?   :)


Jay Blanchard wrote:

Wow, I wasn't on the list. And I top posted. I really suck.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of PostTrack [Dan
Brown]
Sent: Friday, January 18, 2008 3:01 PM
To: php-general@lists.php.net
Subject: [PHP] Posting Summary for Week Ending 18 January, 2008:
php-general@lists.php.net


Posting Summary for PHP-General List
Week Ending: Friday, 18 January, 2008

Messages| Bytes   | Sender
+-+--
514 (100%) 975244 (100%)  EVERYONE
69(13.4%)  92431(9.5%)  "Richard Lynch"
<[EMAIL PROTECTED]>
46(8.9%)  78933(8.1%)  Jochem Maas
<[EMAIL PROTECTED]>
29(5.6%)  48003(4.9%)  "Eric Butera"
<[EMAIL PROTECTED]>
28(5.4%)  40764(4.2%)  "Nathan Nobbe"
<[EMAIL PROTECTED]>
26(5.1%)  41149(4.2%)  "Daniel Brown"
<[EMAIL PROTECTED]>
24(4.7%)  15837(1.6%)   Per Jessen
<[EMAIL PROTECTED]>
19(3.7%)  40495(4.2%)  Manuel Lemos
<[EMAIL PROTECTED]>
17(3.3%)  21478(2.2%)  Jim Lucas
<[EMAIL PROTECTED]>
16(3.1%)  38021(3.9%)
=?iso-8859-1?Q?Andr=E9s_Robinet?= <[EMAIL PROTECTED]>
14(2.7%)  10125(1%)  Richard Heyes
<[EMAIL PROTECTED]>
    11(2.1%)  14946(1.5%)  mike <[EMAIL PROTECTED]>
9(1.8%)  22245(2.3%)  Wolf <[EMAIL PROTECTED]>
9(1.8%)  11964(1.2%)  Europus
<[EMAIL PROTECTED]>
7(1.4%)  9494(1%)  "Ken Kixmoeller -- reply to
[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
7(1.4%)  5637(0.6%)  Chris <[EMAIL PROTECTED]>
6(1.2%)  4881(0.5%)  Naz Gassiep <[EMAIL PROTECTED]>
5(1%)  8497(0.9%)  "Andrew Ballard"
<[EMAIL PROTECTED]>
5(1%)  8705(0.9%)
=?ISO-8859-1?Q?Zolt=E1n_N=E9meth?= <[EMAIL PROTECTED]>
5(1%)  4932(0.5%)  Sancar Saran
<[EMAIL PROTECTED]>
5(1%)  6174(0.6%)   Colin Guthrie
<[EMAIL PROTECTED]>
5(1%)  7854(0.8%)  Wang Chen
<[EMAIL PROTECTED]>
5(1%)  5875(0.6%)  "Javier Huerta"
<[EMAIL PROTECTED]>
4(0.8%)  6000(0.6%)  Pastor Steve
<[EMAIL PROTECTED]>
4(0.8%)  2214(0.2%)  "Lucas Prado Melo"
<[EMAIL PROTECTED]>
4(0.8%)  11675(1.2%)  "David Giragosian"
<[EMAIL PROTECTED]>
4(0.8%)  25354(2.6%)   Apple
<[EMAIL PROTECTED]>
4(0.8%)  3892(0.4%)  clive
<[EMAIL PROTECTED]>
4(0.8%)  5407(0.6%)  Larry Garfield
<[EMAIL PROTECTED]>
4(0.8%)  3479(0.4%)  "Carole E. Mah"
<[EMAIL PROTECTED]>
4(0.8%)  3104(0.3%)  Adam Williams
<[EMAIL PROTECTED]>
3(0.6%)  2552(0.3%)  tedd
<[EMAIL PROTECTED]>
3(0.6%)  5341(0.5%)  Scott Wilcox
<[EMAIL PROTECTED]>
3(0.6%)  3021(0.3%)  Max Antonov
<[EMAIL PROTECTED]>
3(0.6%)  4873(0.5%)  Casey
<[EMAIL PROTECTED]>
3(0.6%)  2819(0.3%)  "Tom Chubb"
<[EMAIL PROTECTED]>
3(0.6%)  3728(0.4%)  "mathieu leddet"
<[EMAIL PROTECTED]>
3(0.6%)  5052(0.5%)  "Sean-Michael"
<[EMAIL PROTECTED]>
3(0.6%)  3182(0.3%)  "A.smith"
<[EMAIL PROTECTED]>
3(0.6%)  3111(0.3%)  "Dotan Cohen"
<[EMAIL PROTECTED]>
3(0.6%)  4201(0.4%)  Richard
<[EMAIL PROTECTED]>
3(0.6%)  3449(0.4%)  "T.Lensselink"
<[EMAIL PROTECTED]>
3(0.6%)  4133(0.4%)  julian
<[EMAIL PROTECTED]>
2(0.4%)  2182(0.2%)  Paul Scott
<[EMAIL PROTECTED]>
2(0.4%)  2793(0.3%)  "Janet N"
<[EMAIL PROTECTED]>
2(0.4%)  11021(1.1%)  Jason Pruim
<[EMAIL PROTECTED]>
2(0.4%)  1818(0.2%)  Pierre Pintaric
<[EMAIL PROTECTED]>
  

Re: [PHP] Re: Posting Summary for Week Ending 18 January, 2008: php-general@lists.php.net

2008-01-19 Thread Wolf

David Powers wrote:

Daniel Brown wrote:

Notice, if you will and are able, that all other posts to this
thread are responses of interest, not the ramblings of a crybaby.


I have also noticed that many of the responses come from #1 Rated 
"Year's Coolest Guy" By Self. A little humility might be in order.


Humbleness DOES normally come with age sometimes, but one would assume 
that with your advanced years that you might look at things differently. 
 That being said, while I'm sure Dan believes he's the "Year's Coolest 
Guy", there are some out there who think otherwise.  To each their own 
as is their right.  We DO live in a democracy with the right of free 
thought and speech, as a journalist should well know.  Perhaps during 
your editorial years you missed editing all the privacy laws and such 
concerning public domain.  From the news reports *I* keep seeing, the 
use of "public" sources and gathering of "public" information seems more 
about how much the "public" can be stretched for the raping of 
information to tweak the story to their own designs instead of going 
after the whole truth.  Gotta love one-sided reporting...  But I digress...





I done nothing wrong, but I've
created something that is useful and stimulating to those who Actually
Matter[TM].


Just to remind everyone what this useful and stimulating exercise was 
for, in your own words, it was 'For bragging rights, to keep track of 
how much time you've spent doing "community service" or whatever else.'


By publishing everyone's email address, you screwed up, but don't have 
the decency to admit it. And at no time have I stooped to calling you 
names.


Following the posts, I do believe Dan is going to mangle the email 
addresses.  Heck, he can omit them to just the "name" of the poster if 
he wants, won't bother me but then I don't have an á or é in my name 
that's still getting fudged...


But that is all besides the point.  YOU posted to the list, thereby 
doing so with an email address which you have PUBLICLY posted.  That you 
are not happy with the list coming out means that you failed to pay 
attention to this list for the last couple of weeks when 1) Dan's script 
blew up and 2) last week when Richard wasn't even showing on the list.


My suggestion would be to increase your spam blocking mechanism(s) such 
as Thunderbird's spam learning feature or your ISP's filtering or even 
running your email through your own Linux server and using clamAV and 
SpamAssassin to clean your email before popping it off to your local 
machine.


Either way, your problem was your own making.  Now, you could apologize 
to the list and Dan for blowing things out of proportion, which would 
show some humility, but you're pretty much the only one here complaining 
about your email address being posted by some one else after you have 
already done so.


Wolf

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



Re: [PHP] Re: Posting Summary for Week Ending 18 January, 2008: php-general@lists.php.net

2008-01-19 Thread Wolf

Daniel Brown wrote:

On Jan 19, 2008 8:55 PM, Wolf <[EMAIL PROTECTED]> wrote:

David Powers wrote:

Daniel Brown wrote:

Notice, if you will and are able, that all other posts to this
thread are responses of interest, not the ramblings of a crybaby.

I have also noticed that many of the responses come from #1 Rated
"Year's Coolest Guy" By Self. A little humility might be in order.

Humbleness DOES normally come with age sometimes, but one would assume
that with your advanced years that you might look at things differently.


It's on there as a joke, not out of lack of humility.  I always
have stupid little phrases in my signature lines.  This one was
actually meant to be a self-bashing line meaning, "I'm the only one
who thinks I'm cool."


Yeah, finding a random-quote adder for Thunderbird is NOT easy, even for 
a windoze system.  I used to have one with Outlook when I was forced to 
use it.  :/


But I think you're an OK kinda guy, but we'll have to see if Richard 
invites us to sit with the cool kids next time.  ;)





  That being said, while I'm sure Dan believes he's the "Year's Coolest
Guy", there are some out there who think otherwise.


Dude there are A LOT of them


Well I wasn't gonna go there...  ;)

Maybe I'm the only one who finds it interesting that jpni.co.uk is an 
empty apache setup that will only show a "This account is suspended" 
page when you go look at it.


And this little gem that David posted a while ago:
"With regard to the argument about free flow of information, all the
information in my books is freely available on the internet. However,
the value to most readers is that I have pulled together that
information, tested it, and presented it in a form that, hopefully,
makes it easier for beginners and intermediate developers to understand."

Now, while Dan hasn't posted his source code for the beginners and 
intermediates to cull through (maybe there are some other list admins of 
something productive like a good amateur porn site) that would like to 
use the same gathering tactics, he has used the free flow of information 
that is freely available on the internet to produce the posting summary.


Just some food for thought...

Wolf

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



Re: [PHP] More frustration with MySQL and PHP

2008-01-21 Thread Wolf
 Jason Pruim <[EMAIL PROTECTED]> wrote: 
> 
> On Jan 21, 2008, at 3:27 PM, Robert Cummings wrote:
> 
> > On Mon, 2008-01-21 at 15:20 -0500, Jason Pruim wrote:
> >>
> >> I try so hard to NOT rely on the wealth of info available here, but
> >> you guys don't make it easy!! :)
> >
> > The only good thing to do with wealth is share.
> 
> Now you're just trying to add to your post count! :P
> 

He sure is ... and he's right too!! ;)  A number of us are on here for both 
sharing the wealth and learning as we grow along.

Years ago I was in your shoes, functions were something I didn't want anything 
to do with.

Now though, I am finding a reason to write functions that I can use to handle a 
myriad number of things without having to code the same things over and over 
again.  And I use the same functions for anything I write, so that as I grow a 
function or site, all of the function pages are updated and everything is where 
I need it.  But even with all of that, sometimes the easiest solution is the 
simplest.  ;)

Wolf

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



Re: [PHP] Posting Summary for Week Ending 25 January, 2008: php-general@lists.php.net

2008-01-24 Thread Wolf

Jochem Maas wrote:


Posting Summary for PHP-General List
Week Ending: Friday, 25 January, 2008

Messages| Bytes   | Sender
+-+--
697  (100%) 975244  (100%)  EVERYONE
690 (98.9%) 974000 (99.8%)  "Richard Lynch" <[EMAIL PROTECTED]>
  7  (1.1%)   1244  (0.2%)  everyone else



Now That's Funny!!!  True, but funny...

I swear, I do work for a minute and Richard posts 12 times...  He must 
be on vacation on a beach somewhere... ;)


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



Re: [PHP] Posting Summary for Week Ending 25 January, 2008: php-general@lists.php.net

2008-01-24 Thread Wolf

Jay Blanchard wrote:

[snip]

Dude, I laughed so loud that it echoed in the halls of the
Engineering Wing over here.  What makes it so funny?  That it's not
much of an exaggeration!  ;-D



very glad to raise a laugh :-) those without a sense of humour should
leave the php highway at the next exit. ;-)

oh and I'm gonna hold you to that beer one day :-)
[/snip]

The first time we ever see all of us face to face there will have to be
a lot of beer bought. The conversation will be interesting though.
Several folks will ask and answer questions. I will say RTFM so many
times that folks will quit listening to me. Then Richard will answer all
of the questions in one long monologue. Daniel will then recap. Some
fool will ask a MySQL question at which point we will all point to
another room and advise them to get their answer there, either that or
they will have to buy the next round. A fist fight will occur when
someone provides an answer to a question that hasn't been asked. The
phrase "curly braces, schmurley braces" will be heard. And someone will
no doubt ask everyone else to speak up so that we can all hear the
question or answer.

Maybe this is the premise for the next great novel

Until that time, how many of you are on XBOX live and playing Call Of 
Duty 4?  Or playing Eve-Online?  :)


We could make a PHP clan and when the sides get to quarreling, have a 
war amongst ourselves to settle it.


Wolf

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



Re: [PHP] How to download a file (with browser) using fsockopen() ?

2008-02-04 Thread Wolf

Wow, did you have to post this 6 times barney??

szalinski wrote:

Hi

I have been working on this download script for quite a while, and I just
can't find how to download a remote file via a user's browser using
fsockopen.

Basically I am wondering if anyone can just give me a simple working
example on how to use fsockopen() to fetch a file on a remote server, and
then pop up a save dialog box in my browser. For example, let's say I want
to download this file from here:

http://remotedomain.com/file.zip

Instead of putting this directly into my browser and then being prompted
to save it to my pc, how can i use fsockopen() to fetch the file, and get
the same prompt on my browser? E.g. I want to be able to do

http://localhost/index.php?url=http://remotedomain.com/file.zip

I know that this does not seem the most obvious and easy way to do it, but
i simply cannot get a file to download myself using fsockopen. I
specifically want this function, as I need to POST headers to the server
and I haven't as yet been able to download a file using it, without it
being corrupt, or the connection hanging. I just can't figure it out, and
I'm getting a bit tired with it!
I don't need a whole hand-made script, I just need the part where
fsockopen will download this file. Perhaps a working function that would
do it. Please try not to use classes or objects because I haven't quite
figured out object-oriented programming yet!!

Also, I would like if you can do it via HTTP 1.0 because I know HTTP 1.1
is tricky, and might require a chunk decoder, and i don't see the need for
it, unless someone is able to provide a working chunked data decoder.

Thanks to anyone who can help. :)



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



Re: [PHP] How to download a file (with browser) using fsockopen() ?

2008-02-04 Thread Wolf

Wow, did you have to post this 6 times barney??

szalinski wrote:

Hi

I have been working on this download script for quite a while, and I 
just can't find how to download a remote file via a user's browser using 
fsockopen.


Basically I am wondering if anyone can just give me a simple working 
example on how to use fsockopen() to fetch a file on a remote server, 
and then pop up a save dialog box in my browser. For example, let's say 
I want to download this file from here:


http://remotedomain.com/file.zip

Instead of putting this directly into my browser and then being prompted 
to save it to my pc, how can i use fsockopen() to fetch the file, and 
get the same prompt on my browser? E.g. I want to be able to do


http://localhost/index.php?url=http://remotedomain.com/file.zip

I know that this does not seem the most obvious and easy way to do it, 
but i simply cannot get a file to download myself using fsockopen. I 
specifically want this function, as I need to POST headers to the server 
and I haven't as yet been able to download a file using it, without it 
being corrupt, or the connection hanging. I just can't figure it out, 
and I'm getting a bit tired with it!
I don't need a whole hand-made script, I just need the part where 
fsockopen will download this file. Perhaps a working function that would 
do it. Please try not to use classes or objects because I haven't quite 
figured out object-oriented programming yet!!


Also, I would like if you can do it via HTTP 1.0 because I know HTTP 1.1 
is tricky, and might require a chunk decoder, and i don't see the need 
for it, unless someone is able to provide a working chunked data decoder.


Thanks to anyone who can help. :)



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



  1   2   3   4   5   >