Re: [PHP] Re: intalling pear:db

2004-11-25 Thread Jason Wong
On Thursday 25 November 2004 15:56, Merlin wrote:

> >> I successfully upgraded with this command. However the system still
> >> says: Fatal error: Call to undefined function: fetchrow()

The error message will say which line caused the error. Examine that line and 
see how fetchrow() is being called. Is it called as part of an object's 
method? Is that object one of pear's?

> that did not help. The pear manual says that this can be installed via
> command line, plus "pear list" tells me that the package is installed.
> However if I call phpinfo() there is no mentioning about pear in any way?!
> Do I have to enable it first anyhow?`

If you have full error reporting enabled, then any errors in including the 
pear files will show. All the pear stuff are just files that you include. 
There is no setting as such to enable to disable pear.

-- 
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
--
/*
True leadership is the art of changing a group from what it is to what
it ought to be.
-- Virginia Allan
*/

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



Re: [PHP] Re: intalling pear:db

2004-11-25 Thread Merlin
Hi Jason,
>All the pear stuff are just files that you include.
I do not understand?! How come the pear site provides a command line installer:
http://pear.php.net/manual/en/installation.cli.php
When I call "pear list" it tells me that pear:db is installed. I also tried to 
compile php '--with-PEAR', but it tells me nowhere in the phpinfo() that there 
is anything about pear.

So you say I have to copy the untared pear:db files to any directory and include 
them?

Thanx,
Merlin

Jason Wong wrote:
On Thursday 25 November 2004 15:56, Merlin wrote:

I successfully upgraded with this command. However the system still
says: Fatal error: Call to undefined function: fetchrow()

The error message will say which line caused the error. Examine that line and 
see how fetchrow() is being called. Is it called as part of an object's 
method? Is that object one of pear's?


that did not help. The pear manual says that this can be installed via
command line, plus "pear list" tells me that the package is installed.
However if I call phpinfo() there is no mentioning about pear in any way?!
Do I have to enable it first anyhow?`

If you have full error reporting enabled, then any errors in including the 
pear files will show. All the pear stuff are just files that you include. 
There is no setting as such to enable to disable pear.

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


RE: [PHP] How to $_POST from a grid

2004-11-25 Thread Graham Cossey
[snip]
>
> I'm doing my development in Dreamweaver though the
> code is basic.  To get to the grid I'm passing over
> the userID  .  Then basic a select statement in the
> results grid with a while loop the returns all the
> records related to the userID.
>
> It's just odd - because in Dreamweaver I build the
> grid with one table row, place my echo fieldx in each
> cell, then create a "repeat region" around the row.
> The repeat region is the while loop.
>
> The behaviour though is different for whatever reason.
>   Using a link with GET (paramter in the URL) it
> distinguishes each primaryID correctly.  Yet with POST
> no. As Jason just posted, yes it has individual submit
> buttons, yet they solely return the last record.
[snip]

Hi Stuart

Have you looked at the HTML generated by your PHP code?
Using view source you'll see what values each of your 3 forms contains and
therefore what will be submitted in the POST. My guess from one of your
previous posts is that all 3 forms contain the same value in the (hidden) ID
field. You were getting the value from a class but did not appear to be
passing any kind of index to the class to determine which value to return.

HTH
Graham

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



Re: [PHP] RE: [firebird-php] auto increment last insert

2004-11-25 Thread John Nichel
Greg Donald wrote:
On Thu, 25 Nov 2004 09:33:41 +0600, Raditha Dissanayake
<[EMAIL PROTECTED]> wrote:
many people in this list believe that people who do not RTFM are lazy
and do not deserve help.

That's because people who expect free help without RTFM are lazy and
do not deserve help.  How else do you plan to learn the language
without RTFM?  The knowledge isn't going to just jump into your head.
Great, there goes my theory about sleeping with the PHP manual under my 
pillow.  ;)

--
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] Happy Thanksgiving

2004-11-25 Thread John Nichel
Happy Turkey Day ladies and gents.
Disclaimer :
If you are not in the US, or do not celebrate Thanksgiving, you are 
still allowed to have a 'happy' day. ;)

--
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] Getting the contents of a file

2004-11-25 Thread Octavian Rasnita
Hi all,

I am trying to use the file() function, but without success.

Here is the code:
$url = "http://www.rasd.ro/Quotes/11-24-2004.txt";
$file = file($url);

And this is the error:
PHP Parse error:  syntax error, unexpected T_VARIABLE in [FILE] on line 13

The line 13 contains:

$file = file($url);

I get the content of $url in a more complex way, so I cannot put the url to
that file directly in the function file().

Why it is not possible to use a var in file()?

Thanks.

Teddy

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



RE: [PHP] Getting the contents of a file

2004-11-25 Thread Ford, Mike
To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm



On 25 November 2004 10:11, Octavian Rasnita wrote:

