[PHP] does //commenting reduce performance?

2002-11-24 Thread Adam
I have always had the opinion that the more comments you put into php
scripts, the slower they will run because there is more data to be read...
Can someone tell me if there is any truth in this or whether commenting has
absolutely 'no' impact on the performance of a script?

Thanks,
Adam.



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




[PHP] test

2003-08-15 Thread adam
tst

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


[PHP] call function as variable

2003-08-15 Thread adam
Hi!

I have folowing function which they are a member in a class.

function foo(){
something
}
function zoo(){
something else
}
and i have a array such:

$test = array(1=>foo,2=zoo);

and i want to call the fuction foo() and zoo something like;

$object->$test[1]();

I have tried this this, it will not working. But is there any other way 
to do something like this!!

cheers

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


[PHP] Re: How do I call a function in a Class from another function inthe same class

2003-08-16 Thread adam
 typically problem!
have you used $this->tehotherfunction();
or just use therotherfunction();???
if you call from your class to a members method , you have use $this!!!
And read more about oo-method!
cheers

Donpro wrote:
Hi,
 
I have two functions in a class where one calls the other.  When creating my
object I get an error:
 
"Call to undefined function"
 
I dont understand why the function can't be seen?
 
 
Thanks,
Don

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.507 / Virus Database: 304 - Release Date: 8/4/2003
 



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


Re: [PHP] call function as variable

2003-08-16 Thread adam
I got this error:

Parse error: parse error, unexpected '{' in ...

Cheers

John W. Holmes wrote:

adam wrote:

Hi!

I have folowing function which they are a member in a class.

function foo(){
something
}
function zoo(){
something else
}
and i have a array such:

$test = array(1=>foo,2=zoo);

and i want to call the fuction foo() and zoo something like;

$object->$test[1]();


Try:

{$object->$test[1]}();



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


Re: [PHP] call function as variable

2003-08-16 Thread adam
Tanks a lot!
this is exactly that i want!!
Cheers

Michael Sims wrote:

On Sat, 16 Aug 2003 07:58:27 +0200, you wrote:


$test = array(1=>foo,2=zoo);

and i want to call the fuction foo() and zoo something like;

$object->$test[1]();


I've never used this myself, but this should work:

call_user_func(&$object, $test[1]);

See:

http://www.php.net/manual/en/function.call-user-func.php

HTH


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


Re: [PHP] call function as variable

2003-08-16 Thread adam
Tanks a lot!
This was exactly that i wanted!
Cheers

David Otton wrote:

On Sat, 16 Aug 2003 07:58:27 +0200, you wrote:


I have folowing function which they are a member in a class.

function foo(){
something
}
function zoo(){
something else
}
and i have a array such:

$test = array(1=>foo,2=zoo);

and i want to call the fuction foo() and zoo something like;

$object->$test[1]();


The fact that you say "$object->$test" suggests that foo() and zoo() are
methods of a class? The following code snippet contains just about every
mechanism for calling a method of a class that there is. The one you'll
probably want is
	call_user_func (array ($C, 'B'), 'call 4');



/* Class A has method B */
class A {
function B ($s = "None") {
echo ("input : $s");
}
}
/* $C is an instance of A */
$C = new A ();
/* $D is an array of strings */
$D = array ('item 1', 'item 2', 'item 3', 'item 4');
/* invoke A::B */
A::B ('call 1');
/* invoke $C->B */
$C->B ('call 2');
/* invoke A::B via call_user_func() */
call_user_func (array ('A', 'B'), 'call 3');
/* invoke $C->B via call_user_func() */
call_user_func (array ($C, 'B'), 'call 4');
/* invoke A::B via call_user_func_array() */
call_user_func_array (array ('A', 'B'), array('call 5'));
/* invoke $C->B via call_user_func_array() */
call_user_func_array (array ($C, 'B'), array('call 6'));
/* apply A::B to $D via array_walk() */
array_walk ($D, array ('A', 'B'));
/* apply $C->B to $D via array_walk() */
array_walk ($D, array ($C, 'B'));
?>



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


[PHP] Sessions

2003-03-21 Thread Adam -
Hi,

Just a thought about sessions, they still rely on cookies working, unless 
you pass the session id with every link on the page. If you set your 
php.ini file to automatically put the session id in ever link on your page, 
that's great, but what if you don't have access to the php.ini file which 
is common with shared hosting. I'v read somewhere that you can put a 
php.ini file with those settings in the current working directory and it 
will read in the settings from it. Is that true and would you have to put a 
copy of the ini file in every folder that you used in order for it to work??

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


Re: [PHP] Sessions

2003-03-21 Thread Adam -
Hi,

   So with the .htaccess you could enable trans sid. That's interesting to 
know. I guess you could just use the session and have a session check to 
require the person to have cookies. Most sites these days seem to require 
it.. mail.yahoo.com does, if you try and login without cookies you'll get a 
message. A lot of sites use the trans sid, because it makes it "work" if 
the user doesn't have cookies.

Thanks for the info
 Adam
At 03:00 PM 3/22/2003 +1100, Justin French wrote:
on 22/03/03 4:39 AM, Adam - ([EMAIL PROTECTED]) wrote:

> Just a thought about sessions, they still rely on cookies working, unless
> you pass the session id with every link on the page. If you set your
> php.ini file to automatically put the session id in ever link on your page,
> that's great, but what if you don't have access to the php.ini file which
> is common with shared hosting. I'v read somewhere that you can put a
> php.ini file with those settings in the current working directory and it
> will read in the settings from it. Is that true and would you have to put a
> copy of the ini file in every folder that you used in order for it to 
work??

That's sort-of right.

1. PHP would need to be compiled with enable trans sid first

2. You can override SOME php.ini values with a .htaccess file (placed in a
directory), but this is NOT a copy of the php.ini, it's a method of
overriding values.  You'd also need your ISP to grant you permission to run
such files.  They work from a certain directory down, so if you placed the
file in your doc root, it would apply recursivly down to each folder bewlow
it.
example:


php_flag register_globals off
php_flag magic_quotes_runtime on
php_flag magic_quotes_gpc on

3. You can also override some php.ini values by using things like PHP's
ini_set() function in your scripts.
Justin

--
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] Session's length.

2003-03-22 Thread Adam -
Hi,

As I belive, the sessions (session cookies) will expire after the 
browser has been restarted. So even if you put the session id in a cookie, 
after ten days you might have your old session id, but it would be delete 
from the server long ago. The server doesn't keep session for that log 
periods of time due to the fact it would take up a lot of hard disk... 
Session data, is stored on the server, cookies on the browser..

If you wish to use the cookies and keep them for 10 days on the user's 
computer you would just want to user normal cookies..

You would want to put this at the top of your page - before any output has 
been sent...

setcookie("nameofcookie", "value of cookie", time()+600, "/");
?>

the time()+600 is in seconds 600 = ten mins, so if you wanted in to expire 
in ten days do the math.. :)
as for the "/" means that it will be sent to all your files..

hope this helps in some way... I'm no expert...
Adam
At 07:10 PM 3/22/2003 +0300, you wrote:
-> php-general.

  I used such code:

$exp = 60*60*24*10; # for ten days.
session_set_cookie_params($exp);
  But it works wrong - cookies were removed right after i have rebooted.
  The other way is to put session id into the cookies, but...
  Isn't it the same?
  Thank you.

Yours, L0vCh1Y [EMAIL PROTECTED]

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


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


[PHP] Date Diff

2003-03-22 Thread Adam -
Greetings all,

 A while ago I was using asp and when I started using php the harder 
thing to learn was "Dealing with dates". There isn't a datediff function 
like asp.. Instead you have timestamps. Powerful it may be but a little 
hard to learn about and use. Other wise I find php to be very nice and 
simple as well powerful.

So what happens if you have two timestamps and you want to find out what 
the difference is?

There has to be some function that I don't know about.. I have to be 
missing somethig!

Adam

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


[PHP] String Expression for aplpahnumeric password

2002-11-01 Thread Adam
I need a string expression to verify an alpha numeric password. This is what
i've come up with , however it does not work:

elseif ( (!ereg ("^[a-zA-Z]+$", $password)) || (!ereg ("^[0-9]+$",
$password)))

