php-windows Digest 28 Jun 2001 15:09:08 -0000 Issue 632
Topics (messages 8086 through 8099):
Re: gd/apache1.3/WinNT
8086 by: Edmund
8092 by: Phil Driscoll
8099 by: Edmund
Re: help connecting to MS SQL 7.0 dbase
8087 by: Frank M. Kromann
8088 by: Jason Lustig
8095 by: Svensson, B.A.T.
yet another http server for PHP
8089 by: Masato Kataoka
Re: 500 error
8090 by: Phil Driscoll
8096 by: Svensson, B.A.T.
Re: notify user of duplicate entry
8091 by: Michael Rudel
8097 by: Pete Kuczynski
Re: Problem with W2K, PHP 4.02 and SYBASE
8093 by: Carlo Borreo
Spell checking w. PHP in Windows
8094 by: Christian Sandfeld
Re: Exec command still doesn't on Win2K and IIS
8098 by: BAMHA Mostafa Ftmms
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]
----------------------------------------------------------------------
Christian Sandfeld wrote:
>
Hi Christian,
> I'm new to the list, so I didn't get the full story. But I fealt like
> throwing in my 2 cents anyway. I'm running IIS4 on NT4.0 SP6, and was
> experiencing great difficulties getting PHP 4.0.5 to work when loading the
> PDF and GD .DLL's. I never bothered to find out which of the modules where
> causing the problems, so it could be either. At the end of the day I
> downgraded to ver. 4.0.4pl1 which worked a charm (haven't had the currage to
> try with 4.0.6 yet).
For me, it was pretty much a trial and error. I at first had most of
the
dll's included in the php.ini file (ie. extension=php_??.dll
uncommented).
Then I encountered the error, so I took out all of the extensions and
it worked. After a bit of trial and error, I discovered that if I
included php_gd.dll, the Apache server dumped an Internal server error.
If I commented it out, the Apache server worked. So enabling those
extensions that I needed (except gd), everything worked.
Now I don't know why it's doing that and since my understanding of
dll files is severely limited to the general knowledge of what they
are, I don't know how to solve it and since there aren't any logs
to prove anything of the sort, I can't report it to the PHP team.
Quite disheartening really.
But yea, the only choice is to downgrade to a 4.0.4 (which is probably
what I had in the first place).
Oh well..
Edmund
--
email: [EMAIL PROTECTED] | "boku wa ima mo, hashiri tsuzukeru."
On Wednesday 27 June 2001 11:37, Edmund wrote:
>
> Yup. They are. Actually, even when I upgraded my previous php
> installation with 4.05, it still couldn't load the gd dll file,
> or at least, that dll file was making php choke.
I've just installed the full Windows binary distribution on my NT4 box, and
in php.ini set my extension dir to ./extensions/ and uncommented the gd dll
extension line. PHP starts up perfectly.
Are you 100% sure you get no sensible error messages when you run php.exe -i
from the commandline?
Cheers
--
Phil Driscoll
Phil Driscoll wrote:
> I've just installed the full Windows binary distribution on my NT4 box, and
> in php.ini set my extension dir to ./extensions/ and uncommented the gd dll
> extension line. PHP starts up perfectly.
>
> Are you 100% sure you get no sensible error messages when you run php.exe -i
> from the commandline?
>
Nope. I just get an "abnormal program termination" or something like
that.
And then it throws me back to the command prompt.
I'm gonna try and do a full install again and see how things go. I
probably screwed up something along the way.
Edmund
--
email: [EMAIL PROTECTED] | "boku wa ima mo, hashiri tsuzukeru."
You neet to install the Client Tools for MSSQL Server (basically the file
ntwdblib.dll) and the enable the mssql extension. You can do this in php.ini py
removing the semi colon in front on the line
;extension=php_mssql.dll
Or if you are using the CGI version you could use dl("php_mssql.dll"); in the scripts
where you need these functions.
- Frank
> I am pretty new to PHP and currently using PHP 4.0.1 running on windows 98 -
> PWS 4.0 - I cannot connect to SQL Server - is there anything I need to
> configure separetely to connect?
>
> I can connect using ODBC but not the mssql functions
>
> Thank you.
>
> Joann Coffey
> [EMAIL PROTECTED]
>
> --
> 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 can connect using ODBC but not the mssql functions
Are the MSSQL extensions installed? That could be it.
--Jason
>I can connect using ODBC but not the mssql functions
If you can connect via ODBC, then it means that the
SQL server is set up to accept your connection. Most
likely your environment is not the problem in this case.
You might need to explore the php manual about the how-to
things to connect to the server instead.
Regards,
Anders
Hello PHP users,
I believe many people on this list run their PHP scripts
on IIS or Win32 Apache. I have released yet another HTTP server
that I belive is well suited for running PHP programs.
The program is still in development quality but I'd appreciate
any comments from PHP users here.
Orenosv HTTP server
http://hp.vector.co.jp/authors/VA027031/orenosv/index_en.html
Thank you
Masato
Features:
- multi-processed hosting of ISAPI extensions
if you have a PHP extension or other ISAPI extension that
is not thread-safe, you can run it in a pool of single-threaded
processes. if you have an extension that is "leaky" in terms of
memory or handles, you can restart processes after every N
executions. these processes can exit on idle timeout so as to
save system resources at off-peak times.
- network bandwidth control
the server can send files in bandwidth-controlled mode (throttling).
in this mode a single thread sends them in asynchronous fashion,
supporting a huge number of downloading users.
dynamically generated contents (like those from PHP) can be
fully buffered on disk, enabling the server to throttle-send these
contents while freeing system resources as soon as the execution ends.
- optimized for NT4/Win2K (won't run on Win98/ME)
is able to use TransmitFile() API where possible
- output compression (in next version)
dynamic contents as well as static ones can be compressed on the fly,
which will then be subjected to the normal buffering/chunking/throttling.
- No SSL/TLS, No virtual hosts
In my experience, if you see a 500 error from PHP on Windows, then you've
installed the ISAPI module and it's fallen over.
The two courses of action are:
Easy - switch to a cgi installation of php, or change your server to Apache
and use the Apache module version of PHP.
Hard - download the source, find the threading problem in php, fix it,
become a superhero and enjoy the adulation of this list :)
Cheers
--
Phil Driscoll
>I've installed PHP and MySQL on my Win2K Pro box according to
>a doc I got (thanks). Accessing a php-doc results in
>
>The page cannot be displayed
>There is a problem with the page you are trying to reach
>and it cannot be displayed.
This happens time to time with me when the bloody morons to
webmasters forgets to tell the server that one should have
access right to access those pages, or directories on the
www server.
So it might be a question of access right within the server
settings.
Hi Pete,
spontaneously I can give you two different ways/suggestions:
1.) Get the value 'mysql_query' returns.
If it's _not_ true, call 'mysql_errno'.
If it returns (1062) this means you have a dupplicate entry.
--> Inform the user.
2.) make a 'SELECT COUNT(*) as num_entries FROM asset WHERE ' + your unique key of
this table
if the result 'num_entries' is > 0 then you have a dupplicate entry.
--> Inform the user.
Hope this helps.
Greetinx,
Mike
Michael Rudel
- Web-Development, Systemadministration -
Besuchen Sie uns am 20. und 21. August 2001 auf der
online-marketing-düsseldorf in Halle 1 Stand E 16
_______________________________________________________________
Suchtreffer AG
Bleicherstraße 20
D-78467 Konstanz
Germany
fon: +49-(0)7531-89207-17
fax: +49-(0)7531-89207-13
e-mail: mailto:[EMAIL PROTECTED]
internet: http://www.suchtreffer.de
_______________________________________________________________
> -----Original Message-----
> From: Pete Kuczynski [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 27, 2001 7:30 PM
> To: PHP Lists
> Subject: [PHP-WIN] notify user of duplicate entry
>
>
> I want to prevent duplicate entries in by database in the hostname
> field.
>
> So far, I have modified my hostname column as such to prevent
> duplicate
> entries into it, it works:
>
> alter table <table> modify <column> varchar(15) null unique;
>
> Now I need to notify the user that enters a duplicate
> hostname of their
> error, the database prevents the entry, but the user dosn't know it.
>
> Here's my PHP script, any thought how best to modify it?
>
> THX!
>
> Pete
> <html>
> <body>
> <?php
>
> require("fedb.inc");
>
> mysql_connect(localhost,$user,$password);
>
> @mysql_select_db($db) or die( "Unable to select database");
>
> /*Insert into database */
>
>
> mysql_query ("INSERT INTO asset (site_id, hostname,
> device, model,
> serial, ip,
> dept, mhz, ram, hd_size, os_ver, status, data_port,
> pp_port, hub_port,
> digi_port, csmim_port, tprmim_port, xyplex_port,
> comments, fe)
> VALUES ('$site_id', '$hostname', '$device',
> '$model', '$serial', '$ip',
> '$dept', '$mhz', '$ram', '$hd_size',
> '$os_ver', '$status',
> '$data_port', '$pp_port', '$hub_port',
> '$digi_port',
> '$csmim_port', '$tprmim_port',
> '$xyplex_port',
> '$comments', '$fe')
> ");
>
>
>
>
> print ($site_id);
> print (" ");
>
>
>
> print ($hostname);
> print (" ");
>
>
>
> print ($device);
> print (" ");
>
>
> print ($model);
>
> print (" ");
>
> print ($serial);
>
> print (" ");
>
> print ($ip);
>
> print (" ");
>
> print ($dept);
>
> print (" ");
>
> print ($mhz);
>
> print (" ");
>
> print ($ram);
>
> print (" ");
>
> print ($hd_size);
>
> print (" ");
>
> print ($os_ver);
>
> print (" ");
>
> print ($status);
>
> print (" ");
>
> print ($data_port);
>
> print (" ");
>
> print ($pp_port);
>
> print (" ");
>
> print ($hub_port);
>
> print (" ");
>
> print ($digi_port);
>
> print (" ");
>
> print ($csmim_port);
>
> print (" ");
>
> print ($tprmim_port);
>
> print (" ");
>
> print ($xyplex_port);
>
> print (" ");
>
> print ($comments);
>
> print (" ");
>
> print ($fe);
>
> print (" ");
>
> print ("<p>");
>
> print ("<p>");
>
> print ("Thanks for submitting your device.");
>
> print ("<p>");
>
> print ("Please do not reload this page, it will produce
> a duplicate
> record");
>
>
>
>
> ?>
>
> <a href='index.html'><b>Home</b></a>
>
>
> </body>
> </html>
>
>
>
>
> --
> _______________________________________
> Pete Kuczynski
> Principal Field Engineer
> DHL Airways Inc.
> Infrastructure Technology & Services
> (773)-462-9758
> 24/7 Helpdesk 1-800-434-5767
>
Thanks Andrian,
Paul DuBois suggested the same thing you did.
The column that concerns me is already UNIQUE,
so all I need to do is something like this, after the insert statment
in PHP like you suggest:
// check if row is returned, if yes error, if no insert
if (mysql_affected_rows = 0)
{
echo "I'm sorry, I can't do that. A duplicate
hostname was found.";
Andrian Pervazov wrote:
>
> Try using mysql_affected_rows after the INSERT to see if a row was
> inserted and notify user accordingly.
>
> Andrian
>
> Pete Kuczynski wrote:
> >
> > I want to prevent duplicate entries in by database in the hostname
> > field.
> >
> > So far, I have modified my hostname column as such to prevent duplicate
> > entries into it, it works:
> >
> > alter table <table> modify <column> varchar(15) null unique;
> >
> > Now I need to notify the user that enters a duplicate hostname of their
> > error, the database prevents the entry, but the user dosn't know it.
> >
> > Here's my PHP script, any thought how best to modify it?
> >
> > THX!
> >
> > Pete
> > <html>
> > <body>
> > <?php
> >
> > require("fedb.inc");
> >
> > mysql_connect(localhost,$user,$password);
> >
> > @mysql_select_db($db) or die( "Unable to select database");
> >
> > /*Insert into database */
> >
> >
> > mysql_query ("INSERT INTO asset (site_id, hostname, device, model,
> > serial, ip,
> > dept, mhz, ram, hd_size, os_ver, status, data_port,
> > pp_port, hub_port,
> > digi_port, csmim_port, tprmim_port, xyplex_port,
> > comments, fe)
> > VALUES ('$site_id', '$hostname', '$device',
> > '$model', '$serial', '$ip',
> > '$dept', '$mhz', '$ram', '$hd_size',
> > '$os_ver', '$status',
> > '$data_port', '$pp_port', '$hub_port',
> > '$digi_port',
> > '$csmim_port', '$tprmim_port',
> > '$xyplex_port',
> > '$comments', '$fe')
> > ");
> >
> >
> > print ($site_id);
> > print (" ");
> >
> > print ($hostname);
> > print (" ");
> >
> > print ($device);
> > print (" ");
> >
> >
> > print ($model);
> >
> > print (" ");
> >
> > print ($serial);
> >
> > print (" ");
> >
> > print ($ip);
> >
> > print (" ");
> >
> > print ($dept);
> >
> > print (" ");
> >
> > print ($mhz);
> >
> > print (" ");
> >
> > print ($ram);
> >
> > print (" ");
> >
> > print ($hd_size);
> >
> > print (" ");
> >
> > print ($os_ver);
> >
> > print (" ");
> >
> > print ($status);
> >
> > print (" ");
> >
> > print ($data_port);
> >
> > print (" ");
> >
> > print ($pp_port);
> >
> > print (" ");
> >
> > print ($hub_port);
> >
> > print (" ");
> >
> > print ($digi_port);
> >
> > print (" ");
> >
> > print ($csmim_port);
> >
> > print (" ");
> >
> > print ($tprmim_port);
> >
> > print (" ");
> >
> > print ($xyplex_port);
> >
> > print (" ");
> >
> > print ($comments);
> >
> > print (" ");
> >
> > print ($fe);
> >
> > print (" ");
> >
> > print ("<p>");
> >
> > print ("<p>");
> >
> > print ("Thanks for submitting your device.");
> >
> > print ("<p>");
> >
> > print ("Please do not reload this page, it will produce a duplicate
> > record");
> >
> >
> >
> > ?>
> >
> > <a href='index.html'><b>Home</b></a>
> >
> >
> > </body>
> > </html>
> >
> > --
> > _______________________________________
> > Pete Kuczynski
> > Principal Field Engineer
> > DHL Airways Inc.
> > Infrastructure Technology & Services
> > (773)-462-9758
> > 24/7 Helpdesk 1-800-434-5767
> >
> > ------------------------------------------------------------------------
> > --
> > 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]
--
_______________________________________
Pete Kuczynski
Principal Field Engineer
DHL Airways Inc.
Infrastructure Technology & Services
(773)-462-9758
24/7 Helpdesk 1-800-434-5767
>I know I can get rid of the warning message by excluding warnings
>in the php.ini file. I just included it to show that it seems like php
>manages
>to connect, but then gets disconnected and the script just dies.
>
>I have tested this on Apache 1.3.12 and by just running the PHP executable.
I also answer privately since your message is very old.
For disabling those warning messages, I use:
sybase_min_server_severity (11);
sybase_min_client_severity (11);
in my PHP code, before calling connect or pconnect.
Or, in php.ini you can have these lines:
; Minimum server message severity to display.
sybct.min_server_severity = 11
; Minimum client message severity to display.
sybct.min_client_severity = 11
But the problem is that when I call connect or pconnect, there is a GPF.
This is not related to your problem, but if you can connect to Sybase using
sybase-ct under Windows please let me know.
Regards
Carlo Borreo
I have been looking for a while for a way to supply spell checking to the
users of my submit forms, and stumbled accross the tutorial at Zend
Technologies (http://www.zend.com/zend/spotlight/spellchecking.php?print=1)
dealing with this, utilizing the Aspell/Pspell modules.
Now, this is all dandy, but I have not been able to find any info what so
ever on how to accomplish this on the Windows platform. So my question is,
does anyone know how to make this work on a WinNT system, and (preferably)
where to obtaion the needed modules?
I thank you in advance for your time :)
/Christian
>exec(), system(), ... work well in isapi mode in php 4.0.6.
>check your code!!
>then post your code!!
Hi,
The program i tested is very simple. This is the php code
<?
echo "test ...";
exec("dir c:\\");
?>
##################
the execution of this script is :
test ...
Warning: Unable to fork [dir c:\] in c:\inetpub\wwwroot\manager_4\test.php
on line 3
##################
did you make any change in the php.ini file to let ISAPI version work ?????