RE: [PHP] PHP require_once() opens some files but not others in same library

2009-04-07 Thread Henning Glatter-Gotz
 Maybe ask on the zend list - 
 http://framework.zend.com/community/resources since they will be 
 familiar with it.

 Still sounds like a url is being used for a require/include but *shrug*.

The issue resolved itself when I moved the domain to a different server. I
had to do this for other reasons and now the previously described issues no
longer occur.

Cheers
Henning



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



RE: [PHP] PHP require_once() opens some files but not others in same library

2009-04-06 Thread Henning Glatter-Gotz
Chris,

At no point am I using a URL.
Under normal circumstances the code includes (require_once) things like
Zend/Loader/blablabla. Because this does not resolve in the local
directory it is supposed to consult the PHP include_path to look this up.
And it does this successfully up to a point.
The full path is /usr/local/php5/lib/php/library/Zend/Loader/blablabla.

When I say up to a point I mean that my code includes files in Zend/...
and it eventually ends up in the file Zend/Loader/PluginLoader.php. So the
whole include mechanism worked up to this point. However in this
PluginLoader.php file on line 389 it calls
require_once(Zend/Loader/PluginLoader/Exception.php) and this is when
things go bad.

To see if it makes a difference I modified line 389 to read
require_once(/usr/local/php5/lib/php/library/Zend/Loader/PluginLoader/Excep
tion.php) and got the slightly different error as described in my original
post.

I have tried to find something about this type of error on Google, but most
search results are pages of web sites that are written in php that at the
time of indexing displayed this error. The sites don't actually have
anything to do with PHP development.

I have even gone as far as downloading the php source code to try and see if
I can figure out why this type of error world be caused. No luck yet.

Cheers
Henning

-Original Message-
From: Chris [mailto:dmag...@gmail.com] 
Sent: Monday, April 06, 2009 11:05 PM
To: hglattergotz
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP require_once() opens some files but not others in
same library


snip

 Here are the warnings and the error that I get:
 
 Warning: Zend_Loader_PluginLoader::require_once()
 [function.Zend-Loader-PluginLoader-require-once]: couldn't resolve host
name
 in /usr/local/php5/lib/php/library/Zend/Loader/PluginLoader.php on line
389

Why is this trying to load something via http (or ftp even)?

couldn't resolve hostname is not something you get when you include or 
require a file locally.

 when I hard code the absolute path on line 389 the first warning changes
to
 Warning: Zend_Loader_PluginLoader::require_once()
 [function.Zend-Loader-PluginLoader-require-once]: URL using bad/illegal
 format or missing URL in
 /usr/local/php5/lib/php/library/Zend/Loader/PluginLoader.php on line 389

What is the absolute path you are putting in? It looks like a url 
according to the message.

It should be a file path:

/usr/local/php5/lib/php/library/Zend/blah/blah/blah

-- 
Postgresql  php tutorials
http://www.designmagick.com/


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



RE: [PHP] PHP require_once() opens some files but not others in same library

2009-04-06 Thread Henning Glatter-Gotz
snip

Maybe ask on the zend list - 
http://framework.zend.com/community/resources since they will be 
familiar with it.

Still sounds like a url is being used for a require/include but *shrug*.

-- 
Postgresql  php tutorials
http://www.designmagick.com/

I did ask on the Nabble Zend list but have not gotten a reply. Will try the
official Zend list next.
I am pretty sure that the library is not using a URL since I get this
message 

Warning: Zend_Loader_PluginLoader::require_once()
[function.Zend-Loader-PluginLoader-require-once]: URL using bad/illegal
format or missing URL in
/usr/local/php5/lib/php/library/Zend/Loader/PluginLoader.php on line 389

When I hard code the full path.

Very odd.
Thanks for taking a stab at this.

Henning


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



Re: [PHP] Re: [PHP-WIN] Re: [PHP] slow performance

2007-04-26 Thread Henning Eiben
Richard Lynch wrote:

 Are there multiple threads spawned?
 Depends on server API. ISAPI does, fastCGi doesn't.
 OK; so for serving multiple concurrent clients ISAPI would sound to me
 like the better choice, since it can use threads, or what would be the
 advantage of using fastcgi?
 
 I believe you can also manage better control over the user running
 FCGI that having it embedded in ISAPI, but I could be 100% wrong on
 that.

OK, but that shouldn't affect performance in any way. But I'll keep that
in mind.

While I'm writing this, I think about this, and at least with ASP and
VBScript I think the scripts are executed in the IUSR_[xx]-context if
your website allows anonymous connections, otherwise there is some other
user that is used for IIS-apps, or you could inherit the context of the
user calling the website (if you're using digest authentication or
integrated windows authentication).



-- 
... If it wasn't for C, we would be using BASI, PASAL and OBOL!

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



Re: [PHP] slow performance

2007-04-26 Thread Henning Eiben
Richard Lynch wrote:

 On Wed, April 25, 2007 5:48 am, Henning Eiben wrote:
 But as far as I understand, java kinda does the same thing, doesn't
 it?
 
 Sort of, but not really...
 
 Java has a single central one giant process architecture.
 
 PHP has a shared-nothing architecture.
 
 They're at polar opposites on this bit.
 
 A PHP accelerator/cache wedges the Java-ness of caching the oft-used
 code in RAM, without the baggage of having everything in one giant
 process.

OK, but when I run PHP as an ISAPI filter, I see in my process-explorer
(systinternals) only one process (w3wp.exe), that has a lot of threads.
This must be the concurrent request being served.

Comparing this to Java, I also have only one process (java.exe) and a
huge amount of threads.

I would assume, that creating java-threads within a JVM is more
lightweight than creating new threads at the OS-level like PHP needs to do.

 Do you know any resource, describing how php works (like the thing
 about
 compiling opcode, and stuff)? How does php handle simultaneous
 requests?
 
 Woof.
 
 There are TONS of resources out there, most of which are probably
 irrelevant to your actual problem, if you'd just profile the code and
 find out what's actually going on.

Well, I want to describe my observations I made with PHP and Java, and I
want to explain why PHP is so much slower, compared to Java. So I would
like to add some references to my paper ... and to be honest, I'm afraid
I would run out of time if I would profile PHP to figure exactly out
what's going on.

So I don't need the source-code of PHP to show what's *exactly* going
on, but roughly describing how PHP works.

 Are there multiple threads spawned?
 
 And in Windows, maybe, where the whole concept of process/thread is of
 a different nature than Linux threads/processes.

hmm, too bad I'm stuck with windows :)

 PHP run under Apache lets Apache handle the process/thread splitting.

Well, same with windows ... I would assume that the IIS is handling the
whole process/thread stuff

 Again, though, profile your code, please.

hmm ... as mentioned above - but I might give it a try




-- 
... The UART's won't take this speed, Captain

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



[PHP] Re: [PHP-WIN] Re: [PHP] slow performance

2007-04-26 Thread Henning Eiben
Stanislav Malyshev wrote:

 OK, I installed FCGI and ran my testsuite. I did get more requests in a
 timeperiod of 5 minutes, but unfortunatly I also got a lot of errors
 (HTTP 500). But the performance of successful pages was increased by
 almost 15%.
 
 Maybe you need to configure FastCGI for more processes - 500 could be
 result of getting more requests than there are processes to handle them.

How would I do that?



-- 
... Does killing time harm eternity?

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



Re: [PHP] slow performance

2007-04-26 Thread Henning Eiben
Richard Lynch wrote:

 At 31:3 ratio, it's almost for sure NOT the fault of 3-tier
 architecture nor the OR-mapper.
 
 Or, if it is, it's because you've chosen a HORRIBLE 3-tier
 architecture or a RIDICULOUS OR-mapper.
 
 My *first* *first* *first* SWAG is that you've got something very very
 very hinky in the mysql_connect, not using local sockets.
 
 Only on Windows, that means you haven't tweaked some goofy setting
 somewhere, rather than something as simple as not using 'localhost'
 for the mysql_connect.

Well, one requirement was to use a dedicated MySQL-Server, so that is
most certainly not 'localhost' but 'dbserver.acme.com' :)




-- 
... Gentlemen:  Start your debuggers...

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



[PHP] script timeout

2007-04-25 Thread Henning Eiben
Hi,

I have a small sample-application, that uses smarty for the presentation
layer. Unfortunately I might encounter script-timeouts (not necessarily
from smarty, could also be the DB-connection or something). In this case
I would like to return an appropriate HTTP status-code (might be 500 or
something). Right now I just receive a blank page, as well as a HTTP
status-code of 200, which would indicate that everything is OK!

So what do I need to do?


-- 
 Gentlemen:  Start your debuggers...

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



[PHP] slow performance

2007-04-25 Thread Henning Eiben
Hi,

I wrote a small sample-application once using PHP (with propel and
smarty) and once using Java (JBoss, EJB3, JSP  Servlets). Both apps are
being served from a windows server (2x Xeon 1,3GHz, 2 GB RAM), but the
performance of the PHP version is much slower than the Java version.

I already installed an php-accelerator (eAccelator) which increased the
overall performance, but still the performance is quite poor.

Are there any tweaks to tune PHP performance?


-- 
... Does killing time harm eternity?

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



Re: [PHP] slow performance

2007-04-25 Thread Henning Eiben
Zoltán Németh schrieb:

 I wrote a small sample-application once using PHP (with propel and
 smarty) and once using Java (JBoss, EJB3, JSP  Servlets). Both apps are
 being served from a windows server (2x Xeon 1,3GHz, 2 GB RAM), but the
 performance of the PHP version is much slower than the Java version.
 
 I think this is because Java is compiled once, PHP is compiled at every
 request...

Well, but using something like eAccelerator should compensate this,
shouldn't it? As far as I understand, scripts are being compiled and
then store in memory to access them faster.

 I already installed an php-accelerator (eAccelator) which increased the
 overall performance, but still the performance is quite poor.
 
 I would not say php performace is poor, I think it is quite fast (at
 least on my linux boxes, I know nothing about php on windows...)

Well ... I did some stress-testing. I create 20 concurrent requests to
my application: random pages, randomizing the post parameter, which
causes to load different data from the database (MySQL 5.0.37, running
on a separate server). My webserver is the same for java and php.

Running my test for about 5 minutes, I get about 31.000 request for the
java application, but only about 3.000 for the php.



-- 
... Does killing time harm eternity?

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



Re: [PHP] slow performance

2007-04-25 Thread Henning Eiben
Zoltán Németh wrote:

 I already installed an php-accelerator (eAccelator) which increased the
 overall performance, but still the performance is quite poor.
 I would not say php performace is poor, I think it is quite fast (at
 least on my linux boxes, I know nothing about php on windows...)
 Well ... I did some stress-testing. I create 20 concurrent requests to
 my application: random pages, randomizing the post parameter, which
 causes to load different data from the database (MySQL 5.0.37, running
 on a separate server). My webserver is the same for java and php.

 Running my test for about 5 minutes, I get about 31.000 request for the
 java application, but only about 3.000 for the php.
 
 well, that's strange. I think there should not be that much difference.
 maybe your php code is written poorly?

could be ... but my java code might be poorly as well :). Using propel
an smarty might not be the way to go, to get the fastest performance,
but from the architectural point of view this is somehow similar to
using EJB3 and JSP.

 or maybe your apache serves php in a way which limits the number of
 threads or some other resource?

well, I'm using IIS not apache :), but I also tried Apache 2.2.4
(Windows), and the performance increase was just about 10%



-- 
... Gentlemen:  Start your debuggers...

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



Re: [PHP] slow performance

2007-04-25 Thread Henning Eiben
Richard Davey wrote:

 Running my test for about 5 minutes, I get about 31.000 request for the
 java application, but only about 3.000 for the php.
 
 No offence, but the problem is almost 100% certainly in your PHP code
 then. I'd look very carefully at what is going on there before trying to
 'tweak' PHP itself.