> Hi all,
> 
> I am trying to use the file() function, but without success.
> 
> Here is the code:
> $url = "http://www.rasd.ro/Quotes/11-24-2004.txt";

You have no semicolon on the end of the above line.

> $file = file($url);

So the $file at the beginning of this line is a parse error.
 
> And this is the error:
> PHP Parse error:  syntax error, unexpected T_VARIABLE in [FILE] on
> line 13 

PHP can only tell you the line on which it first detects an error (13, in
this case); the actual error may be on a previous line (12, in this case).

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP] Secure Password (MySQL) Storage

2004-11-25 Thread Jason Wong
On Thursday 25 November 2004 17:43, Olaf van der Spek wrote:

> I'm more worried about the data (in MySQL), not the code.
> By protecting the MySQL password from being read by scripts directly and
> only allowing access based on the current vhost, only this vhost can
> access it's own database and not somebody else.

Set default MySQL user and password in your virtual host container. Then 
connect to MySQL without specifying user and password.

-- 
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
--
/*
Spock: We suffered 23 casualties in that attack, Captain.
*/

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



Re: [PHP] Secure Password (MySQL) Storage

2004-11-25 Thread Olaf van der Spek
Raditha Dissanayake wrote:
Olaf van der Spek wrote:
Hi,
Is there a way to store MySQL (or other sensitive data) that will be 
It should read MySQL passwords.
passed to a library in such a way that scripts itself can't access this?
A per-vhost store would be ideal.
If not, would this be a good idea to implement?
Your question is not very clear but if you want to protect your data 
from prying eyes surely the best way would be to encrypt it? as for 
security on shared hosting enviorenments we have discussed that topic in 
the past a few times and the voices of authority strongly believe that 
it's not possible to completely prevent other users from taking a peek 
at your code.  But then again you could use the turck or zend encoder on 
it.
I'm more worried about the data (in MySQL), not the code.
By protecting the MySQL password from being read by scripts directly and 
only allowing access based on the current vhost, only this vhost can 
access it's own database and not somebody else.

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


Re: [PHP] Getting the contents of a file

2004-11-25 Thread Burhan Khalid
Octavian Rasnita wrote:
Hi all,
I am trying to use the file() function, but without success.
Here is the code:
$url = "http://www.rasd.ro/Quotes/11-24-2004.txt";
$file = file($url);
You are missing a ;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] SAFE MODE Restriction - mkdir()

2004-11-25 Thread Ford, Mike
To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm



On 25 November 2004 00:47, SED wrote:

> Then, shouldn't the owner be able to handle the new directory?
> 
> In my case, the owner creates the directory X but can't create a
> subdirectory inside the directory X! nor save a file into it!
> 
> Can you explain that?
> 
> Is the PHP not always running as the same user? Or is it base
> on type of the
> function?

It works like this:

(1) Script (owned by you) attempts to access original directory (owned by
you, presumably) -- ok.

(2) Script (owned by you, but running as Apache user) creates new
subdirectory (set to be owned by user *running* the script, i.e. Apache
user).

(3) Script (owned by you) attempts to access new subdirectory (owned by
Apache user) -- denied.

So, yes, you can create a directory which it is then impossible to access --
this is an unfortunate side-effect of safe mode when PHP runs as an Apache
module and hence as the Apache user.  This is why hosted services often use
chrooted jails with PHP as a CGI -- the individual copies of PHP then run
with the appropriate uids of the host usernames.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



RE: [PHP] How to $_POST from a grid

2004-11-25 Thread Stuart Felenstein

--- Graham Cossey <[EMAIL PROTECTED]> wrote:

> Hi Stuart
> 
> Have you looked at the HTML generated by your PHP
> code?
> Using view source you'll see what values each of
> your 3 forms contains and
> therefore what will be submitted in the POST. My
> guess from one of your
> previous posts is that all 3 forms contain the same
> value in the (hidden) ID
> field. You were getting the value from a class but
> did not appear to be
> passing any kind of index to the class to determine
> which value to return.
> 
> HTH
> Graham
> 
Graham - hope your doing good!
It is 4:25am here but just fixed the problem. 
Solution - I created my standard repeat region around
all fields I want returned.  Within the repeat region
I put a form around the submit button and included the
hidden element as well in the form. So each record
returned has a seperate form around the button.  It
works! Records returned properly.

Stuart

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



Re: [PHP] SAFE MODE Restriction - mkdir()

2004-11-25 Thread Marek Kilimajer
SED wrote:
It just seems not making sence. I have read the manual and it does not
explain this specially.
If the user owns this folder: "www\myfolders"
And runs a PHP-script in safe mode that creates the folder
"www\myfolders\who".
Who owns the "who" folder?
If the webserver is run under user nobody, then "who" folder is owned by 
user nobody. Only root can change owners so there's no way around it.

