Re: [PHP] Anyone good with multiple SSL on Apache?

2010-03-08 Thread Frank M. Kromann

Not that I know of.

- Frank

On 3/8/10 2:21 PM, Skip Evans wrote:

D'oh!

...and I suppose there is just no way around that, eh?

Skip

Frank M. Kromann wrote:
You can only have one SSL per IP address. The SSL connection between 
the client and server is done before the host header name is made 
available to Apache.


- Frank

On 3/8/10 2:13 PM, Skip Evans wrote:

Hey all,

I have an Apache virtual config running a bunch of sites, one with 
SSL. I finally have a need to add SSL to one more, but when I do the 
first one (which is further down the file) comes up "untrusted".


Since this is pretty far off topic I'd be obliged if someone who has 
configured this before can email me off list for some assistance.


Much thanks!
Skip



--

Frank M. Kromann, M.Sc.E.E.

Web by Pixel, Inc.


Phone: +1 949 742 7533

Cell: +1 949 702 1794

Denmark: +45 88 33 64 80





--

Frank M. Kromann, M.Sc.E.E.

Web by Pixel, Inc.


Phone: +1 949 742 7533

Cell: +1 949 702 1794

Denmark: +45 88 33 64 80



Re: [PHP] Anyone good with multiple SSL on Apache?

2010-03-08 Thread Frank M. Kromann
You can only have one SSL per IP address. The SSL connection between the 
client and server is done before the host header name is made available 
to Apache.


- Frank

On 3/8/10 2:13 PM, Skip Evans wrote:

Hey all,

I have an Apache virtual config running a bunch of sites, one with 
SSL. I finally have a need to add SSL to one more, but when I do the 
first one (which is further down the file) comes up "untrusted".


Since this is pretty far off topic I'd be obliged if someone who has 
configured this before can email me off list for some assistance.


Much thanks!
Skip



--

Frank M. Kromann, M.Sc.E.E.

Web by Pixel, Inc.


Phone: +1 949 742 7533

Cell: +1 949 702 1794

Denmark: +45 88 33 64 80



Re: Fwd: [PHP] PDO mssql + multiple rowsets

2007-04-04 Thread Frank M. Kromann
Support for multiple result sets will be added as soon as I (or someone
else) get the time to do so.

- Frank

> I've seen there's an open bug on the missing feature I pointed out in
my
> first email, but it's even not assigned and I cannot get an answer from
the
> developer... so... does anybody know if there is any plan to finish the
> PDO-dblib driver?
> 
> TIA
> 
> 
> -- Forwarded message --
> From: Javier Ruiz <[EMAIL PROTECTED]>
> Date: Apr 2, 2007 9:54 AM
> Subject: Re: [PHP] PDO mssql + multiple rowsets
> To: "Frank M. Kromann" <[EMAIL PROTECTED]>,

> 
> Hi again. Sorry I was out of my city during the weekend and had no
> connection available...
> 
> So Frank, please lemme know, is the feature (multiple rowsets) planned
to be
> included in the pdo-dblib driver? I would like to know to include or not
pdo
> in my development needs against mssql.
> 
> Thanks, greetings!
> 
> 
> On 3/29/07, Frank M. Kromann <[EMAIL PROTECTED]> wrote:
> >
> > It Is doable. The native mssql/dblib extension does support that
features.
> > I just have'nt had the time to code it for pdo_dblib.
> >
> > - Frank
> >
> > > I too have been having problems getting the PDO dblib for mssql to
play
> > > well (getting the same error actually).  If you find a reason or
work
> > > around for it I would appreciate hearing about it.  Thinking of
going
> > > the odbc route myself if I can't get it to work.
> > >
> > >
> > > Respectfully,
> > > Ligaya Turmelle
> > >
> > > -Original Message-
> > > From: Javier Ruiz [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, March 28, 2007 8:21 PM
> > > To: php-general@lists.php.net
> > > Subject: [PHP] PDO mssql + multiple rowsets
> > >
> > > Hi!
> > >
> > > I want to use PDO in my apps for connecting to several RDBSs, one
of
> > > them, sql server 2000 and 2005. I tried to use as DSN something
like
> > > "mssql:..."
> > > (as I've seen in the php manual pages) but I get a PDOException
with
> > the
> > > message "Unable to open PDO connection [wrapped: could not find
> > > driver]". I can work well with the mssql built-in functions (like
> > > mssql_connect, mssql_query and so on...) and even I can almost work
> > > perfectly using in my dsn "dblib:...".
> > > So first question: is the PDO's driver "mssql" deprecated or is it
me
> > > doing something wrong in the PHP installation?
> > > BTW, I use php-5.2.1
> > >
> > > In case that the answer to the first question is that "mssql" is no
> > more
> > > used as a PDO driver, I have a problem... I have stored procedures
in
> > > sql server that return multiple rowsets, I've seen that PDO offers
> > > functionability to manage this, but not for the dblib driver... if
I
> > try
> > > to use the $stmt->nextRowSet() method, I get an exception like
"Driver
> > > does not support this function: driver does not support multiple
> > > rowsets"
> > > What can I do then to work with my stored procs?
> > >
> > > Thanks in advance
> > >
> > > --
> > > 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] PDO mssql + multiple rowsets

2007-03-28 Thread Frank M. Kromann
It Is doable. The native mssql/dblib extension does support that features.
I just have'nt had the time to code it for pdo_dblib.

- Frank

> I too have been having problems getting the PDO dblib for mssql to play
> well (getting the same error actually).  If you find a reason or work
> around for it I would appreciate hearing about it.  Thinking of going
> the odbc route myself if I can't get it to work.
> 
> 
> Respectfully,
> Ligaya Turmelle
> 
> -Original Message-
> From: Javier Ruiz [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 28, 2007 8:21 PM
> To: php-general@lists.php.net
> Subject: [PHP] PDO mssql + multiple rowsets
> 
> Hi!
> 
> I want to use PDO in my apps for connecting to several RDBSs, one of
> them, sql server 2000 and 2005. I tried to use as DSN something like
> "mssql:..."
> (as I've seen in the php manual pages) but I get a PDOException with
the
> message "Unable to open PDO connection [wrapped: could not find
> driver]". I can work well with the mssql built-in functions (like
> mssql_connect, mssql_query and so on...) and even I can almost work
> perfectly using in my dsn "dblib:...".
> So first question: is the PDO's driver "mssql" deprecated or is it me
> doing something wrong in the PHP installation?
> BTW, I use php-5.2.1
> 
> In case that the answer to the first question is that "mssql" is no
more
> used as a PDO driver, I have a problem... I have stored procedures in
> sql server that return multiple rowsets, I've seen that PDO offers
> functionability to manage this, but not for the dblib driver... if I
try
> to use the $stmt->nextRowSet() method, I get an exception like "Driver
> does not support this function: driver does not support multiple
> rowsets"
> What can I do then to work with my stored procs?
> 
> Thanks in advance
> 
> --
> 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] Re: Classes in PHP5 || Puzzling Problem || Trying to Set $this->$name = $value

2007-03-08 Thread Frank M. Kromann
Sounds like a PHP version problem. PHP 4 will output 0 and PHP 5 will give
1. The constructor must be named the same as the class name in PHP 4 for
this to work.

You can have both constructors in your class so it will work in both
versions.

- Frank

> I don't know the details of your app, but you might want to reconsider a
resdesign.  
> 
> Having said that, your code actually works for me.  If I use your class
as is, foo is 1.  That is:
> 
> $x = new test;
> echo $x->foo;
> 
> outputs 1.  Isn't that what you want?
> 
> 
> 
> Regards,
> 
> Bruce
> 
> >>> "PHP" <[EMAIL PROTECTED]> 9/03/2007 6:10:49 p.m. >>>
> Hey all.
> 
> Problem:
> 
> Class test {
> 
> var $foo = 0;
> 
> function __construct() {
> $this->myfunc("foo", 1);
> }
> 
> function myfunc($name, $val) {
> $this->$name = $val;
> }
> }
> 
> Now, PHP correctly evaluates $this->$name as 0; i.e. the default
property 
> value of $this->foo.
> 
> However, what I really need to have happen is for $this->$name = $val to
be 
> evaluated as $this->foo = 1;
> 
> I have tried variations of $this->$$name = $val, $this->${$name} = $val,

> etc., but none of them work -- I keep getting an "Undefined variable:
foo" 
> error from PHP, when very clearly foo has been defined.
> 
> This is a very simple example of what I'm actually attempting to
implement, 
> so please do not reply with, "Well, why not just do: $this->foo = $val"
> 
> I'm sure intermediate to advanced PHP developers have run across this
issue 
> before -- feel free to chime in ;--)
> 
> Thanks!
> 
> --Noah 
> 
> -- 
> 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



Re: [PHP] shell_exec, batch files, and IIS on Windows

2007-02-27 Thread Frank M. Kromann
The user that runs the php script under iis (IUSER_) should
have permissions to execute  the cmd.exe file, the .bat file and all the
commands included in the .bat file.

- Frank

> The manual entry for shell_exec has a comment that notes to execute .bat

> files with shell_exec, you need to pass the command through cmd.exe with

> the /c argument.  I was wondering if anyone could share some insight on

> why that is.
> 
> I've pretty much verified that this is the case.  I can't execute .bat 
> files at all from a Windows 2003 server running IIS.  I can locally on 
> my development workstation (XP running Apache).  I've tried passing the

> command through cmd.exe on the server, but some of the commands in the 
> .bat file does not run properly when going through cmd.exe.
> 
> I suspect that IIS is a key culprit, but I have nothing concrete.  I'd 
> like to take a plausible theory to the IT guys before I request that 
> they install Apache on that box.
> 
> Thanks for any insight anyone might have.
> 
> -- 
> 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] Size Limit PHP + MSSQL

2007-02-23 Thread Frank M. Kromann
There are two settings in php.ini mssql.textsize and mssql.textlimit. When
tese are set to -1 (default) the values used are configured on the server
and is usually 4k.

- Frank

> Is there size limit for select queries in php?
> 
> I am trying to grab a very long string that exists in the database.
> When I do a select and print it out, php keep truncating the string -
only
> outputing the first half or so when the string is too long.
> I have checked the actual database and the string is complete.
> I havent gone as far as checking the actual length of the string and
the
> length that is being printed..
> Any ideas why php keep truncating my data?
> I've tested it with asp and it successfully outputs the complete
data...
> Thank you!
> 

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



Re: [PHP] Bug? (_ENV in PHP v5.2.0)

2007-01-16 Thread Frank M. Kromann
Hi Eli,

Check variable_order in php.ini
(http://us2.php.net/manual/en/ini.core.php#ini.variables-order) if the E is
missing you will not get any environment variables.

- Frank

> Hi,
> 
> System:
>   Win32
>   PHP 5.2.0
>   Apache 2.0.54 (PHP in CGI mode)
> 
> CGI vars are not automatically loaded into $_ENV global array. Only when

> calling getenv('var'), just then the variable appears in $_ENV.
> Besides, it seems that the env vars are loaded automatically into 
> $_SERVER. And $HTTP_ENV_VARS is always NULL.
> 
> 
>  echo "before getenv...";
> echo "\$_ENV: "; var_dump($_ENV);
> echo "\$HTTP_ENV_VARS: "; var_dump($HTTP_ENV_VARS);
> 
> getenv('SERVER_PROTOCOL');
> echo "after getenv...";
> echo "\$_ENV: "; var_dump($_ENV);
> echo "\$HTTP_ENV_VARS: "; var_dump($HTTP_ENV_VARS);
> ?>
> 
> === output:
> before getenv...
> $_ENV: array(0) { }
> $HTTP_ENV_VARS: NULL
>

> after getenv...
> $_ENV: array(1) { ["SERVER_PROTOCOL"]=> string(8) "HTTP/1.1" }
> $HTTP_ENV_VARS: NULL
> 
> 
> Is it a bug? Or this is the way it should work?
> 
> 
> -thanks, Eli
> 
> -- 
> 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] Unable to compile php with MSSQL support / configure: error: Directory /usr is not a FreeTDS installation directory

2007-01-12 Thread Frank M. Kromann
I have not looked at the exact code but the 5.0 branch has been dead for
quite a while so there could easily be fixes that are comitted to the 5.1
branch and not to the 5.0 branch.

If you need to run the 5.0.4 version you can try copying
ext/mssql/config.m4 from the 5.1.6 version. Run ./buildconf and
./configure.

- Frank

> Hi Frank,
> 
> The problem gets stranger...
> 
> I've downloaded the 5.1.6 and guess what? the ./configure --with-mssql
runs
> fine in the same machine...
> 
> 5.0.4
> ./configure --with-mssql
> ...
> checking for MSSQL support via FreeTDS... yes
> configure: error: Cannot find FreeTDS in known installation directories
> 
> 5.1.6
> ./configure --with-mssql
> ...
> checking for MSSQL support via FreeTDS... yes
> checking for dnet_addr in -ldnet_stub... (cached) no
> checking for MySQL support... no
> checking for specified location of the MySQL UNIX socket... no
> ...
> make
> ...
> Build complete.
> (It is safe to ignore warnings about tempnam and tmpnam).
> 
> On 1/11/07, Frank M. Kromann <[EMAIL PROTECTED]> wrote:
> >
> > The only other thing I can think of is permissions, but that would be
too
> > simple.
> >
> > - Frank
> >
> > > Hi Frank,
> > >
> > > Thanks for the reply but  the tds.h is located under
> > /usr/include/freetds
> > > but the error persists.
> > >
> > > Any other ideas?
> > >
> > > On 1/10/07, Frank M. Kromann <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi,
> > > >
> > > > --with-mssql=/usr or --with-mssql=shared,/user should work with
your
> > > > configuration. It's looking for /usr/include/tds.h or
> > > > /usr/include/freetds/tds.h. If the file was not found in any of
those
> > > > locations you will get the error you are describing here.
> > > >
> > > > - Frank
> > > >
> > > >
> > > >
> > >
> >
> >
> >
> >
> 

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



Re: [PHP] Unable to compile php with MSSQL support / configure: error: Directory /usr is not a FreeTDS installation directory

2007-01-11 Thread Frank M. Kromann
The only other thing I can think of is permissions, but that would be too
simple.

- Frank

> Hi Frank,
> 
> Thanks for the reply but  the tds.h is located under
/usr/include/freetds
> but the error persists.
> 
> Any other ideas?
> 
> On 1/10/07, Frank M. Kromann <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > --with-mssql=/usr or --with-mssql=shared,/user should work with your
> > configuration. It's looking for /usr/include/tds.h or
> > /usr/include/freetds/tds.h. If the file was not found in any of those
> > locations you will get the error you are describing here.
> >
> > - Frank
> >
> >
> >
> 

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



Re: [PHP] Unable to compile php with MSSQL support / configure: error: Directory /usr is not a FreeTDS installation directory

2007-01-10 Thread Frank M. Kromann
Hi,

--with-mssql=/usr or --with-mssql=shared,/user should work with your
configuration. It's looking for /usr/include/tds.h or
/usr/include/freetds/tds.h. If the file was not found in any of those
locations you will get the error you are describing here.

- Frank

> Hi,
> 
> I am trying to compile php 5.0.6 with mssql support with no luck.
> 
> I have freetds, freetds-devel but no luck so far.
> 
> I've tried the simplest form and some variations variations
> ./configure --with-mssql
> ./configure --with-mssql=/usr
> ./configure --with-mssql=shared,/usr
> ./configure --with-mssql=shared,/usr/lib
> ...
> 
> All end up with
> 
> checking for MSSQL support via FreeTDS... yes
> configure: error: Directory /usr is not a FreeTDS installation
directory
> 
> My rpm -ql of freetds freetds-devel shows
> 
> /etc/freetds.conf
> /etc/locales.conf
> /etc/pool.conf
> /usr/bin/bsqldb
> /usr/bin/defncopy
> /usr/bin/freebcp
> /usr/bin/tdspool
> /usr/bin/tsql
> /usr/lib/libct.so.3
> /usr/lib/libct.so.3.0.0
> /usr/lib/libsybdb.so.5
> /usr/lib/libsybdb.so.5.0.0
> /usr/lib/libtds.so.4
> /usr/lib/libtds.so.4.0.0
> /usr/lib/libtdsodbc.so.0
> /usr/lib/libtdsodbc.so.0.0.0
> /usr/lib/libtdssrv.so.2
> /usr/lib/libtdssrv.so.2.0.0
> /usr/share/doc/freetds-0.63
> /usr/share/doc/freetds-0.63/AUTHORS
> /usr/share/doc/freetds-0.63/BUGS
> /usr/share/doc/freetds-0.63/COPYING
> /usr/share/doc/freetds-0.63/COPYING.LIB
> /usr/share/doc/freetds-0.63/ChangeLog
> /usr/share/doc/freetds-0.63/NEWS
> /usr/share/doc/freetds-0.63/README
> /usr/share/doc/freetds-0.63/TODO
> /usr/share/doc/freetds-0.63/api_status.txt
> /usr/share/doc/freetds-0.63/bcp.txt
> /usr/share/doc/freetds-0.63/bsqldb.txt
> /usr/share/doc/freetds-0.63/cap.txt
> /usr/share/doc/freetds-0.63/defncopy.txt
> /usr/share/doc/freetds-0.63/freebcp.txt
> /usr/share/doc/freetds-0.63/getting_started.txt
> /usr/share/doc/freetds-0.63/policy.txt
> /usr/share/doc/freetds-0.63/tds.html
> /usr/share/doc/freetds-0.63/tsql.txt
> /usr/share/doc/freetds-0.63/userguide.sgml
> /usr/share/man/man1/bsqldb.1.gz
> /usr/share/man/man1/defncopy.1.gz
> /usr/share/man/man1/freebcp.1.gz
> /usr/share/man/man1/tsql.1.gz
> /usr/include/freetds
> /usr/include/freetds/bkpublic.h
> /usr/include/freetds/cspublic.h
> /usr/include/freetds/cstypes.h
> /usr/include/freetds/ctpublic.h
> /usr/include/freetds/sqldb.h
> /usr/include/freetds/sqlfront.h
> /usr/include/freetds/sybdb.h
> /usr/include/freetds/syberror.h
> /usr/include/freetds/sybfront.h
> /usr/include/freetds/tds.h
> /usr/include/freetds/tds_sysdep_public.h
> /usr/include/freetds/tdsconvert.h
> /usr/include/freetds/tdssrv.h
> /usr/include/freetds/tdsver.h
> /usr/lib/libct.a
> /usr/lib/libct.so
> /usr/lib/libsybdb.a
> /usr/lib/libsybdb.so
> /usr/lib/libtds.a
> /usr/lib/libtds.so
> /usr/lib/libtdsodbc.a
> /usr/lib/libtdsodbc.so
> /usr/lib/libtdssrv.a
> /usr/lib/libtdssrv.so
> /usr/share/doc/freetds-devel-0.63
> /usr/share/doc/freetds-devel-0.63/samples
> /usr/share/doc/freetds-devel-0.63/samples/Makefile
> /usr/share/doc/freetds-devel-0.63/samples/Makefile.am
> /usr/share/doc/freetds-devel-0.63/samples/Makefile.in
> /usr/share/doc/freetds-devel-0.63/samples/README
> /usr/share/doc/freetds-devel-0.63/samples/debug.c
> /usr/share/doc/freetds-devel-0.63/samples/dyntest.c
> /usr/share/doc/freetds-devel-0.63/samples/odbc.ini
> /usr/share/doc/freetds-devel-0.63/samples/odbctest.php
> /usr/share/doc/freetds-devel-0.63/samples/odbctest.pl
> /usr/share/doc/freetds-devel-0.63/samples/test.php
> /usr/share/doc/freetds-devel-0.63/samples/test.pl
>
/usr/share/doc/freetds-devel-0.63/samples/unixodbc.freetds.driver.template
> /usr/share/doc/freetds-devel-0.63
> /samples/unixodbc.freetds.driver.template.in
> /usr/share/doc/freetds-devel-0.63/samples/unixodbc.install.sh
>
/usr/share/doc/freetds-devel-0.63/samples/unixodbc.jdbc.datasource.template
> 

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



