Re: [PHP] Running Apache in one machine and php in another

2004-02-06 Thread Jason Wong
On Saturday 07 February 2004 04:34, Mrs. Geeta Thanu wrote:

 Putting Apache and PHP in one machine and high end computation in another
 machine will be good solution for my problem.

 Can I know any good URL which says about php's stream,curl,socket
 functions.

Download the php manual and read a chapter each night before you go to bed :-)

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Any line, wire, or cloth cut to length will be too short
-- Dimensions General Shefields Corollaries n1
*/

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



Re: [PHP] CVS style project system

2004-02-06 Thread Adam Bregenzer
On Thu, 2004-02-05 at 20:21, [EMAIL PROTECTED] wrote:
 i have been asked to build a system for a project file space, where a
 list of users of different groups can start new projects for their
 group, add files for that project of the group and/or revise current
 files with different versions. It will be a cvs like system, but i
 dont think cvs would be apropriate for this, as they want to add
 titles to the project and comments etc. It will be database in Mysql.
 I was wondering how i could go about designing this system, and any
 ways to force people to sync up with the latest versions of the
 documents. Let me know thanks.

I know you don't want to hear someone say use cvs so...

Use viewcvs[1], or write your own version of it.  You can put a database
behind it, add descriptions to projects and/or folders to your database,
whatever you want on top of cvs.  You can even use cvsgrab[2] to
download a repository from a viewcvs site.  There is also cvsweb[3], if
you think perl is better than python.  If you need to significantly
extend the functionality of these possible solutions and you still want
to hack out some PHP code then use these as a base for designing
whatever you are looking for.  As a side note, cvsgraph[4] integrates
nicely with viewcvs, and if you do use viewcvs check out the querycvs
script.

The points I am trying to impress are:
1.) Writing your own version of cvs in PHP is a bigger deal than you
likely realize.  Even if you do not need every single possible feature
of cvs your project will probably grow and you may some day.
2.) The rcs format does a good job of maintaining version control and if
you use cvs you get all of its stability, future improvements, etc.
3.) There is a long history behind cvs.  It has accumulated a large
amount of supporting applications, helper scripts, mailing lists (of
which I am on btw), etc.  In short an entire community.  It would be
better for us all if you would join in and help yourself.
4.) Short of using webdav[5] as well as basic HTTP it is a poor
usability decision to design a file based revision control system with
its only interface being via HTTP.  What if people want to download
entire directories, etc.  You can make direct cvs access an
afterthought, but still a possibility.
5.) I am of the camp that thinks storing entire files in a database is a
bad thing.  Think of your filesystem as a database optimized for storing
files.

class new_wheel extends wheel  class new_wheel

Regards,
Adam

[1] http://viewcvs.sourceforge.net/
[2] http://cvsgrab.sourceforge.net/
[3] http://www.freebsd.org/projects/cvsweb.html
[4] http://www.akhphd.au.dk/~bertho/cvsgraph/
[5] http://www.webdav.org/

-- 
Adam Bregenzer
[EMAIL PROTECTED]
http://adam.bregenzer.net/

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



[PHP] ldap_add - Error number 65: Object class violation

2004-02-06 Thread Bobby R . Cox
Hi All.

Our ISP has a web page that allows ISP customers to add sub-email 
accounts to their existing accounts.  The information is stored on an 
LDAP server and added via the ldap_add command.

Currently I am getting the following error when trying to add a sub 
account.

Warning: LDAP: add operation could not be completed. in 
/usr/web/pmt.coop/htdocs/userTools/email/doAddCheckEmail.php on line 63
An error occurred. Error number 65: Object class violation

The following is a list of the object classes and attributes as they 
appear in the script.

// prepare data
$info[uid]= $addEmail;
$info[cn]= $sessCN;
$info[l]= $sessL;
$info[givenname] = $sessGivenname;
$info[mail] = $addEmail . @pmt.org;
$info[userpassword] = {CRYPT}.crypt($password);
$info[loginshell] = /bin/bash;
$info[homedirectory] = /home/ . $sessUsername . / 
. $addEm
ail;
$info[gidnumber] = 101;
$info[uidnumber] = 9514;
$info[uidnumber] = 9514;
$info[gecos] = $sessCN;
$info[mailMessageStore] =/home/vmail/pmt/$addEmail/;
$info[ispParentAcct] =$sessUsername;

$info[objectclass][0] = person;
$info[objectclass][1] = organizationalPerson;
$info[objectclass][2] = inetOrgPerson;
$info[objectclass][3] = posixAccount;
$info[objectclass][4] = top;
$info[objectclass][5] = shadowAccount;
$info[objectclass][6] = qmailUser;
$info[objectclass][7] = ispAccount;
The following is the line that is generating the error.

 // add data to directory
$r=ldap_add($connection, $dn, $info);
  if ($r) {
echo Added LDAP data ;
  }
  else {
  echo An error occurred. Error number  . 
ldap_errno($connection) . :
  . ldap_err2str(ldap_errno($connection));
 }

I am beating my head trying to figure this one out.  I know it's an 
object class violation, but I can't figure out if it's one that is in 
place or one that I am missing.  I thought that it may have been the 
ispAccount OC, but removing that and the ispParentAcct did not resolve 
the error.  I hope someone can help.   I apologize if this is better 
directed to the openldap list.

TIA

Bobby R. Cox
Linux Systems Administrator
Project Mutual Telephone
[EMAIL PROTECTED]
208.434.7185

Fix the problem,  not the blame.   

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


[PHP] Re: multilingual website

2004-02-06 Thread rush
Julien Dufourcq [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Or is there an other possibility?

with TemplateTamer, you will receive call back in method translate($key) for
places marked in template as {#SOMEKEY}, and the translation you return will
automatically get applied to the page.

rush
--
http://www.templatetamer.com/

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



RE: [PHP] CVS style project system

2004-02-06 Thread electroteque
Thats all good, i'd have to learn how to intergrate, also if i explained
earlier, if its taken a year of lobbying for cvs on the dev box, i doubt its
gonna go on the public machine. Also i never stored files as binary in the
db only the filenames as varchar.

5.) I am of the camp that thinks storing entire files in a database is a
bad thing.  Think of your filesystem as a database optimized for storing
files.

class new_wheel extends wheel  class new_wheel

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



RE: [PHP] CVS style project system

2004-02-06 Thread electroteque


I know you don't want to hear someone say use cvs so...

Use viewcvs[1], or write your own version of it.  You can put a database
behind it, add descriptions to projects and/or folders to your database,
whatever you want on top of cvs.  You can even use cvsgrab[2] to
download a repository from a viewcvs site.  There is also cvsweb[3], if
you think perl is better than python.  If you need to significantly
extend the functionality of these possible solutions and you still want
to hack out some PHP code then use these as a base for designing
whatever you are looking for.  As a side note, cvsgraph[4] integrates
nicely with viewcvs, and if you do use viewcvs check out the querycvs
script.

The points I am trying to impress are:
1.) Writing your own version of cvs in PHP is a bigger deal than you
likely realize.  Even if you do not need every single possible feature
of cvs your project will probably grow and you may some day.
2.) The rcs format does a good job of maintaining version control and if
you use cvs you get all of its stability, future improvements, etc.
3.) There is a long history behind cvs.  It has accumulated a large
amount of supporting applications, helper scripts, mailing lists (of
which I am on btw), etc.  In short an entire community.  It would be
better for us all if you would join in and help yourself.
4.) Short of using webdav[5] as well as basic HTTP it is a poor
usability decision to design a file based revision control system with
its only interface being via HTTP.  What if people want to download
entire directories, etc.  You can make direct cvs access an
afterthought, but still a possibility.
5.) I am of the camp that thinks storing entire files in a database is a
bad thing.  Think of your filesystem as a database optimized for storing
files.

class new_wheel extends wheel  class new_wheel

Regards,
Adam

I would also use these technologies, its definately a cvs backend thing,
with a php frontend, although i only have a week to do it, if i start
talking cvs like the report server which never happened, it'll start
complicating things, if i had access to do this it would happen str8 away.
Its pretty sad really i have to develop a work around mimicking something
that is already there.

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



Re: [PHP] php-general list question - [Fwd: Delivery Report (failure) forphp-general@lists.php.net]

2004-02-06 Thread Eric Bolikowski
Exactly the same thing's happening to me!