well, I was curios if there would be any obvious things to do. If this
rather poor performance is due to the fact, that I used 3-tier
architecture and an OR-mapper, than this would be conclusion of my tests.



-- 
... The UART's won't take this speed, Captain

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



Re: [PHP] slow performance

2007-04-25 Thread Henning Eiben
Zoltán Németh wrote:

 I wrote a small sample-application once using PHP (with propel and
 smarty) and once using Java (JBoss, EJB3, JSP  Servlets). Both apps are
 being served from a windows server (2x Xeon 1,3GHz, 2 GB RAM), but the
 performance of the PHP version is much slower than the Java version.
 I think this is because Java is compiled once, PHP is compiled at every
 request...
 Well, but using something like eAccelerator should compensate this,
 shouldn't it? As far as I understand, scripts are being compiled and
 then store in memory to access them faster.
 
 not exactly. it pre-compiles them to opcodes and stores the opcode
 blocks. the interpreter normally first pre-compiles the code to opcodes
 then runs the opcode. this pre-compilation can be cached with
 accelerators, that's how they increase performance.

But as far as I understand, java kinda does the same thing, doesn't it?
Java programs are being compiled into some intermediate language, and
this is being interpreted at runtime. So using an accelerator should
mimic the same setup for php.

Do you know any resource, describing how php works (like the thing about
compiling opcode, and stuff)? How does php handle simultaneous requests?
Are there multiple threads spawned?



-- 
... There are 10 kinds of people. Those who know binary code, and those
who don't.

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



[PHP] Re: [PHP-WIN] Re: [PHP] slow performance

2007-04-25 Thread Henning Eiben
Stanislav Malyshev wrote:

 But as far as I understand, java kinda does the same thing, doesn't it?
 Java programs are being compiled into some intermediate language, and
 this is being interpreted at runtime. So using an accelerator should
 mimic the same setup for php.
 
 Java is much less dynamic language than PHP (try doing $foo = $$bar in
 Java :) which allows it to generate more low-level and more efficient
 bytecode and also use JIT compiling to further improve its performance.
 PHP opcodes is more high-level and not JIT-ed (unless somebody writes
 JIT for PHP, which didn't happen yet :)

ok, sounds reasonable.

 Do you know any resource, describing how php works (like the thing about
 compiling opcode, and stuff)? How does php handle simultaneous requests?
 
 Try these:
 http://www.php.net/manual/en/internals.php
 http://blog.libssh2.org/index.php?/archives/24-Extending-and-Embedding-PHP.html

ah, this saves my good-night-reading for today! :)

 Are there multiple threads spawned?
 
 Depends on server API. ISAPI does, fastCGi doesn't.

OK; so for serving multiple concurrent clients ISAPI would sound to me
like the better choice, since it can use threads, or what would be the
advantage of using fastcgi?




-- 
... ERROR:  CPU not found.

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



Re: [PHP] script timeout

2007-04-25 Thread Henning Eiben
Tijnema ! wrote:

 I have a small sample-application, that uses smarty for the presentation
 layer. Unfortunately I might encounter script-timeouts (not necessarily
 from smarty, could also be the DB-connection or something). In this case
 I would like to return an appropriate HTTP status-code (might be 500 or
 something). Right now I just receive a blank page, as well as a HTTP
 status-code of 200, which would indicate that everything is OK!

 So what do I need to do?

 I don't think this is possible in PHP. But i guess you need to do
 something in Apache, to return some special error message. A thing to
 keep in mind:
 PHP max_execution_time set in php.ini or set with set_time_limit does
 not affect system calls, such as database operations.
 So, you'd be better off setting the time limit in Apache, and do some
 stuff with Apache configuration files to return something.

Well, looking at my error.log in my PHP directory tells me, that
several php-files exceeded maximum scripting time. That's why I asked.

And I observed receiving a blank page, which is not satisfying ... so
what would I do in Apache (or IIS) to get an error-code (HTTP code that is)?




-- 
... Black holes suck.

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



[PHP] Re: [PHP-WIN] Re: [PHP] slow performance

2007-04-25 Thread Henning Eiben
Stanislav Malyshev wrote:

 OK; so for serving multiple concurrent clients ISAPI would sound to me
 like the better choice, since it can use threads, or what would be the
 advantage of using fastcgi?
 
 Non-threaded PHP is faster than threaded PHP, because it doesn't need to
 do locks between threads and keep the thread context through the code,
 etc. So FastCGI usually would be faster and also more stable since the
 memory space is not shared. It forgoes some advantages of threaded
 application, but overall it is faster.

OK, so I will give that a try. As far as I understand, I basically just
have to replace the association of .php to php5isapi.dll with
php-cgi.exe; and then set the global path to include my php-folder, right?




-- 
... ERROR:  CPU not found.

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



[PHP] Re: [PHP-WIN] Re: [PHP] slow performance

2007-04-25 Thread Henning Eiben
Stanislav Malyshev wrote:

 OK, so I will give that a try. As far as I understand, I basically just
 have to replace the association of .php to php5isapi.dll with
 php-cgi.exe; and then set the global path to include my php-folder,
 right?
 
 No, that probably would make it CGI, which is slow. For FastCGI, you
 need FastCGI module for IIS. Zend Core contains one, and Microsoft has
 its own here: http://www.iis.net/default.aspx?tabid=151

OK, I installed FCGI and ran my testsuite. I did get more requests in a
timeperiod of 5 minutes, but unfortunatly I also got a lot of errors
(HTTP 500). But the performance of successful pages was increased by
almost 15%.



-- 
... ERROR:  CPU not found.

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



[PHP] Subclassing website

2005-01-06 Thread Henning Sato von Rosen
Hi all!

I want to subclass a large website mainly written in PHP.
The sublassing is useful for testing when you want to test a change, a
bugfix or a new design,  and only a few pages change. The subclass
would consist of an almost empty representation of the website
containing only the changed files, thus allowing testing without
harming the ordinary website.

Is it possible ro postprocess the output of PHP for a specific page
(e.g. for changing all links dynamically adding a prefix to a path, if
that file does exist in the website subclass)?

Thankful for hints/pointers on this!
Maybe there is already a module for this?

Thanks!
/Henning

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



RE: [PHP] Cannot modify header information - headers already sent

2003-06-20 Thread Henning Sittler
The problem does not appear to be database related, it appears to header
related.  You are trying to send header information after sending regular
output.  You can't do this:

?php
echo 'blah blah';
header(Location: .$out);
?

BUT you can do this:

?php
$some_text = my_function();
if ($some_text) echo $some_text;
else header(Location: .$out);

function my_function() {
  // some code goes here
  if ($something) return $some_text;
  return;
} // end my_function()
?

Try looking at line 29.  that's the line where you are trying to output a
header after outputing some text.


Henning Sittler
www.inscriber.com