Re: [PHP] Are PHP5 features worth it?

2006-12-19 Thread Frank M. Kromann
PHP5 is more than just OO features, SimpleXML, SPL, Filter and the newly
added Date/Time functions just to mention a few. If you need any of those
PHP5 is the way to go.

The first version of PHP5 was released in 2004, so it's been arround for a
while now. In most cases you can still use the old PHP4 style for
programming with objects, but getting access to all the new features would
make the update worth the effort.

- Frank

> On Tue, 2006-12-19 at 19:05 +0100, Niels wrote:
> > Hi list,
> > 
> > I'm writing a PHP program and I've got a number of concerns. The
program is
> > about 20 KLOC at the moment, but will probably grow quite a lot.
> > 
> > I'm using OOP throughout, and I don't really have a lot of problems
with
> > what PHP4 can do with OOP. PHP5 does have a nice feature or two,
eventhough
> > none seems essential to my particular style of programming. I don't
mind
> > using what PHP5 offers where it makes sense, but where's that?
Exceptions
> > and new OOP features?
> > 
> > Exceptions: I just don't see the big advantage. I've got errors and
messages
> > bubbling up through object layers as it is, and exchanging that with
a
> > wholly new structure seems more trouble that it's worth. I've read
several
> > books on how cool PHP5 is, but the arguments for using exceptions seem
to
> > boil down to "Java has them". Nowhere have I seen good examples that
really
> > show how well exceptions solve real problems, all examples seem to
show are
> > that 5 lines of try/catch are somehow sexier than 5 lines of if/else.
What
> > about performance?
> > 
> > New OOP features: I can go through my code and mark all my methods as
public
> > or private or whatever. No problem. But why would I? It will make
classes
> > easier to understand when I look at them, but that's just convenience.
What
> > are the performance benefits? I've not found a single mention of that
> > anywhere. What do abstractions and interfaces actually do, aside from
> > structuring my code better?
> > 
> > What major compelling reasons do I have to start using exceptions and
OOP-5?
> 
> There's only one compelling reason IMHO... objects are assigned to
> variables by reference instead of by copy. Other than that, as you have
> noted, pretty much everything else is bells and whistles of limited use
> to a savvy programmer who doesn't give a rat's ass about java style
OOP.
> IMHO, stick with PHP4 style coding and adjust the things that are
> incompatible with PHP5. Then you're code can work in either. PHP5
uptake
> has not been particularly breathtaking and the majority of PHP
> developers are still using PHP4 because it works well enough without
the
> headaches. PHP6 on the other hand, will probably be well worth the
> switch.
> 
> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problems with Zip+IE6

2006-12-12 Thread Frank M. Kromann
Hello,

if you use:

header("Content-Type: application/zip");
header("Content-Disposition: attachment; filename=\"somefile.zip\"");

That works for me with IE 6/7 and other browsers.

- Frank

> damn! that's a pretty good article, thanks a lot.
> 
> unfortunatelly, it's not mentioning about zip files concretely, I
didn't
> find a solution for my problem with them.
> I tried playing a bit with the Content-type, but it seems that Internet
> Explorer doesn't really care about "Content-type"... it uses the
extention
> of the file to determine the type (microsoft's way...) so it doesn't
matter
> if I use "application/octet-stream" or even "application/force-download"
or
> "application/makethisdownload-or-ikillyou" :-D as long as I name the
file "
> whatever.zip", IE6 shows the "open with" dialog and if I use "open" with
an
> application, it fails :(
> 
> thanks again Richard for the answer and for the article :)
> 
> anybody with a miracle for the ZIP+IE problem??
> 
> 
> 
> On 12/5/06, Richard Lynch <[EMAIL PROTECTED]> wrote:
> >
> > It's kinda long, but this will probably save you some grief:
> > http://richardlynch.blogspot.com
> >
> > On Tue, December 5, 2006 2:07 am, Javier Ruiz wrote:
> > > Hi all!
> > >
> > > I have a problem with zip files and Internet Explorer 6. I try to
send
> > > to
> > > the user a dinamically generated zip file writting the http headers
> > > and
> > > using file_put_contents for the zip content. It works fine when
> > > downloading
> > > the file with firefox, opera, etc... even it works well if I
download
> > > the
> > > file with internet explorer and then open it with any zip tool. The
> > > problem
> > > comes when I try to directly open the file from the URL using IE6.
> > >
> > > I found this is a known bug of IE (several versions) in windows XP:
> > > http://support.microsoft.com/kb/308090
> > >
> > > Does anybody know any way to workaround this problem? I found a
couple
> > > workarounds in forums over there and I tried them, but
unfortunately
> > > they
> > > didn't work:
> > >1 - To change the mimetype (when writting http headers) from
> > > "application/zip" that I used before to
"application/x-zip-compressed"
> > >2 - To not use MOD_DEFLATE in apache2 (I was not using it
> > > really...)
> > >
> > >
> > >
> > > Any idea??
> > >
> > > Thanks a lot!
> > >
> >
> >
> > --
> > Some people have a "gift" link here.
> > Know what I want?
> > I want you to buy a CD from some starving artist.
> > http://cdbaby.com/browse/from/lynch
> > Yeah, I get a buck. So?
> >
> >
> 

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



Re: [PHP] PHP on IIS and MS SQL 2000

2006-07-23 Thread Frank M. Kromann
Replace php_mssql.dll with php_dblib.dll. You aæso need to create a
freetds.conf file but you remove the limitations created by ntwdblib and
you get a thread safe environment.

- Frank

> Our story is
> We started building our application back in 2002 on FreeBSD/Apache with
> PostgreSQL.
> 
> Than company we are working for became bigger and they bought SQL 2000
> server and we had to switch to MS SQL 2000.
> 
> Now company became even more bigger and they decided that keeping
FreeBSD
> server which nobody knows and nobody wants to learn in IT department is
a
> risk and we have been asked to move from FreeBSD/Apache to Win 2000/ IIS
5.
> 
> Back in 2002 we choose ADODB as db abstraction library.
> 
> With OS switched we noticed a few things:
> 
> 1) ado-mssql driver which uses mssql_* calls in PHP has a problem of
> returning only first 255 characters for VARCHARs. I can not agree that
> casting varchars as text in SQL queries solves this problem (it may be
> solves it for simple applications) as TEXT datatype has many limitations
on
> its use in SQL queries - you can't use LIKE and DISTINCT and other.
> 
> 2) ado-ado_mssql. This one uses not ntwdblib.dll but Win COM object ADO
(if
> I am right)
> There are no problems with varchars but COM object does not like
DATETIMEs
> less than 1970 and all your employees which were 'lucky' to be born
before
> 1970  suddenly become all born in 1970.
> 
> I am not sure but it looks like choice of platform - PHP on IIS with
MSSQL
> is not a good idea.
> And by trying to minimize IT department risk (necessity to support OS
they
> do not know) we maximize our application support issues.
> 
> If anybody can suggest or share experience - please do.
> 
> Thank you,
> 
> Igor Kryltsov
> 
> -- 
> 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] Calculations

2006-06-27 Thread Frank M. Kromann
Take a look at the pow() function

http://php.net/pow

- Frank

> Hi there list. 
> Thanks for your help with my other questions.
> 
> I was carrying on working through, and stumbled across a problem when
trying
> to times something by the 'power' of something. By this I mean..in maths
you
> can write 3 * (2 ^ 3), the answer to which would be 24. (as 2 ^ 3 = 8).
> 
> The reason that I need this, is because I'm trying to double a variable
x
> amount of times (x is set by another variable).
> 
> For example my code is:
> 
> $cost = $farm_cost * (2 ^ $farm_level);
> 
> Any ideas how I would go about changing my calculation, as php dosn't
seem
> to recognise ^ meaning 'to the power of'.
> 
> Regards, 
> Alex.
> 
> -- 
> 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] Linux/PHP and Windows/MSSQL

2005-10-07 Thread Frank M. Kromann


> On Thu, October 6, 2005 8:29 pm, Rick Emery wrote:
> > Knowing that I'm not the only one to want to connect to Microsoft SQL
> > Server on Windows from PHP and Apache on Linux, I'm seeking advice.
> 
> You may want to consider using the Sybase drivers if they are
> available as up-to-date RPMs.
> 
> Last time I checked, several years ago, they worked better/faster than
> the mssql drivers.
> 

The Sybase extension can be linked agains the commercial Sybase libs or
the same FreeTDS lib used for the mssql extension, so there is not a big
difference there. The mssql extension implements about twice as many
functions as the sybase extension.

- Frank

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



Re: [PHP] Linux/PHP and Windows/MSSQL

2005-10-06 Thread Frank M. Kromann
Hi Rick,

FreeTDS is still a fast moving target and so is PHP in some areas. Getting
pre-compiled RPM's would often force you to run older versions. Compiling
from source enables you to keep up to date with the latest features and
bug-fixes. If you are running this on multiple computers it's not a big
task to copy all files from one test/development box to a number of other
systems, as long as the configurations are the same.

- Frank

> Knowing that I'm not the only one to want to connect to Microsoft SQL 
> Server on Windows from PHP and Apache on Linux, I'm seeking advice.
> 
> I set up a proof-of-concept application, using Gentoo Linux (with which

> I'm most familiar) as my base. Being a compile-from-source distribution

> with a lot of packages available, I simply had to set the "mssql" USE 
> flag and emerge freetds and php. Voila; connectivity.
> 
> Not surprisingly, now that my organization has decided to go with PHP 
> on Linux, management wants to use a commercially supported distribution

> (Red Hat or Novell/SUSE). I was surprised to discover that I couldn't 
> find RPMs for freetds, nor could I find php-mssql RPMs, and the php 
> RPMs available in the yum repositories weren't compiled with 
> --with-mssql.
> 
> Is my only recourse to build freetds and php from source? I'm certainly

> capable of doing it, but I won't be the server administrator and I 
> think it defeats what management wants to accomplish with a 
> commercially supported distro (package management with easy updates).
> 
> Is anybody in a similar environment that has an easy solution, or can 
> anybody offer advice?
> 
> Thanks in advance,
> Rick
> -- 
> Rick Emery
> 
> "When once you have tasted flight, you will forever walk the Earth
> with your eyes turned skyward, for there you have been, and there
> you will always long to return"
>   -- Leonardo Da Vinci
> 
> -- 
> 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] gmp in windows snaps

2005-03-31 Thread Frank M. Kromann
Hi Jon,

You need to install the gmp extension. Not sure if this is included in the
snaps builds, but you should be able to download it from my site:
http://kromann.info/php.php.

- Frank

> I asked this in the windows section yesterday and received no answer.
> 
> I have copied the sample of gmp_add() from the function page and have
tried
> to run it from the snap that I downloaded this morning with the
recommended
> ini that is in the folder with it and I keep getting the error here.
> 
> PHP Fatal error:  Call to undefined function gmp_add()
> 
> do I need a dll extension or need to install gmp somehow?
> 
> Thanks
> 
> -- 
> 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] Re: Trying to compile PECL fileinfo on Windows

2005-01-29 Thread Frank M. Kromann

FileInfo is not available on win32.

- Frank

> Chris wrote:
> > Hi,
> > 
> > Are there any places that might have instructions on compiling PECL 
> > extensions on Windows? I tried going the pear install  route,

> > but fileinfo is not considered stable yet.
> > 
> > Chris
> 
> Trying a PEAR or PECL list might do you more good.  That being said... 
> are you trying to install packages that are listed as unstable when your

> configuration tries to install stable releases?
> 
> -- 
> Teach a man to fish...
> 
> NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
> STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
> STFM | http://www.php.net/manual/en/index.php
> STFW | http://www.google.com/search?q=php
> LAZY | 
>
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins
> 
> -- 
> 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] Installing on Windows.... CGI v. ISAPI?

2004-12-29 Thread Frank M. Kromann
Hi, 

Though the ISAPI version is getting more stable it's still not as stable
as the CGI version. As an alternative to CGI you can use FastCGI. It
installs a module in the IIS web server and will preload a number of PHP
processes. This will make the web requests perform almost as fast as the
ISAPI version, but without the troubles.

Read more here: http://www.caraveo.com/fastcgi/

- Frank

> GH wrote:
> > #2 which method is better to install PHP with IIS? ISAPI or CGI?
> 
> ISAPI... no idea what it stands for though, but installing PHP that way

> will make it a module within the server instead of an .exe file that's 
> loaded with each PHP request...
> 
> -- 
> 
> ---John Holmes...
> 
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
> 
> php|architect: The Magazine for PHP Professionals – www.phparch.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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



Re: [PHP] php_ftp.dll missing

2004-10-24 Thread Frank M. Kromann
Hi Thomas,

What version of php are you using? Both PHP4 and PHP5 has the ftp
extension build-in so there is no need to load it.

- Frank

>  Hello!
> I don't have a file named php_ftp.dll, where can I find it? 
> 
> I've added extension php_ftp.dll but Apache says I don't have this file
:( Could You send it to me in an attachment or tell me from where I can
download this file.
> 
> Sorry for my bad English.
> Best regards
> Thomas from Poland
> 
> 

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



Re: [PHP] MSSQL, PHP and Linux

2004-09-01 Thread Frank M. Kromann
Hi, 

You should compile php with this option --with-mssql or
--with-mssql=/path/to/freetds.

This will enable the mssql extension. Enabling the DBX extension is not
enough. DBX is just a wrapper arround other extensions. You still need to
compile each of these extensions.

- Frank

> I need some help...I am helping a local business with a site which
> needs to connect to a mssql db, my webhost uses linux and compiled php
> with the freetds library and when I go to the info page..it does show
> Microsoft SQL Server under dbx yet I still get the errors "called to
> undefined function mssql_pconnect()"...what can I try next?
> 
> Is there anything that needs to be changed in the linux php ini file?
> It looked like most things where uncommented.
> 
> here is the info page... http://mwvre.ht-tech.net/info.php
> 
> This is something we have to get fixed today.
> 
> Thanks!!
> 
> -- 
> 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] Works in Mozilla, not in IE

2004-06-28 Thread Frank M. Kromann
You also need to change 

header("Content-type: application/octet-stream");

to

header("Content-type: application/vnd.ms-excel");

- Frank

> That just made IE put it out in "data" style, Excel didn't open up.
> 
> :(
> 
> Any other thoughts?
> 
> -Original Message-
> From: Frank M. Kromann [mailto:[EMAIL PROTECTED] 
> Sent: Monday, June 28, 2004 2:47 PM
> To: Robert Sossomon
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Works in Mozilla, not in IE
> 
> 
> Hi Robert,
> 
> This line
> 
> header("Content-Disposition: attachment; filename=customers.xls");
> 
> forces IE to save. If you change attachment to inline it will open the
> Excel in the plug-in imbeded in the browser.
> 
> - Frank
> 
> > I have the script below from another source, and it works prefectly
in
> 
> > Mozilla, however IE keeps wanting to save the PHP page and then
barfs.
> 
> > Any ways to fix and make it work for both?
> > 
> > TIA!
> > Robert
> > 
> > 
> > 
> >  > //Written by Dan Zarrella. Some additional tweaks provided by JP 
> > Honeywell //pear excel package has support for fonts and formulas 
> > etc.. more complicated
> > //this is good for quick table dumps (deliverables)
> > 
> > //Includes Snipped for posting
> > //DB Query tweaked for usage
> > $result = mysql_query("select * from customers where cust_salesmen = 
> > $user_id"); $count = mysql_num_fields($result);
> > 
> > for ($i = 0; $i < $count; $i++){
> > $header .= mysql_field_name($result, $i)."\t";
> > }
> > 
> > while($row = mysql_fetch_row($result)){
> >   $line = '';
> >   foreach($row as $value){
> > if(!isset($value) || $value == ""){
> >   $value = "\t";
> > }else{
> > # important to escape any quotes to preserve them in the data.
> >   $value = str_replace('"', '""', $value);
> > # needed to encapsulate data in quotes because some data might be 
> > multi line. # the good news is that numbers remain numbers in Excel 
> > even though quoted.
> >   $value = '"' . $value . '"' . "\t";
> > }
> > $line .= $value;
> >   }
> >   $data .= trim($line)."\n";
> > }
> > # this line is needed because returns embedded in the data have "\r"
> > # and this looks like a "box character" in Excel
> >   $data = str_replace("\r", "", $data);
> > 
> > 
> > # Nice to let someone know that the search came up empty.
> > # Otherwise only the column name headers will be output to Excel. if 
> > ($data == "") {
> >   $data = "\nno matching records found\n";
> > }
> > 
> > # This line will stream the file to the user rather than spray it
> across
> > the screen
> > header("Content-type: application/octet-stream");
> > 
> > # replace excelfile.xls with whatever you want the filename to
default
> 
> > to
> > header("Content-Disposition: attachment; filename=customers.xls");
> > header("Pragma: no-cache");
> > header("Expires: 0");
> > 
> > echo $header."\n".$data;
> > ?>
> > 
> > 
> > --
> > 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Works in Mozilla, not in IE

2004-06-28 Thread Frank M. Kromann
Hi Robert,

This line

header("Content-Disposition: attachment; filename=customers.xls");

forces IE to save. If you change attachment to inline it will open the
Excel in the plug-in imbeded in the browser.

- Frank

> I have the script below from another source, and it works prefectly in
> Mozilla, however IE keeps wanting to save the PHP page and then barfs.
> Any ways to fix and make it work for both?
> 
> TIA!
> Robert
> 
> 
> 
>  //Written by Dan Zarrella. Some additional tweaks provided by JP
> Honeywell
> //pear excel package has support for fonts and formulas etc.. more
> complicated
> //this is good for quick table dumps (deliverables)
> 
> //Includes Snipped for posting
> //DB Query tweaked for usage
> $result = mysql_query("select * from customers where cust_salesmen =
> $user_id");
> $count = mysql_num_fields($result);
> 
> for ($i = 0; $i < $count; $i++){
> $header .= mysql_field_name($result, $i)."\t";
> }
> 
> while($row = mysql_fetch_row($result)){
>   $line = '';
>   foreach($row as $value){
> if(!isset($value) || $value == ""){
>   $value = "\t";
> }else{
> # important to escape any quotes to preserve them in the data.
>   $value = str_replace('"', '""', $value);
> # needed to encapsulate data in quotes because some data might be multi
> line.
> # the good news is that numbers remain numbers in Excel even though
> quoted.
>   $value = '"' . $value . '"' . "\t";
> }
> $line .= $value;
>   }
>   $data .= trim($line)."\n";
> }
> # this line is needed because returns embedded in the data have "\r"
> # and this looks like a "box character" in Excel
>   $data = str_replace("\r", "", $data);
> 
> 
> # Nice to let someone know that the search came up empty.
> # Otherwise only the column name headers will be output to Excel.
> if ($data == "") {
>   $data = "\nno matching records found\n";
> }
> 
> # This line will stream the file to the user rather than spray it
across
> the screen
> header("Content-type: application/octet-stream");
> 
> # replace excelfile.xls with whatever you want the filename to default
> to
> header("Content-Disposition: attachment; filename=customers.xls");
> header("Pragma: no-cache");
> header("Expires: 0");
> 
> echo $header."\n".$data;
> ?> 
> 
> 
> -- 
> 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] Displaying a money datatype from mssql - Solution

2004-04-02 Thread Frank M. Kromann
This is a bug in php 4.3.5 and it's fixed in the upcomming 4.3.6 release.

- Frank

> Recap:
> In the query I had;
> SELECT totalamount
> 
> And it was returning;
> Total Amount
> 5.41108926696E-309
> 
> I tried to modify the query to;
> SELECT cast(totalamount as decimal(10,2)) as totalamount
> 
> And php gave me an error;
> Undefined Index at line (x);
> 
> When I tried to use 'number_format($totalamount,2)' it returned;
> Total Amount
> 0.00
> 
> Solution:
> The solution was in the query;
> SELECT cast(totalamount as numeric(10,2)) as totalamount
> 
> This returns the proper formatting;
> Total Amount
> 123.50
> 
> 
> 
> alex hogan
> 
> 
> ** 
> The contents of this e-mail and any files transmitted with it are 
> confidential and intended solely for the use of the individual or 
> entity to whom it is addressed.  The views stated herein do not 
> necessarily represent the view of the company.  If you are not the 
> intended recipient of this e-mail you may not copy, forward, 
> disclose, or otherwise use it or any part of it in any form 
> whatsoever.  If you have received this e-mail in error please 
> e-mail the sender. 
> ** 
> 
> 
> 

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



Re: [PHP] Re: why won't mssql work?

2004-03-29 Thread Frank M. Kromann

If you are using the Apache module you need to restart Apache each time
you make changes to php.ini.

- Frank

> EP> And as far as IIS, I am running apache.
> 
> Heh.  Well, then I guess I can't help you there, as I've never run 
> Apache on a Windows machine.  :-)
> 
> Sorry.  I hope someone else can help.
> 
> -- 
> Regards,
>   Ben Ramsey
>   http://benramsey.com
>   http://www.phpcommunity.org/wiki/People/BenRamsey
> 
> -- 
> 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] ?=

2004-03-16 Thread Frank M. Kromann
Asuming the content is generated by php, take a look at htmlentities().
http://php.net/htmlentities

- Frank

> How do I get this to work? the input box is only showing 
> 
> He said, 
> 
>  frown" size="50">
> 
> 
> 
> James Hicks
> 
> -- 
> 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] Updating content on the line. (cli)

