[PHP] PHP Unit Test - Code Coverage - Continuous Intergration?

2008-04-16 Thread Jay Paulson
Hi everyone,

I¹m just not getting into unit testing and was wondering what tools are out
there that will automatically run unit tests continuously and make reports
if a test failed and how much/what code was tested.  Currently in Java land
I¹m using Hudson, ant, Junit, and Coberatura.

Thanks!
Jay


[PHP] Setting Column Widths in Excel Using PHP?

2007-05-09 Thread Jay Paulson
I¹m exporting some data out of MySQL and providing it as a download in
Excel.  However, I need to set the widths of the columns.  Does anyone know
how to do this without the PEAR module?

Thanks for any help!


[PHP] HTML form data to utf-8?

2007-02-20 Thread Jay Paulson
Just a general question that I don¹t know the answer to.  I have users
inputting data via an HTML form.  I want to make sure that if they cut and
paste from say Word that all the weird characters are converted to plain
text (preferably utf-8 since that¹s what my database is).  How would I go
about doing this?

Thanks!


[PHP] memory_limit Setting?

2007-01-26 Thread Jay Paulson
Hi everyone,

I¹m trying to upload a 25MB file via PHP and I¹m setting the memory limit
way high so I don¹t get a fatal error from php (the error is below).  What I
find really odd about this is that the error message says that PHP tried to
allocate almost 54MB.  First question is why is PHP allocating so much
memory when I¹m only uploading a 25MB file?  Second question is why is PHP
failing when obviously the memory limit is set to just over 100MB?  (I¹m
using PHP 5.1.2 Apache 2.0.55 and using an .htaccess file to change the PHP
settings on the fly.)


Fatal error: Allowed memory size of 104857600 bytes exhausted (tried to
allocate 53764163 bytes) in /path/to/php/file on line 942

.htaccess settings below:

php_value memory_limit 100M
php_value post_max_size 30M
php_value upload_max_filesize 30M
php_value max_execution_time 300
php_value max_input_time 300
php_value display_errors On


Re: [PHP] [HELP] Fatal error when uploading large files!

2007-01-23 Thread Jay Paulson
 Hi everyone,
 
 Hopefully you all can help!  I¹m at a loss as to what to do next.  I¹m
 running PHP 5.1.2 with Apache 2.0.55 on RedHat ES4 and I keep getting the
 following PHP error when trying to upload a larger file.  I have
 AllowOverride turned on in the httpd.conf file so my .htaccess file is below
 as well.  When I look at phpinfo() it reflects the changes in the .htaccess
 file but yet still I get the following PHP fatal error.  Anyone have any
 ideas what could be going on?  Could it be the Zend Memory Manager
 (something that I know nothing about)?  Or anything else I may not be aware
 of?
 
 Any help would be greatly appreciated!
 
 
 Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to
 allocate 19590657 bytes) in /path/to/php/file on line 979
 
 LimitRequestBody 0
 php_value memory_limit 40M
 php_value post_max_size 30M
 php_value upload_max_filesize 30M
 php_value display_errors On
 php_value max_execution_time 300
 php_value max_input_time 300
 
 
 doesn't seem to me that it is following the directives for memory size
 
 OR or you are up against a 20mb disk quota possibly???


How would I check to see if I'm up against a 20md disk quota?

Thanks.

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



Re: [PHP] [HELP] Fatal error when uploading large files!

2007-01-23 Thread Jay Paulson
 Hi everyone,
 
 Hopefully you all can help!  I¹m at a loss as to what to do next.  I¹m
 running PHP 5.1.2 with Apache 2.0.55 on RedHat ES4 and I keep getting the
 following PHP error when trying to upload a larger file.  I have
 AllowOverride turned on in the httpd.conf file so my .htaccess file is below
 as well.  When I look at phpinfo() it reflects the changes in the .htaccess
 file but yet still I get the following PHP fatal error.  Anyone have any
 ideas what could be going on?  Could it be the Zend Memory Manager
 (something that I know nothing about)?  Or anything else I may not be aware
 of?
 
 Any help would be greatly appreciated!
 
 
 Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to
 allocate 19590657 bytes) in /path/to/php/file on line 979
 
 LimitRequestBody 0
 php_value memory_limit 40M
 php_value post_max_size 30M
 php_value upload_max_filesize 30M
 php_value display_errors On
 php_value max_execution_time 300
 php_value max_input_time 300
 
 php_value can't overrule a php_admin_value (your apache conf or another
 .htaccess
 maybe setting these ini settings usiong php_admin_value).
 
 check that the php ini settings you've got in your .htaccess are
 actually being honored:
 
 foreach (array('memory_limit','post_max_size','upload_max_filesize') as $ini)
 echo ini_get($ini),'br /';
 

I ran the foreach like you have and the values came back with the ones I'm
using in my .htaccess file.

I couldn't find any occurrences of php_admin_value used any where. Hm.

Thanks!

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



[PHP] [HELP] Fatal error when uploading large files!

2007-01-22 Thread Jay Paulson
Hi everyone,

Hopefully you all can help!  I¹m at a loss as to what to do next.  I¹m
running PHP 5.1.2 with Apache 2.0.55 on RedHat ES4 and I keep getting the
following PHP error when trying to upload a larger file.  I have
AllowOverride turned on in the httpd.conf file so my .htaccess file is below
as well.  When I look at phpinfo() it reflects the changes in the .htaccess
file but yet still I get the following PHP fatal error.  Anyone have any
ideas what could be going on?  Could it be the Zend Memory Manager
(something that I know nothing about)?  Or anything else I may not be aware
of?

Any help would be greatly appreciated!


Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to
allocate 19590657 bytes) in /path/to/php/file on line 979

LimitRequestBody 0
php_value memory_limit 40M
php_value post_max_size 30M
php_value upload_max_filesize 30M
php_value display_errors On
php_value max_execution_time 300
php_value max_input_time 300


[PHP] Memory Limit?

2007-01-19 Thread Jay Paulson
Hi everyone,

Quick question ­ I¹m trying to increase the memory limit so that I can
upload larger files to an application I¹m running.  I¹m using Apache¹s
resource .htaccess file to change PHP on the fly.  Below is my .htaccess
file.

php_value memory_limit 30M
php_value post_max_size 25M
php_value upload_max_filesize 25M
php_value max_execution_time 300

However, when I try and upload a file I get the following error:

Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to
allocate 19590657 bytes) in /path/to/php/file on line 1000

I also have a small program that runs the memory_usage() to see what the
memory limit is set to and I get the following:

memory usage: 37512

I really don¹t know why I¹m getting the Fatal error.  Do I need to do
something else that I just don¹t know about?

Thanks!
Jay


[PHP] Error Handling Library?

2006-08-31 Thread Jay Paulson
I've been doing some research and was wondering if anyone out there has
written a library for error handling?  I haven't found anything as of yet
but would love to hear suggestions!

Thanks!

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



Re: [PHP] remove SimpleXML nodes

2006-08-31 Thread Jay Paulson
 So I want to do...
 
 $xmlDatabase = new SimpleXMLElement($myXML);
 foreach ($xmlDatabase as $oneTable)
 {
if ($oneTable['name'] == 'two')
{
   ///   HERE I WANT TO DELETE THE $oneTable NODE
   unset($oneTable);   // -- and this doesn't work...
}
 }
 
 I tried to do the same a while back and could not figure it out. I think
 that SimpleXML is just that - simple. You should rather try using DOMXML
 functions, or as I did, roll an XML parser and do it like that.

Why can't you just recreate the XML and skip the node you don't want to
include?  So something like below:

foreach ($xmlDatabase as $oneTable)
{
// skip node you don't want in your final xml output
if ($oneTable['name'] != 'two')
{

}
}

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



Re: [PHP] Re: Templates, PHP Frameworks, and DB Abstraction?

2006-07-03 Thread Jay Paulson
 I'd like to get some feedback on what the list thinks is a good template
 engine other than smarty.
 
 I'd also like to do some quick prototyping using a PHP framework does anyone
 have any recommendations for one that is easy to pick up and run with?
 
 Finally, does anyone have any suggestions for a good PHP database
 abstraction library?
 
 You may want to take a look at this post for a few recommendations:
 
 http://www.phpclasses.org/blog/post/52-Recommended-PHP-frameworks.html
 
 That is a nice sales pitch Manuel but takes  bit of digesting.
 
 Jay - This is a 'how long is a piece of string' type question. So there
 are as many answers as there are developers here ;)
 
 I've only ever used Smarty - and not seen anything yet to replace it.
 
 PDO is being pushed as a DB Abstraction library, but it only 'abstracts'
 the calls to PHP, it does nothing to abstract the SQL if you want a
 truly generic solution, if you need one, but if you don't then why
 bother with abstraction ;)

Thinking about this paragraph above makes me wonder if with that way of
looking at it would one need a template engine?  For example, why not just
separate the business logic and the HTML as much as possible and then only
imbed PHP in HTML to display the variables (?= $var ?)?? Then at the end
of your PHP code that does all the logic just have include() calls to the
.php files you want to parse and pass all the variables you got with your
business logic above the include calls? Hm.  Just a thought.
 
 I've been running with bitweaver now for some time, and things are
 starting to come together. It uses Smarty and ADOdb and can install
 itself on a range of database engines without any 'manual intervention'.
 So I am happy that it is a generic framework that is easy to run with.
 
 www.bitweaver.org

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



[PHP] Templates, PHP Frameworks, and DB Abstraction?

2006-06-30 Thread Jay Paulson
I'd like to get some feedback on what the list thinks is a good template
engine other than smarty.

I'd also like to do some quick prototyping using a PHP framework does anyone
have any recommendations for one that is easy to pick up and run with?

Finally, does anyone have any suggestions for a good PHP database
abstraction library?

Thanks for any help!

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



[PHP] Object Array?

2006-05-18 Thread Jay Paulson
I tried with no success yesterday to get an answer to this question so I'll
try again.

I have an object from using simpleXML and inside that object is an array
holding even more objects.  However, it's not acting like an array and
therefore I can't go through it. (i.e. I can't use the count function to see
how big it is and loop through it)

This below should be an array:

$xml-RES-R

When I use print_r($xml-RES-R) I get $xml-RES-R[0] printed, which is
below:

SimpleXMLElement Object
(
[U] = http://.../benefits/
[UD] = http://.../benefits/
[UE] = http://.../benefits/
[T] = bBenefits/b

[RK] = 10
[CRAWLDATE] =  17 May 2006
[FS] = SimpleXMLElement Object
(
)

[S] = Home, bBenefits/b Forms Jobs Training Locations, Who We Are
E-Info Publications EVAbr Team Websites. b.../b 2006 bBenefits/b
Vote. bBenefits/b Links. bBenefits/b Websites. b.../b
[LANG] = en
[HAS] = SimpleXMLElement Object
(
[L] = SimpleXMLElement Object
(
)

[C] = SimpleXMLElement Object
(
)

)

)


When I use print_r($xml-RES) I get the below.  As you can see [R] = Array
but yet in the above example it is an object.  I'm so confused and lost.
Can anyone help?  PHP version 5.0.4