-Original Message-
From: Logan McKinley [mailto:[EMAIL PROTECTED]
Sent: Friday, June 20, 2003 10:04 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Cannot modify header information - headers already sent 


I am having a problem when i use an include file to include database
connectivity, however if i cut and paste the code out of the include and
place it directly into the .php file it works.  I am not sure how to figure
this problem out.
===  error:
Warning: Cannot modify header information - headers already sent by (output
started at c:\inetpub\wwwroot\PHP\includes\db_conn.inc:1) in
c:\inetpub\wwwroot\PHP\login_action.php on line 29
===  main page
?
session_start();
include(includes\db_conn.inc);
if(!isset($HTTP_POST_VARS['login']))
 echo end in if 1;
else if(empty($HTTP_POST_VARS['login']))
 echo end in if 2;
else
 $login = $HTTP_POST_VARS['login'];

if(!isset($HTTP_POST_VARS['pw']))
 echo end in if 3;
else if(empty($HTTP_POST_VARS['pw']))
 echo end in if 4;
else
 $pw = $HTTP_POST_VARS['pw'];

$strSQL = SELECT * FROM [Login] WHERE [Login] = '.$login.' AND pw =
'.$pw.';
$rs = $conn-execute($strSQL);
if(!$rs-EOF)
{
 $_SESSION = TRUE;
 $out = admin_menu.php;
}
else
 $out = login.php?err=error;
header(Location: .$out);
?
===  include
  ?
  $conn = new COM(ADODB.Connection);
  $strConn = DRIVER={Microsoft Access Driver (*.mdb)};
DBQ=C:\Inetpub\wwwroot\PHP\data\Registration.mdb;
  $conn-open($strConn);
  ?
===  include
Thanks in advance,
~Logan





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

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



[PHP] php https file download

2003-06-19 Thread Henning Sittler
Hello everyone,

Apache 2.0.40
PHP 4.2.2
Linux

I have a single php script for downloading requested files.  It works
beautifully on http over port 80.  It does NOT work at all over https on
port 443.  I am using the exact same script (the very same file) for both
http and https connections.  Apache has the +StdEnvVars enabled for all
files and dirs under the https site.  Forms and cookies are working
normally, as are redirect headers.  But for some reason, the headers for
file downlaods are not working at all over ssl.

I am really only testing this with IE 6 right now.

What am I missing? What else can I check for?

 d.php 
function d() {
$fsp = '/mydir/myfile.exe';
$mimetype='application/octect-stream'; $encoding='binary';

//echo basename($fsp).filesize($fsp); return;

//header('Location: https://my.site.com/');

header('Content-Type: '.$mimetype);
header('Content-Length: '.filesize($fsp));
header('Content-Disposition: attachment;
filename='.basename($fsp).'');
header('Content-Transfer-Encoding: '.$encoding);
readfile($fsp);

return;
} // end d()

d();
 d.php 


I call this only after a user clicks a link on a second page. Uncommenting
the line starting with echo out puts the expected basename and filesize.
Uncommenting the line starting with header successfully redirects to the
correct url.  Leaving both the above lines commented, the user is prompted
with a open / save dialog but the filename showing is now the script name,
the filesize is missing, and clicking open or save shows a file tansfer
window that does nothing.

I have also tried testing this script with curl on linux.  Here's the
output.  I noticed the Content-Length header is missing!


 curl output 
[EMAIL PROTECTED] curl https://my.site.com/d.php --head
HTTP/1.1 200 OK
Date: Wed, 18 Jun 2003 18:45:24 GMT
Server: Apache/2.0.40 (Red Hat Linux)
Accept-Ranges: bytes
X-Powered-By: PHP/4.2.2
Set-Cookie: PHPSESSID=ca805f9f0318a53e72abacf6db8fa677; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Content-Disposition: attachment; filename=myfile.exe
Content-Transfer-Encoding: binary
Connection: close
Content-Type: application/octect-stream

 curl output 


What's going on here?  Thanks in advance for any help you can offer!!


Henning Sittler
www.inscriber.com


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



RE: [PHP] php https file download

2003-06-19 Thread Henning Sittler
Beautiful, that worked immediately!  Thanks for your very quick and super
helpful reply, John.

The solution is to change the session.cache_limiter to none in php.ini.


Henning Sittler
www.inscriber.com



-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 9:39 AM
To: Henning Sittler; [EMAIL PROTECTED]
Subject: Re: [PHP] php https file download


 Apache 2.0.40
 PHP 4.2.2
 Linux

 I have a single php script for downloading requested files.  It works
 beautifully on http over port 80.  It does NOT work at all over https on
 port 443. 

Read here:

http://marc.theaimsgroup.com/?l=php-generalw=2r=1s=session.cache_limiter+
httpsq=b

---John Holmes...

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



RE: [PHP] Processing Form Data /w $_POST

2003-06-19 Thread Henning Sittler
it's in the manual, read here:
http://ca.php.net/manual/en/control-structures.foreach.php


Henning Sittler
www.inscriber.com



-Original Message-
From: Kyle Babich [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 12:43 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Processing Form Data /w $_POST


I have a form (setup.php) that passes values to processSetup.php when they
are written into setup.txt.  I'm trying to instead of writing every
idividual value into setup.txt from setup.php, write a loop that will take
as many values as there are in the $_POST array and write them all into a
single array in logical order in setup.txt.  I'm new to php and can't figure
out how to do this.  I'm thinking of something like...

for ($_POST) {
 fwrite($setup, /*something to add current $_POST value to the end of an
array within $setup*/);
}

How should I go about this?

Thank you,
--
Kyle

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

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



RE: [PHP] Cookies- peanut butter or chocolate??

2003-06-19 Thread Henning Sittler
1. Set a big value in seconds for the time argument

2. Send 2 cookies 
OR 
Create one string value containing the two values you want to save,
seperated by a a sepcific character of your choice and send this new value
as your cookie.  Remember to parse the cookie's value when you request it in
your script, so that you determine the two seperatevalues actually stored
there.


Henning Sittler
www.inscriber.com



-Original Message-
From: Sparky Kopetzky [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 4:10 PM
To: PHP General
Subject: [PHP] Cookies- peanut butter or chocolate??


Yes, this question is about PHP cookies.

Two questions: 
1. How do you setup a cookie that will not expire?? 
2. How do you put 2 items that you want to save in the cookie and retrieve??
Examples in the PHP manual only show how to work with a single value.

Thanks!

Robin E. Kopetzky
Black Mesa Computers/Internet Services
www.blackmesa-isp.net


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



[PHP] Is it an apache or a php-problem?

2003-02-28 Thread Henning
Hello
I use Apache/1.3.27 Server
I use to use a mysql-connection, but now the apache support is gone.
Trying to connect to my MySQL-database gives following result:
Fatal error: Call to undefined function: mysql_pconnect() in...

How do I get the MySQL-support back?

Henning (newbie)

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


[PHP] mail client?

2003-01-14 Thread Henning Olsen
Does anyone know any reliable php/mysql mail-clients with support for pop3?

Yours

Henning


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




Re: [PHP] Urgent CPU and|or hdd test

2002-11-11 Thread Thomas \omega\ Henning
Thanks for the information but is there a way to get it in windows aswell?

Thanks

Thomas omega Henning
Marco Tabini [EMAIL PROTECTED] wrote in message
news:1037025483.12570.155.camel;localhost.localdomain...
 If you're using linux, you can try to execute this from the command
 line:

 hdparm -i [device]

 to get, among other things, the serial number of a hard drive. You can
 then extract it with a simple regular expression.


 Marco
 --
 
 php|architect - The magazine for PHP Professionals
 The first monthly worldwide magazine dedicated to PHP programmers
 Check us out on the web at http://www.phparch.com


 On Mon, 2002-11-11 at 09:38, John W. Holmes wrote:
   Is there a way i can test the cpu or the hdd for its serial number in
  php
   under linux and win?
 
  Can you do it from the command line? Run the same command through
  exec(). You can only get information for the server, not anything about
  the client's computer, btw...
 
  ---John Holmes...
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 





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




[PHP] Join - problem

2002-09-18 Thread Henning

Hello
I'm using PHP4 and MySQL on Apache webserver.
I have a table valled liste with names of some people, and a table
called postnummer with zip-codes and citynames.
My select should join the adress and zip from one table with the
cityname from the other table.
But my join-line does not work.   =:(

My code results in this line:

Warning: Supplied argument is not a valid MySQL result resource in
/var/www/html/find/resultat.php on line 27

The code is:
mysql_select_db(adresser);
$query = (SELECT fornavn, efternavn, gade, liste.postnummer, 
postnummer.postbynavn FROM liste
left join postnummer on liste.postnummer = postnummer.postnummer
WHERE MATCH (fornavn, efternavn) AGAINST ('$search'););
$result = mysql_query($query);
while(list( $fornavn, $efternavn, $gade, $postnummer, $postbynavn) =
mysql_fetch_row($result))
print(TRTD$fornavn/TDTD$efternavn/TDTD$gade/TDTD$postnummer/TDTD$postbynavn/TD/TR\n);
 


What is going on?
The select is ok if I do not join, but then I'm not able to get the
field postbynavn from the other table.

PLEASE HELP!

Henning


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




Re: [PHP] Join - problem

2002-09-18 Thread Henning

Oh dear - I forgot the rights in the new table:

select command denied to user: 'henning@localhost' for table 'postnummer'

Thanks for helping, John!

Henning


John Wards wrote:
 not having the time to look at your code I am not sure but do this to see if
 its mysql causeing the errors
 
 $result = mysql_query($query) or die(mysql_error());
 - Original Message -
 From: Henning [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, September 18, 2002 5:12 PM
 Subject: [PHP] Join - problem
 
 
 
Hello
I'm using PHP4 and MySQL on Apache webserver.
I have a table valled liste with names of some people, and a table
called postnummer with zip-codes and citynames.
My select should join the adress and zip from one table with the
cityname from the other table.
But my join-line does not work.   =:(

My code results in this line:

Warning: Supplied argument is not a valid MySQL result resource in
/var/www/html/find/resultat.php on line 27

The code is:
mysql_select_db(adresser);
$query = (SELECT fornavn, efternavn, gade, liste.postnummer,
postnummer.postbynavn FROM liste
left join postnummer on liste.postnummer = postnummer.postnummer
WHERE MATCH (fornavn, efternavn) AGAINST ('$search'););
$result = mysql_query($query);
while(list( $fornavn, $efternavn, $gade, $postnummer, $postbynavn) =
mysql_fetch_row($result))

 
 print(TRTD$fornavn/TDTD$efternavn/TDTD$gade/TDTD$postnummer
 /TDTD$postbynavn/TD/TR\n);
 

What is going on?
The select is ok if I do not join, but then I'm not able to get the
field postbynavn from the other table.

PLEASE HELP!

Henning


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


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




[PHP] Join in MySQL-select doesn't work

2002-09-18 Thread Henning

Hello
I'm using PHP4 and MySQL on Apache webserver.
I have a table valled liste with names of some people, and a table 
called postnummer with zip-codes and citynames.
My select should join the adress and zip from one table with the 
cityname from the other table.
But my join-line does not work.   =:(

My code results in this line:

Warning: Supplied argument is not a valid MySQL result resource in 
/var/www/html/find/resultat.php on line 27

The code is:
mysql_select_db(adresser);
$query = (SELECT fornavn, efternavn, gade, postnummer.postnummer, 
postnummer.postbynavn FROM liste
left outer join postnummer on liste.postnummer = postnummer.postnummer
WHERE MATCH (fornavn, efternavn) AGAINST ('$search'););
$result = mysql_query($query);
while(list($cpr, $fornavn, $efternavn, $gade, $postnummer, $postbynavn) =
mysql_fetch_row($result))

What is going on?
The select is ok if I do not join, but then I'm not able to get the 
field postbynavn from the other table.

PLEASE HELP!

Henning


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




[PHP] PHP and LDAP over SSL

2002-09-04 Thread Søren Henning Dalgaard

I'm new to both PHP, LDAP and SSL so I'm really asking for direction on
where to start.

I have an OpenLDAP server on a Linux box, and a Microsoft ISS on Windows
2000 with PHP-scripting. I have made a couple of PHP scripts that access the
LDAP database for reading and writing. All works fine so fare.

I have installed a certificate on both the Web server and the LDAP server
and moved to https communication between the client and the Web server. Now
I want to move to SSL communication between the Web server and the LDAP
server.

I can make an ldap_connect with the ldaps://hostname/ parameter but what
next:
How can make an ldap_bind command?
How can I encrypt and decrypt the data?
How do I specify a key/certificate for encrypting and decrypting?

Søren Henning Dalgaard



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




[PHP] PHP and LDAP over SSL

2002-09-04 Thread Søren Henning Dalgaard

I'm new to both PHP, LDAP and SSL so I'm really asking for direction on
where to start.

I have an OpenLDAP server on a Linux box, and a Microsoft ISS on Windows
2000 with PHP-scripting. I have made a couple of PHP scripts that access the
LDAP database for reading and writing. All works fine so fare.

I have installed a certificate on both the Web server and the LDAP server
and moved to https communication between the client and the Web server, and
now I want to move to SSL communication between the Web server and the LDAP
server.

I can make an ldap_connect with the ldaps://hostname/ parameter but what
next:
How can make an ldap_bind command?
How can I encrypt and decrypt the data?
How do I specify a key/certificate for encrypting and decrypting?

Søren Henning Dalgaard



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




[PHP] Accessing Ports

2002-07-18 Thread Thomas \omega\ Henning

Hello,

Can i access my paralel or USB port with PHP server side?

Thomas omega Henning



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




[PHP] Check for Associative Array

2002-07-18 Thread Henning Sittler

What's the best way to check for an Associative Array?  There is no
is_assoc() or similiar function listed in the manual (I don't think anyway).

I'm using mysql_fetch_array() and I want to foreach only the assoc. part of
the array without using mysql_fetch_assoc():

foreach ($arr as $key=$value) { 
echo $key:$value;
}

But of course it show both the indexed array and the assoc array contents.
Is there an existing function to check this, or should I do one of these
things inside the foreach loop:

A) set $last=value and just check if $value = $lastval

B) check if the $key is just a number or just a string

C) $key += 1


?? Thanks,


Henning Sittler
www.inscriber.com

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




RE: [PHP] Check for Associative Array

2002-07-18 Thread Henning Sittler

Ya, except I want the whole array to exist (index and assoc. array), not
just the assoc. array.  So, for the time being, I'll just do this:

foreach ($arr as $key=$value) { 
  if ( !is_int($key) ) { echo $key:$value; }
}

What is HTH ??

Henning Sittler
www.inscriber.com



Try this:

while($row = mysql_fetch_assoc($result)) {
// code here
}

This way, the resulting array will ONLY be associative.

HTH!

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




[PHP] Re: Accessing Ports

2002-07-18 Thread Thomas \omega\ Henning

And what kind of permissions might that be? (server side)
Richard Lynch [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 Can i access my paralel or USB port with PHP server side?

 The client's (browser's) parallel or USB port?  No.  See PHP  HASP
thread.

 If the web-server has a parallel or USB port and you want to access that,
 probably, if you have (or can get) sufficient permissions from the OS for
 PHP to do so.

 --
 Like Music?  http://l-i-e.com/artists.htm




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




[PHP] Timer

2002-07-16 Thread Thomas \omega\ Henning

Is this possible:

Im making a bot in PHP and i need a timer. Lets say noone ses anything for
2mins in the channel after that the bot ses something. And if the bot
recieves an msg the timer clears. Is this possible 2 be done?

Thomas omega Henning




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




Re: [PHP] Timer

2002-07-16 Thread Thomas \omega\ Henning

How i know when 2 mins ellapsed?
Kevin Stone [EMAIL PROTECTED] wrote in message
013f01c22cee$b3e17110$6501a8c0@kevin">news:013f01c22cee$b3e17110$6501a8c0@kevin...
 Store a timestamp in a file.  When the bot is activated retrieve the old
 timestamp and calculate the difference between then and how.  Store that
 value in another file or database.  Update the file with a fresh
timestamp.
 -Kevin

 - Original Message -
 From: Thomas omega Henning [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, July 16, 2002 11:22 AM
 Subject: [PHP] Timer


  Is this possible:
 
  Im making a bot in PHP and i need a timer. Lets say noone ses anything
for
  2mins in the channel after that the bot ses something. And if the bot
  recieves an msg the timer clears. Is this possible 2 be done?
 
  Thomas omega Henning
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 




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




RE: [PHP] Alley-OOP! ... or not?

2002-07-15 Thread Henning Sittler

Why not try it for yourself?  If it seems helpful then use it, if not then
don't.  


Henning Sittler
www.inscriber.com



-Original Message-
From: Martin Clifford [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 15, 2002 11:05 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Alley-OOP! ... or not?


Hey all,

I've seen quite a few programs that seem to greatly favor Object Orienting
Programming (OOP) in their code.  I don't mean to start a holy war or
anything of the sort, but as a burgeoning PHP developer, I would like the
opinions of my peers.

So how about it, ladies and gents?  Tell me about the Pros and Cons to OOP,
and why you prefer to use it/not use it!

Personally, I've always used regular functions to accomplish my repetetive
tasks, and OOP seems rather daunting for me, but I'm always open to new (and
hopefully, more efficient) ideas!  Thanks!

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/



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

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




[PHP] help with mail() function!

2002-07-12 Thread Thomas \omega\ Henning

Hello all,

I am trying to build a php driven mailing list where i can send an email to
the whole list. Here is my code:

?php
$to  = Henning Tamas [EMAIL PROTECTED] . ,;
$header = From: Test List [EMAIL PROTECTED];

 include(pop3.php);

 $user=irc;
 $password=*;
 $apop=0;
 $pop3_connection=new pop3_class;
 $pop3_connection-hostname=localhost;
 if(($error=$pop3_connection-Open())==)
 {
  echo PREConnected to the POP3 server
$pop3_connection-hostname/PRE\n;
  if(($error=$pop3_connection-Login($user,$password,$apop))==)
  {
   echo PREUser $user logged in./PRE\n;

if(($error=$pop3_connection-RetrieveMessage(1,$headers,$body,2))==)
   {
echo PREMessage 1:\n---Message headers starts below---/PRE\n;

for($line=0;$linecount($headers);$line++) {
 echo PRE,HtmlSpecialChars($headers[$line]),/PRE\n;
 $fullheader=$fullheader.$headers[$line].\r\n;
}

echo PRE---Message headers ends above---\n---Message body starts
below---/PRE\n;
for($line=0;$linecount($body);$line++) {
 echo PRE,HtmlSpecialChars($body[$line]),/PRE\n; $fullbody =
$fullbody . $body[$line]; }
echo PRE---Message body ends above---/PRE\n;
   }
   }
 }
   if($error==
   ($error=$pop3_connection-Close())==)
   echo PREDisconnected from the POP3 server
$pop3_connection-hostname/PRE\n;

echo($error);
$i1=strpos($fullheader,Subject:);
$i2=strlen($fullheader)-$i1;
$subject=substr($fullheader,$i1,$i2);
$subject=substr($subject,9,strlen($subject));
$subject = [MediaSoft]  . $subject;
//mail($to, $subject, $body, $headers) or die(tet);
mail($to, $subject, $fullbody, From: [EMAIL PROTECTED]);
?
I got the pop3.php from www.weberdev.com its a class to download emails from
a POP3 server. My problem is:
When i send an email from a PHP emailer using mail() function to my mailing
list Message Subject is test, Message body is test. I run my script and my
message source looks like this:
Return-Path: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Received: (qmail 30667 invoked by alias); 11 Jul 2002 13:04:08 -
Delivered-To: [EMAIL PROTECTED]
Received: (qmail 30662 invoked by uid 99); 11 Jul 2002 13:04:08 -
Date: 11 Jul 2002 13:04:08 -
Message-ID: [EMAIL PROTECTED]
To: Henning Tamas [EMAIL PROTECTED], Root [EMAIL PROTECTED],
Subject: [MediaSoft] test
//---Header ends here  I added this line

From: Test List [EMAIL PROTECTED]

From: [EMAIL PROTECTED]

test

And as you see From: [EMAIL PROTECTED] is in the header section of the
mail() function.
What can I do to fix this problem?

Thomas Henning

P.S. I tryed these to fix it:
1)$header=From: [EMAIL PROTECTED] \r\n;
2)$header=;
mail($to,$subject,$message,$header,[EMAIL PROTECTED]);



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




[PHP] Re: help with mail() function!

2002-07-12 Thread Thomas \omega\ Henning

No it didn't work. I simply don't understand why its not working. I use it
the same way in a nother php and it works perfectly.

Kondwani Spike Mkandawire [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Try:

 $header = From: Test List [EMAIL PROTECTED];

 mail($to, $subject, $fullbody, $header.);

 Note the extra Null String concatinated...

 My php.ini is also configured to show:

 sendmail_from=
 In the  mail function...  This is under WinNT...
 php 4.2.1   The Null String might work under
 UNIX too...  I haven't tried it...

 Spike...

 Thomas Omega Henning [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hello all,
 
  I am trying to build a php driven mailing list where i can send an email
 to
  the whole list. Here is my code:
 
  ?php
  $to  = Henning Tamas [EMAIL PROTECTED] . ,;
  $header = From: Test List [EMAIL PROTECTED];
 
   include(pop3.php);
 
   $user=irc;
   $password=*;
   $apop=0;
   $pop3_connection=new pop3_class;
   $pop3_connection-hostname=localhost;
   if(($error=$pop3_connection-Open())==)
   {
echo PREConnected to the POP3 server
  $pop3_connection-hostname/PRE\n;
if(($error=$pop3_connection-Login($user,$password,$apop))==)
{
 echo PREUser $user logged in./PRE\n;
 
  if(($error=$pop3_connection-RetrieveMessage(1,$headers,$body,2))==)
 {
  echo PREMessage 1:\n---Message headers starts
 below---/PRE\n;
 
  for($line=0;$linecount($headers);$line++) {
   echo PRE,HtmlSpecialChars($headers[$line]),/PRE\n;
   $fullheader=$fullheader.$headers[$line].\r\n;
  }
 
  echo PRE---Message headers ends above---\n---Message body
 starts
  below---/PRE\n;
  for($line=0;$linecount($body);$line++) {
   echo PRE,HtmlSpecialChars($body[$line]),/PRE\n;
$fullbody
 =
  $fullbody . $body[$line]; }
  echo PRE---Message body ends above---/PRE\n;
 }
 }
   }
 if($error==
 ($error=$pop3_connection-Close())==)
 echo PREDisconnected from the POP3 server
  $pop3_connection-hostname/PRE\n;
 
  echo($error);
  $i1=strpos($fullheader,Subject:);
  $i2=strlen($fullheader)-$i1;
  $subject=substr($fullheader,$i1,$i2);
  $subject=substr($subject,9,strlen($subject));
  $subject = [MediaSoft]  . $subject;
  //mail($to, $subject, $body, $headers) or die(tet);
  mail($to, $subject, $fullbody, From: [EMAIL PROTECTED]);
  ?
  I got the pop3.php from www.weberdev.com its a class to download emails
 from
  a POP3 server. My problem is:
  When i send an email from a PHP emailer using mail() function to my
 mailing
  list Message Subject is test, Message body is test. I run my script and
my
  message source looks like this:
  Return-Path: [EMAIL PROTECTED]
  Delivered-To: [EMAIL PROTECTED]
  Received: (qmail 30667 invoked by alias); 11 Jul 2002 13:04:08 -
  Delivered-To: [EMAIL PROTECTED]
  Received: (qmail 30662 invoked by uid 99); 11 Jul 2002 13:04:08 -
  Date: 11 Jul 2002 13:04:08 -
  Message-ID: [EMAIL PROTECTED]
  To: Henning Tamas [EMAIL PROTECTED], Root [EMAIL PROTECTED],
  Subject: [MediaSoft] test
  //---Header ends here  I added this line
 
  From: Test List [EMAIL PROTECTED]
 
  From: [EMAIL PROTECTED]
 
  test
 
  And as you see From: [EMAIL PROTECTED] is in the header section of the
  mail() function.
  What can I do to fix this problem?
 
  Thomas Henning
 
  P.S. I tryed these to fix it:
  1)$header=From: [EMAIL PROTECTED] \r\n;
  2)$header=;
  mail($to,$subject,$message,$header,[EMAIL PROTECTED]);
 
 





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




Re: [PHP] help with mail() function!

2002-07-12 Thread Thomas \omega\ Henning

No I only work on *nix platforms
Analysis  Solutions [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 You wouldn't happen to be on a windows system?  Read the Warning: on the
 manual page:
 http://www.php.net/manual/en/function.mail.php

 --Dan

 --
PHP classes that make web design easier
 SQL Solution  |   Layout Solution   |  Form Solution
 sqlsolution.info  | layoutsolution.info |  formsolution.info
  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409



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




RE: [PHP] Getting the URL that triggered a 404.

2002-07-11 Thread Henning Sittler

The $_SERVER environment variables should be there, I'm using them.


Henning Sittler
www.inscriber.com



-Original Message-
From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 12:00 PM
To: Robert Cummings; [EMAIL PROTECTED]
Subject: RE: [PHP] Getting the URL that triggered a 404.


you can get the webserver to redirect to a custom errorhandler that could be
a php script to do whatever you want.

 -Original Message-
 From: Robert Cummings [mailto:[EMAIL PROTECTED]]
 Sent: 11 July 2002 4:44 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Getting the URL that triggered a 404.
 
 
 
 When the 404 is caught and a PHP script is executed there doesn't
 appear to be any information in the environment variables indicating
 what URL triggered the 404. Could someone tell me how to obtain that
 information?
 
 Cheers,
 Rob.
 -- 
 .-.
 | Robert Cummings |
 :-`.
 | Webdeployer - Chief PHP and Java Programmer  |
 :--:
 | Mail  : mailto:[EMAIL PROTECTED] |
 | Phone : (613) 731-4046 x.109 |
 :--:
 | Website : http://www.webmotion.com   |
 | Fax : (613) 260-9545 |
 `--'
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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

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




RE: [PHP] sigh... forms

2002-07-09 Thread Henning Sittler

Speaking of forms, and I'm sure lots have asked this before me, but anyone
know anywhere I can go to see some examples or existing code for
automatically generating and and validating dynamic forms?  

Wait though, I'm already doing this myself.  To explain further, what I
really want is an abstract set of php functions to say, ok, I want another
form with say 10 questions, and I want to define each question and set of
possible answers (input types and ranges) manually, and have the action
script automatically check that the input types and ranges for each question
are valid.


Henning Sittler
www.inscriber.com



-Original Message-
From: Chris Earle [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 09, 2002 1:38 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] can I call a variable... using variables?


Why not just make the form's input names var[] then PHP will make them
into an array:

for ($i = 1; $i  100; $i++)
{
 if ($var[$i -1]  0)
  echo Yup. . $var[$i - 1] . is greater than 0.;
}

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

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




RE: [PHP] RegEx question

2002-07-02 Thread Henning Sittler

$string = 'somethingphp';
$pat = 'php$';
$hasphp = ereg($pat, $string);



Henning Sittler
www.inscriber.com



-Original Message-
From: David Busby [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 4:49 PM
To: php-general
Subject: [PHP] RegEx question


List,
How can I regex to compare the last three chars of a string to
php?

/B


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



[PHP] variable statements

2002-06-26 Thread Henning Sittler

Question: Variable variables and variable functions work great, but how can
you execute arbitrary code statements using php code stored inside
variables?

// Example

function stuff() {
echo 'pStuff/p';
} // end stuff()

$function = 'stuff';
$function(); // works

/* 
Given the above, I would like and had expected the below to be interpreted
by the parser and executed as if it were regular static php code.
*/

// Should interpret: stuff();
$lucid = stuff();
$lucid; // doesn't work, but doesn't show an error 

// Should interpret: if (1) { echo $function; }
$lucid = if (1) { echo $function; };
$lucid; // doesn't work, but doesn't show an error 


Thanks for any help,


Henning Sittler
www.inscriber.com




RE: [PHP] variable statements

2002-06-26 Thread Henning Sittler

Perfect.  Thank you Jason.


Henning Sittler
www.inscriber.com



-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 26, 2002 1:44 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] variable statements


On Thursday 27 June 2002 01:34, Henning Sittler wrote:
 Question: Variable variables and variable functions work great, but how
can
 you execute arbitrary code statements using php code stored inside
 variables?

eval()

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Speak softly and own a big, mean Doberman.
-- Dave Millman
*/


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



[PHP] problem with fread

2002-05-07 Thread Henning Sprang

Hy,
i have a question about the fread() function.
i want to read data from a webserver url, which i don't know the exact size
of, i only know that it varies.
i see i have to give the lentgh of a file when reading it, but for remote
files i have no way to check the size. And i saw no way to tell fread it should
just read until the end.

ok, i could set the filesize very high,. but this seems a dirty solution.

on the other hand there is the fgets() function to read data line by line
- but my data has no linbreaks, it's only serialized php variable data that
comes in one line.

what's the best olution for that situation?

tia,
henning



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




Re: [PHP] problem with fread

2002-05-07 Thread Henning Sprang

 ?php
   $output = ; // Clear output
   $url = http://whatever.com/file.html;; // whatever you wanna pull from
 
   if ($fp = fopen($url, r)) {
 while ($tmp = fget($fp, 4096)) $output .= $tmp;
 fclose($fp);
   }
 
   echo The URL's content is: .$output;
 ?

erm, don't wanna be nosy, but you meant fgets() - forgot the s - didn't
you?

just for others who read that one...

anyway, so it's safe and clean to use this one.

thank you very much!

henning


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




Re: AW: [PHP] Java-Object

2002-04-29 Thread Henning

Bedilu Habte wrote:

print_r($result);

 resulted in:
 
 Objectjava Object
 (
 [0] = 2
 )
 
 var_dump($result);
 had given me:
 
 object(java)(1) {
   [0]=
   int(2)
 }




it means that you have an object with a property field of type integer 
and a value of 2.

possibly nmot what you want or need. but it could mean that you did 
something wrong in the usage of the class or in the usage of java with 
php in general.

what irritates me a bit is the java in the brackets of the var_dump 
output, that could mean that the object is somehow of type java or 
something like that could it be one has to transform that to use it in php?

are you sure you did everything right with the java/php combination? did 
you test that with other, easier things?

did you test the class on the command line with success?

did you read the manual of everything that is involved in your task?

ok, that should be everything i have to say about that, as i said, i 
have no experience in using java classes from php.

i could only help you until now in finding out more about the data and 
type of your object...


henning


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




Re: [PHP] xml/xslt capability?

2002-04-29 Thread Henning

Nick Wilson wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hi all
 I want to get started with xml/xslt, I've read a few things about
 sablotron but am unsure what support my host is running.
 
 If any of you know anything about this subject would you be kind enough
 to look at the phpinfo() I've set up here:
 http://www.explodingnet.com/phpinfo.php and let me know your thoughts as
 to what i have/need to get cracking?



it seems you have this:

http://www.php.net/manual/en/ref.xml.php

when you read this manual you'll find that it's said there for this type 
of xml functions expat is used, and the phpinfo says something about expat.

further on, this type of xml support is turned on with the configure 
command --with-xml, which you see on the very top of the output of 
phpinfo().

xslt seems not to be supported by your provider, dunno how you can still 
use it, but i heard of some php classes that do xml things without those 
modules, but dunno again if they do something with xslt, too.


what you need to get started must be said in conjunction with the task 
you have to solve, read the manual and find you a good tutorial if you 
just want to play around.

and look for xslt functions in the manual to find out more about this.


henning



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




Re: [PHP] session unset or unregister??

2002-04-12 Thread Henning

Rodrigo Peres wrote:
 

 if(isset($HTTP_GET_VARS['erase_data'])) {
 session_unregister('data');
 }
 
 but the code doesn't erase the var from session, and If i use
 session_unset('data') it erases all vars from session, that I don't want to.
 How to solve this?!??! i have started the session and used
 session_register('data','id').. to store the vars.



normally it should work exactly like that.

how do you tell the variable isn't unregistered when you run this?
did you check if the code in the if statement is executed at all?


henning


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




[PHP] compiling with all options

2002-02-27 Thread Henning Sprang

hy all,
is there an easy way to compile php with all possible extension and 
feature options, as far as they don't crash when used together, and, 
even better as far as the libs are available on the system?


tia,
henning


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




Re: [PHP] Php-gtk

2002-02-27 Thread Henning Sprang

hy leif

Leif K-Brooks wrote:

 I read the tutorial for it on the php-gtk site, but I didn't see a thing
 about how to run it? 
 
 


this is not the list to discuss this, please subscribe to php-gtk-general.

btw, afaik in the introduction part of the manual installation and 
tunning are described.

please post further questions on the other list, there are lotta people 
who help very quick,

henning


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




Re: [PHP] printing files

2002-02-13 Thread Henning Sprang

Hy,

John Gurley wrote:

 Just a quick question,
 is there a way to echo in your php code lines of a file that you specify.
 i.e. you want to output lines 1,4,7 of a certain text file


use the fopen and fread functions, to read lines from a file, only put 
the wanted lines into a string and output this string.

hth,
henning


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




Re: [PHP] Including a file using php //

2002-01-15 Thread Henning Sprang

louie miranda wrote:

 So u mean like this?
 
 
 ?php
 include('http://192.168.129.103/noc/chikkaps.txt');
 ?
 
 
 Only?, Im not good with this, can you give me some samples?



do you want to include the code in that file or read the content?

include is used to include code for execution,
if you wanna read the content of the file you have to use the fopen and 
fread functions, see the manual section filesystem functions.


HTH,
Henning



-- 
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] Including a file using php //

2002-01-15 Thread Henning Sprang

louie miranda wrote:

 Read the content
 I mean, echo it on the browser..


if you send a piece of code that supposedly doesn't do what you want I 
can't go and read the code to find out what you _really_ want to do.
if the code did what you wanted you didn't need to send it.

so it is useful for people willing to help you to spend a minute to 
describe what you want to do, like i want to use this piece of code to 
output file 'X' to the browser but it does only give me output 'Y' or 
error 'Z'.

examples of include and fopen/fread are to be foiund in the manual
at http://www.php.net/manual, use the search function to look for those 
words.

HTH,
henning






-- 
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] open a New Window

2002-01-14 Thread Henning Sprang

Simos Varelakis wrote:

 Hi to everybody
 
 I wonder if is posiblle to open a new predefined size window  (new html
 page) with php code.


This won't work with PHP, only with JavaScript Code which may be 
dynamically outputted by php, which means, you could open windows with a 
piece of javaScript, but you could save the size each individual user 
wants in a database and output the size part from there.

the Javascript Code that would open a new window would be something like:

window.open(datei.htm,Fenster1,width=310,height=400,left=0,top=0);

sorry, don't know a good JavaScript Reference in English or greek by 
now, you have to look for your own

Henning



-- 
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] Creating rich interfaces for web applications??

2002-01-14 Thread Henning Sprang

Geoff Caplan wrote:

 Hi folks
 
 I have been looking for a practical way to create rich dynamic forms in the
 client using PHP, and would appreciate any pointers to workable approaches.
 With the launch of .Net I suspect that customer expectations are going to
 change, and good old plain HTML will begin to look dated.

 
 I am thinking of client-side functionality such as lists that can sort and
 filter, cascading dropdowns, drag and drop, validation in the client that is
 double-checked on the server etc etc. I am doing quite large and complex
 applications, so there is no way to code the client side stuff by hand - I
 need some kind of dynamic library.
 
 This is for intranet use, so I will be able to specifiy the browser verion
 to be used, and any plugins required.


If you don't want to use HTML/CSS and are not bound to use a webbrowser,
you could try to use PHP-GTK - it lets you build GUI's very quickly and 
easily, and works on Win and UNix machines, the Data Processing can be 
done in the same way you always did when coding PHP.
It is in an early stage, but there are already some interesting 
applications, as a Mail Client and an editor.

look at http://gtk.php.net and subscribe to the Mailing Lists there if 
you run into problems.


 
 There seem to be all kinds of technologies emerging, but most of them are
 either too immature, too slow (such as Flash based solutions - see
 www.carels.com), or are based on Java.
 
 For all its shorcomings, some kind of XML/DHTML solution seems best, and I
 guess it will improve as Browsers catch up with CSS2.


hmm, my experience with JavaScript is not much better than with Java - 
both are error prone, lead to browser crashes, and are slow or just 
don't work, if things get real comlicated and beyond displaying a page 
with some text and links and rollovers.


 
 I have spotted a very nice Java/Tomcat solution, for example (see
 isomorphic.com), which shows what can be done. But the only DHTML/PHP
 library I can find is dynapi, which looks promising but is still a bit
 limited so far as functionality goes and the documentation is kinda thin.


aehm, above you are talking client-side, now here Java/Tomcat /PHP,
it's all server side... what is your _real_ problem?
Creating Lists and all that sort of things which are easily to program 
and maintain for developers - either client or server side, or what?
Are you just looking for a library that helps you to build forms and 
things like that dynamically?


henning







-- 
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] Creating rich interfaces for web applications??

2002-01-14 Thread Henning Sprang

Geoff Caplan wrote:

 Henning
 
 
I did not work a lot with applications in PHP-GTK until now to say
something about speed and reliability ( the list may answer those
questions, i am only working on the translation of the manual for now),
but I think it's worth a look at, and i know there are already some
people out there who use it in a commercial environment.

 
 I think PHP-GTK is a great project, but I really do need to create the
 interface on the server and send it to some kind of thin client.


It might seem that I am advocating PHP-GTK too much, but even this is 
possible. PHP-GTK Apps would run on any X or Windows System where you 
have the GTK Libs and PHP compiled - nothing more needed. I am not shure 
but it might even be very well that these both together still use less 
memory than a webbrowser - in RAM and on HD or when beeing fetched over 
the network at boot time.


When really want to write your application in PHP instead of C/C++ or 
maybe Java I would still consider it better than DHTML.

 
 I don't know if there is some kind of commercial plugin that does this and
 will work with PHP. You can do forms in Flash, and they seem to be stable,
 but they are much too slow.

What exactly is too slow with flash? dynamical genberation with action 
script?
You could generate your content and data with PHP and display  it with 
flash.


henning


-- 
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] xml dom support

2002-01-11 Thread Henning Sprang

Sandeep Murphy wrote:

 hi,
 
 I am running  PHPtriad on a win2k machine... when I run phpinfo() it
 displays  XMLACTIVE 


this means that the standart, expat based xml support ist active

but I keep getting an error Fatal error: Call to
 undefined function: xmldoc() in C:\apache\htdocs\example.php on line 24

 
 What needs to installed/configured ??



you need DOM XML support, i only don't know how to do this with win2k...


see http://www.php.net/manual/en/ref.xml.php

and

http://www.php.net/manual/en/ref.domxml.php

for more information about these two...

henning



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

2002-01-11 Thread Henning Sprang

Andrey Hristov wrote:

  Several months ago there were notes on few websites about phpcompiler.
  AFAIK it is not so good but it is something.
  Last week a man on php-dev said that he starts working on new php 
compiler but with different approach - to connect in one thing -
  php4ts.dll, php.exe, and the source code untouched(no compiling on it).
  It is interesting if one can make compiler for php to Java bytecode. 
I saw that there is a such compiler for Ada.


But, as i understood the question, he ist looking for something that
generates code which makes the php interpreter obsolete.

I think something like this doesn't exist. There are several ways to
generate bytecode, but this is still to be run with a special interpreter.

There are several approaches, whereof some have the goal to make
execution of code quicker and some others have the goal to give you
possibility to distribute your software without giving away the code in
readable form. I think there is an encoder from zend, too, to be found
at www.zend.com


my 2 cents

henning






-- 
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] removing an array element

