[PHP] Session Question

2001-07-14 Thread Tom Malone

I'm new to Apache (and PHP) and was unable to find anything approaching an
answer to this problem in the Apache documentation. In fact, I'm not even
sure if I'm having a problem with Apache or with PHP. I am trying to use
sessions to track users on my site and write information to a file. I'm not
requiring them to login or anything - all I really want to know is which
users are visiting different pages on my site so I can judge the
effectiveness of my design. Anyway the problem is - I'm using the following
script:



and i get the following error:

Warning:
fopen("/home/tgmalone/sessn-log/0bbaf33ab1c1f9d714e2244459979ec7.txt","a") -
Permission denied in /home/tgmalone/public_html/index.php on line 17

The problem is obvious, but I've been searching, searching and wracking my
inadequate brain for a solution and can't find one - can anyone help me find
a solution/workaround?

Thanks,
Tom Malone


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




RE: [PHP] Multiple languages

2001-07-14 Thread Maxim Maletsky


The best way to do it definitely is:

make several files with an array like:

file: lang.eng.inc:

$dict = Array();
$dict['name'] = 'Name';
$dict['button']['red'] = 'Red Button';


file: lang.ita.inc:

$dict = Array();
$dict['name'] = 'il nome';
$dict['button']['red'] = 'il bottone rosso';


file: lang.spa.inc:

$dict = Array();
$dict['name'] = 'nombre';
$dict['button']['red'] = 'er botone roso';


file: lang.rus.inc:

$dict = Array();
$dict['name'] = 'Imya';
$dict['button']['red'] = 'Krassnaya knopka';


file: lang.jap.inc:

$dict = Array();
$dict['name'] = 'Onamae';
$dict['button']['red'] = 'Aka no battonu';



and so on... and so on...



then, in your scripts before any output (no, not a rule, just otherwise
makes few sense)...

1. ... include a config file where the language is set.
oh well, you can use any way you wish, cookies, sessions, get variables,
whatever, as long as you can set a language of preference to the script.

2. include "lang.$lang.inc";

3. In case you need something within a function or class just define
variable $dict as global.


Hare we go.
This is the less resource consuming way, all you need is to set the language
prefence correctly and work on keeping track of it.


any code?
Hmm, you could try to look into applications like phpmyadmin or Jinnie...
but the difference here is, most of these doing a little mistake - they
create a bunch of new variables for every phrase. Better do it with an
array.




Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com









-Original Message-
From: Inércia Sensorial [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 15, 2001 12:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Multiple languages


  Hi All,

  I want to enable multiple languages on one of my scripts, so
administrators or visitors can choose in what language they want to browse
the site. I have seen a few ways to do it, like with switch, define or
querying databases.

  But, considering performance, what is the best way to make a script with
multiple languages?

  Thanks for any ideas.


--

  Julio Nobrega.

You're asking me will my love grow, I don't know.



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



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




[PHP] Anybody using Miva or hosted at Hosting4All?

2001-07-14 Thread Daniel Baldoni

G'day folks,

We've got a web-application ready to install and everything looks okay except
that the client has chosen Hosting4all as their web-hoster.  They
(Hosting4all) don't have a version of PHP linked with cURL and we need to
process credit card information.  Again, the client has chosen a payment
processor and, as expected, secure-HTTP is required.

All fair enough - the payment script has been written and works on our
servers.  Of course, it'll fail dismally on Hosting4All's servers.

My question is...

Is anybody on this list hosting an e-commerce site with Hosting4All?
Or, has anybody had any experience with the "Miva Engine" which
Hosting4All provide "free of charge" (i.e. as part of the
subscription fee)?

Any help would be much appreciated.  Thanks in advance.

Ciao.

-- 
---+-
Daniel Baldoni BAppSc, PGradDipCompSci |  Technical Director
require 'std/disclaimer.pl'|  LcdS Pty. Ltd.
---+  856B Canning Hwy
Phone/FAX:  +61-8-9364-8171|  Applecross
Mobile: 041-888-9794   |  WA 6153
URL:http://www.lcds.com.au/|  Australia
---+-
"Any time there's something so ridiculous that no rational systems programmer
 would even consider trying it, they send for me."; paraphrased from "King Of
 The Murgos" by David Eddings.  (I'm not good, just crazy)

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




[PHP] Re: Select IN array?

2001-07-14 Thread James Tan

dear chris,

mysql does not support 'in' clause at the momment...
the only way to this is to use the loop to generate the sql syntax..
orr.. use the implode function... to join the array into 1 string separated by
the first parameter...

$catsql = implode("or cid=", $catids);
$catsql  = ((strlen(catsql)>0)? substr(catsql, 3, strlen(catsql)): "");

$catsql = "select * from categories where " . $catsql;

Chris Lott wrote:

> I have an array of id numbers ($catids). I would like to select from the
> mysql database all records where cid is in that array.
>
> This syntax fails:
> select * from categories
> where cid in $catids
>
> What is the correct way to do this? It can be done outside of a loop, can't
> it?
>
> c


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




Re: [PHP] Re: OOP Problems

2001-07-14 Thread James Tan

oh,

i didn't realise how php is as flexible as vb :)

yeah.. ops, missed out the owner->test1 does not exist :)

thanx for tips :)

[EMAIL PROTECTED] wrote:

> Hi u007!
> On Sun, 15 Jul 2001, u007 wrote:
>
> > hie..
> > it's simply u did not declare ur class variable...
> >
> well, actually you don't have to declare them, you can add members as you go
> (as opposed to C++ for example)
>
> > class ctest
> > {
> > var $owner;
> >
> > function ctest(&$owner)
> > {
> > $this->owner = $owner;
> > }
> >
> > function foo()
> > {
> > echo "test!";
> > }
> > }
> >
> > hope it works :)
> > regards,
> >
> > James
> >
> > Andrew Kirilenko wrote:
> >
> > > Hello!
> > >
> > > I have following problem:
> > >
> > >  > > $container = new ccontainer();
> > > $container->init();
> > > $container->test1->foo();
> > > $container->test2->foo();
> > > $container->test2->owner->test1->foo();
> > > $container->test1->owner->test2->foo();
> > >
> > > class ccontainer
> > > {
> > > function ccontainer()
> > > {
> > > }
> > >
> > > function init()
> > > {
> > > $this->test1 = new ctest(&$this);
> > > $this->test2 = new ctest(&$this);
> > > }
> > > }
> > >
> > > class ctest
> > > {
> > > function ctest(&$owner)
> > > {
> > > $this->owner = $owner;
> > > }
> > >
> > > function foo()
> > > {
> > > echo "test!";
> > > }
> > > }
> > > ?>
> > >
> > > Output of this script is:
> > > --->
> > > test!
> > > test!
> > > test!
> > > Fatal error: Call to a member function on a non-object in c:\www\a.php on
> > > line 8
> > > <---
> > >
> > > How to solve this problem???
> > >
> > > Best regards,
> > > Andrew Kirilenko,
> > > Senior Programmer / System Administrator,
> > > Internet Service.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> -- teodor


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




[PHP] Multiple languages

2001-07-14 Thread Inércia Sensorial

  Hi All,

  I want to enable multiple languages on one of my scripts, so
administrators or visitors can choose in what language they want to browse
the site. I have seen a few ways to do it, like with switch, define or
querying databases.

  But, considering performance, what is the best way to make a script with
multiple languages?

  Thanks for any ideas.


--

  Julio Nobrega.

You're asking me will my love grow, I don't know.



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




[PHP] Exec, system, passthru didn't work

2001-07-14 Thread Reuben D Budiardja


Hi,
I tried to execute the following command from the web interface using a 
system call
/usr/bin/play a_wave_file.wav