I assume the owner. If so, why can't the PHP-script create another folder
inside like "www\myfolders\who\this" like before?
Webserver running under user nobody reads in your script owned by you. 
PHP has safe mode on, so everytime it creates a file or directory it 
checks if the owner of the parent directory is the same as the owner of 
the php script being executed. If it's not, it issues an "SAFE MODE 
Restriction in effect" error.


If "the user of the php process" (UID) is the owner of the new folder, why
can't it create a folder inside its own folder? Is it because it's triggered
by a user different from the user of the PHP process?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] RE: [firebird-php] auto increment last insert

2004-11-25 Thread Greg Donald
On Thu, 25 Nov 2004 11:43:56 +0600, Raditha Dissanayake
<[EMAIL PROTECTED]> wrote:
> hey greg, don't jump on me, i was trying to say the same thing you are
> saying perhaps i should have worded it better :-))

Sorry if I offended you.


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

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



[PHP] What else can cause "unexpected T_SL" error other than heredoc?

2004-11-25 Thread D. D. Brierton
We've been getting the following error:

[error] PHP Parse error:  parse error, unexpected T_SL in
/foo/bar.php on line 136

(where foo and bar obviously are stand-ins for real values).

The weird thing is that the file generating the error, bar.php, DOESN'T
contain any heredoc quotations. bar.php was being called by another file,
let's call it baz.php with require_once, and baz.php was also calling
other files using require_once which DID include heredoc quotations, let's
call them heredoc1.php and heredoc2.php. I was able to determine that the
problem was indeed caused by bar.php, and not by anything in heredoc1.php
or heredoc2.php by testing in the following way:

Testing baz.php with the the following commented out:

require_once 'bar.php';
// require_once 'heredoc1.php';
// require_once 'heredoc2.php';

Then testing baz.php with the following commented out:

// require_once 'bar.php';
require_once 'heredoc1.php';
require_once 'heredoc2.php';

In the first test the "unexpected T_SL" error persisted, whereas in the
second it went away.

But, bar.php does NOT contain any heredoc quoted strings, nor does it
contain anywhere the strings "<<" or ">>". So what could be the cause of
the T_SL error?

This is PHP 4.3.8 on Linux kernel 2.4.20 and Apache 1.3.31.

TIA, Darren

-- 
==
D. D. Brierton[EMAIL PROTECTED]   www.dzr-web.com
   Trying is the first step towards failure (Homer Simpson)
==

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



Re: [PHP] Happy Thanksgiving

2004-11-25 Thread Greg Donald
On Thu, 25 Nov 2004 04:25:10 -0500, John Nichel <[EMAIL PROTECTED]> wrote:
> Happy Turkey Day ladies and gents.

Same to you.


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

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



Re: [PHP] What else can cause "unexpected T_SL" error other than heredoc?

2004-11-25 Thread Greg Donald
On Thu, 25 Nov 2004 12:17:01 +, D. D. Brierton <[EMAIL PROTECTED]> wrote:
> We've been getting the following error:
> 
> [error] PHP Parse error:  parse error, unexpected T_SL in
> /foo/bar.php on line 136

Can you post some of this code?  Are all your heredoc instances
completely left justified?

> (where foo and bar obviously are stand-ins for real values).
> 
> The weird thing is that the file generating the error, bar.php, DOESN'T
> contain any heredoc quotations. bar.php was being called by another file,
> let's call it baz.php with require_once, and baz.php was also calling
> other files using require_once which DID include heredoc quotations, let's
> call them heredoc1.php and heredoc2.php. I was able to determine that the
> problem was indeed caused by bar.php, and not by anything in heredoc1.php
> or heredoc2.php by testing in the following way:
> 
> Testing baz.php with the the following commented out:
> 
> require_once 'bar.php';
> // require_once 'heredoc1.php';
> // require_once 'heredoc2.php';
> 
> Then testing baz.php with the following commented out:
> 
> // require_once 'bar.php';
> require_once 'heredoc1.php';
> require_once 'heredoc2.php';
> 
> In the first test the "unexpected T_SL" error persisted, whereas in the
> second it went away.
> 
> But, bar.php does NOT contain any heredoc quoted strings, nor does it
> contain anywhere the strings "<<" or ">>". So what could be the cause of
> the T_SL error?

I dunno if that's just a typo in your post, but heredoc requires 3 <<<
or >>>, not two as you wrote.

Are you using any sort of PHP cache by chance?


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

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



[PHP] Re: Regular Expression

2004-11-25 Thread Ing. Ivo F.A.C. Fokkema
On Wed, 24 Nov 2004 13:17:48 -0500, Ankur Os wrote:

