Re: [PHP] Strange string stuff -- maybe everything is ending...

2012-12-22 Thread Stefan Wixfort

On 22.12.2012 00:31, Bastien wrote:


On 2012-12-21, at 5:05 PM, Ken Robinson kenrb...@rbnsn.com wrote:


A much easier way to do this would be to use a temporary array and then explode:

$tmp = array();
while($row = mysql_fetch_array($result)) // pulling stuff from a 
database
{
$tmp[] = $row['category'];
}

$topic = explode('~',$tmp); // put the delimiter between each entry
echo($topic);   // this result is used in an AJAX script




Shouldn't that be implode to convert the array to string with the delimiter?


Bastien



Yes, it should be implode().

Stefan

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



Re: [PHP] Friday - Return of Brain Teasers

2012-10-06 Thread Stefan Wixfort

On 06.10.2012 03:08, Tamara Temple wrote:

On Fri, 2012-10-05 at 22:50 +0200, iostream wrote:

If you want to execute some code...

I'm sure you've all heard of the new goes to operator by now, but I
hope it might be new to somebody.

$i = 10;
while ($i -- 0) { // while $i goes to 0
  echo $i .\n;
}


Okay, I haven't heard of it, and I don't get it. AFAIK, this operator
does not exist, but I don't get the trick that's being applied.




while ($i--  0)

should clearify things

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



Re: [PHP] Need help to understand a code

2012-09-22 Thread Stefan Wixfort

On 22.09.2012 12:34, Ashickur Rahman Noor wrote:

Hi all

I need some help to understand a code. The code is like this

$result = mysql_query($sSQL) or die(err:  . mysql_error().$sSQL);

 if($row = mysql_fetch_array($result))
 {
   foreach($row as $key =$value){ $$key=$value;}
 }



I don't get the code from the foreach loop.


I assume that you mean the meaning of $$key = $value.
This is a variable variable[1]
This means if you have a key in your array named dino then you assign 
$dino the value of $value for the current row.


so: $key = 'dino', $value = 'saur'
= $$key = $value = $$key = 'saur' = $dino = 'saur'

Hope this was somewhat helpful and understandable.

[1] http://php.net/manual/en/language.variables.variable.php


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



Re: [PHP] What's happened to our newsgroup?

2012-06-26 Thread Stefan Wixfort

On 26.06.2012 23:48, Simon J Welsh wrote:


On 27/06/2012, at 9:45 AM, Daniel Brown wrote:


On Tue, Jun 26, 2012 at 5:42 PM, Matijn Woudt tijn...@gmail.com wrote:


Isn't everyday friday in summer? ;)


If it is, then it could be argued that every day is a Monday in
winter --- and right now, those poor folks in the southern hemisphere
(I'm looking at you, Thiago Pojda) are in a season of endless Mondays.

--
/Daniel P. Brown



So glad I take Mondays off then.


Clever gi... er guy...



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



[PHP] REMINDER: Month of PHP Security 2010 - CALL FOR PAPERS - Only 3 weeks left

2010-03-21 Thread Stefan Esser
Month of PHP Security 2010 - CALL FOR PAPERS


Three years ago, in March 2007, the Hardened-PHP project had organized
the Month of PHP Bugs. During one month more than 40 vulnerabilities in
the PHP interpreter were disclosed in order to improve the overall
security of PHP. Now, three years later, SektionEins GmbH  will
continue in the same spirit and organize the Month of PHP Security.

The intention of the Month of PHP Security is to gather the best
research and articles about PHP security topics from the security
community and share them with the rest of the world. This time the goal
is not only to improve the security of PHP itself and applications
directly by fixing security bugs, but also to help PHP developers
around the world to write better and more secure PHP applications.

The Month of PHP Security will be held in May 2010 by SektionEins
GmbH. During the month of May all qualifying entries will be published
at http://php-security.org day by day.


CFP Committee
-
The CFP committee for the Month of PHP Security consists of

1) Johann-Peter Hartmann
2) Stefan Esser
3) Fukami
4) Ben Fuhrmannek

The CFP committee will review all submissions and select the list of
articles that will be published on http://php-security.org


Accepted Topics/Articles

* New vulnerability in PHP [1]
  (not simple safe_mode, open_basedir bypass vulnerabilities)
* New vulnerability in PHP related software [1]
  (popular 3rd party PHP extensions/patches)
* Explain a single topic of PHP application security in detail
  (such as guidelines on how to store passwords)
* Explain a complicated vulnerability in/attack against a PHP
  widespread application [1]
* Explain a complicated topic of attacking PHP (e.g. explain how to
  exploit heap overflows in PHP's heap implementation)
* Explain how to attack encrypted PHP applications
* Release of a new open source PHP security tool
* Other topics related to PHP or PHP application security

[1] Articles about new vulnerabilities should mention possible
fixes or mitigations.


Responsible Disclosure
--
In case of submitted vulnerabilities SektionEins GmbH will contact
the security team of the software vendor after the submission deadline
and share the vulnerability information with them. Along with the
vulnerability information SektionEins will provide the name of the
submitting party in order to give proper credits.


Prizes
--
At the end of May the CFP committee will review the published
material and determine the best entries. Selected winners will
get the following prizes.

   1.   1000 EUR + Syscan Ticket + CodeScan PHP License

   2.   750 EUR + Syscan Ticket

   3.   500 EUR + Syscan Ticket

   4.   250 EUR + Syscan Ticket

   5.-6.CodeScan PHP License
   
   7.-16.   Amazon Coupon of 65 USD/50 EUR

SektionEins reserves the right to disqualify any submitted entry.
While employees of SektionEins can and will submit entries for
the Month of PHP Security they are excluded from receiving prizes.

The 1000 EUR cash prize and the Syscan tickets were generously
sponsored by Syscan. CodeScan PHP Licenses were sponsored by
CodeScan Limited. All other cash and non-cash prizes are sponsored
by SektionEins.

The winners of the Syscan tickets can choose one of the four
Syscan 2010 conferences to go to. Syscan Tickets include free
admission to the conference, speaker's dinner and speaker party.
Hotel and travelcosts are NOT included.

Please note that non-cash prizes cannot be changed into cash prizes.


Submission
--
Submissions should be sent to c...@php-security.org and consist of the
following information:

1) Name and contact information (e-mail, postal address)
2) Employer and/or affiliations
3) Article about one of the allowed topics (at least 1000 words)
4) Optionally additional material like slides, whitepaper in PDF format

All submissions must be in English. The preferred delivery format is
plain text or HTML, but PDF is also accepted. Please pack all the
required items (pictures, text, ...) in a ZIP archive and submit this
ZIP archive by email.

Deadline for submissions is April 11, 2010.


Additional Information
--
After submission SektionEins GmbH will acknowledge submissions with
a signed email. If you do not receive such an email within one week
after submission, then please contact us at c...@php-security.org
again.

By submitting your article you are granting SektionEins GmbH the rights
to reproduce, distribute, advertise and show your article including but
not limited to http://php-security.org, printed and/or electronic
advertisements, and all other media. However you are still allowed to
publish your own work in whatever way you want.


Thanks
--
We would like to thank Syscan and Coseinc for generously offering
1000 EUR cash prize and four tickets to Syscan. If you are interested
in the latest and greatest security

Re: [PHP] PHP/MYSQL/ Encrypting Sensetive information

2009-04-17 Thread Stefan Langwald
MySQLs own Function AES_(EN|DE)CRYPT is pretty cool for this case.
--

Stefan Langwald



2009/4/17 דניאל דנון danondan...@gmail.com:
 If its by a user-basis, something that can be a bit risky but possible - You
 can encrypt it, password is hashed on database, and the key to the other
 data is the un-encrypted password..

 On Fri, Apr 17, 2009 at 5:00 PM, Russell Jones rjon...@gmail.com wrote:

 We are looking at a project where we will potentially need to store
 sensetive information in a few fields of a MySQL table. Any recommendations
 on where to look for best practices in doing this? for encrypting the data,
 etc.? We will need to be able to decrypt the data as well, although this
 can
 probably be done locally, so hashing alone is not really an option.

 Russell Jones




 --
 Use ROT26 for best security


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



[PHP] Problem with SOAP and (maybe) VISTA?

2008-08-08 Thread Stefan Langwald
Hello folks,

I'd try the PHP docs example from
http://de.php.net/manual/de/function.soap-soapserver-handle.php

 ?php
function test($x)
{
return $x;
}