I tried exec, system, passthru, and shell_exec. None of them worked, that is 
I didn't hear any sound played. Note that I'm sitting here on the server 
itself, and tried it with a web browser in the server. The command is 
executed fine when I just copy it and run it in terminal. I also made sure 
that nothing blocked the sound card, that is, the sound card was not in use.

exec, system, passthru returns the value 2, which I don't know what it means. 

Any help on this will be appreciated. Thanks in advance.

Reuben D. Budiardja

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




[PHP] ereg() help, plz

2001-07-14 Thread McShen

hi,

I wanna print out all files in a directory. But i wanna exclude ".", "..",
"head.jpg", and all files that start with tn_

Here is my script, but it didn't work. Please help me to solve this problem.
Thank You.

-my script-
while ($file_name = readdir($dir2))

if (($file_name!="." && $file_name!=".." && $file_name!="head.jpg" &&
$file_name!=ereg(^tn_,$file_name) ))

$files[]=$file_name;
}

$numfiles = count($files);

for ($i=$g; $i<$numfiles; $i++){
echo $files[$i];
}

-





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




RE: [PHP] Alternative to phpMyAdmin

2001-07-14 Thread Matthew Loff


You probably mean SSH tunnel, which is quite feasable--  Hank Marquardt
posted this earlier to the list:

--- BEGIN QUOTE ---

Works just fine ... as does postgres --

ssh -N -2 -f -C -c blowfish -L3306:yourdatabase.server.here:3306
[EMAIL PROTECTED]

or the other usual tricks work too ... like going through a firewall
(fyi ... clear text on the *other* side of the firewall):

ssh -N -2 -f -C -c blowfish -L3306:db_behind_thefirewall:3306
[EMAIL PROTECTED]

The only oddity is that you will have to use the local host *address*
127.0.0.1 to connect from the mysql client as it normally looks for a
local socket if you use 'localhost', so your connection will be:

mysql -h 127.0.0.1

for postgres examples, change the port numbers (3306) to 5432

--- END QUOTE ---

-Original Message-
From: Evan Nemerson [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, July 14, 2001 6:02 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Alternative to phpMyAdmin


What if you were to open an SSL tunnel to the DB host, then connect
through 
that???

> like you said... as long as the database provider accepts connections 
> from outside, you can administer it from anywhere.
>
> if the provider doesn't accept incoming connections, no amount of 
> tools and software will work for you.
>
> > -Original Message-
> > From: Alexander Skwar [mailto:[EMAIL PROTECTED]]On Behalf Of
> > Subject: RE: [PHP] Alternative to phpMyAdmin
> >
> > > if you install mysql on a windoze machine then you can administer 
> > > ANY >
> >
> > mysql database going through the socket.
> >
> > Okay, for a development this may be fine, but I still fail to see 
> > how a tool that runs on your own computer (no matter if it's a 
> > Windows tool, or a Linux tool) can help you administer databases 
> > which are not on the same computer (unless the mysql database on the

> > providers server can be contacted from any machine and not just from

> > "localhost").
> >


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


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




Re: [PHP] Re: Australian Developers -- Contract/Partnership Oppourtunity

2001-07-14 Thread Justin French

Hi James,

I don't want someone overseas. 
I DID ask for someone in Melbourne.
Thanks anyway.

Justin French




James Tan wrote:
> 
> hi,
> 
> I'm interested in the position,
> would it be ok if I were in the position to do it from distance??
> 
> I'm currently living in malaysia...
> I could do php with mysql.
> I could setup apache , mysql and php with source on the unix environment as
> well...
> php have been my major for about several months ago..
> I've developed a payroll system with php.
> 
> hope to hear from you soon,
> 
> thank you
> 
> regards,
> 
> James
> 
> Justin French wrote:
> 
> > Hi all,
> >
> > I'm currently putting in a tender together for a large web project,
> > using PHP and MySQL, but I believe my skills may not quite be upto
> > scratch (or at least my development speed / quality of code), so I'm
> > considering finding a partner for the project.
> >
> > They have a realistic budget, realistic development time-frame, and
> > there are enough "components" to the project to serve as an excellent
> > "trophy" to show off our/your capabilities.
> >
> > I'm only interested in Melbourne (Australia) based PHP/MySQL developers,
> > capable of writing efficient, clean code for applications such as:
> >
> > o  detailed content management
> > o  intricate membership management
> > o  e-commerce (URL session based, not client side/cookies)
> > o  statistics / tracking gathering and analisys
> >
> > The developer must be able to show thier ability with real world
> > examples, and the ability to write portable / reuseable code rather than
> > one-off applications is a must.
> >
> > Understanding of the balance between browsers / design / information /
> > code would be an added bonus.
> >
> > Essentially I'm looking for a freelancer / contractor available to work
> > weekdays (even from home a lot of the time), and whilst this is a
> > one-off project, I'm keen to find a long term business partner to persue
> > similar projects full time.
> >
> > Terms / hours will be decent and negotiable for the right person.
> >
> > PLEASE no time wasters.  Send BRIEF resume / details to [EMAIL PROTECTED]
> >
> > Justin French
> > Creative Director
> > Indent.com.au
> > [EMAIL PROTECTED]
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




[PHP] RPM Install #6 still doesn't work

2001-07-14 Thread Gaylen Fraley

Ok.  I've been in this industry for 32 years.  I've loved O/S2, hated windoz
and been intrigued with *nix.  So, I have a successful web site and server
under windoz/php/mysql and I decide to venture into RedHat Linux because I
have heard some great things about it.

I get 7.0 and install it, virgin.  Apache and PHP work, but I was never able
to get MySQL working, except from a command line.  So, after abut 17 hours
of frustration, I get 7.1 .  Apache is the only thing that works.  I was
able to get PHP working when I did an install from scratch (tarball).  But,
it seems as if the RPM should work.  I still could not get MySQL working
working.  It consistently gives an error 2002 / socket problem.

Right now I have a virgin Apache and PHP4 and MySwl install from the RPM
(7.1) and php will not work.  As far as I can tell, I have modified my
httpd.config in all the right places.  Please, could someone who has a
working install from the 7.1 RPM package, please post their httpd.conf lines
that pertain to getting php to work?  Also, if their is a library that I
need to move around, please advise that too.

Thanks.  The MySQL problem would be a nice caveat if someone knows how to
fix that too :)

Regards,

--
Gaylen
[EMAIL PROTECTED]




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




[PHP] cURL to secure page...

2001-07-14 Thread Glenn Shope

I need to send form input to a secure CC payment processing form using the
POST method. Before the fields are sent, I need to insert them into a
database, and I prefer that the user not have to press a second submit.

I have been trying to use cURL to do this, but instead of sending the user
to the page, it stays at the sending page and does not seem to send the
variables. Here is the code I am using:

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL,"$ccPaymentURL");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "$formDataString");
curl_exec ($ch);

curl_close ($ch);

Does anyone have ideas about why this is not working?

Thanks

Glenn Shope
[EMAIL PROTECTED]
Twin Cities Music Network
3010 Hennepin Ave. S. #109
Minneapolis, MN 55408
612-362-5995
http://www.tcmusic.net 




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


Re: [PHP] Alternative to phpMyAdmin

2001-07-14 Thread Evan Nemerson

What if you were to open an SSL tunnel to the DB host, then connect through 
that???

> like you said... as long as the database provider accepts
> connections from outside, you can administer it from anywhere.
>
> if the provider doesn't accept incoming connections, no amount
> of tools and software will work for you.
>
> > -Original Message-
> > From: Alexander Skwar [mailto:[EMAIL PROTECTED]]On Behalf Of
> > Subject: RE: [PHP] Alternative to phpMyAdmin
> >
> > > if you install mysql on a windoze machine then you can administer ANY >
> >
> > mysql database going through the socket.
> >
> > Okay, for a development this may be fine, but I still fail to see how a
> > tool that runs on your own computer (no matter if it's a Windows tool, or
> > a Linux tool) can help you administer databases which are not on the same
> > computer (unless the mysql database on the providers server can be
> > contacted from any machine and not just from "localhost").
> >


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




