[PHP] PHP to EJB (Sybase EP, Jaguar engine)

2001-08-19 Thread Alain Fontaine

Hello,

I'm looking for ressources, links, articles, or contacts regarding the above
subject, namely interfacing PHP to an EJB, particularly Sybase Enterprise
Portal (formerly known as Jaguar).

Thanks for any input, I appreciate 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] Exception handling

2001-02-15 Thread Alain Fontaine

Hello,

Is it impolite to ask about when approximately PHP will support Exception
handling ? :)

Thanks !



-- 
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] simple config. question

2001-02-05 Thread Alain Fontaine

Christian,

Wouldn't this put unnecessary load on the webserver? Every .htm and .html
document, even if it doesn't contain any line of PHP code, would go through
the parser... ?

"Christian Reiniger" [EMAIL PROTECTED] a écrit dans le message news:
[EMAIL PROTECTED]
On Monday 05 February 2001 20:14, Shane McBride wrote:
 Unless I am mistaken, I am pretty sure you need to have sometype of
 .php extension. Unless you could put a line in the httpd.conf file
 like: AddType application/x-httpd-php .html

Well, that's exactly the right way :)

Perhaps a more "generous" setup would be even better though:

AddType application/x-httpd-php .html .htm .php3 .php .phtml

--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

(A)bort (R)etry (P)retend this never happened ...

--
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] HTTP compression

2001-02-04 Thread Alain Fontaine

Hi,

I've just started experimenting with ob_start("ob_gzhandler") a bit, and I
have found that if any output is generated before ob_start() is called,
nothing at all gets compressed; if ob_start() is called before any output,
everything is compressed.

Is this the case, I mean, is this "by design" ?



-- 
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] HTTP compression

2001-02-04 Thread Alain Fontaine

Rasmus,

Thanks for the clarification; it seems obvious, too, that mixing compressed
and non compressed content would be quite difficult to implement; at least
it would partially compromise the speed/size gain because of added protocol
overhead.

Now, imagining that we have enabled compression by calling
ob_start("ob_gzhandler"), what happens for a document that contains
something along these lines:

!-- snip --
...
?
// Enable HTTP compression
ob_start("ob_gzhandler");

// PHP content
$content = "This is some content.";
?

divThis is a normal HTML section/div

?
// PHP content continues
$content .= "And the rest of it.";
echo $content;
?
...
!-- snip --

In this particular case, what would be compressed ? As far as I have
understood, nothing at all, because some part of the output is not "passing
through" PHP, right ?

 -Message d'origine-
 De : Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Envoye : dimanche 4 fevrier 2001 14:34
 A : Alain Fontaine
 Cc : [EMAIL PROTECTED]
 Objet : Re: [PHP] HTTP compression


  I've just started experimenting with ob_start("ob_gzhandler") a
 bit, and I
  have found that if any output is generated before ob_start() is called,
  nothing at all gets compressed; if ob_start() is called before
 any output,
  everything is compressed.
 
  Is this the case, I mean, is this "by design" ?

 Yes, it wouldn't really work any other way.  You can't mix non-compressed
 and compressed in the same request.

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




RE: [PHP] HTTP compression

2001-02-04 Thread Alain Fontaine

Teodor,


Looked at it from that point of view, the question was pretty stupid ! ;)

 -Message d'origine-
 De : Teodor Cimpoesu [mailto:[EMAIL PROTECTED]]
 Envoye : dimanche 4 fevrier 2001 19:09
 A : Alain Fontaine
 Cc : Sean Cazzell; [EMAIL PROTECTED]
 Objet : Re: [PHP] HTTP compression
 
 
 
 
 Alain Fontaine wrote:
  
  Sean,
  
  Thanks, I see. How about headers ? Do they need to be 
 compressed, too; in
  other words, do headers "belong" to the output ?
 
 a HTTP response is made of response header(s) and the response body.
 Only the body
 is compressed, and this is signaled in the headers so the User Agent
 will know
 not to stare to a bunch of binary data :)
 
 -- teodor
 


