php-windows Digest 8 Jan 2002 21:24:02 -0000 Issue 943
Topics (messages 11341 through 11353):
Re: How to download PHP files URGENT !!!
11341 by: Pac mon
using php_imap extension
11342 by: denis
11345 by: Frank M. Kromann
Can I access files from a mapped drive or over the network?
11343 by: Nicole Amashta
11344 by: Erik H. Mathy
11346 by: Svensson, B.A.T. (HKG)
11347 by: Nicole Amashta
11349 by: Svensson, B.A.T. (HKG)
11350 by: Christoph Grottolo
11351 by: Svensson, B.A.T. (HKG)
11352 by: Nicole Amashta
fread error
11348 by: Brad Harriger
mysql_get_server_info(
11353 by: brother
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 used sockets previously. The biggest problem I had came when a user
would try and connect to a server that was offline. The script would hang
suck down the CPU and RAM. You certainly want to put an 'or die("blah")' or
something in.. If the problem is that it's hanging... Otherwise I could not
be sure what the problem is w/o more information.
>
>hi
>has anybody tried to use sockets with php 4.1.1 undew win 2000?
>the extension loaded just fine the script looks like it was started (from
>the console) but the server is not working
>
>can anybody help?
>
>regards,
>
>hassan el forkani
>http://WarmAfrica.com EveryOne's Africa
>
>
>
>--
>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]
>
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
--- End Message ---
--- Begin Message ---
Hi Guys,
I have read messages posted to the php-win list about using
the imap extension and followed the advise to the bone but
still failing to use the extension.
I'm using php-win 4.0.5 and php-gtk on windows 95 ver B
with usb support and Xitami web server. The php-gtk is
working fine and the php and Xitami work are fine too
without the additional extensions (the ones not in-built in
php). I want to use php_imap but it has failed with error:
"unable to load library ..e.t.c..." -> i have edited my
php.ini (extension_dir=c:\php\extensions\ and commented out
extension=php_imap.dll) and these paths are ok because
php_gtk.dll extension(which i placed in c:\php\extensions\
like the other extensions) is working fine.
Any advice for me??
Thanx in advance.
denis....
=====
Denis Kakooza
http://switch.to/denis
http://denis.switch.to
mobile: +25677402555
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--- End Message ---
--- Begin Message ---
Hi Denis,
This sounds like you are using incompatible versions of php and extensions. The core
php and extensions should be compiled from the same sources (or at least from sources
with the same API's).
- Frank
> Hi Guys,
>
> I have read messages posted to the php-win list about using
> the imap extension and followed the advise to the bone but
> still failing to use the extension.
>
> I'm using php-win 4.0.5 and php-gtk on windows 95 ver B
> with usb support and Xitami web server. The php-gtk is
> working fine and the php and Xitami work are fine too
> without the additional extensions (the ones not in-built in
> php). I want to use php_imap but it has failed with error:
> "unable to load library ..e.t.c..." -> i have edited my
> php.ini (extension_dir=c:\php\extensions\ and commented out
> extension=php_imap.dll) and these paths are ok because
> php_gtk.dll extension(which i placed in c:\php\extensionslike the other extensions)
>is working fine.
>
> Any advice for me??
>
> Thanx in advance.
> denis....
>
>
> =====
> Denis Kakooza
> http://switch.to/denis
> http://denis.switch.to
> mobile: +25677402555
>
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
>
> --
> 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 need to access data files residing on a different computer in
the same network as the computer running the php scripts. Is this possible?
I can't find any documentation on this and I need to figure this out ASAP,
as in today.
Once I access the files, I need to be able to read from them Is this
possible, and how??
Please help. Thank you!! ;)
--
Nicole Amashta
Web Developer
ABOL Software, Inc.
[EMAIL PROTECTED]
www.aeontrek.com
--- End Message ---
--- Begin Message ---
> I need to access data files residing on a different
> computer in
> the same network as the computer running the php scripts. Is this
> possible?
> I can't find any documentation on this and I need to figure this out ASAP,
> as in today.
Data files...as in Database files, flat text CSV files or normal, good 'ol
fashioned files you want to copy, delete and move around?
- Erik
--- End Message ---
--- Begin Message ---
> I need to access data files residing on a different computer
in
>the same network as the computer running the php scripts. Is this possible?
>I can't find any documentation on this and I need to figure this out ASAP,
>as in today.
>
>Once I access the files, I need to be able to read from them Is this
>possible, and how??
>
>Please help. Thank you!! ;)
And the type of files you want to share is? And these files recedes on what?
File system, DB, or? And the platform you working on is? Anyhow:
If assume we are talking about regular flat files and you are using NT. Then
why not try to make a share? Then you can access the files just as any
normal file receding in the file system.
Syntax for net share:
[d:\vc98\include]net help share
The syntax of this command is:
NET SHARE sharename
sharename=drive:path [/USERS:number | /UNLIMITED]
[/REMARK:"text"]
sharename [/USERS:number | /UNLIMITED]
[/REMARK:"text"]
{sharename | devicename | drive:path} /DELETE
NET SHARE makes a server's resources available to network users. When
used without options, it lists information about all resources being
shared on the computer. For each resource, Windows NT reports the
devicename(s) or pathname(s) and a descriptive comment associated with it.
sharename Is the network name of the shared resource. Type
NET SHARE with a sharename only to display information
about that share.
drive:path Specifies the absolute path of the directory to
be shared.
/USERS:number Sets the maximum number of users who can
simultaneously access the shared resource.
/UNLIMITED Specifies an unlimited number of users can
simultaneously access the shared resource
/REMARK:"text" Adds a descriptive comment about the resource.
Enclose the text in quotation marks.
devicename Is one or more printers (LPT1: through LPT9:)
shared by sharename.
/DELETE Stops sharing the resource.
NET HELP command | MORE displays Help one screen at a time.
[d:\vc98\include]
--- End Message ---
--- Begin Message ---
The OS is Win2k. The files I want to access are flat text files (.txt,.csv).
This is NOT a DATABASE related question. This is strictly flat files.
I have the shared directories mapped to the computer with a drive letter of
R. So, in theory, according to what one said, I should be able to access and
list the directories and files on that shared directory. Well, I already
tried this yesterday and it's not working. I used as the path: R:\\data as
the path. I escaped the backslash appropriately. Still, no luck. However,
when I want to list the contents of the C drive, or any local partition,
this works. SO, why can't I access the mapped drive ( R: ) ?
* Originally I tried accessing the data by the network name, such as:
\\ftpserver\data as $path = "\\\\ftpserver\\data"; This did not work
either.
Here is code that I am using to test this:
<snip>
<?
include("../incs/FileSystem.inc"); // a wrapper class for the php
file and dir functions
$path = "R:\\Data\\JAU\\Sites"; // this is the mapped (shared) drive
that resides on another computer.
$fs = new FileSystem(); // this is an object I wrote that wraps all the file
and directory functions
if ( $list = $fs->getList($path) ) // getList() returns an array of the
files and dirs found in $path (uses opendir )
{
$size = count($list);
if ( $size > 0 )
{
for($i=0;$i<$size;$i++)
{
$fname = $list[$i];
echo "$fname <br>"; // just print out; this is just testing
}
}
else
{
echo "no files";
}
}
else
{
echo "error listing files in: $path";
}
?>
</snip>
Any ideas would be greatly appreciated!
Thanks!
Nicole Amashta
www.aeontrek.com
"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
27E647E5629ED211BF78009027289C6303C1B5E7@mail1">news:27E647E5629ED211BF78009027289C6303C1B5E7@mail1...
> > I need to access data files residing on a different computer
> in
> >the same network as the computer running the php scripts. Is this
possible?
> >I can't find any documentation on this and I need to figure this out
ASAP,
> >as in today.
> >
> >Once I access the files, I need to be able to read from them Is this
> >possible, and how??
> >
> >Please help. Thank you!! ;)
>
> And the type of files you want to share is? And these files recedes on
what?
> File system, DB, or? And the platform you working on is? Anyhow:
>
> If assume we are talking about regular flat files and you are using NT.
Then
> why not try to make a share? Then you can access the files just as any
> normal file receding in the file system.
>
> Syntax for net share:
>
> [d:\vc98\include]net help share
> The syntax of this command is:
>
>
> NET SHARE sharename
> sharename=drive:path [/USERS:number | /UNLIMITED]
> [/REMARK:"text"]
> sharename [/USERS:number | /UNLIMITED]
> [/REMARK:"text"]
> {sharename | devicename | drive:path} /DELETE
>
> NET SHARE makes a server's resources available to network users. When
> used without options, it lists information about all resources being
> shared on the computer. For each resource, Windows NT reports the
> devicename(s) or pathname(s) and a descriptive comment associated with it.
>
> sharename Is the network name of the shared resource. Type
> NET SHARE with a sharename only to display information
> about that share.
> drive:path Specifies the absolute path of the directory to
> be shared.
> /USERS:number Sets the maximum number of users who can
> simultaneously access the shared resource.
> /UNLIMITED Specifies an unlimited number of users can
> simultaneously access the shared resource
> /REMARK:"text" Adds a descriptive comment about the resource.
> Enclose the text in quotation marks.
> devicename Is one or more printers (LPT1: through LPT9:)
> shared by sharename.
> /DELETE Stops sharing the resource.
>
> NET HELP command | MORE displays Help one screen at a time.
>
> [d:\vc98\include]
--- End Message ---
--- Begin Message ---
In theory, yes. ;) But we all know to well that they really doesn't match
with each other. :(
By the way: did you get any error messages?
>-----Original Message-----
>From: Nicole Amashta [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, January 08, 2002 8:21 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [PHP-WIN] Can I access files from a mapped drive or over
>the network?
>
>
>The OS is Win2k. The files I want to access are flat text files
(.txt,.csv).
>This is NOT a DATABASE related question. This is strictly flat files.
>
>I have the shared directories mapped to the computer with a drive letter of
>R. So, in theory, according to what one said, I should be able to access
and
>list the directories and files on that shared directory. Well, I already
>tried this yesterday and it's not working. I used as the path:
>R:\\data as the path. I escaped the backslash appropriately. Still, no
>luck. However, when I want to list the contents of the C drive, or any
local
>partition, this works. SO, why can't I access the mapped drive ( R: ) ?
>
>* Originally I tried accessing the data by the network name, such as:
>\\ftpserver\data as $path = "\\\\ftpserver\\data"; This did not work
>either.
>
>Here is code that I am using to test this:
><snip>
><?
>include("../incs/FileSystem.inc"); // a wrapper class
>for the php
>file and dir functions
>
>$path = "R:\\Data\\JAU\\Sites"; // this is the mapped
>(shared) drive
>that resides on another computer.
>
>$fs = new FileSystem(); // this is an object I wrote that
>wraps all the file
>and directory functions
>
>if ( $list = $fs->getList($path) ) // getList() returns an
>array of the
>files and dirs found in $path (uses opendir )
>{
> $size = count($list);
> if ( $size > 0 )
> {
> for($i=0;$i<$size;$i++)
> {
> $fname = $list[$i];
> echo "$fname <br>"; // just print out; this is just testing
> }
> }
> else
> {
> echo "no files";
> }
>}
>else
>{
> echo "error listing files in: $path";
>}
>?>
></snip>
>
>Any ideas would be greatly appreciated!
>
>Thanks!
>Nicole Amashta
>www.aeontrek.com
>
>"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
>27E647E5629ED211BF78009027289C6303C1B5E7@mail1">news:27E647E5629ED211BF78009027289C6303C1B5E7@mail1...
>> > I need to access data files residing on a
>different computer
>> in
>> >the same network as the computer running the php scripts. Is this
>possible?
>> >I can't find any documentation on this and I need to figure this out
>ASAP,
>> >as in today.
>> >
>> >Once I access the files, I need to be able to read from them Is this
>> >possible, and how??
>> >
>> >Please help. Thank you!! ;)
>>
>> And the type of files you want to share is? And these files
>recedes on
>what?
>> File system, DB, or? And the platform you working on is? Anyhow:
>>
>> If assume we are talking about regular flat files and you
>are using NT.
>Then
>> why not try to make a share? Then you can access the files
>just as any
>> normal file receding in the file system.
>>
>> Syntax for net share:
>>
>> [d:\vc98\include]net help share
>> The syntax of this command is:
>>
>>
>> NET SHARE sharename
>> sharename=drive:path [/USERS:number | /UNLIMITED]
>> [/REMARK:"text"]
>> sharename [/USERS:number | /UNLIMITED]
>> [/REMARK:"text"]
>> {sharename | devicename | drive:path} /DELETE
>>
>> NET SHARE makes a server's resources available to network users. When
>> used without options, it lists information about all resources being
>> shared on the computer. For each resource, Windows NT reports the
>> devicename(s) or pathname(s) and a descriptive comment
>associated with it.
>>
>> sharename Is the network name of the shared resource. Type
>> NET SHARE with a sharename only to
>display information
>> about that share.
>> drive:path Specifies the absolute path of the directory to
>> be shared.
>> /USERS:number Sets the maximum number of users who can
>> simultaneously access the shared resource.
>> /UNLIMITED Specifies an unlimited number of users can
>> simultaneously access the shared resource
>> /REMARK:"text" Adds a descriptive comment about the resource.
>> Enclose the text in quotation marks.
>> devicename Is one or more printers (LPT1: through LPT9:)
>> shared by sharename.
>> /DELETE Stops sharing the resource.
>>
>> NET HELP command | MORE displays Help one screen at a time.
>>
>> [d:\vc98\include]
>
>
>
>--
>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 ---
Under what account does your webserver run? Does this account have
appropriate permissions on the share?
It only makes sense to use drive letter mappings for remote shares if your
server runs on a worktation. On a production server you don't usually have
access to mapped drives because no user is logged on.
PHP4 can only access network shares since 4.10, before UNC-Style paths did
not work. However, something with the treatment of backslashes still doesn't
seem to work under certain circumstances. We've made better experiences
using forward slashes like on unix. You can do that in the scripts but also
in php.ini.
If you're running IIS you should check 'check that file exists' in the
administration panel where you enter the mapping from .php to php.exe. Then
IIS will check the permissions for PHP. Sometimes this can help. Make shure
the IUSER_YOURMACHINE account has the appropriate permissions or change it
to a network account.
If you're running Apache, check in Control Panel -> Services under what
account it runs. Usually its local\system. You should change that to a
network account.
Christoph
"Nicole Amashta" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
| The OS is Win2k. The files I want to access are flat text files
(.txt,.csv).
| This is NOT a DATABASE related question. This is strictly flat files.
|
| I have the shared directories mapped to the computer with a drive letter
of
| R. So, in theory, according to what one said, I should be able to access
and
| list the directories and files on that shared directory. Well, I already
| tried this yesterday and it's not working. I used as the path: R:\\data as
| the path. I escaped the backslash appropriately. Still, no luck. However,
| when I want to list the contents of the C drive, or any local partition,
| this works. SO, why can't I access the mapped drive ( R: ) ?
|
| * Originally I tried accessing the data by the network name, such as:
| \\ftpserver\data as $path = "\\\\ftpserver\\data"; This did not work
| either.
|
| Here is code that I am using to test this:
| <snip>
| <?
| include("../incs/FileSystem.inc"); // a wrapper class for the php
| file and dir functions
|
| $path = "R:\\Data\\JAU\\Sites"; // this is the mapped (shared) drive
| that resides on another computer.
|
| $fs = new FileSystem(); // this is an object I wrote that wraps all the
file
| and directory functions
|
| if ( $list = $fs->getList($path) ) // getList() returns an array of the
| files and dirs found in $path (uses opendir )
| {
| $size = count($list);
| if ( $size > 0 )
| {
| for($i=0;$i<$size;$i++)
| {
| $fname = $list[$i];
| echo "$fname <br>"; // just print out; this is just testing
| }
| }
| else
| {
| echo "no files";
| }
| }
| else
| {
| echo "error listing files in: $path";
| }
| ?>
| </snip>
|
| Any ideas would be greatly appreciated!
|
| Thanks!
| Nicole Amashta
| www.aeontrek.com
|
| "B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
| 27E647E5629ED211BF78009027289C6303C1B5E7@mail1">news:27E647E5629ED211BF78009027289C6303C1B5E7@mail1...
| > > I need to access data files residing on a different
computer
| > in
| > >the same network as the computer running the php scripts. Is this
| possible?
| > >I can't find any documentation on this and I need to figure this out
| ASAP,
| > >as in today.
| > >
| > >Once I access the files, I need to be able to read from them Is this
| > >possible, and how??
| > >
| > >Please help. Thank you!! ;)
| >
| > And the type of files you want to share is? And these files recedes on
| what?
| > File system, DB, or? And the platform you working on is? Anyhow:
| >
| > If assume we are talking about regular flat files and you are using NT.
| Then
| > why not try to make a share? Then you can access the files just as any
| > normal file receding in the file system.
| >
| > Syntax for net share:
| >
| > [d:\vc98\include]net help share
| > The syntax of this command is:
| >
| >
| > NET SHARE sharename
| > sharename=drive:path [/USERS:number | /UNLIMITED]
| > [/REMARK:"text"]
| > sharename [/USERS:number | /UNLIMITED]
| > [/REMARK:"text"]
| > {sharename | devicename | drive:path} /DELETE
| >
| > NET SHARE makes a server's resources available to network users. When
| > used without options, it lists information about all resources being
| > shared on the computer. For each resource, Windows NT reports the
| > devicename(s) or pathname(s) and a descriptive comment associated with
it.
| >
| > sharename Is the network name of the shared resource. Type
| > NET SHARE with a sharename only to display
information
| > about that share.
| > drive:path Specifies the absolute path of the directory to
| > be shared.
| > /USERS:number Sets the maximum number of users who can
| > simultaneously access the shared resource.
| > /UNLIMITED Specifies an unlimited number of users can
| > simultaneously access the shared resource
| > /REMARK:"text" Adds a descriptive comment about the resource.
| > Enclose the text in quotation marks.
| > devicename Is one or more printers (LPT1: through LPT9:)
| > shared by sharename.
| > /DELETE Stops sharing the resource.
| >
| > NET HELP command | MORE displays Help one screen at a time.
| >
| > [d:\vc98\include]
|
|
--- End Message ---
--- Begin Message ---
>Under what account does your webserver run? Does this account have
>appropriate permissions on the share?
>It only makes sense to use drive letter mappings for remote shares if your
>server runs on a worktation. On a production server you don't usually have
>access to mapped drives because no user is logged on.
I haven't tried it my self, but wouldn't it be possible to do the mapping in
the registry at startup/boot time?
--- End Message ---
--- Begin Message ---
I am running Apache (as a service) on Win2k. LocalSystem is the logon for that. I
experimented and changed it. Stopped the apache service, then couldn't start it back
again. SO i put it back to the LocalSystem and it started back again.
On the computer with the files I am trying to access, I added a NETWORK user with full
access (there is already an EVERYBODY with full access). So I dont see how the NETWORK
would make anymore or less difference - I don't know.
Other than that, I am clueless and nothing seems to work. I know my code works,
because it works when testing on a local drive (eg. C:). So, something with the
permissions, perhaps, I am not doing correctly.
Someone suggested I needed to give access to the script and httpd trying to access
the share.
Help. ;)
anyone actually have any luck getting this scenario to work? (accessing files over a
network - not internet).
Thanks again!
NIcole Amashta
www.aeontrek.com
----- Original Message -----
From: Christoph Grottolo
Newsgroups: php.windows
To: [EMAIL PROTECTED]
Sent: Tuesday, January 08, 2002 2:53 PM
Subject: Re: [PHP-WIN] Can I access files from a mapped drive or over the network?
Under what account does your webserver run? Does this account have
appropriate permissions on the share?
It only makes sense to use drive letter mappings for remote shares if your
server runs on a worktation. On a production server you don't usually have
access to mapped drives because no user is logged on.
PHP4 can only access network shares since 4.10, before UNC-Style paths did
not work. However, something with the treatment of backslashes still doesn't
seem to work under certain circumstances. We've made better experiences
using forward slashes like on unix. You can do that in the scripts but also
in php.ini.
If you're running IIS you should check 'check that file exists' in the
administration panel where you enter the mapping from .php to php.exe. Then
IIS will check the permissions for PHP. Sometimes this can help. Make shure
the IUSER_YOURMACHINE account has the appropriate permissions or change it
to a network account.
If you're running Apache, check in Control Panel -> Services under what
account it runs. Usually its local\system. You should change that to a
network account.
Christoph
"Nicole Amashta" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
| The OS is Win2k. The files I want to access are flat text files
(.txt,.csv).
| This is NOT a DATABASE related question. This is strictly flat files.
|
| I have the shared directories mapped to the computer with a drive letter
of
| R. So, in theory, according to what one said, I should be able to access
and
| list the directories and files on that shared directory. Well, I already
| tried this yesterday and it's not working. I used as the path: R:\\data as
| the path. I escaped the backslash appropriately. Still, no luck. However,
| when I want to list the contents of the C drive, or any local partition,
| this works. SO, why can't I access the mapped drive ( R: ) ?
|
| * Originally I tried accessing the data by the network name, such as:
| \\ftpserver\data as $path = "\\\\ftpserver\\data"; This did not work
| either.
|
| Here is code that I am using to test this:
| <snip>
| <?
| include("../incs/FileSystem.inc"); // a wrapper class for the php
| file and dir functions
|
| $path = "R:\\Data\\JAU\\Sites"; // this is the mapped (shared) drive
| that resides on another computer.
|
| $fs = new FileSystem(); // this is an object I wrote that wraps all the
file
| and directory functions
|
| if ( $list = $fs->getList($path) ) // getList() returns an array of the
| files and dirs found in $path (uses opendir )
| {
| $size = count($list);
| if ( $size > 0 )
| {
| for($i=0;$i<$size;$i++)
| {
| $fname = $list[$i];
| echo "$fname <br>"; // just print out; this is just testing
| }
| }
| else
| {
| echo "no files";
| }
| }
| else
| {
| echo "error listing files in: $path";
| }
| ?>
| </snip>
|
| Any ideas would be greatly appreciated!
|
| Thanks!
| Nicole Amashta
| www.aeontrek.com
|
| "B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
| 27E647E5629ED211BF78009027289C6303C1B5E7@mail1">news:27E647E5629ED211BF78009027289C6303C1B5E7@mail1...
| > > I need to access data files residing on a different
computer
| > in
| > >the same network as the computer running the php scripts. Is this
| possible?
| > >I can't find any documentation on this and I need to figure this out
| ASAP,
| > >as in today.
| > >
| > >Once I access the files, I need to be able to read from them Is this
| > >possible, and how??
| > >
| > >Please help. Thank you!! ;)
| >
| > And the type of files you want to share is? And these files recedes on
| what?
| > File system, DB, or? And the platform you working on is? Anyhow:
| >
| > If assume we are talking about regular flat files and you are using NT.
| Then
| > why not try to make a share? Then you can access the files just as any
| > normal file receding in the file system.
| >
| > Syntax for net share:
| >
| > [d:\vc98\include]net help share
| > The syntax of this command is:
| >
| >
| > NET SHARE sharename
| > sharename=drive:path [/USERS:number | /UNLIMITED]
| > [/REMARK:"text"]
| > sharename [/USERS:number | /UNLIMITED]
| > [/REMARK:"text"]
| > {sharename | devicename | drive:path} /DELETE
| >
| > NET SHARE makes a server's resources available to network users. When
| > used without options, it lists information about all resources being
| > shared on the computer. For each resource, Windows NT reports the
| > devicename(s) or pathname(s) and a descriptive comment associated with
it.
| >
| > sharename Is the network name of the shared resource. Type
| > NET SHARE with a sharename only to display
information
| > about that share.
| > drive:path Specifies the absolute path of the directory to
| > be shared.
| > /USERS:number Sets the maximum number of users who can
| > simultaneously access the shared resource.
| > /UNLIMITED Specifies an unlimited number of users can
| > simultaneously access the shared resource
| > /REMARK:"text" Adds a descriptive comment about the resource.
| > Enclose the text in quotation marks.
| > devicename Is one or more printers (LPT1: through LPT9:)
| > shared by sharename.
| > /DELETE Stops sharing the resource.
| >
| > NET HELP command | MORE displays Help one screen at a time.
| >
| > [d:\vc98\include]
|
|
--- End Message ---
--- Begin Message ---
I'm receiving the following error:
Fatal error: Maximum execution time of 30 seconds exceeded in c:\program
files\nusphere\apache\nsdocs\test1.php on line 53
I'm running PHP 4.0.6 with Apache 1.3.7 on Win 2000 Professional. I've
tried many different URLs. The socket opens correctly. $outputFile
was created correctly.
Can someone please let me know why I might be getting this error?
Here's the code. Line 53 is commented.
$fp = fsockopen($url, 80,$errno, $errstr, 45);
.
// Tests to see if socket was opened successfully go here.
.
$fp1 = fopen($outputFile,"w");
.
.
.
while(!feof($fp))
{
$linein = fgets($fp,4); /* **********THIS IS LINE 53********** */
if (!$linein)
{
echo "Reading a line";
}
fwrite($fp1, $linein);
}
.
.
.
fclose($fp1);
fclose($fp);
Thanks in advance,
Brad
--- End Message ---
--- Begin Message ---
I have put together a informationpage, the same page for two different
machines. They both run win2k server SP2, PHP 4.1.1 and MySQL 3.23.47-max.
On the first machine it still works after the installation of the new MySQL
software but the other box just ends up with complaints on odbc user and
stuff. The problems is that the mysql configs are the same and none of them
has a odbc user and never had.
<?
$host = "schattiga.st";
$ip=gethostbyname($host);
$diskfree = diskfreespace("/");
$change = date ("Y-m-d @ B (H:i:s)", getlastmod());
$version = phpversion();
$allt = 20597174272;
$procent1 = $diskfree / $allt;
$procent = $procent1 * "100";
//$mysql = mysql_get_server_info();
?>
<head>
<title><?echo $ip ?> - motd.st | persilja.net | schattiga.st</title>
</head>
<body>
<b>Serverinfo</b>: <? print ("$ip is a PIII 650 with 384 mb RAM running
Windows 2000 Server Family Service Pack 2.") ?><br>
<? echo "<b>Diskspace issues</b>: $diskfree bytes of $allt bytes free,
$procent % free."; ?><br>
<b>PHP version</b>: <? echo $version ?><br>
<b>MySQL verison</b>: <? echo mysql_get_server_info(); ?><br>
<b>Last update</b>: <? echo $change ?><br>
<br><br><br><br>
This code works on one server but not the other one...VERY strange indeed.
/bro.
--- End Message ---