[PHP] Last call. For PHP/PEAR @ FOSDEM 2005

2004-10-06 Thread Christophe Gesch
I need a Schedule, speaker and public.
That must be request this month.
I think  to 2 themes.
1° PHP5 (real use of  new feature and first feedback)
2° PEAR to a stability and an better reputation.
http://www.fosdem.org/2004/index/news/fosdem
The FOSDEM (Free and Open Source Developers' European Meeting) is a free 
and non-commercial event for the community and organized by the 
community. Its goal is to provide Free and Open Source developers and 
communities a place to meet to
# get in touch with other developers and projects,
# get informed about the latest developments in the Free and Open Source 
world,
# attend to interesting talks and presentations held in large conference 
rooms by Free and Open Source project leaders and committers on various 
topics,
# and to promote the development and the benefits of Free and Open 
Source solutions.


My English is bad.
If you want, you can short-cut me and direct contact fosdem team by send 
an e-mail to [EMAIL PROTECTED]

--
-
Moosh -- php.net -- phpfrance.com
=== Php  Pear @ Fosdem  2005 ===
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] pdf_open_pdi_page

2004-10-06 Thread Hendrik Schmieder
Hello,
when I try to execute the php script below
I get the following error message
*Fatal error*: PDFlib error: [2016] PDF_open_pdi: PDF import (PDI) not 
supported in this configuration in 
*d:\worksheet-server\wss\html\pdf\test2.php* on line *7*

I'm using Apache 1.3.31 with php 4.3.8 on Windows 2000 .
The line
extension=php_pdf.dll
is uncommented in php.ini
phpinfo shows
PDF Supportenabled
PDFlib GmbH Version  5.0.3
Revision$Revision: 1.112.2.9 $
What am I missing ?
Here is the script :
?php
$pdf = pdf_new();
if (pdf_open_file($pdf))
{
   $pdi = pdf_open_pdi($pdf, 'pdf/pdftest.pdf', , 0);
   $page = pdf_open_pdi_page($pdf, $pdi, 1, );
   $page = pdf_open_pdi_page($pdf, $pdi, 1, );
   $width = pdf_get_pdi_value($pdf, width, $pdi, $page, 0);
   $height = pdf_get_pdi_value($pdf, height, $pdi, $page, 0);
   pdf_begin_page($pdf, $width, $height);
   pdf_place_pdi_page($pdf, $page, 0.0, 0.0, 1.0, 1.0);
   $font = pdf_findfont($pdf, Courier, host, 0);
   pdf_setfont($pdf, $font, 20);
   pdf_show_xy($pdf, Second page, 200, 350);
   pdf_close_pdi_page($pdf, $page);
   pdf_end_page($pdf);
   pdf_close($pdf);
   $data = pdf_get_buffer($pdf);
   $fp = fopen ('pdftest.pdf', 'wb');
   fwrite ($fp, $data);
   fclose ($fp);
}
else echo pdf_open_file failed br\n;
?
with best regards
 Hendrik Schmieder
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Upload problems

2004-10-06 Thread Robert Sossomon
With apache, check out the php.conf file located at:
/etc/httpd/conf.d
and modify it to be:
Files *.php
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 838860800
/Files
That'll allow a full CD worth of information to be uploaded...  :)
Robert
raditha dissanayake wrote:
Dennis Gearon wrote:
Would you mind sharing what it was so that it hits the archives and a 
few 'enquiring minds'?

it probably was the LimitRequestBody apache directive which is set to 
512 Kb in some 'out of the box' installations.