2004-03-03 Thread Frank M. Kromann
At least on Windows you can send chr(13), and then rebuild the entire
line.

- Frank

> Well I bet it would work on Win32, it just depends on how much CYGWIN
> your willing to include with your program. I think all you would need
is
> the basic CYGWIN DLL(s) and a terminal like bash (plus ncurses
> obviously).
> 
> 
> On Wed, 2004-03-03 at 11:07, Simon Fredriksson wrote:
> > Yes, that's one way. It's currently in development for Win32, but it 
> > would be nice if it works on *nix later on aswell. Got a tip from a
user 
> > in a chatroom to use Ncurses for it, but then I can't use it on
win32.
> > 
> > Just to correct myself; it's chr(8) and not 7.
> > 
> > //Simon
> > 
> > Adam Voigt wrote:
> > 
> > > I'm not sure of how you could do this, but one other thing you could
do,
> > > is like I've seen certain console FTP apps do, is just do a division
of
> > > the total size by whats downloaded, and have like 100 pound signs
that
> > > are gradually filled in as it downloads.
> > > 
> > > 
> > > On Wed, 2004-03-03 at 10:53, Simon Fredriksson wrote:
> > > 
> > >>I'm building a download-manager script (like wget), in PHP. Does any
of 
> > >>you know how I can update a line in the console? I've tried to echo

> > >>chr(7) which is the backspace character, but it won't work. This
kind of 
> > >>thing is seen in tons of console applications. Like some "please
wait" 
> > >>thing that changes from - to \, |, /,  and so on (looks like a
rotating 
> > >>line).
> > >>
> > >>Ideas?
> > >>
> > >>//Simon
> -- 
> 
> Adam Voigt
> [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] PERL/PHP, MSSQL, Unix AIX

2003-03-09 Thread Frank M. Kromann
Hi Kelvin,

You can use both PERL and PHP (prefered :-)).

You need to download, compile and install FreeTDS (http://freetds.org). If
you are using PHP you need to recompile it using --with-mssql. This will
enable the mssql extension. You can then create a php script to read the
text file, parse it and create the data in a MSSQL server on a Win32 box
(PHP is running on your AIX box).

- Frank

> Hi,
> 
> I got a little project and I need to come up with a solution on how to
> finish it and was hoping if you guys can give me any ideas.
> 
> I have a PERL script on a Unix AIX machine that checks for incoming
update
> of data. Specificly what it does is, when it runs, it will look at the
> corresponding directories in the AIX machine and record the time WHEN a
data
> has come in and check if the time is delayed or on time, kind of like
how
> the flight Arrival/departure information work in an airport. After it
> collects this information, it will store these information in a text
file.
> 
> I need to display this information in a form of a web page so that my
> internal staff can see this information. I usually store this kind of
> information in a MSSQL table and use PHP to general a page that collects
its
> information from the database/MSSQL table.
> 
> The way I want to do it, somehow store/update the data in the text file
of
> the AIX machine to the MSSQL table so that my php page would be able to
get
> the updated information for display. 
> 
> My problem is I haven't come up with a solution as to how I can pull
this
> text file out fo the AIX machine and transfer the data to the MSSQL
table.
> 
> Anyone have an ideas? IS there anything in PHP I can use to do this? 
> 
> Any help is appreicated, thanks!
> 
> Kelvin
> 
> -- 
> 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] PERL/PHP, MSSQL, Unix AIX

2003-03-09 Thread Frank M. Kromann
Hi Kelvin,

You can use both PERL and PHP (prefered :-)).

You need to download, compile and install FreeTDS (http://freetds.org). If
you are using PHP you need to recompile it using --with-mssql. This will
enable the mssql extension. You can then create a php script to read the
text file, parse it and create the data in a MSSQL server on a Win32 box
(PHP is running on your AIX box).

- Frank

> Hi,
> 
> I got a little project and I need to come up with a solution on how to
> finish it and was hoping if you guys can give me any ideas.
> 
> I have a PERL script on a Unix AIX machine that checks for incoming
update
> of data.  Specificly what it does is, when it runs, it will look at the
> corresponding directories in the AIX machine and record the time WHEN a
data
> has come in and check if the time is delayed or on time, kind of like
how
> the flight Arrival/departure information work in an airport.  After it
> collects this information, it will store these information in a text
file.
> 
> I need to display this information in a form of a web page so that my
> internal staff can see this information.  I usually store this kind of
> information in a MSSQL table and use PHP to general a page that collects
its
> information from the database/MSSQL table.
> 
> The way I want to do it, somehow store/update the data in the text file
of
> the AIX machine to the MSSQL table so that my php page would be able to
get
> the updated information for display. 
> 
> My problem is I haven't come up with a solution as to how I can pull
this
> text file out fo the AIX machine and transfer the data to the MSSQL
table.
> 
> Anyone have an ideas?  IS there anything in PHP I can use to do this?  
> 
> Any help is appreicated, thanks!
> 
> Kelvin
> 
> -- 
> 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] win2k..grrr

2002-01-04 Thread Frank M. Kromann

I do that all the time without any problems.

Could you give us a (small) sample script ?

- Frank

> Hey,
> Does anyone know WHY form scripts, that submit to themselves, dont work on
> windows boxes?? Example :
> I have a script called mail.php. The first part of the script displays the
> form whos action states, mail.php. When the form is submitted, the second
> part of the script mails the form details out.. this works fine on linux..
> but on windows, only part one is displayed again and again... when i
> seperate the 2 components, it works fine.
> Regards,
> Kunal Jhunjhunwala
> 
> 
> -- 
> 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] Re: [PHP-DB] Connect to IBM DB2

2002-01-02 Thread Frank M. Kromann

Hi,

IBM DB/2 uses Call Level Interface (CLI) for communication between clients and server. 
The ODBC driver from IBM is a simple one to one wrapper arround CLI, as CLI and ODBC 
share the same specifications.

Using ODBC will give you an extra layer though. On *nix platforms you can compile usen 
--with-ibm-db2 and get the ODBC functions linked directly with CLI. This is not 
currently available on Windows.

- Frank

> To connect to Microsoft SQL 7 I'm using the following script which works
> fine:
> 
>  $query="SELECT * FROM DB1";
> $queryupd="UPDATE DB1 SET dateval='20010101' where dateval='2101'";
> $hostname = "dbserver";
> $username = "username";
> $password = "pwd";
> $dbName = "DB";
> mssql_connect($hostname,$username,$password) or die("DATABASE FAILED TO
> RESPOND.");
> mssql_select_db($dbName) or DIE("Table unavailable");
> $result2 = MSSQL_QUERY($queryupd); // Execute Update Statment
> $result = MSSQL_QUERY($query);  // Execute Select Statment
> $number = MSSQL_NUM_ROWS($result);
> $i=0;
>  if($number == 0) print "No data?";
>  elseif($number > 0){
>  print "Number of rows: $number";
> while($i < $number){
>  $dateval = mssql_result($result,$i,"dateval");
> echo "$dateval";
>  $i++;}
> }
> ?>
> 
> Now, how to connect to a DB2 database server without ODBC ?
> 
> My config is:
> Web Server: IIS on windows 2000 Server
> Database Server: IBM DB2 V7.1 on windows 2000 Server
> PHP4 for windows
> 
> Thanks.
> 
> Jerry
> 
> 
> 
> -- 
> PHP Database 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: RE: [PHP] write to multiple sql tables

2001-10-03 Thread Frank M. Kromann

Some databsaes allows batches of sql statements. Thes can be passed to the db server 
in one query and the statements are usally separated by ;

If you are executing a batch of statements each returning a result you will have to 
process each result in your code. This is supported by ODBC, MS SQL and FrontBase 
(that I know of)

If you want to insert/update data in multiple tables you might also want to choose a 
database with support for transactions, as this will ensure the consistancy of your 
data.

- Frank

> 
> PHP can only handle a  query at a time. If the database in question
> allows you to construct a such query where you can write to multiple
> files then you can. Go to the manual of your DB and look for the answer
> there. For instance; look at the syntax of INSERT.
> 
> Maxim Maletsky
> www.PHPBeginner.com
> 
> 
> -Original Message-
> From: sc [mailto:[EMAIL PROTECTED]] 
> Sent: giovedì 4 ottobre 2001 2.17
> To: [EMAIL PROTECTED]
> Subject: [PHP] write to multiple sql tables
> 
> 
> Hi;
> 
> Is there any easy way of writing to multiple mysql tables in the one
> database? ie. putting it all in the one query etc? instead of writing a
> heap of code...
> 
> Any help would be great...
> 
> thx.
> 
> -sc
> 
> -- 
> 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] MSSQL Support

2001-09-19 Thread Frank M. Kromann

Hi Jason

You can download and install FreeTDS (www.freetds.org). Then you can compule with the 
option --with-sybase=/usr/local/freetds. Thsi way you get the Sybase extension and 
this includes aliases for mssql_*.

Be aware the FreeTDS can be used with MSSQL server 4 and 6 and in some cases also for 
version 7 and 2000. These two has a bunch of new column types and features no 
accessable from DB-Library and FreeTDS.

- Frank

> I'm compiling PHP and have a request from one of my developers for MSSQL
> support in mod_php (4.0.6). However, I don't see a configure option for
> MSSQL. Is there a *secret* configure option or are the MSSQL functions
> built in by default?
> 
> +---+
> | +-+ Digitally Enhanced| 
> | |-O-O-| Portrait of:  | 
> | |  %  | Jason Wilson, | 
> | | --- | Systems Administrator |
> | +-+ Nextron, Inc. |
> +---+ 
> 




-- 
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] real simple regex

2001-09-18 Thread Frank M. Kromann

The imap_mail() function connects to a SMTP the same way mail() does. It just takes a 
few paremeters more allowing you to set Reply-To and other headers normaly defined in 
PHP.INI.

In general the imap functions can be used with IMAP¤ and POP3 servers to read mails.

- Frank

> but can imap replace my old mail() calls? Don't I have to get a server that 
> supports it or something??
> 
> the regex thing I already got working...
> 
> thanks...
> 
> At 21:53 17/9/2001 -0700, Frank M. Kromann wrote:
> >Take a look at http://php.net/manual/en/function.imap-rfc822-parse-adrlist.php
> >
> >This function will do the trick. You can also have a look at 
> >http://php.net/manual/en/function.imap-mail.php. This is an extended mail 
> >function and it works on both WIndows and *nix.
> >
> >- Frank
> >
> > > I had to write my own mail() function cuz PHP's does not work in Windows
> > > very well..
> > >
> > > But I suck at regex and I need to get the email address from the field 
> > from
> > > that can be something like:
> > > $from = "Christian Dechery <[EMAIL PROTECTED]>";
> > >
> > > so what I want is:
> > > the string between '<' and '>' or the last 'word' of the 'sentence' (for
> > > something like "\"Christian Dechery\" [EMAIL PROTECTED]").
> > >
> > > thanks...
> > >
> > > p.s: meu novo email é [EMAIL PROTECTED]
> > > 
> > > . Christian Dechery (lemming)
> > > . http://www.tanamesa.com.br
> > > . Gaita-L Owner / Web Developer
> > >
> > >
> > > --
> > > 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]
> > >
> > >
> > >
> 
> 
> _
> . Christian Dechery
> . . Gaita-L Owner / Web Developer
> . . http://www.webstyle.com.br
> . . http://www.tanamesa.com.br
> 
> 
> -- 
> 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] real simple regex

2001-09-17 Thread Frank M. Kromann

Take a look at http://php.net/manual/en/function.imap-rfc822-parse-adrlist.php

This function will do the trick. You can also have a look at 
http://php.net/manual/en/function.imap-mail.php. This is an extended mail function and 
it works on both WIndows and *nix.

- Frank

> I had to write my own mail() function cuz PHP's does not work in Windows 
> very well..
> 
> But I suck at regex and I need to get the email address from the field from 
> that can be something like:
> $from = "Christian Dechery <[EMAIL PROTECTED]>";
> 
> so what I want is:
> the string between '<' and '>' or the last 'word' of the 'sentence' (for 
> something like "\"Christian Dechery\" [EMAIL PROTECTED]").
> 
> thanks...
> 
> p.s: meu novo email é [EMAIL PROTECTED]
> 
> . Christian Dechery (lemming)
> . http://www.tanamesa.com.br
> . Gaita-L Owner / Web Developer
> 
> 
> -- 
> 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] What is PHP's equivalent?

2001-09-17 Thread Frank M. Kromann

Hi Eric,

You can use COM in PHP if your scripts run on Windows 32. You can also use Java clases 
directly from yor php scripts.

- Frank

> What is PHP's equivalent to ASP/COM or JSP/EJB?  Basically, I want to get an
> idea of what methods there are of having multi tier development in PHP.  Any
> information or links are appreciated.
> 
> 
> 
> Thanks,
> 
> Eric Lebetsamer
> 
> 
> 
> 
> 
> -- 
> 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] Large Text Fields from MS SQL DB Truncated

2001-07-02 Thread Frank M. Kromann

Have a look at these two settings in your php.ini

; Valid range 0 - 2147483647.  Default = 4096.
;mssql.textlimit = 4096

; Valid range 0 - 2147483647.  Default = 4096.
;mssql.textsize = 4096

- Frank

> Hi,
>   I've hit a little problem... When retreiving large TEXT data (equivilant to
> MySQL's MEDIUMTEXT) from a MS SQL database using PHP, the data becomes
> truncated after 4,095 bytes. I have tried connecting both with ODBC, and the
> MsSQL php functions, but to no avail. It works fine in ASP ;-) Any
> suggestions?
> 
> Thanks very much,
> 
> - James
> 
> Editor, VB Web
> ==
> Web   - http://www.vbweb.co.uk
> Email - [EMAIL PROTECTED]
> ICQ#  - 60612011
> Fax   - +44(0)8707052859
> ==
> 
> 
> -- 
> 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: RE: [PHP] mssql and uniqueidentifier's

2001-06-29 Thread Frank M. Kromann

Hi all,

The dll is not broken.

The type UNIQUEIDENTIFYER is a 16 byte binary value and is returned as such.

With versions of the php_mssql.dll distributed with php4.0.5 or before did not include 
proper support for binary data. This has been changed in php4.0.6.

I have hust added a small function to the extension called mssql_guid_string(). This 
function can be used to convert the binary value into a readable string. This function 
will be available in php4.0.7.

If you want a copy of the dll before the release of php4.0.7, please email me directly.

You could also let the server handle the convertion "select id from mytable" will 
return binary data if id is a UNIQUEIDENTIFIER. "select case(id as varchar(36)) from 
mytable" will do the convertion on the server and return a valid string.

- Frank

> well, the SQL statement you're trying to execute
> would help determine why it's not working... :)
> 
> just stating that "it's broken" is like saying
> "my car makes this funny noise" and hoping that
> a mechanic will give you a detailed diagnosis.
> 
> 
> > -Original Message-
> > From: Thomas Häger [mailto:[EMAIL PROTECTED]]
> > Subject: [PHP] mssql and uniqueidentifier's
> >
> >
> > Hi NG,
> >
> > my problem is following:
> >
> > I made a query on a table on a MS SQL Server 2000. The table have a
> > key-column from type uniqueidentifier. Ever i made a query on this column,
> > the result is not right. It comes back some crypt.
> >
> > For example:
> >
> > Value Database:  496467D1-7646-4094-8016-087083EA9432
> > Result shown in the browser, queried by php : ÑgdIFv"@?pfê"2
> >
> >
> > Can somebody help me, thanks,
> >
> > Thomas
> >
> >
> >
> >
> > --
> > 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] timezones

2001-04-30 Thread Frank M. Kromann

I would use gmktime() to create a UTC timestamp stored in the database, and then use 
the knowledge about each users timezone to convert this information when showing it.

- Frank

> I have a quick question regarding timezones ...
> 
> On the local side a record is inserted into the DB by someone in Michigan, while
> the server rests in CA. Thus a three hour difference. The local mktime() will
> create a timestamp for say 9:00am when in reality it was entered at 12:00noon
> in MI. I have 2 character timezones for all my users so it should be easy to
> convert the two.
> 
> putenv() won't work because of the fact that the timestamp created will be 
> 9:00 no matter what timezone you put it in. So what needs to be done is some
> recognition that 10800 seconds needs to be added to adjust the PST timestamp
> to an EST timestamp. Are there any functions out ther that do this?
> 
> --Joe
> 
> Joe Stump <[EMAIL PROTECTED]>
> 
> One is taught by experience to put a premium on those 
> few people who can appreciate you for what you are.  
> 
> 
> -- 
> 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] PHP, MSSQL7 & Transactions

2001-04-25 Thread Frank M. Kromann

you just have to execute a statement starting and ending the transaction.