Re: [PHP] Best Choice

2001-07-14 Thread Evan Nemerson

> 1) Can someone please clarify if we need something else for this
> (asp,cgi,ect).

You don't need anything other than PHP & mySQL. What you are talking about 
could be done in ASP, but would be much more difficult (most people find ASP 
to be a much more difficult language). When you say CGI, you probably mean 
Perl, which is the most popular. If you want to, you can use PHP as CGI. You 
could do your entire system in Perl, but Perl is considered more difficult 
than PHP.

I think you should use PHP, but then again an ASP list would say ASP w/ an 
Access database. A Perl list would say Perl with- what does Perl use for a 
database???

> 2) If PHP is the best choice can someone please suggest perhaps to an
> ongoing PHP open-source project which would lend to such an endeavor?

The best place I have found for scripts is hotscripts.com (although they need 
more Python...) You can probably find something there to help you, but I 
doubt you could find an entire system. You could also try some advanced 
searches with google, or if you want to sort through a LOT of results, 
http://fravia.2113.ch/phplab/blue.php searches many, many search engines.

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




Re: [PHP] postgres and php

2001-07-14 Thread Nuno Silva


hi there!

the operators you want are ~ and ~* and !~ and !~*.
select name from table where name ~* 'test';

to see all operators availlable type \do in psql's interactive mode ;)

Regards,
Nuno Silva

Derek wrote:

> anyone know how I force a case insensitive search through a postgres
> database.
> 
> I've got a search looking for 'something like '%something%' but this won't
> find 'SOMETHING'...if you know what I mean!?
> 
> Thanks in advance for any help
> 
> Derek
> 
> 
> 
> 



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




RE: [PHP] Variable name declarations?

2001-07-14 Thread Kent Sandvik


> function sum_array( $input_array )
> {
> var $index;
> var $sum = 0;
>
> for( $index = 0; $index < count( $input_array ); $index++ )
> $sum += $input_array[ $index ];
>
> return $sum;
> }

The array variable issue has indeed bitten me a couple of times, so now all
my arrays are called $_arr. It would nice to introduce more
runtime checking of array types and complaints in case non-array values are
used in functions. But otherwise the strong type checking will just cause
more problems and more overhead with calls. I don't know if the example
above will help that much, but you could already write similar code in
functions to make sure that the values are declared on top, to make things
clearer.

--Kent



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




[PHP] phpLinks

2001-07-14 Thread Greg Donald

phpLinks 2.1 beta is released.

http://phplinks.org/


Thanks,
Greg


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




RE: [PHP] Select IN array?

2001-07-14 Thread Chris Lott

> I have an array of id numbers ($catids). 

> This syntax fails:
> select * from categories
> where cid in $catids

Never mind. I was being stupid. For the record, one needs to implode(",",
$catids) and then use that in the WHERE statement, i.e. "where cid in
($catids)"

c

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




[PHP] Problem with FORM, SELECT and SUBMIT - select value never shows up

2001-07-14 Thread Warrick Wilson \(Avignon Reg'd Kennels\)

I'm a new PHP/mySQL user (all of about 10 hours so far, working thru some
web-based tutorial stuff and using resources on the Internet). I have the
following "problem":

You can try the code out at
http://www.bond.net/~warrickw/zone6jrs/testsel.php

I want to have a form that lists values in a  menu. Eventually I
will go back to populating the form from a database. I've been working
backwards and I am down to basic HTML and a little bit of PHP to look at the
submitted values.

The problem is my page NEVER, NOT EVER recognizes the value for the
myhandlerlist  menu. If I submit by GET, it shows up in the URL
address, but isn't recognized. I added a second , and THAT got
recognized, and it recognizes my  elements, but no way can I get a
value for the myhandlerlist.

I did some searching thru the archives and generally on the Internet, and
found lots of people posting similar sorts of problems, but the proposed
solutions I saw all dealt with building the lists dynamically.  I moved away
from that to this single item list and I still can't figure out why it won't
work.

Any and all help appreciated.





Test Selection



Add/Update Handler Information
On entry:
");
if (is_array($myhandlerlist)) {
echo("myhandlerlist is an array!\n\n");
}
echo("");

echo("");
if (isset($myhanderlist)) {
echo("myhandlerlist is set to " . $myhandlerlist );
} else {
echo("myhandlerlist is NOT set");
}
echo("");

echo("");
if (isset($list2)) {
echo("list2 is set to " . $list2 );
} else {
echo("list2 is NOT set");
}
echo("");

echo("");
if (isset($hupdate)) {
echo("hupdate is set to " . $hupdate );
} else {
echo("hupdate is NOT set");
}
echo("");

echo("");
if (isset($hadd)) {
echo("hadd is set to " . $hadd );
} else {
echo("hadd is NOT set");
}
echo("");

echo("");
if (isset($useraction)) {
echo("useraction is set to " . $useraction );
} else {
echo("useraction is NOT set");
}
echo("");
?>

Select a handler from the list and press Update, or press
New to add a new Handler.



" method="get" name="useraction"
id="useraction">


Warrick Wilson










Warrick Wilson
Avignon Reg'd Kennels
Kitchener, Ontario, Canada
http://www.avignonkennels.com
mailto:[EMAIL PROTECTED]


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




[PHP] Select IN array?

2001-07-14 Thread Chris Lott

I have an array of id numbers ($catids). I would like to select from the
mysql database all records where cid is in that array.

This syntax fails:
select * from categories
where cid in $catids

What is the correct way to do this? It can be done outside of a loop, can't
it?

c

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




[PHP] Loop an INSERT 10 rows from a Form

2001-07-14 Thread David

The form is no problem but how do INSERT 10 ROWS with one insert
statement. I figure some kind of loop like I did with the form.

When form is submitted:
$query = "INSERT INTO songs VALUES ('$id',
'$songname','$rating','$video', '$album_id', '$movie')";
   $result = mysql_db_query("movies", $query);