Luke [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Me too, and im using the newsgroup, not even the mailing list!! :/

-- 
Luke
  Craig [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

   I get one of these for almost every message I send, usually
   with a delay
   of a few days and always the same error.  I see my posts come from the
   list to me and I see people replying to my messages so the
   list seems to
   be processing my posts.  It's annoying however to keep getting these.
   Anybody else getting this?
  

  Yeah, I am getting bundles of these as well...

  -Craig

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



Re: [PHP] php-general list question - [Fwd: Delivery Report (failure) forphp-general@lists.php.net]

2004-02-06 Thread Rolf Brusletto
Eric Bolikowski wrote:

Exactly the same thing's happening to me!

Luke [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Me too, and im using the newsgroup, not even the mailing list!! :/
 



--
Rolf Brusletto
rolf[at]emailfeeds[dot]com
http://www.emailfeeds.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PhP to work with ftp

2004-02-06 Thread Mrs. Geeta Thanu
Hi all,

I have installed PHP to work with apache and is working fine.
Now I want to upgrade this PHP to support FTP also.
Should I have to Install now from the begining.

configure --with-mysql --with-apxs=/users/apache/bin/apxs

I have configured PHP with the above parameters.

Now should I have to again redo it with including
--enable-ftp also.

Pls help
Thanks
Geetha

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



Re: [PHP] PhP to work with ftp

2004-02-06 Thread Shaunak Kashyap
What version of PHP have you installed? What OS are you running?

http://us2.php.net/manual/en/ref.ftp.php says:

QUOTE
In order to use FTP functions with your PHP configuration, you should add
the --enable-ftp option when installing PHP 4 or --with-ftp when using PHP
3.
The windows version of PHP has built in support for this extension. You do
not need to load any additional extension in order to use these functions.
UNQUOTE

Also, try running phpinfo() on your system and see what it has to say about
ftp.

HTH,

Shaunak

- Original Message - 
From: Mrs. Geeta Thanu [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 06, 2004 8:48 PM
Subject: [PHP] PhP to work with ftp


 Hi all,

 I have installed PHP to work with apache and is working fine.
 Now I want to upgrade this PHP to support FTP also.
 Should I have to Install now from the begining.

 configure --with-mysql --with-apxs=/users/apache/bin/apxs

 I have configured PHP with the above parameters.

 Now should I have to again redo it with including
 --enable-ftp also.

 Pls help
 Thanks
 Geetha

 -- 
 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] getting classname of current class

2004-02-06 Thread Vivian Steller
Hi,

i've just another problem concerning classes, inheritance and the '::'
Syntax. Take a look at the following example code:

pre
?php
class MyClass extends MyParent{
private $__arr = Array();

public function __construct() {
$this-__arr(test);
}

public function __arr($var) {
array_push($this-__arr, $var);
}
}   

class MyParent {
public function getClassname() {
print(My classname:  . __class__ . \n);
print(My classname:  . get_class($this) . \n);
}
}

$obj = new MyClass();
// print_r($obj);

MyClass::getClassname();
?
/pre

Corresponding output:

 My classname: MyParent
 My classname: 


The problem is, that i want MyClass::getClassname() to return MyClass?!

Can anybody help me?

Thanks a lot.
vivi

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



[PHP] Call undefined function pspell_config_create().

2004-02-06 Thread Antonio J. Hdez. Blanco
Hola,

Tengo instalado apache+php 4.3.4 en w2k y estoy tratando de usar la libreria
de aspell, pero me da problemas, no reconoce las funciones de esta
biblioteca.

Para su instalación,
1. me copie el php 4.3.4 encima del php 4.3.3 ya que en esta distribucion
viene esta dll.
2. actualice el php.ini en la parte de las extensions.
3. baje el instalador de aspell para win32 y lo instale con sus dict
4. chequeo el phpinfo(), me dice que PSpell Support enabled.

Pero ahora no cuando corro un script, me dice,
Call undefined function pspell_config_create().

A alguien le ha pasado esto, alguna surgerencia.

Gracias de Ante mano.

saludos

antonio,

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



Re: [PHP] boolean search class

2004-02-06 Thread David T-G
Ray, et al --

...and then Ray Hunter said...
% 
% On Thu, 2004-02-05 at 20:46, David T-G wrote:
%  
%  I'm implementing a search and would like to move beyond accepting
...
%  are not in a database, so I won't be passing SQL code off to a real
%  searcher.]
% 
% How are you doing the search if not with a database?  What is your logic
% for implementing the search?

Very, very simple stuff.  The list of directories and files is held in an
array (a separate process uses File_Find-maptree() to make it after any
updates and writes the serialized array to a cache file, and then I read
it in) and I just want to do a text match.  At the moment I'm using
preg_grep but that just got a little unweildy because the next requirement
was for 'or' separated by spaces, so I quickly explode(' ')d the input
and now loop through the search array but I really don't want to have to
write a boolean parser (did it for class in college; that was enough :-)


% 
% I have used lucene (Jakarta-Apache) for doing searchs that is
% outstanding.

Hmmm...  Does this sound applicable?  What does lucene search?


% 
% --
% Ray


Thanks  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


[PHP] Pspell Functions!! problem I explain in English

2004-02-06 Thread Antonio J. Hdez. Blanco
Hello,
I have installed apache+php 4.3.4 in w2k and am trying to use library of
aspell, but it gives problems me, does not recognize the functions of this
library.
For its installation,
1, copies php to me 4.3.4 upon php 4.3.3 since in this distribution this DLL
comes.
2. update php.ini in the part of extensions.
3. lower the installer of aspell for win32 and control installs with his
dict
 4, phpinfo(), says that to PSpell Support enabled to me.

But now run the script, says to me,
 Call undefined function pspell_config_create().
To somebody this passed him.
Thanks of Before hand.
greetings antonio,
PD: sorry mi english is not good :(

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



[PHP] Whoa!!! e-Mail virus from bugs.php.net!

2004-02-06 Thread Scott Fletcher
Whoa!!  Just got an email today right from bugs.php.net and it was
intercepted by the Spam Firewall because it contain the Worm.SCO.A virus and
was removed before being send to me.  The email goes like this here

--snip--
Title: VIRUS (Worm.SCO.A) IN MAIL TO YOU (from [EMAIL PROTECTED])

Body: VIRUS ALERT
The Barracuda Spam Firewall found Worm.SCO.A virus in an email
to you from: [EMAIL PROTECTED]
The message has been blocked.
--snip--

How on earth can bugs.php.net get infected???  I'm not even familiar with
PHP bug #12494 'cause I never filed it or comment on it.

I think somebody should look into bugs.php.net webserver/e-mail server to
see that it is not infected.  Honestly

FletchSOD

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



[PHP] Re: Whoa!!! e-Mail virus from bugs.php.net!

2004-02-06 Thread Scott Fletcher
Internet Header is shown below...  (Actual DNS and IP are replaced by xxx
for security reason and keeping out spammers)

--snip--
Received: from xxx.xxx.xxx (xxx.xxx.xx.xx [xxx.xxx.xxx.xxx]) by xxx.xxx with
SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
 id XJ1MV77Q; Thu, 5 Feb 2004 21:20:21 -0500
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
MIME-Version: 1.0
Date: Thu,  5 Feb 2004 21:32:28 -0500 (EST)
From: [EMAIL PROTECTED]
Subject: VIRUS (Worm.SCO.A) IN MAIL TO YOU (from [EMAIL PROTECTED])
To: undisclosed-recipients: ;
Message-Id: [EMAIL PROTECTED]
--snip--

Scott Fletcher [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Whoa!!  Just got an email today right from bugs.php.net and it was
 intercepted by the Spam Firewall because it contain the Worm.SCO.A virus
and
 was removed before being send to me.  The email goes like this here

 --snip--
 Title: VIRUS (Worm.SCO.A) IN MAIL TO YOU (from [EMAIL PROTECTED])

 Body: VIRUS ALERT
 The Barracuda Spam Firewall found Worm.SCO.A virus in an email
 to you from: [EMAIL PROTECTED]
 The message has been blocked.
 --snip--

 How on earth can bugs.php.net get infected???  I'm not even familiar with
 PHP bug #12494 'cause I never filed it or comment on it.

 I think somebody should look into bugs.php.net webserver/e-mail server to
 see that it is not infected.  Honestly

 FletchSOD

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



Re: [PHP] Whoa!!! e-Mail virus from bugs.php.net!

2004-02-06 Thread Duncan Hill
On Friday 06 February 2004 14:06, Scott Fletcher wrote:
 Whoa!!  Just got an email today right from bugs.php.net and it was
 intercepted by the Spam Firewall because it contain the Worm.SCO.A virus
 and was removed before being send to me.  The email goes like this here

 --snip--
 Title: VIRUS (Worm.SCO.A) IN MAIL TO YOU (from [EMAIL PROTECTED])


That's mydoom - forging virus.

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



Re: [PHP] Whoa!!! e-Mail virus from bugs.php.net!

2004-02-06 Thread Stuart
Scott Fletcher wrote:
How on earth can bugs.php.net get infected???  I'm not even familiar with
PHP bug #12494 'cause I never filed it or comment on it.
I think somebody should look into bugs.php.net webserver/e-mail server to
see that it is not infected.  Honestly
Highly unlikely. Worms tend to fake the from address with an address 
picked at random from the infected users address book - that way they 
are likely to get past the simplest anti-spam measures. We've been 
getting hundreds of these a day lately. Damn pain they are too.

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


Re: [PHP] Re: Whoa!!! e-Mail virus from bugs.php.net!

2004-02-06 Thread Jason Wong
On Friday 06 February 2004 22:10, Scott Fletcher wrote:
 Internet Header is shown below...  (Actual DNS and IP are replaced by xxx
 for security reason and keeping out spammers)

How do you know that bugs.php.net really sent it to you?

Read up on how that particular virus works. Basically the sender is forged.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Most people can't understand how others can blow their noses differently
than they do.
-- Turgenev
*/

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



Re: [PHP] Running Apache in one machine and php in another

2004-02-06 Thread Raditha Dissanayake
Am I confusing.
yes
--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Whoa!!! e-Mail virus from bugs.php.net!

2004-02-06 Thread Scott Fletcher
 On Friday 06 February 2004 22:10, Scott Fletcher wrote:
  Internet Header is shown below...  (Actual DNS and IP are replaced by
xxx
  for security reason and keeping out spammers)
The DNS and IP that is replaced by xxx are the actual DNS  IP from my
company, so why should I give it away to the public newsgroup which is an
invitation for more spam mails.

FletchSOD


Jason Wong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Friday 06 February 2004 22:10, Scott Fletcher wrote:
  Internet Header is shown below...  (Actual DNS and IP are replaced by
xxx
  for security reason and keeping out spammers)

 How do you know that bugs.php.net really sent it to you?

 Read up on how that particular virus works. Basically the sender is
forged.

 -- 
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 Most people can't understand how others can blow their noses differently
 than they do.
 -- Turgenev
 */

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



Re: [PHP] Whoa!!! e-Mail virus from bugs.php.net!

2004-02-06 Thread Scott Fletcher
Thanks

Duncan Hill [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Friday 06 February 2004 14:06, Scott Fletcher wrote:
  Whoa!!  Just got an email today right from bugs.php.net and it was
  intercepted by the Spam Firewall because it contain the Worm.SCO.A virus
  and was removed before being send to me.  The email goes like this
here
 
  --snip--
  Title: VIRUS (Worm.SCO.A) IN MAIL TO YOU (from [EMAIL PROTECTED])
 

 That's mydoom - forging virus.

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



Re: [PHP] getting classname of current class

2004-02-06 Thread Adam Bregenzer
On Fri, 2004-02-06 at 08:29, Vivian Steller wrote:
 The problem is, that i want MyClass::getClassname() to return MyClass?!

I have the same problem:
http://marc.theaimsgroup.com/?l=php-generalm=107575408628272w=2

I continued discussion of this in the php internals list:
http://lists.php.net/article.php?group=php.internalsarticle=7520

What I have found so far is that it is impossible to get exactly what we
are looking for in php4.  When I get a moment again I want to renew the
discussion on the internals list and see if I can't get $this to be a
reference to a static instance of a class within static methods.
*crosses fingers*

Here is some sample code of what I use to get around this bug.  It's
leaky and imperfect, but it is inheritable.  Also, other than changing
the function name you can simply copy and paste the code into inherited
classes.  Also, while the extra parameter is there you would never call
the function with it in your code so the implementation is fairly clean.

class Foo { 
 function someFunc($class_name) {
  return $class_name;
 }
} 
class Bar extends Foo {
 function someFunc($class_name = NULL) {
  return parent::someFunc(isset($class_name) ? $class_name : __CLASS__);
 }
}

If you find a better solution *please* let me know.

-- 
Adam Bregenzer
[EMAIL PROTECTED]
http://adam.bregenzer.net/

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



Re: [PHP] boolean search class

2004-02-06 Thread Ray Hunter
On Fri, 2004-02-06 at 06:47, David T-G wrote:
 Very, very simple stuff.  The list of directories and files is held in an
 array (a separate process uses File_Find-maptree() to make it after any
 updates and writes the serialized array to a cache file, and then I read
 it in) and I just want to do a text match.  At the moment I'm using
 preg_grep but that just got a little unweildy because the next requirement
 was for 'or' separated by spaces, so I quickly explode(' ')d the input
 and now loop through the search array but I really don't want to have to
 write a boolean parser (did it for class in college; that was enough :-)

That is simple enough, however, I dont see much flexibility in it with
searching. So you are doing searching on directories and file names
based on what is in the serialized array?  Will you need to search the
document in the near future?

Lucene has that logic in it. However, not sure if lucene is the way to
go. It will work for what you are doing. However, it might be an
overkill depending on how many files you are searching on. You might be
able to write a regexep using preg_match that will return what you are
looking for.

--
Ray

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



Re: [PHP] Pspell Functions!! problem I explain in English

2004-02-06 Thread Adam Bregenzer
On Fri, 2004-02-06 at 08:51, Antonio J. Hdez. Blanco wrote: 
 But now run the script, says to me,
  Call undefined function pspell_config_create().

Reading the manual[1] on pspell I notice at the top it says this
function is not supported in windows.  However if you really do have a
pspell library for windows that somehow came with 4.3.3 and isn't
working with 4.3.4 you may be able to change your php.ini file to load
the extension[2] but I doubt it.

 PD: sorry mi english is not good :(

We may not speak many languages but the php manual does :)
http://www.php.net/manual/es/ref.pspell.php
http://www.php.net/manual/es/configuration.directives.php#ini.extension

Regards,
Adam

[1] http://www.php.net/manual/en/ref.pspell.php
[2]
http://www.php.net/manual/en/configuration.directives.php#ini.extension

-- 
Adam Bregenzer
[EMAIL PROTECTED]
http://adam.bregenzer.net/

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



RE: [PHP] CVS style project system

2004-02-06 Thread electroteque



I know you don't want to hear someone say use cvs so...

Use viewcvs[1], or write your own version of it.  You can put a database
behind it, add descriptions to projects and/or folders to your database,
whatever you want on top of cvs.  You can even use cvsgrab[2] to
download a repository from a viewcvs site.  There is also cvsweb[3], if
you think perl is better than python.  If you need to significantly
extend the functionality of these possible solutions and you still want
to hack out some PHP code then use these as a base for designing
whatever you are looking for.  As a side note, cvsgraph[4] integrates
nicely with viewcvs, and if you do use viewcvs check out the querycvs
script.

The points I am trying to impress are:
1.) Writing your own version of cvs in PHP is a bigger deal than you
likely realize.  Even if you do not need every single possible feature
of cvs your project will probably grow and you may some day.
2.) The rcs format does a good job of maintaining version control and if
you use cvs you get all of its stability, future improvements, etc.
3.) There is a long history behind cvs.  It has accumulated a large
amount of supporting applications, helper scripts, mailing lists (of
which I am on btw), etc.  In short an entire community.  It would be
better for us all if you would join in and help yourself.
4.) Short of using webdav[5] as well as basic HTTP it is a poor
usability decision to design a file based revision control system with
its only interface being via HTTP.  What if people want to download
entire directories, etc.  You can make direct cvs access an
afterthought, but still a possibility.
5.) I am of the camp that thinks storing entire files in a database is a
bad thing.  Think of your filesystem as a database optimized for storing
files.