-- 
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] db paging with MS Sql

2001-02-04 Thread Alain Fontaine

Scott,

As far as I know, MS SQL supports a syntax like this:

SELECT TOP 10 FROM table_name WHERE etc etc

However, I don't know how to make it start from a certain offset; I guess MS
SQL's documentation, especially the T-SQL doc, should help.

""Scott Parks"" [EMAIL PROTECTED] a écrit dans le message news:
00b601c08ed1$ef153f30$[EMAIL PROTECTED]
 Has anyone seen a good lession or code example on paging records from MS
Sql
 7?  Say I have 300 records and
 want to break them down to 10 per page using [previous | next ] and a list
 of page numbers at the bottom.

 tia


 --
 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] Future plans (4.1) ?

2001-02-03 Thread Alain Fontaine

Hi,

I think this kind of reflection particularly holds true when thinking about
OpenSource development, where a potentially unlimited number of developers
all work on the same project; developers from all over the world. Now, how
would you possibly try to impose a coding standard to several dozens of
people coming from different countries, having different backgrounds, etc
etc.

"Toby Butzon" [EMAIL PROTECTED] a écrit dans le message news:
[EMAIL PROTECTED]
   As for better OO.  I think many of the things people ask for, like
   visibility (public,private,protected) class properties, aren't
actually
   features that add functionality, but more just convenience features
   that could be implemented in user space.
 
  I disagree. Just as with strong typing (which I hope will be added to
  PHP5 (optional - see how it's planned for Perl6)), language-enforced OO
  visibility makes it possible that the *compiler* (interpreter)
  immediately catches a bug that could hide for ages otherwise.
  Errare humanum est - conventions can't prevent mistakes.
 

 This is something I've been waiting for, as well. Public, private, and
 protected are definately important features as far as I'm concerned.

 For instance: If a team develops a complex web application with PHP,
 being careful to use naming conventions and such to resolve
 public/private namespace conflicts, fine. But what happens when the team
 completes their job and their contract is up; maybe in a year the
 company who had the thing written wants to add some functionality, so
 they once again hire a team or maybe just one programmer. However, the
 programmer isn't so knowledgable about the system and before he knows it
 he's got all kinds of problems with using object data that SHOULD be
 protected (preceded by an _), but isn't.

 I know this may not sound important, but it is. On top of that, if it
 wasn't important, why would C/C++, Java, etc. all have it and stress
 that it should be used instead of making everything "public"?

 It's not a matter of preference; it's a matter of making classes truely
 abstract types (using member functions to manipulate special data) and
 not semi-abstract (you can use the functions or you can mess things up
 by not using them).

 Just my .02 -

 --Toby

 --
 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] Form's and oracle

2001-02-03 Thread Alain Fontaine

Hi,

I think it's one of the "magic_quotes" features that does this. One
possibility would be to turn it off, and be sure to escape your quotes by
transforming them into double-quotes before sending them to Oracle.

"Christoph Kempen" [EMAIL PROTECTED] a écrit dans le message news:
[EMAIL PROTECTED]
Hi,

I used to work with PHP/mysql.. But since a few weeks we have an oracle
server :-)

1 problem occured with the migration...

If some text is passed through a html-form all the qoutes have a slash in
fromt of them... This is not a problem with mysql, since mysql uses that
slash for inserting a qoute in the table. But in oracle this is not a slash,
but a qoute...

For example:

I¹ts a test php:I\¹ts a test

But oracle wants:   I¹¹ts a test

Is there a easy way for converting this. Otherwise I have to write a
function that filters them out :-(

Thanx,

Christoph Kempen




-- 
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] try - catch ?

2001-02-03 Thread Alain Fontaine

Hi,

Are there any plans on implementing something like Exception handling into
future versions of PHP? That would be great.



-- 
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] CGI vs PHP

2001-02-03 Thread Alain Fontaine

Do you know what PHP is? Your question sounds like "How does MS SQL Server
compare to a relational database".

