[PHP-DB] seg fault in 4.3.5 and 4.3.2

2004-04-13 Thread Sean Walton
I am trying to recompile PHP to include several features that --to my
knowledge-- are not normally part of Linux distros.  However, when I
provide the following configuration, I get a binary that seg-faults in
4.3.5 and 4.3.2:
./configure --with-apxs --with-mysql=/usr --with-gd --with-ttf
--with-zlib --with-zlib-dir=/usr/local --disable-debug --with-imap
--with-xml --with-kerberos --with-curl=/usr/local --with-openssl
--with-pfpro=/usr/local --with-mnogosearch
I need to add one additional module to the compile (--with-mssql), but
the above configuration is our primary need.
Can anyone please explain how to get this working?

-Sean Walton

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


Re: [PHP-DB] Curious if include_once will work better than include

2004-04-13 Thread Mikhail U. Petrov
Hi!
Include_once can't include one file several times.
I think if you use include_once PHP see if that file already were
included, and don't include it one more time...
Maybe difference is time to check this...

I don't trust this fact:
KR Now will that speed things up compared to just using a plain include. I call 
$connectionSDWIS(which is in the include) 5 different times?
-- 
Best regards,
Mikhail U. Petrov
mailto:[EMAIL PROTECTED]



Tuesday, April 13, 2004, 7:52:10 PM, Karen wrote:

KR Curious about include_once versus include.
 
KR All my connection stuff is in conn.php3.
 
KR I am planning on including it at the top of the page like this:
KR include_once conn.php3;
 
KR Now will that speed things up compared to just using a plain include. I call 
$connectionSDWIS(which is in the include) 5 different times?
 
KR $data = odbc_do($connectionSDWIS,EXEC sp_SanitarySurveyLatest '$pwsno');
KR $data = odbc_do($connectionSDWIS, Select Distinct CASE ActivityStatus WHEN 'A' 
THEN 'ACTIVE' WHEN 'I' THEN 'INACTIVE' END + ' ' + CASE Convert(varchar,ActDate,107) 
WHEN 'May 05, 1955' THEN ''
KR ELSE Convert(varchar,ActDate,107) END As 'ActivityStatus' FROM Inventory Where 
PWSID='$pwsno'); 
KR $data2 = odbc_do($connectionSDWIS,Exec sp_EntryPointsWithSourcesAndPWS '$pwsno');
KR $data=odbc_do($connectionSDWIS,SELECT StateID, WSFName, TreatmentProcess, 
TreatmentObjective FROM Treatments WHERE PWS= '$pwsno' ORDER BY StateID);
KR $data = odbc_do($connectionSDWIS, SELECT CalendarYear, 
convert(varchar(12),ReceivedDate, 107), convert(varchar(12),CertifiedDate, 107) FROM 
CCRS WHERE PWS='$pwsno' ORDER BY CalendarYear Desc);


KR -
KR Do you Yahoo!?
KR Yahoo! Small Business $15K Web Design Giveaway - Enter today

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



Re: [PHP-DB] Curious if include_once will work better than include

2004-04-13 Thread Eric Girard
 Curious about include_once versus include.

 All my connection stuff is in conn.php3.

 I am planning on including it at the top of the page like this:
 include_once conn.php3;

 Now will that speed things up compared to just using a plain include. I
 call $connectionSDWIS(which is in the include) 5 different times?

IMHO the 'speed' difference between include and include_once will be
slight, probably with include_once being slower because of the overhead
needed to keep track of which files have been included already.  But this
isn't really what the question is about.  include and include_once will
not magically optimize the code for you, but if you include the same file
20 times that will be more that has to be parsed needlessly, so if you
can't keep track of your includes or if including a particular file more
than once will alter the result, than use include_once. Another
alternative is to use require() or require_once() to make sure that the
file is included.   Just my $.02,

Eric

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



RE: Re[2]: [PHP-DB] Curious if include_once will work better than include

2004-04-13 Thread Hutchins, Richard
After a 2-second search of the PHP manual...

require() and include() are identical in every way except how they handle
failure. include() produces a Warning while require() results in a Fatal
Error. In other words, don't hesitate to use require() if you want a missing
file to halt processing of the page. include() does not behave this way, the
script will continue regardless. Be sure to have an appropriate include_path
setting as well.