2002-01-11 Thread Henning Sprang

Erik Price wrote:

 what function is used to remove an array element from an array?  Like 
 array_pop(), except one by which I can refer to the element by its 
 associative index rather than just the last element of the array.



 
 
 For more detail with what I'm doing, I have two versions of a select 
 listbox -- one that includes an option with selected=yes (if the 
 user is calling this page from submitting a form).  The other version is 
 for users who are NOT calling this page from submitting a form, i.e. for 
 the first time.
 
 I would like, in the first version (if ($formfilled)), to REMOVE the 
 element $temprow['div_name'] from the array $temprow so that it doesn't 
 appear a second time (in the WHILE loop), since it has already been 
 echoed above the WHILE loop.
 
 Is this even possible?



I would do it another way.

say you have all the possible choices in an array that come out of a 
database, and ypou want, if the user already selected one, this one to 
be selected, right?
Then i would set the selected atribute only if the value out of the 
database is the same as the one submitted by the form:

like this (omitting the surrounding html):

$query= select distinct * from sometable;

$result=mysql_query($query);

// the select field is named selectfield,

echo form name=\myform\ action=\$PHP_SELF\ Method=\post\;
echo select name=\selectfield\;

// the variable $selectfield is, if set the value submitted by the form
$selectfield = $_POST[selectfield];