BEGIN TRANSACTION

COMMIT

ROLLBACK

Yuu send thes commands to the server with mssql_query() as any other SQL statement.

- Frank

> I am trying to implement transactions using PHP and MSSQL 7 (Microsoft).  Please 
>tell me if there is a simple way of doing this, as there is for Interbase or Oracle, 
>using the appropriate functions.eg ***_rollback or whatever.
> 
> Regards
> Andrew 
> 




-- 
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-CVS] cvs: php4 /ext/fbsql php_fbsql.c

2001-04-25 Thread Frank M. Kromann

fmk Wed Apr 25 12:45:14 2001 EDT

  Modified files:  
/php4/ext/fbsql php_fbsql.c 
  Log:
  Remove c++ comment
  Move errormessage when FBExec is not running. This error should not show if we 
connect through a port number.
  
Index: php4/ext/fbsql/php_fbsql.c
diff -u php4/ext/fbsql/php_fbsql.c:1.13 php4/ext/fbsql/php_fbsql.c:1.14
--- php4/ext/fbsql/php_fbsql.c:1.13 Wed Apr 25 11:01:22 2001
+++ php4/ext/fbsql/php_fbsql.c  Wed Apr 25 12:45:13 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.c,v 1.13 2001/04/25 18:01:22 fmk Exp $ */
+/* $Id: php_fbsql.c,v 1.14 2001/04/25 19:45:13 fmk Exp $ */
 
 /* TODO:
  *
@@ -521,12 +521,6 @@
{
FBCExecHandler* execHandler = fbcehHandlerForHost(hostName,128);
list_entry le;
-   if (execHandler == NULL)
-   {
-   php_error(E_WARNING,"Cannot connect to host '%s'",hostName);
-   php_error(E_WARNING,fbcehClassErrorMessage());
-// return NULL;
-   }
result = malloc(sizeof(PHPFBLink));
result->retainCount = 1;
result->persistant  = persistant;
@@ -1115,7 +1109,15 @@
phpLink = phpfbGetLink(FB_SQL_G(linkIndex));
}
if (phpLink == NULL) RETURN_FALSE;
-/* printf("Select db at link %s@%s\n",phpLink->hostName,phpLink->userName); */
+   if (phpLink->execHandler == NULL)
+   {
+   int port = atoi(name);
+   if (port == 0 || port > 64535) {
+   php_error(E_WARNING,"Cannot connect to FBExec for database 
+'%s'",name);
+   php_error(E_WARNING,fbcehClassErrorMessage());
+   RETURN_FALSE;
+   }
+   }
 
database = phpfbSelectDB(INTERNAL_FUNCTION_PARAM_PASSTHRU,name,phpLink);
if (database == NULL) RETURN_FALSE;



-- 
PHP CVS 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-CVS] cvs: php4 /ext/fbsql php_fbsql.c

2001-04-25 Thread Frank M. Kromann

fmk Wed Apr 25 11:01:23 2001 EDT

  Modified files:  
/php4/ext/fbsql php_fbsql.c 
  Log:
  make fbsql_field_flags return a value
  
Index: php4/ext/fbsql/php_fbsql.c
diff -u php4/ext/fbsql/php_fbsql.c:1.12 php4/ext/fbsql/php_fbsql.c:1.13
--- php4/ext/fbsql/php_fbsql.c:1.12 Tue Apr 17 10:39:43 2001
+++ php4/ext/fbsql/php_fbsql.c  Wed Apr 25 11:01:22 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.c,v 1.12 2001/04/17 17:39:43 fmk Exp $ */
+/* $Id: php_fbsql.c,v 1.13 2001/04/25 18:01:22 fmk Exp $ */
 
 /* TODO:
  *
@@ -525,7 +525,7 @@
{
php_error(E_WARNING,"Cannot connect to host '%s'",hostName);
php_error(E_WARNING,fbcehClassErrorMessage());
-   return NULL;
+// return NULL;
}
result = malloc(sizeof(PHPFBLink));
result->retainCount = 1;
@@ -2780,17 +2780,16 @@
add_property_string(return_value, "name",   
(char*)fbccmdLabelName(fbcmdColumnMetaDataAtIndex(result->metaData, column)),1);
add_property_string(return_value, "table",  
(char*)fbccmdTableName(fbcmdColumnMetaDataAtIndex(result->metaData,column)),1);
add_property_long(return_value,   "max_length", 
fbcdmdLength(fbccmdDatatype(fbcmdColumnMetaDataAtIndex(result->metaData,column;
-   add_property_string(return_value, "type",   (char*)fbcdmdDatatypeString 
(fbcmdDatatypeMetaDataAtIndex(result->metaData, column)),1);
+   add_property_string(return_value, "type",   
+(char*)fbcdmdDatatypeString(fbcmdDatatypeMetaDataAtIndex(result->metaData, 
+column)),1);
+   add_property_long(return_value,   "not_null",   
+!fbccmdIsNullable(fbcmdColumnMetaDataAtIndex(result->metaData, column)));
 /* Remember to add the rest */
-/* add_property_long(return_value, 
"not_null",IS_NOT_NULL(mysql_field->flags)?1:0); */
-/* add_property_long(return_value, 
"primary_key",IS_PRI_KEY(mysql_field->flags)?1:0); */
-/* add_property_long(return_value, 
"multiple_key",(mysql_field->flags&MULTIPLE_KEY_FLAG?1:0)); */
-/* add_property_long(return_value, 
"unique_key",(mysql_field->flags&UNIQUE_KEY_FLAG?1:0)); */
-/* add_property_long(return_value, "numeric",IS_NUM(mysql_field->type)?1:0); */
-/* add_property_long(return_value, "blob",IS_BLOB(mysql_field->flags)?1:0); */
-/* add_property_string(return_value, 
"type",php_mysql_get_field_name(mysql_field->type), 1); */
-/* add_property_long(return_value, 
"unsigned",(mysql_field->flags&UNSIGNED_FLAG?1:0)); */
-/* add_property_long(return_value, 
"zerofill",(mysql_field->flags&ZEROFILL_FLAG?1:0)); */
+/* add_property_long(return_value, 
+"primary_key",IS_PRI_KEY(fbsql_field->flags)?1:0); */
+/* add_property_long(return_value, 
+"multiple_key",(fbsql_field->flags&MULTIPLE_KEY_FLAG?1:0)); */
+/* add_property_long(return_value, 
+"unique_key",(fbsql_field->flags&UNIQUE_KEY_FLAG?1:0)); */
+/* add_property_long(return_value, "numeric",IS_NUM(fbsql_field->type)?1:0); */
+/* add_property_long(return_value, "blob",IS_BLOB(fbsql_field->flags)?1:0); */
+/* add_property_long(return_value, 
+"unsigned",(fbsql_field->flags&UNSIGNED_FLAG?1:0)); */
+/* add_property_long(return_value, 
+"zerofill",(fbsql_field->flags&ZEROFILL_FLAG?1:0)); */
 }
 /* }}} */
 
@@ -2843,7 +2842,7 @@
 /* }}} */
 
 
-/* {{{ proto string mysql_field_name(int result, int field_index)
+/* {{{ proto string fbsql_field_name(int result, int field_index)
*/
 PHP_FUNCTION(fbsql_field_name)
 {
@@ -3069,7 +3068,7 @@
 /* }}} */
 
 
-/* {{{ proto string fbsql_field_flags(int result, int field_index)
+/* {{{ proto string string fbsql_field_flags(int result[, int field_index])
*/
 PHP_FUNCTION(fbsql_field_flags)
 {
@@ -3078,6 +3077,8 @@
int resultIndex;
PHPFBResult* result;
int column;
+   char buf[512];
+   int  len;
FBSQLLS_FETCH();
 
resultIndex = FB_SQL_G(resultIndex);
@@ -3109,12 +3110,51 @@
RETURN_FALSE;
}
}
-   if (array_init(return_value)==FAILURE)
-   {
-   RETURN_FALSE;
+   strcpy(buf, "");
+   if (!fbccmdIsNullable(fbcmdColumnMetaDataAtIndex(result->metaData, column))) {
+   strcat(buf, "not_null ");
}
-   /* We should create the result -- currently empty */
-
+#if 0
+   if (IS_PRI_KEY(fbsql_field->flags)) {
+   strcat(buf, "primary_key ");
+   }
+   if (fbsql_field->flags&UNIQUE_KEY_FLAG) {
+   strcat(buf, "unique_key ");
+   }
+   if (fbsql_field->flags&MULTIPLE_KEY_FLAG) {
+   strcat(buf, "multiple_key ");
+   }
+   if (IS_BLOB(fbsql_field->flags)) {
+   strcat(buf, "blob ");
+   }
+   if (fbsql_field->flags&UNSIGNED_FLAG) 

[PHP-CVS] cvs: php4 /ext/fbsql php_fbsql.h

2001-04-25 Thread Frank M. Kromann

fmk Wed Apr 25 11:00:55 2001 EDT

  Modified files:  
/php4/ext/fbsql php_fbsql.h 
  Log:
  removed unused code
  
Index: php4/ext/fbsql/php_fbsql.h
diff -u php4/ext/fbsql/php_fbsql.h:1.3 php4/ext/fbsql/php_fbsql.h:1.4
--- php4/ext/fbsql/php_fbsql.h:1.3  Tue Apr 17 10:39:43 2001
+++ php4/ext/fbsql/php_fbsql.h  Wed Apr 25 11:00:55 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.h,v 1.3 2001/04/17 17:39:43 fmk Exp $ */
+/* $Id: php_fbsql.h,v 1.4 2001/04/25 18:00:55 fmk Exp $ */
 
 #define HAVE_FBSQL 1
 
@@ -28,10 +28,6 @@
 #define HAVE_FBSQL 1
 #endif
 #if HAVE_FBSQL
-
-#ifdef ZTS
-#include "TSRM.h"
-#endif
 
 extern zend_module_entry fbsql_module_entry;
 #define fbsql_module_ptr &fbsql_module_entry



-- 
PHP CVS 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: Re[3]: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c

2001-04-23 Thread Frank M. Kromann

We can not use regestry settingns unless we have an installer or at least a reg file 
to help users configure these.

I woud suggest the method with environment variables as step one.

- Frank

> Monday, April 23, 2001, 10:19:36 PM, you wrote:
> > It should be the Program Files directory, concatenated with 'PHP';  Under
> > Windows, we should behave like Windows apps...
> 
> we should use registry entries to determine/set the path(s), if those
> entries aren't present it could default to some hardcoded values...
> 
> daniel
> 
> > Zeev
> >
> > At 21:50 23/4/2001, James Moore wrote:
> >>how about defaulting to SystemDrive\\php4 but also allowing a envromental
> >>variable to be set so
> >>
> >>#define PHP_BINDIR (getenv("PHP_BinDir"))?getenv("PHP_BinDir"):c:\\php4
> >>
> >>or somthing like that which works in C
> >>
> >>- James
> >>
> >> > -Original Message-
> >> > From: Frank M. Kromann [mailto:[EMAIL PROTECTED]]
> >> > Sent: 23 April 2001 19:24
> >> > To: James Moore
> >> > Cc: [EMAIL PROTECTED]
> >> > Subject: Re: RE: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c
> >> >
> >> >
> >> > Hi James,
> >> >
> >> > No problem. I change it to
> >> >
> >> > #define PHP_CONFIG_FILE_PATH getenv("SystemRoot")
> >> >
> >> > What about all the other directories ? These should be configureable too.
> >> >
> >> > - Frank
> >> >
> >> > > > fmk   Mon Apr 23 10:33:22 2001 EDT
> >> > > >
> >> > > >   Modified files:
> >> > > > /php4/mainconfig.w32.h php_ini.c
> >> > > > +
> >> > > > +/* Define directory constants for php and pear */
> >> > > > +#define PHP_BINDIR "c:\\php4"
> >> > > > +#define PHP_LIBDIR "c:\\php4"
> >> > > > +#define PHP_DATADIR "c:\\php4"
> >> > > > +#define PHP_SYSCONFDIR "c:\\php4"
> >> > > > +#define PHP_LOCALSTATEDIR "c:\\php4"
> >> > > > +#define PHP_CONFIG_FILE_PATH "c:\\winnt"
> >> > > > +#define PEAR_INSTALLDIR "c:\\php4\\pear"
> >> > >
> >> > > Ugh thats very very ugly.. I dont want my files there can you please use
> >> > > SYSROOT instead of c:\\winnt please.
> >> > >
> >> > > - James
> >> > >
> >> > >
> >> > >
> >> > > --
> >> > > PHP CVS 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 CVS 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 CVS 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]
> 
> ZS> --
> ZS> Zeev Suraski <[EMAIL PROTECTED]>
> ZS> CTO &  co-founder, Zend Technologies Ltd. http://www.zend.com/
> 
> /*--
> daniel beulshausen - [EMAIL PROTECTED]
> using php on windows? http://www.php4win.de
> 
> 
> 
> 




-- 
PHP CVS 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: RE: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c

2001-04-23 Thread Frank M. Kromann

Hi James,

No problem. I change it to 

#define PHP_CONFIG_FILE_PATH getenv("SystemRoot")

What about all the other directories ? These should be configureable too.

- Frank

> > fmk Mon Apr 23 10:33:22 2001 EDT
> >
> >   Modified files:
> > /php4/main  config.w32.h php_ini.c
> > +
> > +/* Define directory constants for php and pear */
> > +#define PHP_BINDIR "c:\\php4"
> > +#define PHP_LIBDIR "c:\\php4"
> > +#define PHP_DATADIR "c:\\php4"
> > +#define PHP_SYSCONFDIR "c:\\php4"
> > +#define PHP_LOCALSTATEDIR "c:\\php4"
> > +#define PHP_CONFIG_FILE_PATH "c:\\winnt"
> > +#define PEAR_INSTALLDIR "c:\\php4\\pear"
> 
> Ugh thats very very ugly.. I dont want my files there can you please use
> SYSROOT instead of c:\\winnt please.
> 
> - James
> 
> 
> 
> -- 
> PHP CVS 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 CVS 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-CVS] cvs: php4 /main config.w32.h php_ini.c

2001-04-23 Thread Frank M. Kromann

fmk Mon Apr 23 10:33:22 2001 EDT

  Modified files:  
/php4/main  config.w32.h php_ini.c 
  Log:
  Fix build on WIn32
  Should the new directorys be static?
  
Index: php4/main/config.w32.h
diff -u php4/main/config.w32.h:1.40 php4/main/config.w32.h:1.41
--- php4/main/config.w32.h:1.40 Sat Mar 10 19:49:21 2001
+++ php4/main/config.w32.h  Mon Apr 23 10:33:22 2001
@@ -1,5 +1,5 @@
 /* config.w32.h.  Configure file for win32 platforms  */
-/* tested only with MS Visual C++ V5 */
+/* tested only with MS Visual C++ V6 */
 
 
 /* Define if PHP to setup it's own SIGCHLD handler (not needed on Win32) */
@@ -325,3 +325,12 @@
 #define PHP_EXTENSION_DIR NULL
 
 #define SIZEOF_INT 4
+
+/* Define directory constants for php and pear */
+#define PHP_BINDIR "c:\\php4"
+#define PHP_LIBDIR "c:\\php4"
+#define PHP_DATADIR "c:\\php4"
+#define PHP_SYSCONFDIR "c:\\php4"
+#define PHP_LOCALSTATEDIR "c:\\php4"
+#define PHP_CONFIG_FILE_PATH "c:\\winnt"
+#define PEAR_INSTALLDIR "c:\\php4\\pear"
Index: php4/main/php_ini.c
diff -u php4/main/php_ini.c:1.57 php4/main/php_ini.c:1.58
--- php4/main/php_ini.c:1.57Sat Apr 21 18:09:13 2001
+++ php4/main/php_ini.c Mon Apr 23 10:33:22 2001
@@ -18,7 +18,9 @@
 
 
 #include "php.h"
+#ifndef PHP_WIN32
 #include "build-defs.h"
+#endif
 #include "ext/standard/info.h"
 #include "zend_ini.h"
 #include "php_ini.h"



-- 
PHP CVS 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] ACSII in PHP

2001-04-18 Thread Frank M. Kromann

You can use

$temp = ord("A");

And you will then see that it's 65 end not 99 :-)

- Frank

> Is there any function in PHP that I could use to know the number of the
> ASCII table of letter "A" for example?
> 
> 
> something like: $tmp=function_name("A");
> 
> $tmp==99 ("A" is 99 in ASCII table).
> 
> regards,
> 
> Augusto
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 




-- 
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-CVS] cvs: php4 /ext/fbsql php_fbsql.c php_fbsql.h

2001-04-17 Thread Frank M. Kromann

fmk Tue Apr 17 10:39:43 2001 EDT

  Modified files:  
/php4/ext/fbsql php_fbsql.h php_fbsql.c 
  Log:
  Adding fbsql_fetch_assoc() functon
  
Index: php4/ext/fbsql/php_fbsql.h
diff -u php4/ext/fbsql/php_fbsql.h:1.2 php4/ext/fbsql/php_fbsql.h:1.3
--- php4/ext/fbsql/php_fbsql.h:1.2  Wed Apr  4 13:10:14 2001
+++ php4/ext/fbsql/php_fbsql.h  Tue Apr 17 10:39:43 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.h,v 1.2 2001/04/04 20:10:14 fmk Exp $ */
+/* $Id: php_fbsql.h,v 1.3 2001/04/17 17:39:43 fmk Exp $ */
 
 #define HAVE_FBSQL 1
 
@@ -67,6 +67,7 @@
 PHP_FUNCTION(fbsql_num_fields);
 PHP_FUNCTION(fbsql_fetch_row);
 PHP_FUNCTION(fbsql_fetch_array);
+PHP_FUNCTION(fbsql_fetch_assoc);
 PHP_FUNCTION(fbsql_fetch_object);
 PHP_FUNCTION(fbsql_data_seek);
 PHP_FUNCTION(fbsql_fetch_lengths);
@@ -87,6 +88,8 @@
 PHP_FUNCTION(fbsql_username);
 PHP_FUNCTION(fbsql_password);
 PHP_FUNCTION(fbsql_warnings);
+
+static void php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type);
 
 ZEND_BEGIN_MODULE_GLOBALS(fbsql)
long allowPersistent;
Index: php4/ext/fbsql/php_fbsql.c
diff -u php4/ext/fbsql/php_fbsql.c:1.11 php4/ext/fbsql/php_fbsql.c:1.12
--- php4/ext/fbsql/php_fbsql.c:1.11 Mon Apr 16 09:27:11 2001
+++ php4/ext/fbsql/php_fbsql.c  Tue Apr 17 10:39:43 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.c,v 1.11 2001/04/16 16:27:11 fmk Exp $ */
+/* $Id: php_fbsql.c,v 1.12 2001/04/17 17:39:43 fmk Exp $ */
 
 /* TODO:
  *
@@ -201,6 +201,7 @@
PHP_FE(fbsql_num_fields,NULL)
PHP_FE(fbsql_fetch_row, NULL)
PHP_FE(fbsql_fetch_array,   NULL)
+   PHP_FE(fbsql_fetch_assoc,   NULL)
PHP_FE(fbsql_fetch_object,  NULL)
PHP_FE(fbsql_data_seek, NULL)
PHP_FE(fbsql_fetch_lengths, NULL)
@@ -2523,11 +2524,29 @@
 /* }}} */
 
 