can anybody help? Thanks in advance
ADAM



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




Re: [PHP] Problem with 4.2.3?

2002-11-02 Thread Adam
output buffering = off

This is already set to "off"

Any other suggestions?

-Adam

"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:200211021451.44280.php-general@;gremlins.com.hk...
> On Saturday 02 November 2002 06:16, Adam Humphrey wrote:
> > I just upgraded my PHP from 4.2.2 to 4.2.3 and now I have a problem.
Right
> > now I have some HTML with included PHP.  When the client opens a page
with
> > PHP and HTML it used to (under 4.2.2) display all the HTML before the
PHP
> > and then process the PHP and finally (when processing completed) finish
the
> > rest of the HTML.
> >
> > This allowed my to do some DHTML to let the user know that the PHP was
> > processing.  Now with the new version of PHP (4.2.3) when I hit these
pages
> > it will process the PHP before it sends any HTML to the client.
> >
> > This is really frustrating.  Is there some setting in php.ini that I can
> > modify to allow the browser to get the HTML before the PHP code?  Or any
> > other way to get the old behavior?
>
> Try disabling output buffering (php.ini).
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> You can fool some of the people some of the time,
> and some of the people all of the time,
> and that is sufficient.
> */
>



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




[PHP] #color problems

2002-11-15 Thread Adam
Below is a snip of my script. Can't get it to use $test as a color
variable!!
Can anyone help?? I have tried everything i can think of (bar just using a
color value instead of variable).

The context is :: for formatting an XML doc.

$test='#FF';

echo "";

Any help much appreciated,
Adam.


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




Fw: [PHP] #color problems

2002-11-15 Thread Adam

Re: below, i put in

global $test;


> Thanks for the advice... I am new to PHP, but have done a lot of C in the
> past so some things are familiar.
>
> Anyway, I tried your suggestion but no joy... color does not show, as if i
> had written bgcolor="".
>
> Any ideas???
>
> Cheers,
> Adam.
>
> - Original Message -
> From: "Marco Tabini" <[EMAIL PROTECTED]>
> To: "Adam" <[EMAIL PROTECTED]>
> Sent: Friday, November 15, 2002 2:47 PM
> Subject: Re: [PHP] #color problems
>
>
> > Since you're not substituting anything in your string, you can use
> > single quotes and make it a bit more readable:
> >
> > $test='#FF';
> >
> > echo '';
> >
> >
> > is $test defined in the same context as your echo statement (e.g. is the
> > echo in a function and $test outside of it)? In that case, you need to
> > add $test to your function's context by means of global $test;
> >
> > Marco
> > --
> > ----
> > php|architect - The magazine for PHP Professionals
> > The monthly worldwide magazine dedicated to PHP programmers
> >
> > Come visit us at http://www.phparch.com!
> >
> >
> > On Fri, 2002-11-15 at 10:13, Adam wrote:
> > > Below is a snip of my script. Can't get it to use $test as a color
> > > variable!!
> > > Can anyone help?? I have tried everything i can think of (bar just
using
> a
> > > color value instead of variable).
> > >
> > > The context is :: for formatting an XML doc.
> > >
> > > $test='#FF';
> > >
> > > echo "";
> > >
> > > Any help much appreciated,
> > > Adam.
> > >
> > >
> > > --
> > > 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: Fw: [PHP] #color problems

2002-11-15 Thread Adam
OK, color code is not present in HTML output. Very strange!
"echo $test;" produces hte correct output though.

Adam.

- Original Message -
From: "Marco Tabini" <[EMAIL PROTECTED]>
To: "Adam" <[EMAIL PROTECTED]>
Cc: ""PHP"" <[EMAIL PROTECTED]>
Sent: Friday, November 15, 2002 3:14 PM
Subject: Re: Fw: [PHP] #color problems


> Does your color code show in the HTML source code? If so, then it's an
> HTML problem!
>
> Marco
>
>
> On Fri, 2002-11-15 at 10:46, Adam wrote:
> >
> > Re: below, i put in
> >
> > global $test;
> >
> >
> > > Thanks for the advice... I am new to PHP, but have done a lot of C in
the
> > > past so some things are familiar.
> > >
> > > Anyway, I tried your suggestion but no joy... color does not show, as
if i
> > > had written bgcolor="".
> > >
> > > Any ideas???
> > >
> > > Cheers,
> > > Adam.
> > >
> > > - Original Message -
> > > From: "Marco Tabini" <[EMAIL PROTECTED]>
> > > To: "Adam" <[EMAIL PROTECTED]>
> > > Sent: Friday, November 15, 2002 2:47 PM
> > > Subject: Re: [PHP] #color problems
> > >
> > >
> > > > Since you're not substituting anything in your string, you can use
> > > > single quotes and make it a bit more readable:
> > > >
> > > > $test='#FF';
> > > >
> > > > echo '';
> > > >
> > > >
> > > > is $test defined in the same context as your echo statement (e.g. is
the
> > > > echo in a function and $test outside of it)? In that case, you need
to
> > > > add $test to your function's context by means of global $test;
> > > >
> > > > Marco
> > > > --
> > > > 
> > > > php|architect - The magazine for PHP Professionals
> > > > The monthly worldwide magazine dedicated to PHP programmers
> > > >
> > > > Come visit us at http://www.phparch.com!
> > > >
> > > >
> > > > On Fri, 2002-11-15 at 10:13, Adam wrote:
> > > > > Below is a snip of my script. Can't get it to use $test as a color
> > > > > variable!!
> > > > > Can anyone help?? I have tried everything i can think of (bar just
> > using
> > > a
> > > > > color value instead of variable).
> > > > >
> > > > > The context is :: for formatting an XML doc.
> > > > >
> > > > > $test='#FF';
> > > > >
> > > > > echo "";
> > > > >
> > > > > Any help much appreciated,
> > > > > Adam.
> > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > >
> > > >
> > > >
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>


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




[PHP] sunrise/sunset programs?

2002-11-17 Thread Adam
Does anyone know if PHP has the capabilities of being able to calculate
sunrise/sunset times by entering longitude/latitude values if someone was
smart enough to write code for it? If not, is there any
programs/applications around that allow for times to be entered into php
after values have been worked out by the program/app?

Thanks for any help.
Adam.



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




Re: [PHP] sunrise/sunset programs?

2002-11-18 Thread Adam
yes, have tried googling around... i came across one but the link no longer
works:

http://www.hotscripts.com/Detailed/4984.html

if anyone knows of any, could they post the links here?

thanks,
adam.

- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 19, 2002 1:11 AM
Subject: Re: [PHP] sunrise/sunset programs?


> On Monday 18 November 2002 15:45, Adam wrote:
> > Does anyone know if PHP has the capabilities of being able to calculate
> > sunrise/sunset times by entering longitude/latitude values if someone
was
> > smart enough to write code for it?
>
> I should think so.
>
> > If not, is there any
> > programs/applications around that allow for times to be entered into php
> > after values have been worked out by the program/app?
>
> Have you tried googling around?
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> The Lord prefers common-looking people.  That is the reason that He makes
> so many of them.
> -- Abraham Lincoln
> */
>

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




[PHP] templates

2002-11-19 Thread Adam
I am developing a site, using XML and PHP for formatting. I want to have one HTML 
template and call up the different XML files from a Javascript menu. 
Ideally i want to be able to call files from a link, such as:
'index.php?action=load&file="file.xml"'

Not sure if this is the right format, but hopefully you get the idea.

Cheers,
Adam.



Re: [PHP] templates

2002-11-19 Thread Adam
Cheers for replying.

I have the menu in place already, it is the PHP end i'm not sure about.
Currently I have many php files which only differ in one line:
$filename="file.xml";

I want to be able to pass this value to the script through a link.

A.

- Original Message -
From: "Jonathan Sharp" <[EMAIL PROTECTED]>
To: "Adam" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, November 19, 2002 4:33 PM
Subject: Re: [PHP] templates


