[PHP] define("DOC_HOME_PATH", "what goes here")

2003-02-19 Thread Jonathan Villa
I want to define 3 constants

DOC_HOME_PATH
IMG_HOME_PATH
CTL_HOME_PATH

So that I can just do this 


Click Here
 
**do I need to echo?
**not everything goes to "stuff"

Right now I have

define ("DOC_HOME_PATH", "d:/is/projects/killerspin/web/store/");
define ("IMG_HOME_PATH", "d:/is/projects/killerspin/web/images/");
define ("CTL_HOME_PATH", "d:/is/projects/killerspin/web/control/");

This works fine for displaying images but not for form submission or
links.

I have also tried this

define ("DOC_HOME_PATH", "http://localhost/killerspin/web/store/";);
define ("IMG_HOME_PATH", "http://localhost/killerspin/web/images/";);
define ("CTL_HOME_PATH", "http://localhost/killerspin/web/control/";);

doesn't work.

I have also tried a few other ways, but to no avail.

Right now the config is Apache 2.0.43, PHP 4.3.0, Win Xp Pro, and an
Access DB.
For production this will be running on  a windows server so I would also
need to know to set up the same var for this enviroment.

Thanks in advance
---> Jonathan
 
 
 



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




RE: [PHP] PHP form help

2003-02-19 Thread Jonathan Villa
How is the information being kept?  Sessions?  You'll either want to
store them in a session or create hidden fields on the confirmation
page, then when they click on confirm, you'll have access to the fields
on the new page, (the page where your processing script is)

 
---> Jonathan
 
 
 

-Original Message-
From: Steven M [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 19, 2003 2:15 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP form help

Hi,

I have created a form that passes details to the next page so the user
can
see the details they have submitted before clicking confirm to submit to
the
database.  The problem is that the details dont seem to get passed to
the
script after they have appeared on the confirmation page.  I know the
script
works because i submitted info to is successfully before i changed the
form
action to point at the confirmation page.

I think it has something to do with PHP sessions but am not sure how to
make
it work.  Thanks for any help.

Steven M





-- 
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] get insert_id in odbc

2003-02-19 Thread Jonathan Villa
Using MySQL, one can use mysql_insert_id to get the value of an
auto_increment column.

How would I do this using ODBC and Access?





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




RE: [PHP] get insert_id in odbc

2003-02-19 Thread Jonathan Villa
Having to query the DB again and/or create my own function is what I
wanted to avoid, but looks I'll have to do it.

Thanks for the replies...

---> Jonathan
 
 
 

-Original Message-
From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 19, 2003 2:45 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] get insert_id in odbc

At 21:28 19.02.2003, Jonathan Villa spoke out and said:
[snip]
>Using MySQL, one can use mysql_insert_id to get the value of an
>auto_increment column.
>
>How would I do this using ODBC and Access?
[snip] 

Assuming the ID column is named "ID":

insert into TABLE (columns) values (values);
select max(id) from TABLE;

Caution 1:
If your database supports it you MUST enclose both line within a
transaction or you might get a wrong result when somebody inserts
another
row in TABLE before your select max(id) statement executes.

Caution 2:
On heavily filled tables, select max(id) might have some performance
issues.

Generally I despise using Access in a multiuser environment. Too slow,
too
error prone with simultaneous access. And I don't know if transaction
support is more than syntactically implemented...

Using PostgreSQL, for example, you'd have the ID column declared like
this:
create table TABLE (
id serial,
...
);
This generates a sequence that can be queried without performance
penalty:
select currval('TABLE_id_seq');


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


-- 
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] define("DOC_HOME_PATH", "what goes here")

2003-02-19 Thread Jonathan Villa
I want to define 3 constants

DOC_HOME_PATH
IMG_HOME_PATH
CTL_HOME_PATH

So that I can just do this 


Click Here
 
**do I need to echo?
**not everything goes to "stuff"

Right now I have

define ("DOC_HOME_PATH", "d:/is/projects/killerspin/web/store/");
define ("IMG_HOME_PATH", "d:/is/projects/killerspin/web/images/");
define ("CTL_HOME_PATH", "d:/is/projects/killerspin/web/control/");

This works fine for displaying images but not for form submission or
links.

I have also tried this

define ("DOC_HOME_PATH", "http://localhost/killerspin/web/store/";);
define ("IMG_HOME_PATH", "http://localhost/killerspin/web/images/";);
define ("CTL_HOME_PATH", "http://localhost/killerspin/web/control/";);

doesn't work.

I have also tried a few other ways, but to no avail.

Right now the config is Apache 2.0.43, PHP 4.3.0, Win Xp Pro, and an
Access DB.
For production this will be running on  a windows server so I would also
need to know to set up the same var for this enviroment.

Thanks in advance
---> Jonathan
 
 
 



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




[PHP] define("DOC_HOME_PATH", "what goes here")

2003-02-19 Thread Jonathan Villa
I want to define 3 constants

DOC_HOME_PATH
IMG_HOME_PATH
CTL_HOME_PATH

So that I can just do this 


Click Here
 
**do I need to echo?
**not everything goes to "stuff"

Right now I have

define ("DOC_HOME_PATH", "d:/is/projects/killerspin/web/store/");
define ("IMG_HOME_PATH", "d:/is/projects/killerspin/web/images/");
define ("CTL_HOME_PATH", "d:/is/projects/killerspin/web/control/");

This works fine for displaying images but not for form submission or
links.

I have also tried this

define ("DOC_HOME_PATH", "http://localhost/killerspin/web/store/";);
define ("IMG_HOME_PATH", "http://localhost/killerspin/web/images/";);
define ("CTL_HOME_PATH", "http://localhost/killerspin/web/control/";);

doesn't work.

I have also tried a few other ways, but to no avail.

Right now the config is Apache 2.0.43, PHP 4.3.0, Win Xp Pro, and an
Access DB.
For production this will be running on  a windows server so I would also
need to know to set up the same var for this enviroment.

Thanks in advance
---> Jonathan
 
 
 



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




RE: [PHP] Email troubles

2003-07-01 Thread Jonathan Villa
Looks like your SMTP server needs for your to authenticate first.

-->Jonathan
 
I made a discovery today. I found a computer.
Wait a second, this is cool. It does what I want it to.
If it makes a mistake, it's because I screwed it up.
Not because it doesn't like me...
Or feels threatened by me...
Or thinks I'm a smart ass...
Or doesn't like teaching and shouldn't be here...
 
 
 