> Hi,
> 
> This is quite simpal problem that i want to made regular expression which
> can read this kind of structure...
> 
> a,b,c
> 
> not like this
> 
> 1.  ,a,a,a
> 2.  a,,,aa,,
> 3.  a,a,a,,,
> 
> means simpal structure with comma (a,b,c...)
Hi,

Try this (untested) :

preg_match('/^([a-c],)*[a-c]$/', $input);

this will match characters a-c separated by commas. Replace 'a-c' by any
range of characters you like.

HTH,

Ivo

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



Re: [PHP] What else can cause "unexpected T_SL" error other than heredoc?

2004-11-25 Thread D. D. Brierton
On Thu, 25 Nov 2004 06:26:22 -0600, Greg Donald wrote:

> On Thu, 25 Nov 2004 12:17:01 +, D. D. Brierton <[EMAIL PROTECTED]> wrote:
>> We've been getting the following error:
>> 
>> [error] PHP Parse error:  parse error, unexpected T_SL in
>> /foo/bar.php on line 136
> 
> Can you post some of this code?  Are all your heredoc instances
> completely left justified?

Okay, from "baz.php":

// load environment settings
require_once '../common/re5ult_settings.php'; // "bar.php" in my example
require_once '../common/re5ult_utils.php';// "heredoc1.php"
require_once '../common/re5ult_xml.php';  // "heredoc2.php"

All of the heredoc instances were fine (as I think demonstrated by
commenting out the reference to re5ult_settings.php but NOT to the files
which contain the heredoc instances). Here is an example of one of them:

echo <<




EOMSG;


>> But, bar.php does NOT contain any heredoc quoted strings, nor does it
>> contain anywhere the strings "<<" or ">>". So what could be the cause of
>> the T_SL error?
> 
> I dunno if that's just a typo in your post, but heredoc requires 3 <<<
> or >>>, not two as you wrote.

My point being that the file that certainly appears to be causing the
problem doesn't contain the string "<<" or ">>" and therefore nor does it
contain "<<<" or ">>>".

> Are you using any sort of PHP cache by chance?

No.

Thanks for helping.

Best, Darren

-- 
==
D. D. Brierton[EMAIL PROTECTED]   www.dzr-web.com
   Trying is the first step towards failure (Homer Simpson)
==

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



[PHP] How does one get into programming?

2004-11-25 Thread Ewald
I've been in IT for about 12 years and is looking to change my direction to
programming. Can anyone direct me in the right direction as to what to study
or where to start???

Thx

Ewald

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



[PHP] Path to ImageMagick??

2004-11-25 Thread Aaron Wolski
Hey all,

How can I find out the path ImageMagick on my server the php is running
on?

Need it for a software and I don't know where to look. Phpinfo() tells
me nothing.

Thanks!

Aaron

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



Re: [PHP] Path to ImageMagick??

2004-11-25 Thread Jon Hill
The two programmes you will probably use are called  'convert' and 'mogrify'
Usually found in /usr/bin if you are running Linux.

Cyril


On Thursday 25 November 2004 13:35, Aaron Wolski wrote:
> Hey all,
>
> How can I find out the path ImageMagick on my server the php is running
> on?
>
> Need it for a software and I don't know where to look. Phpinfo() tells
> me nothing.
>
> Thanks!
>
> Aaron

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



Re: [PHP] RE: [firebird-php] auto increment last insert

2004-11-25 Thread Raditha Dissanayake
John Nichel wrote:
Greg Donald wrote:
On Thu, 25 Nov 2004 09:33:41 +0600, Raditha Dissanayake
<[EMAIL PROTECTED]> wrote:
many people in this list believe that people who do not RTFM are lazy
and do not deserve help.

That's because people who expect free help without RTFM are lazy and
do not deserve help.  How else do you plan to learn the language
without RTFM?  The knowledge isn't going to just jump into your head.

Great, there goes my theory about sleeping with the PHP manual under 
my pillow.  ;)
I was thinking of doing the same but gave up because i couldn't figure 
out a way of clicking on the links in my printed version of the manual.

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

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


[PHP] Problems compiling mnogosearch

2004-11-25 Thread Mario Bittencourt
Hi,

I can't compile php 5 (or 4) with mnogosearch and mysql support.  I
saw a couple of posts but I was wondering what do I have to do in
order to make it compile.

mnogosearch is already installed and working.

Thanks.

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



Re: [PHP] Problems compiling mnogosearch

2004-11-25 Thread John Nichel
Mario Bittencourt wrote:
Hi,
I can't compile php 5 (or 4) with mnogosearch and mysql support.  I
saw a couple of posts but I was wondering what do I have to do in
order to make it compile.
mnogosearch is already installed and working.
Thanks.
The way I was able to get it working was to configure/compile 
mnogosearch *without* MySQL support, and build php against that.  Then 
once php was configured/compiled/installed, re-configure/compile 
mnogosearch *with* MySQL support.

--
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] Re: Happy Thanksgiving