> I'm assuming you're trying to have a select list.
>
> Try this:
>
>  onChange="window.location='?action=load&file=' +
this.value">
> File XML1
> File foo
> 
>
> Just make sure you test the value you get for file, so that someone
> doesn't pass you /etc/passwd (just an example).
>
> -js
>
>
> Adam wrote:
> > I am developing a site, using XML and PHP for formatting. I want to have
one HTML template and call up the different XML files from a Javascript
menu.
> > Ideally i want to be able to call files from a link, such as:
> > 'index.php?action=load&file="file.xml"'
> >
> > Not sure if this is the right format, but hopefully you get the idea.
> >
> > Cheers,
> > Adam.
> >
>
>
>


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




Re: [PHP] templates

2002-11-19 Thread Adam
Thanks, but not sure if this is what i'm looking for

I just want to setup the PHP script so that the variable $filename can be changed via 
a link such as 'index.php?filename="file.xml"',
causing the script to parse the appropriate file.

Adam.
  - Original Message - 
  From: Ernest E Vogelsinger 
  To: Adam 
  Cc: Jonathan Sharp ; [EMAIL PROTECTED] 
  Sent: Tuesday, November 19, 2002 5:17 PM
  Subject: Re: [PHP] templates


  At 18:04 19.11.2002, Adam spoke out and said:
  [snip]
  >Cheers for replying.
  >
  >I have the menu in place already, it is the PHP end i'm not sure about.
  >Currently I have many php files which only differ in one line:
  >$filename="file.xml";
  >
  >I want to be able to pass this value to the script through a link.
  [snip] 

  How about
  $files = array('file1.xml' => 'Go to file 1',
 'file2.xml' => 'Go to file 2',
 'file3.xml' => 'Go to file 3',
 'file4.xml' => 'Go to file 4');
  foreach ($files as $filename => $text) {
  // you should put your actual menu code here
  echo '', htmlentities($text), '';
  }


  -- 
 >O Ernest E. Vogelsinger 
 (\) ICQ #13394035 
  ^ http://www.vogelsinger.at/





[PHP] grabbing data from a site

2002-11-22 Thread Adam
I have the following website that i want to grab info from:

http://www.bom.gov.au/products/IDV60034.shtml

Say I wanted the current temperature for Melbourne from this table, what
line of code would I need to tell it to get that info - ie, an ereg()
expression...

i'm wondering whether there are ways of saying "i want the third column of a
particular row - in this instance, Melbourne"?

Thanks for any help.
Adam.




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




Re: [PHP] grabbing data from a site

2002-11-22 Thread Adam
someone gave me the following expression which uses another program and it
works fine for them... is there something similar with php?

wget --timeout=90 -q -O- http://www.BoM.GOV.AU/products/IDO30V01.shtml | sed
'1,/>Melbourne //;s/<.*//'

thanks,
adam.

"Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> If the target is in well-formed XML (XHTML is an example), you could use
XSLT
> to say 'i want the third column of a particular row - in this instance,
> Melbourne'. However, since few people actually adhere to standards, you're
> probably going to need a regex... if you're not comfortable with them,
> explode() could be useful (although it is slower)
>
> Somebody posted an extremely helpfull little quick reference at
php.net/ereg,
> i think... that might help you.
>
>
> On Friday 22 November 2002 01:40 pm, Adam wrote:
> > I have the following website that i want to grab info from:
> >
> > http://www.bom.gov.au/products/IDV60034.shtml
> >
> > Say I wanted the current temperature for Melbourne from this table, what
> > line of code would I need to tell it to get that info - ie, an ereg()
> > expression...
> >
> > i'm wondering whether there are ways of saying "i want the third column
of
> > a particular row - in this instance, Melbourne"?
> >
> > Thanks for any help.
> > Adam.
>
> - --
> I pledge allegiance to the flag, of the United States of America, and to
the
> republic for which it stands, one nation indivisible, with liberty, and
> justice for all.
>
> - -Pledge of Allegiance
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.7 (GNU/Linux)
>
> iD8DBQE93qVm/rncFku1MdIRAshSAJ9phj0DqR3seanlzKXhdnKj8cvI8QCfW7kM
> tfUfUEF4yVJSRnm0GCkIeaM=
> =AyI1
> -END PGP SIGNATURE-
>



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




Re: [PHP] PHP within Frames

2003-10-19 Thread Adam
This is really an browser interpretation of HTML issue than a straight 
PHP issue. A little more information would be helpful - such as 
browser, page content, etc.

Regards,
Adam
On Sunday, October 19, 2003, at 05:45 PM, KB wrote:

Hi,

Does anyone know why my PHP pages won't work in Frames?  I have 5 
frames,
each of which are displaying PHP pages.and none of the PHP code 
works.

If I run the code outside of Frames it works fine!

I've can't find any decent references for PHP in Frames.

Your help would be appreciated.

Thanks

Kevin

--
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] On OS X (10.2) where is php installed?

2003-11-07 Thread Adam
All,

Forgive me for the simplistic question, I'm not much of a Unix, Apache, 
or PHP wiz. I'm running Mac OS X 10.2 on a 12" PB. I've installed PHP 
4.3.0 from Marc Lynric's site (http://www.entropy.ch). However, I 
cannot actually find the installation files on my laptop.

My web server works. It serves PHP pages quite well, but I want to know 
where the binaries are located. I've tried using some sources I thought 
might tell me where the files are located, but they have not.

Can anyone shed some light?

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


[PHP] [Q] Development Best Practices

2003-11-17 Thread Adam
All,

I'm not new to programing or web development but I am new to creating 
dynamic pages.

I've read through a couple books. I've worked through problems and 
exercises. Installed and configured the software a few different times 
in Win32 and OS X. At this point, I feel I have a good handle on the 
environment and lexical structure. What I don't have is a grasp on best 
practices. For real sites I'm a little confused on how to implement all 
this new knowledge. For example, I've got a site that was static with 
bits of CGI to PHP. I was going to generate all the HTML from a PHP 
script, but that turned into a mess. So I tried creating the pages is 
mostly HTML with little bits of PHP. Placing the logic in another file 
and linking the two pages. I'm not really sure if that is the best 
approach.

My question, how do you guys build your pages? Do your scripts generate 
all the HTML? I'm looking for tips and resources. Remember for my first 
site I've embarked on a fairly large site. Code maintenance will be an 
issue for me as I need to enhance and fix it later on.

Thanks guys!

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


Re: [PHP] Netscape 4.77 and PHP

2001-04-15 Thread Adam

try sending us the sample code. I use netscape 4 for testing and it seems to
work just fine.



-- 
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] Newbie question: Page Counter

2001-04-19 Thread Adam

make a file called counter.php and include this text:

//-counter.php--
---//



//--
--//


then make a file called count.inc and chmod it to 777 so anyone can write to
it. insert a number into the file.


//--count.inc---
--//
some value
//--
--//


then all u have to do is include the line:

 into the page you want a counter


hope this helps :) i use this script myself

-Adam



-- 
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] passing variables

2001-04-22 Thread Adam

how could i pass a variable between pages without them seeing the variable
stated in the URL?



-- 
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] writing to file on server

2001-04-22 Thread Adam

chmod the file to 777, this will allow anyone write permission to the file
and thus you will be able to append to the file



-- 
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] Link Color Questions

2001-04-22 Thread Adam

#
yes, make a style sheet called "domain.css" and
put in this text:
#

a.domain1:link {  color: #FF; }
a.domain2:link {  color: #FF; }
a.domain3:link {  color: #FF8000; }

#
in the head tag, be sure to add the style's location:
#





#
then inset your html on teh page as follows:
#


www.domain1.com
www.domain2.com
www.domain3.com



hope this helps some :)

-Adam





-- 
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] redirection to another page function

2001-04-22 Thread Adam

use the javascript function, but also use as backup plan such as a link at
the bottom or even code at the top like this:
///

if (conditionals == true) {
header("location:home.html");
}

//

that way it will get through for most all browsers if not all browsers



-- 
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] doesnt work as expected

2001-05-23 Thread adam

an input tag of the type "image" cannot pass a name and value. therefore you
will have to use a script to detect if both the button and hidden are passed
or jsut the hidden. applying a hidden is helpful for this.


'.
 $done2 . '






 ';
?>




-- 
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] while statements output to variables

2001-05-23 Thread adam

i need to write a while statement to a variable that will later be echoed
again on another page after including this file to it. i need to repeat a
statement over and over in it and i do not know how.