SimpleXMLElement Object
(
[M] = 2010
[FI] = SimpleXMLElement Object
(
)

[NB] = SimpleXMLElement Object
(
[NU] =
/search?q=benefitssite=default_collectionhl=enlr=ie=UTF-8output=xml_no_
dtdclient=default_frontendaccess=psort=date:D:L:d1start=10sa=N
)

[R] = Array
(
[0] = SimpleXMLElement Object
(
[U] = http://.../benefits/
[UD] = http://.../benefits/
[UE] = http://.../benefits/
[T] = bBenefits/b

[RK] = 10
[CRAWLDATE] =  17 May 2006
[FS] = SimpleXMLElement Object
(
)

[S] = Home, bBenefits/b Forms Jobs Training
Locations, Who We Are E-Info Publications EVAbr Team Websites. b.../b
2006 bBenefits/b Vote. bBenefits/b Links. bBenefits/b Websites.
b.../b  
[LANG] = en
[HAS] = SimpleXMLElement Object
(
[L] = SimpleXMLElement Object
(
)

[C] = SimpleXMLElement Object
(
)

)

)

[1] = SimpleXMLElement Object
(
[U] = http://.../benefits/benefits_websites.html
[UD] = http://.../benefits/benefits_websites.html
[UE] = http://.../benefits/benefits_websites.html
[T] = bBenefits/b

[RK] = 9
[CRAWLDATE] =  17 May 2006
[FS] = SimpleXMLElement Object
(
)

[S] = Home, bBenefits/b Forms Jobs Training
Locations, Who We Are E-Info Publicationsbr EVA Team Websites.
bBenefits/b Websites.  b.../b
[LANG] = en
[HAS] = SimpleXMLElement Object
(
[L] = SimpleXMLElement Object
(
)

[C] = SimpleXMLElement Object
(
)

)

[HN] = /benefits
)

[2] = SimpleXMLElement Object
(
[U] = http://www..com/jobs//benefits.html
[UD] = http://www..com/jobs//benefits.html
[UE] = http://www..com/jobs//benefits.html
[T] =  : Jobs :
[RK] = 10
[FS] = SimpleXMLElement Object
(
)

[S] = b.../b bBenefits/b Summary. b.../b
The bBenefits/b of a Unique Culture. Atbr  b.../b success. Medical
Care bBenefits/b. Available after b.../b
[LANG] = en
[HAS] = SimpleXMLElement Object
(
[L] = SimpleXMLElement Object
(
)

[C] = SimpleXMLElement Object
(
)

)

)

Etc..

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



Re: [PHP] Re: Object Array?

2006-05-18 Thread Jay Paulson
This keeps getting stranger and stranger.  I did the var_dump and I got this
for R:

  [R]=
  array(10) {

So it's an array but when I pass it through is_array it says it's not an
array.  However, when I pass it through is_object it says it's an object?!


On 5/18/06 2:18 PM, Daniel Orner [EMAIL PROTECTED] wrote:

 Try using var_dump rather than print_r... maybe it'll give you more
 accurate data (e.g. to figure out if it's an object, as Rob said, or an
 array).
 
 --Daniel
 
 Jay Paulson wrote:
 I tried with no success yesterday to get an answer to this question so I'll
 try again.
 
 I have an object from using simpleXML and inside that object is an array
 holding even more objects.  However, it's not acting like an array and
 therefore I can't go through it. (i.e. I can't use the count function to see
 how big it is and loop through it)
 
 This below should be an array:
 
 $xml-RES-R
 
 When I use print_r($xml-RES-R) I get $xml-RES-R[0] printed, which is
 below:
 
 SimpleXMLElement Object
 (
 [U] = http://.../benefits/
 [UD] = http://.../benefits/
 [UE] = http://.../benefits/
 [T] = bBenefits/b
 
 [RK] = 10
 [CRAWLDATE] =  17 May 2006
 [FS] = SimpleXMLElement Object
 (
 )
 
 [S] = Home, bBenefits/b Forms Jobs Training Locations, Who We Are
 E-Info Publications EVAbr Team Websites. b.../b 2006 bBenefits/b
 Vote. bBenefits/b Links. bBenefits/b Websites. b.../b
 [LANG] = en
 [HAS] = SimpleXMLElement Object
 (
 [L] = SimpleXMLElement Object
 (
 )
 
 [C] = SimpleXMLElement Object
 (
 )
 
 )
 
 )
 
 
 When I use print_r($xml-RES) I get the below.  As you can see [R] = Array
 but yet in the above example it is an object.  I'm so confused and lost.
 Can anyone help?  PHP version 5.0.4
 
 SimpleXMLElement Object
 (
 [M] = 2010
 [FI] = SimpleXMLElement Object
 (
 )
 
 [NB] = SimpleXMLElement Object
 (
 [NU] =
 /search?q=benefitssite=default_collectionhl=enlr=ie=UTF-8output=xml_no_
 dtdclient=default_frontendaccess=psort=date:D:L:d1start=10sa=N
 )
 
 [R] = Array
 (
 [0] = SimpleXMLElement Object
 (
 [U] = http://.../benefits/
 [UD] = http://.../benefits/
 [UE] = http://.../benefits/
 [T] = bBenefits/b
 
 [RK] = 10
 [CRAWLDATE] =  17 May 2006
 [FS] = SimpleXMLElement Object
 (
 )
 
 [S] = Home, bBenefits/b Forms Jobs Training
 Locations, Who We Are E-Info Publications EVAbr Team Websites. b.../b
 2006 bBenefits/b Vote. bBenefits/b Links. bBenefits/b Websites.
 b.../b  
 [LANG] = en
 [HAS] = SimpleXMLElement Object
 (
 [L] = SimpleXMLElement Object
 (
 )
 
 [C] = SimpleXMLElement Object
 (
 )
 
 )
 
 )
 
 [1] = SimpleXMLElement Object
 (
 [U] = http://.../benefits/benefits_websites.html
 [UD] = http://.../benefits/benefits_websites.html
 [UE] = http://.../benefits/benefits_websites.html
 [T] = bBenefits/b
 
 [RK] = 9
 [CRAWLDATE] =  17 May 2006
 [FS] = SimpleXMLElement Object
 (
 )
 
 [S] = Home, bBenefits/b Forms Jobs Training
 Locations, Who We Are E-Info Publicationsbr EVA Team Websites.
 bBenefits/b Websites.  b.../b
 [LANG] = en
 [HAS] = SimpleXMLElement Object
 (
 [L] = SimpleXMLElement Object
 (
 )
 
 [C] = SimpleXMLElement Object
 (
 )
 
 )
 
 [HN] = /benefits
 )
 
 [2] = SimpleXMLElement Object
 (
 [U] = http://www..com/jobs//benefits.html
 [UD] = http://www..com/jobs//benefits.html
 [UE] = http://www..com/jobs//benefits.html
 [T] =  : Jobs :
 [RK] = 10
 [FS] = SimpleXMLElement Object
 (
 )
 
 [S] = b.../b bBenefits/b Summary. b.../b
 The bBenefits/b of a Unique Culture. Atbr  b.../b success. Medical
 Care bBenefits/b

Re: [PHP] Object Array?

2006-05-18 Thread Jay Paulson \(CE CEN\)
 I have an object from using simpleXML and inside that object is an array
 holding even more objects.  However, it's not acting like an array and
 therefore I can't go through it. (i.e. I can't use the count function to see
 how big it is and loop through it)
 
 This below should be an array:
 
 $xml-RES-R
 
 When I use print_r($xml-RES) I get the below.  As you can see [R] = Array
 but yet in the above example it is an object.  I'm so confused and lost.
 Can anyone help?  PHP version 5.0.4
 
 SimpleXMLElement Object
 (
 [M] = 2010
 snip
 [R] = Array
 (
 [0] = SimpleXMLElement Object
 (
 [U] = http://.../benefits/
 snip
 )
 
 [1] = SimpleXMLElement Object
 (
 [U] = http://.../benefits/benefits_websites.html
 snip )
 
 [2] = SimpleXMLElement Object
 (
 [U] = http://www..com/jobs//benefits.html
 
 You are right: $xml-RES-R is an array.
 
 If it doesn't act like an array, you might try assigning it to a new
 variable. Maybe something like this:
 
 $MyArray = $xml-RES-R;
 print_r($MyArray);
 
 Others might have better ideas. Keep trying.
 
 --J

I've tried that even going so far as doing:

$MyArray = array();
$MyArray = $xml-RES-R
print_r($MyArray);

I still run into the same problem. Hm.

jay



Re: [PHP] Object Array?

2006-05-18 Thread Jay Paulson
 don't bother trying to print_r() or var_dump() SimpleXML objects you'll fry
 your
 brain - seriously you'll never get anything that makes sense - this is due to
 the
 way simpleXML using iterators or something like that - it's a bit like voodoo
 to
 me too so I find it hard to explain.
 
 I'm sure there is a saying about 'when things are so simple, you just don't
 get'
 that's applicable here :-P

KISS - Keep It Simple Stupid. Haha..
 
 
 Jay Paulson wrote:
 I tried with no success yesterday to get an answer to this question so I'll
 try again.
 
 I have an object from using simpleXML and inside that object is an array
 holding even more objects.  However, it's not acting like an array and
 therefore I can't go through it. (i.e. I can't use the count function to see
 how big it is and loop through it)
 
 use foreach on it (I think 'it' is a weirdo object that implements an iterator
 interface - which pretty much sums up simpleXML ;-):
 
 foreach ($xml-RES-R as $r) {
 echo $r-U, $r-UD; // etc
 }
 
 does that get you anywhere?

I've tried that and $xml-RES-R only goes through one record
$xml-RES-R[0] and then it stops.  What I did find that worked was this.

$i = 0;
while (isset($xml-RES-R[$i]) || !empty($xml-RES-R[$i]) {
// do stuff
$i++;
}

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



Re: [PHP] Object Array?

2006-05-18 Thread Jay Paulson \(CE CEN\)
 I tried with no success yesterday to get an answer to this question so I'll
 try again.
 
 I have an object from using simpleXML and inside that object is an array
 holding even more objects.  However, it's not acting like an array and
 therefore I can't go through it. (i.e. I can't use the count function to
 see
 how big it is and loop through it)
 
 use foreach on it (I think 'it' is a weirdo object that implements an
 iterator
 interface - which pretty much sums up simpleXML ;-):
 
 foreach ($xml-RES-R as $r) {
 echo $r-U, $r-UD; // etc
 }
 
 does that get you anywhere?
 
 what happens when you do:
 
 foreach ($xml-RES-R as $key = $r) {
 echo $r-__toString();
 // or
 echo $key;
 }
 
 ?

That actually works.  Strange because I tried this method first yesterday
and spent over an hour trying to get it to work and now it's working?  AH!
:)  Below is the code I use.

foreach ($xml-RES-R as $key = $r) {
echo $r-U.'br';
echo $r-UD.'br';
echo $r-UE.'br';
echo $r-T.'br';
echo $r-RK.'br';
echo $r-S.'br';
echo $r-LANG.'br';
echo 'hr';

}

 
 
 I've tried that and $xml-RES-R only goes through one record
 $xml-RES-R[0] and then it stops.  What I did find that worked was this.
 
 in what way does it stop?
 
 
 $i = 0;
 while (isset($xml-RES-R[$i]) || !empty($xml-RES-R[$i]) {
 // do stuff
 $i++;
 }
 
 odd. I don't suppose $xml-RES-R has any methods does it? like hasChildren()
 or
 hasAttributes()?



[PHP] Simple XML array count??

2006-05-17 Thread Jay Paulson
I'm using SimpleXML to go through a Google search result and I'm not quite
understanding something.  The variable $xml-RES-R is an array of 9 items
and each item is an object containing information (see var dump below).  So
when I try to do count($xml-RES-R); it returns a number or 1 instead a
number of 10.  Also, when I do a print_r($xml-RES-R); all I get is a dump
of $xml-RES-R[0] and not the rest of the array.  I'm not quite sure what
is going on?  I'm using PHP 5.0.4 maybe there's a bug?

SimpleXMLElement Object
(
[TM] = 0.081574
[Q] = benefits
[PARAM] = Array
(
[0] = SimpleXMLElement Object
(
)

[1] = SimpleXMLElement Object
(
)

[2] = SimpleXMLElement Object
(
)

[3] = SimpleXMLElement Object
(
)

[4] = SimpleXMLElement Object
(
)

[5] = SimpleXMLElement Object
(
)

[6] = SimpleXMLElement Object
(
)

[7] = SimpleXMLElement Object
(
)

[8] = SimpleXMLElement Object
(
)

)

[RES] = SimpleXMLElement Object
(
[M] = 1830
[FI] = SimpleXMLElement Object
(
)

[NB] = SimpleXMLElement Object
(
[NU] =
/search?q=benefitssite=default_collectionhl=enlr=ie=UTF-8output=xml_no_
dtdclient=default_frontendaccess=psort=date:D:L:d1start=10sa=N
)

[R] = Array
(
[0] = SimpleXMLElement Object
(
[U] = http://benefits/
[UD] = http://benefits/
[UE] = http://benefits/
[T] = bBenefits/b
[RK] = 10
[FS] = SimpleXMLElement Object
(
)

[S] = Home, bBenefits/b Forms Jobs Training
Locations, Who We Are E-Info Publications EVAbr Team Websites. b.../b
2006 bBenefits/b Vote. bBenefits/b Links. bBenefits/b Websites.
b.../b  
[LANG] = en
[HAS] = SimpleXMLElement Object
(
[L] = SimpleXMLElement Object
(
)

[C] = SimpleXMLElement Object
(
)

)

)

[1] = SimpleXMLElement Object
(
[U] = http://benefits/benefits_websites.html
[UD] = http://benefits/benefits_websites.html
[UE] = http://benefits/benefits_websites.html
[T] = bBenefits/b

[RK] = 9
[CRAWLDATE] =  17 May 2006
[FS] = SimpleXMLElement Object
(
)

[S] = Home, bBenefits/b Forms Jobs Training
Locations, Who We Are E-Info Publicationsbr EVA Team Websites.
bBenefits/b Websites.  b.../b
[LANG] = en
[HAS] = SimpleXMLElement Object
(
[L] = SimpleXMLElement Object
(
)

[C] = SimpleXMLElement Object
(
)

)

[HN] = /benefits
)

[2] = SimpleXMLElement Object
(
[U] = http://www..com/jobs//benefits.html
[UD] = http://www..com/jobs//benefits.html
[UE] = http://www..com/jobs//benefits.html
[T] = Whole Foods : Jobs : North Atlantic
Region Career Opportunities
[RK] = 10
[CRAWLDATE] =  15 May 2006
[FS] = SimpleXMLElement Object
(
)

[S] = b.../b  bBenefits/b Summary.
b.../b The bBenefits/b of a Unique Culture. Atbr  b.../b
success. Medical Care bBenefits/b. Available after b.../b
[LANG] = 

[PHP] Run Apache/PHP/MySQL from CD?

2006-04-19 Thread Jay Paulson
I have no idea if this is possible or not but is there a way to run Apache,
PHP, and MySQL from a CD?  I'd like it to be possible to run it on Windows,
Mac OSX and *nix.  If it is possible could someone point me in the right
direction?

Thanks!

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



[PHP] Strtodate() bug?

2006-04-03 Thread Jay Paulson
Hello,

I've got some weird behavior using PHP 4.3.9.  I use the function of
strtotime(last Sunday); and it's returning the timestamp for last
Saturday.  However, if I use strtotime(-1 day); (I'm running this program
on a Monday) it returns the correct timestamp for Sunday.

Is this a bug in PHP 4.3.9?

Thanks.

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



[PHP] (array)

2006-02-22 Thread Jay Paulson
Just came across some code I haven't seen before and can't find anything on
php.net or google about it (maybe I'm not searching for the right thing?).
What is the following doing?

// $dataobject is holding a bunch of variables like:
//  $dataobject-var1
//  $dataobject-var2
//  etc...

(array)$dataobject;

Is this making the $dataobject an associative array like:

$dataobject[var1]
$dataobject[var2]

Or is it doing something different?

Thanks!

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



[PHP] Last Sunday in September?

2006-02-17 Thread Jay Paulson
Hi,

I'm building a program and I need to find the last Sunday in September for
every year because the following Monday is the start of a new year for us.
So 2006 ends on September 24th 2006 and the new year (2007) starts on
September 25th 2006.  I was thinking that using the strtotime() would get me
this information possibly?  Is there an easy way to get this information?

Pseudo code:

If ((date  last Sunday in September this year) 
(date  Jan 1 of next year)) {
year++
}

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



Re: [PHP] str_replace ? \r

2006-02-07 Thread Jay Paulson
http://us3.php.net/manual/en/function.nl2br.php

Instead of using br / I would use p/p tags.  That's just me though. :)


On 2/7/06 12:38 PM, Sam Smith [EMAIL PROTECTED] wrote:

 
 From a textarea on a web form I'm attempting to convert all returns(\r),
 from the users input, to br /, for db INSERT, and then back again for
 display in the textarea. (They remain as br /s for normal HTML web page
 display.)
 
 code:
 // From textarea to db UPDATE
 function addBR($tv) {
 $tv = addslashes($tv);
 $tv = str_replace(\r,br /,$tv);
 //  $tv = preg_replace(/(\r\n|\n|\r)/, br /, $tv);
 //  $tv = preg_replace(/(\r\n|\n|\r)/, , $tv);
 return $tv;}
 
 // For display in textarea
 function remBR($tv) {
 $tv = str_replace(br /,\r,$tv);
 $tv = stripslashes($tv);
 return $tv;
 }
 
 IT ALL works fine accept if a return is entered in the form's textarea at
 the very beginning:
 
 mysql SELECT jbs_jobDesA FROM jobs WHERE jbs_ID=77 \G
 *** 1. row ***
 jbs_jobDesA: br /[the return is still here]
 Lesequam coreet la feum nulla feu facil iriure faccummolut ulput num augait
 1 row in set (0.00 sec)
 
 the return is converted to br /\r (leaving the return). AND then when
 converted back for for the textarea both are stripped out, that is, there
 is nothing in front of the first character. When resubmitted for UPDATE:
 
  mysql SELECT jbs_jobDesA FROM jobs WHERE jbs_ID=77 \G
 *** 1. row ***
 jbs_jobDesA: Lesequam coreet la feum nulla feu facil iriure faccummolut
 ulput num augait 
 1 row in set (0.00 sec)
 
 Q. Why is that first return treated differently? All other returns are
 treated as expected.
 
 Thanks,
 sam

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



Re: [PHP] can't output sql query with php code.

2006-02-06 Thread Jay Paulson
It always helps to have a different point of view to look at code sometimes.
Else you'll go bonkers looking for that stupid semi-colon! :)




On 2/6/06 2:18 AM, Paul Goepfert [EMAIL PROTECTED] wrote:

 Thanks everyone for your help.  I should have seen the semi-colon at
 the end of the while loop.  I must have looked at the code 20 times
 and I can't believe I missed it.
 
 Paul
 On 2/6/06, Brady Mitchell [EMAIL PROTECTED] wrote:
 ?php
 echo 'select name=month \n';
 $month_query = mysql_query(SELECT m_id, months FROM Month);
 while ($r = mysql_fetch_array($month_query));
 
 
 Remove the semi-colon at the end of the above line and it works like a charm.
 
 {
 $v = $r[m_id];
 $out = $r[months];
 echo option value=$v$out/option\n;
 }
 echo '/select\n';
 ?
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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



[PHP] PHP Frameworks?

2006-01-27 Thread Jay Paulson
Has anyone used any of the following frameworks?  What is the general
opinion of using frameworks etc?

WASP - http://wasp.sourceforge.net/content/
Symfony - http://www.symfony-project.com/
Prado - http://www.xisc.com/
WACT - http://www.phpwact.org/
CakePHP - http://www.cakephp.org/

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



Re: [PHP] questions regarding PHP and Forms

2006-01-27 Thread Jay Paulson
 1) I need to do vaildation on form values that I have entered into a
 form.  Is there a way I can write the vaildation code on the same page
 as the form in php?

Yes there sure is. :)

if (isset($submit)) {
// data validation etc.
}
else {
// display html form
}

 2)  I have a drop down menu on one of my form fields.  What I want to
 do is if a certain item is seelected I want to have a new textbox
 appear below the drop down menu.  Is there a way to do this in php?

You'll have to do this via JavaScript. =/

Hope that helps!

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



Re: [PHP] Best way to handle PREVIOUS and NEXT processing of database records retrieved

2006-01-26 Thread Jay Paulson
You could always use the LIMIT functionality in MySQL

SELECT * FROM table LIMIT 0,25

Then just pass the variables for the limit to start at and how many you want
returned in your query.

SELECT * FROM table LIMIT $start,$num_returned

So looking at records 26 through 50 your links would look like below.

a href=file.php?start=51num_returned=25Next/a |
a href=file.php?start=0num_returned=25Previous

Just make sure you check your variables so they are numbers to avoid any
kind of SQL injection.


On 1/26/06 2:27 PM, Sue [EMAIL PROTECTED] wrote:

 I am retrieving records from a MySQL database and need to just display each
 record one after the other on a page.  I only want to display a maximum of
 25 records per page though, and am wondering if there is a way to handle
 this easily within PHP?  I'd like to use something like NEXT and PREVIOUS as
 links to go back and forth from each of the pages if there is more than 1
 page of data to display.  Any examples/ideas would be greatly appreciated.
 
 Thanks in advance! 

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



Re: [PHP] Basic OOP Question

2006-01-26 Thread Jay Paulson
 Hi,
 This is my first post so a cheery hello, this script from php.net:
 
 
 [www.php.net]
 
 ?php
 class SimpleClass
 {
 // member declaration
 public $var = 'a default value';
 
 // method declaration
 public function displayVar() {
 echo $this-var;
 }
 }
 
 mySimpleClass = new SimpleClass();
 ?

You need to change the last line there.

$mySimpleClass = new SimpleClass();

There's no '$'

 
 
 Returned this:
 Parse error: parse error, unexpected T_STRING, expecting T_FUNCTION
 in /Users/chris/Sites/php/oop/simple.php on line 4
 
 
 
 I'm running  PHP Version 5.0.4, with MAC OS 10.4.4

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



[PHP] Get timestamp?

2006-01-25 Thread Jay Paulson
For some reason my brain isn't working correctly today.

How would I go about getting the timestamp of a day of the week from 7 weeks
ago?

In my case I'm getting the timestamp of last Sunday (no matter what day of
the week it is currently) and I want to get the timestamp of the Sunday that
happened 7 weeks ago.

$lastSunday = strtotime(last Sunday);
$Sunday7Weeks = $lastSunday - ???;

Thanks

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



Re: [PHP] put method

2006-01-24 Thread Jay Paulson
http://us3.php.net/features.file-upload


On 1/24/06 11:46 AM, sunaram patir [EMAIL PROTECTED] wrote:

 could anyone please tell me how to use put method to upload file to a
 remote server? thanks.
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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



[PHP] SOAP WSDL?

2006-01-24 Thread Jay Paulson
I'm messing around with SOAP with PHP 5 and I was wondering do I have to
create my own WSDL's or can PHP create them for me like NuSoap does?

Thanks!

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



[PHP] Using mapping tools via PHP?

2006-01-23 Thread Jay Paulson
I was wondering if anyone has built a php web app that uses google maps,
yahoo maps, and/or mapquest maps.

What I am trying to do is create a web app that if someone inputs their zip
or city and state or address the results will show how far away they are
from one of our stores and have a map to the closest ones.

Thanks for any help!

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



Re: [PHP] DOM saveHTML() not outputting XHTML Strict

2006-01-23 Thread Jay Paulson
I don't know much about the -saveXML() method but after reading the PHP
manual why can't you just do something like this:

$xhtml = $dom-saveXML();

// strip out the ?xml and ?
$html = str_replace(?xml, , $html);
$html = str_replace(?, , $html);

Would that even work?




On 1/23/06 2:52 PM, Chris [EMAIL PROTECTED] wrote:

 Steve Clay wrote:
 
 Monday, January 23, 2006, 1:35:13 PM, Chris wrote:
  
 
 the -saveHTML() method ... outputs as `option selected`
 I need my output HTML to conform to XHTML strict.

 
 
 Since XHTML is XML, try -saveXML()?
 
 Steve
  
 
 I've tried that, and it suits my purposes except for the fact that it
 always outputs the ?xml ? tag in the front, which I can't have.

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



Re: [PHP] DOM saveHTML() not outputting XHTML Strict

2006-01-23 Thread Jay Paulson
ACK!  Of course I put errors in the code.  But I just read if you want to
strip out the first line that would be easy.  Just use a regular expression
and take it out. :)




On 1/23/06 3:23 PM, Jay Paulson [EMAIL PROTECTED] wrote:

 I don't know much about the -saveXML() method but after reading the PHP
 manual why can't you just do something like this:
 
 $xhtml = $dom-saveXML();
 
 // strip out the ?xml and ?
 $html = str_replace(?xml, , $html);
 $html = str_replace(?, , $html);
 
 Would that even work?
 
 
 
 
 On 1/23/06 2:52 PM, Chris [EMAIL PROTECTED] wrote:
 
 Steve Clay wrote:
 
 Monday, January 23, 2006, 1:35:13 PM, Chris wrote:
  
 
 the -saveHTML() method ... outputs as `option selected`
 I need my output HTML to conform to XHTML strict.

 
 
 Since XHTML is XML, try -saveXML()?
 
 Steve
  
 
 I've tried that, and it suits my purposes except for the fact that it
 always outputs the ?xml ? tag in the front, which I can't have.

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



[PHP] Count of elements in XML

2006-01-20 Thread Jay Paulson
I was wondering if there is a way to get the number of foo elements in my
XML below?  This way I could loop through each element and print out the
attributes.  

$string = a
 foo name=\one\ game=\lonely\1/foo
 foo name=\two\ game=\again\2/foo
 foo name=\three\ game=\blah\3/foo
 foo name=\four\ game=\goodness\4/foo
/a;

$xml = simplexml_load_string($string);
// this doesn't return the correct number of elements but instead returns
the data inbetween foo/foo
$cnt = count($xml-foo);
for($i=0; $i$cnt; $i++) {
foreach($xml-foo[$i]-attributes() as $a = $b) {
   echo $a,'=',$b,\\n;
}
}

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



[PHP] SimpleXML

2006-01-18 Thread Jay Paulson
I'm a noob when it comes to parsing an XML file.  I have a really simple
file that I'm getting back from a SOAP service that I need to parse.  I
figure SimpleXML would be great!  However, I'm having problems getting the
name attribute for each column element.  The XML is below along with the
code I'm using to parse it.

$xml = XML
resultSet recordCount=3 columnCount=4
  record
column name=BUSINESS_UNITCE/column
column name=ATTENDANCEC/column
column name=COUNT(A.EMPLID)1/column
column name=TO_CHAR(SYSDATE,-MM-DD)2006-01-18/column
  /record
  record
column name=BUSINESS_UNITCE/column
column name=ATTENDANCED/column
column name=COUNT(A.EMPLID)1/column
column name=TO_CHAR(SYSDATE,-MM-DD)2006-01-18/column
  /record
  record
column name=BUSINESS_UNITCE/column
column name=ATTENDANCEE/column
column name=COUNT(A.EMPLID)5/column
column name=TO_CHAR(SYSDATE,-MM-DD)2006-01-18/column
  /record
/resultSet
XML;

$xml = simplexml_load_string($xml);
print_r($xml);
foreach ($xml-record as $record) {
list($k, $v) = each($xml-record-$key-attributes());
echo {$k} = {$v}br;
echo {$key} key / {$value} valuehr;
}
}

The results I get are as follows:

0 = BUSINESS_UNIT
column key / C value

0 = BUSINESS_UNIT
column key / 1 value

0 = BUSINESS_UNIT
column key / 2006-01-18 value

0 = BUSINESS_UNIT
column key / CE value

0 = BUSINESS_UNIT
column key / D value

0 = BUSINESS_UNIT
column key / 1 value

0 = BUSINESS_UNIT
column key / 2006-01-18 value

0 = BUSINESS_UNIT
column key / CE value

0 = BUSINESS_UNIT
column key / E value

0 = BUSINESS_UNIT
column key / 5 value

0 = BUSINESS_UNIT
column key / 2006-01-18 value

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



Re: [PHP] help plz

2006-01-16 Thread Jay Paulson
I have this book and have been very impressed with it.  However, if you are
a beginner programmer I would say not to get it until you understand the
basic programming concepts and have a working knowledge of PHP. :)


On 1/16/06 1:14 AM, Ligaya Turmelle [EMAIL PROTECTED] wrote:

 I personally liked George Schlossnagle's book Advanced PHP
 Programming, published by Sams.
 
 http://www.amazon.com/gp/product/0672325616/qid=1137394700/sr=2-1/ref=pd_bbs_b
 _2_1/104-0195316-0794320?s=booksv=glancen=283155
 
 suresh kumar wrote:
 hi,
i am working as a web designer in PHP  Mysql.i
 know the basics of PHP  Mysql,i want 2 become PHP
 Expert,i am planning to buy one Book,but i dont know
 which book 2 buy.plz give me info .
   A.suresh
 
 Send instant messages to your online friends http://in.messenger.yahoo.com
 

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



Re: [PHP] Parsing a large file

2006-01-13 Thread Jay Paulson
 I have large log files from a web server (about a gig in size) and need
 to parse each line looking for a string, and when encountered push that
 line to a new file.  I was thinking I could have PHP read in the whole
 file, but thinking it could be a major pain since I have about 20 log
 files to read through.
 
 Anyone have some suggestions?
 
 Thanks,
 Robert

I'm actually in the process of doing the exact same thing!  If you search on
the list you'll see some of my emails.  But to help you out here's what I've
got so far. :)

Since you are dealing with such huge files you'll want to read them a little
at a time as to not to use too much system memory all at once.  The fgets()
reads a file line by line.  So you read a few lines and then process those
lines and then move on. :)

Hope this helps get you started!

// open log file for reading
if (!$fhandle = fopen($path.$log_file_name, r)) {
echo couldn't open $file_name for writing!;
die;
}

$i = 0;
$buf = ;
while (!feof($fhandle)) {
$buf[] = fgets($fhandle);
if ($i++ % 10 == 0) {
// process buff here do all the regex and what not
// and get the line for
// the new text file to be loaded into the database
// haven't written this yet

// write to a file in the directory this runs in.
// this file will be used to load data into a mysql
// database to run queries on.

// empty buff out to remove it from system memory
unset($buf);
}
}

fclose($fhandle);

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



Re: [PHP] Parsing a large file

2006-01-13 Thread Jay Paulson
 On Fri, January 13, 2006 3:33 pm, Jay Paulson wrote:
 $buf = ;
 
 Probably better to initialize it to an empty array();...

Yep right.
 
 while (!feof($fhandle)) {
 $buf[] = fgets($fhandle);
 
 ... since you are going to initialize it to an array here anyway.
 
 if ($i++ % 10 == 0) {
 
 Buffering 10 lines of text in PHP is probably not going to make a
 significant difference...

This is true.  It's what I have written to start with.  Basically I'm just
trying to make sure that I'm not hogging system memory with a huge file b/c
there are other apps running at the same time that need system resources as
well.  That's the main reason why I'm using a buffer to read the file in and
parse it a little at a time.  By all means test it out on your hardware and
see what that buffer needs to be.
 
 You'll have to test on your hardware to confirm, but between:
 
 1. Low-level disk IDE buffer
 2. Operating System disk cache buffers
 3. C code of PHP source disk cache buffers
 
 your PHP 10-line buffer in an array
 is probably more overhead, and much more complicted code to maintain,
 with no significant benefit.

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



[PHP] Reading large files via PHP?

2006-01-11 Thread Jay Paulson \(CE CEN\)
I'm reading in a 66MB file into php so I can parse it and load it into a 
database.  However, it is taking a long time for php to read the file.  So long 
that the script times out.  I know about the ini_set(max_execution_time, 120) 
or whatever length I want to set the time out for the script, but my question 
is as follows.

Is it possible to read in a file and at the same time echo out a status of how 
far along the file has been read?

The code I have right now is below.  Just wondering if what I'm trying to do is 
possible and how to do it.

// set script timeout
ini_set(max_execution_time, 120);

// import file name
$log_file_name = access_log.1;
echo Reading access log!br/;
if (!$ac_arr = file(./$log_file_name)) {
echo Couldn't load access log!;
die;
}

Thanks!


RE: [PHP] Reading large files via PHP?

2006-01-11 Thread Jay Paulson \(CE CEN\)
 I'm reading in a 66MB file into php so I can parse it and load it into a 
 database.  However, it is taking a long time for php to read the file. 
 So long that the script times out.  I know about the 
 ini_set(max_execution_time, 120) or whatever length I want to set the 
 time out for the script, but my question is as follows.

 Is it possible to read in a file and at the same time echo out a status 
 of how far along the file has been read?

 The code I have right now is below.  Just wondering if what I'm trying 
 to do is possible and how to do it.

 // set script timeout
 ini_set(max_execution_time, 120);

 // import file name
 $log_file_name = access_log.1;
 echo Reading access log!br/;
 if (!$ac_arr = file(./$log_file_name)) {
  echo Couldn't load access log!;
  die;
 }

 Thanks!

 Even if you get around the execution time the above code is going to use 
 up 66megs of memory to store that file in $ac_arr.

 You'd be much better off doing something like:

 $fd = fopen(./$log_file_name, r);

 while ( !feof($fd) ) {
   $buf = fread($fd, 32768);
   // process buffer here
 }
 fclose($fd);

 That will let you do your progress thing as well as not eat up so much 
 memory.  Play around with values of 32768 to see if smaller or larger 
 makes any different on your system.
 
 Good luck!

Ahhh.. Okay that's very cool and I did not know that.  I knew that it was 
chewing up a lot of memory reading it all at once.  

I guess the only thing I have to worry about now is if I do a read like that 
will it truncate a whole line instead of getting the whole line?  The reason 
why I ask is that if possible I would rather have it read line by line for X 
lines and then process that buffer then go and grab more lines until end of 
file.  Is that possible?


RE: [PHP] Is there a way to display data from database for SelectOptions in a form?

2006-01-10 Thread Jay Paulson \(CE CEN\)
[snip]Let's look at it another way, why 70-80 lines of code when 4 will do it
properly when done correctly?[/snip]

I agree with this line of thinking especially for a new person to php.

When I first read the solution that was so long I thought to myself great and 
this person is new to php and now they are going to be scared of php.  

I really think one of the appeals of php is it's simplicity of getting things 
done and getting those things done quickly.  

Yes it's great having one function to output every select html form but is it 
really necessary?


[PHP] SOAP Problems.

2006-01-10 Thread Jay Paulson \(CE CEN\)
I'm trying to call a SOAP service where you pass it a couple of dates and it is 
supposed to return stuff.  My testing code is below along with the errors I'm 
getting.  What's strange is that it's not working in php but it works perfectly 
in Flash.  The request it is sending is only sending one param the $to value 
and not the $from value.  Any idea what's going on?

$from = 06/01/2005; // some date but what format?
$to = 12/31/2005; // some date but what format?

$client = new SoapClient(some.wsdl, array(trace = 1, exceptions = 0));

var_dump($client-__getFunctions());
echo brbr;
var_dump($client-__getTypes());
echo brbr;

try {
print($client-execute($from, $to));
} catch (SoapFault $exception) {
echo $exception;
}
$client-execute($from, $to);
print pre\n;
print Request :\n.htmlspecialchars($client-__getLastRequest()) .\n;
print Response:\n.htmlspecialchars($client-__getLastResponse()).\n;
print /pre;

var_dump($client-execute($from, $to));
echo brbr;

echo brbr;
print($client-__soapCall(execute, array(From = $from, to = $to)));



array(1) { [0]=  string(44) executeResponse execute(execute $parameters) }

array(2) { [0]= string(44) struct execute { string From; string to; } [1]= 
string(44) struct executeResponse { string wsReturn; } }

SoapFault exception: [soapenv:Server.userException] [TeamworksException 
name='Process: 'HR Training Infomation' ProcessItem: 'Untitled0' Type: 'ITEM'', 
message='Internal Script error: org.mozilla.javascript.WrappedException: 
WrappedException of ORA-01858: a non-numeric character was found where a 
numeric was expected ', line=-1, pos=-1 nested=] in 
/Library/WebServer/Documents/services/soap-test.php:9 Stack trace: #0 
/Library/WebServer/Documents/services/soap-test.php(9): 
SoapClient-__call('execute', Array) #1 
/Library/WebServer/Documents/services/soap-test.php(9): 
SoapClient-execute('06/01/2005', '12/31/2005') #2 {main}

Request :
?xml version=1.0 encoding=UTF-8?
SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:ns1=somensSOAP-ENV:Bodyns1:execute/param112/31/2005/param1/SOAP-ENV:Body/SOAP-ENV:Envelope

Response:
?xml version=1.0 encoding=UTF-8?
soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:xsd=http://www.w3.org/2001/XMLSchema; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 soapenv:Body
  soapenv:Fault
   faultcodesoapenv:Server.userException/faultcode
   faultstring[TeamworksException name=apos;Process: apos;HR Training 
Infomationapos; ProcessItem: apos;Untitled0apos; Type: 
apos;ITEMapos;apos;, message=apos;Internal Script error: 
org.mozilla.javascript.WrappedException: WrappedException of ORA-01858: a 
non-numeric character was found where a numeric was expected
apos;, line=-1, pos=-1 nested=lt;nonegt;]/faultstring
   detail/
  /soapenv:Fault
 /soapenv:Body
/soapenv:Envelope



object(SoapFault)#2 (9) { [message:protected]= string(0)  
[string:private]= string(0)  [code:protected]= int(0) 
[file:protected]= string(51) 
/Library/WebServer/Documents/services/soap-test.php [line:protected]= 
int(16) [trace:private]= array(2) { [0]= array(6) { [file]= string(51) 
/Library/WebServer/Documents/services/soap-test.php [line]= int(16) 
[function]= string(6) __call [class]= string(10) SoapClient 
[type]= string(2) - [args]= array(2) { [0]= string(7) execute [1]= 
array(2) { [0]= string(10) 06/01/2005 [1]= string(10) 12/31/2005 } } } 
[1]= array(6) { [file]= string(51) 
/Library/WebServer/Documents/services/soap-test.php [line]= int(16) 
[function]= string(7) execute [class]= string(10) SoapClient 
[type]= string(2) - [args]= array(2) { [0]= string(10) 06/01/2005 
[1]= string(10) 12/31/2005 } } } [faultstring]= string(300) 
[TeamworksException name='Process: 'HR Training Infomation' ProcessItem: 
'Untitled0' Type: 'ITEM'', message='Internal Script error: 
org.mozilla.javascript.WrappedException: WrappedException of ORA-01858: a 
non-numeric character was found where a numeric was expected ', line=-1, pos=-1 
nested=] [faultcode]= string(28) soapenv:Server.userException 
[detail]= string(0)  }

SoapFault exception: [soapenv:Server.userException] [TeamworksException 
name='Process: 'HR Training Infomation' ProcessItem: 'Untitled0' Type: 'ITEM'', 
message='Internal Script error: org.mozilla.javascript.WrappedException: 
WrappedException of ORA-01858: a non-numeric character was found where a 
numeric was expected ', line=-1, pos=-1 nested=] in 
/Library/WebServer/Documents/services/soap-test.php:17 Stack trace: #0 
/Library/WebServer/Documents/services/soap-test.php(17): 
SoapClient-__soapCall('execute', Array) #1 {main}


RE: [PHP] SOAP Problems SOLVED!

2006-01-10 Thread Jay Paulson \(CE CEN\)
I got it to work! What I had to do is make an associtive array with the keys 
being the name of the params that needed to get passed to the 'execute' method 
that it was calling via soap.  Or conversely you could write the $params as 
objects instead of an array.

Code below:

$params[From] = 06/01/2005; // also can use $params-From = date;
$params[to] = 12/31/2005; // also can use $params-to = date;

$client = new SoapClient(some.wsdl, array(trace = 1, exceptions = 0));

try {
print($client-execute($params));
} catch (SoapFault $exception) {
echo $exception;
}


-Original Message-
From: Jay Paulson (CE CEN) [mailto:[EMAIL PROTECTED]
Sent: Tue 1/10/2006 11:32 AM
To: php-general@lists.php.net
Subject: [PHP] SOAP Problems.
 
I'm trying to call a SOAP service where you pass it a couple of dates and it is 
supposed to return stuff.  My testing code is below along with the errors I'm 
getting.  What's strange is that it's not working in php but it works perfectly 
in Flash.  The request it is sending is only sending one param the $to value 
and not the $from value.  Any idea what's going on?

$from = 06/01/2005; // some date but what format?
$to = 12/31/2005; // some date but what format?

$client = new SoapClient(some.wsdl, array(trace = 1, exceptions = 0));

var_dump($client-__getFunctions());
echo brbr;
var_dump($client-__getTypes());
echo brbr;

try {
print($client-execute($from, $to));
} catch (SoapFault $exception) {
echo $exception;
}
$client-execute($from, $to);
print pre\n;
print Request :\n.htmlspecialchars($client-__getLastRequest()) .\n;
print Response:\n.htmlspecialchars($client-__getLastResponse()).\n;
print /pre;

var_dump($client-execute($from, $to));
echo brbr;

echo brbr;
print($client-__soapCall(execute, array(From = $from, to = $to)));



array(1) { [0]=  string(44) executeResponse execute(execute $parameters) }

array(2) { [0]= string(44) struct execute { string From; string to; } [1]= 
string(44) struct executeResponse { string wsReturn; } }

SoapFault exception: [soapenv:Server.userException] [TeamworksException 
name='Process: 'HR Training Infomation' ProcessItem: 'Untitled0' Type: 'ITEM'', 
message='Internal Script error: org.mozilla.javascript.WrappedException: 
WrappedException of ORA-01858: a non-numeric character was found where a 
numeric was expected ', line=-1, pos=-1 nested=] in 
/Library/WebServer/Documents/services/soap-test.php:9 Stack trace: #0 
/Library/WebServer/Documents/services/soap-test.php(9): 
SoapClient-__call('execute', Array) #1 
/Library/WebServer/Documents/services/soap-test.php(9): 
SoapClient-execute('06/01/2005', '12/31/2005') #2 {main}

Request :
?xml version=1.0 encoding=UTF-8?
SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:ns1=somensSOAP-ENV:Bodyns1:execute/param112/31/2005/param1/SOAP-ENV:Body/SOAP-ENV:Envelope

Response:
?xml version=1.0 encoding=UTF-8?
soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:xsd=http://www.w3.org/2001/XMLSchema; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 soapenv:Body
  soapenv:Fault
   faultcodesoapenv:Server.userException/faultcode
   faultstring[TeamworksException name=apos;Process: apos;HR Training 
Infomationapos; ProcessItem: apos;Untitled0apos; Type: 
apos;ITEMapos;apos;, message=apos;Internal Script error: 
org.mozilla.javascript.WrappedException: WrappedException of ORA-01858: a 
non-numeric character was found where a numeric was expected
apos;, line=-1, pos=-1 nested=lt;nonegt;]/faultstring
   detail/
  /soapenv:Fault
 /soapenv:Body
/soapenv:Envelope



object(SoapFault)#2 (9) { [message:protected]= string(0)  
[string:private]= string(0)  [code:protected]= int(0) 
[file:protected]= string(51) 
/Library/WebServer/Documents/services/soap-test.php [line:protected]= 
int(16) [trace:private]= array(2) { [0]= array(6) { [file]= string(51) 
/Library/WebServer/Documents/services/soap-test.php [line]= int(16) 
[function]= string(6) __call [class]= string(10) SoapClient 
[type]= string(2) - [args]= array(2) { [0]= string(7) execute [1]= 
array(2) { [0]= string(10) 06/01/2005 [1]= string(10) 12/31/2005 } } } 
[1]= array(6) { [file]= string(51) 
/Library/WebServer/Documents/services/soap-test.php [line]= int(16) 
[function]= string(7) execute [class]= string(10) SoapClient 
[type]= string(2) - [args]= array(2) { [0]= string(10) 06/01/2005 
[1]= string(10) 12/31/2005 } } } [faultstring]= string(300) 
[TeamworksException name='Process: 'HR Training Infomation' ProcessItem: 
'Untitled0' Type: 'ITEM'', message='Internal Script error: 
org.mozilla.javascript.WrappedException: WrappedException of ORA-01858: a 
non-numeric character was found where a numeric was expected ', line=-1, pos=-1 
nested=] [faultcode]= string(28) soapenv:Server.userException 
[detail]= string(0)  }

SoapFault exception: [soapenv:Server.userException] [TeamworksException 
name='Process: 'HR Training Infomation' ProcessItem: 'Untitled0' Type

RE: [PHP] CSS Switching

2006-01-09 Thread Jay Paulson \(CE CEN\)
Why don't you make a prit.php file that handles all the dynamic content and 
displays it with the CSS file you want.

jay


-Original Message-
From: Mike Tuller [mailto:[EMAIL PROTECTED]
Sent: Mon 1/9/2006 11:58 AM
To: php list
Subject: [PHP] CSS Switching
 
I am drawing a blank on how to go about doing this for some reason. I  
have a page that pulls info from a database, and I want to have a  
version for viewing, and a version fro printing. Since the data is  
dynamic, I need to keep the data, but be able to switch the  
stylesheet. Can someone give me a push in the right direction as to  
how they would go about this?

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



RE: [PHP] Dynamic Array Index using Variable

2006-01-09 Thread Jay Paulson \(CE CEN\)
You could use the isset() or the empty() functions.

http://us3.php.net/manual/en/function.empty.php
http://us3.php.net/manual/en/function.isset.php

But do you want to check all the fields that are being submitted or just 
specific ones that you set in the $reqfields array?  If you want to check all 
the submitted fields just run through the $_POST or $_GET arrays, depending on 
your form method.

jay


-Original Message-
From: Chris Lott [mailto:[EMAIL PROTECTED]
Sent: Mon 1/9/2006 2:31 PM
To: PHP General Mailing List
Subject: [PHP] Dynamic Array Index using Variable
 
I want to do something like this to check if a variety of submitted
form fields (crn, instructor, etc) have any value in them:

$reqfields = array('crn', 'instructor');
$errorflag = 0;

foreach ($reqfields as $field) {
if ($_REQUEST[$field] == '') {
$errorflag = 1;
}
}

But I can't quite get the syntax right... help??

c

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



[PHP] PHP and SOAP newbie questions

2006-01-09 Thread Jay Paulson \(CE CEN\)
I recently got handed a project that requires me to use PHP to talk to a WSDL 
SOAP service.  I'm not new to PHP but I am new to SOAP.  I have the basic idea 
of how SOAP works but still have a few questions I am hoping you all can answer 
for me.

Which library would be better to use?  NuSOAP or PEAR's SOAP library?

Someone else is writing the WSDLs that I need to access.  Does this mean that I 
just have to use a SOAP client to access the information or would I need to 
make a SOAP server?  I guess what I'm asking is what is the difference between 
a SOAP client and a SOAP server?

Lastly, do you all know of any good online tutorials I could check out that 
google may not suggest?

Thanks!
Jay


[PHP] Included php files in a cron job?

2006-01-06 Thread Jay Paulson \(CE CEN\)
I'm in the process of writing a PHP program that is going to be called once a 
week via a cron job.  I don't have a place to really test this hence the reason 
why I'm asking about it here.  My question is can my php program include other 
php files and still get executed correctly when the cron job runs?

For example:
#!/path/to/php
?php

require_once($file);

//do something

?

Will the code in $file work correctly when the cron job executes the php file 
that has something simular to what I have above?

Thanks!


[PHP] Converting IP Address to int value?

2006-01-06 Thread Jay Paulson \(CE CEN\)
I'm in the process of parsing through a apache access_log file and putting the 
information into a database.  Right now I have the ip addresses going into a 
database as a character format xxx.xxx.xxx.xxx and then later I'm creating my 
queries to search for ip addresses xxx.xxx.%, which I think is really 
ineffecient.  Therefore, I wanted to add a new field in my database which would 
be just an int value and have php convert the ip address to an int for database 
insertion.  Then have an sql query that would just convert that int back into 
an ip address if I needed.  My ultimate goal is to be able to write a query 
simular to this:

SELECT * FROM Apache_Stats WHERE int_ip BETWEEN INET_ATON('xxx.xxx.0.0') AND 
INET_ATON ('xxx.xxx.255.255')

Is there a function in PHP that will convert the xxx.xxx.xxx.xxx ip address to 
the same number that INET_ATON() is converting it to?  I know about ip2long() 
but in the PHP docs it doesn't convert right unles you use the printf(%u...) 
function.

Thanks!


[PHP] Parsing through an Apache Log File?

2006-01-04 Thread Jay Paulson \(CE CEN\)
Hello everyone!  I've been given the responsiblity of coding an apache 
access_log parser.  What my tasks are to do is to return the number of hits for 
certain file extensions that happen on certain dates with specific IP address.

As of now I'm only going back 7 days in the log looking for this information 
and I'm only looking for 5 file types (.doc, .pdf, .html, .php, and .flv).  I'm 
using the fgets() function so I can read the file line by line and do the 
matches that I need to do and increment the counters as needed.  Right now I 
have 3 loops looking for everything, which seems to me not to be the best way 
of doing this.  I've also encountered that a line may have the file extension I 
want but it's actually the soucre of another file.  (see below for example)

Log file example:
I want the first line but not the second line.  The second line has a .css file 
which was used by the .html file therefore I don't want this line.  I do want 
the first line that all it has is .html and no other files.

10.25.40.64 - - [01/Jan/2006:07:33:18 -0600] GET /home.html HTTP/1.1 200 8220 
- Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
10.25.40.64 - - [01/Jan/2006:07:33:18 -0600] GET /styles/redesign.css 
HTTP/1.1 200 2381 http://wfmu.wfm.pvt/home.html; Mozilla/4.0 (compatible; 
MSIE 6.0; Windows NT 5.1; SV1)

At any rate, here's some of my psudo code/code for what I'm trying to 
accomplish.  I know there has to be a better way for this and I'm looking for 
suggestions!


//path to log file
$path = ./;
//name of log file
$log_filename = access_log;

if (!file_exists($path.$log_filename)) {
echo file does not exists!;
die;
}

//open log file
if (!$handle = fopen($path.$log_filename, r)) {
echo error in loading file!;
die;
}

//get date range from past 7 days put into array for comparision of log file
$dates = array();
$days = 7;
for ($i=1;$i=$days;$i++) {
$dates[] = date(d/M/Y, strtotime(-$i day));
}

//get document types that need to match
$docs = array();
$docs[] = .doc;
$docs[] = .pdf;
$docs[] = .html;
$docs[] = .htm;
$docs[] = .php;
$docs[] = .flv;

$contents = ;
while (!feof($handle)) {
$line = fgets($handle);
//look to see if the line has a date we are looking for
foreach ($dates as $date) {
//if date is in the line look for the doc type we want
if (strpos($line, $date)) {
//look to see if the line has the doc type we want
foreach ($docs as $doc) {
//if the line has the doc type we want then 
grab the region
//and increment the counter for page hit
//make sure to break out of the loops once found
//need to add functionality for lines that have 
file extensions
//that are not wanted but also have file 
extensions that are wanted
if (strpos($line, $doc) {

break;  
} //end if
} //end foreach ($docs as $doc)
break;
} //end if
} //end foreach ($dates as $date)
}


//close log file
fclose($handle);

Thanks!
Jay


RE: [PHP] Parsing through an Apache Log File?

2006-01-04 Thread Jay Paulson \(CE CEN\)
Jay Paulson (CE CEN) wrote:
 Hello everyone!  I've been given the responsiblity of coding an apache 
 access_log parser.  What my tasks are to do is to return the number of hits 
 for certain file extensions that happen on certain dates with specific IP 
 address.
 
 As of now I'm only going back 7 days in the log looking for this information 
 and I'm only looking for 5 file types (.doc, .pdf, .html, .php, and .flv).  
 I'm using the fgets() function so I can read the file line by line and do the 
 matches that I need to do and increment the counters as needed.  Right now I 
 have 3 loops looking for everything, which seems to me not to be the best way 
 of doing this.  I've also encountered that a line may have the file extension 
 I want but it's actually the soucre of another file.  (see below for example)
 
 Log file example:
 I want the first line but not the second line.  The second line has a .css 
 file which was used by the .html file therefore I don't want this line.  I do 
 want the first line that all it has is .html and no other files.
 
 10.25.40.64 - - [01/Jan/2006:07:33:18 -0600] GET /home.html HTTP/1.1 200 
 8220 - Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
 10.25.40.64 - - [01/Jan/2006:07:33:18 -0600] GET /styles/redesign.css 
 HTTP/1.1 200 2381 http://wfmu.wfm.pvt/home.html; Mozilla/4.0 (compatible; 
 MSIE 6.0; Windows NT 5.1; SV1)
 
 At any rate, here's some of my psudo code/code for what I'm trying to 
 accomplish.  I know there has to be a better way for this and I'm looking for 
 suggestions!
snip

Save yourself a ton of work.  Dump the raw logs into a db, and you can 
do all the queries on the db.  Something like this...

CREATE TABLE `rawLogs` (
   `ipAddress` int(15) NOT NULL default '0',
   `rfcIdentity` varchar(32) NOT NULL default '',
   `apacheUser` varchar(32) NOT NULL default '',
   `date` int(15) NOT NULL default '0',
   `request` longtext NOT NULL,
   `statusCode` varchar(32) NOT NULL default '',
   `sizeBytes` int(11) NOT NULL default '0',
   `referer` longtext NOT NULL,
   `userAgent` longtext NOT NULL,
   KEY `ipAddress` (`ipAddress`),
   FULLTEXT KEY `search` (`request`,`referer`,`userAgent`)
) TYPE=MyISAM;

A few questions with this train of thought.  I can see the advantages of 
putting the raw log file into a database but I would still need to parse the 
file and get the information out of it for each column.  I'm also not quite 
sure what some of your feilds are for 'rfcIdentity'??  What is that?  Why would 
I need an 'apacheUser' also?  Anyway, not too sure how I would get this 
information in an easy way for the massive amounts of inserts I would have to 
do on a 10 meg log file.

jay


RE: [PHP] Parsing through an Apache Log File?

2006-01-04 Thread Jay Paulson \(CE CEN\)
Jay Paulson (CE CEN) wrote:
 Hello everyone!  I've been given the responsiblity of coding an apache 
 access_log parser.  What my tasks are to do is to return the number of hits 
 for certain file extensions that happen on certain dates with specific IP 
 address.
 
 As of now I'm only going back 7 days in the log looking for this information 
 and I'm only looking for 5 file types (.doc, .pdf, .html, .php, and .flv).  
 I'm using the fgets() function so I can read the file line by line and do the 
 matches that I need to do and increment the counters as needed.  Right now I 
 have 3 loops looking for everything, which seems to me not to be the best way 
 of doing this.  I've also encountered that a line may have the file extension 
 I want but it's actually the soucre of another file.  (see below for example)
 
 Log file example:
 I want the first line but not the second line.  The second line has a .css 
 file which was used by the .html file therefore I don't want this line.  I do 
 want the first line that all it has is .html and no other files.
 
 10.25.40.64 - - [01/Jan/2006:07:33:18 -0600] GET /home.html HTTP/1.1 200 
 8220 - Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
 10.25.40.64 - - [01/Jan/2006:07:33:18 -0600] GET /styles/redesign.css 
 HTTP/1.1 200 2381 http://wfmu.wfm.pvt/home.html; Mozilla/4.0 (compatible; 
 MSIE 6.0; Windows NT 5.1; SV1)
 
 At any rate, here's some of my psudo code/code for what I'm trying to 
 accomplish.  I know there has to be a better way for this and I'm looking for 
 suggestions!
snip

Save yourself a ton of work.  Dump the raw logs into a db, and you can 
do all the queries on the db.  Something like this...

I took your idea and did a search on Google and found that this has already 
been done for me!  Check it out!

http://www.php-scripts.com/php_diary/012103.php3

Very cool :)

jay


RE: [PHP] Parsing through an Apache Log File?

2006-01-04 Thread Jay Paulson \(CE CEN\)
 If this is just a one time thing you're looking to do, all of this may be 
 over the top.  However, if the bosses are going to want to review this data 
 month in and month out, I think the time spent doing something like this will 
 be worth it.

As of now I've got it working and inserting the data into the database!  I did 
see your code and since you are being so generious as to let me use it I'll 
probably tweak it (a very little bit!) as we are going to be using this script 
once a week to read the log files.  We are using it to get some numbers out of 
it so make our own custome stats thing based off of a lot more numbers that 
included this as part of the number getting.

Thanks so much for your help!

jay


[PHP] Question about including files and server load

2005-10-14 Thread Jay Paulson
I just started working with a new company and they handed me some of their
php code for me to look over.  I noticed that they have a TON of include
files being called into their scripts.  For example, instead of having one
file called functions.php and then having all their functions in that one
file they have put each function into it's separate file and then have a
define_functions.php file that creates each function.  However, within the
function itself it declared something like this:

function xyz($abc) { return include(xyz_func.php); }
function abc($xyz) { return include(abc_func.php); }

I was wondering isn't this putting a bigger load on a server by including
so many files for each function?  Also, I was wondering what everyone's
opinion was on this approach in terms of maintenance.  Do you think it's
better practice to put all your functions in one file or do it in this
manner?

thanks for any input!
jay

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



Re: [PHP] creating a login/registration/admin function/app

2005-09-10 Thread Jay Paulson

You might also take a look at the following.

http://phpgacl.sourceforge.net/

I know that's what Joomla (formly known as Mambo) is going to use in 
their 5.0 version.


jay


hi...

i'm in the process of looking for/creating a function to allow me to 
perform

user login/registration/etc, as well as handle a user admin function.

i'm looking for the following functionality:

user registration/login:
 -allow user to enter basic information
 -allow user to enter username/passwd
 -ensure unique username
 -email confirmation of user registration
 -password regeneration (forgot passwd)
 -handle forgot username/password
 -ip blocking
 -email blocking
 -security graphic verification (capcha??)
 -admin notification
 -aadmin enable/authorize
 -Session var generation on successful login
 -limit login attempts for invalid logins
 -ensure only single usage of login at a time
 -ensure that multiple logins of a login is
  within a geographic/IP range
 -IP/User tracking
 -captcha processing/implementation
 -

Admin functionality:
 -IP Tracking
 -IP blocking
 -User Management
 -User Enable/Disable function
 -User Auth/Verification function
 -User Email Function
 -User Password regeneration function
 -Site Mamagement
 -List Users
 -Track User Actions within site
 -Allow User to be a member of a given group
 -Create Groups
 -Assign User Roles/Groups
 -
 -
 -
 -

This is kind of a basic/starting point. I'm looking at a few CMS apps, 
but
i'm curious to know if you guys have seen any app (open source) that 
has

what i'm looking for...

I'm in the process of extracting the functionality from Mambo/phpBB and
adding some of what i need. Does anybody have any idea as to whether an
existing Open Source app is out here, that gives a good deal of this
functionality? Searching google turns up alot of scripts, but nothing 
that

really has what i'm after and that's free!!

Also, if i have to pretty much create this from scratch, is there 
anybody

who'd want to play the role of architect/test/reviewer??

thanks

bruce
[EMAIL PROTECTED]

--
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] Easier way to clean GET Variables ?

2005-08-29 Thread Jay Paulson

Can anybody point to a good resource of a collection of filtering for
common inputs such as those listed by Chris above?...

I've searched for that and generally found one of two things:

1. Nothing useful.
2. A system so baroque and complex and with so much other baggage, it
would be impossible to integrate.  See 1.

I'm looking more for code snippets or specific Regex functions for
each item, rather than a monolithic Borg-like filtering package and
have never one I liked.

That could be mostly my fault due to peculiar requirements, but there
it is.


I'd like to know this too.  As well as the examples are in this thread 
I don't think they handled multi dimensional arrays.  It'd be nice if 
they did. :)


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



[PHP] PHP Polling script?

2005-08-25 Thread Jay Paulson
Does anyone know of a good polling script that is, obviously, written 
in PHP?


Thanks!

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



Re: [PHP] PHP Polling script?

2005-08-25 Thread Jay Paulson

[snip]
Does anyone know of a good polling script that is, obviously, written
in PHP?
[/snip]

What are you polling?


It's for a contest so that people can come in and read about the people 
who are entered and then vote on which one they think should win.  I 
would like to at lease be able to restrict the polling by IP (using 
mysql) and maybe cookies as well.


There seems to be a ton of polling packages out there in php but I'm 
hoping someone on the list will have experience with one and can 
recommend it instead of myself having to sift through a ton of them. :)


thanks!

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



Re: [PHP] PHP vs. ColdFusion

2005-08-24 Thread Jay Paulson

I'm betting you'll have the SAME ISSUE, and that the problem has
NOTHING to do with PHP whatsoever.


And you'd win that bet. I thought that would be the proof I'd need to 
show that it wasn't PHP, but management has some notion that PHP might 
have somehow tainted IIS.


Gotta love a management group that doesn't listen to their IT guys and 
think they know the answer to all the IT problems even though they have 
no clue about IT.  I've been there done that and guess what?  I'm still 
doing it to this day.  I think it's one of those never ending things.  
What you should do is configure IIS to parse PHP with .asp extensions 
and just tell them that it's ASP.  Now that would be funny!



PHP works fine with IIS and Windows.


I've tried to tell the that there are Fortune 500 companies running 
PHP on Windows and IIS (there are, right?).


Target, Tickmaster, Yahoo, Amazon, and the list goes on and on.


I'll say it again:  There is *NOTHING* wrong with PHP and IIS.


I agree. Unfortunately, I have to prove that to them before they'll 
look elsewhere for the problem. Ugh.


Sounds like to me you are getting to the point where you just need to 
slap them! ;-)



In fact, you could probably get ahold of a Padcom and prove it to
yourself in a days' work, and then get them to agree that if it's not
PHP nor your script that's broken, but Windows+IIS, then maybe they
should just leave the WORKING stuff alone.

Probably won't work.

But that's how office politics work.


Exactly what I'm finding out.


Or you could leave IIS on the Windows machine and install Apache on the 
same Windows box and run PHP using Apache on Windows and see if that 
solves your problem.  Then of course don't tell management that you are 
running Apache! ;-)


On a serious note something that might change their mind (this is what 
I did).  Go do some research about real stories of companies dealing 
with Windows+IIS and the hard ships they have encountered and why they 
switched to something else.  I'm sure getting stats on how many more 
times you are likely to get hack attempts with a Windows+IIS vs. an 
Linux+Apache is out there some where.  I'm sure that's a pretty 
startling surprise.  If management cares at all about security and the 
up time of their applications etc then they won't be able to ignore 
facts that have already happened.


Then again I've pointed out security flaws in code and server setup at 
a company I work for in which their computer security, if broken into, 
could cost the business to go under and what have they done?  Nothing.  
When did I point this out to them?  8 months ago.  Do I continue to bug 
them and show them what kind of damage I can do to their organization?  
Yep.  Do they know because of this they could lose millions of dollars 
and lose high profile contracts?  Yep.  Do they listen and do anything 
about it?  Nope.  *shrug*  There's only so much you can do with people 
who have a one track mind and refuse to see what you are showing them.


Anyway, sorry for the tangent!  Good luck convincing management!

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



Re: [PHP] PHP vs. ColdFusion

2005-08-24 Thread Jay Paulson

I've tried to tell the that there are Fortune 500 companies running
PHP on Windows and IIS (there are, right?).


Target, Tickmaster, Yahoo, Amazon, and the list goes on and on.


Not too sure about this:

http://uptime.netcraft.com/up/graph?site=amazon.com
http://uptime.netcraft.com/up/graph?site=ticketmaster.com

etc
PHP, possibly, but not on IIS and Windows.


I remember at OSCON a couple years ago they said that amazon and 
ticketmaster where using PHP.  They might just hide it well or they 
might be using it for smaller applications within the company.


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



Re: [PHP] Looking for CMS advice

2005-08-23 Thread Jay Paulson
Everyone has already told you about opensourcecms.org, which is a 
really good site to test things out.  However, about 6 months ago I had 
to do research for the same kind of thing.  As of now with the split of 
the Mambo dev team from the parent company Miro I think I would go with 
Dupral because who knows when Mambo or whatever the fork of Mambo by 
the dev team is going to back on it's feet again.  Even with that said 
I've been working with Mambo for about 6 months as well and I must say 
it's the easiest CMS that I have ever worked with.  The 
component/module coding is a no brainer and the documentation is pretty 
good (it was getting better but with the dev team gone who knows).  At 
any rate I would say check out Dupral, Mambo, and XOOPS.  Then decide 
what you need and which one has the most features that you need.  I 
choose Mambo for the fast development of customization of features, the 
huge community (that now seems split), and the vast number of 3rd party 
modules that have already been written. :)