class new_wheel extends wheel  class new_wheel

Regards,
Adam

Ideally how could i set this up, so it can force the users to downlod the
latest copy before uploading a newer version, or once a new copy is uploaded
it is emailed ?

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



[PHP] Weired session problem

2004-02-06 Thread Thomas Hochstetter
Hi guys,

Has anybody come across the same problem:

i am using the $_SESSION array to retrieve info of users. At times, however,
it just retrieves the wrong info, i.e. info from another user. how is that?

thanks in advance
Thomas

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



Re: [PHP] getting classname of current class

2004-02-06 Thread Marek Kilimajer
Not an answer to your question, but you should not use function names 
beginning with 2 underscores (__arr in your case) unless you want to use 
special functionality associated with that name (e.g. __construct). This 
will avoid possible conflicts with future version of php.

Vivian Steller wrote:

Hi,

i've just another problem concerning classes, inheritance and the '::'
Syntax. Take a look at the following example code:
pre
?php
class MyClass extends MyParent{
private $__arr = Array();
public function __construct() {
$this-__arr(test);
}

public function __arr($var) {
array_push($this-__arr, $var);
}
}   

class MyParent {
public function getClassname() {
print(My classname:  . __class__ . \n);
print(My classname:  . get_class($this) . \n);
}
}

$obj = new MyClass();
// print_r($obj);

MyClass::getClassname();
?
/pre

Corresponding output:


My classname: MyParent
My classname: 


The problem is, that i want MyClass::getClassname() to return MyClass?!

Can anybody help me?

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


[PHP] Undefined Index Errors

2004-02-06 Thread Cameron B. Prince

Hey guys,

Here's a chunk of code from the top of a multi-function page I converted
from Perl to PHP:

$userid   = $_REQUEST['USERID'];# USERID = selected userid
$dlist= $_REQUEST['DLIST']; # DLIST = indicates who to display
$action   = $_REQUEST['ACTION'];# ACTION = indicates approval or
denial
$more = $_REQUEST['MORE'];  # MORE = ID of person to show
details
$delete   = $_REQUEST['DELETE'];# DELETE = indicates to delete user
$ltr  = $_REQUEST['LTR'];   # LTR = start ltr of last name
$modpwd   = $_REQUEST['MODPWD'];# MODPWD = indicates modifying pwd
$expire   = $_REQUEST['EXPIRE'];# EXPIRE = indicates to expire pwd
$upduser  = $_REQUEST['UPDUSER'];   # UPDUSER = indicates user info
updated
$denyuser = $_REQUEST['DENYUSER'];  # DENYUSER = indicates user was
denied
$reason   = $_REQUEST['REASON'];# REASON = Reason user was denied

$adminID = $_ENV['HTTP_REMOTE_USER'];

I'm creating some strings from array elements obviously. The issue is, the
array elements don't always exist depending on which function you are
running. And when they don't, the server log is full of undefined index
errors. Is there a way I can avoid these errors without adding a
if(isset(...)) around each one?

Thanks,
Cameron

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



Re: [PHP] thumbnail script

2004-02-06 Thread Paul Furman
Jason Wong wrote:


manual  imagejpeg()  siblings


You could take a look at the source code for gallery for more ideas. 
Google gallery php or something like that.

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


[PHP] installing php with pdflib

2004-02-06 Thread merlin
Hi there,

after crashing my linux machine I do have to reinstall php.

Somehow I can't figure out how I installed php with pdflib. It is 
perfectly running on my live system.

I tryed to just copy the files from the other server and run -- 
with-pdflib like in the other config command, but it did not work out.

Then I downloaded the source from pdflib.com and tryed this:
'--with-pdflib-dir=/usr/lib/pdflib5'
Did not work as well.

Can anybody give me a hint how to solve this?

Thanx,

Merlin

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


Re: [PHP] Weired session problem

2004-02-06 Thread Chris Shiflett
--- Thomas Hochstetter [EMAIL PROTECTED] wrote:
 i am using the $_SESSION array to retrieve info of users. At times,
 however, it just retrieves the wrong info, i.e. info from another user.
 how is that?

You need to provide some details. What is your exact method of testing?
What is the exact result? What is the smallest example script that you can
provide that demonstrates the problem?

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming mid-2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/

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



Re: [PHP] Undefined Index Errors

2004-02-06 Thread Marek Kilimajer
You can either:

1. put @ in front of each variable, e.g.
$adminID = @$_ENV['HTTP_REMOTE_USER'];
2. change your error reporting level:
error_reporting(E_ALL ^ E_NOTICE);
Cameron B. Prince wrote:

Hey guys,

Here's a chunk of code from the top of a multi-function page I converted
from Perl to PHP:
$userid   = $_REQUEST['USERID'];# USERID = selected userid
$dlist= $_REQUEST['DLIST']; # DLIST = indicates who to display
$action   = $_REQUEST['ACTION'];# ACTION = indicates approval or
denial
$more = $_REQUEST['MORE'];  # MORE = ID of person to show
details
$delete   = $_REQUEST['DELETE'];# DELETE = indicates to delete user
$ltr  = $_REQUEST['LTR'];   # LTR = start ltr of last name
$modpwd   = $_REQUEST['MODPWD'];# MODPWD = indicates modifying pwd
$expire   = $_REQUEST['EXPIRE'];# EXPIRE = indicates to expire pwd
$upduser  = $_REQUEST['UPDUSER'];   # UPDUSER = indicates user info
updated
$denyuser = $_REQUEST['DENYUSER'];  # DENYUSER = indicates user was
denied
$reason   = $_REQUEST['REASON'];# REASON = Reason user was denied
$adminID = $_ENV['HTTP_REMOTE_USER'];

I'm creating some strings from array elements obviously. The issue is, the
array elements don't always exist depending on which function you are
running. And when they don't, the server log is full of undefined index
errors. Is there a way I can avoid these errors without adding a
if(isset(...)) around each one?
Thanks,
Cameron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Undefined Index Errors

2004-02-06 Thread Adam Bregenzer
On Fri, 2004-02-06 at 10:51, Cameron B. Prince wrote:
 I'm creating some strings from array elements obviously. The issue is, the
 array elements don't always exist depending on which function you are
 running. And when they don't, the server log is full of undefined index
 errors. Is there a way I can avoid these errors without adding a
 if(isset(...)) around each one?