--
Robert Sossomon, Business and Technology Application Technician
4-H Youth Development Department
200 Ricks Hall, Campus Box 7606
N.C. State University
Raleigh NC 27695-7606
Phone: 919/515-8474
Fax:   919/515-7812
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: [PHP Attachement Problems - MAC ISSUE!!

2004-10-06 Thread PHP Junkie
Ave,

Manuel...

I saved the new email_message.php class that you sent me replacing the old
one. I used the test_attachment_message.php to test the new class. This time
it didn't send the email with the corrupted attachments, instead, gave me an
error on the screen... This is the error that I received:

³Error: the length of the file that was read does not match the size of the
part file CarsContract-Generic.pdf due to possible data corruption²

I understand now that garbage characters are being inserted by PHP in the
attachment files. Which is why also the other day when I tried your little
php code, it gave Size 35823 but Read 36704 with the additional garbage
characters added. Unfortunately, I think with the new class too, the same is
happening, as per the error. Only this time it is actually giving the error
instead of sending the corrupted file.

Please advice what I can do next... I¹m looking into the Mac compatibility
issue everywhere but I don¹t see anywhere anyone else complaining about such
a thing.

Thanks again,
Junkie



On 10/5/04 10:22 PM, Manuel Lemos [EMAIL PROTECTED] wrote:

 Hello,
 
 On 10/05/2004 04:57 PM, PHP Junkie wrote:
 I replaced the code and added my PDF file in the required place, and this is
 what it displays now:
 
 Size 35823 Read 36704
 
 I'll put in your address and send out the mail your way with the PDF
 attachment using the class script.
 
 It seems that the problem has to due with garbage characters inserted by
 PHP during the read of the file because some PHP options set in your
 environment.
 
 I have added a few workarounds to the class and it should avoid the
 problem now. I am sending you the new class version attached to this
 message. Please try it now and let me know if you still have problems.



Re: [PHP] Re: [PHP Attachement Problems - MAC ISSUE!!

2004-10-06 Thread PHP Junkie
Ave,

One more thing I'd like to point out, which I just discovered. The php code
I was using earlier, prior to using Manuel's mail class... Was not able to
send any kind of attachment except .txt files. Niether images nor pdf nor
anything would go through without being corrupted.

However, using Manuel's class, the images are going through attached
properly, without being corrupted. The PDF files still give the error that
the file size  read size isn't the same, but text and image attachments are
going through.

Junkie

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



Re: [PHP] pdf_open_pdi_page

2004-10-06 Thread Matt M.
 *Fatal error*: PDFlib error: [2016] PDF_open_pdi: PDF import (PDI) not
 supported in this configuration in
 *d:\worksheet-server\wss\html\pdf\test2.php* on line *7*

I could be wrong but I think you need a special license for this functionality.

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



[PHP] proper method to do the following...

2004-10-06 Thread Hugh Beaumont
I've been working with 

error_reporting(E_ALL)

set lately trying to write code that does not give notices or errors. 

I have not been able to solve the following: 

given a form with a checkbox that may or may not be set, we'll call it exact as in

input type = checkbox name = exact

the following code outputs :

Notice: Undefined index: exact in search.php on line 10

code :

if (!isset($_POST['exact'])) {   - line 10
  $_POST['exact'] == false;
}

if ($_POST['exact'] == checked)   -- also here
{
  $exact_match_only = true;
}
else {
  $exact_match_only = false;
}

I understand why it is giving the notice but I'm not sure how to make it stop. 

What is the proper way to set a variable so that it's non-existance will not generate
a notice?

Any ideas?

Let me know if the above is not clear. Thanks.






___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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



Re: [PHP] proper method to do the following...

2004-10-06 Thread John Nichel
Hugh Beaumont wrote:
I've been working with 

error_reporting(E_ALL)
set lately trying to write code that does not give notices or errors. 

I have not been able to solve the following: 

given a form with a checkbox that may or may not be set, we'll call it exact as in
input type = checkbox name = exact
the following code outputs :
Notice: Undefined index: exact in search.php on line 10
code :
if (!isset($_POST['exact'])) {   - line 10
  $_POST['exact'] == false;
}
if ($_POST['exact'] == checked)   -- also here
{
  $exact_match_only = true;
}
else {
  $exact_match_only = false;
}
I understand why it is giving the notice but I'm not sure how to make it stop. 

What is the proper way to set a variable so that it's non-existance will not generate
a notice?
Any ideas?
Let me know if the above is not clear. Thanks.
Try it like this...
if ( isset ( $_POST['exact'] ) ) {
// do what you need to do if it's checked
} else {
// do what you need to do if it's not checked
}
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] proper method to do the following...

2004-10-06 Thread Greg Donald
On Wed, 6 Oct 2004 06:53:34 -0700 (PDT), Hugh Beaumont
[EMAIL PROTECTED] wrote:
 Notice: Undefined index: exact in search.php on line 10
 
 code :
 
 if (!isset($_POST['exact'])) {   - line 10
   $_POST['exact'] == false;
 }

Reverse the logic of isset().  

if (isset($_POST['exact'])) {
  $_POST['exact'] == TRUE;
}

If a variable is genuinely not set, it will produce the warning or
notice you are seeing.  There are a few ways to circumvent that: lower
your error reporting level, or quiet the error with @, or reverse the
logic so the error doesn't exist.  I prefer the last method as I
always use full error reporting during development.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



Re: [PHP] proper method to do the following...

2004-10-06 Thread Hugh Beaumont
 I've been working with 
 
 error_reporting(E_ALL)
 
 set lately trying to write code that does not give notices or errors. 
 

 
 What is the proper way to set a variable so that it's non-existance 
will not generate
 a notice?
 

Thanks all for the replies. I also noticed a small typo in the code I 
posted which made it even
worse (used == instead of = when doing the assignment).

Thanks again!



__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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



RE: [PHP] proper method to do the following...

2004-10-06 Thread Michael Sims
Hugh Beaumont wrote:
 the following code outputs :

 Notice: Undefined index: exact in search.php on line 10

 code :

 if (!isset($_POST['exact'])) {   - line 10
   $_POST['exact'] == false;
 }

You have a typo in line 11.  I'm assuming you want to use the assignment operator
= instead of the equality operator ==.  The PHP parser seems to be incorrectly
attributing the error to line 10 when it should be on line 11.  If you change ==
to = your error will go away.  It took me a moment to catch it because of the
misleading error message.

HTH

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



[PHP] Memory limit reached but no error displayed

2004-10-06 Thread Paulo JF Silva
Hi,
I have found a bug in one of my scripts. It doesn't output anything, 
just a 100% blank page. I debugged it to a single implode line. If I 
comment it, it's ok, the page show my debug echo's and stuff, if i let 
the script run that line the result is a blank page even with echo's 
done before that line.

I think the problem is memory limit, when i change it to 16M it works fine.
But my doubt/problem is about error reporting. Shouldn't it appear 
something saying: memory error or something? It doesn't appear 
anything... I have error_reporting E_ALL, maybe I should look to other 
config's? which ones?

Thanks in advance for your help,
Paulo JF Silva
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] A question of style....