while ($row=mysql_fetch_array($result)){
echo option;
// assuming the second element of this array holds your 
// choices then
if($selectfield == $row[1]){
echo  selected;
}
echo  . $row[1] . /option\n;
}
echo /select

echo input type=\submit\\n;
echo /form;




i think this is a more straightforward solution for your problem...


henning









-- 
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] Newbie - PHP MySQL

2002-01-11 Thread Henning Sprang

Ben Clumeck wrote:

 When using MySQL to Authenticate users for a specific directory (i.e.
 www.mysite.com/user) how would it know to go to that directory (/user).

  How would it know to not let someone access a file directory in that
  directory (i.e. www.mysite.com/user/page2.php)?

this question is too general - you should describe your idea of what you 
want to do and where your problem is a bit more.

In general is is you who would be responsible to write the code that 
checks if a user is authenticated and should have access to something, 
and you have to include that piece of code at the beginning of each page 
you want to limit access for.


If I am using MySQL to
 query a row in a table can how would it know to only let a specific user(s)
 have access to the information?
 


this either a mysql related question - as mysql deals with the problem 
that a user has to be authenticated within mysql_connect or 
mysql_pconnect to access some information - or it is a matter of your 
application design - if you want only special users to do something or 
to get some views of the data you queried from mysql you can go and
create a user table with users and poasswords, and a permission table 
where users are designated to specific tasks, then, before you show some 
data in your script, you ask the user for a password, look him up in 
your users table, and only let him view the things he is allowed to.

