RE: [PHP] MAC file upload

2002-04-08 Thread Rance Hall

Shane,

Eric is absolutely right, you are losing the resource fork of your mac binaries when 
you upload them.

(If you don't know, on a Mac, the binary file has to parts, the data, and the 
association with an application (or resource) that created the file.  This is done so 
that Mac file names don't need an extension)

Most server systems (except Mac of course) don't know how to handle a resource fork, 
so they drop it.  The standard Mac work around is to convert the binary file to a text 
format called binhex (.hqx filename extension) upload the .hqx file to the server and 
then reconvert it back once downloaded to a Mac that knows what to do with the 
resource fork information.

This process can be automated with apple script if you like,  but, if you ever want 
another machead to help you diagnose problems, stick to this layout, that way they 
know what you are doing.

Rance

Rance Hall
308.238.2455
Internal Office Extensions: 2455 or 6655
PC Programmer, The Buckle, Inc.
[EMAIL PROTECTED]


-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 08, 2002 8:46 AM
To: Shane McBride
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] MAC file upload



On Saturday, April 6, 2002, at 11:44  AM, Shane McBride wrote:

 Hello,

 I am able to upload and download Macintosh files but they seem to lose 
 their
 MIME type or extensions. I'm not sure what it is. I'm not a Mac dude.

 When you download the file It loses the file association. It's for a 
 company
 I do work for that uses a lot of .ai and .psd files.


 Any ideas on this?

You're possibly losing the resource fork of the files you are uploading, 
because the server is not an HFS+ filesystem.  To the best of my 
knowledge there is nothing you can do about this via PHP, but there are 
probably tricks (like AppleScript) that you could use as a workaround, 
such as encoding the files in some transport-friendly format before 
uploading and decoding them upon download.

Erik





Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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


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




RE: [PHP] Adding Querystrings to links

2002-04-08 Thread Rance Hall

you want to try a code line like this

print a 
href=\yourpagehere.phtml?dest=$line[index]item=$line[index2]\LinkName/a;

it will only work of course if you are in the middle of a loop that processes the 
results of an appropriate select statement that pulls the needed values for your dest 
and item variables.

for a similar project I wrote this:

for ($i=0; $i  $rowcount; $i++) {
$line = mysql_fetch_array($results);
if ($i % 2) {
 print tr bgcolor=\white\\n;
}
else {
 print tr bgcolor=\#e0e0e0\\n;
}
 print tda 
href=\project_details.phtml?project=$line[pk]\$line[projectname]/a/td\n;
 print td$line[projectcustomer]/td\n;
 print td$line[projectstatus]/td\n;
 print td$line[projectcompletion]%/td\n;
 print /tr\n;
 }


Hope it helps


Rance Hall
308.238.2455
Internal Office Extensions: 2455 or 6655
PC Programmer, The Buckle, Inc.
[EMAIL PROTECTED]


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 08, 2002 10:12 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Adding Querystrings to links


Hi all!

I have a problem with the querystring.I want to add to every Link on my Homepage a 
querystring, but i should have the possibility to change some details in the 
Querystring.
How should i solve this problem ?

Example :

http://domain.com/index.php?dest=12item=2
The variables ?dest= and item= should be in every Link on my site.But only the 
values 12 and 2 should be alterable.

Thank you,and sorry for my bad english
Chris

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




RE: [PHP] Upload alert

2002-04-08 Thread Rance Hall

why couldnt you just do this

  $checksum = md5(implode('', file('/path/to/file')));

then it would only warn you about change in the code pre-parse, rather than post-parse 
as miguel suggested?

Rance Hall
308.238.2455
Internal Office Extensions: 2455 or 6655
PC Programmer, The Buckle, Inc.
[EMAIL PROTECTED]


-Original Message-
From: Miguel Cruz [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 08, 2002 12:45 PM
To: Rodolfo Silva
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Upload alert


On Mon, 8 Apr 2002, Rodolfo Silva wrote:
 I need a php script to alert me (with a pop up window or something like
 that) when a certain web page is modified. Is it possible? Where can I
 find that?

I don't know where you can find it pre-made, but it's pretty simple. In a
nutshell:

  $checksum = md5(implode('', file('http://www.whatever.org/')));

That'll give you a 32-character string.

Save $checksum in a database or in a local file. 

Repeat as often as you need to (using cron or whatever). Compare the new
value against the one you saved. If they don't match, the page changed.

NB: This will catch ANY change in the page. If that page is set up to show
the current date, for instance, then that will be picked up as a change
every day. If you need to deal with something like this, you're going to
have to analyze and parse the page.

miguel


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


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




[PHP] AS/400 data access

2002-04-08 Thread Rance Hall



the data that I need to generate a dynamic 
web page with PHP is on an AS/400 server

if any of you have had to so this before, 
can you show me the connect code.

I'm pretty sure I'm gonna have to use 
unified ODBC PHP commands, but not sure how to make the connection from the 
webserver to the database.

Rance Hall308.238.2455Internal Office Extensions: 2455 or 6655PC 
Programmer, The Buckle, Inc.[EMAIL PROTECTED]



RE: [PHP] Using ODBC

2002-04-04 Thread Rance Hall

Where were you yesterday when I was discussing this left and right. :)

What do you want do know?

Rance Hall
308.238.2455
Internal Office Extensions: 2455 or 6655
PC Programmer, The Buckle, Inc.
[EMAIL PROTECTED]