On Aug 21, 2005, at 6:16 AM, Zachary Kessin wrote:

I am about to start on a project that seems like it would be right for 
a CMS system. It will be about 80% rather boring stuff with about 20% 
custom database work. I have looked at XOOPS and a few others. However 
I can not seem to find one rather important thing about XOOPS. I 
understand how to use a module that someone else wrote, but I have not 
found any documentation on how to build my own blocks or application 
components.


I am not yet committed to XOOPS, so if there is different system that 
would be better that could work as well


--Zach

--
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 vs. ColdFusion

2005-08-23 Thread Jay Paulson
Ugh, we're *never* going to make a decision. My boss just sent me 
this email:


A *huge* THANK YOU! to everybody who replied; it was extremely 
helpful and, after my meeting with my manager this morning, she seemed 
to accept that the article was dated and had inaccurate information.


Thanks for the update!

Unfortunately, I may be fighting an uphill battle. I'll give 
background for those who seemed interested in our progress, but it's 
pretty long, so feel free to delete this and move on to your regularly 
scheduled messages (though I'm secretly hoping that someone will have 
helpful information or suggestions).


I wrote an application, using PHP5, that displays a list and refreshes 
every 30 seconds (the data is constantly changing, but a 30 second 
delay is acceptable). As I've indicated previously, we're a Microsoft 
shop, so the data comes from MS SQL Server 2000. No problems, the app 
worked great using my workstation as the server with a few clients 
running the app from it. It even worked when we moved it to a server 
and opened it up to everyone on our intranet (for a while).


