[PHP] Where to set return-path for virtualhosts

2002-07-23 Thread Joseph Koenig

I saw a comment in the online docs about setting the return-path for
sendmail for virtualhosts. However, the note did not say WHERE to put the
line - I attempted to put it into apache's virtual host tag and that failed.
The line was:

php_admin_value return-path /usr/sbin/sendmail -t -i -f [EMAIL PROTECTED]

Can anyone give me a hint? Please CC me as I am not currently subscribed.
Thanks,

Joe


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




[PHP] PHP 4.0.6 on NT (IIS 4.0) Can't replace uploaded file

2001-10-01 Thread Joseph Koenig

I've got a script on an NT (IIS 4.0) server that uploads a file. When
the user attempts to replace the uploaded file with a new one via the
form, the script is generating errors.

Warning: Unable to create
'D:/public/HJ/www.h-jenterprises.com/test/pics/catalog/104_2.gif':
Permission denied in
D:\public\HJ\www.h-jenterprises.com\test\admin\item_functions.php on
line 41

Warning: Unable to move 'C:/PHP/uploadtemp\php4F6.tmp' to
'D:/public/HJ/www.h-jenterprises.com/test/pics/catalog/104_2.gif' in
D:\public\HJ\www.h-jenterprises.com\test\admin\item_functions.php on
line 41

Is there anything I should have their IT guy check as to why this script
can upload, but not replace a file? 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] PHP 4.0.6 on NT (IIS 4.0) Can't replace uploaded file

2001-10-01 Thread Joseph Koenig

The script is moving the file to its final destination and then doing a
chmod(filename, 0777) (the php function, not through exec() or
anything); Even setting the mode to 0777 doesn't help at all. Am I doing
this completely wrong from IIS/NT? Thanks,

joe

Joe Kaiping wrote:
 
 Sounds like their upload script isn't setting the correct file permissions
 when creating the file.  Directory permissions don't seem to be a problem
 for you.
 
 -Joe2
 
  -Original Message-
  From: Joseph Koenig [mailto:[EMAIL PROTECTED]]
  Sent: Monday, October 01, 2001 12:38 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] PHP 4.0.6 on NT (IIS 4.0) Can't replace uploaded file
 
 
  I've got a script on an NT (IIS 4.0) server that uploads a file. When
  the user attempts to replace the uploaded file with a new one via the
  form, the script is generating errors.
 
  Warning: Unable to create
  'D:/public/HJ/www.h-jenterprises.com/test/pics/catalog/104_2.gif':
  Permission denied in
  D:\public\HJ\www.h-jenterprises.com\test\admin\item_functions.php on
  line 41
 
  Warning: Unable to move 'C:/PHP/uploadtemp\php4F6.tmp' to
  'D:/public/HJ/www.h-jenterprises.com/test/pics/catalog/104_2.gif' in
  D:\public\HJ\www.h-jenterprises.com\test\admin\item_functions.php on
  line 41
 
  Is there anything I should have their IT guy check as to why
  this script
  can upload, but not replace a file? 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]

-- 
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] Finding a File

2001-09-21 Thread Joseph Koenig

Hello everyone -- I'm just a little bit stumped on this. I've got some
files that are available for user download, however, the files are in
different directories. The file names are based on the item number which
is available. For example, item number AS1000-01 is in directory AS
and is named AS1000-01.xxx -- All files will have the same extension.
That's no problem. Where I'm confused is not all of the directories are
2 letter names. For example, file BSEB10-010 is in the BSE
directory. Some directories are 4 characters long -- all except the
BSEB**-*** files match their directory names until the file name
contains a number (AS is in AS, MAS is in MAS, etc). I need
this script to be as dynamic as possible. I don't want to set up arrays
of directory names or anything. Can I run through the string of item
numbers until I hit a numeric character, and then check that substring
to see if it's a directory? If it doesn't match exactly is there a way
to search for that file in directories that almost match? Any ideas? 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] Finding a File

2001-09-21 Thread Joseph Koenig