-Original Message-
From: Sparky Kopetzky [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 30, 2003 5:31 PM
To: PHP General
Subject: [PHP] Email troubles

I'm getting this error while sending email with mail():

Warning: mail(): SMTP server response: 550 5.7.1 <[EMAIL PROTECTED]>...
Relaying denied in (path to my program)

How do I turn relaying on??

Robin E. Kopetzky
Black Mesa Computers/Internet Services
www.blackmesa-isp.net



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



[PHP] What's this talk about ASP to PHP?

2003-07-10 Thread Jonathan Villa
I've read somewhere about some asptophp convertor/tool/methodology...?? 
Don't know what it is, that's why I'm asking.

I've been asked to help out on a project which might include some
already developed basic ASP code.  I would rather do it in PHP.


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



Re: [PHP] Couple of questions form a PHP newbie

2003-07-11 Thread Jonathan Villa
1. Text file or DB 
My answer -> Learn how to use a database, it will make things much
easier

2. Checkbox

Try this:






then after submission, you could do the dump, or

foreach ($_POST["sports"] as $val)
echo $val;


On Fri, 2003-07-11 at 20:10, Jason Giangrande wrote:
> First question: I'm creating a custom content manager for a small
site. 
> It will basically be used to store short articles (several paragraphs
> each).  Now my question is, is storing these to a text file going to
> work or am I going to have problems later on when the file gets to be
a
> reasonable size.  I ask this, because the only way I can seem to work
> with the text file is to read the entire file in and alter it that
way. 
> Are there any ways to edit or remove one line of a text file without
> having to read the entire file first?  Would I be better off using a
> database instead of a text file (keep in mind that I know nothing
about
> databases)?
> 
> Question two: I've read in several books that html checkbox forms can
> pass multiple values to the server when more than one check box is
> selected if they have the same name.  However, when I var_dump the
> $_POST variable that should contain them I only get one value.  Anyone
> have any ideas why?
> 
> Regards,
> Jason Giangrande
> 


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



RE: [PHP] How unsafe is register_globals?

2003-07-16 Thread Jonathan Villa
This is only my stubborn opinion...

I would turn it on for now with a warning that it will be turned off
soon... 

I work for a company which is strictly Microsoft/Domino Technology and
until I arrived, many have not heard of PHP and for the few that did,
well let's just say that sloppy, unstable, and inconsistent code which
they have seen has made is hard for me to get an opportunity to display
what PHP can do... Fortunately, I now have the opportunity and
discussions are reduced to the basic google searches... php vs.
asp/jsp/lotus script.

So in summary, try to push for some form of coding standard, it might
help PHP in the long run.

-Original Message-
From: Chris Shiflett [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 16, 2003 11:22 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] How unsafe is register_globals?

--- Paul Chvostek <[EMAIL PROTECTED]> wrote:
> I've got this new server running with folks from all over
> uploading PHP code. I don't know all the folks, so I've
> turned on safe_mode, set an open_basedir to each user's
> documentroot, and left register_globals at its default.
> 
> And now I'm getting scads of requests to turn on
> register_globals from folks who want to run php-nuke and
> some other established packages that rely on it.

First, your instincts are good, and register_globals is best left off.
However,
that is the developer in me speaking.

>From an administrator's perspective, it really doesn't matter. Turning
it on
won't allow your users (who are themselves developers) to do anything
more
malicious than leaving it off would; it doesn't give them more power or
privilege. In fact, since register_globals is no magic cure, it won't
even
necessarily make the applications that they run and/or develop any more
secure.
They could develop an application just as insecure with register_globals
off,
and it really only affects their application and their users for the
most part
anyway.

So, I would turn it on if I were in your situation, or rather, I would
allow
them to override the default settings via a .htaccess file (assuming
Apache).

Hope that helps.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

-- 
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] a good PHP free forum?

2003-07-21 Thread Jonathan Villa
www.phpbb.com

-Original Message-
From: Denis L. Menezes [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 21, 2003 10:57 AM
To: [EMAIL PROTECTED]
Subject: [PHP] a good PHP free forum?

Hello friends.

Can someone suggest a very good and easy to customise forum?

Thanks
Denis



-- 
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] PHP5?

2003-07-23 Thread Jonathan Villa
Has anyone installed PHP 5 on Apache 2.0.47?  What version of Apache 2
works best with PHP 5? 
On both Windows and Linux?


RE: [PHP] PHP5?

2003-07-23 Thread Jonathan Villa
Yes, I can get PHP 4.3.2 working with Apache 2.0.47 just fine.  But I
wanted to know if anyone had information on PHP 5 which is still in
Beta?

-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 23, 2003 11:54 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP5?

the latest stable version of PHP works just fine with Apache 2.0.47.

tyler

- Original Message - 
From: "Jonathan Villa" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 23, 2003 11:47 AM
Subject: [PHP] PHP5?


> Has anyone installed PHP 5 on Apache 2.0.47?  What version of Apache 2
> works best with PHP 5? 
> On both Windows and Linux?
> 


-- 
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] Has anyone successfully installed PHP 5?

2003-07-23 Thread Jonathan Villa
Has anyone installed PHP 5 on Windows or Linux using Apache 2?


[PHP] Unable to configure PHP5 on Linux

2003-07-28 Thread Jonathan Villa
My current setup is httpd 2.0.47 on a Red Hat 8.

When I try to configure php I do

./configure --with-apxs2=/etc/httpd/bin/apxs --disable-cgi

it runs for a while until I get

configure: error: libxml2 version 2.5.1 or greater required.

but yet, when I do an rpm search for libxml2

rpm -q libxml2

I get 

libxml2-2.5.1-1

Any ideas on this?


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



Re: [PHP] Unable to configure PHP5 on Linux

2003-07-28 Thread Jonathan Villa
Thanks! That was it...

On Mon, 2003-07-28 at 21:41, Evan Nemerson wrote:
> Ya- you have to have libxml2-devel installed. Possibly 
> http://rpmfind.net/linux/RPM/rufus/libxml/libxml2-devel-2.5.1-1.i386.html
> but check your distro cd first. Or you could rpm -e libxml2-2.5.1-1, get a 
> tarball, and compile it yourself
> 
> 
> 
> On Monday 28 July 2003 07:13 pm, Jonathan Villa wrote:
> > My current setup is httpd 2.0.47 on a Red Hat 8.
> >
> > When I try to configure php I do
> >
> > ./configure --with-apxs2=/etc/httpd/bin/apxs --disable-cgi
> >
> > it runs for a while until I get
> >
> > configure: error: libxml2 version 2.5.1 or greater required.
> >
> > but yet, when I do an rpm search for libxml2
> >
> > rpm -q libxml2
> >
> > I get
> >
> > libxml2-2.5.1-1
> >
> > Any ideas on this?
> 
> -- 
> Status: 0
> Content-type: text/html
> 
> [cgi]
> "The missionaries go forth to Christianize the savages- as if the savages 
> weren't dangerous enough already."
> 
> -Edward Abbey
> 


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



[PHP] Question on syntax...

2003-08-20 Thread Jonathan Villa
I've seen this a few times in some code examples...

XXX::XXX

What do the 2 colons signify?


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



[PHP] error when using $this

2003-08-21 Thread Jonathan Villa
First of all, let me say that I am using PHP 5, but not including any
new php5 features, just installed it.

Anyway, 

this is the offending code..

$retVal = true;
$this->setDBConn(mysql_connect('localhost',$this->_dbuser,$this->_dbpwd));
if ($this->getDBConn() == false)
$retVal = false;

and on my page I get the following error:

Fatal error: Using $this when not in object context in /var/www/x

Now this is code I've used time and time before...also, I have never
seen an error such as the above.