We set the application up on a Windows 2000 Server with IIS (5, I 
think), and it would work fine for about a day. Then Padcom clients 
kept stopping. They'd request the page and, after a loong time, 
display a message that the request timed out. This would seemingly 
happen for all Padcom-connected clients at the same time, though the 
desktops continued to work fine. We restarted the server running the 
Padcom software with no effect. We restarted IIS on the web server 
with no effect. The only thing (seemingly) that cleared the issue was 
rebooting the server running IIS.


Have you tried PHP 4.x?  Give that a shot and see what effects that has 
on the application.


I spent a day and a half looking at the issue with the network and 
server administrators, but nobody could find where the problem was. 
So, we moved it to a Windows 2003 Server with IIS 6; same problem. On 
my own, I set up a linux server with apache and placed the application 
there. They changed the DNS record to point to the linux server, and 
it has run flawlessly ever since (53 days, 22 hours, 11 minutes). 
Nobody has mentioned changing anything, until this morning. My manager 
informed me in our meeting that no language could be chosen unless it 
works under IIS.


You might want to post the code for your application on the list so we 
all can see it (remember to remove usernames, passwords, and ip #'s).  
It's too bad  you have to use Windows and IIS.  Just curious but why 
are they not wanting to use Linux?  Do they know it's free and way less 
likely to be attacked?


Also, I'm sure there are people on this list that are experienced with 
Windows and IIS that can help you determine if something with the setup 
of it needs to be changed in order for your code to work.


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



Re: [PHP] php as standalone?

2005-08-23 Thread Jay Paulson
This is pretty cool stuff!  This is compiled code for Windows only so 
no source is available?  Therefore, making it so that people can't view 
your source?


Damn... you said those words cross platform..  But I'll still take 
this opportunity to plug Winbinder again.   If you're just working 
with a Windows platform, Winbinder has it all!Fantastic interface, 
very self contained, just a great PHP standalone/app/etc extension all 
around.


Eh.. check it out anyway.  :)
http://www.hypervisual.com/winbinder/