2004-10-06 Thread Chris Boget
  Anything that doesn't use the word 'flava' :)
 What if I name all my variables after Rocky characters? ;)

Hey!  You stole my method!  Actually, mine are Rocky and
Bullwinkle, but still! :p

thnx,
Chris

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



[PHP] Referencing a constant class variable

2004-10-06 Thread Chris Boget
If I have a class that looks like this:

class MyClass {
  var $MyClassVar = Bob;
}

is there a way to reference that variable w/o instantiating
MyClass?  I've tried:

MyClass::$MyClassVar
MyClass-$MyClassVar
MyClass.$MyClassVar

nothing works.  Is this even possible?  I'm using PHP 4.3.2.

thnx,
Chris

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



[PHP] displaying blob images from a mssql db

2004-10-06 Thread blackwater dev
Ok, I know images shouldn't be saved in the db but this isn't my db so
I can't change that.  Does anyone know of a good tutorial to show me
how to grab these blog jpg's and display them in a browser?

Thanks!

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



Re: [PHP] proper method to do the following...

2004-10-06 Thread Dennis Gearon
Hugh Beaumont [EMAIL PROTECTED] wrote:
quote 
I've been working with 

error_reporting(E_ALL)
set lately trying to write code that does not give notices or errors. 

 


What is the proper way to set a variable so that it's non-existance 
 

will not generate
a notice?
 

Thanks all for the replies. I also noticed a small typo in the code I 
posted which made it even
worse (used == instead of = when doing the assignment).

quote 
There's a book called XX number of ways to improve your C++ code. Well, it works on 
lots of languages. About equality statements? Put the constant on the left, then it's 
not accidentally an assignement.
if( 15==$dudes_age ){ $action=Slap him if he looks at your daughter; }
vs
if( $daughters_age==(18*365 + 4 + 1) ){ $action=Give her a box of con***s and kick her 
out; }
//18 years, plus 4 leap days plus one day.
If you accidentally mamke the '==' a '=' in the second statement, it will always be 
true, and you will get arrested for kicking your 8 year old out into the street.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] --disable-url-fopen-wrapper gone?

2004-10-06 Thread Paul Fierro
On 10/05/2004 12:03 PM, Marten Lehmann [EMAIL PROTECTED] wrote:

 Hello,
 
 one account of a user on our webserver was compromised using a feature
 of fopen to load external sources. As of the documentation, there shall
 be a configure option called --disable-url-fopen-wrapper.
 Unfortunately, this option doesn't seem to exist in 4.3.9. How can I set
 a default for allow_url_fopen during the compilation? Or is the only way
 to set
 
 allow_url_fopen=0
 
 in the master php.ini?

As of PHP 4.3.5, I believe the only way to change allow_url_fopen is via
php.ini or httpd.conf. AFAICT, --disable-url-fopen-wrapper disappeared in
PHP 4.0.4.

Paul

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



[PHP] Saving non-english text into database problem !!

2004-10-06 Thread Dre
Hi

I have a strange problem that I can not figure out how to solve ..

I'm trying to save some data into a regular mySQL database table by using a
normal php
insertion script but I'm trying to save Arabic Text and here comes the
problem ..

When I'm performing the insertion by writing the actual text directly into
the insert SQL statement
the insertion performed well, and I can view the data again correctly.

But when I'm performing the insertion by passing variables to the insertion
SQL statement, the text
does not get saved correctly and when I try to view the saved data I see
garbage instead.


(I was using the same table for both cases)

Thanks in advance

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



RE: [PHP] why this doesn't work as an external file but does inte rnally?

2004-10-06 Thread Vail, Warren
Perhaps you fixed things but they all appeared to work for me (at least
mostly).

https://celestica.tristarpromotions.com/NEW/index3.php

This last one, seemed to not do the mouseout on the contact button, but
all three seemed to work.

Good job,

Warren Vail


-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 05, 2004 8:20 PM
To: 'PHP Mailing Lists'
Subject: Re: [PHP] why this doesn't work as an external file but does
internally?