Anyway, you can do almost everything with PHP, and that includes handling
flat files. No problem.

""phpLover"" [EMAIL PROTECTED] a écrit dans le message news:
95hl5r$1su$[EMAIL PROTECTED]
 Can anyone tell how good is PHP when compared to CGI in handling flat file
 database. Can we handle flat files on PHP?

 Thanks



 --
 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] passing parameters

2001-02-02 Thread Alain Fontaine

Rule #1:
Do not post your database credentials into newsgroups.
Rule #2:
See Rule #1



"Stinie Steinbach" [EMAIL PROTECTED] a écrit dans le message news:
[EMAIL PROTECTED]
 does anyone know what's wrong with this files?
 i want to pass the parameter $module_id from one file tot the next so
 that i can extract all records from my tables in the mysql database that
 have this parameter... the queries that i used are tested and are
 working correctly... at this moment i cant see waht i do wrong.. does
 anyone know an answer tot my problem? if you need tot know more about
 the result look at my url.. please help me

 http://stuwww.kub.nl/~s695645/TIAS/

 file test_blok_array.php3

 ? include("connect.php3") ?

 ?
 $result = mysql_query ("select m.module_id,m.module_nummer
from module m, leergang l where m.leergang_afkorting =
 l.leergang_afkorting
and m.leergang_afkorting = 'EDP16' order by m.module_nummer");
 while (list ($module_id,$module_nummer) = mysql_fetch_row ($result)) {

  echo "a href=\"test_list.php3?module_id=$module_id\" BLOK
 0$module_nummer | /a";
 }
 ?

 file test_list.php3

 ? include("test_blok_array.php3") ?

 table
 form action="_url_" method="post"

  table border=1
  tr
   thsubmodule/th
   thonderdeel/th
   thdocent/td
   thdatum/th
   thdagdeel/th
   thedit/th
   thdelete/th
  /tr

 ?php
 mysql_connect ("kubstu.kub.nl","s695645","BikHuis");
 mysql_select_db ("s695645");
 $result = mysql_query ("SELECT

u.module_id,u.submodule_nummer,u.submodule_naam,d.docent_naam,s.dagdeel,s.da
tum,u.submodule_id,u.submodule_id

FROM submodule u, sessie s, docent d, module m
WHERE u.module_id = '$module_id'
AND d.docent_nummer = s.docent_nummer
AND u.submodule_id = s.submodule_id
AND m.module_id = u.module_id
AND m.leergang_afkorting = 'EDP16'
ORDER BY s.datum, u.submodule_nummer");
 while (list ($module_id, $submodule_nummer, $submodule_naam,
 $docent_naam, $dagdeel, $datum, $submodule_id, $submodule_id) =
 mysql_fetch_row ($result)) {
 echo   " tr
  tdsmall$submodule_nummer/small/td
  tdsmall$submodule_naam/small/td
  tdsmall$docent_naam/small/td
  tdsmall$datum/small/td
  tdsmall$dagdeel/small/td
   tda href=\"edit.php3?submodule_id=$submodule_id\"small edit
 /small/a/td
  tda
 href=\"delete.php3?submodule_id=$submodule_id\"small delete
 /small/a/td
  /tr\n";
 }




-- 
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] Zend IDE

2001-02-02 Thread Alain Fontaine

Hi again,


I just checked the Sun "bugParade", and this is a known bug (for over three
releases now). Swing components don't get the correct keyboard layout; they
assume that the keyboard layout matches the locale setting, which is,
obviously, utter nonsense.

I guess this means that the Zend IDE is not useable by anyone who uses a
keyboard layout that is a bit "special", e.g.:

* Luxembourg: most of them use french locale, but swiss-french or german
keyboard layout
* Belgium: some use french locale, some use dutch locale, some with french
layout, some with american layout, even some with UK layout.
* etc.

"Java - write once, run anywhere". Shouldn't this rather be: "Java - be sure
to use an US keyboard!" ? ;)

 -Message d'origine-
 De : Andi Gutmans [mailto:[EMAIL PROTECTED]]
 Envoye : vendredi 2 fevrier 2001 12:08
 A : Alain Fontaine; [EMAIL PROTECTED]
 Objet : Re: [PHP] Zend IDE


 Alain,

 Have you tried changing your keyboard layout in the Windows Control-Panel
 to Swiss-French?
 As far as I know, Java uses your systems keyboard layout.

 Java will be supported by other vendors such as Sun  IBM on Windows so I
 wouldn't worry about it ;)
 And of course our aim is to support UNIX platforms such as Linux
 which also
 have Java support.

 Andi

 At 10:43 AM 2/2/2001 +0100, Alain Fontaine wrote:
 Hi,
 
 Does anyone know how I can 'tell' the Zend IDE to actually use
 Swiss-French
 keyboard layout instead of french? I know it's related to Java
 thinking as
 I'm living in Belgium, I must have a french keyboard layout.
 Yet, I don't,
 and I can't type correctly now :)
 
 Oh, by the way... Zend IDE for Windows is written in Java. Microsoft is
 dumping Java completely. Find the mistake.
 
 Thanks for helping me out.
 
 
 
 --
 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] Win2000 TCP/IP failure