-/* {{{ proto object fbsql_fetch_object(int result [, int result_typ])
+/* {{{ proto array fbsql_fetch_row(int result)
+   */
+PHP_FUNCTION(fbsql_fetch_row)
+{
+   php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, FBSQL_NUM);
+}
+/* }}} */
+
+
+/* {{{ proto object fbsql_fetch_assoc(int result)
*/
+PHP_FUNCTION(fbsql_fetch_assoc)
+{
+   php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, FBSQL_ASSOC);
+}
+/* }}} */
+
+
+/* {{{ proto object fbsql_fetch_object(int result [, int result_type])
+   */
 PHP_FUNCTION(fbsql_fetch_object)
 {
-   PHP_FN(fbsql_fetch_array)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+   php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, FBSQL_ASSOC);
if (return_value->type==IS_ARRAY)
{
return_value->type=IS_OBJECT;
@@ -2538,72 +2557,15 @@
 /* }}} */
 
 
-/* {{{ proto array fbsql_fetch_row(int result)
-   */
-PHP_FUNCTION(fbsql_fetch_row)
+/* {{{ proto array fbsql_fetch_array(int result [, int result_type])
+   Fetch a result row as an array (associative, numeric or both)*/
+PHP_FUNCTION(fbsql_fetch_array)
 {
-   int   argc= ARG_COUNT(ht);
-   zval**argv[2];
-   int i;
-   int resultIndex;
-   PHPFBResult*   result;
-   int rowIndex ;
-   void**  row;
-   FBSQLLS_FETCH();
-
-   resultIndex = FB_SQL_G(resultIndex);
-
-   if ((argc < 0) || (argc > 1)) WRONG_PARAM_COUNT;
-   if (zend_get_parameters_ex(argc,&argv[0])==FAILURE) RETURN_FALSE;
-
-   if (argc >= 1) {
-   convert_to_long_ex(argv[0]);
-   resultIndex = (*argv[0])->value.lval;
-   }
-   result = phpfbGetResult(resultIndex);
-   if (result == NULL) RETURN_FALSE;
-   
-   rowIndex = result->rowIndex;
-
-   if (result->fetchHandle == NULL) {
-   RETURN_FALSE;
-   }
-   if (result->rowCount == 0) {
-   RETURN_FALSE;
-   }
-   if (result->rowCount == 0x7fff) {
-   if (!phpfbFetchRow(result,rowIndex)) {
-   RETURN_FALSE;
-   }
-   }
-   if (!(row = fbcrhRowAtIndex(result->rowHandler,rowIndex))) {
-   RETURN_FALSE;
-   }
-   if (array_init(return_value)==FAILURE) {
-   RETURN_FALSE;
-   }
-   result->row = row;
-   for (i=0; i < result->columnCount; i++) {
-   char*value;
-   unsigned int length;
-   if (row[i]) {
-   phpfbColumnAsString(result,i,row[i],&length,&value);
-   add_index_stringl(return_value,i,value,length,0);
-   }
-   else {
-   add_index_unset(return_value,i);
-   }
-   }
-   result->rowIndex= rowIndex+1;
-   result->columnIndex = 0;
-   FB_SQL_G(resultIndex) = resultIndex;
+   php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAM_

Re: [PHP] Wrong parameter count

2001-04-16 Thread Frank M. Kromann

According to the documentation http://php.net/manual/en/function.mysql-result.php 
mysql_result takes 2 and an optional third parameter. The second parameter should be 
the row number.

- Frank

> Hi, can some one please help me figure out why the value $device isn't being passed 
>on out of the select box? i keep getting this message when i view the source 
> 
> Wrong parameter count for mysql_result() in D:\erentals/1.php on line 19
> 
> 
> 
> 
>$query ="SELECT DISTINCT device FROM 3backup";
>   $result = mysql_query($query);
>   $device = mysql_result($rs); // line 19 
>   while($row = mysql_fetch_array($result)){
> echo ''.$row[device].'';
>   }
> ?>
> 
> 
>
> 
>
> 
>  echo mysql_error();?>
> 
>  ?>   
> 
> 
> 
> 
>  $foo = "SELECT * FROM 3backup WHERE device='$device' ORDER BY device";
> 
>  $result = mysql_query($foo,$db); 
> //$result = mysql_db_query('test',$foo);
> echo "$foo";
> echo mysql_error();
> }
> ?>
> 
> Peter Houchin
> [EMAIL PROTECTED]
> =
>  _  __   //_/_/_\
>/  |_/ /_/_/___  __  __   __  /\_/_/_\  /_/ /_/ /_/  /_/  
>\   _ /
>  ___\_\_\/ /_/_/_/ /_//\/_/\_/ \/\_/
>  \_//_/_/ /_/_/_/ /_/ \/_/v
>     
> /_/_/_/_/  /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
>/_/_ _/_/ __  __   __  /_/   __ __
>   /_/_/_/_/ /_/_/_/ /_/  /_/ /_/ /_/\_\/_//_/_/_/
>  /_/  \_\  /_/ _/  /_//\/_/ /_/ /_/__\_\  /_/___ _\_\_/_/\_\/_/_/_/ /_/ \/_/ /_/ 
>/_/\_\/_/_/_//_/_/_/
> =
> Telephone : (03) 9329 1455  Facsimile : (03) 9329 6755
> * We rent the dot in .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-CVS] cvs: php4 /ext/fbsql php_fbsql.c

2001-04-16 Thread Frank M. Kromann

fmk Mon Apr 16 09:27:12 2001 EDT

  Modified files:  
/php4/ext/fbsql php_fbsql.c 
  Log:
  Fixing memory leek on CancelFetch.
  
Index: php4/ext/fbsql/php_fbsql.c
diff -u php4/ext/fbsql/php_fbsql.c:1.10 php4/ext/fbsql/php_fbsql.c:1.11
--- php4/ext/fbsql/php_fbsql.c:1.10 Tue Apr 10 11:44:51 2001
+++ php4/ext/fbsql/php_fbsql.c  Mon Apr 16 09:27:11 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.c,v 1.10 2001/04/10 18:44:51 fmk Exp $ */
+/* $Id: php_fbsql.c,v 1.11 2001/04/16 16:27:11 fmk Exp $ */
 
 /* TODO:
  *
@@ -269,7 +269,10 @@
 
if (result->retainCount == 0)
{
-   if (result->fetchHandle) 
fbcdcCancelFetch(result->connection,result->fetchHandle);
+   if (result->fetchHandle) {
+   FBCMetaData *md = 
+fbcdcCancelFetch(result->connection,result->fetchHandle);
+   fbcmdRelease(md);
+   }
if (result->rowHandler)  fbcrhRelease(result->rowHandler);
if (result->ResultmetaData)
fbcmdRelease(result->ResultmetaData);
 /* if (result->metaData)fbcmdRelease(result->metaData);  */
@@ -717,7 +720,7 @@
 {
PHPFBDatabase* result = NULL;
list_entry *lep;
-   unsigned i;
+   unsigned i, port;
char name[1024];
FBSQLLS_FETCH();
 
@@ -742,8 +745,14 @@
else
{
list_entry le;
-   FBCDatabaseConnection* c = 
fbcdcConnectToDatabase(databaseName,link->hostName,FB_SQL_G(databasePassword));
+   FBCDatabaseConnection* c;
FBCMetaData*   md;
+
+   port = atoi(databaseName);
+   if (port>0 && port<65535)
+   c = fbcdcConnectToDatabaseUsingPort(link->hostName, 
+port,FB_SQL_G(databasePassword));
+   else
+   c = 
+fbcdcConnectToDatabase(databaseName,link->hostName,FB_SQL_G(databasePassword));
if (c == NULL)
{
php_error(E_WARNING, fbcdcClassErrorMessage());
@@ -942,68 +951,85 @@
 /* }}} */
 
 
-/* {{{ proto string fbsql_hostname([string host_name])
+/* {{{ proto string fbsql_hostname(int link_identifier [, string host_name])
*/
 PHP_FUNCTION(fbsql_hostname)
 {
int argc = ARG_COUNT(ht);
-   zval**argv[1];
+   zval**argv[2];
+   PHPFBLink* phpLink = NULL;
FBSQLLS_FETCH();
 
-   if ((argc < 0) || (argc > 1)) WRONG_PARAM_COUNT;
-   if (zend_get_parameters_ex(argc, &argv[0])==FAILURE) RETURN_FALSE;
+   if ((argc < 1) || (argc > 2)) WRONG_PARAM_COUNT;
+   if (zend_get_parameters_ex(argc,&argv[0],&argv[1])==FAILURE) RETURN_FALSE;
+
+   convert_to_long_ex(argv[0]);
+   phpLink = phpfbGetLink((*argv[0])->value.lval);
+   if (phpLink == NULL) RETURN_FALSE;
 
-   phpfbestrdup(FB_SQL_G(hostName), &return_value->value.str.len, 
&return_value->value.str.val);
+   phpfbestrdup(phpLink->hostName, &return_value->value.str.len, 
+&return_value->value.str.val);
return_value->type = IS_STRING;
-   if (argc >= 1)
+   if (argc == 2)
{
-   convert_to_string_ex(argv[0]);
-   free(FB_SQL_G(hostName));
-   FB_SQL_G(hostName) = strdup((*argv[0])->value.str.val);
+   convert_to_string_ex(argv[1]);
+   if (phpLink->hostName) free(phpLink->hostName);
+   phpLink->hostName = strdup((*argv[1])->value.str.val);
}
 }
 /* }}} */
 
 
-/* {{{ proto string fbsql_database([string database])
+/* {{{ proto string fbsql_database(int link_identifier [, string database])
*/
 PHP_FUNCTION(fbsql_database)
 {
int  argc = ARG_COUNT(ht);
-   zval**argv[1];
+   zval**argv[2];
+   PHPFBLink* phpLink = NULL;
FBSQLLS_FETCH();
 
-   if ((argc < 0) || (argc > 1)) WRONG_PARAM_COUNT;
-   if (zend_get_parameters_ex(argc, &argv[0])==FAILURE) RETURN_FALSE;
+   if ((argc < 1) || (argc > 2)) WRONG_PARAM_COUNT;
+   if (zend_get_parameters_ex(argc,&argv[0],&argv[1])==FAILURE) RETURN_FALSE;
+
+   convert_to_long_ex(argv[0]);
+   phpLink = phpfbGetLink((*argv[0])->value.lval);
+   if (phpLink == NULL) RETURN_FALSE;
 
-   phpfbestrdup(FB_SQL_G(databaseName), &return_value->value.str.len, 
&return_value->value.str.val);
+   phpfbestrdup(phpLink->currentDatabase->databaseName, 
+&return_value->value.str.len, &return_value->value.str.val);
return_value->type = IS_STRING;
-   if (argc >= 1)
+   if (argc == 2)
{
-   convert_to_string_ex(argv[0]);
-   free(FB_SQL_G(databaseName));
-   FB_SQL_G(databaseName) = strdup((*argv[0])->value.str.val);
+   convert_to_str

[PHP-CVS] cvs: php4 /ext/fbsql php_fbsql.c

2001-04-10 Thread Frank M. Kromann

fmk Tue Apr 10 11:44:51 2001 EDT

  Modified files:  
/php4/ext/fbsql php_fbsql.c 
  Log:
  Fixing database password to actually work
  
Index: php4/ext/fbsql/php_fbsql.c
diff -u php4/ext/fbsql/php_fbsql.c:1.9 php4/ext/fbsql/php_fbsql.c:1.10
--- php4/ext/fbsql/php_fbsql.c:1.9  Wed Apr  4 13:10:14 2001
+++ php4/ext/fbsql/php_fbsql.c  Tue Apr 10 11:44:51 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.c,v 1.9 2001/04/04 20:10:14 fmk Exp $ */
+/* $Id: php_fbsql.c,v 1.10 2001/04/10 18:44:51 fmk Exp $ */
 
 /* TODO:
  *
@@ -408,10 +408,6 @@
name[sizeof(name)-1] = 0;
fbsql_globals->hostName = strdup(name);
}
-/* fbsql_globals->userName = strdup(fbsql_globals->userName); */
-/* fbsql_globals->userPassword = strdup(fbsql_globals->userPassword); 
*/
-/* fbsql_globals->databaseName = strdup(fbsql_globals->databaseName); 
*/
-/* fbsql_globals->databasePassword = strdup(fbsql_globals->databasePassword); */
 
fbsql_globals->persistantCount  = 0;
fbsql_globals->linkCount= 0;
@@ -713,13 +709,9 @@
 }
 /* }}} */
 
-
-/* {{{ proto int fbsql_select_db(string database_name [, int link_identifier]
-   */
 PHPFBDatabase* phpfbSelectDB 
 (  INTERNAL_FUNCTION_PARAMETERS,
char*databaseName,
-   char*databasePassword,
PHPFBLink*   link
 )
 {
@@ -750,7 +742,7 @@
else
{
list_entry le;
-   FBCDatabaseConnection* c = 
fbcdcConnectToDatabase(databaseName,link->hostName,databasePassword);
+   FBCDatabaseConnection* c = 
+fbcdcConnectToDatabase(databaseName,link->hostName,FB_SQL_G(databasePassword));
FBCMetaData*   md;
if (c == NULL)
{
@@ -800,7 +792,7 @@
result->index= zend_list_insert((PHPFBDatabase*)(le.ptr), 
le_dba);
result->link = phpfbRetainLink(link);
result->databaseName = strdup(databaseName);
-   result->databasePassword = strdup(databasePassword);
+   result->databasePassword = strdup(FB_SQL_G(databasePassword));
result->connection   = c;
result->errorNo  = 0;
result->errorText= NULL;
@@ -1010,7 +1002,7 @@
if (argc >= 1)
{
convert_to_string_ex(argv[0]);
-   free(FB_SQL_G(hostName));
+   free(FB_SQL_G(databasePassword));
FB_SQL_G(databasePassword) = strdup((*argv[0])->value.str.val); 
}
 }
@@ -1098,7 +1090,7 @@
if (phpLink == NULL) RETURN_FALSE;
 /* printf("Select db at link %s@%s\n",phpLink->hostName,phpLink->userName); */
 
-   database = phpfbSelectDB(INTERNAL_FUNCTION_PARAM_PASSTHRU,name,"",phpLink);
+   database = phpfbSelectDB(INTERNAL_FUNCTION_PARAM_PASSTHRU,name,phpLink);
if (database == NULL) RETURN_FALSE;
 
phpLink->currentDatabase  = database;
@@ -1147,7 +1139,7 @@
link = (*argv[3])->value.lval;
}
if ((phpLink = phpfbGetLink(link))==NULL) RETURN_FALSE;
-   if ((phpDatabase = 
phpfbSelectDB(INTERNAL_FUNCTION_PARAM_PASSTHRU,databaseName,"",phpLink)) == NULL) 
RETURN_FALSE;
+   if ((phpDatabase = 
+phpfbSelectDB(INTERNAL_FUNCTION_PARAM_PASSTHRU,databaseName,phpLink)) == NULL) 
+RETURN_FALSE;
{
char buffer[1024];
sprintf(buffer,"SET AUTHORIZATION %s;",userName);
@@ -1348,7 +1340,7 @@
if (phpLink == NULL) RETURN_FALSE;
}
 
-   phpDatabase = phpfbSelectDB(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
databaseName,"",phpLink);
+   phpDatabase = phpfbSelectDB(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
+databaseName,phpLink);
if (phpDatabase == NULL) RETURN_FALSE;
 
 /* printf("Stop db %x\n",phpDatabase->connection); */
@@ -1698,7 +1690,7 @@
}
if (phpLink == NULL) RETURN_FALSE;
 /* printf("Query db at link %s@%s\n",phpLink->hostName,phpLink->userName); */
-   phpDatabase = phpfbSelectDB(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
databaseName,"",phpLink);
+   phpDatabase = phpfbSelectDB(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
+databaseName,phpLink);
if (phpDatabase == NULL) RETURN_FALSE;
  
phpResult = phpfbQuery(INTERNAL_FUNCTION_PARAM_PASSTHRU,sql,phpDatabase);
@@ -1818,11 +1810,11 @@
   
if (databaseName == NULL)
{
-   phpLink->currentDatabase = 
phpfbSelectDB(INTERNAL_FUNCTION_PARAM_PASSTHRU, FB_SQL_G(databaseName),"",phpLink);
+   phpLink->currentDatabase = 
+phpfbSelectDB(INTERNAL_FUNCTION_PARAM_PASSTHRU, FB_SQL_G(databaseName),phpLink);
}
else 
{
-   phpLink->currentDatabase = 
phpfbSelectDB(INTERNAL_FUNCTION_PARAM_PASSTHRU, datab

[PHP-CVS] cvs: php4 /ext/fbsql php_fbsql.c php_fbsql.h

2001-04-04 Thread Frank M. Kromann

fmk Wed Apr  4 13:10:14 2001 EDT

  Modified files:  
/php4/ext/fbsql php_fbsql.h php_fbsql.c 
  Log:
  Adding empty RSHUTDOWN function.
  
Index: php4/ext/fbsql/php_fbsql.h
diff -u php4/ext/fbsql/php_fbsql.h:1.1 php4/ext/fbsql/php_fbsql.h:1.2
--- php4/ext/fbsql/php_fbsql.h:1.1  Tue Mar 13 12:58:47 2001
+++ php4/ext/fbsql/php_fbsql.h  Wed Apr  4 13:10:14 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.h,v 1.1 2001/03/13 20:58:47 fmk Exp $ */
+/* $Id: php_fbsql.h,v 1.2 2001/04/04 20:10:14 fmk Exp $ */
 
 #define HAVE_FBSQL 1
 
@@ -39,8 +39,9 @@
 #include 
 
 extern PHP_MINIT_FUNCTION(fbsql);
-extern PHP_RINIT_FUNCTION(fbsql);
 extern PHP_MSHUTDOWN_FUNCTION(fbsql);
+extern PHP_RINIT_FUNCTION(fbsql);
+extern PHP_RSHUTDOWN_FUNCTION(fbsql);
 PHP_MINFO_FUNCTION(fbsql);
 PHP_FUNCTION(fbsql_connect);
 PHP_FUNCTION(fbsql_pconnect);
@@ -106,7 +107,7 @@
long databaseCount;
long resultCount;
 
-   int linkIndex;
+   unsigned int linkIndex;
int databaseIndex;
int resultIndex;
 ZEND_END_MODULE_GLOBALS(fbsql)
Index: php4/ext/fbsql/php_fbsql.c
diff -u php4/ext/fbsql/php_fbsql.c:1.8 php4/ext/fbsql/php_fbsql.c:1.9
--- php4/ext/fbsql/php_fbsql.c:1.8  Tue Apr  3 11:09:02 2001
+++ php4/ext/fbsql/php_fbsql.c  Wed Apr  4 13:10:14 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.c,v 1.8 2001/04/03 18:09:02 fmk Exp $ */
+/* $Id: php_fbsql.c,v 1.9 2001/04/04 20:10:14 fmk Exp $ */
 
 /* TODO:
  *
@@ -237,7 +237,7 @@
PHP_MINIT(fbsql),
PHP_MSHUTDOWN(fbsql),
PHP_RINIT(fbsql),
-   NULL,
+   PHP_RSHUTDOWN(fbsql),
PHP_MINFO(fbsql),
STANDARD_MODULE_PROPERTIES
 };
@@ -361,12 +361,13 @@
 
 void phpfbReleaseLink (PHPFBLink* link)
 {
+   FBSQLLS_FETCH();
if (link)
{
link->retainCount--;
if (link->retainCount == 0)
{
-/* if (link->index == FB_SQL_G(linkIndex) FB_SQL_G(linkIndex = 0; 
*/
+   if (link->index == FB_SQL_G(linkIndex)) FB_SQL_G(linkIndex)--;
free(link->hostName);
free(link->userName);
free(link->userPassword);
@@ -446,6 +447,11 @@
 }
 
 PHP_RINIT_FUNCTION(fbsql)
+{
+   return SUCCESS;
+}
+
+PHP_RSHUTDOWN_FUNCTION(fbsql)
 {
return SUCCESS;
 }



-- 
PHP CVS 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] Change the filename sent via html header

2001-04-03 Thread Frank M. Kromann


You can use something like this:



this will change the mime type and filename of the content send to the browser.

- Frank

> On 4/3/01 12:34 PM, "Spunk S. Spunk III" <[EMAIL PROTECTED]> wrote:
> 
> > I've got a script that returns a smil file in a header but I'd like to
> > change the name of the file. The file is sent as blah.php (even though it is
> > a smil file) but I'd like to be able to name it something like blah.sml. Is
> > there a way to do this?
> > 
> > Spunk
> > 
> If you are using include() to send the file in the header, then it doesn't
> matter WHAT the extension is. All files sent through include() are parsed as
> if they were PHP, with or without the php extension. So, as long as nothing
> in your smil file looks like php, then it will just get passed through (as
> if it were html).
> 
> 
> -- 
> 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-CVS] cvs: php4 /ext/fbsql php_fbsql.c

2001-04-03 Thread Frank M. Kromann

fmk Tue Apr  3 11:09:02 2001 EDT

  Modified files:  
/php4/ext/fbsql php_fbsql.c 
  Log:
  Fixing crash when listing databsaes
  Fixing rowcount to woirk when the result contains an array og data.
  
Index: php4/ext/fbsql/php_fbsql.c
diff -u php4/ext/fbsql/php_fbsql.c:1.7 php4/ext/fbsql/php_fbsql.c:1.8
--- php4/ext/fbsql/php_fbsql.c:1.7  Thu Mar 22 16:58:59 2001
+++ php4/ext/fbsql/php_fbsql.c  Tue Apr  3 11:09:02 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.c,v 1.7 2001/03/23 00:58:59 fmk Exp $ */
+/* $Id: php_fbsql.c,v 1.8 2001/04/03 18:09:02 fmk Exp $ */
 
 /* TODO:
  *
@@ -1745,6 +1745,7 @@
phpResult->connection  = NULL;
phpResult->fetchHandle = NULL;
phpResult->rowHandler  = NULL;
+   phpResult->ResultmetaData= NULL;
phpResult->metaData= NULL;
phpResult->batchSize   = FB_SQL_G(batchSize);
phpResult->columnCount = 1;
@@ -1763,11 +1764,11 @@
phpLink->results = realloc(phpLink->results,sizeof(PHPFBResult*)* 
phpLink->resultCount);
for (j=i; j < phpLink->resultCount ; j++)phpLink->results[j] = NULL;
}
-   phpLink->results[i] = phpResult;
+   phpLink->results[i] = phpResult;
return_value->value.lval = phpResult->index;
-   return_value->type   = IS_LONG;
-   FB_SQL_G(resultIndex)  = phpResult->index;
-   FB_SQL_G(linkIndex)= phpLink->index;
+   return_value->type = IS_LONG;
+   FB_SQL_G(resultIndex) = phpResult->index;
+   FB_SQL_G(linkIndex) = phpLink->index;
 }
 /* }}} */
 
@@ -2447,11 +2448,15 @@
result = phpfbGetResult(resultIndex);
if (result == NULL) RETURN_FALSE;
 
-   rowCount = fbcmdRowCount (result->metaData);
-   if (rowCount == -1)
-   {
-   phpfbFetchRow(result,0x7fff);
+   if (result->array)
rowCount = result->rowCount;
+   else {
+   rowCount = fbcmdRowCount(result->metaData);
+   if (rowCount == -1)
+   {
+   phpfbFetchRow(result,0x7fff);
+   rowCount = result->rowCount;
+   }
}
return_value->value.lval = rowCount;
return_value->type   = IS_LONG;



-- 
PHP CVS 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] PHP error parsing SQL string containing assoc. array

2001-03-23 Thread Frank M. Kromann

Hi All,

PHP is unable to resolve the variable you are trying to use within a stting. If you 
use complex array structures you have to write it like this:


$sql = "insert into sessions(session_id, user_id, session_expiration) values 
('$sess_id', " . $user_fields['USER_ID'] . "', sysdate + (" . 
$user_fields'MINS_TILL_EXPIRE'] . " * 1/1440))";

or use

$sql = sprintf("insert into sessions(session_id, user_id, session_expiration) values 
('%s', sysdate + (%i * 1/1440))", $sess_id', $user_fields['USER_ID'], 
$user_fields['MINS_TILL_EXPIRE']);


Your sample code also mised a ' after the first variable !

- Frank

> I'm trying to write a sql statement (for Oracle) that uses an associative
> array element as a dynamic value.  PHP is choking on this line:
> 
> $sql = "insert into sessions(session_id, user_id, session_expiration) values 
>('$sess_id', $user_fields['USER_ID'], sysdate + ($user_fields['MINS_TILL_EXPIRE'] * 
>1/1440))"
> 
> I get this error back from PHP:
> 
> Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'
> 
> Can I not use my associative array like this?
> 
> -- 
> Michael Champagne, Software Engineer
> Capital Institutional Services, Inc.
> wk: [EMAIL PROTECTED]
> hm: [EMAIL PROTECTED]
> 
> 
> 
> **
> This communication is for informational purposes only.  It is not
> intended as an offer or solicitation for the purchase or sale of 
> any financial instrument or as an official confirmation of any 
> transaction, unless specifically agreed otherwise.  All market 
> prices, data and other information are not warranted as to 
> completeness or accuracy and are subject to change without
> notice.  Any comments or statements made herein do not 
> necessarily reflect the views or opinions of Capital Institutional
> Services, Inc.  Capital Institutional Services, Inc. accepts no
> liability for any errors or omissions arising as a result of
> transmission.  Use of this communication by other than intended
> recipients is prohibited.
> **
> 
> -- 
> 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-CVS] cvs: php4 /ext/fbsql php_fbsql.c

2001-03-22 Thread Frank M. Kromann

fmk Thu Mar 22 16:58:59 2001 EDT

  Modified files:  
/php4/ext/fbsql php_fbsql.c 
  Log:
  Removing extra check for warnings.
  
Index: php4/ext/fbsql/php_fbsql.c
diff -u php4/ext/fbsql/php_fbsql.c:1.6 php4/ext/fbsql/php_fbsql.c:1.7
--- php4/ext/fbsql/php_fbsql.c:1.6  Thu Mar 22 13:16:23 2001
+++ php4/ext/fbsql/php_fbsql.c  Thu Mar 22 16:58:59 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.c,v 1.6 2001/03/22 21:16:23 fmk Exp $ */
+/* $Id: php_fbsql.c,v 1.7 2001/03/23 00:58:59 fmk Exp $ */
 
 /* TODO:
  *
@@ -552,12 +552,12 @@
 }
 
 
-int phpfbFetchRow (PHPFBResult* result, int row)
+int phpfbFetchRow(PHPFBResult* result, int row)
 {
if (result->rowHandler == NULL)
{
-void *rawData = 
fbcdcFetch(result->connection,result->batchSize,result->fetchHandle);
-if (rawData == NULL)
+   void *rawData = 
+fbcdcFetch(result->connection,result->batchSize,result->fetchHandle);
+   if (rawData == NULL)
result->rowCount = 0;
else
result->rowHandler = fbcrhInitWith(rawData, result->metaData);
@@ -1513,26 +1513,6 @@
 
meta = fbcdcExecuteDirectSQL(database->connection,sql);
 
-   if (fbcmdErrorCount(meta) > 0) {
-   FBCErrorMetaData *errorMeta;
-   char *errorMessage;
-   unsigned error_type = 0;
-
-   errorMeta = fbcdcErrorMetaData(database->connection, meta);
-   error_type = fbcemdErrorCodeAtIndex(errorMeta, 0);
-   errorMessage = fbcemdAllErrorMessages(errorMeta);
-   if (error_type != 250) {
-   php_error(E_WARNING, "Error executing SQL-statement (%s)", 
sql);
-   }
-// free(errorMessage);
-   fbcemdRelease(errorMeta);
-
-   if (error_type != 250) {
-   fbcmdRelease(meta);
-   return NULL;
-   }
-   }
-
if (fbcmdHasMetaDataArray(meta)) {
sR = fbcmdMetaDataArrayCount(meta);
md = (FBCMetaData*)fbcmdMetaDataAtIndex(meta, cR);
@@ -1540,7 +1520,7 @@
else
md = meta;
 
-   ok = mdOk(database,md);
+   ok = mdOk(database, md);
tp = fbcmdStatementType(md);
 
return_value->value.lval = ok?-1:0;



-- 
PHP CVS 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-CVS] cvs: php4 /ext/fbsql php_fbsql.c

2001-03-22 Thread Frank M. Kromann

fmk Thu Mar 22 13:16:23 2001 EDT

  Modified files:  
/php4/ext/fbsql php_fbsql.c 
  Log:
  Adding warning when query fails
  
Index: php4/ext/fbsql/php_fbsql.c
diff -u php4/ext/fbsql/php_fbsql.c:1.5 php4/ext/fbsql/php_fbsql.c:1.6
--- php4/ext/fbsql/php_fbsql.c:1.5  Wed Mar 21 13:53:45 2001
+++ php4/ext/fbsql/php_fbsql.c  Thu Mar 22 13:16:23 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.c,v 1.5 2001/03/21 21:53:45 fmk Exp $ */
+/* $Id: php_fbsql.c,v 1.6 2001/03/22 21:16:23 fmk Exp $ */
 
 /* TODO:
  *
@@ -788,7 +788,6 @@
fbcdcClose(c);
fbcdcRelease(c);
free(result);
-/* printf("Returning Null\n"); */
return NULL;
}
result->retainCount  = 2;
@@ -813,7 +812,6 @@
link->databases[i] = result;
 
FB_SQL_G(databaseCount)++;
-/* printf("Return database %x %x\n",result,c); */
}
link->currentDatabase = result;
return_value->value.lval  = result->index;
@@ -1514,6 +1512,26 @@
FBSQLLS_FETCH();
 