And..

The include_once() statement includes and evaluates the specified file
during the execution of the script. This is a behavior similar to the
include() statement, with the only difference being that if the code from a
file has already been included, it will not be included again. As the name
suggests, it will be included just once.



 -Original Message-
 From: Mikhail U. Petrov [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 13, 2004 2:07 PM
 To: Eric Girard
 Cc: Karen Resplendo; [EMAIL PROTECTED]
 Subject: Re[2]: [PHP-DB] Curious if include_once will work better than
 include
 
 
 Hi!
 Sorry for my offtopic, but by the way,
 what's the difference between include/include_once and
 require/require_once?
 
 
 Tuesday, April 13, 2004, 10:29:14 PM, Eric wrote:
 
  Curious about include_once versus include.
 
  All my connection stuff is in conn.php3.
 
  I am planning on including it at the top of the page like this:
  include_once conn.php3;
 
  Now will that speed things up compared to just using a 
 plain include. I
  call $connectionSDWIS(which is in the include) 5 different times?
 
 EG IMHO the 'speed' difference between include and 
 include_once will be
 EG slight, probably with include_once being slower because 
 of the overhead
 EG needed to keep track of which files have been included 
 already.  But this
 EG isn't really what the question is about.  include and 
 include_once will
 EG not magically optimize the code for you, but if you 
 include the same file
 EG 20 times that will be more that has to be parsed 
 needlessly, so if you
 EG can't keep track of your includes or if including a 
 particular file more
 EG than once will alter the result, than use include_once. Another
 EG alternative is to use require() or require_once() to make 
 sure that the
 EG file is included.   Just my $.02,
 
 EG Eric
 
 
 
 -- 
 Best regards,
 Mikhail U. Petrov
 mailto:[EMAIL PROTECTED]
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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



[PHP-DB] DB and mssql

2004-04-13 Thread Matt Matijevich
I am using PEAR::DB on linux, php 4.3.2, with freetds to access a sql
server database.  I am trying to get more information on the problem,
but everyonece in a while, it seems random, php will stop executing when
I use the query method, php stops executing.  I dont get an error, php
just stops running.  I can echo out things before the query call but not
after.

The query that is running can return large result sets,on the high end
it will return 1 - 15000 rows.

I am am sql server novice so I am not sure where to start looking to
see if the problem is db server side.

I am just wondering if anyone has had this kind of problem before.  I
am not sure if it is something going on with PEAR::DB or if something is
happening with the native php calls to sql server.

I have not tried to do the query without using pear::db, but I am going
to try that to see if I can get the script to error out that way.

Thanks in advance.

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



[PHP-DB] Dynamic Form?

2004-04-13 Thread Aaron Wolski
Hi All,

I've been given the task of developing a dynamic form for a client.

When I say dynamic, I mean dynamic in that the client can use an
administrative interface (back-end) to create the various form fields
(and types) that get displayed on the front-end.

Before I start brainstorming the DB and programming requirements, I'd
take a stab to see if anyone knows of open source software that might do
what I am looking for? Wheel reinvention is not high on my task list.

Thanks so much!

Aaron

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



[PHP-DB] Re: Dynamic Form?

2004-04-13 Thread Justin Patrin
Aaron Wolski wrote:

Hi All,

I've been given the task of developing a dynamic form for a client.

When I say dynamic, I mean dynamic in that the client can use an
administrative interface (back-end) to create the various form fields
(and types) that get displayed on the front-end.
Before I start brainstorming the DB and programming requirements, I'd
take a stab to see if anyone knows of open source software that might do
what I am looking for? Wheel reinvention is not high on my task list.
Thanks so much!

Aaron
Well, this isn't completely what you want, but it will probably help you 
quite a bit for form displayingg:
http://pear.php.net/package/HTML_QuickForm

--
paperCrane Justin Patrin
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: Dynamic Form?

2004-04-13 Thread Manuel Lemos
Hello,

On 04/13/2004 05:25 PM, Aaron Wolski wrote:
I've been given the task of developing a dynamic form for a client.

When I say dynamic, I mean dynamic in that the client can use an
administrative interface (back-end) to create the various form fields
(and types) that get displayed on the front-end.
Before I start brainstorming the DB and programming requirements, I'd
take a stab to see if anyone knows of open source software that might do
what I am looking for? Wheel reinvention is not high on my task list.
You may want to try this popular forms generation and validation class. 
You can use it with plain HTML templates or integrate with Smarty 
templates as it comes with a specific plug-in:

http://www.phpclasses.org/formsgeneration

--

Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] DB and mssql