If you know which variables are required per 'function' that is being
called wrap an if around these variable declarations in blocks.  You
will still have ifs, but you should have a lot fewer.  If by function
you mean actual functions then you could move these lines to the top of
their respective functions.

-- 
Adam Bregenzer
[EMAIL PROTECTED]
http://adam.bregenzer.net/

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



Re: [PHP] Undefined Index Errors

2004-02-06 Thread John W. Holmes
From: Cameron B. Prince [EMAIL PROTECTED]

 I'm creating some strings from array elements obviously. The issue is, the
 array elements don't always exist depending on which function you are
 running. And when they don't, the server log is full of undefined index
 errors. Is there a way I can avoid these errors without adding a
 if(isset(...)) around each one?

Adjust your error_reporting() level so these notices don't show up.

---John Holmes...

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



Re: [PHP] Pspell Functions!! problem I explain in English

2004-02-06 Thread Antonio J. Hdez. Blanco
Hi Adams,

 Reading the manual[1] on pspell I notice at the top it says this
 function is not supported in windows.

I have read the manual several times, and also usr contributed notes where
Elizabeth, explains the installation in w2k.

I does she explained, but no work.

However if you really do have a
 pspell library for windows that somehow came with 4.3.3 and isn't
 working with 4.3.4 you may be able to change your php.ini file to load
 the extension[2] but I doubt it.

But the problem persists, since comprobe the dinamic load by means of the
function print_r(get_loaded_extensions());
and it shows that library php_pspell.dll is loaded,
and this to me means that php.ini this good.

By that as is not the problem, if continuous will prove in * nix.

thank you very much

antonio,

PD: you said the very TRUE  We may not speak many languages but the php
manual does :)

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



Re: [PHP] Running Apache in one machine and php in another

2004-02-06 Thread Brian V Bonini
On Fri, 2004-02-06 at 13:57, Mrs. Geeta Thanu wrote:
 Hi all,
 
 I have configured Apache webserver executing PHP scripts on sun machine
 and everything is  working fine.
 
  Now I want the web server to pass on the PHP executions to
 another machine and once done should get the result and display it.
 
 Is it possible .
 

Sure.

xml/rpc would be one possibility.

-- 
BrianGnuPG - KeyID: 0x04A4F0DC | URL: www.gfx-design.com/keys
  Key Server: pgp.mit.edu
==
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
GnuPG: http://gnupg.org
http://www.biglumber.com/x/web?qs=0x2C35011004A4F0DC
Linux Registered User #339825 at http://counter.li.org


signature.asc
Description: This is a digitally signed message part


Re: [PHP] installing php with pdflib

2004-02-06 Thread Jason Wong
On Friday 06 February 2004 23:51, merlin wrote:

 Somehow I can't figure out how I installed php with pdflib. It is
 perfectly running on my live system.

 I tryed to just copy the files from the other server and run --
 with-pdflib like in the other config command, but it did not work out.

 Then I downloaded the source from pdflib.com and tryed this:
 '--with-pdflib-dir=/usr/lib/pdflib5'

It seems that v5.x of the pdflib has a different (and seemingly more complex) 
installation procedure to that of 4.x.

The installation instructions for 5.x discourages you from installing from 
source and suggests that you install from the pre-built binaries.

As I haven't had time to figure out how to install 5.x yet I decided to stick 
with one of the 4.x releases.

So if there's nothing compelling in 5.x that you need then you could just use 
one of the 4.x versions as installation of those are straightforward:

Extract the tarball
./configure
   make
   make test
   make install

Then add '--with-pdflib=/usr/local' in your php ./configure command.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
A jury consists of twelve persons chosen to decide who has the better lawyer.
-- Robert Frost
*/

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



[PHP] CMS Question

2004-02-06 Thread Ashley M. Kirchner
   Does anyone know of any open source, document management type CMS? 
Basically what we need is a way to keep documents stored and available 
online for download/print.  Most of these documents are currently in 
printed form (hard copy,) so they'll get scanned in and then uploaded as 
gifs or jpgs (unless I find people who are willing to actually retype it 
all, but I doubt that.)  opensourcecms.com doesn't specifically list 
any, and I'm going through the list of what's available on there right 
now, but they also don't include everything, so I thought I'd throw out 
a question to the rest of the world...

--
W | I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Undefined Index Errors

2004-02-06 Thread Cameron B. Prince
 1. put @ in front of each variable, e.g.
   $adminID = @$_ENV['HTTP_REMOTE_USER'];

This worked very nicely...

Thank you!



  Hey guys,
 
  Here's a chunk of code from the top of a multi-function page I converted
  from Perl to PHP:
 
  $userid   = $_REQUEST['USERID'];# USERID = selected userid
  $dlist= $_REQUEST['DLIST']; # DLIST = indicates who
 to display
  $action   = $_REQUEST['ACTION'];# ACTION = indicates approval or
  denial
  $more = $_REQUEST['MORE'];  # MORE = ID of person to show
  details
  $delete   = $_REQUEST['DELETE'];# DELETE = indicates to
 delete user
  $ltr  = $_REQUEST['LTR'];   # LTR = start ltr of last name
  $modpwd   = $_REQUEST['MODPWD'];# MODPWD = indicates
 modifying pwd
  $expire   = $_REQUEST['EXPIRE'];# EXPIRE = indicates to
 expire pwd
  $upduser  = $_REQUEST['UPDUSER'];   # UPDUSER = indicates user info
  updated
  $denyuser = $_REQUEST['DENYUSER'];  # DENYUSER = indicates user was
  denied
  $reason   = $_REQUEST['REASON'];# REASON = Reason user
 was denied
 
  $adminID = $_ENV['HTTP_REMOTE_USER'];
 
  I'm creating some strings from array elements obviously. The
 issue is, the
  array elements don't always exist depending on which function you are
  running. And when they don't, the server log is full of undefined index
  errors. Is there a way I can avoid these errors without adding a
  if(isset(...)) around each one?
 
  Thanks,
  Cameron
 

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



Re: [PHP] CMS Question

2004-02-06 Thread Marek Kilimajer
You should search for php document management system, not cms. I quickly 
found http://terracotta.sourceforge.net/ and 
http://dms.markuswestphal.de/about.html

Ashley M. Kirchner wrote:

   Does anyone know of any open source, document management type CMS? 
Basically what we need is a way to keep documents stored and available 
online for download/print.  Most of these documents are currently in 
printed form (hard copy,) so they'll get scanned in and then uploaded as 
gifs or jpgs (unless I find people who are willing to actually retype it 
all, but I doubt that.)  opensourcecms.com doesn't specifically list 
any, and I'm going through the list of what's available on there right 
now, but they also don't include everything, so I thought I'd throw out 
a question to the rest of the world...

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


Re: [PHP] Weired session problem

2004-02-06 Thread Thomas Hochstetter
Hey,

I am having users sign in on a index.php which directs them to the members
page (same: index.php). There i have links that open small windows via js.
These have session_start() in them to continue the same session variable.
Then there i would have something like: 

[snip]
$tusr = $_SESSION['fn'] .   . $_SESSION['ln'];

or 

sendReceived( $_POST['title'], $_POST['tusr'], $_SESSION['email'] );

[/snip]

So it is supposed to get the right info from the current sesssion with which
one logged in.

Thomas

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



[PHP] var references

2004-02-06 Thread Arthur Pelkey
I have the following:

?php
include('../../../db2.php');
$blat = $tue_5a;

$result = mysql_query(SELECT * FROM classes WHERE c_d_tue='1' AND 
c_s_tue_1_hr='5' AND c_s_tue_1_dn='am');

while($row = mysql_fetch_array($result)) {
	switch($blat) {
 	case tue_5a:
 		$min_1 = $row[29];
 		break;
 	}
 	?
 	class title:brinput type=text value=? echo $row[c_title]; 
?/inputbr
 	class minute:brinput type=text value=? echo $min_1; 
?/inputbr
 	class description:brtextarea? echo $row[c_desc]; ?/textareabr
	?
}
?

Why can I not refence the row[29] from min_1? ive tried various ways and 
nothing shows up unless i actually put the assoc array value. Any ideas?

It should display 50.

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


Re: [PHP] installing php with pdflib

2004-02-06 Thread merlin
Hi Jason,

I just need 3.x since this is the version on my live server. However, I 
cant find any 4.x or 3.x version of pdflib

on pdflib.com there is a free version called pdflib lite. Pdflib 5.x 
costs over 400$. I do not need 5.x, just basic pdf generating.

Can you point me to a download place for 4.x?

merlin

Jason Wong schrieb:

On Friday 06 February 2004 23:51, merlin wrote:


Somehow I can't figure out how I installed php with pdflib. It is
perfectly running on my live system.
I tryed to just copy the files from the other server and run --
with-pdflib like in the other config command, but it did not work out.
Then I downloaded the source from pdflib.com and tryed this:
'--with-pdflib-dir=/usr/lib/pdflib5'


It seems that v5.x of the pdflib has a different (and seemingly more complex) 
installation procedure to that of 4.x.

The installation instructions for 5.x discourages you from installing from 
source and suggests that you install from the pre-built binaries.

As I haven't had time to figure out how to install 5.x yet I decided to stick 
with one of the 4.x releases.

So if there's nothing compelling in 5.x that you need then you could just use 
one of the 4.x versions as installation of those are straightforward:

Extract the tarball
./configure
   make
   make test
   make install
Then add '--with-pdflib=/usr/local' in your php ./configure command.

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


Re: [PHP] installing php with pdflib

2004-02-06 Thread John Nichel
merlin wrote:
Hi Jason,

I just need 3.x since this is the version on my live server. However, I 
cant find any 4.x or 3.x version of pdflib

on pdflib.com there is a free version called pdflib lite. Pdflib 5.x 
costs over 400$. I do not need 5.x, just basic pdf generating.

Can you point me to a download place for 4.x?

merlin
You have to jump thru hoops to get them (the pdflib people) to send it 
to you, and it took me forever to find it a few months ago.  So, to save 
you the trouble I had to go thru

http://www.by-tor.com/downloads/temp/pdflib-4.0.3.tar.gz

Because I'm a great guy. ;)

--
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] var references

2004-02-06 Thread Chris W. Parker
Arthur Pelkey mailto:[EMAIL PROTECTED]
on Friday, February 06, 2004 9:46 AM said:

 $blat = $tue_5a;

