php-general Digest 27 Nov 2001 18:23:42 -0000 Issue 1019
Topics (messages 75748 through 75802):
Re: Selecting databases
75748 by: Martin Towell
75749 by: Craig Vincent
Why doesn't this work? HTTP_USER_AGENT
75750 by: chip
75751 by: Craig Vincent
75752 by: David Robley
75783 by: chip
75786 by: Andrey Hristov
Re: Updating Timestamps
75753 by: Ben Gollmer
How can I acces an environment var $SERVER_ADMIN
75754 by: Silvia Mahiques
75795 by: Papp Gyozo
New on-line exchange: Yachts & boats for sale or charter, holidays afloat ....
27/11/2001 07:08:52
75755 by: The team . yacht-search.net
Question about Linux Rpm
75756 by: Joelmon2001.aol.com
75777 by: Michael A. Peters
Extracting data
75757 by: Joeri Vankelst
75758 by: Andrey Hristov
Redirect
75759 by: MindHunter
75765 by: mcsaba.medsite.hu
set_error_handler in a class
75760 by: Holger Schopohl
client ip address
75761 by: narko
75766 by: mcsaba.medsite.hu
XML Segmentation Fault??
75762 by: Chris Hemmings
Re: Objects and sessions
75763 by: Tamas Arpad
Printing Reports
75764 by: Dan Koken
75770 by: Valter Santos
75772 by: B. van Ouwerkerk
75774 by: Alexander Deruwe
75778 by: Miles Thompson
75780 by: Dan Koken
75787 by: Grimes, Dean
75790 by: Miles Thompson
75791 by: Dan Koken
75793 by: Dan Koken
call php with javascript
75767 by: Bas Jobsen
75769 by: Roko Roic
75785 by: Richard S. Crawford
more complex exec()-problem
75768 by: Christian Reiner
How can i start using templates
75771 by: narko
75773 by: Andrey Hristov
75775 by: Alexander Deruwe
Re:
75776 by: bradley j joyner
Re: changing a variable according to the input in a checkbox
75779 by: Yoan Bosch [VDB TECH SUPPORT & DEVEL]
LDAP server side sorting
75781 by: Christos Sintoris
Re: ereg
75782 by: lallous
Re: error handling and __LINE__
75784 by: SafeV
75796 by: Papp Gyozo
Coding methods (was RE: [PHP-DB] gzip image files)
75788 by: Boget, Chris
75789 by: Jon Haworth
writing text on images
75792 by: e c h o p l u s A T w o r k
Need advide on partnership agreement for a php application...
75794 by: py
setcookie BUG w/ IE 5.5, 6.0 & Netscape!
75797 by: Kris Wilkinson
75798 by: Shane Wright
75799 by: Shane Wright
cookies
75800 by: Urb LeJeune
75801 by: Shane Wright
anybody can tell me how to use PEAR under windows?
75802 by: Dino Leung
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 ---
"if"
something like:
if ($db == 1) connect to db1
else if ($db == 2) connect to db2
else if ($db == 3) connect to db3
would that do?
-----Original Message-----
From: Marts [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 23, 2001 11:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Selecting databases
Hay all,
I have a script that needs to be able to choose between 3 different
databases related to a pull down menu. Any ideas about what functions I
should be looking at
CHeers,
Marty ;)
--
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]
--- End Message ---
--- Begin Message ---
> I have a script that needs to be able to choose between 3 different
> databases related to a pull down menu. Any ideas about what functions I
> should be looking at
There's really no need for a function. Most ANSI standard SQL servers will
allow you to specify databases on the fly in your queries.
So say you had a pulldown menu
<SELECT name="database">
<OPTION value="db1">Database 1</OPTION>
<OPTION value="db2">Database 2</OPTION>
<OPTION value="db3">Database 3</OPTION>
</SELECT>
With this the name of the database will be transfered to the $database
variable upon the form being submitted.
Then:
mysql_query("SELECT * FROM $database.table_name");
Will run a query on the appropriate database...of course this format is
assuming that all the table names will be identical, although if you do have
different table names for each database it's very easy to change that
dynamically as well.
Sincerely,
Craig Vincent
--- End Message ---
--- Begin Message ---
I have this small test page, below, which returns an error -
Parse error: parse error in /usr/local/apache/htdocs/test.php on line 4
on the $browser line, if I comment it out, it returns an error on the $ip
line, etc. I can leave all the php lines out, add an echo statement
<? echo $HTTP_USER_AGENT ?>
in the body to get the http_user_agent and it displays the user agent just
fine. What have I done wrong in such a simple bit of code?
-------------------------
<html><head><title></title></head>
<body>
<?
$browser = $HTTP_USER_AGENT;
$ip = $REMOTE_ADDR ;
$db = mysql_connect ( "localhost" , "username" , "password" );
mysql_select_db ( "database" , $db );
$sql = "INSERT INTO table_name(ip,browser,received)
VALUES('$ip','$browser',now())" ;
$results = mysql_query ( $sql);
?>
<h1>Howdy</h1>
</body></html>
--------------------------------
TIA,
Chip
--- End Message ---
--- Begin Message ---
<snip>
What have I done wrong in such a simple bit of code?
-------------------------
<html><head><title></title></head>
<body>
<?
$browser = $HTTP_USER_AGENT;
$ip = $REMOTE_ADDR ;
$db = mysql_connect ( "localhost" , "username" , "password" );
mysql_select_db ( "database" , $db );
$sql = "INSERT INTO table_name(ip,browser,received)
VALUES('$ip','$browser',now())" ;
$results = mysql_query ( $sql);
?>
<h1>Howdy</h1>
</body></html>
--------------------------------
</snip>
I copy & pasted your code onto a test HTML page and modified the mysql
commands to appropriately connect to my MySQL server. There was absolutely
no problem with this code at all. What version of PHP are you using?
Sincerely,
Craig Vincent
--- End Message ---
--- Begin Message ---
On Tue, 27 Nov 2001 17:43, Craig Vincent wrote:
> <snip>
> What have I done wrong in such a simple bit of code?
> -------------------------
> <html><head><title></title></head>
> <body>
> <?
> $browser = $HTTP_USER_AGENT;
> $ip = $REMOTE_ADDR ;
> $db = mysql_connect ( "localhost" , "username" , "password" );
> mysql_select_db ( "database" , $db );
> $sql = "INSERT INTO table_name(ip,browser,received)
> VALUES('$ip','$browser',now())" ;
> $results = mysql_query ( $sql);
> ?>
> <h1>Howdy</h1>
> </body></html>
> --------------------------------
> </snip>
>
> I copy & pasted your code onto a test HTML page and modified the mysql
> commands to appropriately connect to my MySQL server. There was
> absolutely no problem with this code at all. What version of PHP are
> you using?
Just about to do that but he saved me the effort.
Any chance you created the script with DOS end of line characters??
--
David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA
If you're not confused, you're not paying attention.
--- End Message ---
--- Begin Message ---
This is interesting. I did my testing in Opera 5.05 and it fails to display
the page correctly. I then opened Netscape 6.2 and it works fine. Must be a
problem with Opera. I also set Opera to identify itself as Netscape and it
still failed to load the page.
Thanks for the assistance.
Chip
On Monday 26 November 2001 11:11 pm, David Robley wrote:
> On Tue, 27 Nov 2001 17:43, Craig Vincent wrote:
> > <snip>
> > What have I done wrong in such a simple bit of code?
> > -------------------------
> > <html><head><title></title></head>
> > <body>
> > <?
> > $browser = $HTTP_USER_AGENT;
> > $ip = $REMOTE_ADDR ;
> > $db = mysql_connect ( "localhost" , "username" , "password" );
> > mysql_select_db ( "database" , $db );
> > $sql = "INSERT INTO table_name(ip,browser,received)
> > VALUES('$ip','$browser',now())" ;
> > $results = mysql_query ( $sql);
> > ?>
> > <h1>Howdy</h1>
> > </body></html>
> > --------------------------------
> > </snip>
> >
> > I copy & pasted your code onto a test HTML page and modified the mysql
> > commands to appropriately connect to my MySQL server. There was
> > absolutely no problem with this code at all. What version of PHP are
> > you using?
>
> Just about to do that but he saved me the effort.
>
> Any chance you created the script with DOS end of line characters??
--- End Message ---
--- Begin Message ---
$sql = "INSERT INTO table_name(ip,browser,received)
VALUES('".mysql_escape_string($ip)."','".mysql_escape_string($browser)."',now())" ;
----- Original Message -----
From: "chip" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, November 27, 2001 4:39 PM
Subject: Re: [PHP] Why doesn't this work? HTTP_USER_AGENT
This is interesting. I did my testing in Opera 5.05 and it fails to display
the page correctly. I then opened Netscape 6.2 and it works fine. Must be a
problem with Opera. I also set Opera to identify itself as Netscape and it
still failed to load the page.
Thanks for the assistance.
Chip
On Monday 26 November 2001 11:11 pm, David Robley wrote:
> On Tue, 27 Nov 2001 17:43, Craig Vincent wrote:
> > <snip>
> > What have I done wrong in such a simple bit of code?
> > -------------------------
> > <html><head><title></title></head>
> > <body>
> > <?
> > $browser = $HTTP_USER_AGENT;
> > $ip = $REMOTE_ADDR ;
> > $db = mysql_connect ( "localhost" , "username" , "password" );
> > mysql_select_db ( "database" , $db );
> > $sql = "INSERT INTO table_name(ip,browser,received)
> > VALUES('$ip','$browser',now())" ;
> > $results = mysql_query ( $sql);
> > ?>
> > <h1>Howdy</h1>
> > </body></html>
> > --------------------------------
> > </snip>
> >
> > I copy & pasted your code onto a test HTML page and modified the mysql
> > commands to appropriately connect to my MySQL server. There was
> > absolutely no problem with this code at all. What version of PHP are
> > you using?
>
> Just about to do that but he saved me the effort.
>
> Any chance you created the script with DOS end of line characters??
--
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]
--- End Message ---
--- Begin Message ---
The easiest way is to use an SQL query like this;
update your_table set timestamp_field=null;
This sets the timestamp to the current time automagically. You can of
course add a where clause and so on to this query.
Ben
On Monday, November 26, 2001, at 09:27 PM, cosmin laslau wrote:
> I'm using timestamps (God bless the little things) to keep track of
> database updates, so to give users the latest updates by the second.
> Kinda neat. But anyway, the timestamps are in one table, and when
> something is that table is changed, it automatically updates.
>
> However, I have another table which I want to affect the timestamps. Is
> there a command for 'manually' updating a timestamp rather than by
> SQL's own logic?
>
> Thanks in advance.
>
> Cosmin Laslau
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at
> http://explorer.msn.com/intl.asp
>
>
> -- 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]
>
>
--- End Message ---
--- Begin Message ---
Hi frieds!
I have some problems with get values from environment vars controled by php.
I can't get value from $SERVER_ADMIN var. This var is empty.
In apache log file, I have defined ServerAdmin directive, I suppose this
directive references this environment var, but I not sure if it is necessary
the identical name.
If you have an idea, please, help me!
Silvia Mahiques
--- End Message ---
--- Begin Message ---
getenv('SERVER_ADMIN');
$HTTP_SERVER_VARS['SERVER_ADMIN'];
----- Original Message -----
From: "Silvia Mahiques" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, November 27, 2001 9:01 AM
Subject: [PHP] How can I acces an environment var $SERVER_ADMIN
| Hi frieds!
| I have some problems with get values from environment vars controled by php.
| I can't get value from $SERVER_ADMIN var. This var is empty.
|
| In apache log file, I have defined ServerAdmin directive, I suppose this
| directive references this environment var, but I not sure if it is necessary
| the identical name.
|
| If you have an idea, please, help me!
|
|
| Silvia Mahiques
|
|
| --
| 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]
|
--- End Message ---
--- Begin Message ---
If you have any interest in yachting, boats, sailing or holidays afloat...
Visit >> www.yacht-search.net << the new international boat & yacht charter & sales
system -
FREE OF CHARGE FOR ALL USERS... Free advertising or enquires using $1.5 Million USD
(£1M) of technology!
> CREATING NEW MARKETS WITH SEARCH & MATCH SOFTWARE FROM SEARCH PLC <
(>>Brokers / owners / charterers<<)
(We have been given your email address as someone who may be interested in the boating
business; This email is a "one off" but if you have no interest in yachts or shipping
and would like to be 100% sure that you will never receive an email from us again
please simply mail [EMAIL PROTECTED] and type "remove" in the subject line -
we apologize for bothering you.)
--- End Message ---
--- Begin Message ---
Hello, I see all the ways to compile the tarball on a raq 3
for php after one installs freetype/gd and has mysql
well, what about the rpm?
Since I have mysql installed, after I get gd/freetype up
will the rpm know what to do to incorporate them? Or would I still
have to modify certain files?
For those that have used linux rpm's instead of using the
tarball and compiling with make, ./configure ...
Thanks, just curious
Joel
--- End Message ---
--- Begin Message ---
On Tue, 27 Nov 2001 03:11:42 EST
[EMAIL PROTECTED] mentioned:
> Hello, I see all the ways to compile the tarball on a raq 3
> for php after one installs freetype/gd and has mysql
>
> well, what about the rpm?
> Since I have mysql installed, after I get gd/freetype up
> will the rpm know what to do to incorporate them? Or would I still
> have to modify certain files?
RPM is good if everything is installed by RPM.
Otherwise, RPM won't know that you have dependencies installed, and will
fail.
>
> For those that have used linux rpm's instead of using the
> tarball and compiling with make, ./configure ...
>
> Thanks, just curious
>
> Joel
>
--
-=-=-=-=-=-=-=-=-=-=-=-=-
Michael A. Peters
http://24.5.29.77:10080/
--- End Message ---
--- Begin Message ---
Hi,
I'm looking for a way to extract data from a single variable.
I'll explain:
The variable contains somthing that look like: #@data1#@data2#@data3
What I would like to do is check the data between the #@'s so I can compare
data1, 2 and 3 with a another variable. The next this I would like to be
able to do is count the #@'s so I can seen how many items there are in the
variable.
Any help would be greatly appreciated!
Joeri Vankelst
--- End Message ---
--- Begin Message ---
<?php
$str = '#@data1#@data2#@data3#@';
$count = preg_match_all('/\#\@([\w\d]+?)(?=\#\@)/',$str,$results);
var_dump($results);
?>
Produces :
array(2) {
[0]=>
array(3) {
[0]=>
string(7) "#@data1"
[1]=>
string(7) "#@data2"
[2]=>
string(7) "#@data3"
}
[1]=>
array(3) {
[0]=>
string(5) "data1"
[1]=>
string(5) "data2"
[2]=>
string(5) "data3"
}
}
Best regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS
----- Original Message -----
From: "Joeri Vankelst" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 27, 2001 11:27 AM
Subject: [PHP] Extracting data
> Hi,
>
> I'm looking for a way to extract data from a single variable.
> I'll explain:
>
> The variable contains somthing that look like: #@data1#@data2#@data3
> What I would like to do is check the data between the #@'s so I can compare
> data1, 2 and 3 with a another variable. The next this I would like to be
> able to do is count the #@'s so I can seen how many items there are in the
> variable.
>
> Any help would be greatly appreciated!
>
> Joeri Vankelst
>
>
>
> --
> 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]
>
>
--- End Message ---
--- Begin Message ---
Hi,
As far as I understand "header("Location: next-page.php");" only works on
Apache. What can you do to redirect if you do not have Apache?
Tx
MH
--- End Message ---
--- Begin Message ---
Hi. This is HTML:
<meta http-equiv='Refresh' Content='2; URL=foo.html'>
Content=x in seconds
bye
On Tue, 27 Nov 2001, MindHunter wrote:
> Hi,
>
> As far as I understand "header("Location: next-page.php");" only works on
> Apache. What can you do to redirect if you do not have Apache?
>
> Tx
> MH
>
>
>
> --
> 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]
>
>
>
--- End Message ---
--- Begin Message ---
Hi,
how can i set an error handling function in a class?
i have tried set_error_handler('myclass->myErrorHandler');
but it doesnt work.
Any help?
Regards,
Holger
--- End Message ---
--- Begin Message ---
Hi all
How can i get client IP address
thanks,
Narko
--- End Message ---
--- Begin Message ---
$REMOTE_ADDR
PHP Manual, Predefined variables
On Tue, 27 Nov 2001, narko wrote:
> Hi all
>
> How can i get client IP address
>
> thanks,
> Narko
--- End Message ---
--- Begin Message ---
Hello!
This is my first post, so bare with me. I'm trying to use PHP together with
some XML files to create an array of elements and values. This, looking at
the examples seemed fairly reasonable.
After recompiling Apache/PHP using --with-xml everything seems fine. I am
using Solaris 2.6, Apache 1.3.12 and PHP 4.0.4 and I gather PHP will use
Expat from this version of Apache, All fine!
Now when I run any script that uses the XML parser (My script and any
example ones) I seem to get a segmentation error in the Apache error log. A
bit of the error log is shown below:
[Tue Nov 27 10:10:26 2001] [notice] child pid 5757 exit signal Segmentation
Fault (11)
[Tue Nov 27 10:10:26 2001] [notice] child pid 5778 exit signal Segmentation
Fault (11)
[Tue Nov 27 10:12:47 2001] [notice] child pid 5780 exit signal Segmentation
Fault (11)
[Tue Nov 27 10:13:56 2001] [notice] child pid 5755 exit signal Segmentation
Fault (11)
Now, to be honest I havn't got a clue 'Segmentation Fault' is, so I can't
really work out how to fix this problem.
Has anybody got any ideas???
Thanks for your help!
Chris....
--- End Message ---
--- Begin Message ---
On Monday 26 November 2001 23:37, Christopher William Wesley wrote:
> On Mon, 26 Nov 2001, Greg Sidelinger wrote:
> > Can someone tell me how to store a class in a session var. I
> > want to
>
> There are several things you need to do.
>
> 1) include the class definition before you do anything
> 2) start the session shortly thereafter
> 3) register a session variable
> 4) create your object
> 5) serialize your object
> 6) store the serialized object (now a string) in your registered
> session variable
Doesn't php take care of the last 2 already?
As I know you don't have to serialize manually, php will do it, you
just have to make sure that the class's definition is loaded before
session_start is used.
Arpi
--- End Message ---
--- Begin Message ---
As a Newbe to PHP, I need to print reports. I'd like to stay away from
PDF but will use it if necessary.
In general, what seems to be the best way to print reports??????
It would be nice when they ask for a report it would brint in the report
window that allows them to select the printer, number of copies, print
quality etc.
Thanks for your help...
Dan.
--- End Message ---
--- Begin Message ---
what type of reports ???
if you really want to print it using a common printer i suggest that you
go for PDF...
if your type of reports are server log reports you can use GD or ImageMagick
and display it using HTML
cheers,
Valter Santos
----- Original Message -----
From: "Dan Koken" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 27, 2001 11:00 AM
Subject: [PHP] Printing Reports
> As a Newbe to PHP, I need to print reports. I'd like to stay away from
> PDF but will use it if necessary.
>
> In general, what seems to be the best way to print reports??????
>
> It would be nice when they ask for a report it would brint in the report
> window that allows them to select the printer, number of copies, print
> quality etc.
>
> Thanks for your help...
> Dan.
>
>
> --
> 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]
>
>
--- End Message ---
--- Begin Message ---
>As a Newbe to PHP, I need to print reports. I'd like to stay away from PDF
>but will use it if necessary.
This really is becoming a faq. A search will come up with more information.
Short anwer:
You could write the report to the browser, use a new window if you have to.
PHP=serverside and cannot print on your local printer..
I think you could create a javascript to handle the printing..
If it's from a local source like a MySQL database you could use a report
generator --> seach the web.. they do exist.. www.google.com will be a good
point to start.
Bye,
B.
--- End Message ---
--- Begin Message ---
On Tue, 27 Nov 2001, Dan Koken wrote:
> As a Newbe to PHP, I need to print reports.
One way to do it, I think is use XML/XSL. I have never done it before
though (I use PDF's myself, but would like to get away from it).. Could
anyone with some real-world experience with this elaborate, please?
--
Alexander Deruwe ([EMAIL PROTECTED])
AQS-CarControl
--- End Message ---
--- Begin Message ---
What kind of reports? Your question is so general it can't be answered
except by saying ...
Send the report, to a new browser window if you wish, and then use the
browser's controls to print the sucker.Why re-invent what already exists?
Miles Thompson
At 03:00 AM 11/27/2001 -0800, Dan Koken wrote:
>As a Newbe to PHP, I need to print reports. I'd like to stay away from PDF
>but will use it if necessary.
>
>In general, what seems to be the best way to print reports??????
>
>It would be nice when they ask for a report it would brint in the report
>window that allows them to select the printer, number of copies, print
>quality etc.
>
>Thanks for your help...
>Dan.
>
>
>--
>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]
--- End Message ---
--- Begin Message ---
There are so many reports.
The system I have is a manufacturing system, and currently contains some
400 programs.
Some examples of reports are:
Bill of Lading with bar codes
Production reports
Management and analysis
Labels for lab analysis with bar codes
Planning reports
Quality assurance
Preventative maintenance work orders
Warehouse Planning
Billing
And others
Some of these are reports long, but I guess most are less than 20 pages.
Most of the sites that use the system are small and usually have from
200 to 500 terminals and have systems that manage multiple printers. So
they would like to direct the printed output.
Like just about everyone, I'd like them to use more interactive stuff on
the system. But users want their reports...
HTH.
Thanks again for the help.
--- End Message ---
--- Begin Message ---
I do this a lot. If you want to use just the browser and server abilities
without introducing the complexities of PDF/XML/XSLT and such, it is not too
hard. I have done PDF, Standard Text and HTML to the browser and I have
printed directly to a printer from the server using PHP.
First, is the site a Corporate intranet where the server knows about all of
the shared printers connected to the network? Or, is the site accessed over
the internet? If it's a Corporate intranet then you can create reports and
submit them to the appropriate spooler. On Unix this is easy. I'm not sure
about Windows. You can gather a list of available printers and create a
little form that allows the user to select which printer to send the report
to.
If the site is over the internet then create the report in a separate window
that is divided into two frames. The top frame will consist of close and
print buttons. The second will contain the report and a JavaScript function
that performs the printing. The print button in the top frame, when pushed,
will execute the print function in the bottom frame.
The print function sets focus on the report and then executes this.print().
The print dialogue box will automatically pop up and the user can select
their own printer along with number of copies, etc. If you use HTML you can
even set page breaks (in IE5 anyway).
Have fun,
Dean
-----Original Message-----
From: Dan Koken [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 27, 2001 5:00 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Printing Reports
As a Newbe to PHP, I need to print reports. I'd like to stay away from
PDF but will use it if necessary.
In general, what seems to be the best way to print reports??????
It would be nice when they ask for a report it would brint in the report
window that allows them to select the printer, number of copies, print
quality etc.
Thanks for your help...
Dan.
--
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]
--- End Message ---
--- Begin Message ---
So, is this a system that's being moved from workstations, a desktop
interface, to a web-based interface?
Do you want a web interface to select printers?
Do you want tight formatting control over the report? There are big
differences between a 20 pg mfg report, a bill of lading with bar code, and
label for lab analysis. We're spoiled by all the top quality report
generators out there, which work on the desktop.
Or, using the lab analysis example, would it work like this:
User brings up the page
Fills in the form
Presses "Submit" and the request gets written to the database.
Confirmation comes back, displaying the submitted information with:
1. list of available printers
2. field for # of copies
3. Submit button.
Here's the guess ...
Click on submit, and the script makes an exec() calling the appropriate
function in the application to print the report on a given printer with the
selected set of parameters. Or bypasses the application altogether to have
the report writer do the same thing.
What about checking MSFT's BizTalk stuff? There may be some XML stuff there
which does that?
Regards - Miles Thompson
At 06:04 AM 11/27/2001 -0800, Dan Koken wrote:
>There are so many reports.
>The system I have is a manufacturing system, and currently contains some
>400 programs.
>Some examples of reports are:
> Bill of Lading with bar codes
> Production reports
> Management and analysis
> Labels for lab analysis with bar codes
> Planning reports
> Quality assurance
> Preventative maintenance work orders
> Warehouse Planning
> Billing
> And others
>
>Some of these are reports long, but I guess most are less than 20 pages.
>
>Most of the sites that use the system are small and usually have from 200
>to 500 terminals and have systems that manage multiple printers. So they
>would like to direct the printed output.
>
>Like just about everyone, I'd like them to use more interactive stuff on
>the system. But users want their reports...
>
>HTH.
>Thanks again for the 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]
--- End Message ---
--- Begin Message ---
Thanks Dean;
I like your idea a lot.
They happen to be internet.
If you have example code on your solution it would save me some time.
Thanks again...
I'm gonna try it.
Dan...
>
>
--- End Message ---
--- Begin Message ---
Well I guess it's like most applications. Every print job has it's own
special requirements.
For example the lab analysis report. When the manufacturing process
starts on a liquid process, they request certain samples. Samples
consist of lab analysis they should take and how often they should take
a sample. Most samples consist of about 10 to 12 analysis and are
usually taken every 20 minutes to 1/2 hr. A process may last a couple
days. So if they take a sample every 1/2 hour for 2 days that's 96
samples at 10 analysis each or around 1000 lab analysis. So the system
will print 96 labels with 10 bar coded analysis on it. The labels are
sent to the operations area. As they take a sample they affix a label to
the bottle and send it to the lab. The lab does the analysis, enters the
result and wands the proper analysis bar code on the bottle. The bottle
then goes to the next lab analysis area. Most lab work is automated and
a dry lab such as gas chromatography and automatic absorption units. The
bottle enters a conveyor, the analysis is done and the bar code scanned
as it passes the scan area. The data is then sent automatically with the
bar code information to the system. Since the bar code scanner can't
know exactly what bar code to read a bar code to the bar code is also on
the sample.
This report is not as complicated as most, but it may help give you some
idea of what is needed.
Some reports need fairly exact font and line control and others are just
text files.
Thanks again for all the help..
Dan
--- End Message ---
--- Begin Message ---
Hi,
i have test.php:
<?
echo "test";
?>
to call this in the html, i use
<SCRIPT LANGUAGE="Javascript" SRC="test.php"></script>
this works fine for IE, but is there an alternative for Netscape to do this?
Tnx,
Bas
--- End Message ---
--- Begin Message ---
> i have test.php:
> <?
> echo "test";
> ?>
>
> to call this in the html, i use
> <SCRIPT LANGUAGE="Javascript" SRC="test.php"></script>
>
> this works fine for IE, but is there an alternative for Netscape to do
this?
PHP is a server side programming language and it does not execute in the
browser.
What you are doing here is including php code fragment and telling the
broswer it is Javascript.
IE is forgiving about "<%" and ignores it, but Netscape throws a Javascript
error (as it should).
Once again, PHP is executed on the server side.
http://www.php.net
Roko
--- End Message ---
--- Begin Message ---
I don't get what you are trying to do. Does test.php contain JavaScript
that you are trying to execute? If so, then test.php should be called
test.js, and should look something like this:
function (blah) {
var foo = blah;
document.write(foo);
}
If test.php is a PHP document that you're trying to execute, then your main
document should look like this:
<?
include("test.php");
?>
...and it should be called something like myDocument.php.
The problem is that PHP is a server-side language and you're trying to
force it to execute like a browser-side language. It won't work.
<?rant
IE is far too forgiving of the inclusion of bad code, which is why I never
recommend that it be used for testing purposes -- in my experience,
developers who develop for IE or who test on IE universally create bad
code, because IE just lets it happen. Use Netscape for testing your pages;
if it works in Netscape, it will work in IE and Opera and Mozilla, etc. If
it works in IE, it may or may not work in other browsers.
?>
At 03:36 AM 11/27/2001, Bas Jobsen wrote:
>Hi,
>
>i have test.php:
><?
>echo "test";
>?>
>
>to call this in the html, i use
><SCRIPT LANGUAGE="Javascript" SRC="test.php"></script>
>
>this works fine for IE, but is there an alternative for Netscape to do this?
>
>Tnx,
>
>Bas
>
>--
>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]
Sliante,
Richard S. Crawford
http://www.mossroot.com
AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford
MSN: [EMAIL PROTECTED]
"It is only with the heart that we see rightly; what is essential is
invisible to the eye." --Antoine de Saint Exupéry
"Push the button, Max!"
--- End Message ---
--- Begin Message ---
Hi everybody,
I sent this to the php.windows-group but got no answer, so I'll try again
here :-)
Since I'm not used to working under Windows-OSes (never really knew why,
now I do..) it took me a while to get moving. I put together a small
project but now I'm really stuck. Not even reading the entire internet
(well most of it anyway) did help. So maybe someone can give this a short
look:
I need to transfer a file via net to some remote server.
I need to encrypt, since I could not find a way to use something like sftp
under WinNT / php I tried pscp (PuTTY Packet). Now this works fine when
started manually, even when embedde in a php-script it works when I execute
this script directly, however it does NOT work when I call the script via
cgi-bin from Apache. I tried all those strange things with prepending
something like "command /c" etc, nothing worked. In fact the pscp
executable IS called it just vanishes in nirvana. No error, no output, no
filetransfer.
In Compact:
- WinNT & Apache 1.3.something & php4.06 as cgi-exe
- Dir-Structure:
C-somepath-Apache-htdocs-somepath-scp-scp.php
-PHP-php.exe
-Tools-PuTTY-pscp.exe
- a short php-script:
---
<?PHP
# blabla... :-)
echo "<html><head><title>scp test</title></head>\n";
echo "<body>\n";
$pscp="C:/somepath/Tools/Putty/pscp";
$user="some_user";
$host="some_host";
$pass="some_pass";
$target_path="Deliver";
$target_file="targetfile";
$source_path="C:/somepath/Tools/PuTTY";
$source_file="sourcefile";
$connect_string=sprintf("%s -v -pw %s %s %s@%s:%s", $pscp, $pass,
sprintf("%s/%s", $source_path, $source_file),
$user, $host,
sprintf("%s/%s", $target_path, $target_file) );
$ret_arr=array();
echo 'exec($connect_string, $ret_arr, $ret_var); <br>'."\n";
echo "exec($connect_string, $ret_arr, $ret_var); <br>"."\n";
$res_var=exec($connect_string, $ret_arr, $ret_var);
echo "results --<br>\n";
echo "res_var: ".$res_var."<br>\n";
echo "ret_var: ".$ret_var."<br>\n";
echo "ret_arr: ".$ret_arr."<br>\n";
foreach ($ret_arr as $value)
echo "> ".$value."<br>\n";
echo "</body>\n";
echo "</html>\n";
?>
---
OK, it does not matter if I use exec, system, passthru or whatever, the
effect is the same: pscp is called, works for some seconds, the server is
not contacted (checked logs), the browser stops ("loaded") with the result:
---
exec($connect_string, $ret_arr, $ret_var);
exec(C:/somepath/Tools/Putty/pscp -v -pw some_pass \
C:/somepath/Tools/PuTTY/sourcefile \
some_user@some_host:Deliver/targetfile, Array, );
results --
res_var:
ret_var: 0
ret_arr: Array
---
So far so good (depends actually).
Now, there are two strange things:
a) when executing another command (I tried 'tar xvzf somefile.tgz', yes,
under WinNT) - no problem. takes a few seconds, returns a list of all
extracted files in $ret_arr. Same with things like "dir" etc.
b) when calling scp.php directly it does work:
C:> somepath\PHP\php C:\...\scp.php
the source is copied to target, the result shows the verbosity-messages
like 'login...authenticated...session...copying...'. Everything is fine.
Hmmm:
The tar-test shows that the arguments are ok when handed to the executable
(even checked via a batch-file echoing the args). The direct call shows
that pscp works and can be used from inside php.
So where is the difference when apache calls php via cgi?
Ok folks, I'll be glad for any hints or suggestions since being a little
under pressure to get this working and I really got no clue where else to
look :-(
Any Ideas anybody???
Anyone wants a cookie???
Thanks in advance,
Christian
--
Christian Reiner
Entwicklung & Projekt Management
------------------------------------------------------------------------
ImageWare Components GmbH
Berliner Freiheit 36, D - 53111 Bonn - Germany
Tel: +49 - 228 - 969 85 - 37
Fax: +49 - 228 - 969 85 - 84
E-Mail: [EMAIL PROTECTED]
Web: www.imageware.de
------------------------------------------------------------------------
ImageWare Components GmbH ist ein Beteiligungsunternehmen
der T-Venture, die Corporate Venture Capital Tochter der
Deutschen Telekom AG und der Bonn-Innova GmbH & Co.KG
Interessiert an weiteren Neuigkeiten?
Klicken Sie sich durch unsere neue Homepage unter www.imageware.de
--- End Message ---
--- Begin Message ---
Hi all,
How can i start using templates?
Thanks,
Narko
--- End Message ---
--- Begin Message ---
First choose one from the amount of the avaible packages for templates:
1)PHPLIB templates
2)Class FastTemplate
3)Smarty Templates(written by two, one of the from Zend)
4)Write your own
Regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS
----- Original Message -----
From: "narko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 27, 2001 2:46 PM
Subject: [PHP] How can i start using templates
> Hi all,
>
> How can i start using templates?
>
> Thanks,
> Narko
>
>
>
> --
> 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]
>
>
--- End Message ---
--- Begin Message ---
On Tue, 27 Nov 2001, narko wrote:
> How can i start using templates?
PHPLib or Smarty come to mind. Search Google.
--
Alexander Deruwe ([EMAIL PROTECTED])
AQS-CarControl
--- End Message ---
--- Begin Message ---
<<< multipart/related; type="multipart/alternative"; boundary="====_ABC1234567890DEF_====": Unrecognized >>>
--- End Message ---
--- Begin Message ---
Hi
I think if you want the user to type in a number, rather use a textbox, not a checkbox
;-))
Then call the textbox "phone" in the form you want the user to fill in, and when
submitted, the variable $phone will contain the number he typed in.
Then use:
$prefix = substr($phone, 0, 3);
if (($prefix == "072") || ($prefix == "082")) {
mail("$[EMAIL PROTECTED]", $subject, $message,
"From: $from_address\nReply-To: $to_address\nX-Mailer: PHP/" . phpversion());
}
else if (($prefix == "073") || ($prefix == "083")) {
mail("$[EMAIL PROTECTED]", $subject, $message,
"From: $from_address\nReply-To: $to_address\nX-Mailer: PHP/" . phpversion());
}
else if ($prefix == "084") {
mail("$cellnum@cellc's address", $subject, $message,
"From: $from_address\nReply-To: $to_address\nX-Mailer: PHP/" . phpversion());
}
Regards
Yoan Bosch
eStart Computer Services cc
http://www.estart-online.co.za
-----Original Message-----
From: Rudi Ahlers [mailto:[EMAIL PROTECTED]]
Sent: 26 November 2001 14:04
To: PHP General
Subject: [PHP] changing a variable according to the input in a checkbox
How would I be able to change a variable from the input in a checkbox? I
need to write an sms script, that would be able to sms to three different
providers, and I only want the use to type in the phone number. Thus, if he
types in 083xxxxxxxxxx, it should goto provider 1, if he types in
082xxxxxxxxxx, it should goto provider 2, and if he types in 084xxxxxxxxxx,
it should goto provider 3. I have a simple mail script, with $phone for the
phone number variable, and this is the one that needs to change.
Rudi Ahlers
UNIX Specialist and Web Developer
Bonzai Web Design - http://www.bonzai.org.za
Cell: 082 926 1689
--
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]
--- End Message ---
--- Begin Message ---
Does anybody know how to call ldap_set_option in order to use server side
sorting?
using:
$sortval="{'cn', 0,1}";
$ctrl1 = array("oid" => "1.2.840.113556.1.4.473", "value" =>$sortval);
ldap_set_option($ds, LDAP_OPT_SERVER_CONTROLS, array($ctrl1));
reports success, but ldap_get_option() returns nothing and a subsequend
ldap_search
returns protocol error. I use LDAP V3 (iPlanet).
Thanks
Christos Sintoris
--- End Message ---
--- Begin Message ---
I'm not sure if the ereg supports the inline greedy modifier like:
.+? or .*?
so:
ereg("<\?php.*?\?\>", $html, $phpIncludes);
if not use preg_match() instead...
"Christoph Starkmann" <[EMAIL PROTECTED]> wrote in message
B120D7EC8868D411A63D0050040EDA771118F3@XCHANGE">news:B120D7EC8868D411A63D0050040EDA771118F3@XCHANGE...
> As far as I can say, a simple ereg-command is always greedy, isn't it?
> Can you tell me how to switch greedy off?
>
> I want to find everything between the start- and end-php-tags:
>
> $phpIncludes = array();
> ereg("<\?php.*\?\>", $html, $phpIncludes);
>
> where $html contains the entire page, containing one php-script-section
> at the very top and one at the very botton, and maybe some inbetween.
>
> Now the above ereg always returns me the entire site in $phpIncludes[0];
>
> All help is appreciated, thanx a lot,
>
> cheers,
>
> Kiko
>
> -----
> It's not a bug, it's a feature.
> christoph starkmann
> mailto:[EMAIL PROTECTED]
> http://www.fh-augsburg.de/~kiko
> ICQ: 100601600
> -----
--- End Message ---
--- Begin Message ---
Thanks, assert() is cool, but it still reports the filename and line
number of the included file with the function in which the error
occurred, not the script that called the functon with illegal arguments.
Or...???
Eg.:
index.php:
<?
include_once("functions.php");
// foo() is declared here
foo(123);
// illegal argument
?>
This will produce a message saying an error occurred in functions.php,
but I want it to tell me that the error occurred in index.php, line 3.
Because if I call foo() many times in a script, it is difficult to find
out which call that failed.
Is this impossible?
Papp Gyozo wrote:
> try, assert() instead of echo()ing error messages.
>
> assert('is_object($obj)');
>
> and write your error handler code or use mine :)
> or am i missing something?
>
> Papp Gyozo
> - [EMAIL PROTECTED]
>
> ----- Original Message -----
> From: "SafeV" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, November 22, 2001 4:15 PM
> Subject: [PHP] error handling and __LINE__
>
>
> | Hi,
> | I wonder if there's a way to find the line number of the calling script
> | from a function, like the error messages PHP generates. An example:
> |
> | In an included file I have a function and want to do something similar to:
> |
> | function foo($obj) {
> | if (!is_object($obj)) {
> | echo "Error: supplied argument is not an object in ";
> | echo __FILE__ . " line " . __LINE__;
> | }
> | ...
> | }
> |
> | But __FILE__ and __LINE__ refers to the current file, ie. the file with
> | the function in, and not the file where the function is called from.
> | The first one I can solve by using $SCRIPT_NAME, but what about the line
> | number???
> |
> |
> |
> | --
> | 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]
> |
>
--- End Message ---
--- Begin Message ---
| Thanks, assert() is cool, but it still reports the filename and line
| number of the included file with the function in which the error
| occurred, not the script that called the functon with illegal arguments.
| Or...???
I see, you need a debugger :)
I wrote an errorhandler class with error trapping capability.
It works as follows:
--index.php
<?php
$error = new ErrorHandler;
include_once('functions.php');
$error->set_error_trap(E_ALL); // switch error trapping _on_ !
foo(123); // illegal parameter to be passed
if ( $error->is_trapped(E_WARNING) ) {
$this->set_error_trap(); // switch error trapping _off_ !!
// following errors will be handled normally
trigger_error('The place where foo() fails.', E_USER_ERROR);
}
?>
if you run this script, then though foo() raises a warning which
won't be displayed but stored in $error (error handling object)
and later you can "search" in the trap ( with is_trapped() ) to
determine whether a particular error occured while the trap was
switched on.
Does it satisfy you or not? If yes, please mail me directly.
|
| Eg.:
| index.php:
| <?
| include_once("functions.php");
| // foo() is declared here
| foo(123);
| // illegal argument
| ?>
|
| This will produce a message saying an error occurred in functions.php,
| but I want it to tell me that the error occurred in index.php, line 3.
| Because if I call foo() many times in a script, it is difficult to find
| out which call that failed.
|
| Is this impossible?
|
| Papp Gyozo wrote:
|
| > try, assert() instead of echo()ing error messages.
| >
| > assert('is_object($obj)');
| >
| > and write your error handler code or use mine :)
| > or am i missing something?
| >
| > Papp Gyozo
| > - [EMAIL PROTECTED]
| >
| > ----- Original Message -----
| > From: "SafeV" <[EMAIL PROTECTED]>
| > To: <[EMAIL PROTECTED]>
| > Sent: Thursday, November 22, 2001 4:15 PM
| > Subject: [PHP] error handling and __LINE__
| >
| >
| > | Hi,
| > | I wonder if there's a way to find the line number of the calling script
| > | from a function, like the error messages PHP generates. An example:
| > |
| > | In an included file I have a function and want to do something similar to:
| > |
| > | function foo($obj) {
| > | if (!is_object($obj)) {
| > | echo "Error: supplied argument is not an object in ";
| > | echo __FILE__ . " line " . __LINE__;
| > | }
| > | ...
| > | }
| > |
| > | But __FILE__ and __LINE__ refers to the current file, ie. the file with
| > | the function in, and not the file where the function is called from.
| > | The first one I can solve by using $SCRIPT_NAME, but what about the line
| > | number???
| > |
| > |
| > |
| > | --
| > | 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]
|
--- End Message ---
--- Begin Message ---
> $filename = 'kunden/'.$name.'.png';
I see this all the time and I'm curious: what takes more
computing power (granted, either would be incredibly little
I'm sure, just curious which requires more work by PHP)?
this:
$filename = "this " . $varname . " that";
or this:
$filename = "this $varname that";
I would think the latter example but am not sure.
Another question, but this is more about personal style:
I almost always use the latter method in my coding practices. It
looks cleaner and, IMO, is easier to follow especially when there
are a number of variables involved. For those that use the former
method, why do you? I'm not trying to be judgemental, just curious
why people do what they do. In asking, I may actually learn some-
thing. :p
Chris
--- End Message ---
--- Begin Message ---
I use the latter style, because otherwise my syntax highlighting doesn't
kick in.
$filename = "this $varname that"; # $filename is in blue, the
rest is in green
$filename = "this". $varname. "that"; # $filename and $varname are in
blue, the rest is in green
I've done it so much now it's burned into a finger macro, takes 0.000001
seconds longer to type (approx)
Cheers
Jon
-----Original Message-----
From: Boget, Chris [mailto:[EMAIL PROTECTED]]
Sent: 27 November 2001 15:29
To: [EMAIL PROTECTED]; '[EMAIL PROTECTED]'
Subject: [PHP] Coding methods (was RE: [PHP-DB] gzip image files)
> $filename = 'kunden/'.$name.'.png';
I see this all the time and I'm curious: what takes more
computing power (granted, either would be incredibly little
I'm sure, just curious which requires more work by PHP)?
this:
$filename = "this " . $varname . " that";
or this:
$filename = "this $varname that";
I would think the latter example but am not sure.
Another question, but this is more about personal style:
I almost always use the latter method in my coding practices. It
looks cleaner and, IMO, is easier to follow especially when there
are a number of variables involved. For those that use the former
method, why do you? I'm not trying to be judgemental, just curious
why people do what they do. In asking, I may actually learn some-
thing. :p
Chris
**********************************************************************
'The information included in this Email is of a confidential nature and is
intended only for the addressee. If you are not the intended addressee,
any disclosure, copying or distribution by you is prohibited and may be
unlawful. Disclosure to any party other than the addressee, whether
inadvertent or otherwise is not intended to waive privilege or confidentiality'
**********************************************************************
--- End Message ---
--- Begin Message ---
Hi all,
I've stored on a db using blob fields, the content of some image file.
Ayones know how to write on these image on fly w/o using the filesystem? I
mean:
<?
$sql="SELECT file_img FROM ..";
....
while($val=mysql_fetch_row($select)){
header("Content-type: image/jpeg");
$img=$val[0];
//here I need to write on this $img ... but How can I do?
...
?>
many thanks in advance
max
--- End Message ---
--- Begin Message ---
Hello,
I have an application wich I maintained on my servers (PHP, Apache, MySQL).
I have a client that is already using the application trought a secure link
directly from his web site.
But he would like to have my application update a database directly on his
server (Oracle) in order
to protect the statistical data collected trought the application, wich is a
lot...
I see no problem to open a connection to update his Oracle database on his
server. I use phplib
so it would not be a major modification. But some questions remains:
- Opening a connection directly to his oracle database is not really more
secure in any way. (If I get hacked, he get's hacked...)
- It seems to me a false security since the data are manipulated by the PHP
engine on my server anyway...
- Creating a database (in order to replicate mine) would tell him a lot
about how I do my stuff... (but I do not really care tho)
My solution was to provide all statistical data to him with a secure (SSL)
link and give him everything
in XML so he could update his database just the way he want's it.
What do you think? What sould I tell him? I really need advice since this is
a field unknown to me...
py
p.s. I do not really know where to post a question like this one wich is not
really related to PHP directly... Sorry...
--- End Message ---
--- Begin Message ---
Just recently I've noticed an issue with setcookie. My scripts which normall
ran :
setcookie ("myCookie","Blah","time()+7201");
Are killing the cookie immediately after you close the browser window, or
access another https:// site. It appears as though the life of the cookie is
actually not being set, and is based entirely around the life of the browser
window which it was originally called.
if you leave the window open, and attempt at access the cookie from another
window, the cookie does not exist.
IDEAS? PHP GODS? :)
--- End Message ---
--- Begin Message ---
Hi Kris
Thats because you've wrapped the time() call and the addition inside a pair
of doublequotes.
Remove those and it'll work fine...
Regards
--
Shane
On Saturday 29 Dec 2001 6:35 pm, Kris Wilkinson wrote:
> Just recently I've noticed an issue with setcookie. My scripts which
> normall ran :
>
> setcookie ("myCookie","Blah","time()+7201");
>
> Are killing the cookie immediately after you close the browser window, or
> access another https:// site. It appears as though the life of the cookie
> is actually not being set, and is based entirely around the life of the
> browser window which it was originally called.
>
> if you leave the window open, and attempt at access the cookie from another
> window, the cookie does not exist.
>
> IDEAS? PHP GODS? :)
--- End Message ---
--- Begin Message ---
Oh yeah, about the lifetime of the cookie - with no valid expiry time it is
created as a session cookie - which is supposed to only live as long as the
browser does.
[opening a new independent browser window does not share the session, but
window.open() calls do, as do other 'browser created from browser with
session' methods, if that makes any sense, <grin>]
--
Shane
On Saturday 29 Dec 2001 6:35 pm, Kris Wilkinson wrote:
> Just recently I've noticed an issue with setcookie. My scripts which
> normall ran :
>
> setcookie ("myCookie","Blah","time()+7201");
>
> Are killing the cookie immediately after you close the browser window, or
> access another https:// site. It appears as though the life of the cookie
> is actually not being set, and is based entirely around the life of the
> browser window which it was originally called.
>
> if you leave the window open, and attempt at access the cookie from another
> window, the cookie does not exist.
>
> IDEAS? PHP GODS? :)
--- End Message ---
--- Begin Message ---
Speaking of cookies, is there a way using session control
to modify the expiration date of a cookie? I would like to add
a check box in a login dialog that says "remember me"
Thanks
Urb
--- End Message ---
--- Begin Message ---
Hi Urb
Can you not just set the cookie again [using the updated expiry date].
If I remember correctly, this should work..
--
Shane
On Tuesday 27 Nov 2001 5:45 pm, Urb LeJeune wrote:
> Speaking of cookies, is there a way using session control
> to modify the expiration date of a cookie? I would like to add
> a check box in a login dialog that says "remember me"
>
> Thanks
>
> Urb
--- End Message ---
--- Begin Message ---
I am using Foxserv v2.0 beta 3...... anybody can tell me how to install PEAR?
--- End Message ---