meta = fbcdcExecuteDirectSQL(database->connection,sql);
+
+   if (fbcmdErrorCount(meta) > 0) {
+   FBCErrorMetaData *errorMeta;
+   char *errorMessage;
+   unsigned error_type = 0;
+
+   errorMeta = fbcdcErrorMetaData(database->connection, meta);
+   error_type = fbcemdErrorCodeAtIndex(errorMeta, 0);
+   errorMessage = fbcemdAllErrorMessages(errorMeta);
+   if (error_type != 250) {
+   php_error(E_WARNING, "Error executing SQL-statement (%s)", 
+sql);
+   }
+// free(errorMessage);
+   fbcemdRelease(errorMeta);
+
+   if (error_type != 250) {
+   fbcmdRelease(meta);
+   return NULL;
+   }
+   }
 
if (fbcmdHasMetaDataArray(meta)) {
sR = fbcmdMetaDataArrayCount(meta);



-- 
PHP CVS 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-CVS] cvs: php4 /ext/fbsql php_fbsql.c

2001-03-21 Thread Frank M. Kromann

fmk Wed Mar 21 13:53:45 2001 EDT

  Modified files:  
/php4/ext/fbsql php_fbsql.c 
  Log:
  setting right params to zend_get_parameters_ex
  

Index: php4/ext/fbsql/php_fbsql.c
diff -u php4/ext/fbsql/php_fbsql.c:1.4 php4/ext/fbsql/php_fbsql.c:1.5
--- php4/ext/fbsql/php_fbsql.c:1.4  Wed Mar 21 11:56:33 2001
+++ php4/ext/fbsql/php_fbsql.c  Wed Mar 21 13:53:45 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.c,v 1.4 2001/03/21 19:56:33 fmk Exp $ */
+/* $Id: php_fbsql.c,v 1.5 2001/03/21 21:53:45 fmk Exp $ */
 
 /* TODO:
  *
@@ -584,7 +584,7 @@
FBSQLLS_FETCH();
 
if ((argc < 0) || (argc > 3)) WRONG_PARAM_COUNT;
-   if (zend_get_parameters_ex(ht,argc,&argv[0],&argv[1],&argv[2])==FAILURE) 
RETURN_FALSE;
+   if (zend_get_parameters_ex(argc,&argv[0],&argv[1],&argv[2])==FAILURE) 
+RETURN_FALSE;
if (argc >= 1)
{
convert_to_string_ex(argv[0]);
@@ -672,7 +672,7 @@
FBSQLLS_FETCH();
 
if ((argc < 0) || (argc > 1)) WRONG_PARAM_COUNT;
-   if (zend_get_parameters_ex(ht,argc, &argv[0])==FAILURE) RETURN_FALSE;
+   if (zend_get_parameters_ex(argc, &argv[0])==FAILURE) RETURN_FALSE;
if (argc == 1)
{
convert_to_long_ex(argv[0]);
@@ -851,7 +851,7 @@
FBSQLLS_FETCH();
 
if ((argc < 1) || (argc > 2)) WRONG_PARAM_COUNT;
-   if (zend_get_parameters_ex(ht,argc,&argv[0],&argv[1])==FAILURE) RETURN_FALSE;
+   if (zend_get_parameters_ex(argc,&argv[0],&argv[1])==FAILURE) RETURN_FALSE;
 
convert_to_long_ex(argv[0]);
phpLink = phpfbGetLink((*argv[0])->value.lval);
@@ -887,7 +887,7 @@
link = FB_SQL_G(linkIndex);
 
if ((argc < 0) || (argc > 1)) WRONG_PARAM_COUNT;
-   if (zend_get_parameters_ex(ht,argc,&argv[0],&argv[1])==FAILURE) RETURN_FALSE;
+   if (zend_get_parameters_ex(argc,&argv[0],&argv[1])==FAILURE) RETURN_FALSE;
 
if (argc == 1)
{
@@ -923,7 +923,7 @@
link = FB_SQL_G(linkIndex);
 
if ((argc < 0) || (argc > 1)) WRONG_PARAM_COUNT;
-   if (zend_get_parameters_ex(ht,argc,&argv[0],&argv[1])==FAILURE) RETURN_FALSE;
+   if (zend_get_parameters_ex(argc,&argv[0],&argv[1])==FAILURE) RETURN_FALSE;
 
if (argc == 1)
{
@@ -955,7 +955,7 @@
FBSQLLS_FETCH();
 
if ((argc < 0) || (argc > 1)) WRONG_PARAM_COUNT;
-   if (zend_get_parameters_ex(ht,argc, &argv[0])==FAILURE) RETURN_FALSE;
+   if (zend_get_parameters_ex(argc, &argv[0])==FAILURE) RETURN_FALSE;
 
phpfbestrdup(FB_SQL_G(hostName), &return_value->value.str.len, 
&return_value->value.str.val);
return_value->type = IS_STRING;
@@ -978,7 +978,7 @@
FBSQLLS_FETCH();
 
if ((argc < 0) || (argc > 1)) WRONG_PARAM_COUNT;
-   if (zend_get_parameters_ex(ht,argc, &argv[0])==FAILURE) RETURN_FALSE;
+   if (zend_get_parameters_ex(argc, &argv[0])==FAILURE) RETURN_FALSE;
 
phpfbestrdup(FB_SQL_G(databaseName), &return_value->value.str.len, 
&return_value->value.str.val);
return_value->type = IS_STRING;
@@ -1001,7 +1001,7 @@
FBSQLLS_FETCH();
 
if ((argc < 0) || (argc > 1)) WRONG_PARAM_COUNT;
-   if (zend_get_parameters_ex(ht,argc, &argv[0])==FAILURE) RETURN_FALSE;
+   if (zend_get_parameters_ex(argc, &argv[0])==FAILURE) RETURN_FALSE;
 
if (argc >= 1)
{
@@ -1022,7 +1022,7 @@
FBSQLLS_FETCH();
 
if ((argc < 0) || (argc > 1)) WRONG_PARAM_COUNT;
-   if (zend_get_parameters_ex(ht,argc, &argv[0])==FAILURE) RETURN_FALSE;
+   if (zend_get_parameters_ex(argc, &argv[0])==FAILURE) RETURN_FALSE;
 
phpfbestrdup(FB_SQL_G(userName), &return_value->value.str.len, 
&return_value->value.str.val);
return_value->type = IS_STRING;
@@ -1045,7 +1045,7 @@
FBSQLLS_FETCH();
 
if ((argc < 0) || (argc > 1)) WRONG_PARAM_COUNT;
-   if (zend_get_parameters_ex(ht,argc, &argv[0])==FAILURE) RETURN_FALSE;
+   if (zend_get_parameters_ex(argc, &argv[0])==FAILURE) RETURN_FALSE;
if (argc >= 1)
{
convert_to_string_ex(argv[0]);
@@ -1070,7 +1070,7 @@
name = FB_SQL_G(databaseName);
 
if ((argc < 1) || (argc > 2)) WRONG_PARAM_COUNT;
-   if (zend_get_parameters_ex(ht,argc, &argv[0],&argv[1])==FAILURE) RETURN_FALSE;
+   if (zend_get_parameters_ex(argc, &argv[0],&argv[1])==FAILURE) RETURN_FALSE;
 
if (argc >= 1)
{
@@ -1124,7 +1124,7 @@
databaseName = FB_SQL_G(databaseName);
 
if ((argc < 2) || (argc > 4)) WRONG_PARAM_COUNT;
-   if 
(zend_get_parameters_ex(ht,argc,&argv[0],&argv[1],&argv[2],&argv[3])==FAILURE) 
RETURN_FALSE;
+   if (zend_get_parameters_ex(argc,&argv[0],&argv[1],&argv[2],&argv[3])==FAILURE) 
+RETURN_FALSE;
 
convert_to_string_ex(argv[0]);
userName = (*argv[0])->value.str.val;
@@ -1177,7 +1177,7 @@
hostName = FB_S

[PHP-CVS] cvs: php4 /ext/fbsql php_fbsql.c

2001-03-21 Thread Frank M. Kromann

fmk Wed Mar 21 11:56:34 2001 EDT

  Modified files:  
/php4/ext/fbsql php_fbsql.c 
  Log:
  changed arg types from pval* to zval**
  

Index: php4/ext/fbsql/php_fbsql.c
diff -u php4/ext/fbsql/php_fbsql.c:1.3 php4/ext/fbsql/php_fbsql.c:1.4
--- php4/ext/fbsql/php_fbsql.c:1.3  Tue Mar 20 12:25:55 2001
+++ php4/ext/fbsql/php_fbsql.c  Wed Mar 21 11:56:33 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.c,v 1.3 2001/03/20 20:25:55 fmk Exp $ */
+/* $Id: php_fbsql.c,v 1.4 2001/03/21 19:56:33 fmk Exp $ */
 
 /* TODO:
  *
@@ -249,156 +249,150 @@
 #endif
 
 
-void phpfbReleaseResult   ( PHPFBResult*   result );
-void phpfbReleaseDatabase ( PHPFBDatabase* database );
-void phpfbReleaseLink ( PHPFBLink* link );
+void phpfbReleaseResult   (PHPFBResult*   result);
+void phpfbReleaseDatabase (PHPFBDatabase* database);
+void phpfbReleaseLink (PHPFBLink* link);
 
-PHPFBResult* phpfbRetainResult ( PHPFBResult* result )
+PHPFBResult* phpfbRetainResult (PHPFBResult* result)
 {
if (result) result->retainCount++;
return result;
 }
 
-void phpfbReleaseResult ( PHPFBResult* result )
+void phpfbReleaseResult (PHPFBResult* result)
 {
unsigned int i;
FBSQLLS_FETCH();
if (result)
-{
+   {
result->retainCount--;
-/* printf("Release result   %x %d 
%d\n",result,result->index,result->retainCount); */
 