Aaron Wolski wrote:
 Ok.. here are 3 links:
 
 https://celestica.tristarpromotions.com/NEW/index2.php
 
 This link... you'll see that the rollover effects on the top menu 
 work. The external JS file (called: jsstuffnew.php) has code that 
 looks like:
 
 img1on = new Image();   img1on.src = ?php echo $base_url;
 ?Graphics/home_on.gif;
 
 https://celestica.tristarpromotions.com/NEW/index.php
 
 This link... you'll see that the rollover effects on the top menu DO 
 NOT work. The external JS file (called: jsstuff.php) has code that 
 looks
 like:
 
 img1on = new Image();   img1on.src = ?php echo $base_url;
 ?Graphics/?php echo $img_home_on; ?;
 
 As you can see, the difference between the two is the fact that the 
 image FILE NAME is hard coded into the file as opposed to calling.
 
 
 https://celestica.tristarpromotions.com/NEW/index3.php
 
 This link... you'll see that the rollover effects work as well. 
 Instead of having an external file I have embedded the JS code 
 directly into the page.
 
 Additionally, I have use code that looks like:
 
 img1on = new Image();   img1on.src = ?php echo $base_url;
 ?Graphics/?php echo $img_home_on; ?;
 
 
 Having visuals... does that help communicate what the problem is?

Yes, the output of your JavaScript in the second example is missing 
$img_home_on (it's outputting nothing).  Where does this variable get 
set?  How about posting the php code for 
https://celestica.tristarpromotions.com/NEW/jsstuff.php


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

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

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



Re: [PHP] Referencing a constant class variable

2004-10-06 Thread Greg Donald
On Wed, 6 Oct 2004 11:08:22 -0500, Chris Boget [EMAIL PROTECTED] wrote:
 If I have a class that looks like this:
 
 class MyClass {
   var $MyClassVar = Bob;
 }
 
 is there a way to reference that variable w/o instantiating
 MyClass?  I've tried:

MyClass::MyClassVar



-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



Re: [PHP] Referencing a constant class variable

2004-10-06 Thread Greg Donald
On Wed, 6 Oct 2004 13:02:18 -0500, Greg Donald [EMAIL PROTECTED] wrote:
 On Wed, 6 Oct 2004 11:08:22 -0500, Chris Boget [EMAIL PROTECTED] wrote:
  If I have a class that looks like this:
 
  class MyClass {
var $MyClassVar = Bob;
  }
 
  is there a way to reference that variable w/o instantiating
  MyClass?  I've tried:
 
 MyClass::MyClassVar

That's wrong, I was thinking of functions.  Sorry.

Seems you have to instantiate the class.

class MyClass {
var $MyClassVar = Bob;
}

$class = new MyClass;
echo $class-MyClassVar;


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



Re: [PHP] Saving non-english text into database problem !!

2004-10-06 Thread Marek Kilimajer
Dre wrote:
Hi
I have a strange problem that I can not figure out how to solve ..
I'm trying to save some data into a regular mySQL database table by using a
normal php
insertion script but I'm trying to save Arabic Text and here comes the
problem ..
When I'm performing the insertion by writing the actual text directly into
the insert SQL statement
the insertion performed well, and I can view the data again correctly.
But when I'm performing the insertion by passing variables to the insertion
SQL statement, the text
does not get saved correctly and when I try to view the saved data I see
garbage instead.
Is the variable comming from a html form? You might have different 
encoding in your text editor and in html page.

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


Re: [PHP] Referencing a constant class variable

2004-10-06 Thread Daniel Schierbeck
Greg Donald wrote:
On Wed, 6 Oct 2004 13:02:18 -0500, Greg Donald [EMAIL PROTECTED] wrote:
On Wed, 6 Oct 2004 11:08:22 -0500, Chris Boget [EMAIL PROTECTED] wrote:
If I have a class that looks like this:
class MyClass {
 var $MyClassVar = Bob;
}
is there a way to reference that variable w/o instantiating
MyClass?  I've tried:
MyClass::MyClassVar

That's wrong, I was thinking of functions.  Sorry.
Seems you have to instantiate the class.
class MyClass {
var $MyClassVar = Bob;
}
$class = new MyClass;
echo $class-MyClassVar;

I believe you can make the property static (at least in PHP5):
class MyClass
{
public static $myClassVar = Bob;
}
echo MyClass::$myClassVar; // Bob
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com): 
http://www.spreadfirefox.com/?q=user/registerr=6584

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


Re: [PHP] Referencing a constant class variable

2004-10-06 Thread Chris Boget
 I believe you can make the property static (at least in PHP5):
 class MyClass
 {
 public static $myClassVar = Bob;
 }
 echo MyClass::$myClassVar; // Bob

Unfortunately, in PHP4.3.2 that doesn't seem to be working... :(
Does anyone know how I can access a class' variable w/o having
to instantiate an object of the class?  This is more to the point of
what I'm trying to do:

Since PHP4 doesn't have enums, I'm doing this:

class MyEnums {
  var $this = 'This';
  var $that = 'That';
  var $other = 'Other';
}

class MyClass {
  var $MyVar = MyEnums::$this;
}

But obviously, that's not working.  Is there a way I can get
it to work?

thnx,
Chris

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



Re: [PHP] Referencing a constant class variable

2004-10-06 Thread M. Sokolewicz
Chris Boget wrote:
I believe you can make the property static (at least in PHP5):
class MyClass
{
public static $myClassVar = Bob;
}
echo MyClass::$myClassVar; // Bob