$server = new SoapServer(null, array('uri' = http://test-uri/;));
$server-addFunction(test);
$server-handle();
?

If I open the test.php (with FF) on a linux server I get
SOAP-ENV:Envelope
−
SOAP-ENV:Body
−
SOAP-ENV:Fault
faultcodeSOAP-ENV:Server/faultcode
faultstringBad Request. Can't find HTTP_RAW_POST_DATA/faultstring
/SOAP-ENV:Fault
/SOAP-ENV:Body
/SOAP-ENV:Envelope

If I open the test.php on a vista server I get nothing. A blank site. The
logs don't have any error messages for me.
error_reporting  = E_ALL

Could it be a bug of php or ?

Thanks
Stefan


Re: [PHP] loosing session in new window (IE only)

2008-03-26 Thread Stefan Langwald
href=person.php?id=123SESSIONID=... maybe.. ev0l but works..



2008/3/26, Lamp Lists [EMAIL PROTECTED]:

  --- Richard Lynch [EMAIL PROTECTED] wrote:

   On Tue, March 25, 2008 4:07 pm, Lamp Lists wrote:
- Original Message 
From: Andrew Ballard [EMAIL PROTECTED]
To: PHP General list php-general@lists.php.net
Sent: Tuesday, March 25, 2008 3:41:35 PM
Subject: Re: [PHP] loosing session in new window
   (IE only)
   
On Tue, Mar 25, 2008 at 3:49 PM, Lamp Lists
   [EMAIL PROTECTED]
wrote:
hi,
 i have a list of people on one page. each row,
   on the end has link
a href=person.php?id=123 target=_blankview
   details/a.
 it's requested to open detail page in new
   window.
 very few people complained they can't open
   detail page. all of them
use IE.
 I wasn't able to reproduce the error, though
   using GoToMeeting I
was able to look while customer was doing it.
 I put session info on screen to see what's going
   on and found that
new window doesn't have session info from old
   window?!? like, new
window - new session.
   
 does anybody knows anything about this?
   
 thanks.
   
 -ll
   
If they open a new window by clicking on IE (say,
   on the desktop, the
QuickLaunch bar, or the Start menu), Windows
   actually opens a new,
totally separate process of IE along side the
   first. The new one will
share any persistent cookies with the first, since
   they are written to
the file system, but sessions do not usually use
   persistent cookies.
As long as your users are opening the new window
   by clicking a link or
by pressing  Ctrl+N from the first window, the
   session information
*should* remain in tact.
   
Andrew
   
should - but don't :D
you're right and  I understand opening new window
   from desktop
starts new process, but this is happening after
   visitor hits the link
detail view and that is confusing :(
  
   WILD GUESS ALERT!
  
   Perhaps the MS version of open popup in new
   tab/window is to start a
   whole new process?
  
   --
   Some people have a gift link here.
   Know what I want?
   I want you to buy a CD from some indie artist.
   http://cdbaby.com/from/lynch
   Yeah, I get a buck. So?
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  


 exactly.
  now, what would be my solution to keep session info in
  new window?


  -ll


   
 
  Be a better friend, newshound, and
  know-it-all with Yahoo! Mobile.  Try it now.  
 http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ



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




-- 
Mit freundlichen Grüßen

Stefan Langwald


RE: [PHP] Parse domain from URL

2007-06-06 Thread Stefan Wixfort

 From: Brad Fuller [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 06, 2007 5:44 PM
 Subject: [PHP] Parse domain from URL
 
 Hey guys,
 
 I'm faced with an interesting problem, and wondering if there's an easy
 solution.
 
 I need to strip out a domain name from a URL, and ignore subdomains (like
 www)
 
 I can use parse_url to get the hostname. And my first thought was to take
 the last 2 segments of the hostname to get the domain.  So if the URL is
 http://www.example.com/
 Then the domain is example.com.   If the URL is http://example.org/ then
 the domain is example.org.
 
 This seemed to work perfectly until I come across a URL like
 http://www.example.co.uk/
 My script thinks the domain is co.uk.
 
 So I added a bit of code to account for this, basically if the 2nd to last
 segment of the hostname is co then take the last 3 segments.
 
 Then I stumbled across a URL like http://www.example.com.au/
 
 So it occurred to me that this is not the best solution, unless I have a
 definitive list of all exceptions to go off of.
 
 Does anyone have any suggestions?
 
 Any advice is much appreciated.
 
 Thanks,
 Brad
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

Maybe use some regexp like this:
$url = http://www.a-domain.co.uk;

$domain = preg_match( !^(http://)([-a-z0-9]+(?:\.[-a-z0-9]+)*)$!i ); //
you will get www.a-domain.co.uk // So u can search for www. In front of
the string to replace it or // you could edit the search for ignoring the
'www.'

Echo $domain[2];


Greetings,

Stefan

Note: this is untested.

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



Re: [PHP] Hotmail and junk mail

2006-10-02 Thread Stefan van der Linden

hello every one :)

what ever i do emails i sent got in the junk mail

i fixed the header
add spf record to the domain
using mail server with specific IP
fix all dns error

nothing work

any one get it correct ?


Can you please be more specific by giving the headers you use?

Regards,
Stefan

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



[PHP] [ANNOUNCE] Suhosin 0.9.6 - Advanced PHP Protection System

2006-10-02 Thread Stefan Esser
 banning of uploaded ELF executables
  * Supports automatic banning of uploaded binary files
  * Supports automatic stripping of binary content in uploaded files
  * Configurable action on violation
- just block violating variables
- send HTTP response code
- redirect the browser
- execute another PHP script
  
  Logging Features
  
  * Supports multiple log devices 
(syslog, SAPI module error log, external logging script)
  * Supports freely configurable syslog facility and priority
  * Supports log device separated selection of alert types to log
  * Alerts contain filename and linenumber that triggered it
  * Alerts contain the IP address of the user triggering it
  * The IP Address can also be extracted from X-Forwarded-For 
HTTP headers (f.e. for reverse proxy setups)


  Copyright
  =
  
  (C) Copyright 2006 Hardened-PHP Project
  
  
  Stefan Esser / 2006-10-02

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



Re: [PHP] reading a remote directory

2006-09-28 Thread Stefan van der Linden

I have to read a directory (on a windows machine) from another box (a
linux machine) and I thought that I could set the handle to the IP
address of the windows box, but that does not work. Do I have to open a
socket or is there another way?

Thanks!


You'll need a webserver to read the directory, as there isn't any program that 
listens
by default. Or you could start up an FTP server and open a connection to that.

Regards,
Stefan van der Linden

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



[PHP] SSL Connection causes data errors.

2006-09-18 Thread Stefan
Hi,

I was wondering if anyone has experienced this before.
I am connecting to an IIS server over HTTPS using
pfsockopen and am getting xml data returned. Now when
I open the URL in a browser the XML is returned fine
without a problem. However when using PHP part of the
XML is all messed up, data is moved around it appears
and it messes up the XML.

I am getting an error at the end of my request to the
server:

PHP Warning:  fread(): SSL: fatal protocol error in


However from what I read that error deals with the
closing of the connection. Any help would be very
appreciated.

Stefan

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



[PHP] SSL Connection causes data errors.

2006-09-18 Thread Stefan
Hi,

I was wondering if anyone has experienced this before.
I am connecting to an IIS server over HTTPS using
pfsockopen and am getting xml data returned. Now when
I open the URL in a browser the XML is returned fine
without a problem. However when using PHP part of the
XML is all messed up, data is moved around it appears
and it messes up the XML.

I am getting an error at the end of my request to the
server:

PHP Warning:  fread(): SSL: fatal protocol error in
...

However from what I read that error deals with the
closing of the connection. Any help would be very
appreciated.

Stefan

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: [PHP] how to get page count when uploading files

2006-09-16 Thread Stefan van der Linden

I really need help and after going through the help page, I don't know where
I can post my question.



When I upload a file (word or pdf), how can I know the page counts of that
file immediately?



Thank you, Jian


There's no function in the PDF library to READ the file.
And about Word documents (.doc): Word calculates the amount of pages at 
'parsetime'. Word documents are just RTF files, and they
don't describe the amount of pages in the files. 
So it's really tricky to make a script that counts the pages in Word documents, as you would have to make an RTF parser. :/ 


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



[PHP] Session from php in ASP

2006-03-17 Thread Stefan
Hi NG

is it possible to get a Sessionvariable set in php read in an asp-file with
the tag %= Session(php) %?

Thanks in advance
Stefan

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



Re: [PHP] Session from php in ASP

2006-03-17 Thread Stefan
Yes. I don't get any values
Jay Blanchard [EMAIL PROTECTED] schrieb im Newsbeitrag 
news:[EMAIL PROTECTED]
[snip]
is it possible to get a Sessionvariable set in php read in an asp-file
with
the tag %= Session(php) %?
[/snip]

Have you tried it? 

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



RE: [PHP] PHP load to high on server

2006-01-18 Thread Stefan Moldoveanu


Hello,
The same problem I've had on a FreeBSD 4.11 box, running Apache 1.3.3 and PHP 4.3.5. 

From time to time, httpd went to 90%+ (I supposed it was a memory leak or smth).

After upgrading Apache to 1.3.4 and PHP to 4.4.2, everything smoothed down and 
we got no more 90+% httpd, even on heavy load.
If possible, try to downgrade/upgrade PHP and/or Apache (eventually on a test 
machine).

Regards,
Stefan





From: Jochem Maas
Sent: Mi 18.01.2006 18:59
To: Adi
Cc: Albert; PHP List
Subject: Re: [PHP] PHP load to high on server


Adi wrote:

Run some tracer apps on your code...could be some wild loops of some sort?
Never the less, ZEND debugger with the module should do the jobit will
tell you which files/functions etc are runningnice tool to track
execution time etc...

On 1/18/06, Albert [EMAIL PROTECTED] wrote:


Hi



I am running SuSE 9.2 (Kernel 2.6.8-24-default) with Apache 2.0.50 and PHP
4.3.8 (as an Apache module) on a Celeron 900 with 304MB RAM. This machine
is
used for testing. We have made some changes to our PHP application and now


what changes? DB related per chance? doing any queries on tables that are
not indexed properly? or maybe your app creates tons of objects? (in which
case you might look at being able to clone objects rather than init new
ones where possible).


the machine is having trouble serving the pages. Apache is occupying
almost
90% CPU usage.



My Apache log configuration is:

%a %b %H %r %s %t %T %X

%a : Remote IP

%b : Size of response

%H : Protocol

%r : Request

%s : Last status of request

%t : Time of request

%T : Time to serve

%X : Connection status after serving request



In the log below the last character after the timestamp indicates the
following:

X : Connection terminated before end serving request

+ : Connection might not be terminated

- : Connection terminated



As you will notice almost all the statuses is connection might not have
been
terminated.



The page having the heaviest load uses 5 simultaneous sessions - they
refresh every 5 seconds. Even with just one connection there are 16 Apache
threads running all occupying between 5 and 20% of CPU.



Does anyone have an idea of what I can do (short of recoding)?



TIA



Albert



From our Apache log:

192.168.x.x 216 HTTP/1.1 GET /selObject.php HTTP/1.1 200

[17/Jan/2006:16:16:29 +] 1 X

192.168.x.x 1845 HTTP/1.1 GET /msgMon.php?h=3D1024w=3D1280 HTTP/1.1 200

[17/Jan/2006:16:16:28 +] 2 +

192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200

[17/Jan/2006:16:16:29 +] 1 +

192.168.x.x 2839 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:29

+] 2 +

192.168.x.x 3279 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200

[17/Jan/2006:16:16:31 +] 1 +

192.168.x.x 216 HTTP/1.1 GET /selObject.php HTTP/1.1 200

[17/Jan/2006:16:16:31 +] 1 +

192.168.x.x 13353 HTTP/1.1 GET /validation.php HTTP/1.1 200

[17/Jan/2006:16:16:33 +] 0 +

192.168.x.x 429 HTTP/1.1 GET /display_background.php HTTP/1.1 200

[17/Jan/2006:16:16:32 +] 2 +

192.168.x.x 178 HTTP/1.1 GET /selObject.php HTTP/1.1 200

[17/Jan/2006:16:16:33 +] 3 +

192.168.x.x 3325 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200

[17/Jan/2006:16:16:33 +] 3 +

192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200

[17/Jan/2006:16:16:33 +] 3 X

192.168.x.x 1249 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:33

+] 4 +

192.168.x.x 3279 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200

[17/Jan/2006:16:16:34 +] 3 +

192.168.x.x 13353 HTTP/1.1 GET /validation.php HTTP/1.1 200

[17/Jan/2006:16:16:37 +] 1 +

192.168.x.x 431 HTTP/1.1 GET /display_background.php HTTP/1.1 200

[17/Jan/2006:16:16:35 +] 3 +

192.168.x.x 2823 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:35

+] 4 +

192.168.x.x 13353 HTTP/1.1 GET /validation.php HTTP/1.1 200

[17/Jan/2006:16:16:39 +] 0 +

192.168.x.x 1845 HTTP/1.1 GET /msgMon.php?h=3D768w=3D1024 HTTP/1.1 200

[17/Jan/2006:16:16:37 +] 3 +

192.168.x.x 216 HTTP/1.1 GET /selObject.php HTTP/1.1 200

[17/Jan/2006:16:16:38 +] 3 X

192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200

[17/Jan/2006:16:16:39 +] 2 X

192.168.x.x 3711 HTTP/1.1 GET /display_menu.php HTTP/1.1 200

[17/Jan/2006:16:16:39 +] 2 +

192.168.x.x 3279 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200

[17/Jan/2006:16:16:39 +] 3 +

192.168.x.x 2828 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:39

+] 3 +

192.168.x.x 429 HTTP/1.1 GET /display_background.php HTTP/1.1 200

[17/Jan/2006:16:16:42 +] 2 +

192.168.x.x 178 HTTP/1.1 GET /selObject.php HTTP/1.1 200

[17/Jan/2006:16:16:43 +] 2 +

192.168.x.x 3325 HTTP/1.1 GET /display_target_information.php HTTP/1.1 200

[17/Jan/2006:16:16:43 +] 3 +

192.168.x.x 1260 HTTP/1.1 GET /gd.php HTTP/1.1 200 [17/Jan/2006:16:16:43

+] 3 +

192.168.x.x 1845 HTTP/1.1 GET /msgMon.php?h=3D1024w=3D1280 HTTP/1.1 200

[17/Jan/2006:16:16:43 +] 3

RE: [PHP] PHP Cache (was PHP load to high on server)

2006-01-18 Thread Stefan Moldoveanu


http://eaccelerator.net/HomeUk
Actually, is the former mmCache with a new team of developers and some 
impovements.
The last known version of mmCache I've played with one week ago core dumped the 
httpd on ./apachectl stop.
The last stable version of eAccelerator (0.9.3, I think) works like a charm 
with PHP 4.4.2 / Apache 1.3.4

Stefan

Albert wrote:


I also want an opcode cache to cache the compiled pages on the server in an
attempt to speed up the HTTP server.

For this I wanted to use mmCache (actually I want to use Zend Performance
Suite but first I need to prove that it is worth $ 1000 per CPU and from the
stats on the mmCache site mmCache is faster...) but it seems that the
mmCache project has been abandoned as there have been no work done on it
since 2003.

Can someone confirm this or recommend an alternate cache (doesn't have to be
free but should break the bank) which will do what I want? 


Albert



[PHP] Re: Check how much/which variables there are in an class

2006-01-11 Thread Stefan Reimers

Try

array get_class_vars ( string class_name)

This will return an array with at least the public variables.


Mathijs wrote:

Is there a way to check how much/which variables there are in an class?

Thx in advanced.


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



[PHP] Regular expressions book

2005-08-03 Thread Stefan Lemmen
Hi,

I've want to dig a bit deeper into regular expressions for php.
I wonder if anyone can help me choosing between 2 books I'm considering buying:

1. Open Source Regular Expression Recipes - Nathan A Good
2. Mastering Regular Expressions - Jeffrey Freidl

If your using/reading one of these books, please let me know which one
is best for PHP regex.

Thnx

Stefan Lemmen
Apeldoorn Holland

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



[PHP] configure problem on solaris 2

2005-04-15 Thread Heim, Stefan
Hello,
I'm having trouble installing php.4.3.11 ub Solaris8:
./configure
and it is this promt infinitely:
checking host system type...sparc-sun-solaris2.8

I see in  on ather window the following processes:

25263 pts/10   S  0:00 /bin/sh ./configure
 25323 pts/10   S  0:00 /bin/sh ./build/shtool echo -n -e %B
 25330 pts/10   S  0:00 sed -e
s/\([a-zA-Z0-9]\):\([^,]*\),*/opt_ALIAS_\2=\1;/g
 25332 pts/10   R  0:21 tr x- x_

Any ideas ?
thanks!


-- 
Dipl.-Ing. Stefan Heim
University of Ulm
Sektion Informatik i.d. Psychotherapie
Tel: +4973150025702
Fax: +4973150025662
[EMAIL PROTECTED]

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



[PHP] Update XML

2005-04-11 Thread Stefan
Hi NG!
I've a problem in updating an XML-Node value.
How can I change the value of an XML node?

Thanks in Advance
Stefan 

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



[PHP] XML Select

2005-04-08 Thread Stefan
Hi NG
I've a question about searching in a xmlfile.
Is there a mehtod to select a xml-node with a specific value?

e.g.
xml
nameabc/name
namedef/name
/xml

and I want search for the node with name abc.
Or is it possible with a xpath definition?

Thanks in advance
Stefan 

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



[PHP] Serious problem with Compiler?!?

2005-03-09 Thread Stefan
Hi there,
my Server worked fine for several month now with php 4.3.4.
Since a few hours (without changing anything for the last days) PHP 
doesn't 'know' basic commands as mysql_connect() or session_start() ...
(e.g.: Fatal error: Call to undefined function: mysql_connect() )

I have no idea where to start searching for the problem as the logs 
don't tell anything about it!

Thx for help in advance.
Stefan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Serious problem with Compiler?!?

2005-03-09 Thread Stefan
I've found where the problem came from: I was using PHP 4.3.9 (sorry for 
misinformation in the first mail) but it was overwritten by a suse 
onlineupdate 4.3.4 last night. This is where the problems came from.

I have removed 4.3.4 via Yast and want to compile 4.3.10 now.
./configure and make test work fine, but when I use 'make', it only 
shows a few lines and doesn't install successfull:

This is all text produced by make:
-- begin
Installing PHP SAPI module:   apache2handler
/usr/share/apache2/build/instdso.sh 
SH_LIBTOOL='/usr/share/apache2/build/libtool' libphp4.la 
/usr/lib/apache2-prefork
/usr/share/apache2/build/libtool --mode=install cp libphp4.la 
/usr/lib/apache2-prefork/
cp .libs/libphp4.so /usr/lib/apache2-prefork/libphp4.so
cp .libs/libphp4.lai /usr/lib/apache2-prefork/libphp4.la
libtool: install: warning: remember to run `libtool --finish 
/usr/local/src/php-4.3.10/libs'
chmod 755 /usr/lib/apache2-prefork/libphp4.so
[activating module `php4' in /etc/apache2/httpd2-prefork.conf]
Installing build environment: /usr/lib/php/build/
Installing header files:  /usr/include/php/
Installing helper programs:   /usr/bin/
  program: phpize
  program: php-config
  program: phpextdist

-- end
What may be the source of this problem?
Jochem Maas wrote:
Stefan wrote:
Hi there,
my Server worked fine for several month now with php 4.3.4.
Since a few hours (without changing anything for the last days) PHP 

reboot? lame yes, but maybe it works.
otherwise specify some server details here.
check if files (e.g. the php binary, conf files) have changed
(maybe a very recent filetime?)
doesn't 'know' basic commands as mysql_connect() or session_start() ...
(e.g.: Fatal error: Call to undefined function: mysql_connect() )
I have no idea where to start searching for the problem as the logs 
don't tell anything about it!

mysql is an extension but session_start is core I believe - very odd
that session_start() is not defined.
Thx for help in advance.
Stefan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] problem with mail()

2005-03-01 Thread Stefan Sturm
Hi,

I'm using the script below to send ascii files attached to mails via mail().
I'm running the script on different servers and it works fine. Now I got a
problem on windows server 2003. The attachment of the mail is disturbed, the
first 76 characters are missing, the rest of the attachment is correct. When
I looked at the mail headers of the mail I recieved I recognized that there
were some lines missing. Also the first line of the attachment part in the
header is mssing. As I use chunk_split without the chunklen paramter the
lines are all 76 characters long. So it just looks like that the server
ommits lines in the header. I marked the missing lines in the script with
comments. Has anybody got an idea where the problem could be?

Thank in advance

Stefan

  $unique_sep =md5(uniqid(time()));
  $headers = From: egrade questionaire\n;
  $headers .= MIME-Version: 1.0\nContent-Type:
multipart/mixed;boundary=\$unique_sep\;\n;

#The second \n at the end of the next command is ommited, the resulting
empty line is not in the header of the received mail
  $headers .= charset=\iso-8859-1\\nContent-Transfer-Encoding:7bit\n\n;
  $headers .= egrade-result\n;
  $headers .= If you read this text your mail server is not supporting MIME
Format.\n;
  $headers .= --$unique_sep\n;
  $headers .= Content-Type: text/plain; charset=\iso-8859-1\\n;
#The second \n at the end of the next command is ommited, the resulting
empty line is not in the header of the received mail
   $headers .= Content-Transfer-Encoding: 7bit\n\n;
#From the next command only a single \n is  in the header of the received
mail, the text and the other \n are missing
  $headers .= egrade-result\n\n;
  $headers .= --$unique_sep\n;
# filename holds the path to the ascii file
  $headers .= Content-Type: {text/plain}; name=\{$filename}\\n;
  $headers .= Content-Transfer-Encoding: base64\n;
  $headers .= Content-Disposition: attachment\n\n;
  $filedata = implode(file($filename), '');
  $headers .= chunk_split(base64_encode($filedata));
  $headers .= --$unique_sep--\n;
  if(mail([EMAIL PROTECTED],subject,egrade-result,$headers) or die(An
error occured! The questionnaire has not been processed));

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



[PHP] problem with mail() and attachment

2005-02-28 Thread Stefan Sturm
Hi,

I'm using the script below to send ascii files attached to mails via mail().
I'm running the script on different servers and it works fine. Now I got a
problem on windows server 2003. The attachment of the mail is disturbed, the
first 76 characters are missing, the rest of the attachment is correct. When
I looked at the mail headers of the mail I recieved I recognized that there
were some lines missing. Also the first line of the attachment part in the
header is mssing. As I use chunk_split without the chunklen paramter the
lines are all 76 characters long. So it just looks like that the server
ommits lines in the header. I marked the missing lines in the script with
comments. Has anybody got an idea where the problem could be?

Thank in advance

Stefan

  $unique_sep =md5(uniqid(time()));
  $headers = From: egrade questionaire\n;
  $headers .= MIME-Version: 1.0\nContent-Type:
multipart/mixed;boundary=\$unique_sep\;\n;

#The second \n at the end of the next command is ommited, the resulting
empty line is not in the header of the received mail
  $headers .= charset=\iso-8859-1\\nContent-Transfer-Encoding:7bit\n\n;
  $headers .= egrade-result\n;
  $headers .= If you read this text your mail server is not supporting MIME
Format.\n;
  $headers .= --$unique_sep\n;
  $headers .= Content-Type: text/plain; charset=\iso-8859-1\\n;
#The second \n at the end of the next command is ommited, the resulting
empty line is not in the header of the received mail
   $headers .= Content-Transfer-Encoding: 7bit\n\n;
#From the next command only a single \n is  in the header of the received
mail, the text and the other \n are missing
  $headers .= egrade-result\n\n;
  $headers .= --$unique_sep\n;
# filename holds the path to the ascii file
  $headers .= Content-Type: {text/plain}; name=\{$filename}\\n;
  $headers .= Content-Transfer-Encoding: base64\n;
  $headers .= Content-Disposition: attachment\n\n;
  $filedata = implode(file($filename), '');
  $headers .= chunk_split(base64_encode($filedata));
  $headers .= --$unique_sep--\n;
  if(mail([EMAIL PROTECTED],subject,egrade-result,$headers) or die(An
error occured! The questionnaire has not been processed));

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



[PHP] Problem with mail() and attachment

2005-02-28 Thread Stefan Sturm
Hi,

I'm using the script below to send ascii files attached to mails via mail().
I'm running the script on different servers and it works fine. Now I got a
problem on windows server 2003. The attachment of the mail is disturbed, the
first 76 characters are missing, the rest of the attachment is correct. When
I looked at the mail headers of the mail I recieved I recognized that there
were some lines missing. Also the first line of the attachment part in the
header is mssing. As I use chunk_split without the chunklen paramter the
lines are all 76 characters long. So it just looks like that the server
ommits lines in the header. I marked the missing lines in the script with
comments. Has anybody got an idea where the problem could be?

Thank in advance

Stefan

  $unique_sep =md5(uniqid(time()));
  $headers = From: egrade questionaire\n;
  $headers .= MIME-Version: 1.0\nContent-Type:
multipart/mixed;boundary=\$unique_sep\;\n;

#The second \n at the end of the next command is ommited, the resulting
empty line is not in the header of the received mail
  $headers .= charset=\iso-8859-1\\nContent-Transfer-Encoding:7bit\n\n;
  $headers .= egrade-result\n;
  $headers .= If you read this text your mail server is not supporting MIME
Format.\n;
  $headers .= --$unique_sep\n;
  $headers .= Content-Type: text/plain; charset=\iso-8859-1\\n;
#The second \n at the end of the next command is ommited, the resulting
empty line is not in the header of the received mail
   $headers .= Content-Transfer-Encoding: 7bit\n\n;
#From the next command only a single \n is  in the header of the received
mail, the text and the other \n are missing
  $headers .= egrade-result\n\n;
  $headers .= --$unique_sep\n;
# filename holds the path to the ascii file
  $headers .= Content-Type: {text/plain}; name=\{$filename}\\n;
  $headers .= Content-Transfer-Encoding: base64\n;
  $headers .= Content-Disposition: attachment\n\n;
  $filedata = implode(file($filename), '');
  $headers .= chunk_split(base64_encode($filedata));
  $headers .= --$unique_sep--\n;
  if(mail([EMAIL PROTECTED],subject,egrade-result,$headers) or die(An
error occured! The questionnaire has not been processed));

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



[PHP] create forum

2005-02-17 Thread Stefan
Hi.
Are there some code-examples how to build a forum
with php and xml?

Tnx
Stefan 

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



[PHP] PHP Post method HTTP 404

2005-02-16 Thread Stefan
Hi
I've a strange problem
When I try to send a form with method=POST to a php-file I always get an
HTTP 404 error.
I really don't know why, because the file exists on the server.

I use IIS 5.1

Tnx.
Stefan 

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



[PHP] php error

2005-02-16 Thread Stefan
Hi
I've a strange problem
When I try to send a form with method=POST to a php-file I always get an
HTTP 404 error.
I really don't know why, because the file exists on the server.

I use IIS 5.1

Tnx.
Stefan

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



[PHP] Re: who's on-line application - php

2005-02-15 Thread Stefan Dengscherz
Hello,

usually you can not determine clearly who is online on your website at the
moment because http is a session-less protocol (thus php implements a session
mechanism through cookies or session id). However you can use the following
approach:

- add a 'last_seen' field to the users table of your website
- update that field for the user everytime he calls a page on your site
  (e.g. include(updatels.php); on every page)
- to get the number of (probably still) online users do a 'select from
  user_table where now()-lastseen  3 minutes'

another method would be changing the session handler to store session data in
the database and query the sessiontable appropriately.


best regards,

Stefan Dengscherz


On Mon, Feb 14, 2005 at 04:30:32PM +0200, Jacques wrote:
 I would like to indicate the particulars (from a MySQL database) of all
 those users that are currently on-line (those whom have successfully signed
 in). How should I go about achieving this? Does it have something to do with
 Sessions?
 
 I am developing in PHP.
 
 Regards
 
 Jacques
 
 -- 
 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] Re: Users logins in Linux machine

2005-02-14 Thread Stefan Dengscherz
Hello,

changing the system password requires root privileges, because it needs to
modify the /etc/shadow file. Thus either I would put the password change
requests into a mysql table or text file and run a cronjob as root which
checks e.g. every 15 minutes if there are new pw change requests. If there
are new ones, an expect (tool to control interactive programs) script gets
executed by root which changes the system password depending on the request.
However this method could be insecure depending on the setup of your scripts.

Another approach would be letting the users change their system passwords by
setting their shell to /usr/bin/passwd, so they only get the change password
prompt when they login to the server with their account. This would also send
the new password over a secured connection (implies using ssh to login).

I don't know if there are any big security risks by setting the shell to
passwd. Correct me if I am wrong :)


best regards,

Stefan Dengscherz


On Sat, Feb 12, 2005 at 04:24:57PM +, Bruno Santos wrote:
 Hello all.
 
 I've a linux server that runs a mailserver for several users. I want to 
 build a page where users can change their email password, that's their 
 accounts password.
 
 how can i with PHP manage to compare the password they type in a web 
 form with the one they have in the system ?? (/etc/passwd) ??
 
 can it be with LDAP ? or PAM ? or any other method ?
 
 cheers !
 
 Bruno Santos
 
 -- 
 Say no to software patents
 www.nosoftwarepatents.com/
 --
 [EMAIL PROTECTED]
 --
 Divisao de Informatica
 [EMAIL PROTECTED]
 Tel: +351 272 000 155
 Fax: +351 272 000 257
 --
 Hospital Amato Lusitano
 [EMAIL PROTECTED]
 Tel: +351 272 000 272
 Fax: +351 272 000 257
 
 -- 
 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] timestamp problem?

2005-02-08 Thread Balu Stefan
First of all, hello everybody,
I am having some problems generating timestamps.
I have a simple application, the user selects a month, a day and a year
and submits
it's data.
Now, I want that date to be stransformed into a unixtimestamp. To do
that
I use strtotime('m/d/y')  for 01 January 2011 it would be:
strtotime('01/01/2011')
Now, a fiew days ago, the timestamp generated by this was: 129384
After a hardware failure, I reinstalled my linux with the same
settings...
now, a timestap of 01/01/2011 is returned as: 1293832800
What am I doing wrong?

# ls -al /etc/localtime 
lrwxrwxrwx  1 root root 36 Feb  7 19:54 /etc/localtime -
/usr/share/zoneinfo/Europe/Bucharest
# date
Tue Feb  8 13:29:15 EET 2005
# echo $TZ 
Europe/Bucharest
#

