php-windows Digest 14 Aug 2001 04:51:41 -0000 Issue 701
Topics (messages 8812 through 8827):
Re: Anybody have an example of connecting MSSQL?
8812 by: Erik H. Mathy
including files
8813 by: Paul Smith
PHP vs. PERL; Compatibility issues
8814 by: Jeff Howard
8815 by: Erik H. Mathy
MSSQL Functions
8816 by: John Meyer
8817 by: Flint Doungchak
8818 by: Phillip Bow
8821 by: Flint Doungchak
8822 by: Phillip Bow
How do you step through a database?
8819 by: Jeff Howard
8820 by: Flint Doungchak
8823 by: CJD
Build Modules on Win32
8824 by: Bruno Haller
8825 by: Phillip Bow
CGI error reported
8826 by: Usher
PWS Registry question
8827 by: Bob Kaehms
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
Welcome to the free world! ;)
$db = mssql_connect("ServerName","Account","Password");
- Erik
P.S. I did .ASP for a while before I went to PHP3. PHP was a revelation
compared to whacking .ASP code. I enjoy PHP. I do not enjoy coding .ASP. All
IMHO, of course!!
> -----Original Message-----
> From: Jeff Howard [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 13, 2001 10:31 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Anybody have an example of connecting MSSQL?
>
>
> I have been extremely successful using ASP and MS-SQL for a long time, but
> am making a transition to PHP. I've tried connecting to the SQL Server
> database, but have been unsuccessful. The way a data source is called in
> ASP is:
>
> database.open "Provider=SQLOLEDB;User Id=user;Password=password;Initial
> Catalog=mydatabase;Data Source=DATABASESERVER\SQLSERVER"
>
> How can I translate this into PHP?
>
>
>
> --
> 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]
>
I know how to include files. I have a directory structure that looks
like this:
/
/includes
/includes/errors
In the includes folder I have include files for things like my database.
In the errors folder I have documents that I have instructed Apache to
load as error docs, like error.404.php, error.401.php, etc. When someone
calls up the page /index.php it works fine. But when someone gets a 404
the includes don't work so well because of the directory it's in. I
*could* rereference the includes to "../" instead of "/includes" but my
include files call for more include files and I can't change those
references. Does this make any sense at all? Might I get some help on
this question (I haven't on previous questions I've asked). Thank you
all.
Regards,
Paul Smith
--
Paul Smith
[EMAIL PROTECTED]
http://www.dostuff.net
Being new to PHP, I was wondering what the benefits of PHP are over PERL?
Seems to me it's easier than PERL, but what else is there? Are there
benefits over ASP? Is it compatible with Netscape AND IE?
Jeff
Hi Jeff,
Ease of use, Speed, power, cross platform, speed, power. How's that sound?
:)
Seriously though, in a nutshell, it's easier to code, it executes
lightyears faster than anything else, it comes out of the box with more
database hooks than anything, and is fully cross platform.
Benefits over .ASP? Um, all of the above. .ASP is dog slow, tied to IIS and
MS databases. Sure, you can use ODBC but ODBC is also dog slow and a right
pain in the patootie.
Perl, while a bit more cross platform than .ASP, is also pretty slow. To be
frank, it wasn't built for the web. PHP is, from ground up. Also when it
comes to working with databases, PHP can't be beat.
Check out:
http://www.zend.com/zend/art/intro.php
It's a good introductory article.
Hope this helps! Welcome to the club...
- Erik
> -----Original Message-----
> From: Jeff Howard [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 13, 2001 11:52 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] PHP vs. PERL; Compatibility issues
>
>
> Being new to PHP, I was wondering what the benefits of PHP are over PERL?
> Seems to me it's easier than PERL, but what else is there? Are there
> benefits over ASP? Is it compatible with Netscape AND IE?
>
> Jeff
>
>
>
> --
> 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]
>
Just a quick question on the MSSQL functions: are they unsupported in the
CGI version of PHP?
No, they are supported on teh CGI version.
I don't know what you problem is now, but you just need to uncomment the
php_mssql.dll line in your php.ini file and make sure that you have the
extension. In addition, the MS SQL Client should be installed on the machine
in which PHP is running. It needs the client drivers to run properly.
-Flint
-----Original Message-----
From: John Meyer [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 13, 2001 12:05 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] MSSQL Functions
Just a quick question on the MSSQL functions: are they unsupported in the
CGI version of PHP?
--
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]
Nope they are running on my system as we speak. I would be interested to
know if there are any plans to update them though. Last I heard they were
still optimized for SQL 6.5.
--
phill
"John Meyer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Just a quick question on the MSSQL functions: are they unsupported in the
> CGI version of PHP?
>
Phill,
As far as I know, the version shipping with 4.0.6 and much earlier, as early
as 4.0.2 (I think), are built for SQL 7.0. Frank, is that true? You can
check CVS for the latest extensions.
-Flint
-----Original Message-----
From: Phillip Bow [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 13, 2001 12:11 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: MSSQL Functions
Nope they are running on my system as we speak. I would be interested to
know if there are any plans to update them though. Last I heard they were
still optimized for SQL 6.5.
--
phill
"John Meyer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Just a quick question on the MSSQL functions: are they unsupported in the
> CGI version of PHP?
>
--
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]
Good to know. I saw a post a couple weeks ago to the contrary which is why
I mentioned it.
--
phill
"Flint Doungchak" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Phill,
>
> As far as I know, the version shipping with 4.0.6 and much earlier, as
early
> as 4.0.2 (I think), are built for SQL 7.0. Frank, is that true? You can
> check CVS for the latest extensions.
>
> -Flint
>
> -----Original Message-----
> From: Phillip Bow [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 13, 2001 12:11 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: MSSQL Functions
>
>
> Nope they are running on my system as we speak. I would be interested to
> know if there are any plans to update them though. Last I heard they were
> still optimized for SQL 6.5.
> --
> phill
>
> "John Meyer" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Just a quick question on the MSSQL functions: are they unsupported in
the
> > CGI version of PHP?
> >
>
>
>
> --
> 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]
I've used Visual Basic for years and have never had a problem with this
issue. I can use the following code to do this:
do until (rs.eof)
...
rs.movenext
loop
Does anybody know how to step through a database in PHP?
Jeff,
If you're using mssql, as I suppose you are, you need to use
mssql_fetch_array($result);
See the mssql functions on www.php.net. There are a lot of good beginning
there.
-Flint
-----Original Message-----
From: Jeff Howard [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 13, 2001 12:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] How do you step through a database?
I've used Visual Basic for years and have never had a problem with this
issue. I can use the following code to do this:
do until (rs.eof)
...
rs.movenext
loop
Does anybody know how to step through a database in PHP?
--
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]
while ($item=mysql_fetch_array($result)) {
print $item[title];
}
The loop will continue until the result reaches the end then stops. Also
works for $result with no results in it (skips the loop) and you can use
mysql_data_seek($result,0);
to reset the counter to the top ready for the next loop
"Jeff Howard" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I've used Visual Basic for years and have never had a problem with this
> issue. I can use the following code to do this:
>
> do until (rs.eof)
> ..
> rs.movenext
> loop
>
> Does anybody know how to step through a database in PHP?
>
>
>
>
Hi,
I want to start building a module for PHP on Win32 using VC++ 6
I downloaded the 4.0.6 source but i have troubles to get the modules
compiled ... in php.net docu i found very old information about building
modules refering to PHP 3 and the information to get PHP compiled at all
seems to be outdated too...
Is there any webpage around or sth. That could help me?
Regards
Bruno
zend.com has a lot of useful PHP resources that every PHP programmer should
check out.
Here is what you are looking for though:
http://zend.com/apidoc/
--
phill
"Bruno Haller" <[EMAIL PROTECTED]> wrote in message
000301c12442$7b3b7460$fc6cc8c8@docbru">news:000301c12442$7b3b7460$fc6cc8c8@docbru...
> Hi,
>
> I want to start building a module for PHP on Win32 using VC++ 6
> I downloaded the 4.0.6 source but i have troubles to get the modules
> compiled ... in php.net docu i found very old information about building
> modules refering to PHP 3 and the information to get PHP compiled at all
> seems to be outdated too...
>
> Is there any webpage around or sth. That could help me?
>
> Regards
> Bruno
>
I just installed the windows edition of php 4.06 which uses the installation
program on NT4 Sp6 workstation then rebooted. I have IIS installed and the
personal web manager. I created the simple "hello world" test page in html
and it came up fine. When modified to include the line <?php print ("hello,
world\n"); ?> in the body it reports this error
The specified CGI application misbehaved by not returning a complete
set of HTTP headers. The headers it did return are:
Nothing after the word are: is returned.
Any idea what I hve done wrong.
This is more academic than anything else, but I was trying to
study the various implementations of PHP on windows. As one
test, I wanted to first configure PWS (on W98) to run PHP as a CGI, then
switch over to an isapi.dll. I realize that ISAPI is still considered
experimental except on W2K, and unstable at that, but this was an academic
excercise.
My assumption is that I just need to edit the registry entry and change it
from \path\to\php.exe to \path\to\sapi\php4isapi.dll. Not only did this not
work, but it "seemed" that I could change the entry to anything, and PWS would
continue to run the CGI version of PHP. (I did completely reboot the
system after each change)
So... are my assumptions correct, or am I missing something?
Thanks for any insight.