Unfortunately, in PHP4.3.2 that doesn't seem to be working... :(
Does anyone know how I can access a class' variable w/o having
to instantiate an object of the class?  This is more to the point of
what I'm trying to do:
Since PHP4 doesn't have enums, I'm doing this:
class MyEnums {
  var $this = 'This';
  var $that = 'That';
  var $other = 'Other';
}
class MyClass {
  var $MyVar = MyEnums::$this;
}
But obviously, that's not working.  Is there a way I can get
it to work?
thnx,
Chris
 class MyEnums {
   var $this = 'This';
   var $that = 'That';
   var $other = 'Other';
 }
 class MyClass {
   var $MyVar = MyEnums::this;
 }
reference like MyClass::MyVar. Don't use PHP5 conventions in PHP4!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Push file to FTP Server

2004-10-06 Thread Aaron Todd
Does anyone know how I might be able to have php push a file to an FTP 
server?

Thanks,

Aaron 

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



Re: [PHP] Referencing a constant class variable

2004-10-06 Thread Chris Boget
 reference like MyClass::MyVar. Don't use PHP5 conventions in PHP4!

I'm curious if you tested your code?  Did it work?  If so, what
version of PHP are you using?  I copied and pasted the code
you provided and got the following error:

Parse error: parse error, expecting `','' or `';'' in
/usr/local/etc/httpd/domains/eazypro.com/interactive/cron_scripts/test/rate_
version.php on line 9

with line 9 being this line:

var $MyVar = MyEnums::thisVar;

thnx,
Chris

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



Re: [PHP] Push file to FTP Server

2004-10-06 Thread Aaron Gould
Aaron Todd wrote:
Does anyone know how I might be able to have php push a file to an FTP 
server?

If you configure PHP with --enable-ftp, you'll have a bunch of FTP 
functions at your disposal, including PUT:

http://ca.php.net/ftp
--
Aaron Gould
Parts Canada - Web Developer
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Push file to FTP Server

2004-10-06 Thread John Nichel
Aaron Todd wrote:
Does anyone know how I might be able to have php push a file to an FTP 
server?

Thanks,
Aaron 

http://us4.php.net/ftp
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Push file to FTP Server

2004-10-06 Thread Matt M.
 Does anyone know how I might be able to have php push a file to an FTP
 server?

did you look in the manual or even try google?

http://us4.php.net/ftp

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



RE: [PHP] SOLVED: why this doesn't work as an external file but does internally?

2004-10-06 Thread Aaron Wolski
Hi All,

Just wanted to thank everyone for their advice and help.

What I ended up doing is simply doing an include() of the JS code
instead of externally linking to the file.

This works perfectly.

Thanks again everyone! I appreciate it.

Regards,

Aaron

 -Original Message-
 From: Aaron Wolski [mailto:[EMAIL PROTECTED]
 Sent: October 5, 2004 4:51 PM
 To: 'John Nichel'; 'PHP Mailing Lists'
 Subject: RE: [PHP] why this doesn't work as an external file but does
 internally?
 
 
 
  -Original Message-
  From: John Nichel [mailto:[EMAIL PROTECTED]
  Sent: October 5, 2004 4:06 PM
  To: PHP Mailing Lists
  Subject: Re: [PHP] why this doesn't work as an external file but
does
  internally?
 
  Please reply to the list, and not just an individual person.
 
  No.  I turn my radio on, but it doesn't work, what's the problem?
See
  what I mean?  The question doesn't supply enough information to make
 an
  educated guess as to what the problem may be.
 
  What error messages are produced?
  What does the remotely included file output?
  Does the second variable have value?
  Can you provide a link to where we can see the issue at play?
  So on, and so forth.
 
  Look at the source of your page that doesn't work, where the JS is
  supposed to be, and chances are, you'll see the problem.
 
 Ok.. here are 3 links:
 
 https://celestica.tristarpromotions.com/NEW/index2.php
 
 This link... you'll see that the rollover effects on the top menu
work.
 The external JS file (called: jsstuffnew.php) has code that looks
like:
 
 img1on = new Image();   img1on.src = ?php echo $base_url;
 ?Graphics/home_on.gif;
 
 https://celestica.tristarpromotions.com/NEW/index.php
 
 This link... you'll see that the rollover effects on the top menu DO
NOT
 work. The external JS file (called: jsstuff.php) has code that looks
 like:
 
 img1on = new Image();   img1on.src = ?php echo $base_url;
 ?Graphics/?php echo $img_home_on; ?;
 
 As you can see, the difference between the two is the fact that the
 image FILE NAME is hard coded into the file as opposed to calling.
 
 
 https://celestica.tristarpromotions.com/NEW/index3.php
 
 This link... you'll see that the rollover effects work as well.
Instead
 of having an external file I have embedded the JS code directly into
the
 page.
 
 Additionally, I have use code that looks like:
 
 img1on = new Image();   img1on.src = ?php echo $base_url;
 ?Graphics/?php echo $img_home_on; ?;
 
 
 Having visuals... does that help communicate what the problem is?
 
 In terms of what errors I am seeing, etc... I cannot tell you that
 because NO errors come up at all, even with the external pages.
 
 Thanks John. Hope I explained it a bit better this time around.
 
 Regards,
 
 Aaron
 
 --
 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] Referencing a constant class variable

2004-10-06 Thread Jennifer Goodie
-- Original message from Chris Boget : -- 
 Parse error: parse error, expecting `','' or `';'' in 
 /usr/local/etc/httpd/domains/eazypro.com/interactive/cron_scripts/test/rate_ 
 version.php on line 9 
 
 with line 9 being this line: 
 
 var $MyVar = MyEnums::thisVar; 
 

That is because In PHP 4, only constant initializers for var  variables are allowed. 
To initialize variables with non-constant values, you need an initialization function 
which is called automatically when an object is being constructed from the class. 
(from the manual)  

Whether or not the syntax MyEnums::thisVar is correct and will accomplish what you 
want when moved into a function is another story.

I haven't been paying close attention and am not sure what you are trying to do, but 
since it appears you want something that is constant, have you thought about using 
DEFINE?  

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



[PHP] Newsgroups Space

2004-10-06 Thread Joe Crawford
i know this isn't completely related to php but i am creating a web based 
news reader in php, how much disk space do you think i need to run my own 
local news server?

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


RE: [PHP] Newsgroups Space

2004-10-06 Thread Jay Blanchard
[snip]
i know this isn't completely related to php but i am creating a web
based 
news reader in php, how much disk space do you think i need to run my
own 
local news server?
[/snip]

I'd go with a 1TB RAID

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



Re: [PHP] Newsgroups Space

2004-10-06 Thread Robert Sossomon
Jay Blanchard is quoted as saying on 10/6/2004 4:49 PM:
[snip]
i know this isn't completely related to php but i am creating a web
based 
news reader in php, how much disk space do you think i need to run my
own 
local news server?
[/snip]

I'd go with a 1TB RAID
Only 1TB??
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] SOLVED: why this doesn't work as an external file but does internally?