2004-11-25 Thread Daniel Schierbeck
John Nichel wrote:
Happy Turkey Day ladies and gents.
Disclaimer :
If you are not in the US, or do not celebrate Thanksgiving, you are 
still allowed to have a 'happy' day. ;)

I just can't wait 'til Talk Like A Pirate Day (September 19 if I 
remember correctly)!

Arrr, shiver me timbers! There be treasure in them thar hills!
And no, I'm not from the US ;)
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com): 
http://www.spreadfirefox.com/?q=user/register&r=6584

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


RE: [PHP] SAFE MODE Restriction - mkdir()

2004-11-25 Thread SED
 
This answer from Mike solved this (e.g. create a CGI process for this task):

[...]
So, yes, you can create a directory which it is then impossible to access --
this is an unfortunate side-effect of safe mode when PHP runs as an Apache
module and hence as the Apache user.  This is why hosted services often use
chrooted jails with PHP as a CGI -- the individual copies of PHP then run
with the appropriate uids of the host usernames.
[...]


Regards,
Summi

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



Re: [PHP] Problems compiling mnogosearch

2004-11-25 Thread Mario Bittencourt
Hi,

I've tried this but keep getting


Stopping httpd:[FAILED]
Starting httpd: Syntax error on line 190 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/libphp5.so into server:
libmnogosearch-3.2.so: failed to map segment from shared object:
Permission denied

On Thu, 25 Nov 2004 10:06:47 -0500, John Nichel <[EMAIL PROTECTED]> wrote:
> Mario Bittencourt wrote:
> 
> 
> > Hi,
> >
> > I can't compile php 5 (or 4) with mnogosearch and mysql support.  I
> > saw a couple of posts but I was wondering what do I have to do in
> > order to make it compile.
> >
> > mnogosearch is already installed and working.
> >
> > Thanks.
> >
> 
> The way I was able to get it working was to configure/compile
> mnogosearch *without* MySQL support, and build php against that.  Then
> once php was configured/compiled/installed, re-configure/compile
> mnogosearch *with* MySQL support.
> 
> --
> By-Tor.com
> ...it's all about the Rush
> http://www.by-tor.com
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

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



Re: [PHP] Happy Thanksgiving

2004-11-25 Thread John Holmes
John Nichel wrote:
Happy Turkey Day ladies and gents.
Disclaimer :
If you are not in the US, or do not celebrate Thanksgiving, you are 
still allowed to have a 'happy' day. ;)
What's this got to do with PHP? I'm on a 1.4bps connection and it took 
me all day to download your message. For each email I get my ISP 
requires me to give away my first born in order to read it! You are 
wasting my time. My religion forbids any king of thanks, so now I have 
to spend the next 4 days in church and my ISP is going to charge me over 
1200 dollars just to reply to you. Happy day my ass...

--
---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] Happy Thanksgiving

2004-11-25 Thread Ryan A

On 11/25/2004 5:28:47 PM, John Holmes ([EMAIL PROTECTED]) wrote:
> John Nichel wrote:
> 
> > Happy Turkey Day ladies and gents.
> 
> >
> 
> > Disclaimer :
> 
> > If you are not in the US, or do not celebrate Thanksgiving, you are
> 
> > still allowed to have a 'happy' day. ;)
> 
> 
> 
> What's this got to do with PHP? I'm on a 1.4bps connection and it took
> 
> me all day to download your message. For each email I get my ISP
> 
> requires me to give away my first born in order to read it! You are
> 
> wasting my time. My religion forbids any king of thanks, so now I have
> 
> to spend the next 4 days in church and my ISP is going to charge me over
> 
> 1200 dollars just to reply to you. Happy day my ass...
> 

ouch, someone got up on the wrong side of someones bed today
I did like the "1.4bps connection " part though :-)

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



[PHP] Getting static member for a class which name is stored in a variable

2004-11-25 Thread Francisco M. Marzoa Alonso
I've code like follows:

class TestClass {
   public static $Data = 'This is the data';
}
$Obj = new TestClass ();
$ClassName = get_class ($Obj);
echo $ClassName::$Data;
?>
It gives me an error like:
Parse error: parse error, unexpected T_PAAMAYIM_NEKUDOTAYIM ...
I've found googling that it means that those '::' are unexpected. So, 
How can I get an static member for a class which name is stored in a 
variable?

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


Re: [PHP] Happy Thanksgiving

2004-11-25 Thread John Nichel
John Holmes wrote:
John Nichel wrote:
Happy Turkey Day ladies and gents.
Disclaimer :
If you are not in the US, or do not celebrate Thanksgiving, you are 
still allowed to have a 'happy' day. ;)