-TG

= = = Original message = = =

Hi there,



I am going to take that chance now to ask if it is viable to create a
standalone app with php and gtk+, fully realizing that this IS the php 
list

;-)

I was thinking of php/gtk+ because I need that as a cross-platform
application. What I really would like is to have .rpm's and .exe's 
created,
so one can include them in the OS startup. Is this possible at all 
with php?

Has anyone worked with php to create standalone apps?



I essentially want to be able to auto update and synchronize a local 
xml
based database with an online one (ok, plus doing some viewing and 
creating

of reports, and so on, and so forth . )



Alternatives could be: mono, qt (arrgh), mozilla/xul (any done that?) 
or

Java :-( .



Any thoughts on that?



Thomas


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.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



[PHP] Special HTML characters question.

2005-08-22 Thread Jay Paulson
I have a problem that I'm sure some of you have run into before, 
therefore I hope you all know of an easy solution.  Some of my users 
are cutting and pasting text from Word into text fields that are being 
saved into a database then from that database being displayed on a web 
page.  The problem occurs when some special characters are being used.  
Double quotes, single quotes, and other characters like accents etc 
have the special html code like quote; etc replacing the special 
characters.  What methods are being used to combat this issue?  Is 
there a solution out there to run text through some sort of filter 
before submitting it to the database to look for these special 
characters and then replacing them?


Thanks for any help,
Jay

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



Re: [PHP] Special HTML characters question.

2005-08-22 Thread Jay Paulson

Thanks for the reply.

I would imagine there are a lot of special html characters that would 
need to be changed using regex.  Therefore, spending my time making a 
regex to find a replace each one of them isn't a good way to spend my 
time or even if I did go that route I'm sure it's uses too much system 
resources to search for and replace all the characters.  The reason I 
say that is what if a user does a search on the database and the 
database is filled with all these special characters.  Sure I could 
htmlspecialchars() the string that is passed to the search and then run 
the sql to the DB for the query.  However, does htmlspecialchars() 
account for all special characters?  Then you have to account for the 
extra space the htmlspecialchars() is going to put in your DB and other 
issues that might arise from that.


Does anyone know the common practice for this?  Or is it just 
preference?


Thanks,
jay

On Aug 22, 2005, at 8:42 AM, Jay Blanchard wrote:


[snip]
I have a problem that I'm sure some of you have run into before,
therefore I hope you all know of an easy solution.  Some of my users
are cutting and pasting text from Word into text fields that are being
saved into a database then from that database being displayed on a web
page.  The problem occurs when some special characters are being used.
Double quotes, single quotes, and other characters like accents etc
have the special html code like quote; etc replacing the special
characters.  What methods are being used to combat this issue?  Is
there a solution out there to run text through some sort of filter
before submitting it to the database to look for these special
characters and then replacing them?
[/snip]

Start here http://www.php.net/htmlentities . You can also use any 
number

of REGEX functions for replacing them http://www.php.net/regex




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



Re: [PHP] Special HTML characters question.

2005-08-22 Thread Jay Paulson

by the way, you probably don't want to do the conversion *inbound* to
the database. rather, store the original and do the conversion outbound
- specific and appropriate for the output display.

if you do it inbound you'll have the html encodings (rather than the
actual (special) characters) stored in your database. then, if you
have need to do output as say plain text (as opposed to html) you'll
have to unconvert the encodings.