[snip]

 while($row = mysql_fetch_array($result)) {
   switch($blat) {
   case tue_5a:
   $min_1 = $row[29];
   break;
   }

[snip]

 Why can I not refence the row[29] from min_1? ive tried various ways
 and nothing shows up unless i actually put the assoc array value. Any
 ideas? 

i think you forgot your $ in front of the tue_5a in 'case tue_5a'?
otherwise the way you are using tue_5a the second time, appears to be a
constant and not a string or a regular variable.



hth,
chris.

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



Re: [PHP] var references

2004-02-06 Thread Arthur Pelkey
Thanks!, my syntax was a bit off, havn't had much sleep, but it kept 
slipping by me ;)

Chris W. Parker wrote:

Arthur Pelkey mailto:[EMAIL PROTECTED]
on Friday, February 06, 2004 9:46 AM said:

$blat = $tue_5a;


[snip]


while($row = mysql_fetch_array($result)) {
switch($blat) {
case tue_5a:
$min_1 = $row[29];
break;
}


[snip]


Why can I not refence the row[29] from min_1? ive tried various ways
and nothing shows up unless i actually put the assoc array value. Any
ideas? 


i think you forgot your $ in front of the tue_5a in 'case tue_5a'?
otherwise the way you are using tue_5a the second time, appears to be a
constant and not a string or a regular variable.


hth,
chris.


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


[PHP] beginner question about while loops

2004-02-06 Thread Paul Furman
Totally ignorant need for clarification... Should I set up a counter for 
loops $integer++ or if I'm going through something, the while function 
knows to just go through those and fills in array numbers accordingly?

Below is my project (while loop at the bottom):

I'm getting unexpected $end on line 18 but the file only has 17 lines!

?php
  if (isset ($_REQUEST ['IMGDIR'])){
  $imagedir=$_REQUEST ['IMG_DIR'];
   } else {
  $imagedir = PUB_DIR . '/grasses';
   #PUB_DIR coordinates my public htm location at home  school
   }
  if (!(chdir ($imagedir))){
print invalid directory;
}
  $fh=opendir($imagedir);
  while ($file = readdir($dh)){
  if (strstr ($file, '.jpg')){
  $pictures[] = $file;
  }
  #vardump ($pictures[]);
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] beginner question about while loops

2004-02-06 Thread Eric Gorr
At 11:41 AM -0800 2/6/04, Paul Furman wrote:
  while ($file = readdir($dh)){
  if (strstr ($file, '.jpg')){
  $pictures[] = $file;
  }
Spotted this problem when staring at your code.

Number of open braces: 2
Number of close braces: 1
You need to close off your while loop.

Should I set up a counter for loops $integer++ or if I'm going 
through something
You can if you like, but it is not necessary in this case.

the while function knows to just go through those and fills in array 
numbers accordingly?
The while function has nothing to do with it. Using the syntex 
$array[] simply adds an element onto the _end_ of the array and PHP 
picks the next logical, numerical index.

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


RE: [PHP] beginner question about while loops

2004-02-06 Thread Alex Hogan
You didn't close your loop;

while ($file = readdir($dh)){
if (strstr ($file, '.jpg')){
$pictures[] = $file;
}
#vardump ($pictures[]);
} = here
 ?

instead of;

while ($file = readdir($dh)){
if (strstr ($file, '.jpg')){
$pictures[] = $file;
}
#vardump ($pictures[]);
 ?

alex

 -Original Message-
 From: Paul Furman [mailto:[EMAIL PROTECTED]
 Sent: Friday, February 06, 2004 1:41 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] beginner question about while loops
 
 Totally ignorant need for clarification... Should I set up a counter for
 loops $integer++ or if I'm going through something, the while function
 knows to just go through those and fills in array numbers accordingly?
 
 Below is my project (while loop at the bottom):
 
 I'm getting unexpected $end on line 18 but the file only has 17 lines!
 
 ?php
if (isset ($_REQUEST ['IMGDIR'])){
$imagedir=$_REQUEST ['IMG_DIR'];
 } else {
$imagedir = PUB_DIR . '/grasses';
 #PUB_DIR coordinates my public htm location at home  school
 }
if (!(chdir ($imagedir))){
  print invalid directory;
  }
$fh=opendir($imagedir);
while ($file = readdir($dh)){
if (strstr ($file, '.jpg')){
$pictures[] = $file;
}
#vardump ($pictures[]);
 ?
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
** 




Re: [PHP] beginner question about while loops

2004-02-06 Thread Paul Furman
Eric Gorr wrote:

the while function knows to just go through those and fills in array 
numbers accordingly?


The while function has nothing to do with it. Using the syntax $array[] 
simply adds an element onto the _end_ of the array and PHP picks the 
next logical, numerical index.


OK thanks guys, I got the missing curly brace  some other messes.

So when assigning values to an array inside a loop, it knows to advance 
to the next but then if I want to print those out at the same time, it's 
complaining

  while ($file = readdir($fh)){
  if (strstr ($file, '.jpg')){
  $pictures[] = $file;
  #print $pictures[];  #Fatal error: Cannot use [] for reading
  }
  var_dump ($pictures[]); #Fatal error: Cannot use [] for reading
  }


This one works but complains about Undefined variable: pictures NULL 
array (but it dumps the contents of $pictures[]:

  while ($file = readdir($fh)){
  if (strstr ($file, '.jpg')){
  $pictures[] = $file;
  }
  var_dump ($pictures);
  }
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] beginner question about while loops

2004-02-06 Thread Rob Adams

Paul Furman [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Eric Gorr wrote:

[snip]


while ($file = readdir($fh)){
if (strstr ($file, '.jpg')){
$pictures[] = $file;
#print $pictures[];  #Fatal error: Cannot use [] for reading

Which element are you trying to print?  I'm guessing the current one, so
just use:
  print $file;

}
var_dump ($pictures[]); #Fatal error: Cannot use [] for reading
}



 This one works but complains about Undefined variable: pictures NULL
 array (but it dumps the contents of $pictures[]:

while ($file = readdir($fh)){
if (strstr ($file, '.jpg')){
$pictures[] = $file;
}
var_dump ($pictures);
}

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



RE: [PHP] beginner question about while loops

2004-02-06 Thread Shaunak Kashyap
1. Using [] creates a new array element. Hence the error. You can try this
piece of code inside the loop

[code]
if (strstr ($file, '.jpg')){

$refPictures =  $pictures[];

$refPictures = $file;
  print $refPictures;
}
[/code]

$refPictures holds a reference to the newly created element of the $pictures
array. Therefore, by assigning $file to $refPictures, $file is actually
getting assigned to the newly created element of the $pictures array. The
same logic applies in the print statement

2. Again, using [] in the var_dump indicates that you are trying to create a
new element of the $pictures array. If dumping the contents of the entire
array along with their data types and such is what you are trying to
achieve, the correct syntax is

[code]
var_dump($pictures);
[/code]

 -Original Message-
 From: Paul Furman [mailto:[EMAIL PROTECTED]
 Sent: Friday, February 06, 2004 3:09 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] beginner question about while loops


 Eric Gorr wrote:
 
  the while function knows to just go through those and fills in array
  numbers accordingly?
 
 
  The while function has nothing to do with it. Using the syntax $array[]
  simply adds an element onto the _end_ of the array and PHP picks the
  next logical, numerical index.


 OK thanks guys, I got the missing curly brace  some other messes.

 So when assigning values to an array inside a loop, it knows to advance
 to the next but then if I want to print those out at the same time, it's
 complaining

while ($file = readdir($fh)){
if (strstr ($file, '.jpg')){
$pictures[] = $file;
#print $pictures[];  #Fatal error: Cannot use [] for reading
}
var_dump ($pictures[]); #Fatal error: Cannot use [] for reading
}



 This one works but complains about Undefined variable: pictures NULL
 array (but it dumps the contents of $pictures[]:

while ($file = readdir($fh)){
if (strstr ($file, '.jpg')){
$pictures[] = $file;
}
var_dump ($pictures);
}

 --
 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] beginner question about while loops

2004-02-06 Thread John W. Holmes

- Original Message - 
From: Paul Furman [EMAIL PROTECTED]

 Totally ignorant need for clarification... Should I set up a counter for
 loops $integer++ or if I'm going through something, the while function
 knows to just go through those and fills in array numbers accordingly?
[snip]
while ($file = readdir($dh)){
if (strstr ($file, '.jpg')){
$pictures[] = $file;
}

With this syntax, you do not need to keep an $integer variable for the array
key. When you use $array[] = something, it just assigns that value to the
next available numeric key.

while ($file = readdir($dh)){
if (strstr ($file, '.jpg')){
$pictures[$int++] = $file;
}

Would also be correct, if you wanted to keep the count yourself. You could
also use array_push().

Just make sure $pictures is defined as an array before you try to push a
value onto it (even using the method you have now), otherwise you'll get a
warning.

---John Holmes...

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



Re: [PHP] beginner question about while loops

2004-02-06 Thread Paul Furman
OK thanks again for helping through the stumbling blocks... I'm rolling 
again now.

John W. Holmes wrote:
Just make sure $pictures is defined as an array before you try to push a
value onto it (even using the method you have now), otherwise you'll get a
warning.
It seems to be working fine this way without defining it as an array but 
I guess other languages would not accept that approach.

   while ($file = readdir($dh)){
if (strstr ($file, '.jpg')){
$pictures[] = $file;
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] beginner question about while loops

2004-02-06 Thread John W. Holmes
From: Paul Furman [EMAIL PROTECTED]

 So when assigning values to an array inside a loop, it knows to advance
 to the next but then if I want to print those out at the same time, it's
 complaining

while ($file = readdir($fh)){
if (strstr ($file, '.jpg')){
$pictures[] = $file;
#print $pictures[];  #Fatal error: Cannot use [] for reading
}
var_dump ($pictures[]); #Fatal error: Cannot use [] for reading
}

Can't do that, like it says. You just assigned $file to $print.. so just
display the value of $file.

---John Holmes...

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



Re: [PHP] boolean search class

2004-02-06 Thread David T-G
Ray, et al --

...and then Ray Hunter said...
% 
% On Fri, 2004-02-06 at 06:47, David T-G wrote:
%  Very, very simple stuff.  The list of directories and files is held in an
%...

% That is simple enough, however, I dont see much flexibility in it with

Just between you and me, I tend to agree, but at this point we don't need
flexibility.


% searching. So you are doing searching on directories and file names

Not quite; the serialized array *does* contain the directory list.
Imagine

  $tree =
  (
[0] =
(
  [0] = ./d1 ,
  [1] = ./d2 ,
  [2] = ./d2/s1 ,
  [3] = ./d2/s1/s2 ,
) ,
[1] =
(
  [0] = ./d1/f1 ,
  [0] = ./d1/f2 ,
  [1] = ./d2/f3 ,
  [1] = ./d2/f4 ,
  [1] = ./d2/f5 ,
  [2] = ./d2/s1/f6 ,
  [3] = ./d2/s1/s2/f7 ,
  [3] = ./d2/s1/s2/f8 ,
)
  )

or so.  Now my input is 'd1' or 'f2' or even 'd1 f2' or such.


% based on what is in the serialized array?  Will you need to search the
% document in the near future?

Presumably; this is a way to look through a directory tree and return
pointers to those that match.  Typically we'll have an array of 20 or 30
directories; often we'll have maybe 100; on rare occasion we might have
250 or more.


% 
% Lucene has that logic in it. However, not sure if lucene is the way to
% go. It will work for what you are doing. However, it might be an

OK; I'll at least read up on it.  Thanks!


% overkill depending on how many files you are searching on. You might be
% able to write a regexep using preg_match that will return what you are
% looking for.

Probably, but I'm more worried about handling some wacky input like

  (this or that) and the and (ot or her)

or something wonky.  So I could always kick back a no way, buddy! error
but I don't want to throw up all over everything getting confused by it.


% 
% --
% Ray


Thanks  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


[PHP] PHP/MySQL Tables - CSS and Sortable Columns (Newbie Questions)

2004-02-06 Thread Freedomware
I posted three questions at 
http://geowebworks.geobop.org/test/php/notes.php, if anyone is willing 
to take a look.

You could reply on this list or via the e-mail address on the URL above.

Thanks!

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


[PHP] PHP, Excel, and tab delimited files question

2004-02-06 Thread Jay Blanchard
In many of our apps we save tab delimited text files to be later opened
from the browser using the following set of headers;

header(Content-Type:  application/vnd.ms-excel);
header(Content-Disposition: inline; filename=\excel.xls\);
header(Expires: 0);
header(Cache-Control: must-revalidate post-check=0 pre-check=0);

However, fields that start with 0 (zero) generally drop the zero so that
0201 becomes 201 (which is not correct for our purposes). Does anyone
know a quick way to specify in the header to make it text only?

TIA!

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



Re: [PHP] thumbnail script

2004-02-06 Thread David T-G
Ryan --

...and then Ryan A said...
% 
% Hi,
% Anybody know of a thumbnail script which does either one of the following:
[snip]

Why, yes.  I call it

  http://web-folio.net/

and it does everything for which you ask and then some.  Just send all of
your clients to host with me and I'll give you a commission ;-)

OK...  Having spent quite a bit of time developing our gallery script
and a bit of looking around at competition, I haven't seen anything that
comes close.  In general, though, it's not too tough to check your source
files and both make the thumbnails and generate their image tags to
output in the page.


HTH  HAND  Good luck!

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


RE: [PHP] PHP, Excel, and tab delimited files question

2004-02-06 Thread jon roig
Don't do it in the header, but in the field itself just put a ' before
the first character and excel will interpret it as a text field.

-- jon

---
jon roig
web developer
email: [EMAIL PROTECTED]
phone: 888.230.7557



-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 06, 2004 2:40 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP, Excel, and tab delimited files question


In many of our apps we save tab delimited text files to be later opened
from the browser using the following set of headers;

header(Content-Type:  application/vnd.ms-excel);
header(Content-Disposition: inline; filename=\excel.xls\);
header(Expires: 0);
header(Cache-Control: must-revalidate post-check=0 pre-check=0);

However, fields that start with 0 (zero) generally drop the zero so that
0201 becomes 201 (which is not correct for our purposes). Does anyone
know a quick way to specify in the header to make it text only?

TIA!

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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004
 

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



RE: [PHP] PHP, Excel, and tab delimited files question

2004-02-06 Thread Jay Blanchard
[snip]
Don't do it in the header, but in the field itself just put a ' before
the first character and excel will interpret it as a text field.
[/snip]

Tried that, the ' shows up. Don't want that to happen

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



Re: [PHP] recursive direcotry listing

2004-02-06 Thread David T-G
Binay, et al --

...and then Binay said...
% 
% Hi all,

Hiya!


% 
% is there function which scans a particual directory recurisly and stores the content 
in array or other way? Listing of files should be in alphabetical way and directories 
should come on top.

Yep.  Get the File_Find pear module and just

  $find = new File_Find ;
  $separate = $find-maptree(.) ;
  $mixed = $find-maptreemultiple(.) ;

Now $separate looks like

  Array
  (
[0] =
(
  [0] = .
  [1] = ./d1
),
[1] =
(
  [0] = ./f1
  [1] = ./f2
  [2] = ./d1/f3
)
  )

and $mixed looks like

  Array
  (
[0] = f1
[1] = f2
[d1] =
Array
(
  [0] = f3
)
  )


% 
% Thanks
% 
% Binay


HTH  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


Re: [PHP] PHP, Excel, and tab delimited files question

2004-02-06 Thread Marek Kilimajer
Do double quotes around help?

Jay Blanchard wrote:
[snip]
Don't do it in the header, but in the field itself just put a ' before
the first character and excel will interpret it as a text field.
[/snip]
Tried that, the ' shows up. Don't want that to happen

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


[PHP] Surpressing a 'foreach' Error Message

2004-02-06 Thread Shaun
Hi,

I have some check boxes in a form and when the form is submitted I read the
checkboxes that have been ticked. However if no checkboxes have been ticked
the following line produces an error, is there a way to suppress this?

foreach ($project as $project_id = $value) {
  $fields[] = $project_id;
  $values[] = $value;
}

Many thanks

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



RE: [PHP] Surpressing a 'foreach' Error Message

2004-02-06 Thread craig
 Hi,

 I have some check boxes in a form and when the form is
 submitted I read the
 checkboxes that have been ticked. However if no checkboxes
 have been ticked
 the following line produces an error, is there a way to suppress this?

if (is_array($project))
 foreach ($project as $project_id = $value) {
   $fields[] = $project_id;
   $values[] = $value;
 }


if (is_array($project))
  foreach ($project as $project_id = $value) {
$fields[] = $project_id;
$values[] = $value;
  }
}

HTH,
Craig

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



RE: [PHP] Surpressing a 'foreach' Error Message

2004-02-06 Thread Chris W. Parker
craig mailto:[EMAIL PROTECTED]
on Friday, February 06, 2004 2:24 PM said:

 if (is_array($project))
   foreach ($project as $project_id = $value) {
 $fields[] = $project_id;
 $values[] = $value;
   }
 }

you're missing a curly brace after the if ().

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



Re: [PHP] FreeBSD to Linux -- PHP Issues

2004-02-06 Thread David T-G
Daryl, et al --

...and then Daryl Meese said...
% 
% Hello all,

Hi!


% 
% I am considering changing hosting providers and moving from FreeBSD to
% Linux.

Because that's what the hosting provider you have in mind runs or because
you want to go with Linux?


% 
% My question is are there any PHP related issues to moving (functions that
% don't work on Linux but do on FreeBSD, etc)?

I haven't had any problems.  I host my sites on FreeBSD 4.5 and 4.8 and
develop on Linux (SuSE 8.1 and 9.0 and an LFS homebrew box).  I did
another project for a guy hosting Linux here at the same ISP.  Everything
has been peachy.


% 
% I doubt there are but have to cover the bases.

Good for you :-)  Of course, you won't really know until you run your
code on the new platform!


% 
% Also, if you got any suggestions for hosts with solid dedicated server plans
% I would appreciate replies of the list.

I host at DataPipe and absolutely love them.  I've pushed their UNIX
techs pretty hard (my FreeBSD boxes have a pretty involved PHP build,
while the Linux box needed some custom disk layout for mail tuning) and
they've kept up well.  They do everything from shared to dedicated and
their prices are pretty good -- and I've seen them match, too.

Yes, I sometimes can talk them into a free month for my cheapest server
if I send them a new customer, so if you do go to them I'd appreciate
your telling Don in sales that I sent you, but you don't have to and I
don't get anything else in any case :-)


% 
% Thanks,
% 
% 
% Daryl Meese


HTH  HAND  Happy hunting :-)

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


RE: [PHP] Surpressing a 'foreach' Error Message

2004-02-06 Thread craig
  craig mailto:[EMAIL PROTECTED]
 on Friday, February 06, 2004 2:24 PM said:
 
  if (is_array($project))
foreach ($project as $project_id = $value) {
  $fields[] = $project_id;
  $values[] = $value;
}
  }
 
 you're missing a curly brace after the if ().
 

my bad, that's what you get when you don't actually
run the code. Thank god for compilers ;)

-Craig

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



Re: [PHP] thumbnail script

2004-02-06 Thread Ryan A
Hey David (my pal with the funny % prefix to replies...:-p )
Thanks for replying.

 Why, yes.  I call it
 http://web-folio.net/

Nice name.

 and it does everything for which you ask and then some.
Kewl, is it free and can i download it and use it on my website?

  Just send all of
 your clients to host with me and
 I'll give you a commission ;-)

Damn, that answers my question, its not free and I cant download and use it
on my website (wa)

On a more serious note, nice site mate, but reay steep on the pocket,
$250 setup fee? my pal sets up
computers and furnature for a lot less, and $25 a month for 100mb space? I
know porn friendly sites that
charge less and offer more. Reading prices like that made my right hand jump
for the mouse and find the little
x at the top right of my browser and made me reach for a coke because of the
fright I got! :-D
I'm pretty sure you wont get anyone off the list purchasing an account and
there are a lot of people out there
who pay more for _total_ crap, and your service is good sobest of
luck and hope it goes well.


 OK...  Having spent quite a bit of time developing our gallery script
 and a bit of looking around at competition, I haven't
 seen anything that
 comes close.

This sort of an app never really did cross my mind...so i dont know what
your compettion is like, have a couple
of urls? I promise i wont join any of them :-p

  In general, though, it's not too tough to check your source
 files and both make the thumbnails and generate their image tags to
 output in the page.

Yeah, thats what i have been told on the list and off, but I have never
really worked with GD + the image functions
and it seems better to first look around to see if anyone already made this
rather than to try to invent the wheel all over
again, although I agree with Justin saying that while remaking the wheel
you will understand the code better and it will
be more specific to your needs. Another problem is I have GD 1 on one server
and GD 2 on another...

I did get a few really helpful souls off the list who sent me code, mainly
for jpg stuff, will try that out.

 HTH  HAND  Good luck!

Sure did, and the same to you dude.

Cheers,
-Ryan

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



Re: [PHP] Surpressing a 'foreach' Error Message

2004-02-06 Thread Chris Edwards
The is_array will still give a warning is the variable array does not exist.
Use isset()
- Original Message - 
From: craig [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 06, 2004 5:35 PM
Subject: RE: [PHP] Surpressing a 'foreach' Error Message


  craig mailto:[EMAIL PROTECTED]
  on Friday, February 06, 2004 2:24 PM said:
 
   if (is_array($project))
 foreach ($project as $project_id = $value) {
   $fields[] = $project_id;
   $values[] = $value;
 }
   }
 
  you're missing a curly brace after the if ().
 

 my bad, that's what you get when you don't actually
 run the code. Thank god for compilers ;)

 -Craig

 -- 
 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, Excel, and tab delimited files question

2004-02-06 Thread jon roig
Nah... Try it in excel itself and you'll see what I'm talking about. You
have to do it in numeric fields.

Do this in an excel field:
- Type 10 and hit return.
... It becomes 10, right?

Now try it like this: '000100
... Tada! It stays as 00100 and puts a little green tab in the top left
corner.

There's no closing ' in this example, just the opening one at the
beginning of the text.

Hope that helps... 'course, I'm using excel 2002, so maybe different
versions do different things...

-- jon




-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 06, 2004 3:02 PM
To: Jay Blanchard
Cc: jon roig; [EMAIL PROTECTED]
Subject: Re: [PHP] PHP, Excel, and tab delimited files question


Do double quotes around help?

Jay Blanchard wrote:
 [snip]
 Don't do it in the header, but in the field itself just put a ' before

 the first character and excel will interpret it as a text field. 
 [/snip]
 
 Tried that, the ' shows up. Don't want that to happen
 

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004
 

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



[PHP] math produces strange characters 

2004-02-06 Thread Paul Furman
What is this: 

?php
 $result= (1 * 10);
 print$result
?
10

there is a 10 in the end of that

Again, I very new to this, first time I tried doing a little simple 
math, I'm befuddled.

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


Re: [PHP] Surpressing a 'foreach' Error Message

2004-02-06 Thread John W. Holmes
craig wrote:
  craig mailto:[EMAIL PROTECTED]

   on Friday, February 06, 2004 2:24 PM said:


if (is_array($project))
 foreach ($project as $project_id = $value) {
   $fields[] = $project_id;
   $values[] = $value;
 }
}
you're missing a curly brace after the if ().



my bad, that's what you get when you don't actually
run the code. Thank god for compilers ;)
You'll still get the notice message with is_array(), though. Use isset().

if(isset($project))

or

if(isset($project)  is_array($project))

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

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


RE: [PHP] math produces strange characters 

2004-02-06 Thread Chris W. Parker
Paul Furman mailto:[EMAIL PROTECTED]
on Friday, February 06, 2004 3:28 PM said:

 ?php
   $result= (1 * 10);
   print$result
 
 
 10

 Again, I very new to this, first time I tried doing a little simple
 math, I'm befuddled.

I'm not getting the same result. I got a plain 10. But some weird things about your 
code are that you don't have a space between print and $result (shouldn't cause an 
error, but is hard to read) and you're missing a ; on the end of the second line.