Also mktime generates the second timestamp ...damn, I really don't know
why there are two different
timestamps for the same date.
-- 
Stefan, a simple CRUX Linux user.
Linux registered user: #272012
[Linux is Friendly. It's just selective about who his friends are.]


-- 
This message was scanned for spam and viruses by BitDefender
For more information please visit http://linux.bitdefender.com/

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



RE: [PHP] stupid question about a class

2004-12-08 Thread Stefan

In your class function you should move your query to a variable e.g. $query

Then:

return $query;


And in your main program:

$whatever = $q-getQuery();

__
Stefan


 -Ursprüngliche Nachricht-
 Von: Richard Kurth [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 8. Dezember 2004 19:21
 An: PHP General
 Betreff: [PHP] stupid question about a class
 
 
 I have a stupid question but I can not figure it out
 I am using a class that creates the select statement for mysql.
 I am ale to add all the data with out any problem. But when I run the
 class to get the results. I can only see the results by running echo in
 front of the call to the class .
 echo $q-getQuery();
 Output SELECT * FROM listing WHERE state='wa'
 if I
 $q-getQuery();
 echo $g;
 Output Object id #1
 How do I use the results in my mysql query If I can not move it to a
 variable
 
 
 
 
 --
 Best regards,
  Richard  mailto:[EMAIL PROTECTED]
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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



[PHP] Strange behaviour with PHP on Apache

2004-12-06 Thread Stefan
Hi there,

For the first time since my server is running I got some strange behaviour
today without changing something before.

Users trying to access my php-scripted websites (different projects) got a
'download' message instead of the site (as if the site (.php) was a
downloadable file (e.g. .tgz or something else))). After restarting apache2
the problem was gone for about 2 hours, but then it came back.
As first reaction I visited my log files instantly, but nothing looked
different there. After it came for the second time, I restarted the server
by 'init 6' and it is gone since then.

As this is a production server, I cannont leave this one to chance. Maybe
one of you has an idea what could cause this problem. (Low diskspace? Bad
configurations?)

I'm not sure if this is the right list to ask this, please point me to a
better place if I'm wrong!

And here is my configuration:

PHP 4.3.4 on Apache 2.0.49
Suse Linux 9.1
Confixx 3.0 Pro

Confixx ./configure:

'./configure' '--prefix=/usr' '--datadir=/usr/share/php'
'--mandir=/usr/share/man' '--bindir=/usr/bin' '--libdir=/usr/share'
'--includedir=/usr/include' '--sysconfdir=/etc' '--with-_lib=lib'
'--with-config-file-path=/etc' '--with-exec-dir=/usr/lib/php/bin'
'--disable-debug' '--enable-inline-optimization' '--enable-memory-limit'
'--enable-magic-quotes' '--enable-safe-mode' '--enable-sigchild'
'--disable-ctype' '--disable-session' '--without-mysql' '--disable-cli'
'--without-pear' '--with-openssl' '--with-apxs2=/usr/sbin/apxs2-prefork'
'i586-suse-linux'

Thx a lot in advance.

Stefan

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



RE: [PHP] Strange behaviour with PHP on Apache

2004-12-06 Thread Stefan
That sounds like a nice hint. Unfortunately there seems to be no error
in the apache2 error logfile -
This must have been near the time, when the strange behaviour began:

[Mon Dec 06 14:58:07 2004] [warn] NameVirtualHost 82.165.42.181:80 has
no VirtualHosts
[Mon Dec 06 14:58:09 2004] [notice] Apache/2.0.49 (Linux/SuSE)
configured -- resuming normal operations
[Mon Dec 06 14:58:09 2004] [warn] long lost child came home! (pid 1482)

...But as I saw in the Apache2 documentation, the warning 'long lost
child came home' isn't that bad and can occur time by time.

Any ideas?

-Ursprüngliche Nachricht-
Von: Jason Wong [mailto:[EMAIL PROTECTED] 
Gesendet: Montag, 6. Dezember 2004 19:54
An: [EMAIL PROTECTED]
Betreff: Re: [PHP] Strange behaviour with PHP on Apache


On Tuesday 07 December 2004 00:33, Stefan wrote:

 Users trying to access my php-scripted websites (different projects) 
 got a 'download' message instead of the site (as if the site (.php) 
 was a downloadable file (e.g. .tgz or something else))).

It sounds like what would happen when your PHP aren't being processed
and 
Apache's just dumping the file contents (ie your source code) to the
browser.

 After restarting apache2
 the problem was gone for about 2 hours, but then it came back.
 As first reaction I visited my log files instantly, but nothing looked
 different there. After it came for the second time, I restarted the
server
 by 'init 6' and it is gone since then.

Is this the error log file you looked at? The access logs won't tell you
much.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
BOFH Excuse #71:

The file system is full of it
*/

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



AW: [PHP] help plssssss.!!!

2004-12-03 Thread Stefan
Hi there!

I would do it this way:

Give the links a variable:

http://www.mywebpage.com/index.php?link=page1

http://www.mywebpage.com/index.php?link=page2

...

http://www.mywebpage.com/index.php?link=page12



and then in the document below your menue:

if (isset($link))
{ 
  include(pages/ . $link . .php); //Includes a page called e.g. 'page1'

  //in subdirectory 'pages/'
}
else
{
  echo No Page selectedbr; //Error if no Page is selected in $link
}

Where the called page is in the directory 'Pages' under the name page1.php

Stefan



 -Ursprüngliche Nachricht-
 Von: Tomar Rajeev (ext) [mailto:[EMAIL PROTECTED]
 Gesendet: Freitag, 3. Dezember 2004 16:20
 An: '[EMAIL PROTECTED]'
 Betreff: [PHP] help plss.!!!
 
 
 Hello All,
 
 I am a new member of this group and in the world of PHP;-)
 
 In my company, around 12 web pages are there. So, I want to make a web
 portal in PHP from where all these web pages can be accessed.
 
 Also, I want to provide the link for the web pages ( will make three
 categories) in three horizontal dynamic menu.
 
 If some user clicks on the link then the corresponding web page should be
 shown in the same web page just below the dynamic menu.
 
 It will be great if you could help me in finding the source code of this
 type of web page in PHP.
 
 Thanking in Anticipation.
 
 Regards,
 
 Rajeev Tomar
 
 --
 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] Page that checks if a user exists on a remote system

2004-12-03 Thread Stefan
Hi!

Have you thougt of writing the userdata to a database and running a perl
script by cron to do the rest? This would be an interesting opinion for
security purpose.

Stefan

 -Ursprüngliche Nachricht-
 Von: Jonathan Duncan [mailto:[EMAIL PROTECTED]
 Gesendet: Freitag, 3. Dezember 2004 18:55
 An: [EMAIL PROTECTED]
 Betreff: Re: [PHP] Page that checks if a user exists on a remote system
 
 Christophe,
 
 I see where you are coming from with that, but the purpose of this script
 is to remove me from the picture completely.  I want someone to be able to
 come sign up on my site and automatically be added as a mail user and
 other things so that I do not need to do that kind of thing.
 
 I am looking to do like Hotmail, or Yahoo!, or Mail.com, or any of the
 other places do.  I can go sign up on their site and immediately have an
 e-mail account that I can start using.  No admin has to take the time to
 create my account for me.
 
 Does that make sense?  Does that explain better why I am trying to do
 this?  Has not anyone else wanted that functionality also?
 
 Thank you,
 Jonathan Duncan
 
 
 On Fri, 3 Dec 2004, Christophe Chisogne wrote:
 
  Jonathan Duncan wrote:
  I will also be doing a remote command to add a user to the remote
 system
  (ServerB) from the same PHP script.
 
  If you want to manage a server via web interface, dont reinvent
  the wheel. Use webmin, by example.
 
  Webmin runs a mini webserver as root (on port 1),
  and uses modules for managing users, proftp, apache, etc
 
  Of course, I dont know what you want to do.
 
  Christophe
 
 
 --
 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] protecting class/include files

2004-12-01 Thread Stefan Klopp
Hello All,

I am looking for some advice on how to keep my class files protected. Here
is the situation. We have a web system we have built that all of our clients
use. Now each client has php files that include our classes. The classes are
stored in a common folder. This folder is read accessible by all our clients
so that their php files can include the classes. However our problem is that
while we want to give our clients php include access to our classes, we do
NOT want to them to be able to actually have access to our source code. For
most of our clients this isn't a problem as they are not technical enough.
However we do have a few savvy clients who might just decide to do a
show_source or an fopen of the include files and steal our source code. I
have looked around at a few of the encoders on the market and was wondering
if that was my only option? Am I missing something simply with permissions
or what not that would prevent users from viewing the source code of our
class files?

Thanks for your help!

Stefan

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



RE: [PHP] PHPmysqladmin

2004-11-27 Thread Stefan
What about looking for yourself?

http://www.google.com/search?hl=enlr=q=phpmyadmin


 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Gesendet: Samstag, 27. November 2004 19:27
 An: PHP general
 Betreff: [PHP] PHPmysqladmin
 
 Where can you get PHPmysqladmin?  I would like to load it on my test
 server
 to make updating and entering Mysql data easier.
 
 Thanks for your help!
 
 Tim

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



RE: [PHP] GUI editor for php?

2004-11-03 Thread Stefan Holmes
I use ConTEXT for all php and html work. It's big on usability and
programmer-friendly functions. It's also fairly compact and partners well
with my low-spec laptop :)

 -Original Message-
 From: M Saleh EG [mailto:[EMAIL PROTECTED]
 Sent: 03 November 2004 00:57
 To: Andy B
 Cc: PHP mailing list
 Subject: Re: [PHP] GUI editor for php?
 
 Well a gui editor? do u mean something like Visual Studio for windows
 application design? or just an IDE. if it's the latter I'd
 recommand u to check out Zend Studio or NuSphere.
 
 
 On Mon, 1 Nov 2004 17:19:33 -0500, Andy B [EMAIL PROTECTED] wrote:
  Hi.
 
  Is there any GUI editors out there for php? if so does anybody know of a
  good one that doesnt cost a ton of money??
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 --
 M.Saleh.E.G
 97150-4779817

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



Re: [PHP] Quick imageSize question

2004-10-13 Thread Stefan Dengscherz
Hello,
that's usually not possible because your webserver can't access the image
on your computer; a possible solution might be to determine the image size
via javascript and submit it with the form, so you can accept or deny the
image upload in your php script - problem: with javascript running on client
side, this is not foolproof. Anyways i don't know exactly how to solve it with
javascript even, so please correct me, if i'm talking crap here.

Best regards,

-sd

On Wed, Oct 13, 2004 at 07:37:29AM -0700, Mag wrote:
 The problem with the above is I can only get the
 dimensions AFTER the file has been uploaded and is on
 disk,which is quite a pain in the ... coz I want to
 accept only images that are smaller than x pixels
 width and then i have to tell the client that their
 upload failed coz their image is too big...is there
 any way to get the dimensions before the upload is
 done?

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



[PHP] Converting PHP code and db schema from PostgreSQL to MySQL

2004-09-20 Thread Stefan Moldoveanu
Hello, folks,
 
Is there any tool/script to convert PostgreSQL code from PHP scripts into
MySQL (pg_connect  mysql_connect and so forth)?
I'm talking about a website with thousands of code lines.
 
Also, any script which can convert PostgreSQL db data schema to MySQL? I
only found tutorials for MySQL  PostgreSQL conversion.
 
 
Any link / tutorial / etc. would be highly appreciated.
 
 
Thank you,
Stefan
 
 


RE: [PHP] thumbnail of webpage

2004-09-20 Thread Stefan Holmes
 -Original Message-
 From: raditha dissanayake [mailto:[EMAIL PROTECTED]
 Sent: 18 September 2004 03:22
 To: Michael Mao
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] thumbnail of webpage
 
 Michael Mao wrote:
 
  Is there a way to capture a snapshot of a html page and save it as a
  jpg  using php?
 
 This is something that's very very hard to do with PHP but can be easily
 done with Java.

I would guess the easiest way would be to find some external program that
retrieves the page and then renders to an image file.  I don't offhand the
names of any utils that do this, but I'm sure there must be at least /one/
available!

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



[PHP] Bug? ... ? ? and commenting them out

2004-09-15 Thread Stefan
i've the dump feeling there's a bug in the parser (or in my mind =) 
since i tried to commenting out some code, containing ? ... ?. The 
according code was something like ...

--- begin
//$xml = ? ?;
--- end
the occured error is ...
--- begin
Parse error:  parse error, unexpected $ in buninteresting/b on line 
b154/b
--- end

... where 154 the document's last line.
# for comment it out either, whereby /* ... */ works fine (as excepted). 
Seems like the parser doesn't parse the quotes in the statement, but 
parses the ? .. ? tags. So ? ... ? has an higher specifity than the 
comment itself.

PHP Version is 5.0.1. Can anybody reproduce the problem (deleting the 
line fixes it ;o), or find out, wheter ignoring the comment is the 
desired behaviour?

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


[PHP] bcompiler

2004-09-03 Thread Werthmann, Stefan
 
/opt/lampp/lib/php/extensions/bcompiler/bcompiler.c  -fPIC -DPIC -o .libs/bcompiler.o





-- 
Stefan Werthmann 
Max Planck Institute for Human Development 
Center for Educational Research 
Lentzeallee 94 
141 95 Berlin - Germany 
Tel. 82406-450, Zimmer 139a 
E-Mail: [EMAIL PROTECTED] 
-- 

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



RE: [PHP] Re: crypt()

2004-08-30 Thread Stefan Holmes
You should give some consideration to _not_ emailing passwords.

Many popular sites rely on double entry of a password during registration
which reduces the need to email the password to the user during confirmation
of their registration.

The fact that most users have only 1 password which they use for /every/
registration process would make that email even more redundant (and quite a
large security risk for the user!).

The lost password procedure could just involve emailing the user a 'reset
password' link (perhaps even after asking for a mother's maiden name or
similar).  IMHO this gives a very good security/ease-of-use trade-off.