-Original Message-
From: Someone Somewhere [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 9:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Using ODBC


Does anyone have any experience using ODBC to connect to an Access database,
I'm runing php and Apache in Windows 2000. Any help will be apreciated.


Thanks
Someone



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


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




RE: [PHP] Using ODBC

2002-04-04 Thread Rance Hall

There is a fine tutorial on the subject (including how to set up a DSN on an NT box) 
located at:
http://www.phpbuilder.com/columns/siddarth2228.php3

I would suggest that you take the time to read it, and then let us know what you don't 
understand or have problems with.  It fixed me.

PS, in the PHP manual read up on the unified ODBC command structure, and be advised 
that ODBC_NUM_ROWS does not return any meaningful value from an access database, do 
don't use that command

Rance Hall
308.238.2455
Internal Office Extensions: 2455 or 6655
PC Programmer, The Buckle, Inc.
[EMAIL PROTECTED]


-Original Message-
From: Someone Somewhere [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 9:57 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Using ODBC


Everything from setting up the DSN stuff to the commands for connecting and
extracting info from the access database



Rance Hall [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Where were you yesterday when I was discussing this left and right. :)

What do you want do know?

Rance Hall
308.238.2455
Internal Office Extensions: 2455 or 6655
PC Programmer, The Buckle, Inc.
[EMAIL PROTECTED]


-Original Message-
From: Someone Somewhere [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 9:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Using ODBC


Does anyone have any experience using ODBC to connect to an Access database,
I'm runing php and Apache in Windows 2000. Any help will be apreciated.


Thanks
Someone



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




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


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




[PHP] PHP and MS access

2002-04-02 Thread Rance Hall

Anybody have a good tutorial on getting PHP to access a MS Access Database with ODBC?

I cant even get a connection to succeed.

Rance Hall
308.238.2455
Internal Office Extensions: 2455 or 6655
PC Programmer, The Buckle, Inc.
[EMAIL PROTECTED]

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




[PHP] pH and MS Access

2002-04-02 Thread Rance Hall

Downloaded and installed the adodb sripts to my web dir, the server is a win2k box so 
I had to manually edit all the path statements in the adodb sripts to make the path 
statements work

I keep getting the following error, whether I used the PHP odbc access codes, or adodb 
for acess codes

Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no 
default driver specified, SQL state IM002 in SQLConnect in 
c:\apache\htdocs\adodb\adodb-odbc.inc.php on line 64

I really want to be connected to an Access database.

I have added a dsn to my system, and the data base should be ok

now, what do I do next.



Rance Hall
308.238.2455
Internal Office Extensions: 2455 or 6655
PC Programmer, The Buckle, Inc.
[EMAIL PROTECTED]

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




RE: [PHP] Really slow include

2002-04-02 Thread Rance Hall

try replacing your include with the full data path to the header file rather than a 
URL, php has to establish a http connect and download your header file before 
proceeding.

require (/path/to/file/header.htm)

sometimes depending on what web server software you are using, you may need to do it 
like this

require (./path/to/file/header.htm)

note the . in front of the path
Rance Hall
308.238.2455
Internal Office Extensions: 2455 or 6655
PC Programmer, The Buckle, Inc.
[EMAIL PROTECTED]


-Original Message-
From: anti-blank [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 3:38 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Really slow include


I have a header section for my website and I'd like to include it into each page.  
Since this is where
I'm housing all of my navagation.  Here is my problem though.  I have the header 
tables sitting in a page
header.htm.  I'm calling it as so:
?
require (header.htm)
?

This works fine as long as I stay in the main folder /htdocs where the header.htm file 
is.
The problem lies when I go any deeper.  I tried replacing the link with:
?
require (/header.htm)
?
Hoping that would put it back to the /htdocs folder as it works for my standard links. 
 Instead
I get this:
Fatal error: Failed opening required '/header.htm' 
(include_path='.:/usr/local/lib/php') in /www/foo/htdocs/foo/index_test.php on line 82

I've tried correcting it by including the full path: 
?
require (http://www.foo.com/header.htm;)
?

This does work but it's so amazingly slow.  Even on my cable connection it will take 
20-30 seconds
to load this.  I've switched back and forth between require and include with no change 
in speed.  Anyone
have a suggestion or an idea on why my load time is suffering so much?

I hope all of that was clear enough.

Thanks
anti-blank

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




[PHP] PHP and MS Access

2002-04-02 Thread Rance Hall

I guess I am gonna have to plead stupid here.

I've never used access, I don't like it, and I think there are much better tools out 
there to do what access does.

Having said that, I work in an environment that is almost completely VBA in either 
access or excel.

I need to find a way to query an access database, and I wanted to do it with a 
auto_refresh web page.

But I cant, I cant connect to the database, I cant execute a query, and maybe I return 
the infamous empty yet infinite array.

maybe I should just do it in excel?

If any of you have been able to get this to work, please tell me what you did to get 
it to work, and how you did it.

Thanks,



Rance Hall
308.238.2455
Internal Office Extensions: 2455 or 6655
PC Programmer, The Buckle, Inc.
[EMAIL PROTECTED]

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




[PHP] Using PHP to access an AS 400 database

2002-04-01 Thread Rance Hall

I'd like to find a way to get my PHP driven web site to connect to an AS 400 database

The machine that is running php does have client access to the AS 400.

I'm trying to port some old MS Excel spreadsheets over to our intranet..

any thoughts much appreciated.

Rance

Rance Hall
308.238.2455
Internal Office Extensions: 2455 or 6655
PC Programmer, The Buckle, Inc.
[EMAIL PROTECTED]

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




[PHP] php - apache web based configurator

2002-04-01 Thread Rance Hall

Anybody have any recommendations on a good php based apache configurator, kinda like 
phpmyadmin for mysql databases?

Rance Hall
308.238.2455
Internal Office Extensions: 2455 or 6655
PC Programmer, The Buckle, Inc.
[EMAIL PROTECTED]

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