php-windows Digest 7 Feb 2002 12:16:07 -0000 Issue 990

Topics (messages 11882 through 11890):

Re: Access to network shares
        11882 by: Nicole Amashta
        11883 by: Nicole Amashta

Re: .bat files for PHP
        11884 by: Ziggi

Re: DOS box, scheduled tasks, PHP script
        11885 by: Ziggi

Headers
        11886 by: Christian Calloway
        11887 by: Ross Fleming

Re: undefined variable
        11888 by: bz

Re: Crystal Reports and COM
        11889 by: Robin Bolton

Re: Trouble with GD - any suggestions? - SOLVED
        11890 by: Michel Laine

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 first posted to this newgroup with this very problem.

To fix, assuming you are on NT or Win2k and running apache as a service, you
would change the service from localhost to a specific
user with that user given the proper permissions. The user would be setup on
the machine you are trying to access over the network.

start > programs > administrative tools > services

change the apache service "log on as" to an existing user with the login and
password assigned to it.

need further help? let me know.

good luck!
nicole amashta
www.aeontrek.com

==========================

"Michael A. Fallavollita" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> It seems impossible for me to use file system and directory functions that
> attempt to access network drives on another server.
>
> For example, take the dir() example from the manual:
>
> <?php
> function getDirList($dirName)
> {
>     $d = dir($dirName);
>     while($entry = $d->read())
>     {
>         if ($entry != "." && $entry != "..")
>         {
>             if (is_dir($dirName."/".$entry))
>             {
>                 getDirList($dirName."/".$entry);
>             }
>             else
>                 print("$entry<br>\n");
>         }
>     }
> }
>
> getDirList("//server/share/dir");
> getDirList("S:\\dir");
> ?>
>
> If S: is mapped to \\server\share then the above will fail with:
>     Warning OpenDir: Invalid argument (errno 22) in ....
>
> I've tried using '/', '\' (properly escaped) and UNC names.
> I've given full control permissions both via the filesystem and the share
to
> the user.
>
> I'm sure I'm missing something.
>
>     -- Mike Fallavollita
>        [EMAIL PROTECTED]
>
>
>


--- End Message ---
--- Begin Message ---
>>change the service from localhost to a specific user

localhost = LocalService

sorry, had to correct myself.

~nicole
www.aeontrek.com


"Nicole Amashta" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I first posted to this newgroup with this very problem.
>
> To fix, assuming you are on NT or Win2k and running apache as a service,
you
> would change the service from localhost to a specific
> user with that user given the proper permissions. The user would be setup
on
> the machine you are trying to access over the network.
>
> start > programs > administrative tools > services
>
> change the apache service "log on as" to an existing user with the login
and
> password assigned to it.
>
> need further help? let me know.
>
> good luck!
> nicole amashta
> www.aeontrek.com
>
> ==========================
>
> "Michael A. Fallavollita" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > It seems impossible for me to use file system and directory functions
that
> > attempt to access network drives on another server.
> >
> > For example, take the dir() example from the manual:
> >
> > <?php
> > function getDirList($dirName)
> > {
> >     $d = dir($dirName);
> >     while($entry = $d->read())
> >     {
> >         if ($entry != "." && $entry != "..")
> >         {
> >             if (is_dir($dirName."/".$entry))
> >             {
> >                 getDirList($dirName."/".$entry);
> >             }
> >             else
> >                 print("$entry<br>\n");
> >         }
> >     }
> > }
> >
> > getDirList("//server/share/dir");
> > getDirList("S:\\dir");
> > ?>
> >
> > If S: is mapped to \\server\share then the above will fail with:
> >     Warning OpenDir: Invalid argument (errno 22) in ....
> >
> > I've tried using '/', '\' (properly escaped) and UNC names.
> > I've given full control permissions both via the filesystem and the
share
> to
> > the user.
> >
> > I'm sure I'm missing something.
> >
> >     -- Mike Fallavollita
> >        [EMAIL PROTECTED]
> >
> >
> >
>
>


--- End Message ---
--- Begin Message ---
Wow !

I registered a new file type (.phs, like PHP Script) as described in an
article on PHPBuilder and it works great !!!

Ziggi
>


--- End Message ---
--- Begin Message ---
:-)))

Thanks !
Ziggi


--- End Message ---
--- Begin Message ---
Hey everyone,

I need to turn off browser caching, and Im assuming I need to send a couple
headers to do so. Can anyone help? Thanks


--- End Message ---
--- Begin Message ---
>From php.net -> headers manual;

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");              // Date in
the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always
modified
header("Cache-Control: no-store, no-cache, must-revalidate");  // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");                                    // HTTP/1.0

Not always guaranteed to work.  There are also HTML <META> tags that u can
use as well.  Off the top of my head I can't remember them but any good HTML
site should tell.

Unless anyone that knows them offhand and wants to share?

Cheers

Ross

