php-windows Digest 17 Jan 2002 21:40:11 -0000 Issue 957
Topics (messages 11483 through 11498):
Problem with Win32 php4apache.dll
11483 by: Stevens, Julian C
Re: Page not found
11484 by: Nicole Amashta
11485 by: Nicole Amashta
Re: Copying a file across the network.
11486 by: Nicole Amashta
11487 by: Ryan Marrs
11492 by: Grant Babb
VBA to Word - Syntax Question
11488 by: news.php.net
WAP
11489 by: LaserJetter
11493 by: Ross Fleming
PHP & MySQL problems, updating database..
11490 by: Hawk
11491 by: brother
11494 by: Nicole Amashta
11495 by: Nicole Amashta
11496 by: Nicole Amashta
11497 by: Asendorf, John
Re: Editor
11498 by: Brad Thomas
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 have been using a binary distribution of Apache 1.3.20 with PHP 4.1.1 on
Windows NT for a little while now, but cannot get PHP to work as a load module.
If I configure Apache to use PHP as a CGI executable it works fine, but I
would like to use some of the features that only come with the module.
In my http.conf I have:
LoadModule php4-module d:/php/sapi/php4apache.dll
and I have copied php4ts.dll to winnt\system32
On starting apache I get the following message:
warn: Loaded DSO php4-module d:/php/sapi/php4apache.dll uses plain Apache 1.3
API, this module might crash under EAPI! (please recompile it with -DEAPI)
I'm not sure how important this warning is, but as I'm using a binary
distribution I am not able to recompile. In addition, when I try to load any
PHP programs in my browser I get the message:
Warning: Failed opening '/apache/htdocs/myprog.php' for inclusion
(include_path = '.;d:\php\includes) in Unknown on line 0.
Nothing else appears in the browser!
Please can anyone suggest how I can get the PHP module to work.
Thanks,
Julian
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
--- End Message ---
--- Begin Message ---
Did you add the proper lines to associate PHP with Apache in the httpd.conf
file? AddType application .. blah blah, etc? There are about 3 lines you
need to add to get PHP working with Apache. I wasn't sure if you had done
this part or not.
Nicole Amashta
www.aeontrek.com
----- Original Message "Titus Cheung" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I have installed both Apache and PHP on my computer in the following
> directories:
> d:\program files\apache group\apache
> d:\documents and settings\administrator\desktop\mydir\yo\php4
>
> I then edited d:\program files\apache group\apache\conf\httpd.conf as per
> the instructions listed on:
>
http://hotwired.lycos.com/webmonkey/00/44/index4a_page9.html?tw=programming
>
> However, as soon as I tried to access the file
http://localhost/phpinfo.php,
> I saw a page not found error.
> I tested by viewing the other files in the htdocs document root directory
> such as http://localhost/index.html.ca and was able to see them okay. So
> yes my Apache server is running and I double check on the httpd.conf
file's
> setting but didn't find anything wrong. Any ideas?
>
> Thanks
>
>
--- End Message ---
--- Begin Message ---
Also be sure to set the web root path in your php.ini to wherever your
htdocs is ... if with Apache.
==================
"Titus Cheung" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I have installed both Apache and PHP on my computer in the following
> directories:
> d:\program files\apache group\apache
> d:\documents and settings\administrator\desktop\mydir\yo\php4
>
> I then edited d:\program files\apache group\apache\conf\httpd.conf as per
> the instructions listed on:
>
http://hotwired.lycos.com/webmonkey/00/44/index4a_page9.html?tw=programming
>
> However, as soon as I tried to access the file
http://localhost/phpinfo.php,
> I saw a page not found error.
> I tested by viewing the other files in the htdocs document root directory
> such as http://localhost/index.html.ca and was able to see them okay. So
> yes my Apache server is running and I double check on the httpd.conf
file's
> setting but didn't find anything wrong. Any ideas?
>
> Thanks
>
>
--- End Message ---
--- Begin Message ---
I had this same issue last week .. and I got it working. However, there were
no win98 boxes involved. All win2k here on the network involved. From an
NT/win2k standpoint, you need to make sure the apache service is running
with a network login (on the machine the apache is running on, of course).
1. stop apache
2. change the Login to some network logon that has already been given the
proper permissions to access directories read/write/etc.
3. restart apache
I also suggest mapping the drive that you are trying to access over the
network so you can use a "local" path, such as R:\shareddir.
If the files you need to access are on a win98 box, then I guess just make
sure the dir is shared. You can still map to that share also. The main thing
is to make sure the apache service is running as a network logon that was
setup on the machine you are trying to access.
I hope this helps some what. If you can, look back at some past posts to
this group that were around sometime last week. I posted there the steps I
took to getting this to work. Again, no win98 machines involved, though. So
.. i dunno ...
good luck,
Nicole Amashta
www.aeontrek.com
"Ryan Marrs" <[EMAIL PROTECTED]> wrote in message
EA9290E62E6CD311859200805F85164903C5B4FB@EXCHANGE">news:EA9290E62E6CD311859200805F85164903C5B4FB@EXCHANGE...
> I've run across a rather difficult problem to solve. I'm at the point
that
> I don't care how the solution comes, so long as it works. I need to be
able
> to upload/copy a file (potentially as large as 1gig) from a user's machine
> to this local network. I've exhausted my efforts trying post uploads, and
> have decided that is not the path I need to go. Then I thought I might
use
> the administrative share to copy the file from the local network, but
> unfortunately some of these machines are win98 and some are win2k. The
> win98 machines do not contain an administrative share, thus making that
> solution impossible. Does anyone have any suggestions? I'd like to keep
> the code as much PHP as I can, allowing me to insert some data into the
SQL
> server at a later time. I wouldn't mind a JavaScript/PHP combination if
> anyone has any recommendations.
>
> Thanks,
> Ryan
>
--- End Message ---
--- Begin Message ---
Unfortunately, the web server is running IIS. I should've been clear about
that to begin with. The permissions issue is not too much of a problem, I
could handle that, but unfortunately setting up the win98 share permissions
will be a bit more difficult. This will be for users to "upload" (and I use
that term loosely for the fact that I don't care if it's uploaded, I can't
fit a gig of information into a post method, so I'll probably have to go
with an ActiveX Component or copying across the network) files from their PC
to the web server. I can't exactly have them share the directory in order
to upload files. What I may wind up doing is having them copy the file to a
share on the web server, then type the filename into the form, and that's
the end of it, but I'd prefer a more "web friendly" solution.
Ryan
-----Original Message-----
From: Nicole Amashta [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 17, 2002 09:36 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: Copying a file across the network.
I had this same issue last week .. and I got it working. However, there were
no win98 boxes involved. All win2k here on the network involved. From an
NT/win2k standpoint, you need to make sure the apache service is running
with a network login (on the machine the apache is running on, of course).
1. stop apache
2. change the Login to some network logon that has already been given the
proper permissions to access directories read/write/etc.
3. restart apache
I also suggest mapping the drive that you are trying to access over the
network so you can use a "local" path, such as R:\shareddir.
If the files you need to access are on a win98 box, then I guess just make
sure the dir is shared. You can still map to that share also. The main thing
is to make sure the apache service is running as a network logon that was
setup on the machine you are trying to access.
I hope this helps some what. If you can, look back at some past posts to
this group that were around sometime last week. I posted there the steps I
took to getting this to work. Again, no win98 machines involved, though. So
.. i dunno ...
good luck,
Nicole Amashta
www.aeontrek.com
"Ryan Marrs" <[EMAIL PROTECTED]> wrote in message
EA9290E62E6CD311859200805F85164903C5B4FB@EXCHANGE">news:EA9290E62E6CD311859200805F85164903C5B4FB@EXCHANGE...
> I've run across a rather difficult problem to solve. I'm at the point
that
> I don't care how the solution comes, so long as it works. I need to be
able
> to upload/copy a file (potentially as large as 1gig) from a user's machine
> to this local network. I've exhausted my efforts trying post uploads, and
> have decided that is not the path I need to go. Then I thought I might
use
> the administrative share to copy the file from the local network, but
> unfortunately some of these machines are win98 and some are win2k. The
> win98 machines do not contain an administrative share, thus making that
> solution impossible. Does anyone have any suggestions? I'd like to keep
> the code as much PHP as I can, allowing me to insert some data into the
SQL
> server at a later time. I wouldn't mind a JavaScript/PHP combination if
> anyone has any recommendations.
>
> Thanks,
> Ryan
>
--
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]
--- End Message ---
--- Begin Message ---
>I've run across a rather difficult problem to solve. I'm at the point that
>I don't care how the solution comes, so long as it works. I need to be able
>to upload/copy a file (potentially as large as 1gig) from a user's machine
>to this local network.
[sorry for the less-than-detailed solution but i am a little pressed for
time today]
have you tried sockets? they take a little TLC to get working on Windows
machines sometimes but you can select the port and protocol for transfer:
from your problem it sounds like you need to be low-level. There is also a
possibility you can also use the win32 functions for this. check the
documentation for available functions in both libraries.
HTH,
grant
Grant Babb Email: [EMAIL PROTECTED]
Data Junction Corporation Phone: (512) 459-1308
2201 Northland Dr. Fax: (512) 459-1309
Austin, TX 78756-1117 Web: http://www.datajunction.com
--- End Message ---
--- Begin Message ---
I'm working on a simple PHP spell check that uses Word as its engine. The
whole thing works, but I want to close the temp document without being
prompted to save the VBA to do this according to several VBA sites is:
ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
I'm looking for the PHP syntax to do this.
Here's the whole function with the test print statement at the end. The
final version will just pass back the checked string.
function spellcheck($string){
$word = new COM("word.application") or die("Unable to instanciate Word");
$word->Visible = 0;
$word->Documents->Add();
$word->Selection->TypeText($string);
$word->ActiveDocument->CheckSpelling();
$word->Selection->WholeStory();
$corrected = $word->Selection->Text;
//the VBA sample code ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
$word->ActiveDocument->Close();
$word->Quit();
$word->Release();
$word = null;
print($corrected);
}
--- End Message ---
--- Begin Message ---
I was fiddling around with the Nokia WAP toolkit the other day and I've
created a pretty little WAP site - just listing dates and it has a WBMP
image as a welcome screen.
Whilst looking for someone to host the site, I noticed a review for f2s
which said "allows PHP to be combined with WML" That would be a pretty neat
thing to do - I could have a PHP script automatically port every page to WML
and WBMP images.
The problem is, how do you include PHP in a WML file? Do you have to use
<SCRIPT LANGUAGE="php"></SCRIPT> in a .wml file or can you use .php files?
(I can't just fidddle about because I don't have a WAP phone yet!)
Also, and I know this isn't really anything to do with PHP, what are the
dimensions in pixels of a typical WAP phone screen?
I checked my site using the emulator in the Nokia Toolkit and the one at
TagTag.com and my WBMP image fitted nicely in the middle of the screen. But
when my girlfriend showed it me on her phone, only about a third of the
image fitted on!! Making the image smaller wouldn't be a problem but I
dont really know what size to make it.
Any directions to some useful info would be greatly appreciated.
LJ
--- End Message ---
--- Begin Message ---
This is part of my final year project at university, so hopefully I'll be
able to help you. Some pointers...
1. visit http://www.allnetdevices.com/faq/ for wml info
2. never assume the size of a WAP phone screen, no two are alike.
3. keep the pages TINY! WAP phones have very little memory, and don't handle
big pages at all.
4. generating wml pages from php. Basically, you have to have a .php file
that creates html content. At the above webpage there is a php script that
determines whether a wap browser is opening the page and directs it
accordingly.
5. atart any php/wml pages with <? header("Content-type=text/vnd.wap.wml");
?> and it's now a page a phone will accept.
6. as for the porting all your files to wml, then that is VERY difficult to
do. I'm not even sure PHP could do it. This is what my project is all
about and I'm not using PHP for the conversion. It's harder than you might
think to do. Professional software can do this for you (I believe IBM has a
solution but it costs a bomb) but I'd consider having a wap site and web
site, with an index.php file at the root that sends the user to the correct
version (using the script at 1.)
Good luck with it, let me know how you get on as I'd really like to hear
other peoples opinions on this, seeing as I'll have to write an 80 page
dissertation on it!!!
Regards
Ross Fleming
-----Original Message-----
From: LaserJetter [mailto:[EMAIL PROTECTED]]
Sent: 17 January 2002 17:27
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-WIN] WAP
I was fiddling around with the Nokia WAP toolkit the other day and I've
created a pretty little WAP site - just listing dates and it has a WBMP
image as a welcome screen.
Whilst looking for someone to host the site, I noticed a review for f2s
which said "allows PHP to be combined with WML" That would be a pretty neat
thing to do - I could have a PHP script automatically port every page to WML
and WBMP images.
The problem is, how do you include PHP in a WML file? Do you have to use
<SCRIPT LANGUAGE="php"></SCRIPT> in a .wml file or can you use .php files?
(I can't just fidddle about because I don't have a WAP phone yet!)
Also, and I know this isn't really anything to do with PHP, what are the
dimensions in pixels of a typical WAP phone screen?
I checked my site using the emulator in the Nokia Toolkit and the one at
TagTag.com and my WBMP image fitted nicely in the middle of the screen. But
when my girlfriend showed it me on her phone, only about a third of the
image fitted on!! Making the image smaller wouldn't be a problem but I
dont really know what size to make it.
Any directions to some useful info would be greatly appreciated.
LJ
--
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]
--- End Message ---
--- Begin Message ---
Having a problem with this, I have a working login that supports multiple
users, and I'm trying to make it possible for the users to change their own
settings etc, but I get killed when trying to send the data to the MySQL
database.
To connect I use mysql_connect($host,$user,$pswd) and mysql_select_db($db)
the retrieving data from the form works since I belive, since it showed up
when I added a print "$the vars " but I don't know how to save it to the
database..
I might be missing some line or maybe it's just because I'm a newbie or
something.. ;D
anyway.. I use something similiar to this
$query = "UPDATE users SET email='$email'"; // and so on..
$result = mysql_query($query) or die ("blabla");
I don't get any error lines or anything, the only thing that shows is the
"blabla" thing.
I also tried INSERT INTO in the query but that didn't make any difference :p
if anyone could tell me what I'm doing wrong I would be happy.. :p
"the best way to learn is to ask people that know" :p
Hawk
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Hawk [mailto:[EMAIL PROTECTED]]
>
> I might be missing some line or maybe it's just because I'm a
> newbie or
> something.. ;D
> anyway.. I use something similiar to this
> $query = "UPDATE users SET email='$email'"; // and so on..
> $result = mysql_query($query) or die ("blabla");
Well if this codesnippet is what you used then (maybe) I see the problem.
$query = "UPDATE users SET email='$email' WHERE something=something";
Even though the uppdate syntax don't req. an WHERE statement it seems to fit
better in this case...
http://www.mysql.com/doc/U/P/UPDATE.html
The replace syntax may also give you some help in the problem solving.
http://www.mysql.com/doc/R/E/REPLACE.html
GL
/brother
--- End Message ---
--- Begin Message ---
Please try this:
if ( $link = mysql_connect($host,$user,$pswd) )
{
if( !mysql_select_db($db, $link) )
{
echo "error selecting db";
}
}
else {
echo "error connecting to db";
}
Nicole Amashta
www.aeontrek.com
"Hawk" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Having a problem with this, I have a working login that supports multiple
> users, and I'm trying to make it possible for the users to change their
own
> settings etc, but I get killed when trying to send the data to the MySQL
> database.
> To connect I use mysql_connect($host,$user,$pswd) and mysql_select_db($db)
>
> the retrieving data from the form works since I belive, since it showed up
> when I added a print "$the vars " but I don't know how to save it to the
> database..
>
> I might be missing some line or maybe it's just because I'm a newbie or
> something.. ;D
> anyway.. I use something similiar to this
> $query = "UPDATE users SET email='$email'"; // and so on..
> $result = mysql_query($query) or die ("blabla");
>
> I don't get any error lines or anything, the only thing that shows is the
> "blabla" thing.
>
> I also tried INSERT INTO in the query but that didn't make any difference
:p
>
> if anyone could tell me what I'm doing wrong I would be happy.. :p
> "the best way to learn is to ask people that know" :p
>
> Hawk
>
>
--- End Message ---
--- Begin Message ---
... and if you verify that your connection to mysql is working, then check
your query.
Your update will update EVERY row in the user table. You may want to add the
where clause and specify what rows to update ... like someone else mentioned
.. otherwise, you will funkify your user data ... careful careful if this
is not what you intended ... ;)
goodluck,
nicole amashta
www.aeontrek.com
======================
"Hawk" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Having a problem with this, I have a working login that supports multiple
> users, and I'm trying to make it possible for the users to change their
own
> settings etc, but I get killed when trying to send the data to the MySQL
> database.
> To connect I use mysql_connect($host,$user,$pswd) and mysql_select_db($db)
>
> the retrieving data from the form works since I belive, since it showed up
> when I added a print "$the vars " but I don't know how to save it to the
> database..
>
> I might be missing some line or maybe it's just because I'm a newbie or
> something.. ;D
> anyway.. I use something similiar to this
> $query = "UPDATE users SET email='$email'"; // and so on..
> $result = mysql_query($query) or die ("blabla");
>
> I don't get any error lines or anything, the only thing that shows is the
> "blabla" thing.
>
> I also tried INSERT INTO in the query but that didn't make any difference
:p
>
> if anyone could tell me what I'm doing wrong I would be happy.. :p
> "the best way to learn is to ask people that know" :p
>
> Hawk
>
>
--- End Message ---
--- Begin Message ---
You may want to add
exit;
where the failures occur to stop code "execution."
> if ( $link = mysql_connect($host,$user,$pswd) )
> {
> if( !mysql_select_db($db, $link) )
> {
> echo "error selecting db";
exit;
> }
> }
> else {
> echo "error connecting to db";
exi;
> }
"Nicole Amashta" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Please try this:
>
> if ( $link = mysql_connect($host,$user,$pswd) )
> {
> if( !mysql_select_db($db, $link) )
> {
> echo "error selecting db";
> }
> }
> else {
> echo "error connecting to db";
> }
>
> Nicole Amashta
> www.aeontrek.com
>
> "Hawk" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Having a problem with this, I have a working login that supports
multiple
> > users, and I'm trying to make it possible for the users to change their
> own
> > settings etc, but I get killed when trying to send the data to the MySQL
> > database.
> > To connect I use mysql_connect($host,$user,$pswd) and
mysql_select_db($db)
> >
> > the retrieving data from the form works since I belive, since it showed
up
> > when I added a print "$the vars " but I don't know how to save it to the
> > database..
> >
> > I might be missing some line or maybe it's just because I'm a newbie or
> > something.. ;D
> > anyway.. I use something similiar to this
> > $query = "UPDATE users SET email='$email'"; // and so on..
> > $result = mysql_query($query) or die ("blabla");
> >
> > I don't get any error lines or anything, the only thing that shows is
the
> > "blabla" thing.
> >
> > I also tried INSERT INTO in the query but that didn't make any
difference
> :p
> >
> > if anyone could tell me what I'm doing wrong I would be happy.. :p
> > "the best way to learn is to ask people that know" :p
> >
> > Hawk
> >
> >
>
>
--- End Message ---
--- Begin Message ---
or
die ("Error Message");
---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit
> -----Original Message-----
> From: Nicole Amashta [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 17, 2002 2:00 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: PHP & MySQL problems, updating database..
>
>
> You may want to add
> exit;
> where the failures occur to stop code "execution."
>
>
> > if ( $link = mysql_connect($host,$user,$pswd) )
> > {
> > if( !mysql_select_db($db, $link) )
> > {
> > echo "error selecting db";
> exit;
> > }
> > }
> > else {
> > echo "error connecting to db";
> exi;
> > }
>
>
>
> "Nicole Amashta" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Please try this:
> >
> > if ( $link = mysql_connect($host,$user,$pswd) )
> > {
> > if( !mysql_select_db($db, $link) )
> > {
> > echo "error selecting db";
> > }
> > }
> > else {
> > echo "error connecting to db";
> > }
> >
> > Nicole Amashta
> > www.aeontrek.com
> >
> > "Hawk" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Having a problem with this, I have a working login that supports
> multiple
> > > users, and I'm trying to make it possible for the users
> to change their
> > own
> > > settings etc, but I get killed when trying to send the
> data to the MySQL
> > > database.
> > > To connect I use mysql_connect($host,$user,$pswd) and
> mysql_select_db($db)
> > >
> > > the retrieving data from the form works since I belive,
> since it showed
> up
> > > when I added a print "$the vars " but I don't know how to
> save it to the
> > > database..
> > >
> > > I might be missing some line or maybe it's just because
> I'm a newbie or
> > > something.. ;D
> > > anyway.. I use something similiar to this
> > > $query = "UPDATE users SET email='$email'"; // and so on..
> > > $result = mysql_query($query) or die ("blabla");
> > >
> > > I don't get any error lines or anything, the only thing
> that shows is
> the
> > > "blabla" thing.
> > >
> > > I also tried INSERT INTO in the query but that didn't make any
> difference
> > :p
> > >
> > > if anyone could tell me what I'm doing wrong I would be happy.. :p
> > > "the best way to learn is to ask people that know" :p
> > >
> > > Hawk
> > >
> > >
> >
> >
>
>
>
> --
> 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]
>
--- End Message ---
--- Begin Message ---
"Sanjuroe" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am looking for a light-weight editor which supports PHP tag
> highlighting and indenting.
>
> Which editor do you recommend?
>
> Sanjuro
>
Edit Plus is good. (http://www.editplus.com)
Brad
--- End Message ---