What's this got to do with PHP? I'm on a 1.4bps connection and it took 
me all day to download your message. For each email I get my ISP 
requires me to give away my first born in order to read it! You are 
wasting my time. My religion forbids any king of thanks, so now I have 
to spend the next 4 days in church and my ISP is going to charge me over 
1200 dollars just to reply to you. Happy day my ass...

Hey, national 'cry like a baby day' is next week  ;)
Consider yourself lucky, you're turkey dinner could be coming out of a 
MRE.  *L*

--
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] Read PDF files with Php

2004-11-25 Thread Jacob Friis
Do I need PDFlib in order to read PDF files?
Is there another way?
Thanks,
Jacob
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] free cache/accelerator for php5?

2004-11-25 Thread Ivan Voras
Hi!
Is there any free php cache/accelerator that works with php5? I was 
using turck-mmcache with 4.x, but it's buggy with php5 (old-style class 
constructors don't get called on cached classes), and the development 
seems to be stalled.

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


Re: [PHP] Happy Thanksgiving

2004-11-25 Thread Christopher Way
I believe that is what one would called humour/humor...
- Original Message - 
From: "Ryan A" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, November 25, 2004 11:47 AM
Subject: Re: [PHP] Happy Thanksgiving


On 11/25/2004 5:28:47 PM, John Holmes ([EMAIL PROTECTED]) wrote:
John Nichel wrote:
> Happy Turkey Day ladies and gents.
>
> Disclaimer :
> If you are not in the US, or do not celebrate Thanksgiving, you are
> still allowed to have a 'happy' day. ;)

What's this got to do with PHP? I'm on a 1.4bps connection and it took
me all day to download your message. For each email I get my ISP
requires me to give away my first born in order to read it! You are
wasting my time. My religion forbids any king of thanks, so now I have
to spend the next 4 days in church and my ISP is going to charge me over
1200 dollars just to reply to you. Happy day my ass...
ouch, someone got up on the wrong side of someones bed today
I did like the "1.4bps connection " part though :-)
--
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] Happy Thanksgiving[Scanned]

2004-11-25 Thread Michael Egan
> Hey, national 'cry like a baby day' is next week  ;)

Could you specify which day next week?

That's one festival I look forward to taking part in :-)

Michael Egan 
  
  
The information contained in this email (and in any attachments sent with it) 
is confidential. It is intended for the addressee only. Access to this email by 
anyone else is unintended and unauthorized.  
If you are not the original addressee, 3tc asks you to please maintain 
confidentiality. If you have received this email in error please notify 3tc 
immediately by replying to it, then destroy any copies and delete it from your 
computer system. 
  
Any use, dissemination, forwarding, printing or copying of this email by anyone 
except the addressee in the normal course of his/her business, is strictly 
prohibited. 3tc owns the copyright in this email and any document created by us 
and assert the right to be identified as the author of it. Copyright has not 
been transferred to the addressee. 
We protect our systems with Sophos Anti-virus -  
www.sophos.com 
 

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



Re: [PHP] Read PDF files with Php

2004-11-25 Thread Christopher Way
There is a nifty tutorial on this subject over at zends.com .. 
Here is a link to it  http://www.zend.com/zend/tut/tutorial-PDFgen1.php

-Christopher Way
- Original Message - 
From: "Jacob Friis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 25, 2004 12:20 PM
Subject: [PHP] Read PDF files with Php


Do I need PDFlib in order to read PDF files?
Is there another way?
Thanks,
Jacob
--
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] Overriding static members?

2004-11-25 Thread Francisco M. Marzoa Alonso
Can I override static members in someway under PHP5? Is the answer is 
negative, Why not?

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


[PHP] Date Format error

2004-11-25 Thread Stuart Felenstein
I'm getting a:
Parse error: parse error, unexpected '%' in
/home/mysite/public_html/userpage.php on line 120

 Fields('DATE_FORMAT(LstUpdate,'%m/%d/%Y')');
?>
  Fields('DATE_FORMAT(InitOn,'%m/%d/%Y')');
?>
  Fields('DATE_FORMAT(PostStart,'%m/%d/%Y')');
?>

Using this format /syntax
DATE_FORMAT(PostStart,'%m/%d/%Y')worked in a regular
database query.  Apparently not with echo.  I tried no
', also tried " around them, both produced nothing, no
error but no returned date.
Thank you 
Stuart

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



RE: [PHP] Date Format error

2004-11-25 Thread Ford, Mike
To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm



On 25 November 2004 18:39, Stuart Felenstein wrote:

> I'm getting a:
> Parse error: parse error, unexpected '%' in
> /home/mysite/public_html/userpage.php on line 120
> 
>   $rsVJ->Fields('DATE_FORMAT(LstUpdate,'%m/%d/%Y')');

Attempting to use unescaped single quotes within a single-quoted string --
not a good idea.  Either double quote the entire DATE_FORMAT() string, or
escape the embedded single quotes.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



[PHP] Re: Getting static member for a class which name is stored in a variable