What other code is in that page?


Chris.

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



[PHP] Re: How can I run php 5 beta 3 on windows?

2004-02-06 Thread omer katz
Help!!!
Omer Katz [EMAIL PROTECTED] ëúá
áäåãòä:[EMAIL PROTECTED]
 Can I update PHPTraid's php files?

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



Re: [PHP] math produces strange characters 

2004-02-06 Thread Paul Furman
Chris W. Parker wrote:

Paul Furman wrote:

10

I'm befuddled.


What other code is in that page?


That was the whole page but it's being included from a template. When I 
made the test math file empty:

?php

?

I still got the funny characters but not with any other pages I include 
there.

Here it is:
http://hills.ccsf.edu/~pfurma02/index.php?SCREEN=test.php
Other pages don't produce this:
http://hills.ccsf.edu/~pfurma02/index.php?SCREEN=main.php
--
?php
# index.php
$template = 'main.php';   # the template for the site
$default_screen = 'home.php'; # the default screen
define ('LIBDIR', 'C:/_Paul/web/phplib');
define ('PUB_DIR', 'C:/_Paul/web/public_html');
define ('SCREEN_DIR', LIBDIR . '/screen');
define ('UTIL_DIR', LIBDIR . '/utilities');
define ('CONFIG_DIR', LIBDIR . '/configuration');
define ('ACTION_DIR', LIBDIR . '/action');
# check which SCREEN to display
if(isset($_REQUEST['SCREEN'])) {
  if(is_file(SCREEN_DIR . / . basename($_REQUEST['SCREEN']))) {
$SCREEN = basename($_REQUEST['SCREEN']);
  } else {
$SCREEN = $default_screen;
  }
} else {
  $SCREEN = $default_screen;
}
if($SCREEN == 'main.php') {
  $SCREEN = 'home.php';
  $_REQUEST['SCREEN'] = $SCREEN;
}
include (SCREEN_DIR . /$template);