if ($result) {
// worked



This is the form:




ID:size=3>
Songname:  
Rating:   
Video ID:   
Album ID:size=2 maxsize=3>
Movie ID:   







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




[PHP] Re: Manual building/snapshot

2001-07-14 Thread jimw

Chris Lott <[EMAIL PROTECTED]> wrote:
> Since nothing seems to be available at snaps.php.net/manual I grabbed the
> phpdoc cvs tree. Could anyone who is building their own manual tell me what
> I need to build it? I'm running RedHat Linux 7.1

egon answered the question about what you need, but you may want to
keep in mind that the docs available at http://www.php.net/docs.php
are built every day (if there have been changes to that particular
translation) or weekly.

obviously, when the documentation is not in a buildable state, it is
not updated, which is why several of the translations have fallen
slightly behind.

jim

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




[PHP] Re: apache not handling 404 errors for .php pages

2001-07-14 Thread Ken Gregg

I get this too. I think it is because I'm running cgi php. Think it is a
500 error.

Easiest fix would to also create a custom 500 error handler.

Ken Gregg
Enhanced Data Systems, Inc.
http://www.rwre.com for the best in Southwest Oregon Real Estate


Scott wrote:

> I have custom 404 error handling setup on my linux apache
> box, however, there's a problem with files that have a PHP
> extension.  it seems that apache itself does not check for the
> existence of the requested .php file and fires up PHP no matter
> what.  if PHP does not find the requested file, it'll bail out
> with that dorky looking "Internal Server Error" *NOT* the
> custom error handler that apache uses for non-php files
>
> example: "notexists.html" and "notexists.php" both do not exist
>
> http://server.com/notexists.html
> will show me the custom 404 page
>
> http://server.com/notexists.php
> will show me the "Internal Server Error", becuase apache fired
> up PHP and passed in "notexists.php" without checking for the
> existence of "notexists.php" first.
>
> A possible solution that comes to mind is to auto_prepend
> a script that will check for the existance of the file
> that PHP is attempting to execute, and die gracefully if
> it does not exist on the server but that would be a bad
> kludge hack (if it even works at all)
>
> anyone have a more elegant solution?



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


[PHP] convert vbcrlf to br problem

2001-07-14 Thread Chip

  I have a form with a textarea and it is being used by a marketing dept
to
  paste a ms word doc into. It then is saved into a mysql database and
viewable online. the
  problem is that the word doc used vbCrLf which is not recognized by
the browser, so the
  lines are extmely long.
  I have tried this:
  "];
  ?>
  It just results in an error:
  parse error: expecting "," or ";" on line 8
  (which is the echo line above)
  I would like to be able to add the necessary code to the existing page
so it will automatically
  do the conversions, or put the code into the display page so it will
convert the text at the
  time it is loaded into the page to be read.
  Any suggestions on how to convert the vbCrLf to  on the ms word
doc that is
  pasted into a textarea?
  Surely somebody has come up against this problem, I have yet to find
the answer that will
  work in any of my 3 php books or online.

--
Regards,

Chip




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




Re: [PHP] Web application?

2001-07-14 Thread Mark Charette

From: "Christopher Ostmo" <[EMAIL PROTECTED]>
> The lack of transactions can easily be overcome by proper programming
> logic.

That, unfortunately, is totally untrue if there's the possibility of more
than one person manipulating data at one time on tables.

The "old fashioned way" of locking all involved tables for read & write,
trying to perform a sequence of operations and undoing the operations if
there's a failure anywhere - is effectively a single-threaded transaction.
Until fairly recently that was the only way of doing transactions in MySQL.

Re: innodb - I tried setting up a 5 Gb database and gave up after 5 hours of
innodb initializing the db disk. Went back to the MySQL defaults. YMMV.


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




Re: [PHP] Re: OOP Problems

2001-07-14 Thread teo

Hi u007!
On Sun, 15 Jul 2001, u007 wrote:

> hie..
> it's simply u did not declare ur class variable...
> 
well, actually you don't have to declare them, you can add members as you go
(as opposed to C++ for example)

> class ctest
> {
> var $owner;
> 
> function ctest(&$owner)
> {
> $this->owner = $owner;
> }
> 
> function foo()
> {
> echo "test!";
> }
> }
> 
> hope it works :)
> regards,
> 
> James
> 
> Andrew Kirilenko wrote:
> 
> > Hello!
> >
> > I have following problem:
> >
> >  > $container = new ccontainer();
> > $container->init();
> > $container->test1->foo();
> > $container->test2->foo();
> > $container->test2->owner->test1->foo();
> > $container->test1->owner->test2->foo();
> >
> > class ccontainer
> > {
> > function ccontainer()
> > {
> > }
> >
> > function init()
> > {
> > $this->test1 = new ctest(&$this);
> > $this->test2 = new ctest(&$this);
> > }
> > }
> >
> > class ctest
> > {
> > function ctest(&$owner)
> > {
> > $this->owner = $owner;
> > }
> >
> > function foo()
> > {
> > echo "test!";
> > }
> > }
> > ?>
> >
> > Output of this script is:
> > --->
> > test!
> > test!
> > test!
> > Fatal error: Call to a member function on a non-object in c:\www\a.php on
> > line 8
> > <---
> >
> > How to solve this problem???
> >
> > Best regards,
> > Andrew Kirilenko,
> > Senior Programmer / System Administrator,
> > Internet Service.
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
-- teodor

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




Re: [PHP] OOP Problems

2001-07-14 Thread teo

Hi Andrew!
On Sat, 14 Jul 2001, Andrew Kirilenko wrote:

> Hello!
> 
> I have following problem:
> 
>  $container = new ccontainer();
> $container->init();
> $container->test1->foo();
> $container->test2->foo();
> $container->test2->owner->test1->foo();
[*]
> $container->test1->owner->test2->foo();
> 
> class ccontainer
> {
> function ccontainer()
> {
> }
> 
> function init()
> {
> $this->test1 = new ctest(&$this);
> $this->test2 = new ctest(&$this);
> }
> }
> 
> class ctest
> {
> function ctest(&$owner)
> {
> $this->owner = $owner;
> }
> 
> function foo()
> {
> echo "test!";
> }
> }
> ?>
> 
> Output of this script is:
> --->
> test!
> test!
> test!
> Fatal error: Call to a member function on a non-object in c:\www\a.php on
> line 8
> <---
> 
> How to solve this problem???
> 
at the moment marked [*] you are using test1->owner
test1->owner  is ccontainer *before* init() had the chance to set test2 to it,
so the class has no such property "test2".

try a print_r($container) right after $cointainer->init() to see what I mean.

actually, you will notice that test2->owner doesn't have test2 member too!
cause at the moment it was created, the ccontainer was incomplete 
(the expression $this->test2 = new ctest (&$this) evaluates right-to-left)

a quick hack would be to have a circular reference, by saying:
$this->owner =& $owner; // note the & :)

but the way you create the classes seems just trouble. what exactly are you
trying to achive?


-- teodor

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




Re: [PHP] Web application?

2001-07-14 Thread Chris Lambert

Well, all the comparisons were based on year old (July 2000) versions of
each database, so not everything mentioned still holds true today.
 __