2004-10-06 Thread Brian
Those of us that view emails as a list of conversations would
appreciate not changing subject lines.


On Wed, 6 Oct 2004 16:01:32 -0400, Aaron Wolski [EMAIL PROTECTED] wrote:
 Hi All,
 
 Just wanted to thank everyone for their advice and help.
 
 What I ended up doing is simply doing an include() of the JS code
 instead of externally linking to the file.
 
 This works perfectly.
 
 Thanks again everyone! I appreciate it.
 
 Regards,
 
 Aaron
 
  -Original Message-
  From: Aaron Wolski [mailto:[EMAIL PROTECTED]
  Sent: October 5, 2004 4:51 PM
  To: 'John Nichel'; 'PHP Mailing Lists'
  Subject: RE: [PHP] why this doesn't work as an external file but does
  internally?
 
 
 
   -Original Message-
   From: John Nichel [mailto:[EMAIL PROTECTED]
   Sent: October 5, 2004 4:06 PM
   To: PHP Mailing Lists
   Subject: Re: [PHP] why this doesn't work as an external file but
 does
   internally?
  
   Please reply to the list, and not just an individual person.
  
   No.  I turn my radio on, but it doesn't work, what's the problem?
 See
   what I mean?  The question doesn't supply enough information to make
  an
   educated guess as to what the problem may be.
  
   What error messages are produced?
   What does the remotely included file output?
   Does the second variable have value?
   Can you provide a link to where we can see the issue at play?
   So on, and so forth.
  
   Look at the source of your page that doesn't work, where the JS is
   supposed to be, and chances are, you'll see the problem.
 
  Ok.. here are 3 links:
 
  https://celestica.tristarpromotions.com/NEW/index2.php
 
  This link... you'll see that the rollover effects on the top menu
 work.
  The external JS file (called: jsstuffnew.php) has code that looks
 like:
 
  img1on = new Image();   img1on.src = ?php echo $base_url;
  ?Graphics/home_on.gif;
 
  https://celestica.tristarpromotions.com/NEW/index.php
 
  This link... you'll see that the rollover effects on the top menu DO
 NOT
  work. The external JS file (called: jsstuff.php) has code that looks
  like:
 
  img1on = new Image();   img1on.src = ?php echo $base_url;
  ?Graphics/?php echo $img_home_on; ?;
 
  As you can see, the difference between the two is the fact that the
  image FILE NAME is hard coded into the file as opposed to calling.
 
 
  https://celestica.tristarpromotions.com/NEW/index3.php
 
  This link... you'll see that the rollover effects work as well.
 Instead
  of having an external file I have embedded the JS code directly into
 the
  page.
 
  Additionally, I have use code that looks like:
 
  img1on = new Image();   img1on.src = ?php echo $base_url;
  ?Graphics/?php echo $img_home_on; ?;
 
 
  Having visuals... does that help communicate what the problem is?
 
  In terms of what errors I am seeing, etc... I cannot tell you that
  because NO errors come up at all, even with the external pages.
 
  Thanks John. Hope I explained it a bit better this time around.
 
  Regards,
 
  Aaron
 
  --
  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] Referencing a constant class variable

2004-10-06 Thread David Bevan
On October 6, 2004 15:34, Chris Boget wrote:

 Unfortunately, in PHP4.3.2 that doesn't seem to be working... :(
 Does anyone know how I can access a class' variable w/o having
 to instantiate an object of the class?  This is more to the point of
 what I'm trying to do:

 Since PHP4 doesn't have enums, I'm doing this:

 class MyEnums {
   var $this = 'This';
   var $that = 'That';
   var $other = 'Other';
 }

Chris,

A work around I've used in the past has been to use a keyed array such as:

$MyEnums = array(
is = This,
at = That,
er = Other
);

Then you can refer to them like:

echo($MyEnums[is]);   // Prints This

Just an idea.
HTH
-- 
Regards,
David Bevan

We could learn a lot from crayons: 
some are sharp, some are pretty, some are dull, some have weird names, 
and all are different colorsbut they all exist very nicely in the same 
box. 

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



RE: [PHP] Newsgroups Space

2004-10-06 Thread Matthew Sims
 [snip]
 i know this isn't completely related to php but i am creating a web
 based
 news reader in php, how much disk space do you think i need to run my
 own
 local news server?
 [/snip]

 I'd go with a 1TB RAID


Better go with 2TB. You know how all that porn fills up.

-- 
--Matthew Sims
--http://killermookie.org

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



[PHP] RE: **[SPAM]** RE: [PHP] Newsgroups Space

2004-10-06 Thread Jay Blanchard
[snip]
Better go with 2TB. You know how all that porn fills up.
[/snip]

Shoot, I forgot porn. 4-7TB minimum

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



Re: [PHP] Suggestion for IN()

2004-10-06 Thread Shawn McKenzie
Your first scenario can been done in a similar fashion to how you are 
used to doing it in SQL:

if ( in_array($a, array(1,4,20,...) ) {}
Your second scenario doesn't seem like there is much of a problem 
because it will always be short (can only have 2 comparisons).

-Shawn
Jay Blanchard wrote:
[snip]
I'm sure I'll be flamed for this, but it seems to me that there should
be a
shortcut way to write:
If ($a == 1 || $a == 4 || $a == 20 || ...) {}
To something more like what SQL has...
If ( $a IN(1,4,20,...) ) {}
And same with the very helpful SQL BETWEEN 'function'.
Instead of 

If ($a  1  $a  20) {}
Why not 

If ($a BETWEEN (1,20)) {}
[/snip]
You could write a function and share it with the rest of us!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Images in PHP and MySQL

2004-10-06 Thread Ed Lazor
 On Friday 01 October 2004 05:52, Ed Lazor wrote:
  Images take up more space when stored in the db, because you're storing
 raw
  binary data.  Gif and jpeg are compression methods that convert binary
 data
  into something smaller that can be stored in a file.
 
 ??
 
 If you store a jpeg file into a database blob, the database doesn't
 magically
 decompress the jpeg file. It will just treat the jpeg file as any other
 binary file and store it as-is (plus any overhead).

Sorry for not responding sooner - just found this message while cleaning on
my PHP folder.

Anyway, we're both right, depending on how you go about saving the images to
the database.  You're talking about using PHP's file functions to open the
image file, read in the data, and stream it to the database.  I'm talking
about using the built-in GD functions to grab the image (like
imagecreatefromjpeg) and store it into the database.

As you're pointing out, the GD functions are performing the compression and
decompression.

This was part of another discussion GH and I were having on the MySQL list
about different approaches to storing large collections of images.  Sorry, I
should have mentioned that.

-Ed

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



[PHP] mysqli - mysql

2004-10-06 Thread Whitehawk Stormchaser
Hi!
I have a trouble with building MySQL and MySQLi support together with PHP... 
Basically my config says:

../configure --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config  (and other 
switches)
but I get this:

/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x0): multiple definition of 
`net_buffer_length'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x0): first defined here
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x4): multiple definition of 
`max_allowed_packet'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x4): first defined here

and that for basically for each function
Anyone knows, how to make the mysqli and mysql extension work together?

Thanks. Stormy.

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



Re: [PHP] mysqli - mysql

2004-10-06 Thread Marek Kilimajer
http://bugs.php.net/bug.php?id=29860
Whitehawk Stormchaser wrote:
Hi!
I have a trouble with building MySQL and MySQLi support together with PHP... 
Basically my config says:

../configure --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config  (and other 
switches)
but I get this:

/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x0): multiple definition of 
`net_buffer_length'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x0): first defined here
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x4): multiple definition of 
`max_allowed_packet'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x4): first defined here