-----Original Message-----
From: Christian Calloway [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 06, 2002 11:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Headers


Hey everyone,

I need to turn off browser caching, and Im assuming I need to send a couple
headers to do so. Can anyone help? Thanks



--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
does it?

but i got a parse error message in example1 , while example2 works well.

>or simply declare your variables:
> var $user1,$password1;


example1:

<html>
<? for ($x=0;$x<5;$x++) { echo $x; } ?>
<br><? 
var $testvar;
print "testvar=\"".$testvar."\""; 
?>
<br><br><br><? phpinfo(); ?>
</html>


example2:

<html>
<? for ($x=0;$x<5;$x++) { echo $x; } ?>
<br><? 
if(isset($testvar)){
print "testvar=\"".$testvar."\""; 
}
else{
print "testvar=\""."\""; 
}
?>
<br><br><br><? phpinfo(); ?>
</html>


--- End Message ---
--- Begin Message ---
One possibility is if he purchases Adobe Acrobat, it has a printer driver
that will print to a pdf file. If you can control printing in crystal,
you're set.

BTW, I'm curious about what you have PHP doing to crystal (are you passing
data to it?), We've got Accpac and Crystal, and are looking for ways to
interface multiple sytems.


----- Original Message -----
From: "Nicole Amashta" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 05, 2002 12:20 PM
Subject: [PHP-WIN] Re: Crystal Reports and COM


> OK, so far I have narrowed it down to the fact that Crystal Reports 8.0
does
> not support export of PDF format. SO, does anyone know if there is a fix
for
> this? In other words, is there a way to keep CR8.0 and use something with
> it, say, a dll, to support this PDF format ???
>
> Help ?
>
> Thanks!
> Nicole Amashta
> www.aeontrek.com
>
>
> "Nicole Amashta" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hello. This is slightly off topic, but I am doing this through PHP, so
> it's
> > somewhat relevant to this list.
> >
> > I am running crystal reports through PHP with a COM object. Now, I have
> this
> > working just fine on several computers and has been fine for months now.
> The
> > PHP calls the com object and that talks to Crystal Reports. A report is
> > returned in the PDF format and displayed in the web page. This is all
> > working fine.
> >
> > Now, I am setting this up again; however, I am doing it over the phone.
> So,
> > I am directing someone else set this all up.
> >
> > Here are *my* current specs:
> >
> > Win2k
> > PHP 4.0.6
> > Apache 1.3
> > Crystal Reports version 8.5
> > Adobe Acrobat full (reader and distiller)
> >
> > Here are *his* current spects:
> >
> > Win2k
> > PHP 4.0.6
> > Apache 1.3
> > Crystal Reports version 8.0   <-- he has an older version.
> > Adobe Acrobat full (reader and distiller)
> >
> > Question to anyone who knows: Does Crystal Reports 8.0 support the
export
> of
> > PDF? He does not see the option through Crystal in the export feature.
> >
> > Anyhow, we've attempted to test the reports through the web page and get
> the
> > NULL pointer error. We are sure that the permissions and all is set up -
> > matching mostly what I have on my machine, which works - through
DCOMCNFG.
> >
> > So, I do not believe, anymore, that the error is because of this. I
> believe
> > it could be his version of crystal simply does not support the PDF
export
> > feature.
> >
> > One error he gets when using a COM test exe is this:
> >
> > Error: 692 Error in file E:\Apps\Apache\htdocs\....\thereport.rpt:
> > Invalid export DLL or export format
> > Export.Send <PEExportTo>.
> >
> > Anyone have any ideas or suggestions?
> >
> > TIA
> > nicole,
> > www.aeontrek.com
> >
> > --
> > Nicole Amashta
> > Web Applications Developer
> > ABOL Software, Inc.
> > ( 678 ) 494 - 3172
> > [EMAIL PROTECTED]
> >
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Yep i solved it.

As two nice people suggested - i upgraded php from 4.06 to 4.11 and then it
just works.

One might think that this should be documented somewhere - it would have
saved me some couple of hours.

A big thanX to all involved.
--

Michel Laine




Michel Laine wrote:

> ok
> Now i (obviously) are in unknown territoies...
>
> ***
>
> Using PHPDEV4 from http://www.firepages.com.au/dev4.htm on a NT4.0 SP4.
> The package contains PHP4.06 / Apache1.3.20 / ActivePerl5.6 / MySQL3.23
> Apache, php, mysql and perl works.
>
> phpinfo(INFO_MODULES); reports:
> GD Support enabled
> GD Version 2.0 or higher
> FreeType Support enabled
> FreeType Linkage with freetype
> JPG Support enabled
> PNG Support enabled
> WBMP Support enabled
>
> I have even double checked php.ini
>
> ***
>
> GD works as i can drav stuff (rectangles, imagetext and so on) but *how*
> or *why* can't i get GD to load .ttf files with imagettftext?
> I get 'Could not find/open font in c:\phpdev\www\graph.htm' no matter
> how i construct the path to my fontfile.
> Tried different fontfiles and even downloaded some that comes with tut's
> - with the same result.
> My fontfile is currently in the same dir as the script itself - not even
> that will work.
>
> Is there any known bug in GD 2.x related to the support of TTF files?
> or is it just me that have tested 99 combinations on the
> path-to-fontfile parameter, but forgotten about the 100'th?
> --
>
> Michel Laine

--- End Message ---

Reply via email to