2001-02-02 Thread Alain Fontaine

Hi,

This looks rather like a problem with your TCP/IP stack. Any changes made to
the w2k network configuration recently?


"Toby Butzon" [EMAIL PROTECTED] a écrit dans le message news:
[EMAIL PROTECTED]
 Greetings,

 I've run into a problem on my Win2k computer running IIS5 and PHP
 404pl1. I've got a page set up to pull a page from CNN.com, parse it for
 headlines, and print the results in an organized table of links.
 Everything's been working fine since the beginning of January, but
 suddenly it dies with a PHP warning and my die() message:

 PHP WARNING
 Warning: fopen("http://www.cnn.com/desktop/content.html","r") - No error
 in _file_extract.php on line 5
 MY DIE() MESSAGE
 Unable to open http://www.cnn.com/desktop/content.html

 The line that's generating the error looks like this:
 $file = fopen($url, "r") or die("Unable to open $url");

 So I figured maybe something was up with my fopen()... but apparently
 not. I also have the same page connecting to the mysql server on
 localhost to request a list of my reminders  tasks that need to be
 done. However, connecting to the db server (on localhost) also dies with
 the following:

 PHP WARNING
 Warning: MySQL Connection Failed: Can't create TCP/IP socket (10091) in
 basic_functions.php on line 9
 MY DIE() MESSAGE
 Error: basic_functions.php:9

 Unable to connect to database

 So now I'm completely stumped. I haven't changed anything as far as the
 scripting on the page goes. I've tried rebooting (seems a likely
 solution for windows, but it didn't work :/), I upgraded to the latest
 PHP (I had been running 403), and even using the ISAPI module instead of
 the CGI...

 My apologies if it's obvious and I'm just not seeing it. Any ideas?

 --Toby Butzon

 --
 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] PHP configure commandline

2001-02-02 Thread Alain Fontaine

Hi,

How about creating a small phpinfo.php file that calls phpinfo(), and run it
from the command line ?

""indrek siitan"" [EMAIL PROTECTED] a écrit dans le message news:
[EMAIL PROTECTED]
 Hi,

 is there a way to find out what configure command-line was used to
 compile the PHP module, if the apache is not running? if it was
 running, phpinfo() would show that.

 but currently the case is to try to re-compile the PHP with same
 settings and see if it would start working. :)


 Rgds,
   Tfr

   --== [EMAIL PROTECTED] == http://tfr.cafe.ee/ == +372-50-17621 ==--

 --
 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] PHP configure commandline

2001-02-02 Thread Alain Fontaine

Hi again,

Sorry. I just found out that my answer doesn't make any sense at all.

""Alain Fontaine"" [EMAIL PROTECTED] a écrit dans le message news:
95eb5v$p77$[EMAIL PROTECTED]
 Hi,

 How about creating a small phpinfo.php file that calls phpinfo(), and run