and that for basically for each function
Anyone knows, how to make the mysqli and mysql extension work together?
Thanks. Stormy.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Saving non-english text into database problem !!

2004-10-06 Thread Dre
the variables I'm using are sent correctly from the html form to the page
contains the insertion script .. and both of these pages has the same
encoding


Dre [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi

 I have a strange problem that I can not figure out how to solve ..

 I'm trying to save some data into a regular mySQL database table by using
a
 normal php
 insertion script but I'm trying to save Arabic Text and here comes the
 problem ..

 When I'm performing the insertion by writing the actual text directly into
 the insert SQL statement
 the insertion performed well, and I can view the data again correctly.

 But when I'm performing the insertion by passing variables to the
insertion
 SQL statement, the text
 does not get saved correctly and when I try to view the saved data I see
 garbage instead.


 (I was using the same table for both cases)

 Thanks in advance

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



Re: [PHP] SOLVED: why this doesn't work as an external file but does internally?

2004-10-06 Thread John Nichel
Brian wrote:
Those of us that view emails as a list of conversations would
appreciate not changing subject lines.
Changing the subject line as in putting 'SOLVED' in it?  Hell, I wish 
more people did that.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Images in PHP and MySQL

2004-10-06 Thread Gary Hotko
No problem Ed thanks...

Actually I was supprised to see this conversation (thread) come back
into my GMAIL inbox


On Wed, 6 Oct 2004 15:57:12 -0700, Ed Lazor [EMAIL PROTECTED] wrote:
  On Friday 01 October 2004 05:52, Ed Lazor wrote:
   Images take up more space when stored in the db, because you're storing
  raw
   binary data.  Gif and jpeg are compression methods that convert binary
  data
   into something smaller that can be stored in a file.
 
  ??
 
  If you store a jpeg file into a database blob, the database doesn't
  magically
  decompress the jpeg file. It will just treat the jpeg file as any other
  binary file and store it as-is (plus any overhead).
 
 Sorry for not responding sooner - just found this message while cleaning on
 my PHP folder.
 
 Anyway, we're both right, depending on how you go about saving the images to
 the database.  You're talking about using PHP's file functions to open the
 image file, read in the data, and stream it to the database.  I'm talking
 about using the built-in GD functions to grab the image (like
 imagecreatefromjpeg) and store it into the database.
 
 As you're pointing out, the GD functions are performing the compression and
 decompression.
 
 This was part of another discussion GH and I were having on the MySQL list
 about different approaches to storing large collections of images.  Sorry, I
 should have mentioned that.
 
 -Ed
 
 
 
 --
 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] Re: HOWTO: Install PHP on Fedora Core / Redhat