Well - I just spoke with the client and apparently only one directory
was going to create that problem so they're just going to rename the
directory. I guess I should have tried that solution first. However, is
there a way to read the string up to the point where the numbers start?
For example, pull AS out of ASx and MAS out of MASx? I
looked through the string functions and didn't really see anything to
promising. Something like is_letter() would be cool :) Thanks,

Joe

Joseph Koenig wrote:
 
 Hello everyone -- I'm just a little bit stumped on this. I've got some
 files that are available for user download, however, the files are in
 different directories. The file names are based on the item number which
 is available. For example, item number AS1000-01 is in directory AS
 and is named AS1000-01.xxx -- All files will have the same extension.
 That's no problem. Where I'm confused is not all of the directories are
 2 letter names. For example, file BSEB10-010 is in the BSE
 directory. Some directories are 4 characters long -- all except the
 BSEB**-*** files match their directory names until the file name
 contains a number (AS is in AS, MAS is in MAS, etc). I need
 this script to be as dynamic as possible. I don't want to set up arrays
 of directory names or anything. Can I run through the string of item
 numbers until I hit a numeric character, and then check that substring
 to see if it's a directory? If it doesn't match exactly is there a way
 to search for that file in directories that almost match? Any ideas? 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]

-- 
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] PHP + NT + Weird line break??

2001-09-18 Thread Joseph Koenig

On NT, I have recently run into this problem. However, this is only as
of today. When using include(); at the top of a page:
?
include();
?
HTML...

There is a line break before my page most of the time, but not always.
Removing the include file and copy-pasting it's contents into the top of
the HTML file gets rid of the space. However, I really need to be able
to use includes without it breaking things. Has anyone run into such a
problem? I tried deleting my included file and recreating it, just in
case it was corrupt, or something odd like that. That didn't help at
all. Has anyone ever seen such a strange thing happen? PHP 4.0.6 is
installed on this server with IIS 4.0. Any ideas would be much
appreciated. 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]




[PHP] PHP + FreeBSD + ODBC -- Progress Database

2001-09-13 Thread Joseph Koenig

This is probably a really stupid question. I've been reading info on
phpbuilder and at iodbc.org and I must just be missing something. What I
want to do is connect to a Progress Database on WinNT from a FreeBSD 4.3
server with PHP 4.0.6. Before I compiled PHP, I was under the impression
I needed iodbc. On my PHP info page, it shows this configure line: 

'./configure' '--with-mysql=/usr/local/mysql'
'--with-pgsql=/usr/local/pgsql' '--enable-trans-sid'
'--with-curl=/usr/local/bin/curl' '--enable-ftp' '--enable-magic-quotes' 
'--with-apxs=/usr/local/sbin/apxs'

However, as I scroll down the page, I find this info:

odbc

ODBC Supportenabled
Active Persistent Links 0
Active Links0
ODBC libraryiodbc
ODBC_INCLUDE-I/usr/local/include
ODBC_LFLAGS -L/usr/local/lib
ODBC_LIBS   -liodbc


Directive   Local Value
 Master Value
odbc.allow_persistent   On 
 On
odbc.check_persistent   On 
 On
odbc.default_db no value   
 no value
odbc.default_pw no value   
 no value
odbc.default_user   no value   
 no value
odbc.defaultbinmode return as isreturn 
as is
odbc.defaultlrl return up to 4096 bytes return up to 
4096 bytes
odbc.max_links  Unlimited  
 Unlimited
odbc.max_persistent Unlimited  
 Unlimited

Now, to me that looks like I could theoretically do what I want to,
correct? Any help with PHP + ODBC on FreeBSD would be much appreciated. 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]




[PHP] File Upload and NT...

2001-08-24 Thread Joseph Koenig

Sorry, I know file uploads are asked about all the time...

I'm having an odd problem on a WinNT system.

When I try to do my upload, I test the file to see the type of it:
$image_info = GetImageSize($the_image);

However, that line gives me:
Warning: getimagesize: Unable to open
'/Joe1/Desktop%20Folder/device_eval.gif' for reading. in
D:\public\HJ\www.h-jenterprises.com\test\admin\item_functions.php on
line 22