' .

do {
'data to be outputted'
}while ($something = mysql_fetch_array($query));

.'

';

?>

any help?



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




[PHP] Help! (How are sessions intended to work?)

2002-01-29 Thread Adam

My Setup Specs
--

PHP 4.1.1, MySQL 3.23.36, & Apache 1.3.19 with mod_auth_mysql on OpenBSD 
3.0 (OS).

Issue
-

Scenerio: User provides user_id and password. user_id and password are 
checked against the database (MySQL). If authentication is true the a 
session is started based on thier user_id. If autehentication is false 
Error 403 is displayed to user.

How do you destroy a session/user authentication so the user can not use 
the browser back button? I have session_destroy() which seems to work 
fine (deletes session files in /tmp) but when you press the browser back 
button the exact session that was supposidly destroied is created again. 
I've tried using unset() to reset variables but that doesn't seem to 
work either. Any ideas... please epxplain this to me. I'm total lost why 
this isn't working. BTW, I'm using cookies. Another question I would 
have is.. to kill the cookie do I have to use set_cookie to remove the 
cookie from the users browser or is this also destroied in the 
session_destroy process? If it is suppose to be why is it not doing so?


-- 
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] Help! (How are sessions intended to work?)

2002-01-31 Thread Adam

Sukumar S. wrote:

> Dear Adam,
> 
> Are you using 'realm' authentication setup?


Yes I am.. any ideas?

>>My Setup Specs
>>--
>>
>>PHP 4.1.1, MySQL 3.23.36, & Apache 1.3.19 with mod_auth_mysql on OpenBSD 
>>3.0 (OS).
>>
>>Issue
>>-
>>
>>Scenerio: User provides user_id and password. user_id and password are 
>>checked against the database (MySQL). If authentication is true the a 
>>session is started based on thier user_id. If autehentication is false 
>>Error 403 is displayed to user.
>>
>>How do you destroy a session/user authentication so the user can not use 
>>the browser back button? I have session_destroy() which seems to work 
>>fine (deletes session files in /tmp) but when you press the browser back 
>>button the exact session that was supposidly destroied is created again. 
>>I've tried using unset() to reset variables but that doesn't seem to 
>>work either. Any ideas... please epxplain this to me. I'm total lost why 
>>this isn't working. BTW, I'm using cookies. Another question I would 
>>have is.. to kill the cookie do I have to use set_cookie to remove the 
>>cookie from the users browser or is this also destroied in the 
>>session_destroy process? If it is suppose to be why is it not doing so?




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




[PHP] please help with this simple problem

2001-03-22 Thread adam

i am coding a simple script to post a text area into a file. it works, but
it posts it at the bottom and i wanted to have it post to the top of the
text already there..

here's a snip of the important part of the script:

$fp = fopen (basename($PHP_SELF) . ".comment", "a");
 fwrite ($fp, $message);
 fclose ($fp);
 }

any help would be much appreciated



-- 
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] please help with this simple problem

2001-03-22 Thread adam

i tryed it and it ended up having an error that was caused originally by a
lack of a $ on the 3rd line variable... after i fixed that it said wrong
perameter count for fopen() on the third line, and "Warning: Supplied
argument is not a valid File-Handle resource" for the remaining lines below
that in that block of code.

i'm sorry, i'm kinda new to this : (

"Stewart Taylor" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You need to copy the contents of the current file.
> Then recreate the file by writing the new message then writing back the
> original contents.
>
> e.g.
> $fname = basename($PHP_SELF). ".comment";
> $fsize = filesize($fname);
> fp = fopen(basename($fname));
> $data = fread($fp,fsize);
> fwrite($fp,$message);
> fwrite($fp,$data);
> fclose($fp);
>
> -Stewart
>
> -Original Message-
> From: adam [mailto:[EMAIL PROTECTED]]
> Sent: 22 March 2001 11:17
> To: [EMAIL PROTECTED]
> Subject: [PHP] please help with this simple problem
>
>
> i am coding a simple script to post a text area into a file. it works, but
> it posts it at the bottom and i wanted to have it post to the top of the
> text already there..
>
> here's a snip of the important part of the script:
>
> $fp = fopen (basename($PHP_SELF) . ".comment", "a");
>  fwrite ($fp, $message);
>  fclose ($fp);
>  }
>
> any help would be much appreciated
>
>
>
> --
> 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] please help with this simple problem

2001-03-22 Thread adam

it works now, only it's earasing everything and then writing to the file.
i think we have almost got this figured out. here's what the code looks like
for the entire tag...
---

", $message);
 $date = date("l, F j Y, h:i a");
 $message = "mailto:$email>$name
 -- $date\n
 \n
  $message\n
 \n\n";

 $fname = basename($PHP_SELF) . ".comment";
 $fsize = filesize($fname);
 $fp = fopen(basename($fname),"w+");
 $data = fread($fp,$fsize);
 fwrite($fp,$message);
 fwrite($fp,$data);
 fclose($fp);

 }
@readfile(basename(($PHP_SELF . ".comment")));
?>






""adam"" <[EMAIL PROTECTED]> wrote in message
99cmfj$mai$[EMAIL PROTECTED]">news:99cmfj$mai$[EMAIL PROTECTED]...
> i am coding a simple script to post a text area into a file. it works, but
> it posts it at the bottom and i wanted to have it post to the top of the
> text already there..
>
> here's a snip of the important part of the script:
>
> $fp = fopen (basename($PHP_SELF) . ".comment", "a");
>  fwrite ($fp, $message);
>  fclose ($fp);
>  }
>
> any help would be much appreciated
>
>
>
> --
> 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] please help with this simple problem

2001-03-22 Thread adam

it works now, only it's earasing everything and then writing to the file.
i think we have almost got this figured out. here's what the code looks like
for the entire tag...
---

", $message);
 $date = date("l, F j Y, h:i a");
 $message = "mailto:$email>$name
 -- $date\n
 \n
  $message\n
 \n\n";

 $fname = basename($PHP_SELF) . ".comment";
 $fsize = filesize($fname);
 $fp = fopen(basename($fname),"w+");
 $data = fread($fp,$fsize);
 fwrite($fp,$message);
 fwrite($fp,$data);
 fclose($fp);

 }
@readfile(basename(($PHP_SELF . ".comment")));
?>








-- 
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] writing to a file

2001-03-22 Thread adam

how might i write to a file called "comment.php.comment" and only write the
text specified to the top of the file, instead of writing it to the bottom?



-- 
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] writing to a file

2001-03-22 Thread adam

how would that look on a code view? i plan to write the variable $message on
top of the existing data

""hi"" <[EMAIL PROTECTED]> wrote in message
99ektl$gf0$[EMAIL PROTECTED]">news:99ektl$gf0$[EMAIL PROTECTED]...
> Don't even bother with that previous answer.  You have what you want to
> write in a string, $new.  Read the file and put that into another string,
> $previous.  Then concatenate the strings with the "." operator:
>
> $previous=$new . $previous
>
> and write $previous to the file.
>
>
>
>
> --
> 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] writing to a file

2001-03-22 Thread adam

nevermind ^^ i am jsut going to have posts that go from top to bottom oldest
to newest



-- 
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] i get this for some reason

2001-03-23 Thread adam

everytime i post text to this file, i get the characters " and ' turning up
as \" and \'

is there anything i can add that would keep them from outputting into this?

here is the code i use:

", $message);
 $date = date("l, F j Y, h:i a");

if ($email == "") {
$message = "\n
\n
 $name  -- $date\n
  \n
   $message\n
  \n
\n\n";
 } else {
$message = "\n
\n
 mailto:$email>$name  -- $date\n
  \n
   $message\n
  \n
\n\n";
 }
 $fp = fopen ("comment.php.comment", "a");
 fwrite ($fp, $message);
 fclose ($fp);
 }
@readfile("comment.php.comment");
?>




-- 
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] i get this for some reason

2001-03-23 Thread adam

p.s.  the submitted text $ message is what is returning the wierd quote
marks



-- 
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] i get this for some reason

2001-03-24 Thread adam

but i am not talking about running a server, i am just using php on server
space that has php installed.

what code would i incluse to get rid of this?



-- 
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] i get this for some reason