2004-11-25 Thread Daniel Schierbeck
Francisco M. Marzoa Alonso wrote:
I've code like follows:

class TestClass {
   public static $Data = 'This is the data';
}
$Obj = new TestClass ();
$ClassName = get_class ($Obj);
echo $ClassName::$Data;
?>
It gives me an error like:
Parse error: parse error, unexpected T_PAAMAYIM_NEKUDOTAYIM ...
I've found googling that it means that those '::' are unexpected. So, 
How can I get an static member for a class which name is stored in a 
variable?

Thx.
I'd make a method in the class that returned the static variable:
class TestClass
{
public static $data = 'This is the data';
public static function getData ()
{
return self::$data;
}
}
$obj = new TestClass();
echo $obj->getData();
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com): 
http://www.spreadfirefox.com/?q=user/register&r=6584

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


Re: [PHP] Secure Password (MySQL) Storage

2004-11-25 Thread Olaf van der Spek
Jason Wong wrote:
On Thursday 25 November 2004 17:43, Olaf van der Spek wrote:

I'm more worried about the data (in MySQL), not the code.
By protecting the MySQL password from being read by scripts directly and
only allowing access based on the current vhost, only this vhost can
access it's own database and not somebody else.

Set default MySQL user and password in your virtual host container. Then 
connect to MySQL without specifying user and password.
That's a reasonable solution, but what if multiple SQL users per vhost 
are needed?

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


[PHP] NH05 to 5, NH07 to 7

2004-11-25 Thread Wiberg
hi there!

i guess you know a simple solution to convert the string

NH01 into 1
NH02 into 2
..
...
NH13 into 13

and so on

/Gustav Wiberg
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 2004-11-19

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



Re: [PHP] Secure Password (MySQL) Storage

2004-11-25 Thread Jason Wong
On Friday 26 November 2004 05:52, Olaf van der Spek wrote:

> That's a reasonable solution, but what if multiple SQL users per vhost
> are needed?

Frankly, if that vhost is going to require that level of 'complexity' then 
that vhost would be better off on a dedicated server. A dedicated server 
isn't that much more expensive than a shared host and the flexibility and the 
peace of mind is well worth the extra.

-- 
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
--
/*
 Zapp: She's built like a steak house but she handles like a bistro. 
*/

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



Re: [PHP] NH05 to 5, NH07 to 7

2004-11-25 Thread Raditha Dissanayake
Wiberg wrote:
hi there!
i guess you know a simple solution to convert the string
NH01 into 1
NH02 into 2
..
...
NH13 into 13
and so on
 

yes
/Gustav Wiberg
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 2004-11-19
 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

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


[PHP] Odd Behaviour: DIE function

2004-11-25 Thread Andre Dubuc
I've noticed some strange behaviour with respect to validation of user input. 
Normally, using Linux, the die function in user input validation works as 
expected. However, the same code in IE, the DIE function does not work as 
expected.

I've noticed that fields, that should die and barf an error message, seem to 
allow no input. Often, I notice that the user has entered a different 
spelling as well. I'm puzzled by this (Furthermore, I wasn't aware the user 
could change the contents of a dropdown select list [I cannot duplicate it in 
Linux). Since one of the affected fields receives its input from an included 
file (provcountry.dpn), perhaps this ius an IE issue??

provcountry.dpn

Country  

 Choose from List
 USA
 /* list of countries follows */


snippet code in validation page:

Please choose
your  Country from the drop-down listClick 'Back' on your
 browser to enter this information");

...
?>

Any pointers of what I'm missing here would be appreciated.

Tia,
Andre

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



Re: [PHP] Odd Behaviour: DIE function

2004-11-25 Thread Jon-Eirik Pettersen
Andre Dubuc wrote:
I've noticed some strange behaviour with respect to validation of user input. 
Normally, using Linux, the die function in user input validation works as 
expected. However, the same code in IE, the DIE function does not work as 
expected.

I've noticed that fields, that should die and barf an error message, seem to 
allow no input. Often, I notice that the user has entered a different 
spelling as well. I'm puzzled by this (Furthermore, I wasn't aware the user 
could change the contents of a dropdown select list [I cannot duplicate it in 
Linux). Since one of the affected fields receives its input from an included 
file (provcountry.dpn), perhaps this ius an IE issue??

provcountry.dpn
Country  

 Choose from List
 USA
 /* list of countries follows */
snippet code in validation page:

if ($_POST['rcountry'] == "Choose from List") die ("Please choose
your  Country from the drop-down listClick 'Back' on your
 browser to enter this information");
...
?>
Any pointers of what I'm missing here would be appreciated.
Tia,
Andre
the -element needs an ending-element. value 
Some browsers may include a space at the end of the string.

I think this is the most "correct" syntax:
Text to show
where "something" is what is sent as value when posting.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] remember me cookie