--  ___
|  |
|--+--
|  |.HushFriend (you'll see).
 .Stefan Holmes.

 -Original Message-
 From: Ian Firla [mailto:[EMAIL PROTECTED]
 Sent: 26 August 2004 14:25
 To: Aaron Todd
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Re: crypt()
 
 On Thu, 2004-08-26 at 15:01, Aaron Todd wrote:
  Thanks for the tip, it worked great, however everything I have been
 reading
  says that md5 is only one way.  The way I have setup my app is the
 database
  contains the encrypted version of what the user entered as their
 password.
  Then on my login page there is an if statement that encrypts what the
 user
  is entering as their password and then checking that against what is in
 the
  database for them.  This is working great!...Thanks again.
 
  My registration page is where the password gets encrypted and then sent
 to
  the database.  After the user registers and I accept them as a user they
  recieve an email containing their username and password.  But the
 password
  is encrypted.  Is there a way to decrypt the encrypted password in the
  database?  Or am I going about this wrong?
 
 Send the password before it gets encrypted and put into the database.
 
 You can't decrypt an md5 encrypted password.
 
 Ian

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



Re: [PHP] Object Overloading in PHP5

2004-08-28 Thread Stefan
It's a bug.
 * Siehe http://bugs.php.net/bug.php?id=28444 ... und ...
 *   http://news.php.net/php.bugs/63652
A workaround is possible using __call( $name, $args) { return( 
$this-__get( $name)); }. But it sucks, since constructs using array 
indices are impossible as $obj-not_existing_attr()[0]

regards
Daniel Schierbeck wrote:
Do you guys have any idea why this code:
?php
class Foo
{
private $elem = array();

public function __get ($prop)
{
if (isset($this-elem[$prop])) {
return $this-elem[$prop];
} else {
trigger_error(Property '$prop' not defined, 
E_USER_ERROR);
}
}

public function __set ($prop, $val)
{
$this-elem[$prop] = $val;
}
}

$obj = new Foo;
$obj-a = new Foo;
$obj-a-b = Foobar;
?
returns this:
Fatal error: Cannot access undefined property for object with 
overloaded property access in ... on line 24

Where line 24 is:
$obj-a-b = Foobar;
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Curious problem overloading derived ObjectArray and __toString

2004-08-27 Thread Stefan
hi,
I extended ArrayObject (SPL) to a new class. Let's call it 
ExtObjectArray. ExtArrayObject is quiet tiny, only with some simple 
functions. One is called getData() and serves some string data. Now I've 
overloaded the class using __toString() ...

public function __toString() {
 return( $this-getData());
}
What I wish to do is, to ...
$obj = new ExtArrayObject;
print( (string)$obj);
... and it doesn't work. And i've absolutly no idea why. PHP prints 
instead of the getData() String the object ID, as the __toString isn't 
called. What actually is true. There are no errors, no warnings, no 
notices at all. If i invoke __toString() [print( $obj-__toString())] 
direct, it works fine!

First i assumed it's a spelling mistake. But __toString(), including the 
case, is okay (source: zend2-engine-changes). Then i tried it without 
access spec. So without public, but that doesn't work either. Replacing 
the return statement in the __toString() method with a simple print( 
foo\n), I realized, that the method won't be called.

That really sucks! :o) My PHP Version is php 5.0.1 build from source.
Btw.: this little example also doesn't work.
--- begin
?
class foo
{
   function __toString() {
   return(hallo);
   }
}
$a = new foo;
echo (string)$a;
?
--- end
Assigning to another var instead directly output the object doesn't work 
either as the Zend Changelog (till 2004-07-14) doesn't say anything 
explaining the problem.

anybody have more clue about that?
regards, Stefan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Solved: Curious problem overloading derived ObjectArray and __toString

2004-08-27 Thread Stefan
m'kay ... already got it. The routine was disabled due some internal 
problems. It should be reintroduced in PHP 5.1. *wait*

http://www.rb21.com/news/index.php/m/115763/0/#msg_115763
Stefan wrote:
hi,
I extended ArrayObject (SPL) to a new class. Let's call it 
ExtObjectArray. ExtArrayObject is quiet tiny, only with some simple 
functions. One is called getData() and serves some string data. Now 
I've overloaded the class using __toString() ...

public function __toString() {
 return( $this-getData());
}
What I wish to do is, to ...
$obj = new ExtArrayObject;
print( (string)$obj);
... and it doesn't work. And i've absolutly no idea why. PHP prints 
instead of the getData() String the object ID, as the __toString isn't 
called. What actually is true. There are no errors, no warnings, no 
notices at all. If i invoke __toString() [print( $obj-__toString())] 
direct, it works fine!

First i assumed it's a spelling mistake. But __toString(), including 
the case, is okay (source: zend2-engine-changes). Then i tried it 
without access spec. So without public, but that doesn't work either. 
Replacing the return statement in the __toString() method with a 
simple print( foo\n), I realized, that the method won't be called.

That really sucks! :o) My PHP Version is php 5.0.1 build from source.
Btw.: this little example also doesn't work.
--- begin
?
class foo
{
   function __toString() {
   return(hallo);
   }
}
$a = new foo;
echo (string)$a;
?
--- end
Assigning to another var instead directly output the object doesn't 
work either as the Zend Changelog (till 2004-07-14) doesn't say 
anything explaining the problem.

anybody have more clue about that?
regards, Stefan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Release Announcement: Hardened-PHP 0.1.1

2004-05-15 Thread Stefan Esser


_  __ _   ___  _  _  ___ 
   | || | __ _  _ _  __| | ___  _ _   ___  __| | ___ | _ \| || || _ \
   | __ |/ _` || '_|/ _` |/ -_)| ' \ / -_)/ _` ||___||  _/| __ ||  _/
   |_||_|\__,_||_|  \__,_|\___||_||_|\___|\__,_| |_|  |_||_||_|  
 



The Hardened-PHP project team is pleased to announce the release of 
version 0.1.1 of our PHP security hardening patch. This new Hardened-PHP
release is the first one that is publicly announced and is considered
stable on atleast linux systems.

Hardened-PHP is a patch against the PHP codebase which adds security 
hardening features to it to protect servers on the one hand against a 
number of well known problems in hastily written PHP scripts and on 
the other hand against potential unknown vulnerabilities within the 
engine itself.

Hardened-PHP provides:

+ Protection of the Zend Memory Manager with canaries
+ Protection of Zend Linked Lists with canaries
+ Protection against internal format string exploits
+ Protection against arbitrary code inclusion
+ Syslog logging of attackers IP

We consider Hardened-PHP 0.1.1 to be the best version of Hardened-PHP
available and we strongly recommend that users of older versions upgrade
as soon as possible.

Hardened-PHP is available for download via HTTP from 

http:///www.hardened-php.net/download.php

The distribution file name is:

hardened-php-4.3.6-0.1.1.patch.gz  
MD5 checksum: 62f7d49b89c93dace247c2bc189b7503

Yours,
The Hardened-PHP Project Team...
http://www.hardened-php.net

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



Re: [PHP] preg_replace problem

2003-06-17 Thread Stefan Dengscherz
Hello,

?php

$parsed = preg_replace(/(\ba\b)/i,tag\\1/tag,$sourcestring);

?

should do the job.

regards

Am Die, 2003-06-17 um 13.25 schrieb Vincent Bouret:
 Hi,
 
 I am having this problem with preg_replace. I want the following thing but I
 can't understand what regular expression I should put.
 
 I want to replace all occurences of a given **whole** word into a string.
 
 For example:
 
 I want A dog jumped over a ladder to become xyzA/xyz dog jumped over
 xyza/xyz ladder.
 
 I **don't** want: A dog jumped over a ladder to become xyzA/xyz dog
 jumped over xyza/xyz lxyza/xyzdder.
 
 You understand what I mean? I can't do that will str_replace, but I know it
 would be quite easy with preg_replace. Can someone help me?
 
 Thanks
 
 Vincent
 
 
 


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



Re: [PHP] Re: php editor?

2003-06-16 Thread Stefan Dengscherz
Hi James,

Quanta has built in syntax highlighting for PHP; i have made a small
screenshot: http://www.chowned.us/sd/quanta-php.png

regards

Am Mon, 2003-06-16 um 17.49 schrieb James Hatridge:
 Hi John et al,,
 On Sunday 15 June 2003 02:09, John Nichel wrote:
 
 Linux I  use Quanta.
 
 Do you know how (or if) to get Quanta to color code PHP like it does html? If 
 I could get that then Quanta would be almost perfit.
 
 Thanks
 
 JIM
 
 -- 
 Jim Hatridge
 Linux User #88484
 --
  BayerWulf
Linux System # 129656
  The Recycled Beowulf Project
   Looking for throw-away or obsolete computers and parts
to recycle into a Linux super computer
 


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



Re: [PHP] HTML...

2003-06-16 Thread Stefan Dengscherz
Hello,

 select name='email_recipients' size='6' multiple

change this to select name='email_recipients[]' ...

you can then easily access the multiple selections by walking the array:

for ($i=0;$isizeof($email_recipients);$i++) 
{
 echo $email_recipients[$i];
 echo br /;
}

regards


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



[PHP] Call to undefined function: imagetypes()

2003-02-06 Thread Stefan Vogel
Dear Supportteam

Im Runing a Apache Webserver under Debian sid (testing). I've installed PHP Version 
4.1.2. Now I would like to create a Webalbum,
but my Server doesn't know the funktion imagetypes. He gives me the Error-message:  
Call to undefined function: imagetypes(). I
found the same Error on you messageboard, and their I found your E-mail adress. Could 
you help me, I'm a beginner in Linux and PHP.

phpinfo() and Errormessage:
http://www.e-women.ch/growcenter/picalbum/picture1.php

With kind regards

Stefan Vogel



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




[PHP] Curl-functions + socket send and receive... where is thedocumenation ?

2003-01-17 Thread Stefan Vetter
I just need some documentation on how to get curl to send to and receive
from a socket. Since there is no such information on www.php.net/curl.

Anyone, who can help me with that ?


Stefan




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




[PHP] Re: PHP and MySQL bug

2003-01-04 Thread Stefan Hinz, iConnect \(Berlin\)
Nuno,

 $r=MYSQL_QUERY(SELECT n,u,m,h FROM d WHERE id='$id');

 /* Some code including mysql_num_rows and mysql_fetch_array($r,
 MYSQL_NUM)
 And the another query:
 */

 MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id');

 /* i don't know why but this doesn't work!*/

It doesn't work because of the /* Some code including ... */ part ;-)

First thing, I would check if $h and $id really are what you expect them
to be, like:

$sql = UPDATE d SET h='$h' WHERE id='$id';
echo $sql;
MYSQL_QUERY($sql);