Totally understand this and agree with you 100%  However,


what you may want to do inbound is to convert os/application-specific
characters, e.g., smart quotes, to more standard representations.


wouldn't this be a headache?  Considering I don't know what OS my users 
are going to be using?


Ack!  I hate dilemmas. :)

Thanks for the reply!




 Original Message 

Date: Monday, August 22, 2005 08:42:14 AM -0500
From: Jay Blanchard [EMAIL PROTECTED]
To: Jay Paulson [EMAIL PROTECTED], php-general@lists.php.net
Subject: RE: [PHP] Special HTML characters question.

[snip]
I have a problem that I'm sure some of you have run into before,
therefore I hope you all know of an easy solution.  Some of my users
are cutting and pasting text from Word into text fields that are being
saved into a database then from that database being displayed on a web
page.  The problem occurs when some special characters are being used.
 Double quotes, single quotes, and other characters like accents etc
have the special html code like quote; etc replacing the special
characters.  What methods are being used to combat this issue?  Is
there a solution out there to run text through some sort of filter
before submitting it to the database to look for these special
characters and then replacing them?
[/snip]

Start here http://www.php.net/htmlentities . You can also use any
number of REGEX functions for replacing them http://www.php.net/regex

--
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 vs. ColdFusion

2005-08-22 Thread Jay Paulson
I've been coding in PHP since version 3 and I actually sold a 
telecommunications company to use it for their HUGE intranet back in 
2000 (right before they went out of business in North America).  They 
wanted to use Java and I talked them out of it for the simple fact that 
PHP was so easy to use and ease to develop.  The learning curve for PHP 
vs. Java IMO was 10 times faster especially if you had people coming on 
board that didn't really know OOP that well.  PHP was the perfect 
environment for people who do not have a lot of experience to learn a 
language really fast.  Even working in it now for 5 years becoming I 
guess you could say an expert in PHP I find that really experienced 
people in PHP can fly through code and create huge applications in no 
time.  Even those who have been programming in another language pick up 
PHP in just a matter of days and begin to fly around it creating things 
very quickly.  Out of all my developer friends those who know PHP love 
it because it is so easy.  I have never once heard of an application 
becoming too complex because of it's ease.  That to me is just silly 
ignorant talk.   The guy who wrote that article about PHP obviously 
don't know what he is doing and I would argue he was hired by Microsoft 
to write something against it because as John Pina Craven said, 
innovation is the enemy of the status quo - it puts people out of 
business. :)


You'll have to let us know what the final decision is.

jay

On Aug 22, 2005, at 1:16 PM, Rick Emery wrote:


Quoting Rick Emery [EMAIL PROTECTED]:

My employer has (finally) decided to take full advantage of our 
intranet, and wants to move from client-server applications to 
web-based applications.


[snipped]