2001-03-24 Thread adam

thanks a bunch ^^ it works great



-- 
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] writing to a file

2001-03-25 Thread adam

how do i write to the beginning of a file instead of the end?



-- 
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] escape characters

2001-04-06 Thread Adam

what is a list of all the characters that have to be escaped?



-- 
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] fwrite()

2001-04-06 Thread Adam

simply add:

$conteudo = stripslashes($conteudo)



-- 
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] escape characters

2001-04-06 Thread Adam

nevermind, i found them



-- 
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] Announcement: DEF CON 9 PHP Talk

2001-06-29 Thread Adam

Hello, everyone. I've been reading the list for a few years now and wanted
to let you know that I'll be giving a talk on "Data Mining and Web Security
With PHP" this year. I'll be speaking on Friday afternoon so anyone in Las
Vegas the weekend of July 13th who's interested please attend! For more
info, see www.defcon.org

Thank you,
Adam Bresson


-- 
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 outputs to mysql_query()

2001-07-08 Thread Adam

i want my mysql query result to output 2 mysql output rows for every 
set. I'm used to just doing a do/while statement for a single mysql output
per row.

example:

//the code i have essentially does this

-
';

$result = mysql_query("SELECT * from table WHERE type='default'");

do {

echo '
' . $myresult[column] .
'';

} while ($myresult == mysql_fetch_array($result));

echo '';

?>


//outputs:



data for row 1


data for row 2

...etc...


---

i want it to output like this:



data for row 1
data for row 2


data for row 3
data for row 4

...etc...


--

if anyone can help me with alternating like this or knows where i can find a
resource tutorial on it please tell me..

thanks

-Adam



-- 
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 outputs to mysql_query()

2001-07-08 Thread Adam

> I'd do this:
>
> 
> echo '';
>
> $result = mysql_query("SELECT * from table WHERE type='default'");
> $numrows = mysql_num_rows ($result);
>
> while ($numrows) {
>
> $row = mysql_fetch_row ($result);
> echo "\n$row[0]\n";
> $row = mysql_fetch_row ($result);
> echo "$row[0]\n";
> $numrows = ($numrows - 2);
> }
>
> echo '';
>
> ?>

thanks so much for the help, that'll be a great reference for any other
similar types of output i need.

some things i had to fix for others viewing this thread:

"while ($numrows)" had to be changed to "while ($numrows >= 1)" or the while
statement would loop forever. (server hangup)

i had to accomidate and if statement to check if the amount of $numrows left
was <= 1

-Adam





-- 
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: poor HTML syntax crashing (!) netscape

2001-07-08 Thread Adam

> I completely agree, Dave...
>
> I use IE 6 for browsing, but when I develop sites, I always test them
> for backwards compatibility all the way down to Netscape 3.0.  If your
> site renders properly in NS 3.0, then you can rest assured it will
> render correctly for the majority of web users out there.

I also test my page for netscape compatibility, but only down to 4.7 and to
make sure it looks good in version 6 as well. Personally i perfer IEbeta6
for personal browsing.

-Adam



-- 
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: Store uploaded files in MySQL-BLOB

2001-07-10 Thread Adam

I would suggest setting the database column to LONGTEXT instead of BLOB
since it can accomidate far more characters per entry.

As for the entry to the database through php, I'm not entirely sure what
method you're using to add these. Are they uploading their file and then it
reads it as it exists on the server? Is it supposed to read a file they
specify with a browse but never actually upload it anywhere? It might be
better to just include a text field for them to cut+paste to in a form if
it's nothing but text.

-Adam



-- 
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: form action problem

2001-07-10 Thread Adam

> hmmdo again as:
>
>function functionA()
>   {
> // your function goes here
>   }
>
>   if (isset($usefunctiona))
>   {
> functionA();
>   }
> ?>
>
> 
> 
>  
>
>  
> 
> 

i might try:








this would also assume you need multiple functions to be used on the same
form as submit buttons. This seems like the most logical/simple way to do
it.

-Adam



-- 
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] Re: Store uploaded files in MySQL-BLOB

2001-07-10 Thread Adam

> The project is a kind of knowledge base. For each entry a user creates, he
> should be able to give additional information, such as every kind of file
> (i.e. not only code files but also images etc).
> There is an  where he selects the file to be
> uploaded. The php-script is simply supposed to receive the file and put it
> into the proper database-column (which is a MEDIUMBLOB by the way, should
be
> enough space, or what's your opinion?).

in my opinion you'd save yourself some major hassle by allowing them to ftp
files like this directly to a server's directory via form based ftp. then
perhaps add a column that adds filenames to itself with the UPDATE sql query
type. this should be enough info for you to write php that could handle a
listing of these dynamicly. I'm still not entirely sure the details but this
is what I would do in the same situation. A db engine is for text, a server
is for storing files. IMHO

-Adam



-- 
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: IE cookies don't expire!

2001-07-10 Thread Adam

define a variable to be set on refresh along with the URL that erases the
cookie by setting it's expire to time() minus a month or so. If you don't
want the url varibale passer to show then have it set the cookie then to a
header redirect to $PHP_SELF.



use that in the beginning of your page and be sure to add a ?refresh= to
your refreshing url.

hope this helps with what i know about the subject.



-- 
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: form action problem

2001-07-10 Thread Adam

> Adam,
> It's really better to use the isset() instead of empty() because if you
set
> the error level report to E_ALL you will see that PHP will produce
warnings
> if the variable is not set at all!

empty() and isset() are totally different.
If a variable is set, but is set to nothing (or a value of 0), then the
isset() will still hold true, whereas empty() will check that the variable
contains a value other than a blank or 0.

A workaround to the empty() statement?

if ( (isset($var)) && (!empty($var)) )
{
}

or:

if ($var!='')
{
}

There are other ways to do this but the main point is making sure the
varible is not passed as empty when the form is used.
-Adam



-- 
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: Variables

2001-07-10 Thread Adam

try this little form example out:

--example.php--






  
  t1
  
  t2 
  



-/example.php--



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




[PHP] Re: GetImageSize

2001-07-10 Thread Adam

> For some reason, at random and without warning, the function just seems to
> stop working and does nothing but wait and timeout at 80 seconds. When you
> go to the page say www.somedomain.com it just waits and does not load
> anything for 80 seconds, and when it does, the images that use
GetImageSize
> do not load.

Example of the code perhaps? I've never had a problem with that function.

-Adam



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




[PHP] What the heck is this

2001-07-10 Thread Adam

I've seen this around alot ($a->$z) and i'm woundering what it is and what
it does. I'm specifcally talking about the arrow thingy "->". I've never
seen it before so i was kinda curious.

thanks
-Adam



-- 
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] What the heck is this

2001-07-10 Thread Adam

I've done quite a bit of php coding in the past few months but never had the
need to use this and therefore never learned anything about it. It's hard to
ask about it because i have NO idea what it is at all. Is it to give
spanning values? I was woundering if anyone knew specifically what it did.

-Adam



-- 
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: MAIL to a Bcc: ???

2001-07-10 Thread Adam

> How do I change the value of the  "TO:"  in a mail() function to a value
> of Bcc: ?
>
> Or at least trick the mail to a Bcc:So the recipients emails aren't
> shown?

if you use a database to manage the emails to be sent to, perhaps you could
create a repeating statement that sends mail to each person seperatly?



something like that?

-Adam



-- 
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] What the heck is this

2001-07-11 Thread Adam

ahh so it's for classes, then i'm fine because i haven't fount a use for
that yet.

-Adam



-- 
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] Strong typing?

2001-07-13 Thread Adam

> why can't you just use plan simple HTML to do it??? rather than make a
larger hassle for your self ie
>
>  howdy  ???
>
> & yes that is valid HTML :)
>
> Peter

why do i get the idea that's not what they meant...

-Adam



-- 
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: Creating a .xxx via PHP

2001-07-20 Thread Adam

make a .htaccess file and put this in it:

Addtype application/x-httpd-php .foo

then upload it to your root directory



-- 
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: Form Data

2001-07-30 Thread Adam

maybe your field is set to INT



-- 
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] splitting a string in half

2001-07-30 Thread Adam