Any ideas?


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



Re: [PHP] Re: error when using $this

2003-08-21 Thread Jonathan Villa
I am in a class as well as a constructor.

class DBI
{
//var declarations
function DBI() 
{
$retVal = true;

$this->setDBConn(mysql_connect('localhost',$this->_dbuser,$this->_dbpwd));
if ($this->getDBConn() == false)
$retVal = false;
if(mysql_select_db($this->getDBName(),$this->getDBConn())==false)
$retVal = false;
return $retVal;
}
//more functions... 
}

I even tried removing $this->_dbuser and $this->_dbpwd and replacing
them with hardcoded data, and the error persists.

On Thu, 2003-08-21 at 19:19, DvDmanDT wrote:
> Has with classes to do... The error claims that code isn't in a class which
> makes it invalid as $this is the current class... If you aren't in a class
> then there's no $this... however, if you are in a class, you just found a
> bug or a typo in your script...
> 
> -- 
> // DvDmanDT
> MSN: [EMAIL PROTECTED]
> Mail: [EMAIL PROTECTED]
> "Jonathan Villa" <[EMAIL PROTECTED]> skrev i meddelandet
> news:[EMAIL PROTECTED]
> > First of all, let me say that I am using PHP 5, but not including any
> > new php5 features, just installed it.
> >
> > Anyway,
> >
> > this is the offending code..
> >
> > $retVal = true;
> > $this->setDBConn(mysql_connect('localhost',$this->_dbuser,$this->_dbpwd));
> > if ($this->getDBConn() == false)
> > $retVal = false;
> >
> > and on my page I get the following error:
> >
> > Fatal error: Using $this when not in object context in /var/www/x
> >
> > Now this is code I've used time and time before...also, I have never
> > seen an error such as the above.
> >
> > Any ideas?
> >
> 
> 


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



[PHP] How to make an argument optional...confirmation...

2003-08-21 Thread Jonathan Villa
I want to create a function with an optional argument/parameter but have
never read a concrete answer on how to do it.

This is what I am assuming

function test(arg1,arg2,arg3 = null)
{
arg3 will be optional
}

is this correct?


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



Re: [PHP] How to make an argument optional...confirmation...

2003-08-21 Thread Jonathan Villa
Great, thanks!!

On Thu, 2003-08-21 at 22:20, Tom Rogers wrote:
> Hi,
> 
> Friday, August 22, 2003, 12:55:37 PM, you wrote:
> JV> I want to create a function with an optional argument/parameter but have
> JV> never read a concrete answer on how to do it.
> 
> JV> This is what I am assuming
> 
> JV> function test(arg1,arg2,arg3 = null)
> JV> {
> JV> arg3 will be optional
> JV> }
> 
> JV> is this correct?
> 
> Yes that is correct, you don't have to use null any value can be put
> in as a default.


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



[PHP] PHPMVC

2003-09-08 Thread Jonathan Villa
has anyone used PHPMVC (from phpmvc.net) and if so, what is your
experience with it?

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



Re: [PHP] Help understanding code...

2003-09-25 Thread Jonathan Villa
! means not, for example $yes != $no

Regarding the (xxx) ? x : x;
Your assumption is correct

I use it alot, but sometimes it's still better to use if/else statements

On Thu, 2003-09-25 at 11:47, Jeff McKeon wrote:
> I've just picked up a more advanced book on PHP and it has a lot of
> example code in it. I understand most of it but some things I'm seeing I
> don't understand. Like the following... 
> 
> code: 
> 
> 
> 
> $couponcode = (! empty($_REQUEST['couponcode'])) ?
> $_REQUEST['couponcode'] : NULL; 
> 
> 
> 
> I think this is saying: 
> 
> If the global variable couponcode is not empty, then the variable
> '$couponcode' is equal to "$_REQUEST['couponcode']" otherwise it gets a
> "NULL" value. 
> 
> What's throwing me is the use of the "!" and "?" and ":" 
> 
> If What I suspect is correct, I've never seen an if-then statement like
> this. If it is a replacement for an IF-Then statement then it's much
> cleaner and I'd like to use it. 
> 
> another one is: 
> 
> 
> code: 
> 
> 
> IF (!strcmp($operator, '+')) { 
> $result = $num1 + $num2 
> } 
> 
> 
> 
> I've looked up strcmp() and know it's used to compair two strings. The
> $operator variable in the script that this was taken from is set to
> either "-", "+", "*" or "/". What I don't understand here is what the
> "!" in front of strcmp() means. 
> 
> Can anyone break down the code for me and explain the parts? 
> 
> thanks, 
> 
> Jeff

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



Re: [PHP] what is the best PHP editor?

2003-10-13 Thread Jonathan Villa
What's the matter?  No one likes Zend Studio?

On Mon, 2003-10-13 at 12:00, Chris Boget wrote:
> > I currently use EditPlus - and like it -- is there anything else out there
> > that is better and still reasonably priced.
> 
> I am not sure what you would consider reasonably priced, but the best
> editor I've come across is Visual Slick Edit.  Bar none, the best and most
> feature rich editor I've come across in the last few years.
> 
> Chris

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



[PHP] PHP 5 in a live application

2003-10-15 Thread Jonathan Villa
All, 