2004-10-06 Thread Luis Bernardo

John Swartzentruber [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On 10/3/2004 4:02 PM Matthew Fonda wrote:
  Howdy,
 
  I noticed that quite a few people were having a hard time installing PHP
  on Fedora Core or Redhat, so I put together a little tutorial explaining
  how to do it. Hope it helps :D
  http://mfonda.dotgeek.org/fcrh.php

 I'm not complaining about any tutorials, but this doesn't quite fit
 with my experience. I installed FC2 (not an upgrade). I then ran
 phpinfo() to get the configure options for the installed PHP. I used
 those options to configure PHP5. After running make and make install,
 I edited /etc/httpd/conf.d/php.ini to change the LoadModule line.

does your installation have apxs? mine doesn't even though phpinfo says that
(the fedora installed) php4 was configured with it.


 I believe I also needed to remove the domxml.ini file from /etc/php.d.
 I may have also needed to more some other files around.

 My point isn't to provide another tutorial, but to say that a PHP and
 linux newbie (me) can install PHP5 without also installing Apache. I
 am inexperienced with Apache and PHP, so I'm not claiming it is
 *better* not to re-install Apache, just that it isn't necessary under FC2.

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



[PHP] AutoLogin

2004-10-06 Thread Sagar C Nannapaneni
Title: Blank



Hi all,
I have a website which has a login form with username and password.
How can i login into that website providing the username and pwd from
the php script. I know that this can be done...but wonder how.
The website uses a JSP files with jsp session and also before
logging in..it asks for ssl authentication.

Ur help will b a great help to me...

Regards,
/sagar



[PHP] How to implement mass emailing?

2004-10-06 Thread Tumurbaatar S.
The scenario is:

1. Site administrator logs into his admin page and writes
some message on a form.
2. After clicking submit the web script should broadcast
this message to several hundred subscribers.

And I'm wonder how to implement this on PHP.
Sending an email to each subscribers can take
a much time and PHP will stop after max_execution_time.
Any ideas? 

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



Re: [PHP] How to implement mass emailing?

2004-10-06 Thread zareef ahmed

--- Tumurbaatar S. [EMAIL PROTECTED] wrote:

 The scenario is:
 
 1. Site administrator logs into his admin page and
 writes
 some message on a form.
 2. After clicking submit the web script should
 broadcast
 this message to several hundred subscribers.

If you want to send the message as email mail() is the
only option.
 
 And I'm wonder how to implement this on PHP.
 Sending an email to each subscribers can take
 a much time and PHP will stop after
 max_execution_time.
you can set max time by  set_time_limit(), for disable
time limit just use set_time_limit(0).

BTW  register_shutdown_function() can be helpfull in
handling performance related doubts.

zareef ahmed  

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


=
Zareef Ahmed :: A PHP Developer in Delhi ( India ).
Homepage :: http://www.zasaifi.com/zareef_ahmed.php



___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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