[PHP] COM works on NT but fails on 2003?

2005-04-10 Thread Theisen, Gary
Hi all,

I currently have php 4.3.10 loaded on a windows 2003 server running
apache 2.0.52.  PHP and the web server work fine.  I've got the code
(that used to work on an old NT box running IIS and an earlier version
of PHP...I think 4.1 or 4.2??) 

//.code

$excel = new COM(Excel.Application) or Die (Did not connect);

//Open the workbook that we want to use.
$book = $excel-Application-Workbooks-Open($reportPath.$rptName);

//more code 

Again...that used to work on NT, but now I can't get it to work on 2003.
I believe the issue lies with the new COM() line, but it doesn't print
out the or die statement.

I've followed the article on this site (which is how I got this Excel
COM function to work with NT in the first place:
http://www.phpbuilder.net/columns/venkatesan20030501.php3]http://www.php
builder.net/columns/venkatesan20030501.php3
but perhaps this doesn't apply to the new win 2003 server?
I have the appropriate IUSR_MACHINE_Name user with Excel COM launch,
etc. permissions.

Any ideas? :idea: 
Thanks.

EDIT:
some more info...

when i run this script...nothing happens. at least that i can see. I
look in the O/S event logs, nothing shows up there related to this. I
look in the apache logs...nothing on this.

This script was run via the cmd line on the NT box ( should be run by
cmd line on the 2003 box as well).

When I run the script (F:\somedirtheScript.php)...it pauses for about 2
seconds then just returns to the command line. I've got the php.ini file
set to display all errors turned on. still, nothing is displayed in the
cmd window.

So I run a basic test:
parse errror:

the code:
?
//**
//Create the spreadsheet object.
//**

$basePath = F:\\_jobs\\reports\\adhoc\\SomeReportDir\\;
$reportPath = $basePath.report\\SomeReport.xls;

$excel = new COM(Excel.Application) or Die (Did not connect);
if ($excel !=== FALSE) {  //This is the error line?!?!  I even tried
FALSE.
  print Testing output.\n;
  print $excel;
} else {
  print Error;
  die();
}

$book = $excel-Application-Workbooks-Open($reportPath.$rptName);

?

F:\_jobs\reports\scriptsexcel.php
PHP Parse error:  parse error in F:\_jobs\reports\scripts\excel.php on
line 10
Content-type: text/html

br /
bParse error/b:  parse error in
bF:\_jobs\reports\scripts\excel.php/b on
 line b10/bbr /

F:\_jobs\reports\scripts

Why won't this work on windows 2003 server...or at least give me an
error that I can work with?

Thanks.



[PHP] Companies using PHP

2004-07-14 Thread Theisen, Gary
Hi all,

I'm trying to locate an up to date list (at least sometime in 2004), that
lists major companies (i.e. like Yahoo) that utilize PHP for their website
(or at least part of their website). I've google'd and searched php.net to
no success.

Thanks,

Gary



RE: [PHP] Companies using PHP

2004-07-14 Thread Theisen, Gary
Just what I was looking for...thanks Chris!

-Original Message-
From: Chris Shiflett [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 14, 2004 5:28 PM
To: Theisen, Gary; '[EMAIL PROTECTED]'
Subject: Re: [PHP] Companies using PHP


--- Theisen, Gary [EMAIL PROTECTED] wrote:
 I'm trying to locate an up to date list (at least sometime in 2004), 
 that lists major companies (i.e. like Yahoo) that utilize PHP for 
 their website (or at least part of their website). I've google'd and 
 searched php.net to no success.

I'm not entirely sure how up to date this list is, but it seems more
thorough than most:

http://www.dreamlab.ca/technology/phpsites/

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming Fall 2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

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



[PHP] getimagesize() not working between Dirs?

2004-06-18 Thread Theisen, Gary
Hi all,
 
I've got two web forms that handle photo uploads.  In one directory ...
getimagesize() works fine, in the other... it doesn't:
 
Directory that it works.

/php/webForm1.html  (has action to /php/submitForm.php)
/php/submitForm.php 

Directory that doesn't work.
/otherDir/webForm2.html (has action to /php/submitForm.php) //same as above.

 
the submitForm.php is the script that processes both webForms found in
different directory's.  Everything else on the form from
/otherDir/webForm2.html can be echo'd out fine.
excerpt from submitForm.php script:

if ($Photo) {
$photoSize=GetImageSize($Photo);
if ($photoSize[2]==1) {
   $photofinal=$uniqueID._1..gif;
   rename (lPhoto,$photofinal);
} elseif ($photoSize[2]==2) {
   $photofinal=$uniqueID._1..jpg;
   rename ($Photo,$photofinal); //WORKS HERE WITH 1ST EX.
} elseif ($photoSize[2]==3) {
   $photofinal=$uniqueID._1..png;
   rename (lPhoto,$photofinal);
} else {
   echo p p;
   echo strongYour photo must be in .gif, .jpg or .png format
only./strongp;
   echo a href=\javascript:history.back()\Back/a;
   exit;  //THIS IS WHERE IT'S EXITING EVEN THOUGH THE PHOTO IS TYPE
.jpg IN BOTH TEST CASES.
}
} //End if Photo.

submitForm.php has 775 permissions.
 
I think it has to do with the fact that the file is uploaded to forms in the
two different dir's.
But why would one work and the other not?
Any ideas??
 
Thanks in advance.