If this part is okay, then the problem lies within this myterious /*
Some code */.

Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  Geschäftsführer / CEO iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: Nuno Lopes [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Saturday, January 04, 2003 11:46 AM
Subject: PHP and MySQL bug


 Dear Sirs,

 I'm using PHP and MySQL to make my programs. But I think I discovered
a bug
 in PHP or in MySQL (I don't know!).

 In one of my files I have the following:

 MYSQL_CONNECT(localhost, **user**, **pass**);
 mysql_select_db(be);
 $r=MYSQL_QUERY(SELECT n,u,m,h FROM d WHERE id='$id');

 /* Some code including mysql_num_rows and mysql_fetch_array($r,
 MYSQL_NUM)
 And the another query:
 */

 MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id');

 /* i don't know why but this doesn't work! But if I close the
connection and
 open another te query is done:*/

 MYSQL_CLOSE();
 MYSQL_CONNECT(localhost, **user**, **pass**);
 mysql_select_db(be);
 MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id');

 ---
 I don't know why is this? Because I'm used to do more than a query per
 connection and this never happened!
 I'm using Win 2k, Apache 2.0.43, MySQL 3.23.49-nt and PHP 4.3.


 I hope you solve this,
 Nuno Lopes



 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



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




[PHP] Passing variables from script to script

2002-12-11 Thread Stefan Hoelzner
Hi folks,

surely this question has already been answered many times before in this ng, but 
nevertheless: I want to pass variables  from
one .php to another .php script. But I do not want to use either the 
http://localhost/target.php?var1=testvar2=test2 nor  
the
POST method. I would like to pass over general variables like usernames and passwords 
for several MySQL-connects;  obviously
it is not a good way to pass these vars via the mentioned ways.

What else does PHP offer? Are there any other methods? Can I define these vars as some 
kind of global variables in any
ini-file?

THX for your support!

Stefan.



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




[PHP] Errors and Logging Configuration Options: docref-root

2002-11-09 Thread Stefan Schiller
I updated my development-server

-- FreeBSD 4.7-REALEASE, Apache/1.3.27 (Port-Build), PHP 4.2.3
(Port-Build) ...]

After this I found

http://www.php.net/manual/en/ref.errorfunc.php#ini.docref-root

In the manual. I downloaded the manual and changed some config-item

[httpd.conf]
Alias /manual/ /X//manual/

[php.ini]
docref_roof = /manual/php4_manual
docref_ext = .html


But I noticed no changes!

- is this a future of php ?.?.? ??

- are some configure options needed for the build?

- is it useful, how does it look like?


[some more options out php.ini]
error_reporting  =  E_ALL
display_errors = On
log_errors = On
html_errors = On
error_log = /XX/Y/Z/php.err
docref_roof = /manual/php4_manual
docref_ext = .html

Best regards

Stefan Schiller


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




[PHP] getimagesize() with ftp-url?

2002-10-13 Thread Stefan Wessman

Hi!

Can anyone tell me if the getimagesize() function is supposed to work with
ftp-url's?
The PHP Manual states URL support was added in PHP 4.0.5, but maby that is
supposed to mean http-url's only?

The following is an expample of how i would like to be able to use
getimagesize():

?php
$size =
getimagesize(ftp://user:[EMAIL PROTECTED]/pictures/image.jpg;);

echo 'pre';
print_r($size);
echo '/pre';
?

This code yields the following errors in my log:

[12-Oct-2002 23:32:14] PHP Warning:  getimagesize(): php_hostconnect:
connect failed in getimagesize.php on line 2
[12-Oct-2002 23:32:14] PHP Warning:  getimagesize(...): failed to create
stream: FTP server reports 227 Entering Passive Mode (194.236.xxx.xxx in
getimagesize.php on line 2

Is this a bug, or is it a missing feature, or maby a documentation issue?
I've tried it on a few different ftp-servers, so i don't think that is the
problem.. but who knows?

Any thoghts would be appreciated.

/OnionMan



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




[PHP] Re: getimagesize() with ftp-url?

2002-10-13 Thread Stefan Wessman

Well, it is remote in the case of http-url's.

Try this code:

?php
 $size = getimagesize(http://www.php.net/gifs/php_logo.gif;);

 echo 'pre';
 print_r($size);
 echo '/pre';
?

And you will see this result:

Array
(
[0] = 120
[1] = 64
[2] = 1
[3] = width=120 height=64
[bits] = 8
[channels] = 3
[mime] = image/gif
)

My point is that it would be nice if the same could be done with an ftp-url.
I don't know if there are any issues that would make this hard to implement,
but if it is possible i think this should be added to complement the
http-url support.

/OnionMan
[EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 getimagesize isn't remote.

 --

 Nicos - CHAILLAN Nicolas
 [EMAIL PROTECTED]
 www.WorldAKT.com - Hébergement de sites Internet

 Stefan Wessman [EMAIL PROTECTED] a écrit dans le message de news:
 [EMAIL PROTECTED]
  Hi!
 
  Can anyone tell me if the getimagesize() function is supposed to work
with
  ftp-url's?
  The PHP Manual states URL support was added in PHP 4.0.5, but maby
that
 is
  supposed to mean http-url's only?
 
  The following is an expample of how i would like to be able to use
  getimagesize():
 
  ?php
  $size =
  getimagesize(ftp://user:[EMAIL PROTECTED]/pictures/image.jpg;);
 
  echo 'pre';
  print_r($size);
  echo '/pre';
  ?
 
  This code yields the following errors in my log:
 
  [12-Oct-2002 23:32:14] PHP Warning:  getimagesize(): php_hostconnect:
  connect failed in getimagesize.php on line 2
  [12-Oct-2002 23:32:14] PHP Warning:  getimagesize(...): failed to create
  stream: FTP server reports 227 Entering Passive Mode (194.236.xxx.xxx in
  getimagesize.php on line 2
 
  Is this a bug, or is it a missing feature, or maby a documentation
issue?
  I've tried it on a few different ftp-servers, so i don't think that is t
he
  problem.. but who knows?
 
  Any thoghts would be appreciated.
 
  /OnionMan
 
 





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




[PHP] How to get count of dimensions in multi array?

2002-09-23 Thread Stefan

Hello,
I´m trying to figer out how to get the number och dimensions of a array..
It isn´t the problem to get the count of elements with count(), it´s the
number of dimensions i am stuck at :(

Any tips would be appreciated.
Best regards,
Stefan




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




[PHP] Apache not parsing without .php on url?

2002-09-19 Thread Stefan

Hello,
I have a new Apache 2.0.40 with PHP 4.2.3 installation on a Solaris x86 box.

Configered in httpd.conf  with:
AddType application/x-httpd-php .php
and
LoadModule 

Parsing url´s with  .php works fine, but i can´t figure out why it
dosen´t
work if i leave out the .phpextension in the url? This works in my old
apache 1 installation.!

The file is named test.php in the abc directory.
http://my.server.se/abc/test.php; works, but not
http://my.server.se/abc/test;

Any tips in what i missed out in configuration or how to fix this would be
appreciated.

best regards,
Stefan




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




[PHP] Re: Calling on functions in a url

2002-09-19 Thread Stefan

http://www.sample.com/script.php?fucntion=1
http://www.sample.com/script.php?fucntion=2
Then do a 'case' or 'if' on $_GET['fucntion']


Tom Ray [EMAIL PROTECTED] skrev i meddelandet
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have a question that I have yet to figure out. Let's say I have a PHP
 script with multiple fuctions, how do I call on the script to perfom
 specific functions through a url? Ex:
 http://www.sample.com/script.php?fucntion1

 TIA




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




Re: [PHP] '--enable-track-vars' php.ini file on Mac OS X

2002-06-11 Thread Stefan Rusterholz

Hi

I suppose you mean register_globals is off and should be on, right?
Ok, to make this short, do following: create a file php.ini on your 
desktop and write following into it:
register_globals=on

Make sure you have unix-linebreaks (use BBedit for example, or pepper) 
and a linebreak at the end of the line. Save the file and open the 
terminal. Enter
root
cp /Users/yourname/Desktop/php.ini /usr/local/lib/
apachectl restart

Now try it again. Register_globals should now be on. As another one has 
written, enable_track_vars is always on. I use the same installation 
(entropy.ch) for php :)

cya
Stefan Rusterholz

Am Dienstag den, 11. Juni 2002, um 09:02, schrieb Mario A. Salinas:

 Hi Folks,

 Let me begin with the direct question to save you time.  If you want 
 more info read more about the issue by reading 'The Problem:' below.



 The question:

 Is there any way to '--enable-track-vars' in my Macintosh laptop 
 running Mac OS-X 10.1.5 and a version 4.2.1 installation of PHP without 
 creating a php.ini file?  Is there a command I can run to do this?  If 
 so...  What directory do I need to be in when I do this?


 Configuration Info:

 Mac OS X
 PHP Version 4.2.1



 The problem:

 I have a PHP application which works fine on a Cobalt server that is 
 running PHP 4.0.2. My problem is that I'm trying to run this 
 application (a set of PHP scripts) on my Macintosh laptop which is 
 running Mac OS X 10.1.5.  I have tested the PHP installation using the 
 phpinfo() function on my laptop and it works fine.  But my scripts 
 require the tracking of variables.

 By running the phpinfo() function on both my laptop (PHP v. 4.2.1 this 
 does not run my scripts) and the cobalt server (PHP v. 4.0.2 this does 
 run my scripts) I noticed that there was some difference in the 
 configuration.  I noticed that my laptop configuration does not have 
 '--enable-track-vars' listed under the Configure Command information in 
 the PHP configuration page that results from running the phpinfo() 
 function but the Cobalt PHP installation does have that listed.

 The installation of PHP I used was obtained from:

 http://www.entropy.ch/software/macosx/php/

 This page says that this installation package does not include a 
 php.ini file and it goes on to say that, if I want this file I should 
 just create it.  But it does not say what should go into this php.ini 
 file.  I suppose I could just copy the php.ini file from the Cobalt 
 server running PHP v. 4.0.2 but I think that won't work.

 Any ideas?


 Thanks in advance,


 Mario Salinas



 -- 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] browscap.ini

2002-05-28 Thread Stefan Rusterholz

Hi

Has anyone got an up to date browscap.ini-file or does someone know 
where to get one?
The most up to date browscap I found got it's last update in October 9, 
2001 - since then a lot new browser appeared...

best regards
Stefan Rusterholz


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




Re: [PHP] browscap.ini

2002-05-28 Thread Stefan Rusterholz

Hi

Sorry, but this one is pretty old, an excerpt from the website:
   browscap.ini download
   Current version: 2.5
   Last updated: February 2000
   Download size: 14 KB

February 2000

I took the following: http://asp.net.do/browscap.zip (found in the 
user-comments for get_browser())
It's from October 2001. But that's still not new enough...

Am Dienstag den, 28. Mai 2002, um 17:31, schrieb Tyler Longren:

 I found this in the PHP FAQ:
 http://www.cyscape.com/browscap/

 http://www.php.net/manual/en/faq.obtaining.php

 Tyler Longren
 Captain Jack Communications
 www.captainjack.com
 [EMAIL PROTECTED]

 - Original Message -
 From: Stefan Rusterholz [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, May 28, 2002 10:15 AM
 Subject: [PHP] browscap.ini


 Hi

 Has anyone got an up to date browscap.ini-file or does someone know
 where to get one?
 The most up to date browscap I found got it's last update in October 9,
 2001 - since then a lot new browser appeared...

 best regards
 Stefan Rusterholz


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



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



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




[PHP] Re: DOMXML and encodings (php4.1.2, libxml2.4.16)

2002-03-24 Thread Stefan Livieratos

Hi

Lucky wrote:
 Hello all, I have a little problem with encodings with libxml2 resp. domxml
 in php.
 
 In our site we're storing articles as XML, ISO-8859-1 encoded (indicated in
 xml-header). Libxml2 is doing all the internal processing in UTF-8, so the
 article gets translated to UTF-8. But when I do an xmltree() on the article,
 all output of libxml is in UTF-8, too, and it's really ugly to read german
 umlauts in UTF-8 in a browser displaying all as ISO-8859-1.
 Is there any way (other than manually do utf8_decode on every part of the
 output, which is _very_ ugly and annoying) to tell php or libxml to output
 things in UTF-8?

No, unfortunately there isn't. Here's a quote from the libxml site 
(http://xmlsoft.org/encoding.html):

... basically the I18N (internationalization) support get triggered 
only during I/O operation, i.e. when reading a document or saving one

Regards,
Stefan Livieratos


-- 

ICS Plus
Internet Consulting + Services
==
Aeussere Brucker Str. 51
D-91058 Erlangen
Germany
==
Tel: +49 9131 127733
Fax: +49 9131 127744
E-mail : [EMAIL PROTECTED]
Web: http://www.icsplus.de
==


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




[PHP] Re: HELP! Open HTTPS://, and follow rediect header

2002-03-24 Thread Stefan Livieratos

Hi,

Zlutarch G. wrote:
 Hi All,
 
 I need help on two problems:
 1) Is there a PHP function similar to fopen() that would open URL begins 
 with https://;, i.e., SSL address?
fopen(https://...;) is working with current CVS but is not going to be 
in a release before version 4.3. For now you can use the cURL module 
provided the cURL library is compiled with OpenSSL support.

 
 2) Does anyone know if it is possible in PHP to read redirect 
 instructions in HTTP header, and then follow the links?
Use the cURL module:
?php
$ch = curl_init (http://www.php.net/;);
curl_setopt ($ch, CURLOPT_HEADER, 1);
curl_setopt ($ch, CURLOPT_NOBODY, 1);
ob_start();
curl_exec ($ch);
$header = ob_get_contents();
ob_end_clean();
curl_close ($ch);
?
Now search for the Location header in $header.

Regards,
Stefan Livieratos

-- 

ICS Plus
Internet Consulting + Services
==
Aeussere Brucker Str. 51
D-91058 Erlangen
Germany
==
Tel: +49 9131 127733
Fax: +49 9131 127744
E-mail : [EMAIL PROTECTED]
Web: http://www.icsplus.de
==


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




[PHP] file upload problem (files 7.5mb)

2002-03-04 Thread stefan

i wrote a php uploadscript and it works fine till the file is not larger
then 75mb
is set the max upload file size in the upladfrom as well as in phpini to
100mb but it still doesn't work!
system is linux red hat and php 406 (with mysql)
is there anyone who had the samestefa problem and knows a solution?

stefan



-- 
PHP General Mailing List (http://wwwphpnet/)
To unsubscribe, visit: http://wwwphpnet/unsubphp




[PHP] CURL and multiple sites at once

2002-03-03 Thread Stefan Rusterholz

Hi

I'm looking for the fastest way to fetch multiple pages from php 
Currently I'm trying the curl-lib and it works fine - I just don't 
understand how to use curl that it stores multiple requests in multiple 
files
I'll try to explain my problem more detailed:
Somewhere are the pages
http://foobarcom/page1html
http://foobarcom/page2html
http://foobarcom/page3html
I want to fetch them with php and write them locally to the files
foobarpage1html
foobarpage2html
foobarpage3html
And I try to achieve a maximal speed
I tried following code:

$fh1 = fopen(foobarpage1html, w);
$fh2 = fopen(foobarpage2html, w);
$fh3 = fopen(foobarpage3html, w);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, http://foobarcom/page1html;);
curl_setopt($ch, CURLOPT_FILE, $fh1);
curl_exec($ch); //exec1
curl_setopt($ch, CURLOPT_URL, http://foobarcom/page2html;);
curl_setopt($ch, CURLOPT_FILE, $fh2);
curl_exec($ch); //exec2
curl_setopt($ch, CURLOPT_URL, http://foobarcom/page3html;);
curl_setopt($ch, CURLOPT_FILE, $fh3);
curl_exec($ch);
curl_close($ch);

fclose($fh1);
fclose($fh2);
fclose($fh3);

I just tells me that it's not capable of executing one handler multiple 
times If I delete the lines with exec1 and exec2 it works but only 
stores the last page

Who can help?

TIA  greets
Stefan Rusterholz


-- 
PHP General Mailing List (http://wwwphpnet/)
To unsubscribe, visit: http://wwwphpnet/unsubphp




[PHP] register_shutdown_function

2002-02-25 Thread Stefan

hi,

when i use register_shutdown_function in an included or required script,
will the function be called after the processing of the included / required
script, or after all scripts? i think they are called last, but i'm not sure
...

does anyone know?

 + stefan



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




[PHP] Re: Delete checked files

2002-02-25 Thread Stefan

make a form, one delete-button and put a checkbox before every file. the
checkbox's name is 'delete_file['.$filename.']' ... wehen pressed delete
open a file which foreach's every entry in delete_file and unlink it. but be
careful - this could be a huge security-hole ...

 + stefan

Nautilis [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi everybody,

 I show a list of files that I upload to the user's folder using the next
 code:

 $path= ../clients/$user;
 $dir = opendir ($root);
 while ($archivo = readdir ($dir))
{
 $size = filesize($path/$filename);
 $size = ($size/1024);
 $size = intval($size * 100 ) / 100;
 if ($filename!= .  $filename!=..)
 {
 echo trtda
 href='$path/$filename'$filename/a/tdtd$size Kb/td/tr;
 }
 }

 I want to add a checkbox in every file i get in the user's folder. My
 question is:

 Is there any way to use some kind of function to delete selected files? I
am
 not sure if i can use javascript to evaluate which is checked and how. And
 after that evaluation, how to call a unlink ($filename) to delete the
files.

 Any help would be greatly appreciated.

 Nau







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




[PHP] Templates

2002-02-14 Thread Truniger, Stefan Martin

Hi every1,
 
I've been playing around with template.inc out of PHPLib.
Now there's just one question dwelling in my head.. is it possible
somehow to get the server to parse any html-file that is requested.
 
example: user requests file index.html, index.html is parsed thru a
standard template to generate the nicely formatted page... 
 
index.html only holds the content of the site and is pure html (maybe
with a tag or two to mark the content and the title or so, but no or
very very little PHP code in it.)
 
I hope  this is more or less understandable... ;oP
 
I'd appreciate any help on that even if you say that it will never
work.. 
 
thanks
 
Stefan

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




[PHP] Searching class capable of parsing ID3-tags in MP3-files

2002-02-10 Thread Stefan Rusterholz

I
I search a class to parse mp3-files' id3 tag. I already found one at 
upperdesign.com but it seems not to be capable of parsing newer versions 
of the id3 tag :(
So does anyone know an already existing class doing that for me?

TIA
Stefan Rusterholz


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




[PHP] Out of the box algorithms

2002-02-06 Thread Stefan Rusterholz

Hi
As part of a class I'm building I need to parse a file where following 
line occurrs:
users: username username with spaces anotherusername

I need to parse that into a structure like
$users = array(
'username',
'username with spaces',
'anotherusername'
);

The issue is the string after the : (the other part is relativly easy as 
you could think)
Is there anyone having a parsing algorithm for that just out of the box? 
It would save me reinventing the wheel ;-)

TIA
stefan rusterholz


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




Re: [PHP] What is ? Mean in the Action Box

2002-01-31 Thread Stefan Rusterholz

From: val petruchek [EMAIL PROTECTED]
To: PHP [EMAIL PROTECTED]
Sent: Thursday, January 31, 2002 10:40 AM
Subject: Re: [PHP] What is ? Mean in the Action Box


  Dear all
  I had open a webpage which design from my company's pervious staff!
  This page is a input form, and when i look at the properity of the Form
i
  saw this:
 
  form name=o_form action=deposit_admin.php?save=yes method=post
 
  What is the ? mean in the Action part?
 


 after ? goes the list of parameters deposit_admin.php will get as
variables
 ($yes or $HTTP_GET_VARS[yes])

Other way round:
with mypage.php?save=yes
you'll have $save which contains 'yes'* and not $yes containing 'save'. But
I think this was a kind of typo ;-)

(*$HTTP_GET_VARS['save'] works also. And use that quotes $array['E_ERROR']
is not the same as $array[E_ERROR]! The second is a constant and thats not
what you _really_ want even if php normally correctly converts it to a
string)

best regards
Stefan Rusterholz

 Valentin Petruchek (aki Zliy Pes)
 *** Cut the beginning ***
 http://zliypes.com.ua
 mailto:[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] Function call stack

2002-01-30 Thread Stefan Rusterholz

If you set_error_handler, then you get automatically line number and
filename.
Read through: http://www.php.net/manual/en/function.set-error-handler.php
(read user comments! there are undocumented things)
Then set up your handler like this:

$_old_error_handler = set_error_handler(myErrorHandler);
function somefunction(){
#do some stuff
trigger_error(Something went wrong, don't know why, sorry,
E_USER_ERROR);
}

function myErrorHandler($level, $message, $file, $line, $context){ #$context
contains _ALL_ variabels in scope when error happened
echo D'oh, an error has occurred: $message.\n;
echo It happened in file $file at line $line and it is a $level-error;
}

the most beauty about that is that you can also cover errors you didn't
handle (e.g. if fopen triggers a warning or whatever)

best regards
stefan rusterholz

- Original Message -
From: Lars Torben Wilson [EMAIL PROTECTED]
To: Christian Novak [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, January 30, 2002 12:45 PM
Subject: Re: [PHP] Function call stack


 On Wed, 2002-01-30 at 03:33, Christian Novak wrote:
  Has anyone an idea on how to get information from PHP on the function
call
  stack.
  I need the line number and file calling a function for a custom error
  handler.

 This cannot be done in current versions of PHP. There are
 feature requests in the bug database about this, though.


 Torben

  To be more clear, here is what I would like to do:
 
  - I have a library, included in the main program
  - I have an error handler in the library
 
  // main.php
  require library.php;
  $x = myfunc('A');
 
 
  // library.php
  function myfunc($i)
  {
  if (!is_int($i)) {
 $file =   // how can I get the file name of the file
  calling myfunc()
 $line =  // how can I get the line number of the file
  calling myfunc()
 trigger_error(Error in  $file, at line $line, paramter must be an
  integer!, E_USER_ERROR);
  return($i);
 
  Using the pre_defined varibales __line__ and __file__ will always point
me
  to the function not the calling
  script.
 
  Best regards
 
  Christian Novak
 
 
 
  --
  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]
 
 
 --
  Torben Wilson [EMAIL PROTECTED]
  http://www.thebuttlesschaps.com
  http://www.hybrid17.com
  http://www.inflatableeye.com
  +1.604.709.0506


 --
 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 do I Resize an image?

2002-01-30 Thread Stefan Rusterholz

Thank you for that hint.
Where do I get netpbm?
Is it fast?
What image-formats are supported (jpg, png, gif, ...)?
What operations are supportetd (resizing, antialiasing, merging, writing
text to pictures, etc.)?

best regards
Stefan Rusterholz

- Original Message -
From: Tony Bibbs [EMAIL PROTECTED]
To: Bryan Gintz [EMAIL PROTECTED]
Cc: Francis Cronjé [EMAIL PROTECTED]; PHP List
[EMAIL PROTECTED]
Sent: Wednesday, January 30, 2002 3:25 PM
Subject: Re: [PHP] How do I Resize an image?


 You can use GD, or imagemagick.  If you want to make your code easily
 portable, you may want to consider using netpbm as it runs on
 linux,freebsd,macosx,solaris and windows.

 --Tony

 On Wed, 2002-01-30 at 08:18, Bryan Gintz wrote:
  For Linux (Unix) you can get a tool called imagemagik (not sure of
  spelling) and do a system call to it from a php script.
 
  Bryan
 
  Francis Cronjé wrote:
 
  I am new to php and wd appreciate any help!
  I have been through the manual, but have found no solution:
  1.How do I resize an image retrieved from an interbase database before
=
  displaying it on a page?
  
  ie If the image is 800 x 600 pixels and I want to resize the image to =
  256 x 192
  2.Do I have to install gd library?
  
  3.How do I display the image from the interbase database?
  
  
  
  
 
 
 
  --
  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]
 --
 Tony Bibbs | Life is a moderately good play
 [EMAIL PROTECTED] | with a bad 3rd act.
 515.554.8046   |


 --
 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] mailing to 19000 users

2002-01-29 Thread Stefan Rusterholz

Read through the according rfc's.
http://www.ietf.org/rfc/rfc0821.txt could match (else do a google search on
rfc +mail without parenthesis)
I didn't find anything about length limitation (but I didn't read it _very_
seriously) so I think it's theoretically not limited. But I could imagine
that (once more) theory and reality diverge so that some mail-servers _have_
limitations (due to memory issues or whatever - I'm not a specialist here as
I mentioned).
If you have a domainname with e-mail address supporting wildcards, just try
it out sending yourself one or two hundreds of mails. 190 loops shouldn't be
bad.

good luck
stefan rusterholz

- Original Message -
From: val petruchek [EMAIL PROTECTED]
To: Stefan Rusterholz [EMAIL PROTECTED]
Sent: Tuesday, January 29, 2002 12:00 PM
Subject: Re: [PHP] mailing to 19000 users



  I have no experience with this stuff, but some thoughts
  split the recipients up into groups of 100-1000 persons. put that group
of
  recipients into bbc (all) so nobody will see the others mail address.


 And what about $bcc  length? Has it any length limitations?

 Valentin Petruchek (aki Zliy Pes)
 *** Cut the beginning ***
 http://zliypes.com.ua
 mailto:[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] Feature requests for PHP development - where to post them?

2002-01-29 Thread Stefan Rusterholz

Is there a place especially meant to make feature-requests to the
php-development team?

TIA
stefan rusterholz


-- 
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] Correct URL's

2002-01-25 Thread Stefan Rusterholz

Hi

I have a HTML-Form where user's can enter their website-address. Some of you know the 
resulting problem for sure: most users enter www.php.net, some users enter 
http://www.php.net; and some others enter http://www.php.net/;. The last version is 
IMHO the most correct form. (http://www.php.net; is commonly used, but afaik it's 
either the webbrowser or the webserver which appends the missing /).
So my problem was to rewrite the url's so that entered URL's will be displayed 
correct, no matter how the user entered it. For this purpose I wrote following 
function:

function rewriteURL($url, $base=){
  $purl = parse_url($url);
  if (!isset($purl['scheme']) || (!$purl['scheme'])){
   $url = http://.$url; }
  $purl = parse_url($url);
  if ((!isset($purl['path'])) || (!$purl['path'])){
   $url .= '/'; }
  return $url;
 }

My Questions:
-Are there URLs which could be entered correct and become wrong when rewritten with 
that function? (Yes, I have tested the function myself, but there are too many 
possibilities so it's impossible for me to cover all of them)
-What was the best way to check, if the give address really exists? (I thought on a 
test like this:
$exists = true;
@fopen($url) or $exists = false;
return $exists;)

TIA
Stefan Rusterholz



Re: [PHP] Correct URL's

2002-01-25 Thread Stefan Rusterholz

- Original Message -
From: Alexander Weber [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 25, 2002 10:34 AM
Subject: Re: [PHP] Correct URL's


 Stefan Rusterholz wrote
  What was the best way to check, if the give address really exists?
 Just try this function:

 http://www.php.net/manual/en/function.gethostbyname.php

 It returns the IP address of the given domain. Normally a domain can be
 accessed by the browser if it has a valid IP address and everything is
 configured correctly.

But if I understand this function right, It will only work for URLs like
http://www.php.net/ - what if the user has a free space from his ISP which
is located in a subdir like http://www.php.net/users/myhome/?

 Please do not send HTML messages.
Sorry, Outlook is crap and I'm just too lazy to buy (on Win you have to buy
almost everything) another e-mail client for my working machine.
But I finally moved my ass and changed the options to send text-only
mails. I hope you are happy now :) (m$ thought it was a good idea to hide
those options as good as possible - I disagree with them, but that's just
normal ;-)

 Alexander
Stefan


-- 
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 echo the /n, /r, etc... to the HTML display?

2002-01-25 Thread Stefan Rusterholz

I suppose sp is space?

Two suggestions:
Why don't you do
pre
(print here the string as-is. newlines and spaces will be kept as they are
by the browser)
/pre

Another Possibility:
$string = preg_replace(/\\s/, nbsp;, $string);

I hope I addressed your problem and didn't miss the point
best regards
Stefan Rusterholz

- Original Message -
From: Scott Fletcher [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 25, 2002 6:31 PM
Subject: [PHP] How to echo the /n, /r, etc... to the HTML display?


 Hi!

 I have been working on this part for a few days now!  It had become
 appareant that HTML is not able to do this, so I'm trying to get it to
work
 in PHP but no luck!  The string I see like this is when I run the UNIX
 command od -av filename |more.

 --clip here--
 del  cr  lf  cr  lf  cr  lf  cr
 020   lf   P   A   G   E  sp   1  sp  sp  sp   D   A   T   E  sp  sp
 0401   -   2   5   -   2   0   0   2  sp  sp   T   I   M   E  sp
 0601   0   :   3   8   :   1   4  sp  sp   P   @   F   E   P  sp
 100   sp   V   0   0   1  sp  sp   T   C   A   1  cr
 --clip end--

 So, you see, if I use the PHP function, nl2br(), that took care of the
 cr and the lf.  But it doesn't take care of the sp so how do I fix
 that?  This sp when work correctly will be able to justify the text on
 each line.  Anyone know?

 thanks,
  Scott



 --
 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] Whats the best way.

2002-01-24 Thread Stefan Rusterholz

Read this through: http://www.php.net/manual/en/features.file-upload.php
Consider then: http://www.php.net/manual/en/function.is-uploaded-file.php
After that read:
http://www.php.net/manual/en/function.move-uploaded-file.php

and then do it like that:
-upload form
-check if user has uploaded a file (he could have sent an empty form)
-check what extension is needed (.jpg, .gif or whatever)
-move_uploaded_file($userfile, Your/Directory/.time().$extension)

hope this helps
stefan rusterholz

- Original Message -
From: Philip J. Newman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 24, 2002 9:47 AM
Subject: [PHP] Whats the best way.


Whats the best way that I can let users upload single .jpeg and gif files,
renaming then with a time stamp?

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012



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




Re: [PHP] db conversion advice needed

2002-01-24 Thread Stefan Rusterholz

- Original Message -
From: Wilbert Enserink [EMAIL PROTECTED]
To: PHP [EMAIL PROTECTED]
Sent: Wednesday, January 23, 2002 4:34 PM
Subject: [PHP] db conversion advice needed


 Hi all,


 I have this huge db in FileMaker Pro format :-(
Which plattform? Mac, Win?

I had once to write an import script for mysql to import a tab-export from
FM Pro Mac. I did it this way:
-HTML-Fileupload
-Translate chars (e.g. german characters ä, ö, ü - or in HTML auml;,
ouml; - furthermore I translated ASCII 13 to br)
-Read in a loop line for line
-Split line by tab
-check if record is already in mysql database (only if you have to import
more than once)
-build mysql insert query
-done :)

If you have more questions or more detailed questions just ask
best regards
Stefan Rusterholz

 Now I need this db to make a db content based website. I know enough stuff
 about MySQL to do this, but I don't know anything about converting db's.
 Does anybody have any tips, or ideas how I can handle this db converting
 thing best?



 I am able to export the filemaker pro file to -tab based- files, which I
 know M$ excel can import



 many regards, and thx for all the ideas.


 Wilbert Enserink

 -
 Pas de Deux
 Van Mierisstraat 25
 2526 NM Den Haag
 tel 070 4450855
 fax 070 4450852
 http://www.pdd.nl
 [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] multi-threading within php?

2002-01-24 Thread Stefan Rusterholz

Sorry, I don't have an answer on your question, but a question to you:
I'm currently building a class to browse a page and was interested in the
source of your script. Especially on that part extracting the links.
Would you mind providing the source or is it a commercial?

best regards
Stefan Rusterholz

- Original Message -
From: Mattias Andersson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 24, 2002 2:52 PM
Subject: [PHP] multi-threading within php?


 Hello!

 I was making a spider for a simple searchengine and all was well until I
 started testing it on larger sites.
 The problem isn't that it doesn't work, it does, but it is very very slow,
 just handling one connection at the time.
 Basically, it just downloads a page, extract all links from it, then
 downloads those pages, extract their links, until all pages on a site has
 been downloaded and archived.
 Is there any way to do it in several threads so that it handles several
 connections simultaneously?
 If it would dynamically allocate threads that would be even better.

 Regards,
 Mattias Andersson

 Software Developer, humany AB
 Direct: 08-4540701
 Mobile: 0704-526685




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




[PHP] PHP Installation: .rpm working with RaQ4 wanted...

2002-01-22 Thread Stefan Rusterholz

Hi

is there a recommendable site where I can find a .rpm (PHP 4.06 or higher) working on 
a Cobalt RaQ4? (I found some for RH6.x  7.x but they didn't work. I got the message 
only packages with major numbers = 3 are supported by this version of RPM)
Any hints are appreciated!

TIA  best regards
Stefan Rusterholz



[PHP] Help! PHP 4.03pl1, fopen and cobalt RaQ4

2002-01-17 Thread Stefan Rusterholz

Hi all

I got a RaQ4 in front of me which I should get running.
Now my script (running fine on a IIS with PHP 4.06) outputs a quite strange error (it 
uses my error-handler that's why it's formatted like this):

Time: Thu 17.01.02 - 15:26:15
Level: Warning (2)
File: /home/sites/site1/includes/class.myClass.inc.php
Line: 103
Message:
fopen(http://192.168.1.50/script/external_cgi.exe?some=3Darguments,r;) - Success

Why does it trigger an error when it was a success? Are there any known bugs with php 
4.03pl1 and fopen?
Furthermore: does anyone know how I can upgrade the RaQ to PHP 4.06 or even 4.1.1 in a 
usable time (I don't want to try to compile PHP myself)?

TIA
Stefan Rusterholz





Re: [PHP] variable problem - help!

2002-01-16 Thread Stefan Rusterholz

 Hi!

 I 'm trying not to hard code my php coding and I'm trying to pass a
 variable name into the $row[coloumname_$variable];
$row[columname_$variable] should do it.
$row[constant] is threaten as constant which is normally not the programmers
intention (set_error_reporting(0) and you'll see PHP's complaints about it)
so PHP converts it to $row['constant'].
You may now understand, that PHP translates your code to
$row['coloumname_$variable'] whre $variable is a string and not a variable.

I hope, I could express myself understandable :)
best regards
Stefan Rusterholz



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




Re: [PHP] CONTINUE - variable problem - help!

2002-01-16 Thread Stefan Rusterholz

 hi again!

 I tried it but it desn't give me any result back.
 It dosn't print any error message but it desn't print my result either.

 this is how I place the code:


 echo ...some html code...;
 $row[somename_$var];
 echo ...the continuation of the html code;

 thanks!

I think this indice in $row is empty then...
try
echo (isset($row[somename_$var]  $row[somename_$var] !== ) ?
$row[somename_$var] : Sorry, but \$row[\somename_$var\] is not set.);

I'll explain, what this code does:
it first checks isset($var) - if this variable (or in this case the indice
of the array) exists, this is true. so if $row[somename_$var] exists and
is not empty, it does 'echo' the stuff behind the ?, else it does 'echo' the
stuff behind the :

and please don't set your priority to important on the list - thank you.

best regars
Stefan Rusterholz


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




Re: [PHP] CONTINUE - variable problem - help!

2002-01-16 Thread Stefan Rusterholz

whoops, typo:
echo (isset($row[somename_$var])  $row[somename_$var] !== ) ?
$row[somename_$var] : Sorry, but \$row[\somename_$var\] is not set.;

above code should be correct :) (notice: it's only 1 line - email could
display it on multiple lines).

and here a smaller explanation of the ternary operator (?:):
echo (condition) ? condition is true : condition is false;
if conditions evaluates to true then PHP interprets it like
echo condition is true;
else
echo condition is false;

best regards
Stefan Rusterholz



-- 
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] Re: How to get a stacktrace? (was how to get a function backtrace)

2002-01-14 Thread Stefan Rusterholz

hmmm, i spent now a lot of time searching for such a function (discovering
many many to me unknown but interesting functions :) - but it seems that
there is no such function.

And yes: I wanted to use it for debugging stuff. I have a lot of recursive
functions and callback functions and it's sometimes incredibly hard to
determine when exactly an error happened because I don't know the how
maniest instance of a function actually is running and from where it got
called. I have made some workarounds, but they are all unsatisfying compared
to the possibilities a stacktrace function would offer...

Just to give you a little impression what perl has got for such things (and
i'd love to see that or something similar in PHP) an extract from the
manual:
caller EXPR

caller

Returns the context of the current subroutine call. In scalar context,
returns the caller's package name if there is a caller, that is, if we're in
a subroutine or eval or require, and the undefined value otherwise. In list
context, returns
($package, $filename, $line) = caller;
With EXPR, it returns some extra information that the debugger uses to print
a stack trace. The value of EXPR indicates how many call frames to go back
before the current one.

($package, $filename, $line, $subroutine, $hasargs,
$wantarray, $evaltext, $is_require, $hints, $bitmask) = caller($i);
Here $subroutine may be (eval) if the frame is not a subroutine call, but an
eval. In such a case additional elements $evaltext and $is_require are set:
$is_require is true if the frame is created by a require or use statement,
$evaltext contains the text of the eval EXPR statement. In particular, for
an eval BLOCK statement, $filename is (eval), but $evaltext is undefined.
(Note also that each use statement creates a require frame inside an eval
EXPR) frame. $hasargs is true if a new instance of @_ was set up for the
frame. $hints and $bitmask contain pragmatic hints that the caller was
compiled with. The $hints and $bitmask values are subject to change between
versions of Perl, and are not meant for external use.

Furthermore, when called from within the DB package, caller returns more
detailed information: it sets the list variable @DB::args to be the
arguments with which the subroutine was invoked.

Be aware that the optimizer might have optimized call frames away before
caller had a chance to get the information. That means that caller(N) might
not return information about the call frame you expect it do, for N  1. In
particular, @DB::args might have information from the previous time caller
was called.

- Original Message -
From: Martin Wickman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 14, 2002 10:24 AM
Subject: [PHP] Re: How to get a function backtrace?


 Stefan Rusterholz wrote:

  Im not sure if function-backtrace is the correct word for what I need,
so I'll explain:
  If I have for example


 What you are looking for is a stacktrace, ie the stack of called
 functions. Dunno if php has any support for it, but it is normally
 used when debugging and error/exception handling.


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





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




Re: [PHP] Passing variables with include()

2002-01-14 Thread Stefan Rusterholz


- Original Message -
From: Imar de Vries [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 14, 2002 12:53 PM
Subject: [PHP] Passing variables with include()


 Hi all,

 at this moment I am working on a script that calculates standings of our
 online racing competition. In order to do that, I have to connect to a
 database on a remote server.

 I have read in the php manual that

 [quote]
 When a file is include()ed, the code it contains inherits the variable
 scope of the line on which the include() occurs. Any variables available
 at that line in the calling file will be available within the called
 file. If the include() occurs inside a function within the calling file,
 then all of the code contained in the called file will behave as though
 it had been defined inside that function.
 [/quote]

 But for some reason, i simply do not get the script to work. I use a
 form in the local script to determine which standings are to be shown,
 and the value is stored in $serie_id. This is done in the main scope (no
 function used). $serie_id can be 2, 3 or 4.

 Then I make an include call to the remote script:

 include(http://www.someremote.server/calculate_drivers.php;);

I'd make a bet (I haven't tried it) that you receive the file already parsed
and so as pure html.
Try it with the extension .txt or something that the remote webserver
doesn't process before it outputs the content.


 In that remote script I use $serie_id to make a database query. But so
 far, the query fails because $serie_id is not known.

 Are there any known exceptions (f.i. specific server settings) that
 might explain why the variable is not known on the remote server?

 Thanks in advance!
 --
 Imar de Vries - [EMAIL PROTECTED] - ICQ 6972439

best regards
Stefan Rusterholz


-- 
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] Re: Passing variables with include()

2002-01-14 Thread Stefan Rusterholz

Sure you can. Right out from the manual:

If URL fopen wrappers are enabled in PHP (which they are in the default
configuration), you can specify the file to be include()ed using an URL
instead of a local pathname. See Remote files and fopen() for more
information.

best regards
Stefan Rusterholz

- Original Message -
From: Tino Didriksen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 14, 2002 1:53 PM
Subject: [PHP] Re: Passing variables with include()


  include(http://www.someremote.server/calculate_drivers.php;);

 Very simple really: You cannot include remote files...

 --|--
 Tino Didriksen
 http://ProjectJJ.dk/



 --
 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] Re: Passing variables with include()

2002-01-14 Thread Stefan Rusterholz

Since some time there has only one difference left (don't know at which
version it changed):
include causes a warning and require an error on fail. (very useful for
debugging - require your error-handler and include everything else)

best regards
Stefan Rusterholz

- Original Message -
From: Scott Houseman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, January 13, 2002 2:54 PM
Subject: Re: [PHP] Re: Passing variables with include()


 Hi Al.

 While we are on topic, what are the key differences between include() 
 require() ?

 Cheers

 Scott

 - Original Message -
 From: Martin Wickman [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, January 14, 2002 3:40 PM
 Subject: [PHP] Re: Passing variables with include()


  Imar De Vries wrote:
 
   Imar De Vries wrote:
  
  
  - Including remote files *is* possible. The php manual does not
mention
 this
  does not work, and when I add the variable to the call (include
  /calculate_drivers?serie_id=3.php) the code is processed
perfectly.
 The
  thing is, I can not pass the variable with the call, because it's
value
 is
  determined by the form field. I could use a switch statement of
course,
 but
  that adds a lot more text to the code.
  
  
   I just changed the code to (include
   .../calculate_drivers?serie_id=$serie_id.php)
  
   ... and this worked! Weird solution...
 
  Not really. The http://.../foo.php request returns html and not php.
  The foo.php file is parsed and executed by the remote server and
  returned to you as html. By adding serie_id=xxx you actually give the
  remote php-script the name and value of the variable.
 
  You should think of include/require as a way to *include* any file
  into your script. Instead of cutting and pasting code into your file,
  you use include. Thats the way it works in practice. No magic is going
  on here :-)
 
 
  --
  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] Re: Passing variables with include()

2002-01-14 Thread Stefan Rusterholz

 Scott Houseman wrote:

  Hi Al.
 
  While we are on topic, what are the key differences between include() 
  require() ?


 Unlike include(), require()  will always read in the target file,
 even if the line it's on never executes. If you want to conditionally
 include a file, use include(). The conditional statement won't affect
 the require(). However, if the line on which the require() occurs is
 not executed, neither will any of the code in the target file be
 executed.

I'm pretty sure that at last for PHP 4.06 or higher this is deprecated. I
don't know why it is still in the manual.
Please correct me if I'm wrong.

best regards
Stefan Rusterholz


-- 
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] How to get a function backtrace?

2002-01-11 Thread Stefan Rusterholz

Im not sure if function-backtrace is the correct word for what I need, so I'll 
explain:
If I have for example

?
a();
function a(){
b();
}

function b(){
c();
}

function c(){
$x = function_backtrace();
print_r($x);
}
?

then I want to get

array(
[0]= 'a',
[1]= 'b',
[2]= 'c'
)

or something similar. So I want to know, what functions have been called. If you know 
perl, then adequate function was caller.
I already searched php.net for it but had no luck for it - so if you please could 
point me to the right direction I was very happy.

TIA
Stefan Rusterholz



  1   2   >