Re: Re[3]: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c

2001-04-24 Thread Joe Brown

What is the software default path registry key???
I found it once before, when I wasn't looking.  Now I'm looking I can't find
it.


Marc Boeren [EMAIL PROTECTED] wrote in message
7BE0F4A5D7AED2119B7500A0C94C58AC17A73B@DELLSERVER">news:7BE0F4A5D7AED2119B7500A0C94C58AC17A73B@DELLSERVER...

 If there are we are better off finding them and fixing them instead of
 defaulting to c:\php4. I think we should follow the Windows standard on
 Windows. I know that I hate when programs want to install themselves in
c:\

 on Windows.

 Just stating the obvious here, but c:\program files is a setting in the
 registry that can be overridden (on my machine, it's d:\app), so if it is
 decided to use this dir then please read the location from the registry (I
 hate programs that install themselves in c:\program files after I have
gone
 through all the trouble of renaming it to d:\app)

 if we want to make things easier for users, we should bear in mind that
all
 the
 IIS/PWS management tools default to looking in
SYSTEMROOT\system32\inetsrv

 And since I'm using Apache under Windows (just for testing and developing,
 but I've never had any trouble), this is probably not the place to default
 to...

 Cheerio, Marc.

 --
 PHP CVS 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]




-- 
PHP CVS 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]




Re: Re[3]: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c

2001-04-23 Thread Joe Brown

IMHO, an ideal default is the path up to php.exe with a conf/php.ini

This would be a good default for unix/windows both, and maintain some
resembelence consistency with Apache if not anything else.

Then I could throw php.ini in the apache conf dir and php.exe would find it
there, w/o me having to tell it where.

If instead I have a c:\php or a c:\php4 I know a directory conf beneath
should contain the appropriate php.ini.

Also works well for /usr/local/php/conf/php.ini
or where ever php ends up.

Global .ini files can be difficult to manage if you've got mutiple versions
with different setting requirements.  Or just knowing where to find the
damn thing.

-Joe

Daniel Beulshausen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Monday, April 23, 2001, 10:19:36 PM, you wrote:
  It should be the Program Files directory, concatenated with 'PHP';
Under
  Windows, we should behave like Windows apps...

 we should use registry entries to determine/set the path(s), if those
 entries aren't present it could default to some hardcoded values...

 daniel

  Zeev
 
  At 21:50 23/4/2001, James Moore wrote:
 how about defaulting to SystemDrive\\php4 but also allowing a
envromental
 variable to be set so
 
 #define PHP_BINDIR (getenv(PHP_BinDir))?getenv(PHP_BinDir):c:\\php4
 
 or somthing like that which works in C
 
 - James
 
   -Original Message-
   From: Frank M. Kromann [mailto:[EMAIL PROTECTED]]
   Sent: 23 April 2001 19:24
   To: James Moore
   Cc: [EMAIL PROTECTED]
   Subject: Re: RE: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c
  
  
   Hi James,
  
   No problem. I change it to
  
   #define PHP_CONFIG_FILE_PATH getenv(SystemRoot)
  
   What about all the other directories ? These should be configureable
too.
  
   - Frank
  
 fmk   Mon Apr 23 10:33:22 2001 EDT

   Modified files:
 /php4/mainconfig.w32.h php_ini.c
 +
 +/* Define directory constants for php and pear */
 +#define PHP_BINDIR c:\\php4
 +#define PHP_LIBDIR c:\\php4
 +#define PHP_DATADIR c:\\php4
 +#define PHP_SYSCONFDIR c:\\php4
 +#define PHP_LOCALSTATEDIR c:\\php4
 +#define PHP_CONFIG_FILE_PATH c:\\winnt
 +#define PEAR_INSTALLDIR c:\\php4\\pear
   
Ugh thats very very ugly.. I dont want my files there can you
please use
SYSROOT instead of c:\\winnt please.
   
- James
   
   
   