it
 from the command line ?

 ""indrek siitan"" [EMAIL PROTECTED] a écrit dans le message news:
 [EMAIL PROTECTED]
  Hi,
 
  is there a way to find out what configure command-line was used to
  compile the PHP module, if the apache is not running? if it was
  running, phpinfo() would show that.
 
  but currently the case is to try to re-compile the PHP with same
  settings and see if it would start working. :)
 
 
  Rgds,
Tfr
 
--== [EMAIL PROTECTED] == http://tfr.cafe.ee/ == +372-50-17621 ==--
 
  --
  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] Form data is not remembered

2001-01-27 Thread Alain Fontaine

Hi,

Actually, the reason why form data is not remembered is because I use
sessions, and when you use sessions, the browser is told not to cache
anything, which is pretty smart actually.

The easy solution is to store the user's input into a session variable to
"remember" it that way, and display the form again in case of an error with
the saved values restored into the form.

This is particularly easy if you have an object that you want to define
using your form; you can easily save the whole object as a session variable.

""Alain Fontaine"" [EMAIL PROTECTED] a écrit dans le message
news: 94m9ie$mru$[EMAIL PROTECTED]
 Hi,

 I have a page with a couple of form fields that are being POSTed to a
 processing PHP script. The page that contains these form fields is itself
a
 PHP page that uses sessions and so on.

 I have to make "server-side data validation" on the fields because of
their
 complexity. When the user hits submit and comes to the result page, if
there
 was any error I ask the user to go back to the form and correct the
 mistakes, using either his browser BACK button or by clicking on a link
that
 does a javascript:history.back().

 The problem is, when the user gets back to the form page, all of the
values
 he had typed in are gone, and he has to start all over again. Does anyone
 have an idea why this is so, and how to circumvent it without saving the
 user data into a session variable and then setting it back again once the
 user hits the form page again ? I have seen many pages where your previous
 data would stay in the form after you make a "Back" operation, but here,
it
 disappears.

 Thanks for any ideas, and have a very nice day.



 --
 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] Transparent SID and forms (POST) ?

2001-01-27 Thread Alain Fontaine

Hi,


When I use a form that POST's information to another php page, do I have to
manually include php's session name and the session id in HIDDEN form
fields, or is this done automatically ? This applies, of course, when the
user has cookies disabled...



-- 
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] Conditional include based on virtual host ?

2001-01-26 Thread Alain Fontaine

Hello,

I have developed a large web application the contents of which (language and
data) depends on the URL the site is accessed from, e.g. en.site.com would
display the "english" site, and "fr.site.com" would display the french site,
and so on.

The whole thing is "parameterized" through a set of global variables (or
defines) that reside in a file called settings.php. The question is: how can
I include the "right" settings.php file, depending on the virtual host used
to access the site? This is an Apache server on Linux, and I thought setting
the "include_path" for every virtual host in the vhosts section of
httpd.conf would maybe do the trick ?

Thanks !



-- 
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] Form data is not remembered

2001-01-24 Thread Alain Fontaine

Hi,

I have a page with a couple of form fields that are being POSTed to a
processing PHP script. The page that contains these form fields is itself a
PHP page that uses sessions and so on.

I have to make "server-side data validation" on the fields because of their
complexity. When the user hits submit and comes to the result page, if there
was any error I ask the user to go back to the form and correct the
mistakes, using either his browser BACK button or by clicking on a link that
does a javascript:history.back().

The problem is, when the user gets back to the form page, all of the values
he had typed in are gone, and he has to start all over again. Does anyone
have an idea why this is so, and how to circumvent it without saving the
user data into a session variable and then setting it back again once the
user hits the form page again ? I have seen many pages where your previous
data would stay in the form after you make a "Back" operation, but here, it
disappears.

Thanks for any ideas, and have a very nice day.



-- 
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] last_insert_id function

2001-01-24 Thread Alain Fontaine

Hi,