-  if (result->retainCount == 0)
-   {
- if (result->fetchHandle) 
fbcdcCancelFetch(result->connection,result->fetchHandle);
- if (result->rowHandler)  fbcrhRelease(result->rowHandler);
- if (result->ResultmetaData)fbcmdRelease(result->ResultmetaData);
+   if (result->retainCount == 0)
+   {
+   if (result->fetchHandle) 
+fbcdcCancelFetch(result->connection,result->fetchHandle);
+   if (result->rowHandler)  fbcrhRelease(result->rowHandler);
+   if (result->ResultmetaData)
+fbcmdRelease(result->ResultmetaData);
 /* if (result->metaData)fbcmdRelease(result->metaData);  */
- if (result->list)fbcplRelease(result->list);
- if (result->array)   fbaRelease(result->array);
- if ( result->database)
-  {
-for (i=0; i < result->database->resultCount; i++)
- {
-   if (result->database->results[i] == result)
-{
-  result->database->results[i] = NULL;
-  break;
-}
- }
-phpfbReleaseDatabase(result->database);
-  }
- if (result->link)
-  {
-for (i=0; i < result->link->resultCount; i++)
- {
-   if (result->link->results[i] == result)
-{
-  result->link->results[i] = NULL;
-  break;
-}
- }
-phpfbReleaseLink(result->link);
-  }
- result->link= 0;
- result->database= 0;
- result->connection  = NULL;
- result->fetchHandle = NULL;
- result->metaData= NULL;
- result->rowHandler  = NULL;
- result->batchSize   = 0;
- result->rowCount= -1;
- result->rowIndex= 0;
- result->columnIndex = 0;
- result->row = NULL;
- result->array   = NULL;
- result->list= NULL;
- free(result);
-   }
-}
+   if (result->list)fbcplRelease(result->list);
+   if (result->array)   fbaRelease(result->array);
+   if (result->database)
+   {
+   for (i=0; i < result->database->resultCount; i++)
+   {
+   if (result->database->results[i] == result)
+   {
+   result->database->results[i] = NULL;
+   break;
+   }
+   }
+   phpfbReleaseDatabase(result->database);
+   }
+   if (result->link)
+   {
+   for (i=0; i < result->link->resultCount; i++)
+   {
+   if (result->link->results[i] == result)
+   {
+   result->link->results[i] = NULL;
+   break;
+   }
+   }
+   phpfbReleaseLink(result->link);
+   }
+  

[PHP-CVS] cvs: php4 /ext/fbsql php_fbsql.c

2001-03-20 Thread Frank M. Kromann

fmk Tue Mar 20 12:25:55 2001 EDT

  Modified files:  
/php4/ext/fbsql php_fbsql.c 
  Log:
  Fixing crash when result conrains 0 rows
  
Index: php4/ext/fbsql/php_fbsql.c
diff -u php4/ext/fbsql/php_fbsql.c:1.2 php4/ext/fbsql/php_fbsql.c:1.3
--- php4/ext/fbsql/php_fbsql.c:1.2  Tue Mar 20 11:21:45 2001
+++ php4/ext/fbsql/php_fbsql.c  Tue Mar 20 12:25:55 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.c,v 1.2 2001/03/20 19:21:45 fmk Exp $ */
+/* $Id: php_fbsql.c,v 1.3 2001/03/20 20:25:55 fmk Exp $ */
 
 /* TODO:
  *
@@ -2555,6 +2555,9 @@
if (result->fetchHandle == NULL) {
RETURN_FALSE;
}
+   if (result->rowCount == 0) {
+   RETURN_FALSE;
+   }
if (result->rowCount == 0x7fff) {
if (!phpfbFetchRow(result,rowIndex)) {
RETURN_FALSE;
@@ -2627,9 +2630,14 @@
{
RETURN_FALSE;
}
+   if (result->rowCount == 0) {
+   RETURN_FALSE;
+   }
if (result->rowCount == 0x7fff)
{
-   phpfbFetchRow(result,result->rowIndex);
+   if (!phpfbFetchRow(result,result->rowIndex)) {
+   RETURN_FALSE;
+   }
}
row = fbcrhRowAtIndex(result->rowHandler,rowIndex);
if (row == NULL)



-- 
PHP CVS 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-CVS] cvs: php4 /ext/fbsql php_fbsql.c

2001-03-20 Thread Frank M. Kromann

fmk Tue Mar 20 11:21:45 2001 EDT

  Modified files:  
/php4/ext/fbsql php_fbsql.c 
  Log:
  Converting to c-style comments.
  Adding prototypes to all exported function
  

Index: php4/ext/fbsql/php_fbsql.c
diff -u php4/ext/fbsql/php_fbsql.c:1.1 php4/ext/fbsql/php_fbsql.c:1.2
--- php4/ext/fbsql/php_fbsql.c:1.1  Tue Mar 13 12:58:47 2001
+++ php4/ext/fbsql/php_fbsql.c  Tue Mar 20 11:21:45 2001
@@ -7,7 +7,7 @@
| This source file is subject to version 2.02 of the PHP license,  |
| that is bundled with this package in the file LICENSE, and is|
| available at through the world-wide-web at   |
-   | http://www.php.net/license/2_02.txt. |
+   | http:/*www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to   |
| obtain it through the world-wide-web, please send a note to  |
| [EMAIL PROTECTED] so we can mail you a copy immediately.   |
@@ -16,27 +16,27 @@
+--+
  */
 
-/* $Id: php_fbsql.c,v 1.1 2001/03/13 20:58:47 fmk Exp $ */
+/* $Id: php_fbsql.c,v 1.2 2001/03/20 19:21:45 fmk Exp $ */
 
 /* TODO:
  *
  * ? Safe mode implementation
  */
 
-// SB's list:
-//   - BLOBs
-//   - API for a more natural FB connect semantic
-//   - Connect & set session 
-//   - Autoreconnect when disconnected
-//   - Comments and cleanup
-//   - Documentation
-//
-//   - Format database error messages as HTML.
-//
-// BUGS
-//   - Select db with no arguments
-//   - Query with everything defaulted
-//
+/* SB's list:
+   - BLOBs
+   - API for a more natural FB connect semantic
+   - Connect & set session 
+   - Autoreconnect when disconnected
+   - Comments and cleanup
+   - Documentation
+
+   - Format database error messages as HTML.
+
+   BUGS
+   - Select db with no arguments
+- Query with everything defaulted
+*/
 #include "php.h"
 #include "php_globals.h"
 #include "php_globals.h"
@@ -75,32 +75,32 @@
 struct PHPFBLink;
 typedef struct PHPFBLink PHPFBLink;
 
-// The PHPFBLink structure represents a fbsql link. The lion is used for
-// a connection to a machine, it may be persistant and is reference counted.
-// The reason for refcounting is mostly to avoid to think, it work independent of 
-// any wierd and unforseen allocation deallocation order.
-//
-// The PHPFBDatabse structure implements to actual connection to a FrontBase server
-// ot may be persistant is the link it is connected to is persistant, and refcounted
-// for the same reasons as above.
-//
-// The PHPFBResult structure implements a result from the FrontBase server, and does 
all
-// required buffereing from of results.
-//
-// In the PHP code the 3 above a data structures are referenced by means of integers 
in the
-// range from 1 to som configurable maximum.  You can put a limit to the number of 
links, databases
-// and results.  The integer identifications is implemented by insertion in the list, 
which is passed
-// as an argument to all the functions, please note the list is polymorph.
-//
-// Database objects and link objects are all reused, base on the host name user name, 
host name database name 
-// user name.  So connecting twice to the same database as the same user will return 
the same database id.
-// We use the same coding for that as fbsql does, explioiting the underlying 
implementation of the lists.
-//
-// Persistant objects are put in the persistent list as well, but only by name, if 
you connect to a persistant object
-// and it is not in the list it is simply added and get a new index, and refcounted.  
Tricky, tricky ...
-//
+/* The PHPFBLink structure represents a fbsql link. The lion is used for
+   a connection to a machine, it may be persistant and is reference counted.
+   The reason for refcounting is mostly to avoid to think, it work independent of 
+   any wierd and unforseen allocation deallocation order.
+
+   The PHPFBDatabse structure implements to actual connection to a FrontBase 
+server
+   ot may be persistant is the link it is connected to is persistant, and 
+refcounted
+   for the same reasons as above.
+
+   The PHPFBResult structure implements a result from the FrontBase server, and 
+does all
+   required buffereing from of results.
+
+   In the PHP code the 3 above a data structures are referenced by means of 
+integers in the
+   range from 1 to som configurable maximum.  You can put a limit to the number 
+of links, databases
+   and results.  The integer identifications is implemented by insertion in the 
+list, which is passed
+   as an argument to all the functions, please note the list is polymorph.
+
+   Database objects and link objects are all reused, base on the host name user 
+name, host name database name 
+

[PHP-CVS] cvs: php4 /ext/standard array.c

2001-03-16 Thread Frank M. Kromann

fmk Fri Mar 16 11:48:40 2001 EDT

  Modified files:  
/php4/ext/standard  array.c 
  Log:
  Fixing build on Win32 by adding missing   BLS_FETCH();
  
  
Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.102 php4/ext/standard/array.c:1.103
--- php4/ext/standard/array.c:1.102 Fri Mar 16 11:29:23 2001
+++ php4/ext/standard/array.c   Fri Mar 16 11:48:40 2001
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.102 2001/03/16 19:29:23 andrei Exp $ */
+/* $Id: array.c,v 1.103 2001/03/16 19:48:40 fmk Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -957,6 +957,7 @@
ulong  string_key_len;
ulong  num_key;
HashPosition pos;
+   BLS_FETCH();
CLS_FETCH();
ELS_FETCH();
 



-- 
PHP CVS 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-CVS] cvs: php4 /ext/printer CREDITS

2001-03-15 Thread Frank M. Kromann

fmk Thu Mar 15 22:15:59 2001 EDT

  Modified files:  
/php4/ext/printer   CREDITS 
  Log:
  Adding credits
  
Index: php4/ext/printer/CREDITS
diff -u php4/ext/printer/CREDITS:1.1 php4/ext/printer/CREDITS:1.2
--- php4/ext/printer/CREDITS:1.1Mon Nov 20 02:31:31 2000
+++ php4/ext/printer/CREDITSThu Mar 15 22:15:58 2001
@@ -0,0 +1,2 @@
+PRINTER
+Daniel Beulshausen, Frank M. Kromann



-- 
PHP CVS 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-CVS] cvs: php4 /win32 php_modules.dsw

2001-03-13 Thread Frank M. Kromann

fmk Tue Mar 13 13:02:52 2001 EDT

  Modified files:  
/php4/win32 php_modules.dsw 
  Log:
  Adding FrontBase extension to modules
  
Index: php4/win32/php_modules.dsw
diff -u php4/win32/php_modules.dsw:1.38 php4/win32/php_modules.dsw:1.39
--- php4/win32/php_modules.dsw:1.38 Tue Feb 20 12:45:55 2001
+++ php4/win32/php_modules.dsw  Tue Mar 13 13:02:52 2001
@@ -123,7 +123,7 @@
 
 ###
 
-Project: "iconv"=..\ext\iconv\iconv.dsp - Package Owner=<4>
+Project: "exif"=..\ext\exif\exif.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -135,7 +135,7 @@
 
 ###
 
-Project: "exif"=..\ext\exif\exif.dsp - Package Owner=<4>
+Project: "fbsql"=..\ext\fbsql\fbsql.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -195,7 +195,7 @@
 
 ###
 
-Project: "ifx"=..\ext\informix\ifx.dsp - Package Owner=<4>
+Project: "hyperwave"=..\ext\hyperwave\hyperwave.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -207,7 +207,7 @@
 
 ###
 
-Project: "hyperwave"=..\ext\hyperwave\hyperwave.dsp - Package Owner=<4>
+Project: "iconv"=..\ext\iconv\iconv.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -219,6 +219,18 @@
 
 ###
 
+Project: "ifx"=..\ext\informix\ifx.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###
+
 Project: "iisfunc"=..\ext\iisfunc\iisfunc.dsp - Package Owner=<4>
 
 Package=<5>
@@ -291,7 +303,7 @@
 
 ###
 
-Project: "ming"=..\ext\ming\ming.dsp - Package Owner=<4>
+Project: "mcrypt"=..\ext\mcrypt\mcrypt.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -303,7 +315,7 @@
 
 ###
 
-Project: "mcrypt"=..\ext\mcrypt\mcrypt.dsp - Package Owner=<4>
+Project: "mhash"=..\ext\mhash\mhash.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -315,7 +327,7 @@
 
 ###
 
-Project: "mhash"=..\ext\mhash\mhash.dsp - Package Owner=<4>
+Project: "ming"=..\ext\ming\ming.dsp - Package Owner=<4>
 
 Package=<5>
 {{{



-- 
PHP CVS 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-CVS] cvs: php4 /ext/fbsql .cvsignore Makefile.in config.m4 fbsql.dsp php_fbsql.c php_fbsql.h

2001-03-13 Thread Frank M. Kromann
\usr\FrontBase\Include" /D "NDEBUG" /D 
"ZTS" /D ZEND_DEBUG=0 /D "FBSQL_EXPORTS" /D "COMPILE_DL_FBSQL" /D HAVE_FBSQL=1 /D 
"WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZEND_WIN32" /D "PHP_WIN32" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x40d /d "NDEBUG"
# ADD RSC /l 0x40d /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib 
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib 
/nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib 
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib 
FBCAccess.lib wsock32.lib /nologo /dll /machine:I386 /nodefaultlib:"LIBC" 
/out:"..\..\Release_TS/php_fbsql.dll" /libpath:"..\..\Release_TS" 
/libpath:"\usr\FrontBase\lib"

!ENDIF 

# Begin Target

# Name "fbsql - Win32 Release"
# Name "fbsql - Win32 Debug"
# Name "fbsql - Win32 Debug_TS"
# Name "fbsql - Win32 Release_TS"
# Begin Group "Source Files"

# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File

SOURCE=.\php_fbsql.c
# End Source File
# End Group
# Begin Group "Header Files"

# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File

SOURCE=.\php_fbsql.h
# End Source File
# End Group
# Begin Group "Resource Files"

# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# Begin Source File

SOURCE=.\Readme_w32.txt
# End Source File
# End Target
# End Project

Index: php4/ext/fbsql/Makefile.in
+++ php4/ext/fbsql/Makefile.in

LTLIBRARY_NAME= libfbsql.la
LTLIBRARY_SOURCES = php_fbsql.c
LTLIBRARY_LIBADD  = $(FBSQL_LIBADD)
LTLIBRARY_SHARED_NAME= fbsql.la
LTLIBRARY_SHARED_LIBADD  = $(FBSQL_SHARED_LIBADD)

SUBDIRS = $(FBSQL_SUBDIRS)

include $(top_srcdir)/build/dynlib.mk

Index: php4/ext/fbsql/php_fbsql.c
+++ php4/ext/fbsql/php_fbsql.c
/*
   +--+
   | PHP version 4.0  |
   +--+
   | Copyright (c) 1997-2001 The PHP Group|
   +--+
   | This source file is subject to version 2.02 of the PHP license,  |
   | that is bundled with this package in the file LICENSE, and is|
   | available at through the world-wide-web at   |
   | http://www.php.net/license/2_02.txt. |
   | If you did not receive a copy of the PHP license and are unable to   |
   | obtain it through the world-wide-web, please send a note to  |
   | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
   +--+
   | Authors: Frank M. Kromann [EMAIL PROTECTED]>   |
   +--+
 */

/* $Id: php_fbsql.c,v 1.1 2001/03/13 20:58:47 fmk Exp $ */

/* TODO:
 *
 * ? Safe mode implementation
 */

// SB's list:
//   - BLOBs
//   - API for a more natural FB connect semantic
//   - Connect & set session 
//   - Autoreconnect when disconnected
//   - Comments and cleanup
//   - Documentation
//
//   - Format database error messages as HTML.
//
// BUGS
//   - Select db with no arguments
//   - Query with everything defaulted
//
#include "php.h"
#include "php_globals.h"
#include "php_globals.h"
#include "ext/standard/info.h"
#include "ext/standard/php_string.h"

#if WIN32|WINNT
#include 
#else
#include 
#include 

#if HAVE_SYS_TYPES_H
#include 
#endif
#include 
#include 
#endif

#include "php_ini.h"

#define HAVE_FBSQL 1

#if HAVE_FBSQL
#include "php_fbsql.h"
#include 

static int le_result, le_link, le_plink, le_dba;

struct PHPFBDatabase;
typedef struct PHPFBDatabase PHPFBDatabase;

struct PHPFBResult;
typedef struct PHPFBResult PHPFBResult;

struct PHPFBLink;
typedef struct PHPFBLink PHPFBLink;

// The PHPFBLink structure represents a fbsql link. The lion is used for
// a connection to a machine, it may be persistant and is reference counted.
// The reason for refcounting is mostly to avoid to think, it work independent of 
// any wierd and unforseen allocation deallocation order.
//
// The PHPFBDatabse structure implements to actual connection to a FrontBase server
// ot may be persistant is the link it is 

[PHP-CVS] cvs: php4 /ext/pcre php_pcre.c

2001-03-13 Thread Frank M. Kromann

fmk Tue Mar 13 08:39:48 2001 EDT

  Modified files:  
/php4/ext/pcre  php_pcre.c 
  Log:
  Fixing compiler warning on win32
  
Index: php4/ext/pcre/php_pcre.c
diff -u php4/ext/pcre/php_pcre.c:1.89 php4/ext/pcre/php_pcre.c:1.90
--- php4/ext/pcre/php_pcre.c:1.89   Mon Mar 12 21:24:03 2001
+++ php4/ext/pcre/php_pcre.cTue Mar 13 08:39:47 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_pcre.c,v 1.89 2001/03/13 05:24:03 andrei Exp $ */
+/* $Id: php_pcre.c,v 1.90 2001/03/13 16:39:47 fmk Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -961,7 +961,7 @@
 }
 
 
-static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, int is_callable_replace)
+static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool 
+is_callable_replace)
 {
zval   **regex,
   **replace,



-- 
PHP CVS 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-CVS] cvs: php4 /ext/mssql php_mssql.c php_mssql.h

2001-03-13 Thread Frank M. Kromann

fmk Tue Mar 13 08:33:39 2001 EDT

  Modified files:  
/php4/ext/mssql php_mssql.h php_mssql.c 
  Log:
  Changed email
  
Index: php4/ext/mssql/php_mssql.h
diff -u php4/ext/mssql/php_mssql.h:1.11 php4/ext/mssql/php_mssql.h:1.12
--- php4/ext/mssql/php_mssql.h:1.11 Fri Mar  9 15:37:56 2001
+++ php4/ext/mssql/php_mssql.h  Tue Mar 13 08:33:39 2001
@@ -12,12 +12,12 @@
| obtain it through the world-wide-web, please send a note to  |
| [EMAIL PROTECTED] so we can mail you a copy immediately.   |
+--+
-   | Authors: Frank M. Kromann <[EMAIL PROTECTED]>  |
+   | Authors: Frank M. Kromann [EMAIL PROTECTED]>   |
+--+
  */
 
 