/ Chris Lambert - [EMAIL PROTECTED]
|-> ICQ #: 16435685 - AIM: ClipperChris
`-> Cell: (401) 743-2786 - http://sms.clambert.org/
- Original Message -
From: Matthew Loff <[EMAIL PROTECTED]>
To: 'Chris Lambert - WhiteCrown Networks' <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Saturday, July 14, 2001 1:57 PM
Subject: RE: [PHP] Web application?



Just for reference, I originally meantioned a comparison of PostgreSQL
beta vs. MySQL latest--  here's the article:

http://www.phpbuilder.com/columns/tim2705.php3?page=1

I'm curious to hear comments on stability of Postgres, since the author
of that article meantions it as a concern of his.


-Original Message-
From: Chris Lambert - WhiteCrown Networks [mailto:[EMAIL PROTECTED]]
Sent: Saturday, July 14, 2001 11:30 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Web application?


And the article was written by Joshua Drake, not Zeev. It seems to have
been published early January, judging by some Google research. Not sure
why it isn't in Zend's article DB anymore...

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Rasmus Lerdorf <[EMAIL PROTECTED]>
To: Martín Marqués <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, July 14, 2001 11:24 AM
Subject: Re: [PHP] Web application?


| > On Sáb 14 Jul 2001 12:09, Rasmus Lerdorf wrote:
| > > > Thats not the worst thing I find in it. MySQL has referential
integrity?
| > > > How about locking for update of rows? You have to lock the whole
table!
| > >
| > > Actually both the innodb and gemini backends for MySQL have
| > > row-level locking.
| >
| > That must be really new, cause the biggest blame I find over MySQL
| > is
the
| > table locking feature (Zeev Suraski articule also talks about it).
|
| Has been there for months.  Since version 3.23.30
|
| -Rasmus
|
|
| --
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED] To
| contact the list administrators, e-mail: [EMAIL PROTECTED]
|
|
|



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



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




RE: [PHP] Web application?

2001-07-14 Thread Matthew Loff


Just for reference, I originally meantioned a comparison of PostgreSQL
beta vs. MySQL latest--  here's the article:

http://www.phpbuilder.com/columns/tim2705.php3?page=1

I'm curious to hear comments on stability of Postgres, since the author
of that article meantions it as a concern of his.


-Original Message-
From: Chris Lambert - WhiteCrown Networks [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, July 14, 2001 11:30 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Web application?


And the article was written by Joshua Drake, not Zeev. It seems to have
been published early January, judging by some Google research. Not sure
why it isn't in Zend's article DB anymore...

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Rasmus Lerdorf <[EMAIL PROTECTED]>
To: Martín Marqués <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, July 14, 2001 11:24 AM
Subject: Re: [PHP] Web application?


| > On Sáb 14 Jul 2001 12:09, Rasmus Lerdorf wrote:
| > > > Thats not the worst thing I find in it. MySQL has referential
integrity?
| > > > How about locking for update of rows? You have to lock the whole
table!
| > >
| > > Actually both the innodb and gemini backends for MySQL have 
| > > row-level locking.
| >
| > That must be really new, cause the biggest blame I find over MySQL 
| > is
the
| > table locking feature (Zeev Suraski articule also talks about it).
|
| Has been there for months.  Since version 3.23.30
|
| -Rasmus
|
|
| --
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED] To 
| contact the list administrators, e-mail: [EMAIL PROTECTED]
|
|
|



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


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




Re: [PHP] complex objects and sessions

2001-07-14 Thread teo

Hi David!
On Sat, 14 Jul 2001, David Brumley wrote:
> Hi,
> Was the complex object issue ever fixed in PHP 4?
works just fine for me (since 4.0.4pl1)

> 
> I'm running 4.0.6 with imap, and have built a class IMAPSession
> defined in lib/sessionobject.inc.php.  Here is a script:
>  
>  $config = array();
> 
>  require("config/defaults.inc.php");
>  require("lib/common.inc.php");
>  require("lib/sessionobject.inc.php");
>  require("lib/imap_read.inc.php");
> 
> 
>  session_start();
>  session_register(csession); 
>  include("Template/header.html");
>  if(! $csession ){
>$csession = new IMAPSession($state);
in which file is IMAPSession defined?

>  }
>  if(! $state){
>   $state = "start";
>  }
>  $csession->SwitchContext($state, $msg);
> ?>
> 
> My understanding is that the "csession" object should be stored. But
> on the second invocation I get:
> 
> Fatal error: The script tried to execute a method or access a property
> of an incomplete object. Please ensure that the class definition
> imapsession of the
> object you are trying to operate on was loaded _before_ the session
> was started in /d0/www/htdocs/webmail/index.php on line 20
> 
> 
> any hints would be appreciated.
be sure you have the class definition available before calling
session_start();

-- teodor

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




Re: [PHP] Re: Confirmation Requester

2001-07-14 Thread Inércia Sensorial

http://www.bosrup.com/web/overlib/

--

  Julio Nobrega.

You're asking me will my love grow, I don't know.
"Dave Freeman" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On 13 Jul 01, at 21:47, Inércia Sensorial wrote:

>   Maybe a pop-up or a CSS/javascript box with a 'true delete' link (That
> would be elegant :-)).

Yep, that's what I'm planning on - got any references on actually doing it?
I'm still learning about this sort of stuff and it really helps to see
working
examples - or references to relevant code snippets etc.

CYA, Dave


---
Outback Queensland Internet - Longreach, Outback Queensland - Australia
http://www.outbackqld.net.au  mailto:[EMAIL PROTECTED]
---



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




Re: [PHP] Re: Export to Excel

2001-07-14 Thread teo

Hi Marius!
On Fri, 13 Jul 2001, Marius Andreiana wrote:

> How do you deal with numeric fields which start with 0 ?
> Excel takes the 0s out.
> 
[wild-guess]

erm, enclose them in `quotes' ?


-- teodor

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




[PHP] SOLVED: php w/ mysql support compiled in -- can't connect to mysql

2001-07-14 Thread Kurt Lieber

For those of you who might be using Debian (and new to linux in general)
mysql support for php is offered as a separate package in debian.  Just
use apt-get install php4-mysql, restart apache and you should be good to
go.

Hope this helps someone.

--kurt

-Original Message-
From: Kurt Lieber [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, July 14, 2001 8:35 AM
To: '[EMAIL PROTECTED]'
Subject: php w/ mysql support compiled in -- can't connect to mysql


OK, there's been another thread floating around about getting: 

Fatal error: Call to undefined function: mysql_pconnect()

Turns out, I'm getting this same error message for both mysql_pconnect
as well as plain mysql_connect.  I'm using the PHP debian package found
in potato. (4.0.3pl1)  phpInfo() shows me the configure command which
includes:

'--with-mysql=shared,/usr' 

So, I'm assuming that I really have mysql support compiled in.  mysql
lives in /usr/bin/mysql (and is also the debian potato package)

I'm used to windows -- this is the first time I've tried to set up
php/mysql on linux, so I'm hoping I'm just overlooking something
obvious. Anyone have any ideas?

Thanks.

--kurt


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




Re: [PHP] Manual building/snapshot

2001-07-14 Thread eschmid+sic

On Sat, Jul 14, 2001 at 07:57:19AM -0800, Chris Lott wrote:

> Since nothing seems to be available at snaps.php.net/manual I grabbed the
> phpdoc cvs tree. Could anyone who is building their own manual tell me what
> I need to build it? I'm running RedHat Linux 7.1

You need, DocBook, Jade, and the DSSSL stylesheets from Norman Walsh. If
you plan to build the PS or PDF manuals you should contact Jouni Ahto. I
have missed him at the LinuxDays.

-Egon

-- 
LinuxTag, Stuttgart, Germany: July 5-8 2001: http://www.linuxtag.de/
All known books about PHP and related books: http://php.net/books.php 
Concert Band of the University of Hohenheim: http://www.concert-band.de/
First and second bestselling book in German: http://www.php-buch.de/

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




[PHP] Re: Australian Developers -- Contract/Partnership Oppourtunity

2001-07-14 Thread James Tan

hi,

I'm interested in the position,
would it be ok if I were in the position to do it from distance??

I'm currently living in malaysia...
I could do php with mysql.
I could setup apache , mysql and php with source on the unix environment as
well...
php have been my major for about several months ago..
I've developed a payroll system with php.

hope to hear from you soon,

thank you

regards,

James


Justin French wrote:

> Hi all,
>
> I'm currently putting in a tender together for a large web project,
> using PHP and MySQL, but I believe my skills may not quite be upto
> scratch (or at least my development speed / quality of code), so I'm
> considering finding a partner for the project.
>
> They have a realistic budget, realistic development time-frame, and
> there are enough "components" to the project to serve as an excellent
> "trophy" to show off our/your capabilities.
>
> I'm only interested in Melbourne (Australia) based PHP/MySQL developers,
> capable of writing efficient, clean code for applications such as:
>
> o  detailed content management
> o  intricate membership management
> o  e-commerce (URL session based, not client side/cookies)
> o  statistics / tracking gathering and analisys
>
> The developer must be able to show thier ability with real world
> examples, and the ability to write portable / reuseable code rather than
> one-off applications is a must.
>
> Understanding of the balance between browsers / design / information /
> code would be an added bonus.
>
> Essentially I'm looking for a freelancer / contractor available to work
> weekdays (even from home a lot of the time), and whilst this is a
> one-off project, I'm keen to find a long term business partner to persue
> similar projects full time.
>
> Terms / hours will be decent and negotiable for the right person.
>
> PLEASE no time wasters.  Send BRIEF resume / details to [EMAIL PROTECTED]
>
> Justin French
> Creative Director
> Indent.com.au
> [EMAIL PROTECTED]


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




[PHP] Re: REGEXP

2001-07-14 Thread James Tan

hi,,

u could try using explode function
eg:

arrayresult = explode(string, separator);

cont = explode(thestring, "\"");

echo cont[0] ;
// result as
Content-Type: multipart/mixed;
 boundary=
echo cont[1];
//result as
B42DA66C4EC07C9B572A58FC
echo cont[2];
// array index 2 will be nothing.. null or ""

hope it works..
regards,

James

Adrian D'Costa wrote:

> Hi,
>
> I am trying to capture the Header from a mail for my webmail using php and
> pop3.  The header is something like this:
> Content-Type: multipart/mixed;
>  boundary="B42DA66C4EC07C9B572A58FC"
>
> When I use preg_split("/[\d;]*/", $buffer), I get
> Content-Type: multipart/mixed;
>
> What I want is to return the whole line split by the ";".  I usually try
> to avoid regexp (too lazy) but now I want to use it.  The final result I
> would need is: B42DA66C4EC07C9B572A58FC so that I can search
> in the body of the message for the rest of the parts.
>
> Any pointers would be helpful.
>
> Adrian


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




[PHP] Re: OOP Problems

2001-07-14 Thread u007

hie..
it's simply u did not declare ur class variable...

class ctest
{
var $owner;

function ctest(&$owner)
{
$this->owner = $owner;
}

function foo()
{
echo "test!";
}
}

hope it works :)
regards,