At first I had thought this would be a permissions issue, but the file
it can't open is the one being uploaded. If I echo the file being
uploaded, i get:
Image Name: /Joe1/Desktop%20Folder/device_eval.gif

I swear I looked at the archive and I've done this plenty of times
before (but on Unix). This project is being done on NT, which I'm fairly
unfamiliar with though. Any help would be much appreciated.

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] File Upload and NT...

2001-08-24 Thread Joseph Koenig

Actually,

The warning is coming from when I try and upload the file from the
desktop of my Mac. It's supposed to get uploaded into:
C:\WINNT\PHP\UPLOADTEMP. I checked phpinfo() and that's where it says
the upload_tmp_dir is. By the way, I was using the getimagesize to check
if the file is a .gif, .jpg, etc. Even without the getimagesize(), the
file still isn't being uploaded into the temp folder. I'm using,
basically, the same function that I use on Unix systems. Is there
something magic about doing uploads on windows that I don't know about? Thanks,

Joe

Erik H. Mathy wrote:
 
  I'm having an odd problem on a WinNT system.
 
 That's what NT is all about. ;)
 
  When I try to do my upload, I test the file to see the type of it:
  $image_info = GetImageSize($the_image);
 
 Out of curiousity, who don't you try using:
 
 if(is_file($the_image)) {
 do something...
 } else {
 kick out no file warning...
 }
 
 Docs:
 http://www.php.net/manual/en/function.is-file.php
 
  However, that line gives me:
  Warning: getimagesize: Unable to open
  '/Joe1/Desktop%20Folder/device_eval.gif' for reading. in
  D:\public\HJ\www.h-jenterprises.com\test\admin\item_functions.php on
  line 22
 
 Have you specifically sent the uploaded file there? If not, it's more than
 likely in whatever temporary upload folder you have defined in your php.ini
 file.
 
  At first I had thought this would be a permissions issue, but the file
  it can't open is the one being uploaded. If I echo the file being
  uploaded, i get:
  Image Name: /Joe1/Desktop%20Folder/device_eval.gif
 
 Oh! OK, I get it...you're tossing it up onto your desktop. So that path
 isn't correct. It should be:
 
 C:\WINNT\Profiles\Joe1\Desktop\device_eval.gif
 
 In general, you're better off placing that file someplace other than the
 desktop. Make a folder somewhere nice and generic, like D:\Uploads\Images\ .
 That'll make your life a whole lot easier.
 
 Hope this helps, drop me a line if it doesn't...
 - Erik
 
 --
 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] MySQL - Quicken

2001-06-20 Thread Joseph Koenig

I've got a client who wants to be able to export some stuff from a MySQL
database in a format that Quicken can import to print some checks. Is
this possible? From what i've seen, Quicken takes a proprietary format.
Any info would be appreciated. Thanks,

Joe



[PHP] Store PHP Code in MySQL?

2001-06-19 Thread Joseph Koenig

I've been playing a little bit trying to store some PHP code in MySQL
and get it to execute. However, it behaves just like expected in that it
just displays the code, and doesn't execute it. Essentially, i want to
do this:

?
while($data = mysql_fetch_array($result)) {
echo $data[text];
}
?

With $data[text] containing:
?
echo $var;
?

Anybody know a way to actually make this work? Thanks,

Joe



[PHP] Continue Script after readfile()

2001-05-16 Thread Joseph Koenig

is it possible for a script to continue running after calling
readfile()? I have a function that uses readfile(), after the file has
been read, I need to update a database. Any reason my script would just
stop executing? At first I thouht it may be a time limit, issue, but I
set time limit to 0 and it still doesn't work. Any ideas? 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] Continue Script after readfile()

2001-05-16 Thread Joseph Koenig

OK, I think I failed to see what was realling happening. The script is
continuing after the readfile(), however, I want the page to reload
after the file is done. The link that lets the user download the file is
really a link to $PHP_SELF with some variables set. Everything in the
script will continue to run, but the page will not reload. I also tried
sending a header(Location: ...) and that didn't work. Is this
possible? Thanks,

Joe