but, again, this is a very general answer on a general question, which 
might be the reason why nobody answered until now, to get some real 
useful answers or solutions to your problem you have to be more specific.

maybe you want to go through some basic tutorials first before doing 
such comlicated things and learn the basics of php and mysql before 
playing around with big applications, permissions for users, etc...

(sorry, got no URL for something lkike this at hand now, use google)

hope this still helps

henning


-- 
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_X_FORWARDED_FOR?

2002-01-10 Thread Henning Sprang


Hy,


[EMAIL PROTECTED] wrote:

 Hi,
 
 I just installed IIS 5.0 and PHP 4.1.1 on Win 2000, and I'm wondering what happened 
to the HTTP_X_FORWARDED_FOR? I doesn't seem to exist on my system. Is it just a 
variable that needs to be changed, or has it been removed from PHP? Thanks.



This has something to do with the way you access the machine - 
x-forwarder-for contains the private ip address of your client machine 
when calling the php pages through a proxy.
It has nothing to do with your php or server side configuration.

henning




-- 
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] binary data - MSSQL

2002-01-09 Thread Henning Sprang

Hy Peter,

Peter Lavender wrote:

 Hi Everyone,
 
 I did ask this earlier, but I have made some head way since, but I'm still
 not sure that I have things right.
 
 What datatype should I use for zip files?


You should use the blob type therefore


 
 How do I create a link to a file to be downloaded from the database?


first you need a php script that pulls the data out of the database and 
echoes an appropriate header, and after this all the binary data of your 
file, you would then link it and give the id or whatever you use to 
identify it in the database as parameter to this script.


 
 All the examples I have read all relate to images, which hasn't really
 helped.


it's exactly the same with zips as with images, the only difference is 
the header for the mime type which is image/gif for gif's and
application/zip for zips
If you already know everything for images out oif a Mysql, then i don't 
tell it again here - ask if you still have problems!

henning






-- 
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] echo problem NEW

2002-01-09 Thread Henning Sprang

Hy,



universal2001 wrote:

 Hi again!
 
 Thanks for the reply!
 
 I still have another question:

 
 so I tired to use (echo) like this:
 
 echo table border=0 cellpadding=0 cellspacing=0 width=639
   tr
 tdimg src=img_heading/spacer.gif width=25 height=1
 border=0/td
   /tr
   tr
 td colspan=11img name=index_r1_c1
 src=img_heading/index_r1_c1.gif width=639 height=5 border=0/td
 tdimg src=img_heading/spacer.gif width=1 height=5
 border=0/td
   /tr
   tr
 td rowspan=5img name=index_r2_c1
 src=img_heading/index_r2_c1.gif width=25 height=43 border=0/td
 /table;
 but it DOES NOT WORK.
 How do I get way with all of the quotation marks




1) you can escape each double quote with a backslash,
the first line of your thing woulkd then look like

echo table border=\0\ cellpadding=\0\ cellspacing=\0\ width=\639\

and so on

2) if you don't want this by any reason, you can use single quotes to 
mark the text you want to print out like in

echo 'table width=100%';

the difference is that with single quotes you will _not_ be able to use 
variable replacement in between the quotes, something like

?
$myvar=100;
echo table width=\$myvar\;
?

will output

table width=100%


while this:

?
$myvar=100;
echo 'table width=$myvar';
?

will output exactly

table width=$myvar


hth,
henning



-- 
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] echo problem NEW

2002-01-09 Thread Henning Sprang

Nicolas Costes wrote:

 Hellorghh !!!
 You'd better do like this :
 
 echo table border='0' cellpadding='0' cellspacing='0' width='639'

 

just another one - but i am too out of practice with html standarts to 
know if this is compliant ( a browser showing a result doesn't 
neccessary mean it's standarts compliant!)

henning





-- 
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] Connecting PHP to a remote mysql database

2002-01-08 Thread Henning Sprang

Hy,

Félix García Renedo wrote:

 Hello,
 How could I configure php to access to a remote mysql database?



just use the correct hostname of your remote host in

mysql_pconnect( HOST, USER, PASS);


henning




--
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] counting with dates (help!)

2002-01-08 Thread Henning Sprang

Sander Peters wrote:

 Hello,
 
 
 This is my problem:
 
 $today = date(Ymd, mktime(0,0,0, date(m),date(d),date(Y)));
 $last_week = date(Ymd, mktime(0,0,0, date(m),date(d)-7,date(Y)));
 echo ($today - $last_week);

 The result is a number like 8876 (20020107-20011231 = 8876)


which is completely correct.
with date as you use it up there you only generate numerical values in a 
format you specify, and then you substract those numericals from each 
other, echoing the rest of 8876


 But in date thinking it should be 7!


I think if you want to get the number of days you have to

1) substract the  mktime values you used in the date statement to get 
the difference in seconds

2) count how many days you have with this amount of seconds by dividing 
the seconds through 86400

date is a function to give you representations of a date and time at any 
given moment as expressed in unix time in a lot of different, 
configurable formats. after you generated a date representation with 
date, the program doesn't know anything at all about the date/time 
meanings of that string or number.

hth

henning




-- 
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] Connecting PHP to a remote mysql database

2002-01-08 Thread Henning Sprang

Félix García Renedo wrote:

 Sorry,
 I have an mistake.
 I want to configure php to connect to a remote mysql database and I want
 the options to configure php.



in configure it makes AFAIK no difference if you will be connecting to a 
 local or remote mysql db.

just use --with-mysql or --with-mysql=/PATH/TO/MYSQL/LIBS

see also the output of ./configure --help for more information

henning



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

2002-01-08 Thread Henning Sprang

Chris Grigor wrote:

 Right now your in the picture this is okay to check if the mailbox is above
 the size of 0. But what I really need help with is, say for instance I get 1
 message into the mailbox and the script runs, I only want it to run once for
 that message, however if another message comes in I need it to notify me...
 at the moment it runs every 10 mins and just keeps notifying me over  over.


you have to keep state before exiting the script in a filke or a 
database and then look up that state in the next run.

say you save something like

path 
size
 


/path/to/mailbox/hugo 
15kb
/path/to/mailbox/mary 
56kb


then you only send a message when the size of the mailbox changes again,
not when number of files in it is more than 1

mabye you need to use things like modification time instead of size, i 
don't know right now which is better.

You should _not_ use numbr of files, as when ypu save the state 1 file 
in mailbox it could be that the user fetched on file menawhile and 
another file has come in - your program doesn't register a change but it 
has changed very well...

HTH,
henning




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

2002-01-08 Thread Henning Sprang

Chris Grigor wrote:

 Hi Henning 
 
 If I use modification time, how would I use keep state before exiting (I
 have never done that aggghhh!)


i didn't do that before, too, I just can imagine how it should work :)

before exiting or right after sending the mail you would need to write 
the actual modification time of your directories or files into a 
database or file, like

FIRSTFILE 
2002-01-08 17:45
SECONDFILE 
2001-01-08 16:32


got it?
if not, what's the exact problem? Don't know how to write data to a file 
or databse?
don't know how to get modification time?


henning


-- 
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] Redirecting to a URL

2002-01-08 Thread Henning Sprang

Hy

Robert MacCombe wrote:

 Hi, how do I redirect to a different URL, e.g. as a result of an IF
 condition being true. I'm basically looking for a PHP version of the ASP -
 Response.Redirect(/otherpage.htm)



use the header function to send a location: header to the browser:



$redirect_url=http://www.nowhere.net/;;

if( $foobar== ){
header( Location: .$redirect_url );
}



henning


-- 
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] Sending variables between PHP pages

2002-01-04 Thread Henning Sprang