?

-
?php #main.php ?
!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
HTML
HEAD
   meta name=Author content=Paul Furman
   meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
   TITLEPaul Furman/TITLE
   style type=text/css
---snipped for brevity---
 /style
 /HEAD
BODY
  BACKGROUND=http://www.edgehill.net/paul-background.jpg;
  BGPROPERTIES=FIXED
  TEXT=#44

center
table cellSpacing=0 cellPadding=5 border=0
  tr
td width=650  valign=top
p
  ?php include (SCREEN_DIR . /header.php); ?
/center
p
  ?php include (SCREEN_DIR . /$SCREEN); ?
center
p
  ?php include (SCREEN_DIR . /footer.php); ?
/center
/td
  /tr
/table
/body
/html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] math produces strange characters 

2004-02-06 Thread Chris W. Parker
Paul Furman mailto:[EMAIL PROTECTED]
on Friday, February 06, 2004 4:00 PM said:

 That was the whole page but it's being included from a template. When
 I made the test math file empty:

 I still got the funny characters but not with any other pages I
 include there.
 
 Here it is:
 http://hills.ccsf.edu/~pfurma02/index.php?SCREEN=test.php
 
 Other pages don't produce this:
 http://hills.ccsf.edu/~pfurma02/index.php?SCREEN=main.php

What happens if you make test.php completely blank inside? I'm talking no ?php ? or 
anything.




Chris.

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



Re: [PHP] PHP, Excel, and tab delimited files question

2004-02-06 Thread Marek Kilimajer
jon roig wrote:
Nah... Try it in excel itself and you'll see what I'm talking about. You
have to do it in numeric fields.
Do this in an excel field:
- Type 10 and hit return.
... It becomes 10, right?
Now try it like this: '000100
... Tada! It stays as 00100 and puts a little green tab in the top left
corner.
There's no closing ' in this example, just the opening one at the
beginning of the text.
Hope that helps... 'course, I'm using excel 2002, so maybe different
versions do different things...
	-- jon

This is different. You are talking about inputing data in excell 
application, but Jay is building csv file.

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


Re: [PHP] math produces strange characters 

2004-02-06 Thread Paul Furman
10

Chris W. Parker wrote:
What happens if you make test.php completely blank inside? I'm talking no ?php ? or anything.


Totally empty still produces the strange characters. I also had a big 
complex page and printing some math in that produced the characters.

...
AH, OK, it was this code editor I just started using called PSPAD. I 
made another blank file in notepad and it came out clean. Hmph, so much 
for that.

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


Re: [PHP] Running Apache in one machine and php in another

2004-02-06 Thread Daniel Guerrier
Make it a web service and use SOAP or XML-RPC

http://phpsoaptoolkit.sourceforge.net/phpsoap/
--- Mrs. Geeta Thanu [EMAIL PROTECTED] wrote:
 Hi Jason,
 Thank you for your reply.
 This is an requirement in bioinformatics lab where
 they want to submit a
 huge genome sequence as a input to a program ( say
 in c) and get the
 result and display.
 
 Now i want this c program in another high end
 machine because it needs
 lot of computations, which is not possible in sun
 machine where i
 installed apache+PHP.
 
 Now I want the PHP script, like CGI has to get the
 genome from the browser
 of a user and send to the machine where C program is
 running and again get
 the results and show as output.
 
 Please reply whether this is possible.
 
 Thank u
 Geetha
 
 On Fri, 6 Feb 2004, Jason Wong wrote:
 
  On Saturday 07 February 2004 02:57, Mrs. Geeta
 Thanu wrote:
 
   I have configured Apache webserver executing PHP
 scripts on sun machine
   and everything is  working fine.
  
Now I want the web server to pass on the PHP
 executions to
   another machine and once done should get the
 result and display it.
  
   Is it possible .
 
  Depends on what you really want to do. What
 problem are you trying to solve?
 
  --
  Jason Wong - Gremlins Associates -
 www.gremlins.biz
  Open Source Software Systems Integrators
  * Web Design  Hosting * Internet  Intranet
 Applications Development *
  --
  Search the list archives before you post
  http://marc.theaimsgroup.com/?l=php-general
  --
  /*
  The trouble with computers is that they do what
 you tell them, not what
  you want.
  -- D. Cohen
  */
 
  --
  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
 


__
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

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



Re: [PHP] installing php with pdflib

2004-02-06 Thread merlin
thanx guys, that has worked perfectly!

Cheers,

Merlin



John Nichel schrieb:
merlin wrote:

Hi Jason,

I just need 3.x since this is the version on my live server. However, 
I cant find any 4.x or 3.x version of pdflib

on pdflib.com there is a free version called pdflib lite. Pdflib 5.x 
costs over 400$. I do not need 5.x, just basic pdf generating.