I wish to split my databased string in half to be shown on 2 seperate
columns, but also preserve whole words. Is there a function that does this
already? Maybe a quick fix? Hopefully something that doesn't include html
tags as part of the string to split. If it's not that specific then that's
okay.

-Adam



-- 
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: word wrap

2001-09-11 Thread Adam


http://php.net/manual/en/function.wordwrap.php

-Adam
www.wangallery.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] Re: problem with form values

2001-09-12 Thread Adam

show us a snippet so we can evaluate the cause

-A



-- 
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: problem with form values

2001-09-12 Thread Adam

i would say do this

urlencode the string (it should use %22 or something for the quote marks)

then un encode on the recieving page


--

one thing you might try is this

$sql = 'SELECT * FROM whatever WHERE';


while ( $quotes = explode('"', $Keywords) ) {

  $q = 0;
  $s = 0;

  if ($q *= 2) {
  }else {
if ($q == 0) {
  $or = ' ';
} else {
$or=' or'
}

$sql = $sql . $or . ' Keywords=/'' . $quotes[$q] . '/ ' ;
$q++;
  }
}else{
 if ($s == 0) {
$or = '';
} else {
  $or=' or';
$s = 0;
  while ( $spaces = explode(' ', $quotes[$q] ) {
  $sql = $sql . ' Keyword=/''. $spaces[$s] . '/';
  $s++
  }
}


this is most defnitly wrong in many ways, but i'm not gonna spend another
hour thinking up what's wrong with it and bug hunt. this gives an idea. heh,
you were probably just woundering about urlencode or stripslashes... oh well
just a thought. maybe a pro could step in and say something useful.

-A



-- 
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] I am making a mailing list but....

2001-09-12 Thread Adam

amen. a database solved my data storage for good and i could never get along
without it now. also scripst like these can currupt files that it writes to
if a person does certains things while browsing. (ex. refreshing realy fast)

get a DB it's way easier to manage.

-Adam



-- 
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: limiting rows and pages like google -- again

2001-09-12 Thread Adam

i spent a good day learning how to do this from scratch. I'll post my code
and you can decypher it yourself.



 «previous ';
 }else{
  echo '«previous ';
 }
} else {
 echo '«previous ';
}
while ($select_numrows > 0) {
 if ($page != $i) {
  if ($i==1){
   echo ''.$i.' ';
  } else{
   echo ''.$i.' ';
  }
 } else {
 echo ''.$i.' ';
}
 $i = $i+1;
 $select_numrows = $select_numrows-20;
}
if ($page < ($i-1)) {
 echo 'next»  ';
} else {
 echo 'next»  ';
}

   ?>


hope this helps. it took 2 days straight to debug and develope. obviously
you would use different database values though.

-Adam
god bless amarica



-- 
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] phpMyAdmin problem that might have you fustered

2001-09-18 Thread Adam

I found that if you were trying to back up a database in this application,
and you had a # mark anywhere on an entry, this would cause a fault when you
tried to reload the script back into the sql statememnt. you will have to
make a find and replace script on page to convert it to a different
character combination and then have it pull back the value by replacing all
uccurences of that combination into the # again.



-- 
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: Thank you Rebecca

2001-09-19 Thread Adam

actually i've had that problem... i converted all # signs to "&numsym"
before entering it into the db and then converted back to # on the page
after retrieving the values.

-A.



-- 
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: ucwords added functionality?

2001-09-23 Thread Adam

> i could roll my own, and for now will just use a str_replace after
ucwords,
> but would it be possible to add an optional parameter to ucwords which
would
> be an array of words to skip? i would think this would be useful to
> many.


that sounds like a good idea to me.



-- 
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 & Dreamweaver / Fireworks

2001-09-24 Thread Adam

> Sometimes I find it easier to build web tables inside fireworks, but I
also
> need to embed PHP code into the table (ie. to display the date, logged in
> user, etc). Well, this is a pain because fireworks overwrites the entire
PHP
> file every time I make a change to it. If there's no PHP to embed I just
> "require" the HTML file with the fireworks output in it.
>
> I am tired of cutting and pasting my PHP code! ;-)
>
> How do you guys handle things like this?
>
> Thanks.

I don't USE a wysiwyg program to edit tables or html. Unless it's made for
php (yeah right i'd liek to see that) it's not gonna be able to tell what
you want. Maybe get phakt for Ultradev or something.

-Adam



-- 
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] Unexplained Issue Using Regex

2009-03-06 Thread Adam
would this not work? :

http://www.zshare.net/video/541070871c7a8d9c";;
$replaceWithThis = 'HELLYES-';

echo $string."\n";
echo preg_replace('/\S+video\//',$replaceWithThis,$string)."\n";
echo $replaceWithThis.substr($string, strripos($string, '/')+1,
strlen($string))."\n";
echo $replaceWithThis.substr(strrchr($string, '/'), 1,
strlen(strrchr($string, '/')));


?>

OUTPUT:

C:\>php test.php
http://www.zshare.net/video/541070871c7a8d9c
HELLYES-541070871c7a8d9c
HELLYES-541070871c7a8d9c
HELLYES-541070871c7a8d9c
C:\>

On Fri, Mar 6, 2009 at 2:32 PM, Nitsan Bin-Nun  wrote:
> Hi lista,
>
> I have been trying to figure this out for the last couple of hours but I'm
> lack of luck.
> Take a look at these regex's, the string that was inputed into the
> preg_replace (using Uis modificators) and the results:
> (the lists have correspondence to each other)
>
> ORIGINAL STRING
> 
>
> http://www.zshare.net/video/541070871c7a8d9c
> http://www.guba.com/watch/2000821351
> http://www.veoh.com/videos/v4609719YfsCFpf
>
>
> REGEX USED (with Uis modificators)
> 
> http:\/\/(www\.|)zshare\.net\/video\/([^\/]+)               $3
> http:\/\/(www\.|)guba\.com\/watch\/([0-9]+)              $3
> http:\/\/(www\.|)veoh\.com\/videos\/([^\/]+)
>
> THE RETURNED STRING
> 
> 41070871c7a8d9c
> 000821351
> 4609719YfsCFpf
>
> If you will go through this carefully you will notice that the first
> character of each matching group is being deleted.
> The regex's and the replacements string are being fetched from the database
> (mysql) and goes straight to the preg_replace function with the original
> string.
>
> I have no idea why this happens.
> I'm looking forward for your opinions and suggestions.
>
> Regards,
> Nitsan
>



-- 
Adi...

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



Re: [PHP] Syntax checker? Character replacing

2009-03-06 Thread Adam
just clean up your code and it will work:

http://www.google.ca/search?hl=en&q=php+rocks%21%21%21&meta=';

if (isset($qString))
{
$buffer = str_replace("&","&",$qString);
}

echo $buffer."\n";

?>

OUTPUT:
C:\>php test.php
http://www.google.ca/search?hl=en&q=php+rocks%21%21%21&meta=

C:\>

On Fri, Mar 6, 2009 at 3:05 PM, Terion Miller  wrote:
> I have this and think maybe something is off, because if there is an amp (&)
> in the location then it only displays a comma , and nothing else:
>
> if (isset($_SERVER['QUERY_STRING'])) {$Page .= ($_SERVER['QUERY_STRING']?
> '?'. str_replace("&","&",$_SERVER['QUERY_STRING']) : '');}
>
>
> is that wrong?
>



-- 
Adi...

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



[PHP] stripping first comma off and everything after

2010-06-18 Thread Adam
I'm querying data and have results such as a variable named 
$entries[$i]["dn"]:


CN=NTPRTPS3-LANIER-LD335c-LH107-PPRNP9A92,OU=XXf,OU=XX,OU=X,DC=,DC=xx,DC=xxx 



Basically I need to strip off the first command everything after, so 
that I just have it display CN=NTPRTPS3-LANIER-LD335c-LH107-PPRNP9A92.


I tried echo rtrim($entries[$i]["dn"],","); but that doesn't do 
anything.  Any ideas?


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



[PHP] help with sql statement

2010-07-12 Thread Adam
I was google searching, and the only SQL mailing list I found is 
currently giving a 503 error, so I hope you don't mind me asking my SQL 
question here, since there are a lot of SQL gurus here.  I am having a 
syntax problem:


Instead of doing a query like this::

select SMS_R_SYSTEM.Name from SMS_R_System where 
(SMS_R_System.SystemOUName = "example.com/COMPUTERS/MAIN CAMPUS/ABC") or 
(SMS_R_System.SystemOUName = "example.com/COMPUTERS/MAIN CAMPUS/XYZ")


I'd like to shorten it in the where clause to:

select SMS_R_SYSTEM.Name from SMS_R_System where 
(SMS_R_System.SystemOUName = "example.com/COMPUTERS/MAIN CAMPUS/ABC", 
"example.com/COMPUTERS/MAIN CAMPUS/XYZ")


But I'm getting a syntax error.  Any idea why my SQL syntax isn't valid?



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



[PHP] Session variables are not stored when set in implicitly called constructor!??

2005-04-16 Thread Adam
Hallo everybody,
hope I am writing to correct mailinglist(^_^*)...
I have troubles with sessions and descructor in php5. Can not set session
variable in destructor when it's called implicitly. Do You know solution
please?
I think problem is that session is stored before imlicit object destruction
*doh*

example.php:
doSomeThink();
echo "This should be hallo 2nd time: " . $_SESSION["variable"];//
unfortunatly this is not set
echo " Click and cry;-(";
// implicit desturctor call
?>

Thank You very much...
BR
a3c

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



Re: [PHP] Re: Session variables are not stored when set in implicitly calledconstructor!??

2005-04-19 Thread Adam
Hallo again,
thank You for Your response.

> >
> > // singleton for request
> > class Request {
> > function __destructor() {
> > $_SESSION["variable"] = "hallo";
>
> The __destructor() method is supposed to be about killing the class
> (Request).  It's probably bad practice to be changing $_SESSION vars
> inside of there even if that $_SESSION var affects your class.  Here,
> read this page and maybe it will make more sense to you:
> http://php.net/manual/en/language.oop5.decon.php

i agree that in *most* cases destructor should only clean up after object.
unfortunatly for "request" class there are few requirements:
1) must allow immidiate use w/o any explicit initialization or finalizaion.
e.g. at any file You can use only Request::getInstance()->isRefresh() /**
test if this request was caused by browser refresh */. this should be one
and only line (except for inclusion of request.php oc) referencing request
class -- no explicit call to Request::saveToSession() or anything ugly and
potentialy disastrous like that.
2) must provide mechanism for generating per session uniqe request
identiers. now implemented as md5($_SESSION["next_reqest_id"]++) not very
effective but handy:-P
3) must be serializable (this is why i can not put that session manipulation
at __sleep function)

these requirements (1,3) cast out __destruct, __sleep and explicit call to
some saveToSession function. do You have any other idea when to store this
information , please?

> Heck, look at the user contributed notes since one of them will directly
> affect this idea of yours.

*doh* i don't know how could i coverlooke taht user reaction:-( thank You.

> If the reference count for $req is greater than 0 (i.e. there is a
> Singleton) then __destruct won't be called.  And why should it be
> called?  Because, again, __destruct is for cleaning up the class while
> the object is getting destroyed.

Isn't __destruct is called even if reference count is gr then zero as a part
of script finalization? imo yes -- i tried this with echoing something
within singletons destructor (no invoke with explicit delete:-) and it
worked.


BR
a3c


- Original Messages - 
> Hallo everybody,
> hope I am writing to correct mailinglist(^_^*)...

Absolutely!

> I have troubles with sessions and descructor in php5. Can not set session
> variable in destructor when it's called implicitly. Do You know solution
> please?
> I think problem is that session is stored before imlicit object
destruction
> *doh*
>
> example.php:
>  session_start();
> session_register("variable");

*Note* You don't need to use session_register() if you use $_SESSION.
In fact this probably isn't even doing what you think it is.  Using
$_SESSION indexes is the preferred way to go about using sessions.

>
> // singleton for request
> class Request {
> function __destructor() {
> $_SESSION["variable"] = "hallo";

The __destructor() method is supposed to be about killing the class
(Request).  It's probably bad practice to be changing $_SESSION vars
inside of there even if that $_SESSION var affects your class.  Here,
read this page and maybe it will make more sense to you:
http://php.net/manual/en/language.oop5.decon.php
Heck, look at the user contributed notes since one of them will directly
affect this idea of yours.

> }
> }
>
> $req = Request::getInstance();
> $req->doSomeThink();
> echo "This should be hallo 2nd time: " . $_SESSION["variable"];//
> unfortunatly this is not set
> echo " Click and cry;-(";
> // implicit desturctor call

If the reference count for $req is greater than 0 (i.e. there is a
Singleton) then __destruct won't be called.  And why should it be
called?  Because, again, __destruct is for cleaning up the class while
the object is getting destroyed.

> ?>


smime.p7s
Description: S/MIME cryptographic signature


Re: [PHP] spawing new PHP process

2002-11-26 Thread Adam Voigt
Have your page before the email's would actually be sent, submit to a
page with a frameset, in the bottom frame have a height of 1 pixel so
that it's invisible. Then, in your PHP page, add something like:


parent.topframe.progress.value =
eval(parent.topframe.progress.value)+1;


Have that print after every iteration of a mail being sent, and ofcourse
you would have to create the necessary text boxes on your top frame and
everything, but that would make it appear to be working to the user
because the count of email's being sent would keep going up till it was
done.

On Tue, 2002-11-26 at 11:41, ROBERT MCPEAK wrote:
> I'm interested in spawing a new PHP process -- if that's the correct terminology.
> 
> The situation is that I've got a very slow loading page, where, for example, I'm 
>using PHP to send, say, 1000 emails.  The user clicks submit, and, although PHP is 
>firing out the emails, it appears to the user that page is hanging.  I'd like to 
>somehow send that process to the background and let the page load straight-away.
> 
> In another scripting language I've used, this function was called "spawn."
> 
> Do we have something like this in PHP (I know we do!! Just can't find it.) I've 
>looked through the docs but don't see what I'm looking for.
> 
> Thanks in advance.
> 
> -Bob
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



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


Re: [PHP] Need email solution

2002-11-27 Thread Adam Voigt
Not free or Opensource or anything, but our company has had very
good results with a package called "iMail".

http://www.ipswitch.com/Products/IMail_Server/index.html

On Tue, 2002-11-26 at 15:38, Manuel Ochoa wrote:
> 
> I'm setting up a Windows 2000 server with Apache, PHP and MySQL. I also need to 
>setup email service for 1 domain name.
> 
> I'm looking for any suggestions on SMTP software.
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



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


Re: [PHP] problem with https

2002-11-27 Thread Adam Voigt
At the bottom of your httpd.conf, in the default SSL section, there is a
path that normally points to /path/to/apache/htdocs if you store your
webfiles some where other then the default, even if you change it near
the top of your file, it won't work for SSL till you modify it at the
bottom, if you can't find it by just looking, do a search for "htdocs"
in your file, all the way down till you find it.

On Wed, 2002-11-27 at 10:14, Vivek Kedia wrote:
> i have apache 1.3.26 on php 4.2.3 everything else is
> running fine except "https//whatever"   when i am
> trying to access the files thru apache , I have looked
> for SSL properties in httpd.conf and everything is
> properly enables( that what i think ) . The error
> generated is "page not found" and when i am running
> without "s" in the "https://"; the page is being
> displayed properly ,
> Do any1 have any idea 
> 
> 
> vivek kedia
> [EMAIL PROTECTED]
> 
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



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


Re: [PHP] How Do I install php on Apache 2.0

2002-11-27 Thread Adam Voigt
A. What does having Adobe installed matter?
B. Why are you trying to run 2.0? Apache 2.0 isn't even recommended for
use with PHP on linux systems yet, let alone windows. You'd have much
better luck with the 1.3.27 version.

On Wed, 2002-11-27 at 11:22, Tweak2x wrote:
> Hello, I am on windows XP Pro, and I have adobe istalled. How can I get php
> to work on Apache? I download php-4.2.3 (the installer) and chose apache,
> and It didnt work. I still cant get my php to work for apache. Can somebody
> guide me step by steb through installing php on apache? thanks
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



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


Re: [PHP] controlling ownership on file uploads ...

2002-11-27 Thread Adam Voigt
exec("/bin/chown newuser:newuser /path/to/file");

On Wed, 2002-11-27 at 12:03, Kenn Murrah wrote:
> Greetings.
> 
> I've written a simple form to allow my clients to upload files to me, and it
> works fine EXCEPT that the uploaded file is owned by "www" and I while I can
> read the file, I don't have the necessary permissions to delete it when done
> ...
> 
> Since this site is being hosted elsewhere, is there a way I can control
> ownership so that I can delete the file?  I've written my ISP/web hoster and
> received no response -- usually that's their subtle way of telling me I
> should ask the PHP quiestion here :-)
> 
> Any and all help would be appreciated.
> 
> Thanks,
> 
> kenn
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



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