Am 04 Jan 2002 12:49:41 +0100 schrieb Berlina:
 Yes, Im thinking the same...
 :-((
 
 Thanks again Intruder
 
 
 - Original Message -
 From: Intruder [EMAIL PROTECTED]
 To: Berlina [EMAIL PROTECTED]; php-general-list
 [EMAIL PROTECTED]; php-dev-list [EMAIL PROTECTED];
 php-db-list [EMAIL PROTECTED]
 Sent: Friday, January 04, 2002 12:38 PM
 Subject: RE: [PHP] Sending variables between PHP pages
 
 
   Yes, thanks a lot, but i need to mantain the connection open for
manage
 a
   transaction, an everytime that I open a new database connection,
   the system
   begins a new transaction and I lose the last one.
   Do you understand, me?
   Do you know the way for do that?
 
  I think it is imposimble in web applications at all, because there
is no
  persistent connection between db server
  and web server + PHP service. You can try for example
mysql_pconnect()
  function (or it's analog for your db engine)
  but still I don't think it is possible ;(((
  Only applications can make this for you NOT PHP and Web ;(((

I don't see the problem? What do you really want to do?

Can't you go and use php sessions to save data generated in multiple
pageviews of the web application, and when you finished all data
collection from the user, at the last page you go and make your DB
transaction to save all the data.
If you worry that some data could be changed in the meantime you can
even add a timestamp column in your database and check if it's still the
same before doing something like, e.g. updating a database row on the
last page.
So i don't see why a transaction _must_ live over multiple pages and not
only start on the last one when input is finished.

Anyway, the last sentence is double wrong - you can make _real_ GUI
application with php-gtk, see gtk.php.net, and then, i can think of web
applications that _could_ do something like that, even if I don't know
one that does it - sure you could create a server side, web based
software that would let db connections and even transactions alive even
after a request and sending out the answer is done(which is the way php,
CGI Programs, and i suppose nearly all other Web based software works),
save the state of db connections as session data and use the same
database connection again with the next request, but i think that brings
some problems.
E.g. I could fire thousands of programs that stay alive on the server
just by sending some http requests - that wouldn't be very nice for
folks runnning the webservers.

Writing more clearly what the purpose of all that is migth bring me
another view of this all...


greets,
henning



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

2002-01-04 Thread Henning Sprang

Am 04 Jan 2002 14:53:18 -0200 schrieb JJVG:
 Hi,
 
 Is there a place where I can get the PHP Grammar?

http://download.php.net/manual/en/langref.php


have fun,
henning




-- 
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-gtk compile prob

2002-01-03 Thread Henning Sprang

Hy,
this is for [EMAIL PROTECTED], there you'll get answers I
think...





-- 
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 dependent on connection speed?

2002-01-03 Thread Henning Sprang

Am 03 Jan 2002 08:10:08 -0600 schrieb charlesk :
 Is the php engine slowed by users with a slow connection? 

it _should_ not under normal circumstances - but what problems are you
exactly experiencing?

henning





-- 
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] backtracing of includes

2001-12-28 Thread Henning Sprang

Hy,
I would like to know if there is a way to get information on the include
hierarchy of files in php, especially to find out where which file is
included and trace back the line from some file until the first called
php file.

My special case here and now is that I get an error that some function
is already declared and cannot be declared again because of this.
I know i must have included the file with that function somewhere
already, but as i have lots of nested includes I have trouble right now
to find the place where ist already happens.
I know I can prevent those things in future by using things as
require_once and so on, and i can search through all the code, making
yself a map on paper to see which file includes what, but what i really
want to know is, if i can ask some function to tell me where the
function which makes the error stated above and from where the file is
included, and from where this file again is include, going as far back
until i have my first-called php file.



I hope you can understand what i mean,

henning



-- 
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] backtracing of includes

2001-12-28 Thread Henning Sprang

Hy,

Am 28 Dec 2001 14:27:50 +0100 schrieb Jerry Verhoef (UGBI):
 Don't think that a option like this exists.
 
 But maybe you should consider using 
 
 include_once or 
 require_once
 
 Also before you define the function use the function_exist() and if the
 function already exists don't redecleare it.

That's what I wrote - I know I can use things like that, but I am
curious if there are other ways to find out which file is included by
what and which function is defined in which file - i didn't find answers
about that in the manual.

Meanwhile I found out what the real problem was, namely that a function
was declared inside a function, and the parent function was called
twice, resulting in an error. I think it's generally not recommended to
declare functions inside functions as I see no obvious reason now when
this should be useful, only that it can make things complicated as i saw
right now.(btw: this code does not come from myself, i am just making
additions to it)

So, I am still curious if and how one can trace function definitions and
includes in a convenient way.

henning


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

2001-10-02 Thread Henning Støverud

Hi

I've made an upload system at my ISP's webserver, but it seems like they
have done something with the UPLOAD_TMP_DIR cause I get this error message:

PHP Warning:  File upload error - unable to create a temporary file in
Unknown on line 0

Can I set the UPLOAD_TMP_DIR myself inside a PHP script, or is it only the
sysadmin who can do that?
If I can't do anything about this problem, is it another way to upload
files?

Regards,
--
Henning Støverud ([EMAIL PROTECTED])
http://www.stoverud.com
Tlf: +47 91 68 05 68
Fax: +47 85 02 16 31


-- 
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] template solutions?

2001-05-01 Thread Henning Kilset Pedersen

Nope, it doesn't support nested loops (or dynamic blocks, as it's called
now). But PHPLib templates supports this. PHPlib covers a lot of other stuff
as well, but I haven't bothered to take a look at that yet, as Fasttemplate
is good enough for my use ;-)

http://phplib.netuse.de is their URL.

Regards,
--
Henning Kilset Pedersen
Anarchy Online Server Operations
Oracle, PHP, e-Commerce etc.
Funcom Oslo AS

phone + 47 22 92 58 40
cell  + 47 91 66 40 30
email [EMAIL PROTECTED]

-Original Message-
From: Steven Haryanto [mailto:[EMAIL PROTECTED]]
Sent: 1. mai 2001 17:50
To: Henning Kilset Pedersen; 'Fabian Raygosa'; [EMAIL PROTECTED]
Subject: RE: [PHP] template solutions?


Cool. I didn't know that.

Does FastTemplate support nested loop and ifs?

Steve

At 5/1/2001 10:33 PM, Henning Kilset Pedersen wrote:
Fasttemplate supports loops and if's.

You set a dynamic block like so:

!-- BEGIN DYNAMIC BLOCK : rowset --
TR
  {ROWCONTENT}
/TR
!-- END DYNAMIC BLOCK : rowset --

And then in the PHP code that parses this html template (.tpl, for example)
file, you do a $tpl-assign (.ROWCONTENT, rowdata);

and loop over that. the .ROWCONTENT means that you're ADDING data to a
variable that already exists. Replace rowdata with the data for the row
in
question.

Isn't this what you want??



-- 
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] template solutions?

2001-05-01 Thread Henning Kilset Pedersen

Fasttemplate supports loops and if's.

You set a dynamic block like so:

!-- BEGIN DYNAMIC BLOCK : rowset --
TR
 {ROWCONTENT}
/TR
!-- END DYNAMIC BLOCK : rowset --

And then in the PHP code that parses this html template (.tpl, for example)
file, you do a $tpl-assign (.ROWCONTENT, rowdata);

and loop over that. the .ROWCONTENT means that you're ADDING data to a
variable that already exists. Replace rowdata with the data for the row in
question.

Isn't this what you want??

Regards,
--
Henning Kilset Pedersen
Anarchy Online Server Operations
Oracle, PHP, e-Commerce etc.
Funcom Oslo AS

-Original Message-
From: Steven Haryanto [mailto:[EMAIL PROTECTED]]
Sent: 30. april 2001 21:09
To: Fabian Raygosa; [EMAIL PROTECTED]
Subject: Re: [PHP] template solutions?


At 5/1/2001 01:43 AM, Fabian Raygosa wrote:
Maybe this is what you are looking for
http://www.thewebmasters.net/php/FastTemplate.phtml

Nope. I was looking for a template that supports loops and
IFs. Someone pointed me to php dreamtime:

  http://www.phptemplates.org/

which is a cool project, by the way.

Btw, I think I might need some extra tags to my template
language so I'm going to hack this on by myself at the
time being.

Thanks,
Steve


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

2001-05-01 Thread Henning Kilset Pedersen

http://www.scibit.com

Mascon - it's great for MySQL, but doesn't support any other databases. If
you want for other DB's as well, use something like Embarcadero ER/Studio at
http://www.embarcadero.com - that's horrendously expensive, though.


--
Henning Kilset Pedersen
Anarchy Online Server Operations
Oracle, PHP, e-Commerce etc.
Funcom Oslo AS

-Original Message-
From: Hassan Arteaga [mailto:[EMAIL PROTECTED]]
Sent: 1. mai 2001 19:59
To: Php (E-mail)
Subject: [PHP] HELP 


Hi all !!!

I need URL to download some visual tool to create Databases, tables,
etc..for mySQL

Thanks 

--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[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] PHP Graph class/library anywhere?

2001-05-01 Thread Henning Kilset Pedersen

http://www.zend.com  -- Resources -- Code Gallery -- Look Around ;-)

There's tons of them in there.



--
Henning Kilset Pedersen
Anarchy Online Server Operations
Oracle, PHP, e-Commerce etc.
Funcom Oslo AS
-Original Message-
From: indrek siitan [mailto:[EMAIL PROTECTED]]
Sent: 1. mai 2001 20:08
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Graph class/library anywhere?


Hi,

is there a PHP class/library available anywhere, that supports
dynamic creation of different graphs? I need 2D bar graph and
pie graph support.

i found the VH Graph (http://www.vhconsultants.com/graph/graph.htm),
but they want $100 for their 2.x version. i'd prefer a free one
(i'm sure there must be a couple floating around) :)


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] How to execute a php scripts

2001-04-27 Thread Henning Kilset Pedersen

Bertrand,

if you're serious about trying to get help for something, it would be very
helpful if you ask a more specific question, with code samples of what
you've done so far.

There are excellent tutorials on this subject, at http://www.phpbuilder.com,
http://www.phpbeginner.com, http://www.zend.com, http://www.devshed.com etc.
etc. Start with the devshed one, click on the PHP area, and find your way
through PHP101. It takes a few hours to get into it, but it will be worth
your time, believe me.

You also have to tell us if you have phpapache (or another webserver) on
the MySQL computer, or if you're running PHP and the webserver on Windows
and MySQL on a different (Linux, as you said) computer. These things are
important for things such as user access rights in MySQL (the default mysql
account doesn't have privileges to access the database from a remote host,
only @localhost).


Regards,
Henning Pedersen
Funcom Oslo



-Original Message-
From: Bertrand TACHAGO [mailto:[EMAIL PROTECTED]]
Sent: 27. april 2001 18:45
To: [EMAIL PROTECTED]
Subject: [PHP] How to execute a php scripts


Hi,

I want to know how to execute a php scripts which update a MySQL
database.

I am working on Win 98 and MySQL is install on Linux on another
computer.

Thank You in Advance.


--
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] Payflow, story continued

2001-04-26 Thread Henning Kilset Pedersen

Yup, I'm reading the other posts.

But the fact of the matter is, I don't have time to wait for a new
extension. I need to develop a solution *NOW*.

Thus, I will continue full-steam ahead with what I'm doing. I'll gladly
switch to the new extension once/if it becomes available.

Regards,
Henning
Funcom Oslo AS


-Original Message-
From: Robert Covell [mailto:[EMAIL PROTECTED]]
Sent: 25. april 2001 22:55
To: Dan Harrington; Henning Kilset Pedersen; [EMAIL PROTECTED]
Subject: RE: [PHP] Payflow, story continued


Is anybody reading the other posts about the work in progress being done by
John?  This extra work seems pointless if it is being looked into by the PHP
development team.

Sincerely,

Robert T. Covell
President / Owner
Rolet Internet Services, LLC
Web: www.rolet.com
Email: [EMAIL PROTECTED]
Phone: 816.210.7145
Fax: 816.753.1952

-Original Message-
From: Dan Harrington [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 3:52 PM
To: Henning Kilset Pedersen; [EMAIL PROTECTED]
Subject: RE: [PHP] Payflow, story continued



Congratulations,

So you've overcome the PNVersion demons, now to others.
What you need to do now is to locate the f73e89fd.0 file found in the PFPro
library and make sure it is present in your OpenSSL or other SSL certs
directory.
It should be in the same directory as your server cert(s).  That is what
is generating the response code -31.

That file is (in the SDK 3.0) found in

verisign/payflowpro/linux/certs/f73e89fd.0

You need that to be in your SSL Certs directory in order for PHP to
recognize
that it exists, and present it to the Payflow Pro when it asks for it.

 Verisign response code was -31, which means: The certificate chain did not
 validate, no local certificate found The transaction request: Array
 [USER]
 = mylogin [PWD] = mypassword [TRXTYPE] = S [TENDER] = C [AMT] = 1.5
 [ACCT] = 4111 [EXPDATE] = 0904 ) The response: Array
  [RESULT] = -31 [RESPMSG] = The certificate chain did not validate, no
 local certificate found )

 Hmm. Certificate not found. I think that is in the directory that I
 specified for --with-pfpro=., under the ./certs subdirectory there. I
 just downloaded the test version, tho. I haven't found any information
from
 Verisign on how to update/change that certificate if needed, or any
 information from PHP's manuals on how to choose where the cert is located.
 Should it be in some PHP includable directory, for example?

 Regards,
 Henning


--
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] Payflow Pro extension in php 4.0.4pl1

2001-04-25 Thread Henning Kilset Pedersen

Hiya all.

I'm trying to use the Pay flow pro (--with-pfpro) extension on PHP4.0.4pl1
on Redhat 6.2 glibc2.1.

There seems to be a problem with the pfpro 3.0 SDK not being compatible with
PHP's header and .c files for pfpro. Are anyone aware of somewhere I can get
the 2.11 pfpro SDK (which should be compatible, according to what I've
hear) - or, ofcourse, even better - has anyone gotten the 3.0 SDK to work
with PHP?