Can you point me to a download place for 4.x?

merlin


You have to jump thru hoops to get them (the pdflib people) to send it 
to you, and it took me forever to find it a few months ago.  So, to save 
you the trouble I had to go thru

http://www.by-tor.com/downloads/temp/pdflib-4.0.3.tar.gz

Because I'm a great guy. ;)

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


Re: [PHP] thumbnail script

2004-02-06 Thread David T-G
Ryan, et al --

...and then Ryan A said...
% 
% Hey David (my pal with the funny % prefix to replies...:-p )

Hi, Ryan (my ex-logo-drawing-buddy with the non-threading mailer ;-)


% Thanks for replying.

Sure thing.


% 
%  Why, yes.  I call it
%  http://web-folio.net/
% 
% Nice name.

Thanks!


% 
%  and it does everything for which you ask and then some.
% Kewl, is it free and can i download it and use it on my website?

Heh :-)  We're selling a service, dude.


% 
%   Just send all of
%  your clients to host with me and
%  I'll give you a commission ;-)
% 
% Damn, that answers my question, its not free and I cant download and use it
% on my website (wa)

Yep.


% 
% On a more serious note, nice site mate, but reay steep on the pocket,
% $250 setup fee? my pal sets up

It's a start.  We can see if the market dictates a change.


% computers and furnature for a lot less, and $25 a month for 100mb space? I
% know porn friendly sites that
% charge less and offer more. Reading prices like that made my right hand jump

Ah, but it's not just some space we're offering.  Go back and look again
(and then please tell me how you missed it and what needs to clarified,
because it's supposed to be obvious :-)

Think like a person definitely *not* on this list.  Your average realtor,
interior designer, quilter, flower arranger, jewelry maker, painter, or
whomever won't know the first thing (well, perhaps, but not the second
thing!) about how to put files on a web site or lay out web pages or even
what goes into making a web page.

What we do is make it incredibly easy to upload and manage pictures,
automatically handle the thumbnailing and layout into pages, and give you
plenty of space to do it (100M holds about 500 pix).  I know dozens of
realtors who each paid $1k for a template site (no indivduality there!)
with a glamour shot, a couple of buttons, and maybe another picture.
Then they pay $700/yr for basic hosting with no extras.  Meanwhile, they
don't know how to put up pictures, so they have to find students or,
worse yet, pay geeks to upload pictures -- and then they only get room
for a dozen or so.

In the small business market where people want reliable hosting with no
worries just like anyone else but don't have a budget for a designer and
a big hosting company, $25/mo is cheap.  At least, that's the plan ;-)


% for the mouse and find the little
% x at the top right of my browser and made me reach for a coke because of the
% fright I got! :-D

*grin*


% I'm pretty sure you wont get anyone off the list purchasing an account and
% there are a lot of people out there

Well, maybe not, but we're not really targeting the people here.  I know
that I can't compete on raw price (I don't have the investment capital to
create a data center that can handle the volume of customers that it would
take to do that), and I don't want to sell geeks because I've seen how
demanding and bothersome I am :-)

The value definitely has to be in the service.


% who pay more for _total_ crap, and your service is good sobest of
% luck and hope it goes well.

Thanks; we do, too.


% 
% 
%  OK...  Having spent quite a bit of time developing our gallery script
%  and a bit of looking around at competition, I haven't
%  seen anything that
%  comes close.
% 
% This sort of an app never really did cross my mind...so i dont know what
% your compettion is like, have a couple
% of urls? I promise i wont join any of them :-p

I don't have 'em handy, I'm afraid.  Check hotscripts and the like for
any gallery or thumbnail script.


% 
%   In general, though, it's not too tough to check your source
%  files and both make the thumbnails and generate their image tags to
%  output in the page.
% 
% Yeah, thats what i have been told on the list and off, but I have never
% really worked with GD + the image functions

Bah.  Nor have I; I use ImageMagick :-)


% and it seems better to first look around to see if anyone already made this
% rather than to try to invent the wheel all over

That's a good approach, and a good way to get started quickly.  It can
bite you in the long run, though.


% again, although I agree with Justin saying that while remaking the wheel
% you will understand the code better and it will
% be more specific to your needs. Another problem is I have GD 1 on one server
% and GD 2 on another...

This is also a good approach, and it can still end up biting you as you
grow, so I'm all for the former and then for rewriting from scratch for
version two :-)


% 
% I did get a few really helpful souls off the list who sent me code, mainly
% for jpg stuff, will try that out.

That's why we're all here :-)


% 
%  HTH  HAND  Good luck!
% 
% Sure did, and the same to you dude.

Thanks :-)


% 
% Cheers,
% -Ryan
% 


HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and 

[PHP] Checking if database has been setup

2004-02-06 Thread Ryan A
Hey,
Sometime back i was checking out a script and it had a very useful little
bit, in the scripts control panel there was
a text link that said click here to see if your database has been setup
when you click it, it will tell you if its setup
or lauches the setup script to help you set it up.

I think thats a pretty cool feature for someone who knows nothing about
setting up a database and does not know
if its setup or not. I can handle the setup in steps (the setup wizard)
but how do i check if the database/tables have
been setup?

(and my apoligies for using setup so many times :-p )

Any advise, urls or bits of code would be appreciated.

Thanks,
-Ryan

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



Re: [PHP] Checking if database has been setup

2004-02-06 Thread Joshua D. Drake
 if its setup or not. I can handle the setup in steps (the setup wizard)
 but how do i check if the database/tables have
 been setup?
 

It may be helpful to know which database as each database has there own 
way...

 (and my apoligies for using setup so many times :-p )
 
 Any advise, urls or bits of code would be appreciated.
 
 Thanks,
 -Ryan
 
 

-- 
Co-Founder
Command Prompt, Inc.
The wheel's spinning but the hamster's dead

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



[PHP] Cannot send mail after upgrading to OS X v10.3

2004-02-06 Thread gohaku
Hi everyone,
I am using OS X v10.3.2 and just discovered that I can't send mail 
using the mail() function.
According to phpinfo(), PHP is configured with sendmail.
Before upgrading to v10.3, I did not check if the mail() function 
worked in v10.2
The script I'm using does work on other servers.

?
  $email = $_REQUEST['email'] ;
  $message = $_REQUEST['message'] ;
  mail( [EMAIL PROTECTED], Feedback Form Results,
$message, From: $email );
  header( Location: thankyou.html );
?
I ran Postfix Enabler and still could not email myself.
What do I need to configure to get the mail() function to work?
Thank you.
-Gohaku

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


Re: [PHP] Cannot send mail after upgrading to OS X v10.3

2004-02-06 Thread Jason Wong
On Saturday 07 February 2004 11:39, gohaku wrote:

 I am using OS X v10.3.2 and just discovered that I can't send mail
 using the mail() function.
 According to phpinfo(), PHP is configured with sendmail.

AFAIK phpinfo() does not tell you whether whether mail capabilities has been 
compiled in.

 I ran Postfix Enabler and still could not email myself.
 What do I need to configure to get the mail() function to work?

1) check your php error logs
2) check your MTA logs

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Just because everything is different doesn't mean anything has changed.
-- Irene Peter
*/

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



Re: [PHP] Cannot send mail after upgrading to OS X v10.3

2004-02-06 Thread John Nichel
gohaku wrote:

Hi everyone,
I am using OS X v10.3.2 and just discovered that I can't send mail using 
the mail() function.
According to phpinfo(), PHP is configured with sendmail.
Before upgrading to v10.3, I did not check if the mail() function worked 
in v10.2
The script I'm using does work on other servers.
Make sure the path to sendmail is correct in your php.ini.
Ensure that sendmail is installed.
Check to see if sendmail is running.
Make sure sendmail is configured to relay for localhost.
--
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] fopen() Problems

2004-02-06 Thread rabbit
I am using the below code (kind of sloppy..).  I have tried for fopen r+, w, 
and w+, but no matter what I do, the file is always truncated, and previously 
entered data is erased.  I have been unable to fix this.

?php
$filename = 'news.php';
$divhead = 'div style=padding:15;padding-left:0 class=ver10';
$d1 = date(l dS of F Y h:i:s A);
$divclose = '/i/div/pBR';
$some =  $divhead pBfont size=2 color=#FF;
$some1 = $_POST['topic'];
$some =  $some $some1 /font/bBRBa 
href=mailto:[EMAIL PROTECTED]R.a.B.B.i.T/a/Bi - $d1 /iBR;
$some1 = $_POST['news'];
$some =  $some $some1 $divclose;
$some =  $some BRBR;
$some = stripslashes($some);
if (is_writable($filename)) {
   if (!$handle = fopen($filename, 'r+')) {
 echo Cannot open file ($filename);
   } else {
  if (!fwrite($handle, $some)) {
  echo Cannot write to file ($filename);
  } else {
 echo Success, wrote data to file ($filename);
 fclose($handle);
  }
   }
} else {
   echo The file $filename is not writable;
}
? 

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



Re: [PHP] fopen() Problems

2004-02-06 Thread Jason Wong
On Saturday 07 February 2004 07:08, [EMAIL PROTECTED] wrote:
 I am using the below code (kind of sloppy..).  I have tried for fopen r+,
 w, and w+, but no matter what I do, the file is always truncated, and
 previously entered data is erased.  I have been unable to fix this.

Assuming that you're trying to add something to the end of an existing file:

either fopen() using mode 'a' or use fseek().

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
In short, _N is Richardian if, and only if, _N is not Richardian.
*/

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



[PHP] excel output question

2004-02-06 Thread Jake McHenry
Hi everyone. I'm outputing payroll information to an excel csv file, and when anyone 
get's paid over 1k, the amount is split into two fields because of the comma in the 
amount. Is there anyway I can tell excel that this particular comma is not a 
deliminator?

Thanks,
Jake

Re: [PHP] excel output question

2004-02-06 Thread Joshua D. Drake
On Sat, 7 Feb 2004, Jake McHenry wrote:

 Hi everyone. I'm outputing payroll information to an excel csv file, and when anyone 
 get's paid over 1k, the amount is split into two fields because of the comma in the 
 amount. Is there anyway I can tell excel that this particular comma is not a 
 deliminator?
quote it


 
 Thanks,
 Jake

-- 
Co-Founder
Command Prompt, Inc.
The wheel's spinning but the hamster's dead

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