Rasmus Lerdorf wrote:
 
  is it possible for a script to continue running after calling
  readfile()? I have a function that uses readfile(), after the file has
  been read, I need to update a database. Any reason my script would just
  stop executing? At first I thouht it may be a time limit, issue, but I
  set time limit to 0 and it still doesn't work. Any ideas? Thanks,
 
 There is no reason your script should be terminating after a readfile()
 call.
 
 -Rasmus
 
 --
 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] add to .htpasswd via php

2001-05-02 Thread Joseph Koenig

My code looks very similiar to Tyrone's...here's what I'm using. When
I'm on command line I'm the same user as the web server is running as.

$username = test2;
$password = test;
$passfile = /usr/home/myuser/etc/.htpasswd;

$addpass = /usr/local/apache/1.3.12/bin/htpasswd -mb $passfile
$username $password;

$add = exec($addpass);

Anyone see anything stupid I'm missing? Thanks,

Joe

Tyrone Mills wrote:
 
 I do this exact thing on my system, here is the code I use:
 
 $update = exec (/usr/local/apache/bin/htpasswd -b ./.htpasswd $username $password);
 
 My guess is you are dealing with a permissions issue. Like Jack says, try 'su 
nobody' (or whatever your webserver runs as) and then try the command... Once that 
works, so will your script.
 
 - Original Message -
 From: Jack Dempsey [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, May 02, 2001 10:44 AM
 Subject: RE: [PHP] add to .htpasswd via php
 
  what user are you running the command on the the command line, and what user
  is php running it as? if you're root for the first one, but nobody on the
  second, that would be your problem...
 
  -jack
 
  -Original Message-
  From: Joseph Koenig [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 02, 2001 1:40 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] add to .htpasswd via php
 
 
  I'm attempting to streamline my work by writing a script that will add a
  user to the .htpasswd file. If echo the command I'm sending (via exec())
  and run it on the command line, it works fine. From php though, it does
  nothing. All paths are full paths starting at server level. Is there
  anything that anyone is familiar with that would cause this to not work?
  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]
 
 
 
  --
  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] This should be simple...

2001-04-20 Thread Joseph Koenig

I have a client who insists on being able to put quotes into one of the
fields of the database. That's fine with me, however, when editing
records, anything in the quotes won't show up on the admin page.
Essentially what happens is this:
INPUT TYPE ="text" blab blab VALUE = "Here's the text "in quotes""
Well, obviously there's a problem with that. The form field will show
"Here's the text " and then thinks it ends. Is there any way to get
around this, other than stripping out her quotes? 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] This should be simple...

2001-04-20 Thread Joseph Koenig

Right on. That did it. I probably should have been RTFM'ed for that one
:) I knew there was a simple solution.

Joe

Alexander Wagner wrote:
 
 Joseph Koenig wrote:
  INPUT TYPE ="text" blab blab VALUE = "Here's the text "in quotes""
  Well, obviously there's a problem with that. The form field will show
  "Here's the text " and then thinks it ends. Is there any way to get
  around this, other than stripping out her quotes? Thanks,
 
 http://php.net/htmlentities
 
 regards
 Wagner
 
 --
 "A conference is a gathering of important people who singly can do
 nothing, but together can decide that nothing can be done."
 Fred Allen (1894-1956)

-- 
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] PHP Install Problem

2001-03-19 Thread Joseph Koenig

Hi, I'm trying to get php to install on a RH 6.2 system. Apache 1.3.12.
All goes well with the configure, make, and make install, but my server
(apache) won't start and I get this message:

Syntax error on line 249 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/libphp4.so into server:
/etc/httpd/modules/libphp4.so: undefined symb
ol: uncompress

I saw it often in the list archives, but didn't find any good resolution
to it. Anyone know? My configure line is below if that helps. Thanks,

./configure '--with-mysql=/usr/local/mysql'
'--with-pgsql=/usr/local/pgsql' '--with-apxs=/usr/sbin/apxs'
'--with-system-regex' '--disable-debug' '--enable-track-vars'
'--enable-versioning' '--with-ttf' '--with-ftp'

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]