2004-04-13 Thread Robert Twitty
Hi Matt

Before sending the result set, the mssql extension stores the entire
result set into memory.  However, PHP limits the amount of memory that
can be allocated by a script to 8MB.  So, the query will fail if the
result set is larger than 8MB.  You can change this value in php.ini with
the memory_limit parameter. So, try increasing it and see if it solves the
problem.

-- bob

On Tue, 13 Apr 2004, Matt Matijevich wrote:

 I am using PEAR::DB on linux, php 4.3.2, with freetds to access a sql
 server database.  I am trying to get more information on the problem,
 but everyonece in a while, it seems random, php will stop executing when
 I use the query method, php stops executing.  I dont get an error, php
 just stops running.  I can echo out things before the query call but not
 after.

 The query that is running can return large result sets,on the high end
 it will return 1 - 15000 rows.

 I am am sql server novice so I am not sure where to start looking to
 see if the problem is db server side.

 I am just wondering if anyone has had this kind of problem before.  I
 am not sure if it is something going on with PEAR::DB or if something is
 happening with the native php calls to sql server.

 I have not tried to do the query without using pear::db, but I am going
 to try that to see if I can get the script to error out that way.

 Thanks in advance.

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



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



[PHP-DB] Pass database id through href

2004-04-13 Thread Gavin Amm
Hi.

I want to update mysql database with parent value of page.
I have several fields in my form.
I have a generated map of web site pages as hyperlinks at end of form.
(generated recursively)
I want to be able to click on hyperlink  have it pass the parent
value to the next PHP script.

The point of this is to select the parent page of the new/modified
page


EXAMPLE:
(I know you can't use value with the a tag, but bear with me for
illustration purposes in this pseudo-code)


form name=theForm

input type=text name=title
!-- etc with the fields --

input type=text name=formInput
a href=javascript:document.theForm.submit(); name=parent
value=23Auditing Home/a
a href=javascript:document.theForm.submit(); name=parent
value=17Finance Home/a
a href=javascript:document.theForm.submit(); name=parent
value=122Planning Home/a
a href=javascript:document.theForm.submit(); name=parent
value=231Tax Home/a

/form


When the admin clicks on one of the parent hyperlinks, the form is
submitted with (in this example) (say they click on the Tax Home link)
the values:
  $title == [whatever the user types into the text field]
  $parent == 231

How do I get this $parent value from the html page??

Any help would be appreciated.

Regards,
Gav

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



Re: [PHP-DB] Pass database id through href

2004-04-13 Thread John W. Holmes
Gavin Amm wrote:

EXAMPLE:
(I know you can't use value with the a tag, but bear with me for
illustration purposes in this pseudo-code)
form name=theForm

input type=text name=title
!-- etc with the fields --
input type=text name=formInput
a href=javascript:document.theForm.submit(); name=parent
value=23Auditing Home/a
a href=javascript:document.theForm.submit(); name=parent
value=17Finance Home/a
a href=javascript:document.theForm.submit(); name=parent
value=122Planning Home/a
a href=javascript:document.theForm.submit(); name=parent
value=231Tax Home/a
/form

When the admin clicks on one of the parent hyperlinks, the form is
submitted with (in this example) (say they click on the Tax Home link)
the values:
  $title == [whatever the user types into the text field]
  $parent == 231
How do I get this $parent value from the html page??
Instead of calling theForm.submit(), all another function that sets a 
form variable before submitting the form.

a href=javascript:mysubmit(231);Tax Home/a

script
function mysubmit(var)
{
  document.theForm.parent.value = var;
  document.theForm.submit();
}
/script
parent might be a reserved word, so watch out for that. I'm no JS wiz, 
but I think that's something along the lines of what you want to do. You 
basically use JS to add a form element based upon what link was clicked.

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

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

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