James

Andrew Kirilenko wrote:

> Hello!
>
> I have following problem:
>
>  $container = new ccontainer();
> $container->init();
> $container->test1->foo();
> $container->test2->foo();
> $container->test2->owner->test1->foo();
> $container->test1->owner->test2->foo();
>
> class ccontainer
> {
> function ccontainer()
> {
> }
>
> function init()
> {
> $this->test1 = new ctest(&$this);
> $this->test2 = new ctest(&$this);
> }
> }
>
> class ctest
> {
> function ctest(&$owner)
> {
> $this->owner = $owner;
> }
>
> function foo()
> {
> echo "test!";
> }
> }
> ?>
>
> Output of this script is:
> --->
> test!
> test!
> test!
> Fatal error: Call to a member function on a non-object in c:\www\a.php on
> line 8
> <---
>
> How to solve this problem???
>
> Best regards,
> Andrew Kirilenko,
> Senior Programmer / System Administrator,
> Internet Service.


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




[PHP] Manual building/snapshot

2001-07-14 Thread Chris Lott

Since nothing seems to be available at snaps.php.net/manual I grabbed the
phpdoc cvs tree. Could anyone who is building their own manual tell me what
I need to build it? I'm running RedHat Linux 7.1

c
--
Chris Lott

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




[PHP] Re: php w/ mysql support compiled in -- can't connect to mysql

2001-07-14 Thread u007

hi,

I would suggest u do not put path to mysql with php configure...simply,
--with-mysql will do..

hope iit works,

thank you

regards,
James

Kurt Lieber wrote:

> OK, there's been another thread floating around about getting:
>
> Fatal error: Call to undefined function: mysql_pconnect()
>
> Turns out, I'm getting this same error message for both mysql_pconnect
> as well as plain mysql_connect.  I'm using the PHP debian package found
> in potato. (4.0.3pl1)  phpInfo() shows me the configure command which
> includes:
>
> '--with-mysql=shared,/usr'
>
> So, I'm assuming that I really have mysql support compiled in.  mysql
> lives in /usr/bin/mysql (and is also the debian potato package)
>
> I'm used to windows -- this is the first time I've tried to set up
> php/mysql on linux, so I'm hoping I'm just overlooking something
> obvious. Anyone have any ideas?
>
> Thanks.
>
> --kurt


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




[PHP] php w/ mysql support compiled in -- can't connect to mysql

2001-07-14 Thread Kurt Lieber

OK, there's been another thread floating around about getting: 

Fatal error: Call to undefined function: mysql_pconnect()

Turns out, I'm getting this same error message for both mysql_pconnect
as well as plain mysql_connect.  I'm using the PHP debian package found
in potato. (4.0.3pl1)  phpInfo() shows me the configure command which
includes:

'--with-mysql=shared,/usr' 

So, I'm assuming that I really have mysql support compiled in.  mysql
lives in /usr/bin/mysql (and is also the debian potato package)

I'm used to windows -- this is the first time I've tried to set up
php/mysql on linux, so I'm hoping I'm just overlooking something
obvious. Anyone have any ideas?

Thanks.

--kurt


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




Re: [PHP] IMAP support and Red Hat

2001-07-14 Thread Rasmus Lerdorf

You need to add --with-kerberos not --without-kerberos

On Sat, 14 Jul 2001, Fernando Lozano wrote:

> Hi there!
>
>
> I am trying to compile php 4.0.6 on Red Hat Linux 6.2 with IMAP support.
> I have installed the package imap-devel*rpm and can easily compile PHP
> as an apache module. But, when I compile using configure --with-imap,
> after I install the new php module and restart apache, it complains
> about gss_krb5_* symbols not found. I have already tried add
> --without-kerberos to configure, but got the same result.
>
> Any hints? Thans in advance.
>
>
> []s, Fernando Lozano
>
>
>


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




Re: [PHP] Web application?

2001-07-14 Thread Chris Lambert - WhiteCrown Networks

And the article was written by Joshua Drake, not Zeev. It seems to have been
published early January, judging by some Google research. Not sure why it
isn't in Zend's article DB anymore...

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Rasmus Lerdorf <[EMAIL PROTECTED]>
To: Martín Marqués <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, July 14, 2001 11:24 AM
Subject: Re: [PHP] Web application?


| > On Sáb 14 Jul 2001 12:09, Rasmus Lerdorf wrote:
| > > > Thats not the worst thing I find in it. MySQL has referential
integrity?
| > > > How about locking for update of rows? You have to lock the whole
table!
| > >
| > > Actually both the innodb and gemini backends for MySQL have row-level
| > > locking.
| >
| > That must be really new, cause the biggest blame I find over MySQL is
the
| > table locking feature (Zeev Suraski articule also talks about it).
|
| Has been there for months.  Since version 3.23.30
|
| -Rasmus
|
|
| --
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
| To contact the list administrators, e-mail: [EMAIL PROTECTED]
|
|
|



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




[PHP] IMAP support and Red Hat

2001-07-14 Thread Fernando Lozano

Hi there!


I am trying to compile php 4.0.6 on Red Hat Linux 6.2 with IMAP support.
I have installed the package imap-devel*rpm and can easily compile PHP
as an apache module. But, when I compile using configure --with-imap,
after I install the new php module and restart apache, it complains
about gss_krb5_* symbols not found. I have already tried add
--without-kerberos to configure, but got the same result.

Any hints? Thans in advance.


[]s, Fernando Lozano


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




[PHP] Fatal error: Call to undefined function: imagecreate() in /home/....on line 37

2001-07-14 Thread Augusto Cesar Castoldi

How can I "activate" the function imagecreate? I'm using PHP 4 in windows
and Linux.

Fatal error:  Call to undefined function:  imagecreate() in
E:/Augusto/HomePages/img/imagecreate.php on line 37


thanks,

Augusto


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




Re: [PHP] how to hide dbconnect file if its in published directo

2001-07-14 Thread Rasmus Lerdorf

> It's late, I've had a couple of beers, and in the morning I'll spend some
> effort trying to imagine such issues. In the mean-time I'd welcome any
> real-life examples.

::start.php::


::header.php::


When header.php is included in the context of start.php then $auth is
perfectly initialized and there is no security problem.  However, if you
allow people to execute header.php by itself, they could do:

  http://www.your_domain.com/header.php?auth=/etc/passwd

And you could have a problem on your hands.