[PHP] YATS on OS X

2002-11-29 Thread Adam Atlas
I'm trying to compile the YATS template system for PHP on Mac OS X. It 
compiles without problems (one warning actually, but that's not the 
problem I'm having), but it gives me a static library as an archive 
file, instead of a shared library which I can install into my PHP 
installation. I'm not a porting expert at all. Does anyone know how I 
should do this?

My configuration:
PHP 4.3 RC2, compiled from source
Apache httpd 1.3.27, compiled from source
Mac OS X 10.2.2

Thanks,
Adam Atlas


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



[PHP] Call to undefined function: mysql_foo()...

2002-12-01 Thread Adam Atlas
I'm having a strange problem. If I run any MySQL function, I get the 
error message "Call to undefined function: mysql_foo()". Why would I be 
getting this? I've checked php.ini to see if it has the 
extension=mysql.so line, and I've run a phpinfo() script which says PHP 
was compiled with MySQL and it does have a MySQL section. The strangest 
part is that I have a perfectly functional phpBB installation using a 
MySQL database. Am I missing something obvious?

--
Adam Atlas

"During my service in the United States Congress, I took the initiative 
in creating the Internet." - Al Gore, March 9, 1999: On CNN's Late 
Edition


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



[PHP] PHP and WebDAV

2002-12-02 Thread Adam . Whitehead
Hi All

I am currently working on a simple document management system in PHP.
Metadata and revision
histories and other relevant data is stored in a PostgreSQL database.

I would like to set up this system so that there is NO access to any
documents through the filesystem
(web folders etc.)

Hence, the ideal situation is the following:
(much simplified)

The user is sent to an URL such as:

http://www.blah.com/document.php?docid=9994112

This script document.php pushes the Word Document (or whatever type of
document it may be) to the user's
browser which in turn loads the relevant application. Now, normally when a
user clicks "Save" it will attempt to
save the file back to the Temporary Internet Files directory or something
similar.

I would like to make it possible for the user to simply be able to hit
Save. The request is then sent back (a webdav request)
to http://www.blah.com/document.php?docid=9994112 where this script can
then retrieve the body of the file saved
back to the web and then store it on the server file system as it pleases.
That PHP script then updates the metadata in the
PostgreSQL database.

So basically what I want to use of WebDAV is its facility for saving "back
to the web". I'm not really interested in locking
or versioning etc.

Will PHP and WebDAV support what I am looking for here? If not, is there
anything else that will? The key point is that
I must give the users a transparent way of saving back to the web without
them having any access to the documents
through shares etc.

Thanks in advance.

---
Adam Whitehead
Software Developer - CSM Technology
Microsoft Certified Professional (MCP)
Ph: (08) 89361 455 ** Mobile (0411) 241 120
E-mail: [EMAIL PROTECTED]
www.csm.com.au

This e-mail, including any attachments, is intended only for the use of the
individual or entity named above and may contain information that is
confidential and privileged. Any information contained in this e-mail is
not to be used or disclosed for any purpose other than the purpose for
which you received it. If you are not the intended recipient you are
notified that disclosing, copying, distributing or taking any action in
reliance on the contents of this information is strictly prohibited. If you
have received this e-mail by mistake, please delete this e-mail permanently
from your system. WARNING: Although the company has taken reasonable
precautions to ensure no viruses are present in this e-mail, the company
can not accept responsibility for any loss or damage arising from the use
of this e-mail or attachments.


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




Re: [PHP] phpAds Sillyness

2002-12-02 Thread Adam Voigt




Did you change anything in the session settings from the PHP default?





-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








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


Re: [PHP] phpAds Sillyness

2002-12-02 Thread Adam Voigt




Hmm, you got me. The last time I installed it, it worked fine after I turned register global's on.

There's a support forum on there website if no one else here has any bright idea's.





-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








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


Re: [PHP] preg_match()

2002-12-02 Thread Adam Voigt




Well, if you truly mean split by row, if $emaillist contains them all:



$earray = explode("\n",$emaillist);



Then, if you wanted each email address in it's own subarray position:



for($counter = 0; $counter < count($earray); $counter++)

{

$earray[$counter] = explode(";",$earray[$counter]);

}



That would give you:



$earray[0][0] = "[EMAIL PROTECTED]";

$earray[0][1] = "[EMAIL PROTECTED]";

$earray[0][2] = "[EMAIL PROTECTED]";

$earray[1][0] = "[EMAIL PROTECTED]";



Etc, assuming you had 3 email's per line.





-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








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


Re: [PHP] There Has to be an easier way (Multidimensional Array_

2002-12-03 Thread Adam Voigt




An important thing to note in general, if you do:











On the page your submitting to, you'll end up with:



$address[0][address]

$address[1][city]

$address[2][state]



Where as you were expecting to get:



$address[0][address]

$address[0][city]

$address[0][state]



This happens because when you use the [] operator

to say to PHP "next array position", every time it hits

that it increments the row, rather then understanding

your trying to say "set this value on this array row", it

hears "woah, I just saw a [] so I'm going to up the row".





-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








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


Re: [PHP] URL vars in URL var?

2002-12-03 Thread Adam Voigt




http://www.php.net/manual/en/function.urlencode.php



Pass it through that function (or one of the others) on:



http://www.php.net/manual/en/ref.url.php



On Tue, 2002-12-03 at 12:01, Shawn McKenzie wrote:

I'm trying to pass a URL as a var in a URL:



The url var should equal:

http://www.someothersite.com/index.php?something=something&x=100&y=200



And I'm passing it to this URL:

http://www.somesite.com/index.php?var=val



So if I use:

http://www.somesite.com/index.php?var=val&url="">

ndex.php?something=something&x=100&y=200



The problem is, if I echo $url; I get the following:

http://www.someothersite.com/index.php?something=something



So the vars after the & in the url var are being truncated, I'm assuming

that they are treated as vars of the main URL.



Any help appreciated,

Shawn







-- 

PHP General Mailing List (http://www.php.net/)

To unsubscribe, visit: http://www.php.net/unsub.php






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








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


Re: [PHP] "x" as a multiplier

2002-12-03 Thread Adam Williams
I don't think he's trying to multiply, I think he wants to print #x#, like
800x600 or 1024x768, etc...

    Adam

On Tue, 3 Dec 2002, Kevin Stone wrote:

> Is it possible you're mistaken somehow?  x isn't an operator in PHP.
> Executing $a x $b will give you a parse error.  Anything in quotes is
> automatically casted as a string.
> -Kevin
>
> - Original Message -
> From: "John Meyer" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, December 03, 2002 3:20 PM
> Subject: [PHP] "x" as a multiplier
>
>
> > Code:
> >
> > $newwidth . "x"  . $newheight
> >
> >
> > What I want to get out is a string, like 89x115.  All I am getting though,
> > is one number, even though  if I do this
> >
> > $newwidth . " x "  . $newheight
> >
> > It prints out just fine.  What is going on here?
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>
>


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




Re: [PHP] PHP 2.4.3 and Apache 2.0.x

2002-12-04 Thread Adam Williams
If you mean PHP 4.2.3, it'll work with apache 2.0, but not that great.
I'm also using PHP 4.3.0-rc2 with Apache 2.0 and its not any better.

    Adam

On Wed, 4 Dec 2002, Vicente Valero wrote:

> Hello,
>
> PHP 2.4.3 can work with Apache 2.0.x or I need Apache 1.3.x?


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




  1   2   3   4   5   6   7   8   9   10   >