I've also tried the newest CVS build of PHP, but it's still the same ol',
same ol'...

Regards,
Henning Pedersen
Funcom Oslo AS


-- 
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] Payflow Pro extension in php 4.0.4pl1

2001-04-25 Thread Henning Kilset Pedersen

Wow, that was quick, Dan :)

Yeah, I'm having apache compile-time problems that stops on PNVersion() when
reading some PHP include/c file I can't remember the name of right now :)

Where did you edit it out? In the pfpro SDK files themselves, or in PHP's
header files?

Regards,
Henning


-Original Message-
From: Dan Harrington [mailto:[EMAIL PROTECTED]]
Sent: 25. april 2001 21:47
To: Henning Kilset Pedersen; [EMAIL PROTECTED]
Subject: RE: [PHP] Payflow Pro extension in php 4.0.4pl1


Hello there,
I have gotten the 3.0 SDK to work, all I had to do was edit out the version
function
and it compiled just fine.

Verisign was of ABSOLUTELY NO HELP in this matter.  They simply said we
don't
support PHP at all and left me to flounder.  So I edited the source and got
it
working after a few days of beating my head on it.

What types of problems are you having?

Dan

 -Original Message-
 From: Henning Kilset Pedersen [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 25, 2001 1:20 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Payflow Pro extension in php 4.0.4pl1


 Hiya all.

 I'm trying to use the Pay flow pro (--with-pfpro) extension on PHP4.0.4pl1
 on Redhat 6.2 glibc2.1.

 There seems to be a problem with the pfpro 3.0 SDK not being compatible
with
 PHP's header and .c files for pfpro. Are anyone aware of somewhere I can
get
 the 2.11 pfpro SDK (which should be compatible, according to what I've
 hear) - or, ofcourse, even better - has anyone gotten the 3.0 SDK to work
 with PHP?

 I've also tried the newest CVS build of PHP, but it's still the same ol',
 same ol'...

 Regards,
 Henning Pedersen
 Funcom Oslo AS


 --
 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] Payflow Pro extension in php 4.0.4pl1

2001-04-25 Thread Henning Kilset Pedersen

Well, I didn't comment out the function itself, just the PNVersion() calls
inside the function, meaning that it will just turn out empty if you use the
PHP function that shows you pfpro's version :)

(I hope)

Oh, and btw, Dan, it seems to work fine :)

Regards,
henning


-Original Message-
From: Robert Covell [mailto:[EMAIL PROTECTED]]
Sent: 25. april 2001 21:56
To: Henning Kilset Pedersen; 'Dan Harrington'; [EMAIL PROTECTED]
Subject: RE: [PHP] Payflow Pro extension in php 4.0.4pl1


I would not edit the files themselves as it causes server instabilities.
This is what I did and found that it did indeed work, for awhile, crashing
miserably.  Something like this is far from the production ready ecommerce
system that I would desire for my company.  We moved to the beta SDK until
PHP can be updated.

Ironically, I just got an update from PHP about a bug report I submitted a
couple of months ago on this subject.  The details follow:

Quote 1:
ID: 9530
Updated by: jdonagher
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Verisign Payflow Pro related
PHP Version: 4.0.4pl1
Assigned To: [EMAIL PROTECTED]
Comments:

Since I work on this extension for my company, work on
this will progress when Verisign converts our account from
v2 to v3. I've received notification of this; it will be
within the next couple weeks.

Quote 2:
ID: 9530
Updated by: jdonagher
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Assigned
Bug Type: Verisign Payflow Pro related
PHP Version: 4.0.4pl1
Assigned To: [EMAIL PROTECTED]
Comments:

As a sidenote, commenting out the pfpro_version function
will not solve the problem. There are other features that
the v3 SDK implements which this extension does not. The
extension does need some work.



Sincerely,

Robert T. Covell
President / Owner
Rolet Internet Services, LLC
Web: www.rolet.com
Email: [EMAIL PROTECTED]
Phone: 816.210.7145
Fax: 816.753.1952

-Original Message-
From: Henning Kilset Pedersen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 2:52 PM
To: 'Dan Harrington'; [EMAIL PROTECTED]
Subject: RE: [PHP] Payflow Pro extension in php 4.0.4pl1


Wow, that was quick, Dan :)

Yeah, I'm having apache compile-time problems that stops on PNVersion() when
reading some PHP include/c file I can't remember the name of right now :)

Where did you edit it out? In the pfpro SDK files themselves, or in PHP's
header files?

Regards,
Henning


-Original Message-
From: Dan Harrington [mailto:[EMAIL PROTECTED]]
Sent: 25. april 2001 21:47
To: Henning Kilset Pedersen; [EMAIL PROTECTED]
Subject: RE: [PHP] Payflow Pro extension in php 4.0.4pl1


Hello there,
I have gotten the 3.0 SDK to work, all I had to do was edit out the version
function
and it compiled just fine.

Verisign was of ABSOLUTELY NO HELP in this matter.  They simply said we
don't
support PHP at all and left me to flounder.  So I edited the source and got
it
working after a few days of beating my head on it.

What types of problems are you having?

Dan

 -Original Message-
 From: Henning Kilset Pedersen [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 25, 2001 1:20 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Payflow Pro extension in php 4.0.4pl1


 Hiya all.

 I'm trying to use the Pay flow pro (--with-pfpro) extension on PHP4.0.4pl1
 on Redhat 6.2 glibc2.1.

 There seems to be a problem with the pfpro 3.0 SDK not being compatible
with
 PHP's header and .c files for pfpro. Are anyone aware of somewhere I can
get
 the 2.11 pfpro SDK (which should be compatible, according to what I've
 hear) - or, ofcourse, even better - has anyone gotten the 3.0 SDK to work
 with PHP?

 I've also tried the newest CVS build of PHP, but it's still the same ol',
 same ol'...

 Regards,
 Henning Pedersen
 Funcom Oslo AS


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Count....

2001-04-25 Thread Henning Kilset Pedersen

Lookup the mysql_numrows function (think that's the correct spelling, I'm
using Oracle now ;-) - and go from there. Put in an

if ($count=mysql_numrows($query)) {
  // put whatever message/form/whatever you want to show the user
here
  }

for example, and put that directly below your $query = mysql_query... line.

Maybe make it like this instead:

if ($count=mysql_numrows($query)) {
  // put whatever message/form/whatever you want to show the user
here
  } else {
   while ($row 

etc.

I never decided on those elses and elseifs :)

Regards,
Henning Pedersen
Funcom Oslo


-Original Message-
From: Rafael Faria [mailto:[EMAIL PROTECTED]]
Sent: 25. april 2001 21:36
To: [EMAIL PROTECTED]
Subject: [PHP] Count


I'm doing a seach function... everything is okbut i wanna put something
like Use more specific terms when the search don't have anything to
show. but i can't do that can someone helpme?

i'm doing that!
=

 $query = mysql_query(select * from Newsletter_Members where
Newsletter_Members.email like '%$search%' order by id);

  while ($row = mysql_fetch_row($query)) {

 echo tr bgcolor=#DD\n;
 echo td align=centerinput type=checkbox name=id[]
value=$row[0]/td\n;
 echo td align=centerfont size=2
face=verdananbsp;$row[0]nbsp;/font/td\n;
 echo td align=centerfont size=2 face=verdananbsp;a
href=mailto:$row[1]$row[1]/anbsp;/font/td\n;
 echo td align=centerfont size=2 face=verdanaa
href=\javascript:openwin('editmember.php?email=$row[1]id=$row[0]','adicion
ar','400','110')\Editar/a/font/td\n;
 echo /tr\n;

  }

===

how can i make if doen't match anything say it doen't match anything ?






---

[ r a f a e l   f a r i a] _
[EMAIL PROTECTED]
WebMaster Universo Online - http://www.uol.com.br
Phone # +55 11 3038-8665


--
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] Payflow, story continued

2001-04-25 Thread Henning Kilset Pedersen

Dan and others, following this thread;
Here is the result of my pfpro_version() call :




Yup, that's right. Blank, stare, squiddly-squat, etc. Which is what I
intended.
However, here is the result of the test script for the function provided in
the PHP4.0.4 manual, script is here:

?php

pfpro_init();

$transaction = array(USER   = 'mylogin',
 PWD= 'mypassword',
 TRXTYPE= 'S',
 TENDER = 'C',
 AMT= 1.50,
 ACCT   = '4111',
 EXPDATE= '0904'
 );

$response = pfpro_process($transaction);

if (!$response) {
  die(Couldn't establish link to Verisign.\n);
}

echo Verisign response code was .$response[RESULT];
echo , which means: .$response[RESPMSG].\n;

echo \nThe transaction request: ;
print_r($transaction);

echo \nThe response: ;
print_r($response);

pfpro_cleanup();

?


and result is here:

Verisign response code was -31, which means: The certificate chain did not
validate, no local certificate found The transaction request: Array ( [USER]
= mylogin [PWD] = mypassword [TRXTYPE] = S [TENDER] = C [AMT] = 1.5
[ACCT] = 4111 [EXPDATE] = 0904 ) The response: Array
 [RESULT] = -31 [RESPMSG] = The certificate chain did not validate, no
local certificate found )

Hmm. Certificate not found. I think that is in the directory that I
specified for --with-pfpro=., under the ./certs subdirectory there. I
just downloaded the test version, tho. I haven't found any information from
Verisign on how to update/change that certificate if needed, or any
information from PHP's manuals on how to choose where the cert is located.
Should it be in some PHP includable directory, for example?

Regards,
Henning





-- 
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] Count.... --oops, addendum

2001-04-25 Thread Henning Kilset Pedersen


that should ofcourse be if(!$count=mysql_numrows($query))  {...

(put a ! directly infront of $count

-Original Message-
From: Henning Kilset Pedersen [mailto:[EMAIL PROTECTED]]
Sent: 25. april 2001 21:42
To: 'Rafael Faria'; [EMAIL PROTECTED]
Subject: RE: [PHP] Count


Lookup the mysql_numrows function (think that's the correct spelling, I'm
using Oracle now ;-) - and go from there. Put in an

if ($count=mysql_numrows($query)) {
  // put whatever message/form/whatever you want to show the user
here
  }

for example, and put that directly below your $query = mysql_query... line.

Maybe make it like this instead:

if ($count=mysql_numrows($query)) {
  // put whatever message/form/whatever you want to show the user
here
  } else {
   while ($row 

etc.

I never decided on those elses and elseifs :)

Regards,
Henning Pedersen
Funcom Oslo


-Original Message-
From: Rafael Faria [mailto:[EMAIL PROTECTED]]
Sent: 25. april 2001 21:36
To: [EMAIL PROTECTED]
Subject: [PHP] Count


I'm doing a seach function... everything is okbut i wanna put something
like Use more specific terms when the search don't have anything to
show. but i can't do that can someone helpme?

i'm doing that!
=

 $query = mysql_query(select * from Newsletter_Members where
Newsletter_Members.email like '%$search%' order by id);

  while ($row = mysql_fetch_row($query)) {

 echo tr bgcolor=#DD\n;
 echo td align=centerinput type=checkbox name=id[]
value=$row[0]/td\n;
 echo td align=centerfont size=2
face=verdananbsp;$row[0]nbsp;/font/td\n;
 echo td align=centerfont size=2 face=verdananbsp;a
href=mailto:$row[1]$row[1]/anbsp;/font/td\n;
 echo td align=centerfont size=2 face=verdanaa
href=\javascript:openwin('editmember.php?email=$row[1]id=$row[0]','adicion
ar','400','110')\Editar/a/font/td\n;
 echo /tr\n;

  }

===

how can i make if doen't match anything say it doen't match anything ?






---

[ r a f a e l   f a r i a] _
[EMAIL PROTECTED]
WebMaster Universo Online - http://www.uol.com.br
Phone # +55 11 3038-8665


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