Any input would be greatly appreciated. Opinions are welcome 
(especially from programmers with experience in both), but I have to 
sell it to management (I'm already on the PHP side), so links to 
data or articles comparing the two are best.


Ugh, we're *never* going to make a decision. My boss just sent me this 
email:


I read the following article and I wanted your feedback on it. 
http://www.ukuug.org/events/linux2002/papers/html/php/#section_6. I 
have read enough articles to know that the author can slant things one 
way or another depending on their personal preferences. I am off to my 
Dr?s appointment but I would like to discuss this with you when we 
both get a chance. The last two sections are the primary concern. I do 
know the article was written 3 years ago and that may have impact as 
well.


Anybody care to provide words of wisdom to me before I meet with her? 
I hate doing this, as I'm sure everybody has better things to do, but 
I *really* want to sell PHP.


Thanks in advance,
Rick
--
Rick Emery

When once you have tasted flight, you will forever walk the Earth
with your eyes turned skyward, for there you have been, and there
you will always long to return
 -- Leonardo Da Vinci

--
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] fopen for http://

2005-05-27 Thread Jay Paulson

Hello all-

I was wondering if anyone knew of a way to call a web site using fopen. 
 Let me tell you how things are set up and what I'm trying to do.  I 
can call fopen to read a site and then echo it back out.  That's not a 
problem.  The problem I run into is when I try to go to a restricted 
area of a site.


For example, in my Apache httpd.conf file I have it set up to where I 
have a directory that is only accessible from certain IP addresses, one 
of which is 127. (the localhost).  The script I'm running is located on 
the server and the web site I'm trying to access via fopen() is on the 
same server.  Therefore, I'm thinking that the php script should have 
access to read the site's restricted directory.  For some reason it 
does not have access.