--
PHP CVS 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]
   
   
   
  
  
  
  
   --
   PHP CVS 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]
 
 
 --
 PHP CVS 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]

 ZS --
 ZS Zeev Suraski [EMAIL PROTECTED]
 ZS CTO   co-founder, Zend Technologies Ltd. http://www.zend.com/

 /*--
 daniel beulshausen - [EMAIL PROTECTED]
 using php on windows? http://www.php4win.de



 --
 PHP CVS 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]




-- 
PHP CVS 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]




Re: [PHP] DF output

2001-03-27 Thread Joe Brown

nobody has execute permission on ps?

Probably quite the opposite, your webserver user doesn't have execute
permission on ps, so there is no execution or return value.

"Steven Shepherd" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am writing a script, actually modifying PhPSysInfo to include the top
 processes used on a machine.  So far, no matter what I do, I can only get
 it to work via the command line.  I get a blank screen when trying it via
 the browser:

 Tried this:

 ?php
 $data = `ps auxwww`; echo nl2br($data);
 ?

 
 and this:

 TT
 PRE
 ?php
 exec("/usr/bin/top n 1 b | head -8 | sed 's/[\$|^M]//g'", $top);
 while (list(,$line) = each($top)){
  echo $line, "BR\n";
   }
  ?
 /PRE
 /TT

 I used sed to remove control characters..etc.  Again, both examples above
 work via the command line, but not via a browser.  User "www" is able to
 run this command as well, so it's not permissions.  Help?!  :)


 --
 PHP General 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]




-- 
PHP General 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]




Re: [PHP] DF output

2001-03-27 Thread Joe Brown

Well, that's a whole different ballpark.

do man top see if it has a batch mode option

With the top on my linux box:
$ top -b

"Steven Shepherd" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Bad example (changed to ps and it works actually..but i dont want 'ps', I
 want 'top').  Ran top using su to the user 'www' from the command line and
 was able to run it fine.

 On Tue, 27 Mar 2001, Joe Brown wrote:

  Date: Tue, 27 Mar 2001 12:35:08 -0500
  From: Joe Brown [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] "DF" output
 
  nobody has execute permission on ps?
 
  Probably quite the opposite, your webserver user doesn't have execute
  permission on ps, so there is no execution or return value.
 
  "Steven Shepherd" [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   I am writing a script, actually modifying PhPSysInfo to include the
top
   processes used on a machine.  So far, no matter what I do, I can only
get
   it to work via the command line.  I get a blank screen when trying it
via
   the browser:
  
   Tried this:
  
   ?php
   $data = `ps auxwww`; echo nl2br($data);
   ?
  
   
   and this:
  
   TT
   PRE
   ?php
   exec("/usr/bin/top n 1 b | head -8 | sed 's/[\$|^M]//g'", $top);
   while (list(,$line) = each($top)){
echo $line, "BR\n";
 }
?
   /PRE
   /TT
  
   I used sed to remove control characters..etc.  Again, both examples
above
   work via the command line, but not via a browser.  User "www" is able
to
   run this command as well, so it's not permissions.  Help?!  :)
  
  
   --
   PHP General 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]
  
 
 
 
  --
  PHP General 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]
 
 


 --
 PHP General 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]




-- 
PHP General 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]




Re: [PHP] DF output

2001-03-27 Thread Joe Brown

heh,
dunno, maybe the $PATH  environment var doesn't include /sbin or /usr/sbin.

Test w 'ls' see if you can get a directory listing, at least?

"Steven Shepherd" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Brad,

 Thanks for the response.  Either method they both work via command
 line.  Neither of them work in the browser.

 On Tue, 27 Mar 2001, Brad S. Jackson wrote:

 
  Try $top = `top n 1 b | head -8 | sed 's/[\$|^M]//g'`;
 
  In my experience, you can't use | in exec calls, you have to use the
back tick
  method.
 
 
  Steven Shepherd [EMAIL PROTECTED] wrote:
  Bad example (changed to ps and it works actually..but i dont want 'ps',
I
  want 'top').  Ran top using su to the user 'www' from the command line
and
  was able to run it fine.
 
  On Tue, 27 Mar 2001, Joe Brown wrote:
 
   Date: Tue, 27 Mar 2001 12:35:08 -0500
   From: Joe Brown [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Subject: Re: [PHP] "DF" output
  
   nobody has execute permission on ps?
  
   Probably quite the opposite, your webserver user doesn't have execute
   permission on ps, so there is no execution or return value.
  
   "Steven Shepherd" [EMAIL PROTECTED] wrote in message
   [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I am writing a script, actually modifying PhPSysInfo to include the
top
processes used on a machine.  So far, no matter what I do, I can
only get
it to work via the command line.  I get a blank screen when trying
it via
the browser:
   
Tried this:
   
?php
$data = `ps auxwww`; echo nl2br($data);
?
   

and this:
   
TT
PRE
?php
exec("/usr/bin/top n 1 b | head -8 | sed 's/[\$|^M]//g'", $top);
while (list(,$line) = each($top)){
 echo $line, "BR\n";
  }
 ?
/PRE
/TT
   
I used sed to remove control characters..etc.  Again, both examples
above
work via the command line, but not via a browser.  User "www" is
able to
run this command as well, so it's not permissions.  Help?!  :)
   
   
--
 
 
 


 --
 PHP General 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]




-- 
PHP General 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]




Re: [PHP] [PHP4] $fp = fopen( news.txt, 'a' ); // 'a' = append! Wah!

2001-03-25 Thread Joe Brown

Re-create the file.  You're most of the way there.

if( $formSubmit )
 {
echo "Your news has been processed.";
$filename = "news.txt";

//This is simpler than messing with an array of the original content.
$fp = fopen ($filename, "r");
$newsSubmit  = fread ($fd, filesize ($filename));
fclose ($fp);

$fp = fopen( $filename, "w" );  // change append to write (a to w)
fwrite( $fp, $frmName );//write the new
fwrite( $fp, $newsSubmit);//write the old
fclose( $fp );
 }
else
 {
include ( "newsForm.php" );
 }

if you want to use fseek, then try this:

if( $formSubmit )
 {
echo "Your news has been processed.";
$filename = "news.txt";

//This is simpler than messing with an array of the original content.
$fp = fopen ($filename, "r+");
$newsSubmit  = fread ($fd, filesize ($filename));
fseek($fp,0);
fwrite( $fp, $frmName );//write the new
fwrite( $fp, $newsSubmit);//write the old
fclose( $fp );
 }
else
 {
include ( "newsForm.php" );
 }

""Dddogbruce (@home.com)"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Ok, with this fseek..

 Could you give me an example of how to implement it?




 --
 PHP General 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]




-- 
PHP General 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]




Re: [PHP] [PHP4] $fp = fopen( news.txt, 'a' ); // 'a' = append! Wah!

2001-03-25 Thread Joe Brown

Take a closer look at the previous message I sent $filename was defined as:
$filename="news.txt";

""Dddogbruce (@home.com)"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 When you say $newsSubmit  = fread ($fd, filesize ($filename));

 Do you mean specify the filename?  $news.txt then?




 --
 PHP General 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]




-- 
PHP General 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]




Re: [PHP] [PHP4] $fp = fopen( news.txt, 'a' ); // 'a' = append! Wah!

2001-03-25 Thread Joe Brown

maybe spinning the 'd' in $fd 180 degrees to make it a p will help...

Sorry, haven't tried this myself, typo's happen.

heh, I'm still trying to compile php 4 windows :-(  been hoping for a
helping hand.


""Dddogbruce (@home.com)"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 $fp = fopen ($filename, "r");
 $newsSubmit  = fread ($fd, filesize ($filename));

 These are giving me a parse error:
 Warning: Supplied argument is not a valid File-Handle resource in
 C:/XITAMI/owen/website/php/newsSubmit.php on line 10







 --
 PHP General 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]




-- 
PHP General 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]




Re: [PHP] [PHP4]

2001-03-24 Thread Joe Brown

if($formSubmit) {
echo "form submitted: $frmName"; //= have you tried this to make sure
$formSubmit is true?
  $newsSubmit = file("news.txt"); //RTM, your not using file() the way it's
inteneded.
  $fp = fopen("news.txt", 'a');  //looks good
  fwrite($fp, $frmName); //looks good, but does $frmName contain anything?
  fclose($fb); //$newsSubmit is not a file pointer and should not be used as
such, use $fp instead.
} else {...

good luck

""Dddogbruce (@home.com)"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I've defined all the variables in the form, and have all the files..

 HTML
 TITLESubmit News/TITLE
 BODY
 Your news has been processed and added to the main page.  Thanks!
 ?
 if($formSubmit) {
 $newsSubmit = file("news.txt");
 $fp = fopen("news.txt", 'a');
 fwrite($fp, $frmName);
 fclose($newsSubmit);
 } else {
 include ("newsForm.php");
 }
 ?
 /BODY
 /HTML

 See any problems?  It won't dump $frmName onto the .txt file.


 --
 PHP General 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]




-- 
PHP General 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]




[PHP] Compiling, How to resolve COM

2001-03-24 Thread Joe Brown

I've been trying to compile php4 on Windows.

Almost there, but I haven't figured out how to resolve this, except to yank
COM stuff out of the source.

Haven't figured out how to compile oci8 either, but that's secondary to the
initial obstical.

With RC1 and the latest snaps, there are unresolved symboles in the compile:

Linking...
   Creating library ..\Debug/php4nts_debug.lib and object
..\Debug/php4nts_debug.exp
internal_functions_win32.obj : error LNK2001: unresolved external symbol
_VARIANT_module_entry
COM.obj : error LNK2001: unresolved external symbol _php_char_to_OLECHAR
COM.obj : error LNK2001: unresolved external symbol _php_OLECHAR_to_char
COM.obj : error LNK2001: unresolved external symbol _php_pval_to_variant
COM.obj : error LNK2001: unresolved external symbol _php_variant_to_pval
..\Debug\php4nts_debug.dll : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.

Please enlighten me.

Thanks,

-Joe





-- 
PHP General 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]




Re: [PHP] ODBC Oracle

2001-03-22 Thread Joe Brown

There is a timeout, that should halt a script if it runs too long.  If you
can, check
php.ini
set max_execution_time to something greater than 30 seconds, see if that
helps.

""Brooks, Ken"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I thought maybe the php script was running to fast for the network
 connection.
 So i put in a sleep(1)
 It still only ran for about the same amount of time (less records pulled
of
 course).

 Could it be losing the connection instead because of lack of activity?

 Would a persistent connection make any difference?

 -Original Message-
 From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 22, 2001 4:04 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] ODBC  Oracle


 Are there any limitations on how many records I can pull from an Oracle
 Database
 over ODBC?

 I have it pulling one record just fine, but when I tell it to pull all
 records,
 which should be about 75,000, it only gets about 600 or so.

 Does the php script time out (i'm running it thru a web browser).

 What could it be?...

 thanks,
 ken

 --
 PHP General 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]

 --
 PHP General 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]




-- 
PHP General 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]