2004-11-25 Thread Justin French
I've done these plenty of times, but today i've decided to take a 
serious look at how I do it, and do it the right way.  My current 
method is just to store the username and an md5 of the password in a 
couple of cookies.

Is there anything else I should be doing, or an article I should be 
reading, etc???

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


Re: [PHP] remember me cookie

2004-11-25 Thread John Nichel
Justin French wrote:
I've done these plenty of times, but today i've decided to take a 
serious look at how I do it, and do it the right way.  My current method 
is just to store the username and an md5 of the password in a couple of 
cookies.

Is there anything else I should be doing, or an article I should be 
reading, etc???

Shiflett???  :)
I don't know if this is a better way, but I don't store the password 
(encrypted or not) in the cookie.  I store the userid and randomly 
generated encrypted hash (that I also store in the db), along with the 
timestamp.  If a user comes back more than 24 hours after I set the 
cookie, I regenerate the encrypted hash, and update the cookie and db. 
I have a custom function I use for this...nothing special, but...

function encryptCookieAccess() {
global $config;
$enc = base64_encode ( $config['security']['randomWord'] );
$enc = crypt ( $enc, $config['security']['cryptSalt'] );
$enc = md5 ( $enc );
return $enc;
}
The random word is set in the 'config' array from a list of about 1000 
words and phrases, each time a page is loaded.

--
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] Getting static member for a class which name is stored in a variable

2004-11-25 Thread Jake Press
Hi Francisco,
Your not alone, a number of other users have enountered this bug.
:(
I have submitted a bug report, here: http://bugs.php.net/bug.php?id=30716
It would be appreciated if you show your support for this bug by 
commenting/voting etc :)

I also have a `thread` on the php.generals mailing list you may want to 
read, here: http://news.php.net/php.general/201458

Just quickly here is a dodgy workaround to get you moving
   echo eval('return '. $ClassName .'::$Data;');
:)
Best Regards
Jake Press
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: intalling pear:db

2004-11-25 Thread Greg Beaver
Merlin wrote:
that did not help. The pear manual says that this can be installed via
command line, plus "pear list" tells me that the package is installed.
However if I call phpinfo() there is no mentioning about pear in any 
way?!
Do I have to enable it first anyhow?`
I assume you have very little PHP experience, so I'll try not to skip 
any steps.

Forget pear for now.
in PHP, if you have this file:

then php.exe (on windows) or /usr/bin/php (in unix - path may vary) will 
 read a special configuration variable called "include_path" that looks 
something like this:

.;C:\php4
in windows or
.:/usr/local/lib/php
in unix
PHP will pretend your script is:

and if ./blah.php does not exist, it will try

See?  So, if blah.php is actually located in /usr/lib/php/blah.php, php 
will not find it and cause an error.  So, you have to change the 
include_path


PEAR only installs files, it does not change include_path because this 
is impossible to do automatically.  What you need to do is find the 
location of DB.php, and make sure the absolute path that leads to DB.php 
is in your include_path (/usr/local/lib/php/DB.php, perhaps, or 
C:\php4\pear\DB.php)

Having said this, the error you are experiencing sounds like a bug in 
the code.  There are two possibilities

1) there is a file named "DB.php" located in the "." directory, that is 
being included *before* pear's db would be included
2) there is an ancient version of DB.php that is being included before 
pear's DB.php

the get_included_files() function can help you lots on this one
http://us2.php.net/manual/en/function.get-included-files.php
Greg
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Getting static member for a class which name is stored in a variable

2004-11-25 Thread Greg Beaver
Francisco M. Marzoa Alonso wrote:
I've code like follows:

class TestClass {
   public static $Data = 'This is the data';
}
$Obj = new TestClass ();
$ClassName = get_class ($Obj);
echo $ClassName::$Data;
?>
http://www.php.net/manual/en/language.oop5.reflection.php

class TestClass {
   public static $Data = 'This is the data';
}
$obj = new TestClass;
$a = new ReflectionClass('TestClass');
echo $a->getProperty('Data')->getValue($obj);
?>
in PHP 5.1 this should work

class TestClass {
   public static $Data = 'This is the data';
}
$a = new ReflectionClass('TestClass');
echo $a->getProperty('Data')->getValue(null);
?>
Greg
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: intalling pear:db

2004-11-25 Thread Ryan King
On Nov 25, 2004, at 1:56 AM, Merlin wrote:
Hi,
that did not help. The pear manual says that this can be installed via 
command line, plus "pear list" tells me that the package is installed. 
However if I call phpinfo() there is no mentioning about pear in any 
way?! Do I have to enable it first anyhow?`

How about trying a var_dump() on your DB object? For me, this is always 
the first step in trying to solve a mystery like this. Chances are, 
your DB object is really a PEAR_Error object because your failed to 
connect to your database.

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