I understand that PHP 5 in only in beta, and that it would be bad
practice (please correct me if I'm wrong) to implement a beta release
into production (although phpmvc does it), has anyone attempted this?  I
read the post about pidget and thought that perhaps I could begin to
develop using PHP 5 (which I am very excited about).

Also, I just bought Core PHP Programming 3rd Edition, it's awesome!!
It's "fully revised for PHP 5" so I'm very eager to start with it.  

I'm going to be starting development on 2 new projects with a company
which has never worked with PHP (I have, the rest are mainly, Java,
Microsoft, and Domino developers), so I'm  pretty excited about
pioneering this change.

Thanks in advance.

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



RE: [PHP] (ANNOUNCE) New PHP mailing list *searchable* archives

2003-10-21 Thread Jonathan Villa
Cool, this means that don't have to keep a directory of every post in
this mailing list or the php-db mailing list in order to search through.

-Original Message-
From: Chris Shiflett [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 21, 2003 1:00 PM
To: Marek Kilimajer; Marco Tabini
Cc: PHP-General
Subject: Re: [PHP] (ANNOUNCE) New PHP mailing list *searchable* archives

--- Marek Kilimajer <[EMAIL PROTECTED]> wrote:
> My suggestion would be to use iframe for the message. It would load
> much faster then.

How would that make it load much faster? Surely not because it requires
an
additional HTTP transaction, increasing the load. I'm curious to know
what you
mean.

The thread view needs to be moved, perhaps to that blank spot to the
right of
the orange line. That spot probably isn't intended to be blank, since I
notice
there are ads and such way down at the bottom, but that's how it renders
in
Galeon (Gecko).

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

-- 
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] New line characters and carriage returns

2003-10-24 Thread Jonathan Villa
Ok, don't know what I am doing wrong here...but for some reason I cannot
get new line or carriage return characters to work correctly...

For example, 

When I send some emails, I try

$msg .= "From: [EMAIL PROTECTED]
Content-Type: text/plain\r\n"

And it doesn't work correctly... the Content Type shows in my mail
body


More importantly, I'm trying to write a system logger

$fileName = 'errors.'.date('dmY').'.log';
$error = date('h:i:s').'  '.$script.'   '.$error.'\n';  
error_log ($error, 3, '/var/www/killerspin/logs/'.$fileName);

but the output into my log file shows the \n but does not use it.

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



Re: [PHP] New line characters and carriage returns

2003-10-24 Thread Jonathan Villa
ok, I see, I have to use double quotes around it...

why is that?


On Fri, 2003-10-24 at 11:57, Jonathan Villa wrote:
> Ok, don't know what I am doing wrong here...but for some reason I cannot
> get new line or carriage return characters to work correctly...
> 
> For example, 
> 
> When I send some emails, I try
> 
> $msg .= "From: [EMAIL PROTECTED]
>   Content-Type: text/plain\r\n"
> 
> And it doesn't work correctly... the Content Type shows in my mail
> body
> 
> 
> More importantly, I'm trying to write a system logger
> 
> $fileName = 'errors.'.date('dmY').'.log';
> $error = date('h:i:s').'  '.$script.'   '.$error.'\n';
> error_log ($error, 3, '/var/www/killerspin/logs/'.$fileName);
> 
> but the output into my log file shows the \n but does not use it.

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



[PHP] prepend file to all scripts...

2003-10-24 Thread Jonathan Villa
I thought I read that this was possible once, but I can't find anything
to substantiate/refute it...

Is it possible to prepend a configuration file to my pages?

For example, 

I have a app.config.inc file which contains an application specific
include path as well as includes the classes my application needs. 
Currently this file is in my web root, but I would like to place it
outside of my web root but still include it in all of my pages...

Is this possible?

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



RE: [PHP] prepend file to all scripts...

2003-10-24 Thread Jonathan Villa
It looks like auto_prepend_file will do this for all of my apps...

I'll look into the .htaccess option

On Fri, 2003-10-24 at 15:07, Wouter van Vliet wrote:
> Add: 
>   php_value   auto_prepend_file   "/path/to/file"
> 
> To your .htaccess or VirutualHosts section.
> 
> You might also want to use auto_append_file
> 
> Wouter
> 
> -Original Message-
> From: Jonathan Villa [mailto:[EMAIL PROTECTED] 
> Sent: Friday 24 October 2003 22:00
> To: [EMAIL PROTECTED]
> Subject: [PHP] prepend file to all scripts...
> 
> I thought I read that this was possible once, but I can't find anything to
> substantiate/refute it...
> 
> Is it possible to prepend a configuration file to my pages?
> 
> For example, 
> 
> I have a app.config.inc file which contains an application specific include
> path as well as includes the classes my application needs. 
> Currently this file is in my web root, but I would like to place it outside
> of my web root but still include it in all of my pages...
> 
> Is this possible?
> 
> --
> 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] install questions

2003-10-24 Thread Jonathan Villa
What is your platform?  Not that it mattes a whole lot...

Make sure the httpd.conf file has 

#LoadModule php4_modulemodules/libphp4.so
LoadModule php5_modulemodules/libphp5.so
(whichever is the one you need, probably 4)

AddType application/x-httpd-source .phps
AddType application/x-httpd-php .php


On Fri, 2003-10-24 at 17:00, rogue wrote:
> i just installed php and when i try to load a php file into the browser 
> through apache, the file downloads instead of being displayed.
> 
> is this an apache problem or a problem with my php install?
> 
> thanks

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



Re: [PHP] SESSIONMANAGEMENT -- gute php mailing list / gute leute

2003-10-29 Thread Jonathan Villa
Wenn Sie nicht Plätzchen benutzen möchten, können Sie es in die Frage
Zeichenkette mit einschließen... Das PHP Handbuch gibt Beispiele von
diesem... zum Beispiel, PHPSESSID/SID etwas wie das. Ideal was Sie tun
möchten, soll diese alle möglichen Formdaten oder -verbindungen in Ihrer
Anwendung voranstellen < Eingang type="hidden "name="PHPSESSID" Wert =
"" > oder < ein href="page.php?PHPSESSID=$PHPSESSID"> oder etwas mögen
das...

On Tue, 2003-10-28 at 14:16, christoph lockingen wrote:
> Hallo !
> 
> Ich bin auf der Suche nach einer guten PHP Mailing-Liste, am besten in
> Deutsch...Falls ich hier falsch bin, bitte ich um Entschuldigung.
> 
> 
> Problem:
> 
> SESSION-MANAGEMENT
> 
> Achtung!
> !! session.use_cookies=0 !! (und sollen es auch bleiben)
> 
> 1. Wieso kann ich nicht per $_GET['lid'] auf
>$_POST['lid']=lf_session_id();
>zugreifen? (Danach ist ein Header("Location"... drin -> der
> überschreibt?)
> 
> 2. Wie bekomme ich ein vernünftiges Sessionmanagement OHNE COOKIES hin?
> Eingesetzt wird PHP 4.2.2. Bei dieser PHP-Version funktioniert das nicht,
> wie beschrieben. Bug? (scheint so, schonmal nach gegoogled)
> session_start();
> liefert immer neue werte... es wird keine session übernommen.
> 
> 3. Probiert habe ich bereits auch eine CLASS zu schaffen, diese ist jedoch
> nicht global erreichbar (nach Redirect)
> 
> 
> 
> Ich bin für jeden Tipp dankbar, der mich weniger verzweifeln läßt.
> 
> 
> Tausend Dank !
> 
> 
> Christoph Lockingen

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



[PHP] IRC

2003-10-31 Thread Jonathan Villa
Are there any PHP IRC that anyone is aware of?

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


[PHP] Send data Header Response

2003-11-06 Thread Jonathan Villa
I would like submit a form to a page, do some processing on that page,
then if need be, return to the referrer but also send the submitted data
along with it... and data is coming from a POST form, not a GET.  I
tried 

header('location:'.$referrer.'?data'.$_POST); 

or something to that effect...

If I can't do this, what options do I have?

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



Re: [PHP] Send data Header Response

2003-11-06 Thread Jonathan Villa
Thanks... but that is something I wanted to avoid.

If I put each POST var into the url, then it's as if I used a GET method
type...

If I serialize the array and pass it back in the URL, I get 

admin.login.php?data=a%3A3%3A%7Bs%3A8%3A%22username%22%3Bs%3A0%3A%22%22%3Bs%3A3%3A%22pwd%22%3Bs%3A7%3A%22asdfsad%22%3Bs%3A5%3A%22login%22%3Bs%3A5%3A%22login%22%3B%7D

after it's been urlencoded...and it still displays the values of the
fields...


On Thu, 2003-11-06 at 14:17, Chris Shiflett wrote:
> --- Jonathan Villa <[EMAIL PROTECTED]> wrote:
> > I would like submit a form to a page, do some processing on that page,
> > then if need be, return to the referrer but also send the submitted data
> > along with it... and data is coming from a POST form, not a GET.  I
> > tried 
> > 
> > header('location:'.$referrer.'?data'.$_POST); 
> > 
> > or something to that effect...
> > 
> > If I can't do this, what options do I have?
> 
> $_POST is an array. You can serialize it, if you want to send it as one
> variable, or you can send each POST variable as a separate URL variable.
> 
> Hope that helps.
> 
> Chris
> 
> =
> My Blog
>  http://shiflett.org/
> HTTP Developer's Handbook
>  http://httphandbook.org/
> RAMP Training Courses
>  http://www.nyphp.org/ramp

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



Re: [PHP] Send data Header Response

2003-11-06 Thread Jonathan Villa
Thanks, I'll look into that.


On Thu, 2003-11-06 at 14:31, CPT John W. Holmes wrote:
> From: "Jonathan Villa" <[EMAIL PROTECTED]>
> 
> > I would like submit a form to a page, do some processing on that page,
> > then if need be, return to the referrer but also send the submitted data
> > along with it... and data is coming from a POST form, not a GET.  I
> > tried
> >
> > header('location:'.$referrer.'?data'.$_POST);
> 
> Can you send the data back to the referrer as GET data (in the URL)?
> 
> If you must POST it back to the referrer, then you'll need cURL or search
> the archives for a function called posttohost() (not a core php function,
> btw).
> 
> ---John Holmes...

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



[PHP] auto_prepend/append in htaccess....

2003-11-13 Thread Jonathan Villa
I want to prepend a configuration file which is located outside of my
document root into my scripts.  I can use auto_prepend_file, but I'm not
sure how do it with an htaccess file or a virtual host entry.. I would
prefer VHost.

Anyway, this is what I am trying/assuming...


ServerAdmin [EMAIL PROTECTED]
DocumentRoot /var/www/testdomain/www
ServerName testdomain
ErrorLog logs/testdomain-error_log
CustomLog logs/testdomain-access_log combined

auto_prepend_file=header.inc
auto_append_file=footer.inc



Is it possible to append/prepend more than file?  Or would be better
to simply include one file and in that file include the others.

What should the file be relative to?  Or should it be an absolute value?

I know that constants don't work outside of scripts, but I would like to
make this as smooth as possible.

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



Re: [PHP] auto_prepend/append in htaccess....

2003-11-13 Thread Jonathan Villa
Anyone have any ideas on this?

On Thu, 2003-11-13 at 11:32, Jonathan Villa wrote:
> I want to prepend a configuration file which is located outside of my
> document root into my scripts.  I can use auto_prepend_file, but I'm not
> sure how do it with an htaccess file or a virtual host entry.. I would
> prefer VHost.
> 
> Anyway, this is what I am trying/assuming...
> 
> 
> ServerAdmin [EMAIL PROTECTED]
> DocumentRoot /var/www/testdomain/www
> ServerName testdomain
> ErrorLog logs/testdomain-error_log
> CustomLog logs/testdomain-access_log combined
> 
> auto_prepend_file=header.inc
>   auto_append_file=footer.inc
> 
> 
> 
> Is it possible to append/prepend more than file?  Or would be better
> to simply include one file and in that file include the others.
> 
> What should the file be relative to?  Or should it be an absolute value?
> 
> I know that constants don't work outside of scripts, but I would like to
> make this as smooth as possible.

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



Re: [PHP] auto_prepend/append in htaccess....

2003-11-17 Thread Jonathan Villa
Thanks for the info, but I was hoping on getting some information as to
why the code configuration I posted is not working.

On Fri, 2003-11-14 at 03:06, Eugene Lee wrote:
> On Thu, Nov 13, 2003 at 11:32:34AM -0600, Jonathan Villa wrote:
> : 
> : I want to prepend a configuration file which is located outside of my
> : document root into my scripts.  I can use auto_prepend_file, but I'm not
> : sure how do it with an htaccess file or a virtual host entry.. I would
> : prefer VHost.
> : 
> : Anyway, this is what I am trying/assuming...
> : 
> : 
> : ServerAdmin [EMAIL PROTECTED]
> : DocumentRoot /var/www/testdomain/www
> : ServerName testdomain
> : ErrorLog logs/testdomain-error_log
> : CustomLog logs/testdomain-access_log combined
> : 
> : auto_prepend_file=header.inc
> : auto_append_file=footer.inc
> : 
> : 
> : 
> : Is it possible to append/prepend more than file?
> 
> I don't think this is possible with auto_prepend_file.
> 
> : Or would be better
> : to simply include one file and in that file include the others.
> 
> This sounds workable.
> 
> : What should the file be relative to?  Or should it be an absolute value?
> 
> It can be a relative pathname, in which case PHP will search its defined
> include_path.  Absolute pathnames should be okay too.

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



Re: [PHP] auto_prepend/append in htaccess....

2003-11-18 Thread Jonathan Villa
easy enough, thanks!
On Mon, 2003-11-17 at 19:47, Jason Wong wrote:
> On Tuesday 18 November 2003 06:46, Jonathan Villa wrote:
> > Thanks for the info, but I was hoping on getting some information as to
> > why the code configuration I posted is not working.
> 
> Because it's incorrect. Try:
> 
>   php_value auto_prepend_file header.inc
>   php_value auto_append_file footer.inc
> 
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> --
> /*
> May you live in uninteresting times.
>   -- Chinese proverb
> */

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



[PHP] what ever happened to http referrer

2003-11-18 Thread Jonathan Villa
I'm running php 4.3.4 and do not see any mention of HTTP_REFERRER.  I
tried $_SERVER['HTTP_REFERRER'] which is what I thought it was but to no
avail.

Any comments on the location/status of this?

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



Re: [PHP] what ever happened to http referrer

2003-11-18 Thread Jonathan Villa
nevermind...

doh!

On Tue, 2003-11-18 at 14:44, Jonathan Villa wrote:
> I'm running php 4.3.4 and do not see any mention of HTTP_REFERRER.  I
> tried $_SERVER['HTTP_REFERRER'] which is what I thought it was but to no
> avail.
> 
> Any comments on the location/status of this?

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



[PHP] PHP on a Domino Web Server

2003-12-05 Thread Jonathan Villa
Where can I find information on installing/configuring PHP for Domino?

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



RE: [PHP] PHP on a Domino Web Server

2003-12-05 Thread Jonathan Villa
Thanks google ;)

Seriously, I already found that link... I'm looking for something
without Apachejust PHP and Domino...

For anyone else who needs this...

http://www-10.lotus.com/ldd/46dom.nsf/0/b5e04f0dae366e6585256cd200715513?OpenDocument

On Fri, 2003-12-05 at 15:10, Pablo Gosse wrote:
> Jonathan Villa wrote:
> > Where can I find information on installing/configuring PHP for Domino?
> 
> http://www.alise.lv/ALISE/technolog.nsf/0/b2dc72112f3df625c2256dad002e40
> c5?OpenDocument
> 
> It's called Google man.  Use it and love it.

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



[PHP] exec works with some, but not all commands

2004-07-24 Thread Jonathan Villa

why would exec("touch /var/www/testfile.txt") work but not

exec("/usr/bin/gpg --homedir /home/testuser/.gnupg blah blah blah")

the dir used in homedir has mode 777 just for testing


this is the actual command I'm trying to run...
exec("/usr/bin/gpg --homedir /home/testdir/.gnupg --armor --output e.gpg
-e -r uid_someuser sf.txt");

if I run it from the command line, it works fine...


In summary, I'm trying to get a working gpg script going...

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



[PHP] new connection with pg_pconnect

2004-10-14 Thread Jonathan Villa
I'm trying to add some new features to an existing project.  The project
uses pg_pconnect and sets it into a global var...

What I'm trying to do is to create a new database class which connects to
a different database on the same server.  By the time my code gets
reached, the pg_pconnect global var $conn has already been initialized.

When I try :

$dbconn = pg_pconnect("connections vars");

nothing happens...no errors, nothing... as a matter of fact if I do a few
echo "sadfsadf";
echo "cn48c43vc";
or even syntax errors

echo "dsaf"dds;

nothing will happen... no errors are outputted to the screen at
all...(this is not my issue)

I'm assuming that I need to close the persistent connection before I can
open a new one, but from my understanding, persistent connections cannot
be closed...

Is the persistent connection open only to the database in which it was
opened for?  How can I choose a different database?

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



Re: [PHP] Referring Page

2004-10-14 Thread Jonathan Villa

$referrer = $_SERVER['REFFERER'];
something like that...

then you can do something like

if ($referrer == 'whatever')
$sdaf = "whatever";

I usually do something like

if (strpos($referrer,'pagename.php'))
  //execute code


> I am trying to set up a script that will do different things based on
the reffering page, without having to include the information in the
URL. Does
> PHP have a built in variable or function that would tell the rest of the
script what page the user came from?  Any help is much appreciated.
>
> Ben
>
> --
> 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] Referring Page

2004-10-14 Thread Jonathan Villa
>> I am trying to set up a script that will do different things based on
>> the
>> reffering page, without having to include the information in the URL.
>> Does
>> PHP have a built in variable or function that would tell the rest of the
>> script what page the user came from?  Any help is much appreciated.
>
> there is $_SERVER['HTTP_REFERER']
>
> but it is unreliable
>

Can I ask why?

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



Re: [PHP] Referring Page

2004-10-14 Thread Jonathan Villa
Can't be put any more plainly than that, thanks...




> Ben wrote:
>> I am trying to set up a script that will do different things based on
>> the
>> reffering page, without having to include the information in the URL.
>> Does
>> PHP have a built in variable or function that would tell the rest of the
>> script what page the user came from?  Any help is much appreciated.
>>
>> Ben
>>
>
> Ah, in the manual
>
> http://us2.php.net/reserved.variables
>
> Don't rely on it.
>
> --
> John C. Nichel
> ÜberGeek
> KegWorks.com
> 716.856.9675
> [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



Re: [PHP] Referring Page

2004-10-14 Thread Jonathan Villa

*typo

> Jonathan Villa wrote:
>> $referrer = $_SERVER['REFFERER'];
>
> Will return nothing.
>
> $_SERVER['HTTP_REFERER']
>
>
> --
> John C. Nichel
> ÜberGeek
> KegWorks.com
> 716.856.9675
> [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



RE: [PHP] new connection with pg_pconnect

2004-10-14 Thread Jonathan Villa
> [snip]
> I'm trying to add some new features to an existing project.  The project
> uses pg_pconnect and sets it into a global var...
>
> What I'm trying to do is to create a new database class which connects
> to a different database on the same server.  By the time my code gets
> reached, the pg_pconnect global var $conn has already been initialized.
>
> ...
>
> Is the persistent connection open only to the database in which it was
> opened for?  How can I choose a different database?
> [/snip]
>
> Yes, a persistent connection will only be used when all the connection
> parameters are the same.  Ergo a new database requires a new connection.
>
> That said, I would also like to point out that there is a bug which can
> be found with php and persistent postgres connections.
>
> http://bugs.php.net/bug.php?id=25404
>
> The solution is to use non-persistent connections.
>
> I'd had a problem over the past few months wherein users of my CMS were
> getting logged out for no reason, and yesterday I was finally able to
> trace it to this.
>
> Switched to non-persistent connections and not one error has occurred
> since, so this might be something to keep in mind.
>
> Cheers and HTH,
>
> Pablo
>

thanks for help...

I mentioned something in my original post, and it seems that it is a
problem...

there's the structure of my page

app-config.inc is prepended via apache
within app-config.inc there is a another file included which does the
initial persistent db calls and such.

I then have the page main.php which has

'.$dbconn.'<-';
?>

the scripts just dies whenever I include the pg_connect function... if I
change

echo '->'.$dbconn.'<-';
to
echo '->==='.$dbconn.'<-';

I'll still see -><- on my page
if I remove the pg_connect function, I'll see
->===<-;

Basically, no changes to the page take effect when I have the pg_connect
function in place... it just dies or something...

here are the versions  of php, apache, and postgresql I'm running...

Server: Red Hat Linux Advanced Server release 2.1AS
php-pgsql-4.1.2-2.1.6
php-manual-4.1.2-2.1.6
asp2php-gtk-0.75.17-1
php-mysql-4.1.2-2.1.6
php-devel-4.1.2-2.1.6
php-imap-4.1.2-2.1.6
php-odbc-4.1.2-2.1.6
php-ldap-4.1.2-2.1.6
asp2php-0.75.17-1
php-4.1.2-2.1.6
apacheconf-0.8.1-1
apache-manual-1.3.27-6.ent
apache-1.3.27-6.ent
apache-devel-1.3.27-6.ent
postgresql-python-7.1.3-5.rhel2.1AS
postgresql-tcl-7.1.3-5.rhel2.1AS
postgresql-server-7.1.3-5.rhel2.1AS
postgresql-libs-7.1.3-5.rhel2.1AS
postgresql-devel-7.1.3-5.rhel2.1AS
postgresql-contrib-7.1.3-5.rhel2.1AS
postgresql-jdbc-7.1.3-5.rhel2.1AS
postgresql-tk-7.1.3-5.rhel2.1AS
postgresql-7.1.3-5.rhel2.1AS
postgresql-perl-7.1.3-5.rhel2.1AS
postgresql-docs-7.1.3-5.rhel2.1AS
postgresql-odbc-7.1.3-5.rhel2.1AS

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



RE: [PHP] new connection with pg_pconnect

2004-10-19 Thread Jonathan Villa
> [snip]
> I then have the page main.php which has
>
>  global $sys_dbhost,$sys_dbuser,$sys_dbpasswd;
> $dbconn = pg_connect("user=$sys_dbuser dbname=bisprojects
> host=$sys_dbhost password=$sys_dbpasswd"); echo '->'.$dbconn.'<-'; ?>
>
> the scripts just dies whenever I include the pg_connect function... if I
> change
>
> echo '->'.$dbconn.'<-';
> to
> echo '->==='.$dbconn.'<-';
>
> I'll still see -><- on my page
> if I remove the pg_connect function, I'll see
> ->===<-;
>
> Basically, no changes to the page take effect when I have the pg_connect
> function in place... it just dies or something...
> [/snip]
>
> Hmmm, strange.
>
> I used your code, exactly as it is above (but with my username,
> password, db and server info) and it works fine.
>
> Check your error logs and see if there's anything showing up there and
> let us know what you find.
>
> Pablo
>


Thanks for the reply... I checked apache's error logs and it's given a
Segmentation fault when trying to connect

[Tue Oct 19 14:11:29 2004] [notice] child pid 28586 exit signal
Segmentation fault (11)

Just to recap, I already have an existing pg_pconnect[ion] open and am
trying to open a new one...

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



[PHP] Yahoo and PHP

2004-05-14 Thread Jonathan Villa

I was reading the following article

http://www.linux.com/article.pl?sid=04/05/12/1327217

and it says

"Yahoo, of course, makes heavy use of MySQL, and not only do Yahoo
developers code in PHP, they even hired PHP's creator, Rasmus Lerdorf. "

I was wondering if anyone had some information to further substantiate
this...(reply from Rasmus would be great :)  )

I was aware that Yahoo was using PHP for some sites such as
freedom.yahoo.com after 9/11, but how much more do they do with PHP?

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



[PHP] Array Losing value

2004-07-19 Thread Jonathan Villa


I have a class called DBI which handles all of my database calls.  One
method called Fetch_Array simply has

return mysql_fetch_assoc($resultID)

It's losing it's value when I try to pass the val to another var

example

class BaseItem
{
 function getBaseItems()
 {
 return $objDBI->Fetch_Array($objDBI->getResultID());
 }
}

on my page I want to be able to do this

while($rows=$objBaseItem->getBaseItems())
{
  output HTML;
}

if I die(sizeof($objDBI->Fetch_Array($objDBI->getResultID( within the
DBI method, it return the correct value, however if I do

$retval = $objDBI->Fetch_Array($objDBI->getResultID());
die(sizeof($retVal));

it returns 0.

why does it lose it's value?  What can I do to retain the value.

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



Re: [PHP] Re: Array Losing value

2004-07-20 Thread Jonathan Villa
>>
>> if I die(sizeof($objDBI->Fetch_Array($objDBI->getResultID( within
>> the
>> DBI method, it return the correct value, however if I do
>>
>> $retval = $objDBI->Fetch_Array($objDBI->getResultID());
>> die(sizeof($retVal));
>
> $retval != $retVal
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


that was a typo...  the real code has both $retVal

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



Re: [PHP] Re: Array Losing value

2004-07-20 Thread Jonathan Villa
nevermind, I found a work around for it...

I still would like to know why the value is lost.

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



[PHP] Segmentation Fault in Apache b/cuz of PHP

2004-02-04 Thread Jonathan Villa
Looks like PHP is causing a segmentation fault in Apache.  Why do I
think this?  Well because it only happens with the PHP pages and my
httpd error logs only show entries when PHP page are accessed..

I have RPM installations of Apache (1.3.27) and PHP (4.1.2) on a RedHat
7.1 server.

Any ideas on how to fix this?

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



[PHP] Passing array from class to class produces more than one result...

2004-03-10 Thread Jonathan Villa
I'm writing a DBI class with the following function

function Select($sql)
{
$this->setResultID(@mysql_query($sql,$this->getDBConn()));
if ($this->getResultID() == false)
Error::fatalError(__FILE__.' ('.__LINE__.') : Unable to run query :
'.mysql_error().'('.mysql_errno().')');

$this->setNumRows(@mysql_num_rows($this->getResultID()));
$this->setArray(@mysql_fetch_array($this->getResultID()));
}


When I call this, I want to be able to run

while($data = $objDBI->FetchArray)
{
echo $data['username'];
}

but the results I get are

jvillajvillajvillajvillajvillajvillajvillajvillajvillajvillajvillajvillaetc

my $sql query is simple

SELECT username FROM staff;

and there are four rows in the db...


For some reason, I can't pass the value of mysql_fetch_array out of the
Select function.

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



RE: [PHP] Dumb

2004-03-11 Thread Jonathan Villa

Go to rpmfind.net and see if you find one...

Or see if you uninstall all the mysql RPMs and use the ones from
mysql.com/downloads.  They also have an RPM client.

-Original Message-
From: PHP [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 11, 2004 1:32 PM
To: php
Subject: [PHP] Dumb

Hi,
I have a dum question.

I recently picked up a new RH9 dedicated server. Apache 2, Mysql 3 and php4
are all installed , via rpm I am assuming.

I upgraded mysql to version 4, however, php is still using the version 3
client. (from php_info)

How do I get php4 to use the mysql4 client?

I would like to know if this is possible just using rpms.  I could do it
re-compiling everything myself, but I kind of want to stick to the rpm style
installation on this server if possible.

Thanks for any help.

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



[PHP] Get form name after submission

2004-03-18 Thread Jonathan Villa
Is there a way to get the name of the form once it's submitted

like $_POST['form1'] or something.

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



Re: [PHP] Get form name after submission

2004-03-18 Thread Jonathan Villa

I ended up using a hidden field to pass the value of the form.

Thanks for the replies.


On Thu, 2004-03-18 at 12:21, Robert Cummings wrote:
> On Thu, 2004-03-18 at 12:24, Jonathan Villa wrote:
> > Is there a way to get the name of the form once it's submitted
> > 
> > like $_POST['form1'] or something.
> 
> Include a hidden field with the name of the form for it's value.
> 
> Cheers,
> Rob.
> -- 
> ..
> | InterJinn Application Framework - http://www.interjinn.com |
> ::
> | An application and templating framework for PHP. Boasting  |
> | a powerful, scalable system for accessing system services  |
> | such as forms, properties, sessions, and caches. InterJinn |
> | also provides an extremely flexible architecture for   |
> | creating re-usable components quickly and easily.  |
> `'

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



[PHP] Retain form values...

2004-03-18 Thread Jonathan Villa
I want to be able to submit the page to another page vs PHP_SELF.  On
that page I want to be able to validate the form, and if it fails,
return the user to the previous page.  Now that's easy, but the catch is
that I want to retain/repopulate their field values.  

I was thinking of forcing a history.back if possible, but would rather
use some server side code.  I tried researching what can be done with
sending headers, but I don't want to use a GET method.  I want to use
POST.

thoughts?

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



[PHP] Mail sending from nobody to nobody...

2004-04-05 Thread Jonathan Villa
For some reason mail is being sent from nobody to nobody every time.  I
have tried hardcoding the sendmail path, which is the default anyway,
and it still doesn't work?  

Has anyone encountered this before?

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



Re: [PHP] Mail sending from nobody to nobody...

2004-04-05 Thread Jonathan Villa
$from = "From: ".$email."\n";
$from .= "Reply-to: ".$email."\n";
$message = "The following person has been added to the Mailing
List.\n\n";
$message .= $name." (".$email.") from ".$city." has been added to the
mailing list.";

if(mail("[EMAIL PROTECTED]","Added To Mailing
List",stripslashes($message),$from) == false)
die('failed');


On Mon, 2004-04-05 at 02:13, hitek wrote:
> Details?
> How are you calling the mail function?
> 
> At 11:59 PM 4/4/2004, Jonathan Villa wrote:
> >For some reason mail is being sent from nobody to nobody every time.  I
> >have tried hardcoding the sendmail path, which is the default anyway,
> >and it still doesn't work?
> >
> >Has anyone encountered this before?
> >
> >--
> >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] unable to use vars in foreach

2004-11-14 Thread Jonathan Villa
I'm using PHP 5.0.2

Here is a snippet of my code

$post=$_POST;//this is actually happening in an include somewhere else and
autoprepended.  Works just fine.

$modules = simplexml_load_file(MODULES);

foreach ($modules->module as $mod) {
echo $mod->postName.'';
if (isset($post[$mod->postName])) {
die('in post');

.

echo-ing the postName works just fine, but when I get to the checking
whether or not the val is set, I get the error:

Warning: Illegal offset type in unset in /var/www/.

If I replace $post[$mod->postName] with a hardcoded val, it works

$post['news']

The values of $mod->postName are names of checkboxes.

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



Re: [PHP] unable to use vars in foreach [updated question]

2004-11-14 Thread Jonathan Villa
So, searching php.net (I swear I did before...)

I found this at http://us2.php.net/language.types.array

" You cannot use arrays or objects as keys. Doing so will result in a
warning: Illegal offset type."

Neverthought that my var was an object, just thought maybe a string.  My
new question is, how can I convert this object to a string?  Or get the
val of it

Here is my XML


news
News : Add
   news.add.php
   Add

News : Current
   news.current.php
   Current

News : Archived
   news.archived.php
   Archived



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



Re: [PHP] unable to use vars in foreach

2004-11-14 Thread Jonathan Villa
>
> On Sunday, November 14, 2004, at 08:24PM, Jonathan Villa <[EMAIL PROTECTED]>
> wrote:
>>
>>$modules = simplexml_load_file(MODULES);
>>
>
> Are you certain that MODULES has been defined()? And what do you get when
> you print_r($modules)?
>
> -ryan
>

Yes MODULES is defined.  It's defined in an include file.  In my loop,
when I echo the $mod->postName the values print just fine.  My issue is in
the conditional.

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



Re: [PHP] unable to use vars in foreach

2004-11-14 Thread Jonathan Villa

ah yes thanks both worked...

I had written a function to this... I knew there had to be a much easier
way!!!

>
> On Sunday, November 14, 2004, at 08:36PM, Jonathan Villa <[EMAIL PROTECTED]>
> wrote:
>
>>>
>>> On Sunday, November 14, 2004, at 08:24PM, Jonathan Villa
>>> <[EMAIL PROTECTED]>
>>> wrote:
>>>>
>>>>$modules = simplexml_load_file(MODULES);
>>>>
>>>
>>> Are you certain that MODULES has been defined()? And what do you get
>>> when
>>> you print_r($modules)?
>>>
>>> -ryan
>>>
>>
>>Yes MODULES is defined.  It's defined in an include file.  In my loop,
>>when I echo the $mod->postName the values print just fine.  My issue is
>> in
>>the conditional.
>
> AHA!
>
> Here's what I think's going on (sorry I don't have time to investigate it
> myself)
>
> $mod->postName is a simplexml object.  Due to some php5 magic, when used
> it a situation that calls for a string (like echo $xmlobj), it echos the
> proper value. However, when using it as an array subscript does not appear
> to qualify as this situation. To solve this try either:
>
> $post[(string)$xmlobj]
> OR
> $post[strval($xmlobj)]
>
> I hope this is clear and helpful.
>
> -ryan
>

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



Re: [PHP] PHP vs. ColdFusion

2005-06-26 Thread Jonathan Villa
Take a look at these, they are just some of the articles I've bookmarked
over the past

Oracle is now behind (well in support of) PHP
http://www.oracle.com/technology/tech/php/index.html

IBM is also behind PHP (well in support of)
http://www-128.ibm.com/developerworks/websphere/techjournal/0505_krook/0505_krook.html
http://www-306.ibm.com/software/data/info/zendcore/pr.html

Microsoft looks to extenguish LAMP
http://news.com.com/Microsoft+looks+to+extinguish
+LAMP/2100-1012_3-5746549.html

Misc:
http://www.robertpeake.com/archives/66-Why-PHP.html
http://news.com.com/2061-10795_3-5663085.html

To be fair:
http://www.zdnet.com.au/news/software/0,261733,39193420,00.htm

If you're org decides to go PHP... there are all kinds of OpenSource
tools they can choose use which they can enhance for their
organization's specific needs

GForge
Mambo CMS
SugarCRM
and more...

GForge and SugarCRM also have paid support options as well.

-Jonathan Villa



On Mon, 2005-06-27 at 00:14 +0200, Jochem Maas wrote:
> Rick Emery wrote:
> > My employer has (finally) decided to take full advantage of our 
> > intranet, and wants to move from client-server applications to web-based 
> > applications. To that end, we're trying to determine the best platform 
> > for our applications. We're a Microsoft shop, with Microsoft SQL Server 
> > 2000 for all of our databases (that won't change any time soon, if 
> 
> what is special about the MSSQL2K servers? do you have a lot of stored
> procedures in it? stuff like that?
> 
> > ever). Due to past experience that I won't get into, we (the Development 
> > group) have all agreed that ASP.Net is out (at least for the short term).
> > 
> 
> if the MSSQL servers are so important/complex/big/etc then maybe ASP.not
> is the right way to go? given that moving 'everything' from
> client-server to web-baseed interfaces isn't really a short-term
> operation. (assuming some level of complexity in the existing software.)
> 
> > We had the opportunity to visit a local enterprise that has deployed 
> > ColdFusion, and they couldn't stop singing its praises. I'm partial to 
> > PHP, even after sampling Coldfusion, so what I would like is some 
> > "ammunition" that I can take into a meeting to "sell" management on PHP 
> > instead of ColdFusion. I've already been harping on the difference in 
> > cost, so I'm looking for other points to go with. Besides, we'll 
> > probably invest in Zend products if we choose PHP, and Macromedia has 
> 
> like marcromedia tools are required to run CF, they 'tie you in' to
> the technology. buying Zend products is optional, if the Zend IDE is judge to
> be a moneysaving tool for working with PHP then you buy it. But you
> don't have to. the essential tools are with out cost and open to inspection
> and modification. Purchasing Zend Accelerator/Encoder maybe a good move
> for you company but again its not a requirement.
> 
> from a strategic point of view it might also not be wise to make a
> substanstial investment in technology from a company thats just been
> bought out by the competion (adobe)?
> 
> > government rates available; I don't have any numbers (yet), but the cost 
> > difference may not be that great in the end.
> > 
> > Any input would be greatly appreciated. Opinions are welcome (especially 
> > from programmers with experience in both), but I have to "sell" it to 
> > management (I'm already on the PHP side), so links to data or articles 
> > comparing the two are best.
> > 
> > Thanks in advance,
> > Rick

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