Anyway, as far as I know, mysql_insert_id() is just a PHP implementation
calling the exact same code as mySQL's internal last_insert_id() function;
except for the drawback with the BIGINT thing, the functionality should be
exactly the same for both.

"Maxim Maletsky" [EMAIL PROTECTED] a écrit dans le message news:
[EMAIL PROTECTED]
 I am not really sure about this one, but the first thing I would do is
that
 I would try it.

 It could be though ...

 Cheers,
 Maxim Maletsky

 -Original Message-
 From: Jacky@lilst [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 25, 2001 7:53 AM
 To: Maxim Maletsky; 'Mark Lipscombe'
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] last_insert_id function


 Can we store the value retrieved by last_insert_id for later use? say we
 want to related 3 queries together and under that case, we will then need
to
 store the first "last_insert_id value" somewhere and then retrive the
second
 "last_insert_id value" from the second insert query before both values
will
 be inserted into the third query.
 Can we do that? If not, I will have to come back to mysql_insert_id(); but
 it won't work with a field with data type BIGINT, will it? So I guess I
 would have to change the data type too, right?
 please enlighten me about this
 Thank
 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set for
 yourself"
 - Original Message -
 From: Maxim Maletsky [EMAIL PROTECTED]
 To: 'Mark Lipscombe' [EMAIL PROTECTED]
 Cc: 'Jacky@lilst' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, January 24, 2001 3:36 AM
 Subject: RE: [PHP] last_insert_id function


  no it will keep it very well. In fact most common errors with this
 function
  is that it still keeps the same value when you do something wrong.
 
  This issue is described in more details on every single manual that has
  LAST_INSERT_ID() in it - read where you found it ... it is written there
 ...
  I am sure ...
 
  However, on my opinion this function is very reliable. I use it a lot
when
  have to create a script which splits some few huge tables into a dozen