-/* $Id: php_mssql.h,v 1.11 2001/03/09 23:37:56 fmk Exp $ */
+/* $Id: php_mssql.h,v 1.12 2001/03/13 16:33:39 fmk Exp $ */
 
 #ifndef PHP_MSSQL_H
 #define PHP_MSSQL_H
Index: php4/ext/mssql/php_mssql.c
diff -u php4/ext/mssql/php_mssql.c:1.39 php4/ext/mssql/php_mssql.c:1.40
--- php4/ext/mssql/php_mssql.c:1.39 Fri Mar  9 15:37:56 2001
+++ php4/ext/mssql/php_mssql.c  Tue Mar 13 08:33:39 2001
@@ -1,5 +1,5 @@
 /*
-  +--+
+   +--+
| PHP version 4.0  |
+--+
| Copyright (c) 1997-2001 The PHP Group|
@@ -12,11 +12,11 @@
| obtain it through the world-wide-web, please send a note to  |
| [EMAIL PROTECTED] so we can mail you a copy immediately.   |
+--+
-   | Authors: Frank M. Kromann <[EMAIL PROTECTED]>  |
+   | Authors: Frank M. Kromann [EMAIL PROTECTED]>   |
+--+
  */
 
-/* $Id: php_mssql.c,v 1.39 2001/03/09 23:37:56 fmk Exp $ */
+/* $Id: php_mssql.c,v 1.40 2001/03/13 16:33:39 fmk Exp $ */
 
 #ifdef COMPILE_DL_MSSQL
 #define HAVE_MSSQL 1



-- 
PHP CVS 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-CVS] cvs: php4 /ext/odbc php_odbc.c php_odbc.h

2001-03-09 Thread Frank M. Kromann

fmk Fri Mar  9 15:44:55 2001 EDT

  Modified files:  
/php4/ext/odbc  php_odbc.h php_odbc.c 
  Log:
  Adding a new function odbc_next_result() allowing the query to return more than one 
result.
  This can be done with a stored procedure or by sending more than one select to the 
server.
  
Index: php4/ext/odbc/php_odbc.h
diff -u php4/ext/odbc/php_odbc.h:1.33 php4/ext/odbc/php_odbc.h:1.34
--- php4/ext/odbc/php_odbc.h:1.33   Sun Feb 25 22:07:09 2001
+++ php4/ext/odbc/php_odbc.hFri Mar  9 15:44:55 2001
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_odbc.h,v 1.33 2001/02/26 06:07:09 andi Exp $ */
+/* $Id: php_odbc.h,v 1.34 2001/03/09 23:44:55 fmk Exp $ */
 
 #ifndef PHP_ODBC_H
 #define PHP_ODBC_H
@@ -207,6 +207,7 @@
 PHP_FUNCTION(odbc_field_type);
 PHP_FUNCTION(odbc_field_num);
 PHP_FUNCTION(odbc_free_result);
+PHP_FUNCTION(odbc_next_result);
 PHP_FUNCTION(odbc_num_fields);
 PHP_FUNCTION(odbc_num_rows);
 PHP_FUNCTION(odbc_prepare);
Index: php4/ext/odbc/php_odbc.c
diff -u php4/ext/odbc/php_odbc.c:1.72 php4/ext/odbc/php_odbc.c:1.73
--- php4/ext/odbc/php_odbc.c:1.72   Sun Feb 25 22:07:09 2001
+++ php4/ext/odbc/php_odbc.cFri Mar  9 15:44:55 2001
@@ -14,11 +14,11 @@
+--+
| Authors: Stig Sæther Bakken <[EMAIL PROTECTED]>|
|  Andreas Karajannis <[EMAIL PROTECTED]>  |
-   |          Frank M. Kromann <[EMAIL PROTECTED]> Support for DB/2 CLI  |
+   |      Frank M. Kromann <[EMAIL PROTECTED]> Support for DB/2 CLI |
+--+
  */
 
-/* $Id: php_odbc.c,v 1.72 2001/02/26 06:07:09 andi Exp $ */
+/* $Id: php_odbc.c,v 1.73 2001/03/09 23:44:55 fmk Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -91,6 +91,7 @@
PHP_FE(odbc_field_type, NULL)
PHP_FE(odbc_field_num, NULL)
PHP_FE(odbc_free_result, NULL)
+   PHP_FE(odbc_next_result, NULL)
PHP_FE(odbc_num_fields, NULL)
PHP_FE(odbc_num_rows, NULL)
PHP_FE(odbc_result, NULL)
@@ -2204,6 +2205,54 @@
ZEND_FETCH_RESOURCE(result, odbc_result *, pv_res, -1, "ODBC result", 
le_result);
SQLRowCount(result->stmt, &rows);
RETURN_LONG(rows);
+}
+/* }}} */
+
+/* {{{ proto bool next_result(int result_id)
+   Checks if multiple results are avaiable */
+PHP_FUNCTION(odbc_next_result)
+{
+   odbc_result   *result;
+   pval **pv_res;
+   int rc, i;
+
+   if (zend_get_parameters_ex(1, &pv_res) == FAILURE) {
+   WRONG_PARAM_COUNT;
+   }
+   ZEND_FETCH_RESOURCE(result, odbc_result *, pv_res, -1, "ODBC result", 
+le_result); 
+
+   if (result->values) {
+   for(i = 0; i < result->numcols; i++) {
+   if (result->values[i].value)
+   efree(result->values[i].value);
+   }
+   efree(result->values);
+   result->values = NULL;
+   }
+
+   result->fetched = 0;
+   rc = SQLMoreResults(result->stmt);
+   if (rc == SQL_SUCCESS) {
+   RETURN_TRUE;
+   }
+   else if (rc == SQL_SUCCESS_WITH_INFO) {
+   rc = SQLFreeStmt(result->stmt, SQL_UNBIND);
+   SQLNumParams(result->stmt, &(result->numparams));
+   SQLNumResultCols(result->stmt, &(result->numcols));
+
+   if (result->numcols > 0) {
+   if (!odbc_bindcols(result)) {
+   efree(result);
+   RETVAL_FALSE;
+   }
+   } else {
+   result->values = NULL;
+   }
+   RETURN_TRUE;
+   }
+   else {
+   RETURN_FALSE;
+   }
 }
 /* }}} */
 



-- 
PHP CVS 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-CVS] cvs: php4 /ext/mssql php_mssql.c php_mssql.h

2001-03-09 Thread Frank M. Kromann

fmk Fri Mar  9 15:37:56 2001 EDT

  Modified files:  
/php4/ext/mssql php_mssql.h php_mssql.c 
  Log:
  Adding a new function mssql_next_result() allowing the query to return more than one 
result.
  This can be done with a stored procedure or by sending more than one select to the 
server.
  

Index: php4/ext/mssql/php_mssql.h
diff -u php4/ext/mssql/php_mssql.h:1.10 php4/ext/mssql/php_mssql.h:1.11
--- php4/ext/mssql/php_mssql.h:1.10 Sun Feb 25 22:07:03 2001
+++ php4/ext/mssql/php_mssql.h  Fri Mar  9 15:37:56 2001
@@ -17,7 +17,7 @@
  */
 
 
-/* $Id: php_mssql.h,v 1.10 2001/02/26 06:07:03 andi Exp $ */
+/* $Id: php_mssql.h,v 1.11 2001/03/09 23:37:56 fmk Exp $ */
 
 #ifndef PHP_MSSQL_H
 #define PHP_MSSQL_H
@@ -77,6 +77,7 @@
 PHP_FUNCTION(mssql_data_seek);
 PHP_FUNCTION(mssql_field_seek);
 PHP_FUNCTION(mssql_result);
+PHP_FUNCTION(mssql_next_result);
 PHP_FUNCTION(mssql_min_error_severity);
 PHP_FUNCTION(mssql_min_message_severity);
 
@@ -116,6 +117,7 @@
mssql_link *mssql_ptr;
int batchsize;
int lastresult;
+   int blocks_initialized;
int cur_row,cur_field;
int num_rows,num_fields;
 } mssql_result;
Index: php4/ext/mssql/php_mssql.c
diff -u php4/ext/mssql/php_mssql.c:1.38 php4/ext/mssql/php_mssql.c:1.39
--- php4/ext/mssql/php_mssql.c:1.38 Sun Feb 25 22:07:03 2001
+++ php4/ext/mssql/php_mssql.c  Fri Mar  9 15:37:56 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_mssql.c,v 1.38 2001/02/26 06:07:03 andi Exp $ */
+/* $Id: php_mssql.c,v 1.39 2001/03/09 23:37:56 fmk Exp $ */
 
 #ifdef COMPILE_DL_MSSQL
 #define HAVE_MSSQL 1
@@ -59,12 +59,14 @@
PHP_FE(mssql_data_seek, NULL)
PHP_FE(mssql_field_seek,NULL)
PHP_FE(mssql_result,NULL)
+   PHP_FE(mssql_next_result,   NULL)
PHP_FE(mssql_min_error_severity,NULL)
PHP_FE(mssql_min_message_severity,  NULL)
{NULL, NULL, NULL}
 };
 
-zend_module_entry mssql_module_entry = {
+zend_module_entry mssql_module_entry = 
+{
"mssql", 
mssql_functions, 
PHP_MINIT(mssql), 
@@ -150,9 +152,8 @@
return 0;
 }
 
-static void _free_mssql_result(zend_rsrc_list_entry *rsrc)
+static void _free_result(mssql_result *result, int free_fields) 
 {
-   mssql_result *result = (mssql_result *)rsrc->ptr;
int i,j;
 
if (result->data) {
@@ -165,15 +166,23 @@
}
}
efree(result->data);
+   result->data = NULL;
+   result->blocks_initialized = 0;
}

-   if (result->fields) {
+   if (free_fields && result->fields) {
for (i=0; inum_fields; i++) {
STR_FREE(result->fields[i].name);
STR_FREE(result->fields[i].column_source);
}
efree(result->fields);
}
+}
+
+static void _free_mssql_result(zend_rsrc_list_entry *rsrc)
+{
+   mssql_result *result = (mssql_result *)rsrc->ptr;
+   _free_result(result, 1);
efree(result);
 }
 
@@ -767,31 +776,80 @@
}
 }
 
-int _mssql_fetch_batch(mssql_link *mssql_ptr, mssql_result *result, int retvalue, int 
*column_types) {
-   int i, j;
-   int blocks_initialized=1;
+int _mssql_fetch_batch(mssql_link *mssql_ptr, mssql_result *result, int retvalue) 
+{
+   int i, j = 0;
+   int *column_types;
+   char computed_buf[16];
MSSQLLS_FETCH();
 
+   column_types = (int *) emalloc(sizeof(int) * result->num_fields);
+   for (i=0; inum_fields; i++) {
+   char *fname = (char *)dbcolname(mssql_ptr->link,i+1);
+
+   if (*fname) {
+   result->fields[i].name = estrdup(fname);
+   } else {
+   if (j>0) {
+   snprintf(computed_buf,16,"computed%d",j);
+   } else {
+   strcpy(computed_buf,"computed");
+   }
+   result->fields[i].name = estrdup(computed_buf);
+   j++;
+   }
+   result->fields[i].max_length = dbcollen(mssql_ptr->link,i+1);
+   result->fields[i].column_source = 
+estrdup(dbcolsource(mssql_ptr->link,i+1));
+   if (!result->fields[i].column_source) {
+   result->fields[i].column_source = empty_string;
+   }
+
+   column_types[i] = coltype(i+1);
+
+   result->fields[i].type = column_types[i];
+   /* set numeric flag */
+   switch (column_types[i]) {
+   case SQLINT1:
+   case SQLINT2:
+   case SQLINT4:
+   case SQLFLT8:
+   case SQLNUMERIC:
+

[PHP-CVS] cvs: php4 /main main.c

2001-03-07 Thread Frank M. Kromann

fmk Wed Mar  7 08:33:14 2001 EDT

  Modified files:  
/php4/main  main.c 
  Log:
  Removing a compiler warning
  
Index: php4/main/main.c
diff -u php4/main/main.c:1.355 php4/main/main.c:1.356
--- php4/main/main.c:1.355  Sat Mar  3 17:45:19 2001
+++ php4/main/main.cWed Mar  7 08:33:13 2001
@@ -19,7 +19,7 @@
 */
 
 
-/* $Id: main.c,v 1.355 2001/03/04 01:45:19 zeev Exp $ */
+/* $Id: main.c,v 1.356 2001/03/07 16:33:13 fmk Exp $ */
 
 
 #include 
@@ -640,7 +640,7 @@
PLS_FETCH();
 
if (setjmp(EG(bailout))==0) {
-   php_end_ob_buffers(SG(request_info).headers_only?0:1);
+   php_end_ob_buffers((zend_bool)(SG(request_info).headers_only?0:1));
}
 
if (setjmp(EG(bailout))==0) {



-- 
PHP CVS 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-CVS] cvs: php4 /ext/standard info.c

2001-03-03 Thread Frank M. Kromann

fmk Sat Mar  3 18:41:27 2001 EDT

  Modified files:  
/php4/ext/standard  info.c 
  Log:
  Changed code layout to remove PHP warning when running php as a CGI.
  
Index: php4/ext/standard/info.c
diff -u php4/ext/standard/info.c:1.129 php4/ext/standard/info.c:1.130
--- php4/ext/standard/info.c:1.129  Sun Feb 25 22:07:17 2001
+++ php4/ext/standard/info.cSat Mar  3 18:41:27 2001
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.129 2001/02/26 06:07:17 andi Exp $ */
+/* $Id: info.c,v 1.130 2001/03/04 02:41:27 fmk Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -60,7 +60,7 @@
 
 static void php_print_gpcse_array(char *name, uint name_length ELS_DC)
 {
-   zval **data, **tmp;
+   zval **data, **tmp, *tmp2;
char *string_key;
ulong num_key;
 
@@ -68,16 +68,7 @@
&& ((*data)->type==IS_ARRAY)) {
zend_hash_internal_pointer_reset((*data)->value.ht);
while (zend_hash_get_current_data((*data)->value.ht, (void **) &tmp) 
== SUCCESS) {
-   zval tmp2, *value_ptr;
 
-   if ((*tmp)->type != IS_STRING) {
-   tmp2 = **tmp;
-   zval_copy_ctor(&tmp2);
-   convert_to_string(&tmp2);
-   value_ptr = &tmp2;
-   } else {
-   value_ptr = *tmp;
-   }
PUTS("");
PUTS("");
PUTS(name);
@@ -95,14 +86,17 @@
PUTS("");
zend_print_zval_r(*tmp, 0);
PUTS("");
+   } else if ((*tmp)->type != IS_STRING) {
+   tmp2 = *tmp;
+   zval_copy_ctor(tmp2);
+   convert_to_string(tmp2);
+   PUTS(tmp2->value.str.val);
+   zval_dtor(tmp2);
} else {
-   PUTS(value_ptr->value.str.val);
+   PUTS((*tmp)->value.str.val);
}
PUTS("\n");
zend_hash_move_forward((*data)->value.ht);
-   if (value_ptr==&tmp2) {
-   zval_dtor(value_ptr);
-   }
}
}
 }



-- 
PHP CVS 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] PHP CGI-Binary

2001-02-25 Thread Frank M. Kromann

IF you dont specify --with-apache or --with-apxs configure options you will build the 
CGI !

- Frank

>Ok, I give up...  how do I build PHP as a CGI-Binary?  I've spent two days 
>searching the configure file for this.
>
>Julia
>
>-- 
>[  Julia Anne Case  ] [Ships are safe inside the harbor,   ]
>[Programmer at large] [  but is that what ships are really for.]  
>[   Admining Linux  ] [   To thine own self be true.   ]
>[ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ]
>  
>
>-- 
>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] Re: [PHP-WIN] INSERT into MSSQL Server

2001-02-13 Thread Frank M. Kromann

It is only the ' charactor there has a "problem" you have to excape any special 
character before inserting.

the text Joe's should be inserted like this"

INSERT INTO table1 (int_field, char_field) VALUES (1, 'Joe''s')

A single quote is escaped by an extra single quote.

- Frank

>I trying to insert some data into a MSSQL Server 7.0 database from Php. Some
>of the data has various characters ', >  . How can I tell SQL Server to
>treat these characters as part of the input.
>
>Ryan Conover
>
>-- 
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>




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




Re: [PHP] RE: [PHP-WIN] MSSQL Functions

2001-02-07 Thread Frank M. Kromann

Hi All,

the key komponent is ntwdblib.dll installed in winnt\system32. The dll uses 
other dll's to comunicate with the server dbmssocn.dll (tcp/ip) and dbmsnp.dll 
(NetBios). All the communication dll's should be installed with the ODBC driver. Just 
copy ntwdblib.dll from the SQL server to the php server.

You will need to use the 
ODBC manager to create client configurations as the tools for this will not be 
installed.

- Frank

>Toby,
>
>Yes, the client is requires because the MSSQL module 
uses some libraries
>from the client to function. I don't know which one. If Frank see 
this, he
>might be able to give you some detailed insight. I just know it has to be
>installed.
>
>-Flint
>
>-Original Message-
>From: Toby Miller 
[mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, February 07, 2001 4:04 PM
>To: 
[EMAIL PROTECTED]; [EMAIL PROTECTED]
>Subject: [PHP-WIN] MSSQL 
Functions
>
>
>Hey all,
>
>I've got a question about using the MSSQL Functions. The 
only way I'v!
e been
>able to use them is to install Microsoft SQL Client on the web server. Is
>there any way to get around this to use the MSSQL Functions without
>installing a 
copy of Microsoft SQL Client? Right now I am using the ODBC
>Functions to get around 
the problem, but I was wondering if it just relies
>on some DLL's that I could copy to 
the server or something like that? I know
>that people are using the MSSQL Functions 
on Linux and they obviously didn't
>need to install Microsoft SQL Client to get them 
to work so I'm just hoping
>there's a way around it?
>
>Thanks,
>Toby
>
>
>-- 
>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] MS SQL Question

2001-02-07 Thread Frank M. Kromann

The table "extended" is not known to the update command. You shoud use a syntax like 
this:

UPDATE table1 SET table1.field1 = (select field2 from table2 where 
table2.id=table1.id).

- Frank


>I am trying to update a table with data from another table within the same
>database with the following SQL
>
>UPDATE common SET common.[Extended Description] = extended.[Extended
>Description] WHERE common.[id] = extended.[Extended Description]
>
>the id is the primary key. I keep getting the following error.
>
>Server: Msg 107, Level 16, State 3, Line 1
>The column prefix 'extended' does not match with a table name or alias name
>used in the query.
>Server: Msg 107, Level 16, State 1, Line 1
>The column prefix 'extended' does not match with a table name or alias name
>used in the query.
>
>
>Anyone have any ideas.
>
>
>Ryan
>
>-- 
>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]