> To my mind, you've two basic contexts: common functions & static data.
> It's pointless in naming one .php and the other .inc; it means nothing to
> the program (whereas in C if you switch around the *.c & *.h; yea verily,
> your Makefile will care).

To me it isn't pointless at all as it identifies files that are meant to
be accessed directly versus ones that aren't.

-Rasmus


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




[PHP] OOP Problems

2001-07-14 Thread Andrew Kirilenko

Hello!

I have following problem:

init();
$container->test1->foo();
$container->test2->foo();
$container->test2->owner->test1->foo();
$container->test1->owner->test2->foo();

class ccontainer
{
function ccontainer()
{
}

function init()
{
$this->test1 = new ctest(&$this);
$this->test2 = new ctest(&$this);
}
}

class ctest
{
function ctest(&$owner)
{
$this->owner = $owner;
}

function foo()
{
echo "test!";
}
}
?>

Output of this script is:
--->
test!
test!
test!
Fatal error: Call to a member function on a non-object in c:\www\a.php on
line 8
<---

How to solve this problem???

Best regards,
Andrew Kirilenko,
Senior Programmer / System Administrator,
Internet Service.


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




[PHP] HTTP-Authentication

2001-07-14 Thread Peter Neumayr

Hei!

I have a script, where people can log-in to administrate a site,
but once they are logged in, what do i have to do to log them out again?
I thought to write a logout-script which deletes the $HTTP_AUTH_USER
variable, but it doesn't work.
It seems that the user-data remains in memory until the browser is restarted.

Please Help!

Peter


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




Re: [PHP] Using an image as a reset button on a PHP script

2001-07-14 Thread Data Driven Design

You have to use javascript




Data Driven Design
P.O. Box 1084
Holly Hill, Florida 32125-1084

http://www.datadrivendesign.com
http://www.rossidesigns.net
- Original Message - 
From: Brandon Orther <[EMAIL PROTECTED]>
To: PHP User Group <[EMAIL PROTECTED]>
Sent: Friday, July 13, 2001 5:46 PM
Subject: [PHP] Using an image as a reset button on a PHP script


> Hello,
>  
> I am making a script at the moment and want to use images instead of the
> usual buttons.  Does anyone know how I can use the image as a reset
> button?
> Thank you,
> 
> 
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
>   
>  
> 


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




Re: [PHP] how to hide dbconnect file if its in published directory?

2001-07-14 Thread hassan el forkani

well...
  i don't think there should be any problem if the included file is a class 
(right???)
come to think about it,
  is it possible to create an object by passing a url like 
this:   file.inc?file=new mysql&file->conn() i mean would this run the class??


regards

At 05:00 14/07/01, Rasmus Lerdorf wrote:
> > there should not be any problem if your web server is configured to parse
> > .inc extentions as PHP, in wich case, even if the file is called
> > separately, the server will strip php tags and send normal html output.
>
>Once again, don't do this.
>
>If you write your .inc files assuming they are going to be running in the
>context of a larger framework where they are included into you are likely
>to miss things that could be a security problem if they are run by
>themselves via something like: file.inc?file=/etc/passswd
>
>You are better off letting people see the source code to your .inc file as
>opposed to letting people execute them out of context.
>
>Obviously the most secure way is to simply put all your include files
>outside of your document_root so they can't be accessed directly.
>
>Or, alternatively add a simple rule to your httpd.conf:
>
>   
>   Order allow,deny
>   Deny from all
>   
>
>-Rasmus



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




[PHP] Integration/syncronization issues

2001-07-14 Thread Adrian Teasdale

Hi all

Traditionally we've been an "internet only" development company, developing
sites without a need for integration with internal systems.  Occassionally
we have done this, for example a daily 500 record CSV upload for one client.
However, this potential job we've been asked to quote for is much more
in-depth with regard to integrations and potential problems.  This is what
I've been asked to do:

1.  Develop a site which has a userbase of 4000 users, each of which has
between 1 and 200 invoices
2.  Enable this so that the users can come and change their account
information, view their current status, or pay one (or more) of the above
invoices
3.  Provide a link with the internal accounting system so that transactions
conducted on the web are added to their system at the end of the day.
4.  Provide syncronization with the web database so that any off-line
transactions are included in the online...

There are roughly 12,000 invoices between these 4000 users.

I have been told not to use CSV (by some other programmers) as it is too
"flaky" (their words, not mine!) and I'm at a loss as to how to proceed.
Currently we are using PHP and mysql and the clients internal system is
using something called JD Edwards (I've been to the JD Edwards site and
can't find a demo).

Does anyone have any experience of this kind of syncronization, the
potential problems and possible solutions?  Some pointing in the right
direction would help :)

All the best

Ade


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




Re: [PHP] Web application?

2001-07-14 Thread Yves Gauvreau

Sorry for the delay.

The project I'm working on is private by nature in the sence that only 
my clients will have access to the application. I don't expect to have 
more then a few dozen but each of them may have up to say 50 users. Say 
I have 50 clients each with 50 users. This means that I could have as 
much as 2500 concurrent users with an extremely low probability I'll 
admit to that. The same goes for only 1 users at a time but I think this 
situation is much more likely then all users at the same time. I don't 
know the exact distribution but I suspect it's somekind of gamma 
distribution with the peak (or mode) in the relatively low numbers. Also 
the approach I'm taking will favor working with a low number of records 
at a time, of course this can go as high as 1 records in some case 
but here again the mode of the distribution should be in the low 
numbers. Lastly I think that about 50% of the request to the web server 
will require database access.


In summary, when I'll be in full production I'm positive that I'll have 
some number of concurrent users, how many exactly I don't know but I 
would estimate it to be somewhere in the relatively low number range 
maybe 2-5 with peaks up to 20. I estimate that the server will be 
working about 4 hours a day most of it in the day shift (6am ~ 6pm), the 
rest of the time it will be waiting for request or at some internal stuff.


Regards.

Yves Gauvreau





Chris Lambert - Whitecrown Networks wrote:

> It all depends on your application, the use it receives, your server
> hardware (mainly RAM), and your MySQL/PHP configurations.
> 
> For 90% of web applications, and 90% of the loads they receive, any
> confiuguration of MySQL would be fine. But describe your scenario and we
> should be able to let you know if all will be OK.
> 
> /* Chris Lambert, CTO - [EMAIL PROTECTED]
> WhiteCrown Networks - More Than White Hats
> Web Application Security - www.whitecrown.net
> */
> 
> - Original Message -
> From: Yves Gauvreau <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; Rasmus Lerdorf <[EMAIL PROTECTED]>
> Sent: Friday, July 13, 2001 5:48 PM
> Subject: Re: [PHP] Web application?
> 
> 
> | Is that to say that mySQL is not a good choice in this situation?
> |
> | If you would be so kind. Why would mySQL be the bottleneck and why PHP
> | would not?
> |
> | Regards.
> |
> | Yves
> |
> |
> | Rasmus Lerdorf wrote:
> |
> | > Should be fine.  Chances are your bottleneck will be your database, not
> | > PHP.
> | >
> | > -Rasmus
> | >
> | > On Fri, 13 Jul 2001, Yves Gauvreau wrote:
> | >
> | >
> | >>Hi,
> | >>
> | >>The question is this: Say I have a large main script that handles most
> | >>of the request if not all, I wonder what are the effect of this approach
> | >>on performance in a situation where we have a fair number of concurrent
> | >>users?
> | >>
> | >>Situation:
> | >>
> | >>Server:
> | >>P4 1300, Linux (RH 7.1), Apache, MOD_PHP, mySQL.
> | >>
> | >>Thanks
> | >>
> | >>Yves Gauvreau
> | >>
> | >>
> | >>
> | >>
> | >
> |
> |
> |
> | --
> | PHP General Mailing List (http://www.php.net/)
> | To unsubscribe, e-mail: [EMAIL PROTECTED]
> | For additional commands, e-mail: [EMAIL PROTECTED]
> | To contact the list administrators, e-mail: [EMAIL PROTECTED]
> |
> |
> |
> 
> 



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




Re: [PHP] Web application?

2001-07-14 Thread Yves Gauvreau

Thank you.

I came to the same conclusion on mySQL after only reading about it's 
comparative benchmarks and that's why I choose it.

By their own admission mySQL developers have concentrated their effort 
on speed but I wondered about real life situations. I wondered if those 
benchmarks where doctored to make mySQL appear convincingly faster. I 
think I have my answer now.

Regards

Yves

Christopher Ostmo wrote:

> Matthew Loff pressed the little lettered thingies in this order...
> 
> 
>>I realize this is off-topic a bit... I also use MySQL for all
>>database-related projects...
>>
>>Does anyone have any comments on benchmarks of the new beta of
>>PostgreSQL vs. MySQL?   Postgres appears staggeringly faster in the
>>benchmarks I've seen, but I don't hear much about it, so I'm naturally
>>skeptical. 
>>
>>
> 
> I can't comment on the beta Postgres, but I'm using 7.1.2 (the latest 
> stable release) for light in-house use and it is MUCH slower than 
> MySQL in almost every category.
> 
> I use Postgres for a few functions that gather a lot of data and I don't 
> want that data slowing down my MySQL server.  As an example of just 
> one of the speed differences, I had the data saving to both the 
> PostgreSQL server and the MySQL server (same physical machine) for 
> a short time.  I had collected about 10,000 records in one table.  
> Deleting those records (DELETE * FROM table) in MySQL took less 
> than a second (MySQL destroys the table and recreates when you use 
> this command).  The Postgress server took more than 10 minutes.  As 
> a test, I recreated the data and deleted it in MySQL using "DELETE 
> FROM TABLE WHERE idfield LIKE '%%' (this causes MySQL to delete 
> records one at a time).  It took about 7 seconds.
> 
> Every time I've done a comparison between the two on operations 
> involving large amounts of data, MySQL has come out ahead AT LEAST 
> five-fold. In many cases, it has come out much better than that.
> 
> I'm admittedly not a big hardware performance expert, but I'm pretty 
> good with SQL and SQL optimization.
> 
> I also use PostgreSQL for the things that it does that MySQL does not 
> (commit/rollback mostly), but as of the 3.23.39, MySQL supports 
> transactions and it will support sub selects in the near future.  Those 
> are the two missing features for which MySQL has taken nearly all of its 
> criticism.  I don't think that I've heard anyone argue about it's raw speed 
> (when used properly of course).
> 
> Please don't take this as an anit-PostgreSQL message! I really like the 
> database server and I continue to use it.  The fact of the matter is that in 
> a side-by-side comparison for nearly anything you could conceive of 
> doing with data storage/retrieval on the web, MySQL is going to have a 
> decided speed advantage.
> 
> This may change with the new release of Postgres.
> 
> Christopher Ostmo
> a.k.a. [EMAIL PROTECTED]
> AppIdeas.com
> Innovative Application Ideas
> Meeting cutting edge dynamic
> web site needs since the 
> dawn of Internet time (1995)
> 
> For a good time,
> http://www.AppIdeas.com/
> 



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




[PHP] REGEXP

2001-07-14 Thread Adrian D'Costa

Hi,

I am trying to capture the Header from a mail for my webmail using php and
pop3.  The header is something like this:
Content-Type: multipart/mixed;
 boundary="B42DA66C4EC07C9B572A58FC"

When I use preg_split("/[\d;]*/", $buffer), I get
Content-Type: multipart/mixed;

What I want is to return the whole line split by the ";".  I usually try
to avoid regexp (too lazy) but now I want to use it.  The final result I
would need is: B42DA66C4EC07C9B572A58FC so that I can search
in the body of the message for the rest of the parts.

Any pointers would be helpful.

Adrian


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




Re: [PHP] how to hide dbconnect file if its in published directo

2001-07-14 Thread Don Read


On 14-Jul-01 Rasmus Lerdorf wrote:

>> I wrote (attribution added)
>>
>> Enough already.
>>  Whom should we flog and keel-haul for starting this include(foo.inc) crap
>>  ?!?
> 
> There is nothing wrong with naming include files with a separate
> extension.  

In the context of C files: *.c *.h . Then i'll go along with that. but most C
programs are not out for perusal by the world via HTTP.

>In fact it is more secure as long as you block access to files
> with that extension.  

Not everybody has root on their server, and few hosting providers care or have
enough clues to do this as the default. And even if they cared, Ghod knows they
couldn't find any clues in the PHP documentation:

localhost.dread$ pwd
/usr/local/share/doc/apache/phpmanual
localhost.dread$ grep -i Deny * | wc -l
   0

>  Naming your include files with the .php extension
> opens you up to possible out-of-context parsing security issues.
> 

It's late, I've had a couple of beers, and in the morning I'll spend some
effort trying to imagine such issues. In the mean-time I'd welcome any
real-life examples.

To my mind, you've two basic contexts: common functions & static data.
It's pointless in naming one .php and the other .inc; it means nothing to
the program (whereas in C if you switch around the *.c & *.h; yea verily, 
your Makefile will care).



Consider another slant;  tomorrow i'll start posting code:

 -Rasmus
> 

With all my respect, Rasmus. I disagree.

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

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




[PHP] Australian Developers -- Contract/Partnership Oppourtunity

2001-07-14 Thread Justin French

Hi all,

I'm currently putting in a tender together for a large web project,
using PHP and MySQL, but I believe my skills may not quite be upto
scratch (or at least my development speed / quality of code), so I'm
considering finding a partner for the project.

They have a realistic budget, realistic development time-frame, and
there are enough "components" to the project to serve as an excellent
"trophy" to show off our/your capabilities.


I'm only interested in Melbourne (Australia) based PHP/MySQL developers,
capable of writing efficient, clean code for applications such as:

o  detailed content management
o  intricate membership management
o  e-commerce (URL session based, not client side/cookies)
o  statistics / tracking gathering and analisys


The developer must be able to show thier ability with real world
examples, and the ability to write portable / reuseable code rather than
one-off applications is a must.

Understanding of the balance between browsers / design / information /
code would be an added bonus.


Essentially I'm looking for a freelancer / contractor available to work
weekdays (even from home a lot of the time), and whilst this is a
one-off project, I'm keen to find a long term business partner to persue
similar projects full time.


Terms / hours will be decent and negotiable for the right person.

PLEASE no time wasters.  Send BRIEF resume / details to [EMAIL PROTECTED]


Justin French
Creative Director
Indent.com.au
[EMAIL PROTECTED]

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




[PHP] complex objects and sessions

2001-07-14 Thread David Brumley


Hi,
Was the complex object issue ever fixed in PHP 4?

I'm running 4.0.6 with imap, and have built a class IMAPSession
defined in lib/sessionobject.inc.php.  Here is a script:
SwitchContext($state, $msg);
?>

My understanding is that the "csession" object should be stored. But
on the second invocation I get:

Fatal error: The script tried to execute a method or access a property
of an incomplete object. Please ensure that the class definition
imapsession of the
object you are trying to operate on was loaded _before_ the session
was started in /d0/www/htdocs/webmail/index.php on line 20


any hints would be appreciated.

-djb

-- 
#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#
David Brumley - Stanford Computer Security -   dbrumley at Stanford.EDU
Phone: +1-650-723-2445   WWW: http://www.stanford.edu/~dbrumley
Fax:   +1-650-725-9121  PGP: finger dbrumley-pgp at sunset.Stanford.EDU
#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#
Life is a whim of several billion cells to be you for a while.

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