php-windows Digest 28 Jun 2005 21:48:11 -0000 Issue 2710
Topics (messages 26145 through 26155):
fgets on COM1
26145 by: Gemma Montero
Re: PHP 5.0.4 - Can anyone help me get it to work?
26146 by: Georgio
26147 by: Edin Kadribasic
26148 by: Jon
Download with security
26149 by: Rui Monteiro
26150 by: Rodrigo
importStylesheet doen't work
26151 by: Paul Carvill
Re: PHP & GD on Windows
26152 by: Aaron Todd
Specified module cannot be loaded error for PHP when start Apache
26153 by: Alvin Chin
26154 by: Alvin Chin
E_ALL and still not getting notices...
26155 by: Travis Raybold
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]
----------------------------------------------------------------------
--- Begin Message ---
I'm trying to do a script which write and read to/from COM1.
All works fine when something is connected on COM1, but when I
disconnect the rs232 cable or it fails, the script try to do fgets and
never stop.
set_mode command works, write command works, but fgets don't say that
nothing is connected, and the script continue trying to read from COM1.
I have to kill the php task to liberate COM1
How can I solve this problem?
Code:
//---------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------
//configuro el puerto
$set_mode = "MODE COM$numcom: BAUD=38400 PARITY=N DATA=8 STOP=1 TO=OFF
XON=OFF ODSR=OFF OCTS=OFF DTR=OFF RTS=OFF IDSR=OFF";
exec($set_mode, $output, $result);
#compruebo el resultado del exec comando mode
switch ($result) {
case 0:
echo "COM$numcom configurado correctamente.<br>";
break;
default :
echo "No se ha podido configurar el COM$numcom.<br>";
$error_configuracion = true;
}
if (!$error_configuracion) {
//abro el puerto
$serial_port = fopen("COM$numcom", "wb+");
if (isset($serial_port)) {
//si ha podido abrir la conexion ejecuto comandos y leo sus
respuestas
$comando = "MICOMANDO";
//Ejecuto el comando
$result = fwrite($serial_port, "* $comando\r\n");
//echo $result;
if (!$result) {
//no puede escribir
echo "Error escribiendo en COM$numcom <br>";
} else {
//voy leyendo el resultado de mi comando
$buffer = fgets($serial_port, 1024);
while (trim($buffer)!="") {
//echo "BUFFER=$buffer<br>";
$res .= ";$buffer";
$buffer = fgets($serial_port, 1024);
}
//echo "*$res*<br>";
}
}
}
//---------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------
thanks
--- End Message ---
--- Begin Message ---
Thanks Matt. The Operating System on my machine is Windows 98SE. I saw
several versions of Apache when I searched online (
http://www.apache.org/dist/httpd/binaries/win32/ ) and I am sort of
confused. Which one would you recommend I download?
Georgio
""Matt Murphy"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Windows 98 is a terrible operating system. You shouldn't be using it for
web surfing, much less web serving.
Windows 2000 & Apache 2.0 works just fine.
Matt
> -----Original Message-----
> From: Georgio [mailto:[EMAIL PROTECTED]
> Sent: Sunday, June 26, 2005 5:04 PM
> To: [email protected]
> Subject: [PHP-WIN] PHP 5.0.4 - Can anyone help me get it to work?
>
> Anyone who has successfully got PHP5.0.4 working on a system
> with Windows 98SE / PWS 4.0 / Internet Explorer 6 should
> please assist me.
>
> I just upgraded from PHP4.3.2 to PHP5.0.4 and for the past
> three days, I have not been able to get it to work on Windows
> 98SE / PWS 4.0. I get the usual HTTP 500 - Internal server
> error (Internet Explorer). This is the actual result
> displayed on the web site:
> ++++++
> The page cannot be displayed
> There is a problem with the page you are trying to reach and
> it cannot be displayed.
>
> --------------------------------------------------------------
> --------------
> ----
>
> Please try the following:
>
> Open the localhost home page, and then look for links to
> the information you want.
> Click the Refresh button, or try again later.
> Click Search to look for information on the Internet.
> You can also see a list of related sites.
>
> HTTP 500 - Internal server error
> Internet Explorer
> ++++++
>
> Using the command-line program, after about 15 seconds, I get
> these on the screen before the output of the script:
> ++++++
> Cannot find module (IP-MIB): At line 0 in (none) Cannot find
> module (IF-MIB): At line 0 in (none) Cannot find module
> (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB):
> At line 0 in (none) Cannot find module (SNMPv2-MIB): At line
> 0 in (none) Cannot find module (SNMPv2-SMI): At line 0 in
> (none) Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
> Cannot find module (UCD-DEMO-MIB): At line 0 in (none) Cannot
> find module (SNMP-TARGET-MIB): At line 0 in (none) Cannot
> find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
> Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
> Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
> Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
> Cannot find module (SNMP-MPD-SMI): At line 0 in (none) Cannot
> find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
> Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in
> (none) Cannot find module (SNMPv2-TM): At line 0 in (none)
> ++++++
>
> Whatever these are, I do not have a clue.
>
> Could anyone help me out with these.
>
> Thanks
>
> Georgio
>
> --
> PHP Windows Mailing List (http://www.php.net/) To
> unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Hi Georgio,
The easiest way to do that is to install WAMP. You'll get all you need in
one easy to install package that includes php, apache and mysql.
http://www.wampserver.com/en/
Edin
----- Original Message -----
From: "Georgio" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, June 28, 2005 12:08 PM
Subject: Re: [PHP-WIN] PHP 5.0.4 - Can anyone help me get it to work?
> Thanks Matt. The Operating System on my machine is Windows 98SE. I saw
> several versions of Apache when I searched online (
> http://www.apache.org/dist/httpd/binaries/win32/ ) and I am sort of
> confused. Which one would you recommend I download?
>
> Georgio
>
> ""Matt Murphy"" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> Windows 98 is a terrible operating system. You shouldn't be using it for
> web surfing, much less web serving.
>
> Windows 2000 & Apache 2.0 works just fine.
>
> Matt
>
> > -----Original Message-----
> > From: Georgio [mailto:[EMAIL PROTECTED]
> > Sent: Sunday, June 26, 2005 5:04 PM
> > To: [email protected]
> > Subject: [PHP-WIN] PHP 5.0.4 - Can anyone help me get it to work?
> >
> > Anyone who has successfully got PHP5.0.4 working on a system
> > with Windows 98SE / PWS 4.0 / Internet Explorer 6 should
> > please assist me.
> >
> > I just upgraded from PHP4.3.2 to PHP5.0.4 and for the past
> > three days, I have not been able to get it to work on Windows
> > 98SE / PWS 4.0. I get the usual HTTP 500 - Internal server
> > error (Internet Explorer). This is the actual result
> > displayed on the web site:
> > ++++++
> > The page cannot be displayed
> > There is a problem with the page you are trying to reach and
> > it cannot be displayed.
> >
> > --------------------------------------------------------------
> > --------------
> > ----
> >
> > Please try the following:
> >
> > Open the localhost home page, and then look for links to
> > the information you want.
> > Click the Refresh button, or try again later.
> > Click Search to look for information on the Internet.
> > You can also see a list of related sites.
> >
> > HTTP 500 - Internal server error
> > Internet Explorer
> > ++++++
> >
> > Using the command-line program, after about 15 seconds, I get
> > these on the screen before the output of the script:
> > ++++++
> > Cannot find module (IP-MIB): At line 0 in (none) Cannot find
> > module (IF-MIB): At line 0 in (none) Cannot find module
> > (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB):
> > At line 0 in (none) Cannot find module (SNMPv2-MIB): At line
> > 0 in (none) Cannot find module (SNMPv2-SMI): At line 0 in
> > (none) Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
> > Cannot find module (UCD-DEMO-MIB): At line 0 in (none) Cannot
> > find module (SNMP-TARGET-MIB): At line 0 in (none) Cannot
> > find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
> > Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
> > Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
> > Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
> > Cannot find module (SNMP-MPD-SMI): At line 0 in (none) Cannot
> > find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
> > Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in
> > (none) Cannot find module (SNMPv2-TM): At line 0 in (none)
> > ++++++
> >
> > Whatever these are, I do not have a clue.
> >
> > Could anyone help me out with these.
> >
> > Thanks
> >
> > Georgio
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/) To
> > unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
Georgio,
Even if you do happen to get is partly running you will be plagued by many
errors because PHP 5 want true win32 all of the win 9x OS's will fail in
several of the modules. You should either upgrade to 2000/XP/2003 or go
back to PHP tree 4.
I will agree with Matt, you should not be using 9x for serving.
If you are only using it as a test machine there are several LAMP (Linux,
Apache, MySQL and PHP) distros available for download that have been
preconfigured.
Jon
""Matt Murphy"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Windows 98 is a terrible operating system. You shouldn't be using it for
web surfing, much less web serving.
Windows 2000 & Apache 2.0 works just fine.
Matt
> -----Original Message-----
> From: Georgio [mailto:[EMAIL PROTECTED]
> Sent: Sunday, June 26, 2005 5:04 PM
> To: [email protected]
> Subject: [PHP-WIN] PHP 5.0.4 - Can anyone help me get it to work?
>
> Anyone who has successfully got PHP5.0.4 working on a system
> with Windows 98SE / PWS 4.0 / Internet Explorer 6 should
> please assist me.
>
> I just upgraded from PHP4.3.2 to PHP5.0.4 and for the past
> three days, I have not been able to get it to work on Windows
> 98SE / PWS 4.0. I get the usual HTTP 500 - Internal server
> error (Internet Explorer). This is the actual result
> displayed on the web site:
> ++++++
> The page cannot be displayed
> There is a problem with the page you are trying to reach and
> it cannot be displayed.
>
> --------------------------------------------------------------
> --------------
> ----
>
> Please try the following:
>
> Open the localhost home page, and then look for links to
> the information you want.
> Click the Refresh button, or try again later.
> Click Search to look for information on the Internet.
> You can also see a list of related sites.
>
> HTTP 500 - Internal server error
> Internet Explorer
> ++++++
>
> Using the command-line program, after about 15 seconds, I get
> these on the screen before the output of the script:
> ++++++
> Cannot find module (IP-MIB): At line 0 in (none) Cannot find
> module (IF-MIB): At line 0 in (none) Cannot find module
> (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB):
> At line 0 in (none) Cannot find module (SNMPv2-MIB): At line
> 0 in (none) Cannot find module (SNMPv2-SMI): At line 0 in
> (none) Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
> Cannot find module (UCD-DEMO-MIB): At line 0 in (none) Cannot
> find module (SNMP-TARGET-MIB): At line 0 in (none) Cannot
> find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
> Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
> Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
> Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
> Cannot find module (SNMP-MPD-SMI): At line 0 in (none) Cannot
> find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
> Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in
> (none) Cannot find module (SNMPv2-TM): At line 0 in (none)
> ++++++
>
> Whatever these are, I do not have a clue.
>
> Could anyone help me out with these.
>
> Thanks
>
> Georgio
>
> --
> PHP Windows Mailing List (http://www.php.net/) To
> unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Hello there,
I got to make a page where after a user login, he can download whatever
files he want (the available for his access level).
My question is where do I make the security access?
1 - On the server - Apache. It would be very difficult to create each user
access whenever a new user appeared.
2 - Programming - Php. But in this case there would be a problem, since I
can't control the file links. After someone downloaded the file, he could
download it again without making any type of authentication.
How can I make the link available only after login?
Thank you very much for your time,
Rui
--- End Message ---
--- Begin Message ---
First use an authorisation class to authenticate a user.
You'll find one @ www.phpclasses.org (search for auth or something like
that).
Then you can use the "Download file" class @ phpclasses.org
-->http://www.phpclasses.org/browse/package/699.html
Combine these 2 and you're set :)
Grtz
Rodrigo
-----Original Message-----
From: Rui Monteiro [mailto:[EMAIL PROTECTED]
Sent: dinsdag 28 juni 2005 16:57
To: [email protected]
Subject: [PHP-WIN] Download with security
Hello there,
I got to make a page where after a user login, he can download whatever
files he want (the available for his access level).
My question is where do I make the security access?
1 - On the server - Apache. It would be very difficult to create each user
access whenever a new user appeared.
2 - Programming - Php. But in this case there would be a problem, since I
can't control the file links. After someone downloaded the file, he could
download it again without making any type of authentication.
How can I make the link available only after login?
Thank you very much for your time,
Rui
--
PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi,
I'm using PHP 5.0.4 on Windows 2000 with IIS. Try as I might I can't get
an XSLT transformation to work. Here's my code, all I get when I run
collection.php is:
"loaded collection xml ok
loaded collection xsl ok
couldn't import the stylesheet"
Is is possible to get a detailed error returned from the XSLTProcessor()
class? I know the xml and xsl are ok as I can run the transform using ASP.
Thanks in advance,
Paul
collection.xml:
<collection>
<cd>
<title>Fight for your mind</title>
<artist>Ben Harper</artist>
<year>1995</year>
</cd>
<cd>
<title>Electric Ladyland</title>
<artist>Jimi Hendrix</artist>
<year>1997</year>
</cd>
</collection>
collection.xsl:
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl:param name="owner" select="'Nicolas Eliaszewicz'"/>
<xsl:output method="html" encoding="iso-8859-1" indent="no"/>
<xsl:template match="collection">
Hey! Welcome to <xsl:value-of select="$owner"/>'s sweet CD collection!
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="cd">
<h1><xsl:value-of select="title"/></h1>
<h2>by <xsl:value-of select="artist"/> - <xsl:value-of select="year"/></h2>
<hr />
</xsl:template>
</xsl:stylesheet>
collection.php:
<?php
$xml_doc=new DomDocument;
if (!$xml_doc->load("collection.xml")) {
echo "couldn't load collection xml";
}
else {
echo "loaded collection xml ok<br>";
}
$xsl=new DomDocument;
if (!$xsl->load("collection.xsl")) {
echo "couldn't load collection xsl";
}
else {
echo "loaded collection xsl ok<br>";
}
$xp=new XSLTProcessor();
if (!$xp->importStylesheet($xsl)) {
echo "couldn't import the stylesheet<br>";
exit;
}
else {
echo "imported the stylesheet into the processor ok<br>";
}
echo $xp->transformToDoc($xml_doc);
?>
**************************************************************************
e-solutions for marketing
http://www.elateral.com/uk
Elateral Limited, Crosby Way, Farnham, GU9 7XX, UK
Tel. +44 (0)1252 740740
Fax. +44 (0)1252 740741
***********************************************************************
This e-mail is confidential and may be privileged. It may be read,
copied and used only by the intended recipient. If you have received
it in error please contact the sender immediately by return e-mail or
by telephone. Please then delete the e-mail and do not disclose its
contents to any person. We believe, but do not warrant, that this
e-mail and any attachments are virus free. You should take full
responsibility for virus checking. Elateral reserves the right to
monitor all e-mail communications through its internal and external
networks. The opinions or ideas expressed above belong to their
author and do not necessarily reflect the views of the Elateral Group.
***********************************************************************
--- End Message ---
--- Begin Message ---
Thank you very much. I am used to Linux where you have to add it in when
run ./configure. I would have never even tried to just enable it in the
php.ini file. I thought something had to be done before php was built.
Thanks again,
Aaron
--- End Message ---
--- Begin Message ---
I am trying to enable extensions in PHP5 and integrate it with Apache2
web server on Windows XP, but I get the following error:
PHP Startup: Unable to load dynamic library 'E:\PHP\ext\php_mysql.dll' -
the specified module could not be found.
The php_mysql.dll file exists in E:\PHP\ext and the permissions are set
so it's readable, so that's not the problem.
I've checked in my php.ini file which is in E:\php that the
extension_dir = "E:\php\ext" and I've followed everything from
http://ca3.php.net/manual/en/install.windows.manual.php. I added E:\php
to my PATH and set the PHPIniDir directive as sepcified on the link.
However, it still doesn't work.
Anybody know what may be going wrong?
Thanks.
Alvin
--- End Message ---
--- Begin Message ---
Never mind I solved the problem. In my httpd.conf file for Apache, the
PhpIniDir needed a trailing \.
Alvin
Alvin Chin wrote:
I am trying to enable extensions in PHP5 and integrate it with Apache2
web server on Windows XP, but I get the following error:
PHP Startup: Unable to load dynamic library 'E:\PHP\ext\php_mysql.dll'
- the specified module could not be found.
The php_mysql.dll file exists in E:\PHP\ext and the permissions are
set so it's readable, so that's not the problem.
I've checked in my php.ini file which is in E:\php that the
extension_dir = "E:\php\ext" and I've followed everything from
http://ca3.php.net/manual/en/install.windows.manual.php. I added
E:\php to my PATH and set the PHPIniDir directive as sepcified on the
link.
However, it still doesn't work.
Anybody know what may be going wrong?
Thanks.
Alvin
--- End Message ---
--- Begin Message ---
if i have a dummy page with nothing but:
print error_reporting();
print $sUndefinedVariable;
i get:
2047
*Notice*: Undefined variable: sUndefinedVariable
as expected. but once i include my file that has everything else i need
(including adodb and a bunch of files ive developed) i do the same
thing, and i get:
2047
but no notice. i thought for sure adodb was resetting the
error_reporting level or something, but it seems to be the same, right
before i print the undeclared variable, yet it doesn't complain. has
anyone seen this before?
thanks in advance,
--travis
--- End Message ---