of
  well designed ones. Because redesigning the database you really have to
  relate your data to each other. LAST_INSERT_ID() does a good job.
 
  Cheers,
  Maxim Maletsky
 
  -Original Message-
  From: Mark Lipscombe [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 25, 2001 5:28 AM
  To: Maxim Maletsky
  Cc: 'Jacky@lilst'; [EMAIL PROTECTED]
  Subject: RE: [PHP] last_insert_id function
 
 
  Someone jump in here and correct me if I'm wrong, but by the time you
  get around to executing the second query, LAST_INSERT_ID() from MySQL
  isn't necessarily going to be the desired value, because another record
  may well have been inserted in that time?
 
  On 24 Jan 2001 18:25:27 +0900, Maxim Maletsky wrote:
   for example:
  
   $SQL = "INSERT INTO users SET name='Maxim', surname='Maletsky'";
  
   now you have to insert into another table where you need to relate
that
  user
   to the entry:
  
   $SQL2 = "INSERT INTO questions SET question='how did you sleep?',
   made_by=LAST_INSERT_ID()";
  
   LAST_INSERT_ID() will be here equal to the auto_incremented id of the
  first
   $SQL statement.
  
   Hope this helps,
   Maxim Maletsky
  
  
   -Original Message-
   From: Jacky@lilst [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, January 25, 2001 7:16 AM
   To: [EMAIL PROTECTED]
   Subject: [PHP] last_insert_id function
  
  
   I got this quote right out of the php manual. My Id field happen to be
  type
   BIGINT as it said so I tried using LAST_INSERT_ID();  and turn out to
be
   error said "unidentified function". Any clue?
   ***
   mysql_insert_id() converts the return type of the native MySQL C API
   function mysql_insert_id() to a type of long. If your AUTO_INCREMENT
  column
   has a column type of BIGINT, the value returned by mysql_insert_id()
 will
  be
   incorrect. Instead, use the internal MySQL SQL function
 LAST_INSERT_ID().
   
   Jack
   [EMAIL PROTECTED]
   "There is nothing more rewarding than reaching the goal you set for
   yourself"
  
   --
   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 

Re: [PHP] last_insert_id function: I did already

2001-01-24 Thread Alain Fontaine

Hi,

To use mySQL's internal function, try something like this:

mysql_query("insert into mytable values(1,2,3)");
$rs = mysql_query("select LAST_INSERT_ID() from mytable");
$theLastInsertedID = mysql_result($rs,0,0);

""Jacky@lilst"" [EMAIL PROTECTED] a écrit dans le message news:
05f701c0865b$a2fe61e0$[EMAIL PROTECTED]
 I did try already.
 What I did was I assign value from LAST_INSERT_ID(); onto a virable after
I
 run the first insert query the same way we do to mysql_insert_id
 and the result when the page is executed, it said " unidentified function"
 which of course because php does not know LAST_INSERT_ID like you said
 previously.
 By the way, what even drive me crazy more is that with using
 mysql_insert_id();, it returns me value 0 (zero) which I suspected it
comes
 from the fact that data type of that field is BIGINT, correct me if I'm
 wrong.
 any thought?
 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set for
 yourself"
 - Original Message -
 From: Maxim Maletsky [EMAIL PROTECTED]
 To: 'Jacky@lilst' [EMAIL PROTECTED]; 'Mark Lipscombe'
 [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Wednesday, January 24, 2001 4:06 AM
 Subject: RE: [PHP] last_insert_id function


  I am not really sure about this one, but the first thing I would do is
 that
  I would try it.
 
  It could be though ...
 
  Cheers,
  Maxim Maletsky
 
  -Original Message-
  From: Jacky@lilst [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 25, 2001 7:53 AM
  To: Maxim Maletsky; 'Mark Lipscombe'
  Cc: [EMAIL PROTECTED]
  Subject: Re: [PHP] last_insert_id function
 
 
  Can we store the value retrieved by last_insert_id for later use? say we
  want to related 3 queries together and under that case, we will then
need
 to
  store the first "last_insert_id value" somewhere and then retrive the
 second
  "last_insert_id value" from the second insert query before both values
 will
  be inserted into the third query.
  Can we do that? If not, I will have to come back to mysql_insert_id();
but
  it won't work with a field with data type BIGINT, will it? So I guess I
  would have to change the data type too, right?
  please enlighten me about this
  Thank
  Jack
  [EMAIL PROTECTED]
  "There is nothing more rewarding than reaching the goal you set for
  yourself"
  - Original Message -
  From: Maxim Maletsky [EMAIL PROTECTED]
  To: 'Mark Lipscombe' [EMAIL PROTECTED]
  Cc: 'Jacky@lilst' [EMAIL PROTECTED];
[EMAIL PROTECTED]
  Sent: Wednesday, January 24, 2001 3:36 AM
  Subject: RE: [PHP] last_insert_id function
 
 
   no it will keep it very well. In fact most common errors with this
  function
   is that it still keeps the same value when you do something wrong.
  
   This issue is described in more details on every single manual that
has
   LAST_INSERT_ID() in it - read where you found it ... it is written
there
  ...
   I am sure ...
  
   However, on my opinion this function is very reliable. I use it a lot
 when
   have to create a script which splits some few huge tables into a dozen
 of
   well designed ones. Because redesigning the database you really have
to
   relate your data to each other. LAST_INSERT_ID() does a good job.
  
   Cheers,
   Maxim Maletsky
  
   -Original Message-
   From: Mark Lipscombe [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, January 25, 2001 5:28 AM
   To: Maxim Maletsky
   Cc: 'Jacky@lilst'; [EMAIL PROTECTED]
   Subject: RE: [PHP] last_insert_id function
  
  
   Someone jump in here and correct me if I'm wrong, but by the time you
   get around to executing the second query, LAST_INSERT_ID() from MySQL
   isn't necessarily going to be the desired value, because another
record
   may well have been inserted in that time?
  
   On 24 Jan 2001 18:25:27 +0900, Maxim Maletsky wrote:
for example:
   
$SQL = "INSERT INTO users SET name='Maxim', surname='Maletsky'";
   
now you have to insert into another table where you need to relate
 that
   user
to the entry:
   
$SQL2 = "INSERT INTO questions SET question='how did you sleep?',
made_by=LAST_INSERT_ID()";
   
LAST_INSERT_ID() will be here equal to the auto_incremented id of
the
   first
$SQL statement.
   
Hope this helps,
Maxim Maletsky
   
   
-Original Message-
From: Jacky@lilst [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 7:16 AM
To: [EMAIL PROTECTED]
Subject: [PHP] last_insert_id function
   
   
I got this quote right out of the php manual. My Id field happen to
be
   type
BIGINT as it said so I tried using LAST_INSERT_ID();  and turn out
to
 be
error said "unidentified function". Any clue?
***
mysql_insert_id() converts the return type of the native MySQL C API
function mysql_insert_id() to a type of long. If your AUTO_INCREMENT
   column
has a column type of BIGINT, the value returned by mysql_insert_id()
  will
   be

Re: [PHP] SMs

2001-01-14 Thread Alain Fontaine

Hi,

This "special server" is usually called an SMSC - SMS Center, run by your
mobile operator. These SMSC's are pretty powerful in the way that you can
access them through TCP (VPN for sure, and sometimes even HTTP), or through
a direct link connexion. You'd need to talk to your mobile operator to get
an access to it, though. Most offer that as a (paying) service to companies
whow ould like to easily send out mass SMS's to their employees, truck
drivers, agents, etc.

Complete specification for a pretty much used SMSC can be found on the NOKIA
site, in the developer's section.

Now I'm glad I had something to contribute to this list ;)

""Bastian"" [EMAIL PROTECTED] a écrit dans le message news:
93s5n7$sh7$[EMAIL PROTECTED]
 Hello!

 A requirement is a special server that sends them, but such a server costs
 money, every message costs some.
 Another way is to send the messages to the mailaddress. I only know it
from
 Germany: [EMAIL PROTECTED]

 Bastian


 --






 //End of message
 "Dhaval Desai" [EMAIL PROTECTED] schrieb im Newsbeitrag
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  HI!
 
  I am trying to build a SMS(Short message service)
  mesaging system..can anybody tell me what are the
  requirements for this...
 
  Thanx a lot!
  Dhaval Desai
 
 
  __
  Do You Yahoo!?
  Get email at your own domain with Yahoo! Mail.
  http://personal.mail.yahoo.com/
 
  --
  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] Good and working documentation generator

2001-01-11 Thread Alain Fontaine

Alex,

Ah well, never mind my mail about BinaryCloud:

"Win(x) isn't considered or supported."

I guess then BinaryCould "isn't considered or supported" in my company
either :)

"Alex Black" [EMAIL PROTECTED] a écrit dans le message news:
[EMAIL PROTECTED]
 we're using PHPDoc with binarycloud, it's a little rough at the moment,
but
 it looks like the code is moving along, and having a standard is
fantastical
 :)

 phpdoc.de

 binarycloud: www.binarycloud.com

 _alex


 --
 Alex Black, Head Monkey
 [EMAIL PROTECTED]

 The Turing Studio, Inc.
 http://www.turingstudio.com

 vox+510.666.0074
 fax+510.666.0093

 Saul Zaentz Film Center
 2600 Tenth St Suite 433
 Berkeley, CA 94710-2522




  From: [EMAIL PROTECTED] ("Alain Fontaine")
  Newsgroups: php.general
  Date: 6 Jan 2001 12:17:16 -0800
  Subject: [PHP] Good and working documentation generator
 
  Hi,
 
  Is there such a thing yet ? I have had a look at the currently "being
  developed" documentation generators, but they just don't quite cut it
yet,
  or did I miss one that actually works well ?
 
  We are working on Windows platforms, so a tool that does not rely on
  Unix/Linux only tools, would be perfect.
 
  Thanks a lot for your ideas and opinions.
 
  ---
  Alain Fontaine
  Nvision s.a.
  Luxembourg
 
 
 
 
  --
  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]