I was wondering if there was a way around this or am I just doomed to 
never be able to access the directory via 
fopen(http://someurl.com/somedirectory,r;); ??


Thanks.
Jay

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



[PHP] Fwd: fopen for http://

2005-05-27 Thread Jay Paulson

Hello all-

I was wondering if anyone knew of a way to call a web site using fopen. 
 Let me tell you how things are set up and what I'm trying to do.  I 
can call fopen to read a site and then echo it back out.  That's not a 
problem.  The problem I run into is when I try to go to a restricted 
area of a site.


For example, in my Apache httpd.conf file I have it set up to where I 
have a directory that is only accessible from certain IP addresses, one 
of which is 127. (the localhost).  The script I'm running is located on 
the server and the web site I'm trying to access via fopen() is on the 
same server.  Therefore, I'm thinking that the php script should have 
access to read the site's restricted directory.  For some reason it 
does not have access.


I was wondering if there was a way around this or am I just doomed to 
never be able to access the directory via 
fopen(http://someurl.com/somedirectory,r;); ??


Thanks.
Jay

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



[PHP] PHP on a .NET enviroment machine: Conflicts?

2003-09-10 Thread Jay Paulson
Quick question to the community here.  The company I work for got bought out and now 
they are wanting to migrate all the web sites that I have created in PHP to their 
Windows, IIS, .NET enviroment.  I have been trying to talk to the people at corporate 
about putting PHP on their Windows machines but they are reluctant saying the 
following:

An additional complication we discussed here is the fact that our servers are set up 
as pure a .NET environment. While we could add PHP to it. It could create conflicts 
that would effect the entire system. We have had this problem with Cold Fusion in the 
past.

My question is... has anyone put both PHP and .NET in a Windows enviroment at the same 
time and had any conflicts?  I have done it several times before and have not run into 
any problems.  I really want to continue to run some of the PHP things that I have on 
the sites (i.e. message forums, chats etc) but I really need to know if anyone has run 
into any conflicts.  

As far as I know they are running Windows 2000 and IIS 6 on their machines.

Thanks for any feedback!

[PHP] Opinions on Micro$oft .NET

2003-07-31 Thread Jay Paulson
I know this is a little off topic but I really need some help with this.  

The company I work for just got bought out by a larger company.  The larger company 
uses .NET from Micro$oft. I of course use all open source stuff for our web sites and 
now the new company wants to come in and pretty much blow away everything I have done 
and use their .NET setup.

I've basically got a month to do research and get my guns loaded for what I'm sure 
will be a heated debate about the Open Source Solution vs the Micro$oft .NET solution. 
 So what I am looking for is personal and professional opinions about both solutions 
(specifically PHP etc), any and all links to good articles about both solutions giving 
the pros and cons of both technologies.  Any other mailing lists I can get on to get 
more opinions about the two technologies.  Are their any links to show the cost 
benifits of using Open Source vs Micro$oft .NET? (I know Open Source is free but I 
have no clue where to find how much .NET is).

As you can see any and everything would be a great help!!!

Thanks a ton!

[PHP] Return Character in a Text File?

2003-03-27 Thread Jay Paulson
I have a slight problem.  Is there anyway to make a text file with a return character 
that doesn't show up in windows notepad as a gibberish character and actually puts a 
return in it?  Right now I'm using the \n for the return but it doesn't get read in 
notepad as a return so the string data is one long line instead of multiple lines.  Is 
there any other way of doing this?

Code I am using:
$data = ;
//loop
$data .= $firstName, $lastName, $email, $gender, $bday, $phone, $zip,\n;
//end of loop

Thanks!

[PHP] is this correct? regular expressions

2003-03-25 Thread Jay Paulson
just trying to say if $phone isn't all numbers set it to all zeros.. so is that right? 
cause i can't seem to get it to work.

   if (!ereg(^[0-9]$,$phone)) {
$phone = 00;
   }

thanks!

[PHP] Saving a file as ASCII?

2003-03-20 Thread Jay Paulson
Quick question... when saving a file using the fwrite() function in a Unix
enviroment as a text file does it get saved as ASCII???

Thanks.


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



[PHP] Directory Permissions?

2003-02-26 Thread Jay Paulson
I was running fileperms() function to find out what a directory is chmod'ed
to.  However, this doesn't return anything because it has to check a file.
My question is there a function that will return what a directory is
chmod'ed to?

Thanks!
Jay


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



Re: [PHP] dreading OOP

2003-01-21 Thread Jay Paulson
The easiest way for me to explain and understand OOP was to think of it this
way.

You have an object and in that object contains functions that only pertain
to that one object.  See diagram below.

Object1
|
|_ function1
|
|_ function2
.
.
 etc

Object2
|
|_ function1
|
|_ function2
.
.
 etc

Note:  Inside an object you can have functions that have the same name as
other functions inside another object.  This makes life really easy if you
have to share code with someone because if you are totally
procedural/functions you might have some functions with the same name and
then your code won't work.  However, if you place your functions inside an
object you can avoid this problem all together.. kind of nice isn't it? :)

Anyway, that's how I explain OOP in a nutshell to people that don't
understand.  Just don't forget there are a TON of other things about OOP but
once you get the basic idea of how it works down (like this) then the rest
is pretty easy to pick up and understand.

Hope this helps!

- Original Message -
From: Larry Brown [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Tuesday, January 21, 2003 11:31 AM
Subject: RE: [PHP] dreading OOP


 The only reason I feel the need to expand my understanding is that I have
to
 learn other concepts to produce my client's solutions.  For instance I am
 now being asked to use SOAP to communicate with a vendor of his.  Now I am
 reading about SOAP and frequently the descriptions rely on the reader's
 understanding of OOP.  I can individually scrutinize a description and
break
 it down to its elements.  Then I can picture what is being said, but
without
 having used those methods in my code, it is frustrating reading.  I don't
 know that SOAP is in and of itself OOP but people that write about it use
 OOP based consepts to exlain what is happening.  And this is one example.
 Don't let me go into the Java and Javascript world!

 Larry S. Brown
 Dimension Networks, Inc.
 (727) 723-8388

 -Original Message-
 From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 21, 2003 10:40 AM
 To: PHP List
 Subject: RE: [PHP] dreading OOP


  -Original Message-
 
 However, my mind apparently works different and I keep trying to relate
the
 OOP structure to
  what I already know which equates an object to a function.  I am
resolving

  to purchase a book dedicated to instruction in the inns and outs of OOP.
  Specifically at it relates to PHP would be great but my emphasis is
 towards
  something that teaches someone that is stubborn in his reliance on
 previously learned
  methods.  I hope this makes sense and I'm not alone on this. :)

 My only suggestion is that you re-consider why you want to take up OOP. If
a
 procedural approach works for you, go with it. It's not like we're
building
 air traffic control systems here ;)

 Kirk

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



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


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




Re: [PHP] Detecting resolution

2003-01-21 Thread Jay Paulson
You have to use JavaScript for this.

Sorry! but i've asked the same question on here a long time ago :)

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 21, 2003 11:22 AM
Subject: [PHP] Detecting resolution


 Does anyone know how to detect the resolution of someone's computer? Or is
 this possible through 'browscapping'?

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

2002-04-08 Thread Jay Paulson

Hello everyone.

I'm uploading an image, resizing it, then base64_encoding it to put the
image into a data base.. then when I view it out of the data base using the
base64_decode function it looks horrible.

Below is the original image off of IMDB.com
http://us.imdb.com/ImageView?u=http%3A//images.amazon.com/images/P/B5K3O
4.01.LZZZ.jpg

And here is the image I get after the resize etc.
http://www.dvdfuture.com/image.php?id=95

I'm using imagejpeg with the quality set to 90 so I really don't know why
it's looking so badly.

Thanks,
Jay

ps phpinfo is at the following URL
http://www.dvdfuture.com/tests/testphp.phtml


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




Re: [PHP] Image Question

2002-04-08 Thread Jay Paulson

I'm putting it in the database because it's easier to handle that way, my
site doesn't get too much traffic so it's not that big a load, and the files
are usually between 2-8k which is tiny and the server should be able to
handle that.  Anyway, I have to resize the image because some of my writers
don't know the first thing about image editing and can't resize the image
themselves.

- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: 'Jay Paulson' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, April 08, 2002 5:19 PM
Subject: RE: [PHP] Image Question


 First, why store it in a database?  Why not store it as a separate file,
 then store pointer/file-name to it in database?

 If you do want it in the database (may I assume mysql?), then INSERT/LOAD
 the file directly into the field without conversion.

 -Original Message-
 From: Jay Paulson [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 08, 2002 5:20 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Image Question


 Hello everyone.

 I'm uploading an image, resizing it, then base64_encoding it to put the
 image into a data base.. then when I view it out of the data base using
the
 base64_decode function it looks horrible.

 Below is the original image off of IMDB.com

http://us.imdb.com/ImageView?u=http%3A//images.amazon.com/images/P/B5K3O
 4.01.LZZZ.jpg

 And here is the image I get after the resize etc.
 http://www.dvdfuture.com/image.php?id=95

 I'm using imagejpeg with the quality set to 90 so I really don't know why
 it's looking so badly.

 Thanks,
 Jay

 ps phpinfo is at the following URL
 http://www.dvdfuture.com/tests/testphp.phtml


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

2002-04-08 Thread Jay Paulson

Well my host had GD 2.0 or higher installed.  Wonder if there is something
I need to ask my host about the package they have installed?

- Original Message -
From: Kevin Stone [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 08, 2002 5:36 PM
Subject: Re: [PHP] Image Question


 Could it be you're unwittingly converting the graphic into 8bit color?
 That's certainly what it looks like.  I've read that older versions of PHP
 and GD library don't always translate color depth.  I don't have much
 experience programming graphics in PHP but I thought I'd offer up this
 possiblity. Hope it helps. -Kevin

 - Original Message -
 From: Rick Emery [EMAIL PROTECTED]
 To: 'Jay Paulson' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, April 08, 2002 4:19 PM
 Subject: RE: [PHP] Image Question


  First, why store it in a database?  Why not store it as a separate file,
  then store pointer/file-name to it in database?
 
  If you do want it in the database (may I assume mysql?), then
INSERT/LOAD
  the file directly into the field without conversion.
 
  -Original Message-
  From: Jay Paulson [mailto:[EMAIL PROTECTED]]
  Sent: Monday, April 08, 2002 5:20 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Image Question
 
 
  Hello everyone.
 
  I'm uploading an image, resizing it, then base64_encoding it to put the
  image into a data base.. then when I view it out of the data base using
 the
  base64_decode function it looks horrible.
 
  Below is the original image off of IMDB.com
 

http://us.imdb.com/ImageView?u=http%3A//images.amazon.com/images/P/B5K3O
  4.01.LZZZ.jpg
 
  And here is the image I get after the resize etc.
  http://www.dvdfuture.com/image.php?id=95
 
  I'm using imagejpeg with the quality set to 90 so I really don't know
why
  it's looking so badly.
 
  Thanks,
  Jay
 
  ps phpinfo is at the following URL
  http://www.dvdfuture.com/tests/testphp.phtml
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 



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


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




[PHP] Displaying Image with PHP

2002-03-29 Thread Jay Paulson

Hello--

I can't quite seem to get this to work.  What I'm trying to do is pull data
out of a MySQL db of an image that I had put into the db.  When I originally
put the image into the db I had to use the addslashes function so that it
would be inserted into the db correctly.  Now when I select the data out of
the db I do stripslashes on the file data.  However, I still get a broken
image in my test page.  So I included the code I'm using below.  the only
ting that I can think of (it actually just popped into my head) is for a 50k
file how big would the table have to be? I'm currently using the field type
of mediumtext which should be enough.

Thanks for any help!
jay

===
$query = SELECT filename, filedata, dateline FROM reviews where id=$id;
$results = dbQuery($query);

$filedata = stripslashes($results[rowData][FILEDATA][0]);
$filename = $results[rowData][FILENAME][0];

if (strstr($HTTP_USER_AGENT,MSIE)) {
  $attachment = '';
} else {
  $attachment = ' atachment;';
}

header(Cache-control: max-age=31536000);
header(Expires:  . gmdate(D, d M Y H:i:s,time()+31536000) . GMT);
header(Last-Modified:  . gmdate(D, d M Y
H:i:s,$results[rowData][DATELINE][0]) . GMT);
header(Content-disposition:$attachment filename=$filename);
header(Content-Length: .strlen($filedata));
$extension=strtolower(substr(strrchr($filename,.),1));

if ($extension==gif) {
  header(Content-type: image/gif);
} elseif ($extension==jpg or $extension==jpeg) {
  header(Content-type: image/pjpeg);
} elseif ($extension==png) {
  header(Content-type: image/png);
} elseif ($extension==pdf) {
 header(Content-type: application/pdf);
} else {
  header(Content-type: unknown/unknown);
}
echo $filedata;


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




[PHP] Compile problems php 4.1.1

2002-01-14 Thread Jay Paulson

I'm trying to compile php 4.1.1 and when it gets to the --with-apxs option it errors 
out with the following:

Sorry, I was not able to successfully run APXS.  Possible reasons:

1.  Perl is not installed;
2.  Apache was not compiled with DSO support (--enable-module=so);
3.  'apxs' is not in your path.  Try to use --with-apxs=/path/to/apxs
The output of apxs follows
./configure: apxs: command not found

I've run the httpd -l command and I have the mod_so.c configured into apache as you 
can see below

Compiled-in modules:
  http_core.c
  mod_so.c
suexec: enabled; valid wrapper /usr/sbin/suexec

I then tried to find the apxs file on my machine and well it returns nothing.  Does 
anyone have any ideas on what I can do?

Thanks..





[PHP] php as cron

2001-12-10 Thread Jay Paulson

I'm trying to test php running as a cron job and I have installed php as a CGI in 
/usr/local/bin and I have edited my crontab file to call a php file every two minutes. 
 However, it's not working and I was wondering if you all would know what's going on.  
Anyway, here's how I have things set up.

crontab file:
*/2 * * * * php /home/crontest.php  /dev/null

crontest.php:
#!/usr/local/bin/php -q
?php
mail([EMAIL PROTECTED],cron test, testing,NULL);
?

email I'm receiving with error:
Subject: Cron  php /home/crontest.php  /dev/null
Body: /bin/sh: php: command not found

thanks for any help.



Re: [PHP] php as cron

2001-12-10 Thread Jay Paulson

I was wondering how to disable the auto email after the cron job is done.
How exactly do you disable it?

thanks for the help btw!

- Original Message -
From: Shane Wright [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 10, 2001 12:47 PM
Subject: Re: [PHP] php as cron


 Hi

 You probably need to set the path to your PHP binary in crontab.

 Alternatively (this is probs a better way), wrap the whole lot up in a
simple
 shell script and get cron to run the shell script.

 It's easier than it sounds...

 #!/bin/bash
 cd /path/to/php/scripts
 php  myscript.php  /dev/null

 (also, I tend not to have PHP direct output to /dev/null, but to configure
 cron not to send emails on completion - that way you get the info when you
 run the script on the command line but dont get overrun with pointless
emails)

 Hope that helps :)

 --
 Shane

 On Monday 10 Dec 2001 5:54 pm, Jay Paulson wrote:
  I'm trying to test php running as a cron job and I have installed php as
a
  CGI in /usr/local/bin and I have edited my crontab file to call a php
file
  every two minutes.  However, it's not working and I was wondering if you
  all would know what's going on.  Anyway, here's how I have things set
up.
 
  crontab file:
  */2 * * * * php /home/crontest.php  /dev/null
 
  crontest.php:
  #!/usr/local/bin/php -q
  ?php
  mail([EMAIL PROTECTED],cron test, testing,NULL);
  ?
 
  email I'm receiving with error:
  Subject: Cron  php /home/crontest.php  /dev/null
  Body: /bin/sh: php: command not found
 
  thanks for any help.

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


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




Re: [PHP] php as cron

2001-12-10 Thread Jay Paulson

I don't want to use lynx to run the script because I don't want this script
accessible through a web browser :)

- Original Message -
From: [EMAIL PROTECTED]
To: Darren Gamble [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, December 10, 2001 1:12 PM
Subject: RE: [PHP] php as cron



 Why not just use lynx to run it?

 */2 * * * * /usr/local/bin/lynx -dump crontest.php

 JR


  On Monday 10 Dec 2001 5:54 pm, Jay Paulson wrote:
   I'm trying to test php running as a cron job and I have installed php
as a
   CGI in /usr/local/bin and I have edited my crontab file to call a php
file
   every two minutes.  However, it's not working and I was wondering if
you
   all would know what's going on.  Anyway, here's how I have things set
up.
  
   crontab file:
   */2 * * * * php /home/crontest.php  /dev/null
  
   crontest.php:
   #!/usr/local/bin/php -q
   ?php
   mail([EMAIL PROTECTED],cron test, testing,NULL);
   ?
  
   email I'm receiving with error:
   Subject: Cron  php /home/crontest.php  /dev/null
   Body: /bin/sh: php: command not found
  
   thanks for any help.
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


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


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




[PHP] file system question

2001-10-24 Thread Jay Paulson

Hello-

I'm trying to write a php script that creates a directory and then copies
uploaded files to that directory.  That isn't hard but what is hard is the
fact that the script tells me that i do not have permission to do any of
these actions.  I'm running red hat 7.1 and I have heard things about SetUID
and sticky bits, however since I'm pretty much still a novice at linux I'm
not too sure what to do.  The script is running under the username Apache
any ideas?

thanks..
jay


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




[PHP] anyone have...

2001-10-23 Thread Jay Paulson

anyone have a function that strips out all the characters in a string that
are no a-z or A-Z?

thanks...


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




[PHP] Getting the right hour?

2001-10-03 Thread Jay Paulson

I am trying to get the right hour using php's date() function.  However, I
don't know how to set the clock on my redhat machine via command prompt.  I
keep getting 18 for the hour and it should be 17.  Anyone know how to set
the time on the machine correctly?

Thanks,
jay


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




[PHP] quick question.

2001-09-26 Thread Jay Paulson

I was just wondering if I could call some functions out side of the class
I'm making?  The reason why I want to do this is so that I don't have to
rewrite the functions as methods in the class and I don't want to get too
far into what I'm doing before I find out it doesn't work.

Thanks,
Jay


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




[PHP] htmlspecialchars() backwards?

2001-09-25 Thread Jay Paulson

hello-

Is there a built in function that will reverse what htmlspecialchars() does
to text?
For example:

$text = stuff  goes here\ and \' there;
$text = htmlspecialchars($text);

//now all the special codes are in the $text var for the html and now I want
to get
//back to the orignal string of stuff  goes here\ and \' there how do
I do that?

$text = (some function here)($text);

I hope you understand if not I'll explain more.

Thanks!
jay


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




[PHP] Screen Resolution in PHP?

2001-09-24 Thread Jay Paulson

Is there a way to get the client's screen resolution in php?


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




Re: [PHP] Screen Resolution in PHP?

2001-09-24 Thread Jay Paulson

ACK! Just saw a post that answered this question. Sorry bout this post
should have checked with archives first.

- Original Message -
From: Jay Paulson [EMAIL PROTECTED]
To: php list [EMAIL PROTECTED]
Sent: Monday, September 24, 2001 10:50 AM
Subject: [PHP] Screen Resolution in PHP?


 Is there a way to get the client's screen resolution in php?


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



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




Re: [PHP] Sessions just don't work on my machine. (Trying this again)

2001-09-24 Thread Jay Paulson

I had the exact same problem.. don't know if you had this advice yet or not
but what I did is when I started a session I would grab the session id for
that session and put it in a variable and then just pass that session id
everywhere I went.. turn on the trans_id or add the session id to the end of
every link so it gets pass throughout all the links/forms you have on the
site.

start_session();
$SID = session_id();

That's what I do and then I just pass the $SID on all the links and forms
and it works for me.

Hope that helps or is at least something new for you to try.
jay

- Original Message -
From: Thomas Deliduka [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Monday, September 24, 2001 10:56 AM
Subject: [PHP] Sessions just don't work on my machine. (Trying this again)


 I have written here several times on this subject and in the end those who
 have gratiously helped me have ended up just telling me they have no clue
 why it doesn't work. It HAS to be my server setup but I don't know what it
 could be.

 Sessions just don't work on my machine...

 The heart of the problem is the session_start() function.

 The first time you start a session with this function it creates a new
 session, that's fine.

 The problem happens when it's run and no matter if the SSID is in a cookie
 or passed via a form, it will still create a new session, every single
time.
 It will not pickup the old session.

 Here is the app I setup to demonstrate the problem:

 http://fromtheduke.com/session/

 The first page initiates the session, the variable is posted to the next
 page, the next page should retrieve the session and display the first two
 variables which were registered in the session, then display the third
var.

 You'll see the third var showsup, the first two don't.  The session ID may
 or may not remain the same. If you manually remove the index2.php file and
 reload the first page, the SSID will have changed.

 Source of the files:
 index.php:
 ?

 session_start();

 session_register(var1);
 session_register(var2);

 $var1 = My var 1;
 $var2 = My var 2;

 ?HTML
 HEAD
 TITLESession Page 1/TITLE
 /HEAD

 BODY BGCOLOR=#FF

 PHPSESSID: ? echo $PHPSESSID; ?BR
 Var1: ? echo $var1; ?BR
 Var2: ? echo $var2; ?BR

 FORM ACTION=index2.php METHOD=POST
 VAR 3: INPUT TYPE=TEXT VALUE=My Var 3 NAME=myvar3 INPUT TYPE=SUBMIT
 VALUE=goBR
 /FORM

 /BODY
 /HTML
 --

 Source of index2.php:
 ?

 session_start();// start session
 session_register(var3);  // register var 3 session variable

 $var3 = $myvar3;
 ?HTML
 HEAD
 TITLESession Page 2/TITLE
 /HEAD

 BODY BGCOLOR=#FF

 PHPSESSID: ? echo $PHPSESSID; ?BR
 Var1: ? echo $var1; ?BR
 Var2: ? echo $var2; ?BR
 VAR3: ? echo $var3; ?BR

 /BODY
 /HTML
 --

 I have tried session_name() to force the session ID. I was told though
this
 function doesn't set the SSID. It gives the SSID a name or something.

 I have been told this is all setup correctly, yet, you can see it doesn't
 work.

 The permissions on my /tmp directory look like this:

 drwxrwxrwt  /tmp

 Does this have anything to do with this? I don't know much about the
 permissions part of things.

 --

 Thomas Deliduka
 IT Manager
  -
 New Eve Media
 The Solution To Your Internet Angst
 http://www.neweve.com/



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



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




Re: [PHP] How to increase number of supported servers?

2001-09-24 Thread Jay Paulson

what does this mean?

Warning: Cannot use a scalar value as an array

I look at the line that is causing the warning and it's this:

$errorMsg[error] = ;

thanks,
jay

[EMAIL PROTECTED] wrote:

PHP 3.0.18 stops working after i add over 125 virtual hosts in my
httpd.conf file. PHP 4.0.6 still working.

After reaching this limit PHP3 completele stopps delivering pages.
Searching the archives i recognized, that nearly the same problem was
reported on http://bugs.php.net, reading Bug Id #5316 and #6842.

Im running Apache 1.3.20 with PHP 4.0.6 and PHP 3.0.18
on Solaris 2.7
Unforenatly i can´t stop serving PHP3 at this moment, so i really need
for a solution to break through this PHP3 limitation. In addition it
seems, that PHP4 (at laest after the 4.0.3pl1 release) hasn´t  the
problem or has a higher limit level.


Question 1:
Any chance to configure/patch PHP3 to support more than 255 file
handles? (equal to support more than 125 virtual servers in my
production environment)?

Question 2:
Is the problem reported in the two bug reports above solved in PHP
4.0.6? Or is it pushed to a later appearance by optimising file handle
consumption?


Any one out there who knows more about this? Any hints?
Thanks in advance.

--Buchholz





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




[PHP] what does this mean?

2001-09-24 Thread Jay Paulson

Warning: Cannot use a scalar value as an array

what does that mean?

i have in my code this:

$errorMsg[error] = ;

thanks,
jay


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




[PHP] GD Library help

2001-09-22 Thread Jay Paulson

Do all versions of the GD library for Linux that are version 1.6 and above
not support any GIF formats?  I have 1.8 and in the manual I thought that it
was only version 1.6 that didn't support GIF format.  However, when I run
ImageCreateFromGIF() or ImageGIF() I get an error saying that it's not
supported in PHP.  Also, I wanted to use the ImageCopyResampled but that's
only supported in GD 2.0.  Is there a GD 2.0 for Redhat 7.1?

Thanks,
Jay


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




[PHP] GD Library help

2001-09-21 Thread Jay Paulson

Do all versions of the GD library for Linux that are version 1.6 and above
not support any GIF formats?  I have 1.8 and in the manual I thought that it
was only version 1.6 that didn't support GIF format.  However, when I run
ImageCreateFromGIF() or ImageGIF() I get an error saying that it's not
supported in PHP.  Also, I wanted to use the ImageCopyResampled but that's
only supported in GD 2.0.  Is there a GD 2.0 for Redhat 7.1?

Thanks,
Jay


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




[PHP] Please help with files.

2001-09-21 Thread Jay Paulson

Hello everyone-

Here's my problem.. I have a script that uploads an image and then resizes
that image to a certain size etc.  Then it takes that image and copies it to
a spefic location.  My problem occurs when trying to copy the file to the
specific location because I get a permission denied (I'm running Linux 7.1
with Apache).  I have the script that does this operation off of the web
root so no one can access it in a browser etc.  I'm trying to change the
permissions on the directory and the file.  I'm also trying to change the
owner of the file.  Finally, I'm trying to copy the file but on all of these
I get a permission denied error.  The script runs under the user of Apache
and the Apache user doesn't have access to chmod, chown, or copy the files
like I need it to.  Is there anyway around this issue?

Thanks,
jay


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




[PHP] Multiple Uploads in one form

2001-09-20 Thread Jay Paulson

Hello everyone-

I'm trying to have multiple uploads in one form so my input tag looks like
this:

input type=FILE name=imageFile[] value= size=10
input type=FILE name=imageFile[] value= size=10
input type=FILE name=imageFile[] value= size=10

The problem I'm running into is that I know php usually sets the name of the
file to $userfile_name and sets the mime type of the file to $userfile_type
and the size to $userfile_size.  My question is how does php handle
multipule inputs with arrays like above?

Thanks,
jay


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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




[PHP] Multiple Uploads in one form

2001-09-20 Thread Jay Paulson

Hello everyone-

I'm trying to have multiple uploads in one form so my input tag looks like
this:

input type=FILE name=imageFile[] value= size=10
input type=FILE name=imageFile[] value= size=10
input type=FILE name=imageFile[] value= size=10

The problem I'm running into is that I know php usually sets the name of the
file to $userfile_name and sets the mime type of the file to $userfile_type
and the size to $userfile_size.  My question is how does php handle
multipule inputs with arrays like above?

Thanks,
jay


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




  1   2   >