Re: [PHP] Persistent database connections in PHP

2003-09-04 Thread murugesan
Just use the same header.
and in the next page use

...

Murugesan

- Original Message - 
From: "Cesar Aracena" <[EMAIL PROTECTED]>
To: "'Shivanischal'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, September 05, 2003 11:27 AM
Subject: RE: [PHP] Persistent database connections in PHP


> I haven't heard of persistent connections with MySQL before, and I think
> is because PHP can't handle it. PHP will connect to the DB every time it
> has to. Are you really that annoyed for that 0.0003 second that it
> probably takes your pages to connect to the DB?
> 
> What I do to manage just ONE connection request per visitor, is request
> a mainfile.php which also declares a function that connects to the DB.
> After that is prepared to handle all the queries you want.
> 
> HTH,
> 
> Cesar Aracena
> www.icaam.com.ar
> 
> > -Mensaje original-
> > De: Shivanischal [mailto:[EMAIL PROTECTED]
> > Enviado el: Viernes, 05 de Septiembre de 2003 01:05 a.m.
> > Para: [EMAIL PROTECTED]
> > Asunto: [PHP] Persistent database connections in PHP
> > 
> > Hi friends,
> > 
> > I wanted help on how to achieve persistent database connections in
> PHP.
> > The
> > database i use is MySQL. I would be grateful if u could also guide me
> to
> > resources that tell me how to do it.
> > 
> > Thanks,
> > -shiva
> > 
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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



RE: [PHP] Persistent database connections in PHP

2003-09-04 Thread Cody Phanekham
ooppss forgot this as well...

http://au2.php.net/mysql_pconnect

> -Original Message-
> From: Cody Phanekham 
> Sent: Friday, 5 September 2003 16:06
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Persistent database connections in PHP
> 
> 
> do people even look at the manual? or search the php.net website?
> 
> http://au2.php.net/manual/en/ref.mysql.php
> 
> "Runtime Configuration
> The behaviour of these functions is affected by settings in php.ini. 
> 
> Here's a short explanation of the configuration directives.
> 
> mysql.allow_persistent boolean
> Whether to allow persistent connections to MySQL."
> 
> so if you installed PHP without modifying the ini file, all 
> your connections should be persistent
> 
> 
> > > -Mensaje original-
> > > De: Shivanischal [mailto:[EMAIL PROTECTED]
> > > Enviado el: Viernes, 05 de Septiembre de 2003 01:05 a.m.
> > > Para: [EMAIL PROTECTED]
> > > Asunto: [PHP] Persistent database connections in PHP
> > > 
> > > Hi friends,
> > > 
> > > I wanted help on how to achieve persistent database connections in
> > PHP.
> > > The
> > > database i use is MySQL. I would be grateful if u could 
> > also guide me
> > to
> > > resources that tell me how to do it.
> > > 
> > > Thanks,
> > > -shiva
> > > 
> > > --
> > > 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
> > 
> > 
> 
> 
> **
> ***
> This e-mail, including any attachments to it, may contain 
> confidential and/or personal information.
> If you have received this e-mail in error, you must not copy, 
> distribute, or disclose it, use or take any action 
> based on the information contained within it.
> 
> Please notify the sender immediately by return e-mail of the 
> error and then delete the original e-mail.
> 
> The information contained within this e-mail may be solely 
> the opinion of the sender and may not necessarily 
> reflect the position, beliefs or opinions of Salmat on any issue.
> 
> This email has been swept for the presence of computer 
> viruses known to Salmat's anti-virus systems.
> 
> For more information, visit our website at  www.salmat.com.au.
> **
> ***
> 
> -- 
> 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] Header()

2003-09-04 Thread Chris Shiflett
--- MiXmAsTr <[EMAIL PROTECTED]> wrote:
> How can i do so header opens a new page in a new browser, instead
> of opening the page inside the current browser?

header() allows you to set HTTP headers in your response to the client.

What are you wanting to do exactly?

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

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



RE: [PHP] Persistent database connections in PHP

2003-09-04 Thread Cody Phanekham
do people even look at the manual? or search the php.net website?

http://au2.php.net/manual/en/ref.mysql.php

"Runtime Configuration
The behaviour of these functions is affected by settings in php.ini. 

Here's a short explanation of the configuration directives.

mysql.allow_persistent boolean
Whether to allow persistent connections to MySQL."

so if you installed PHP without modifying the ini file, all your connections should be 
persistent


> > -Mensaje original-
> > De: Shivanischal [mailto:[EMAIL PROTECTED]
> > Enviado el: Viernes, 05 de Septiembre de 2003 01:05 a.m.
> > Para: [EMAIL PROTECTED]
> > Asunto: [PHP] Persistent database connections in PHP
> > 
> > Hi friends,
> > 
> > I wanted help on how to achieve persistent database connections in
> PHP.
> > The
> > database i use is MySQL. I would be grateful if u could 
> also guide me
> to
> > resources that tell me how to do it.
> > 
> > Thanks,
> > -shiva
> > 
> > --
> > 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
> 
> 


*
This e-mail, including any attachments to it, may contain confidential and/or personal 
information.
If you have received this e-mail in error, you must not copy, distribute, or disclose 
it, use or take any action 
based on the information contained within it.

Please notify the sender immediately by return e-mail of the error and then delete the 
original e-mail.

The information contained within this e-mail may be solely the opinion of the sender 
and may not necessarily 
reflect the position, beliefs or opinions of Salmat on any issue.

This email has been swept for the presence of computer viruses known to Salmat's 
anti-virus systems.

For more information, visit our website at  www.salmat.com.au.
*

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



[PHP] Re: Persistent database connections in PHP

2003-09-04 Thread David Brannlund
http://se.php.net/mysql_pconnect


/David


"Shivanischal" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi friends,
>
> I wanted help on how to achieve persistent database connections in PHP.
The
> database i use is MySQL. I would be grateful if u could also guide me to
> resources that tell me how to do it.
>
> Thanks,
> -shiva

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



RE: [PHP] Persistent database connections in PHP

2003-09-04 Thread Cesar Aracena
I haven't heard of persistent connections with MySQL before, and I think
is because PHP can't handle it. PHP will connect to the DB every time it
has to. Are you really that annoyed for that 0.0003 second that it
probably takes your pages to connect to the DB?

What I do to manage just ONE connection request per visitor, is request
a mainfile.php which also declares a function that connects to the DB.
After that is prepared to handle all the queries you want.

HTH,

Cesar Aracena
www.icaam.com.ar

> -Mensaje original-
> De: Shivanischal [mailto:[EMAIL PROTECTED]
> Enviado el: Viernes, 05 de Septiembre de 2003 01:05 a.m.
> Para: [EMAIL PROTECTED]
> Asunto: [PHP] Persistent database connections in PHP
> 
> Hi friends,
> 
> I wanted help on how to achieve persistent database connections in
PHP.
> The
> database i use is MySQL. I would be grateful if u could also guide me
to
> resources that tell me how to do it.
> 
> Thanks,
> -shiva
> 
> --
> 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] Header()

2003-09-04 Thread MiXmAsTr
How can i do so header opens a new page in a new browser, instead of opening
the page inside the current browser?

-kjetil

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



[PHP] Display after a certain date

2003-09-04 Thread John Taylor-Johnston
Anyone have a quick fix for a part of an html page that I do not want to display until 
after October 1st, and not after October 31st ?
J

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



Re: [PHP] Restart Apache with PHP???

2003-09-04 Thread Anil Kumar K.

Writing something like this as part of a Web application is definitely a 
bad idea.

The requirement is more like that of a remote administration system and
Webmin (http://www.webmin.com/) cleanly and safely fits the bill. 
Webmin can actually do more than just restarting Apache. But it 
can be configured to do only that. 

best regards.
   Anil

On Wed, 3 Sep 2003, Jason Sheets wrote:

> More safely maybe, but even that solution could be exploited somewhat 
> easily.  The script that writes the file would be better off as a CGI 
> than executed through the Apache module, this would allow you to 
> restrict write access to the directory where the file that triggers the 
> restart is stored to the owner of the script, you could then further 
> restrict access to this script through .htccess or other means.  If you 
> make a file trigger a cronned job to restart the server if you are using 
> mod_php the directory must be writable to the user the web server runs 
> as which means that anyone who can execute php code through the 
> webserver can trigger a server restart by writing the file, you could 
> even cron it to write the file every  minute effectively shutting the 
> server down (whether it be web or the actual system itself).
> 
> Doing something like this takes a lot of thought, it can be made 
> difficult to exploit but you need to do more than just make a cron 
> pickup a file, excellent starting place though.
> 
> Jason
> 
> Dan Anderson wrote:
> 
> >Search the archives.  Somebody wanted to restart their server using a
> >web page, and a clever solution was pointed out.  By creating a script
> >that monitored for a particular file in temp and restarted the server if
> >it existed it, and cronning it for every minute, they could do it safely
> >and securely.
> >
> >-Dan
> >
> >On Tue, 2003-09-02 at 12:19, Joe Harman wrote:
> >  
> >
> >>Hey guys & gals... 
> >>
> >>Is there a way to restart Apache with a PHP command?
> >>
> >>
> >>
> >>Joe Harman
> >>
> >> 
> >>
> >>
> >
> >  
> >
> 

-- 
Linuxense Information Systems Pvt. Ltd., Trivandrum, India
http://www.linuxense.com/

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



[PHP] Startup Seeking Expertise in PHP/MYSQL & Open Source : Remote Interns Welcome!

2003-09-04 Thread Lee Shores
We're looking for a few excellent programmers who want to rock out in
building out a portal/publisher/record-label/video-distributor using
the following applications and technologies from sourceforge.net:

phpBB
xoops
phpnuke
geeklog
oscommerce
postnuke
gallery
drupal
cafelog
dmoz
RSS/RDF/blogging
FOAF (friend of a friend)

We're here to work hard and grow fast!  We're in an old house in a
college town, and we have enough rooms for a few more programmers, so
send along your resume!

We'll consider full-time, part-time, and internships, so if you own
skillz, send your resume to [EMAIL PROTECTED] .

We'll consider full-time, part-time, and internships, so if you own
skillz, send your resume to [EMAIL PROTECTED] .

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



[PHP] Persistent database connections in PHP

2003-09-04 Thread Shivanischal
Hi friends,

I wanted help on how to achieve persistent database connections in PHP. The
database i use is MySQL. I would be grateful if u could also guide me to
resources that tell me how to do it.

Thanks,
-shiva

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



[PHP] using PHP curl and a client cert

2003-09-04 Thread Scott
Hello,

I am trying to post to a ste that requires me to use a client cert.  I can
get it to work for both windows and unix, but only on the command line.  I
have tried without success to use the PHP built-in methods for doing this.
Here is the command line that works:

curl -d " 

 
   <_RESIDENCE _City='PRESCOTT' _State='AZ'
_PostalCode='86305' BorrowerResidencyType='Current'>
   
 
" -k -E myCert.pem:myPassword
https://www.mysite.com/Listener.exe

Any ideas of how to make this work with the curl_setopt methods?  I tried
variations of this:

$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 2);
curl_setopt ($ch, CURLOPT_SSLKEY, 'myCert.pem');
curl_setopt ($ch, CURLOPT_SSLKEYPASSWD, 'myPassword');

$result = curl_exec ($ch);


Thanks,
Scott

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



Re: [PHP] Can Objects be passed to another page?

2003-09-04 Thread Hardik Doshi
Yeah you can pass object using serialize function and
later on you can use unserialize function to convert
the serialized variable in the original object.

--- Radu Manole <[EMAIL PROTECTED]> wrote:
> using "serialize" might work
> 
> - Original Message - 
> From: "Marco Schuler" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 03, 2003 3:37 PM
> Subject: Re: [PHP] Can Objects be passed to another
> page?
> 
> 
> > Hi there
> > 
> > MuToGeN wrote:
> > 
> > > No, arrays can be passed ( name="array[2]">,
> > > for example), but not objects.
> > 
> > And why does this work then?
> > 
> > === SCRIPT ===
> >  > 
> > error_reporting(E_ALL);
> > 
> > class AClass {
> > 
> > var $i = 0;
> > 
> > function AClass ($i = 0) {
> > //$this->display();
> > }
> > 
> > function increment() {
> > $this->i++;
> > }
> > 
> > function display() {
> > printf('Current value of $i is:  %s',
> $this->i);
> > }
> > }
> > 
> > session_start();
> > 
> > if (!isset($_SESSION['AClass'])) {
> > $a = & new AClass();
> > $_SESSION['AClass'] = & $a;
> > }
> > else {
> > $a = & $_SESSION['AClass'];
> > }
> > 
> > $a->increment();
> > $a->display();
> > 
> > ?>
> > 
> > 
> > === /SCRIPT ===
> > 
> > -- 
> > 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
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] HTML Template, PHP, Javascript & PATH_INFO

2003-09-04 Thread Richard A. DeVenezia
"John W. Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Richard A. DeVenezia wrote:
> [snip]
> > I can do
> > - site.com/info/template.html and get two alerts
> > - site.com/info/content1.html and see a new text under H1
> > - site.com/info/slick.php/content1.html and get neither alert nor new
text.
> >   - instead I get 4 browser (IE) 'problem alerts', I presume
> >   - 1. for not finding js1.js
> >   - 2. for not finding js2.js
> >   - 3. for not finding content1.js
> >   - 4. for not finding helloFromContent1() function
>
> I think you're confusing HTML. While the server understands
> slick.php/content1.html, HTML probably doesn't and is looking for
> slick.php/content1.html/js1.js (and the other files).
>
> > I don't want to change my SRC references to be site absolute, I want
them
> > relative.
>
> Well, I'm glad that's what you want, but how about using it anyhow
> because it'll work. Like Chris said, you can use a function/variable to
> get the complete path so it's really no extra work for you.
>
> -- 
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> php|architect: The Magazine for PHP Professionals – www.phparch.com

Thanks for the response.  I figured out what was happening

slick.php/content.html has a relative href js1.js
which means the browser is going to do a get on
slick.php/js1.js

Thus, slick has to differentiate between html and non-html.  If non-html,
just echo back the file contents.


slick changed to article, contentPath can be placed in folder out of webs
way, or if in webs way .htaccess can restrict access to original form
content.
$page not
found.";
return;
  }

  $source = implode ("", file ($page));

  // server does not want html, just send the stuff back unaltered.
  if (!preg_match("/html$/", $page)) {
echo $source;
return;
  }

  // html!, rip out the pieces and replace into template page

  $template = implode ("", file ($template));

  preg_match ("|(.*)?|is",$source,  $head);  // i
insensitive, s newlines are a character
  preg_match ("|(.*)?|is",   $head[1], $title);
  preg_match_all ("|(.*?/SCRIPT>)|isU",$head[1], $script); // U
ungreedy
  preg_match_all ("|(

Re: [PHP] Question about Error Redirect (URL ShortCuts)

2003-09-04 Thread ccj
Sorry, via ErrorDocument 404 /error.php in httpd.conf setting.
See http://www.php.net/mirroring.php

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



Re: [PHP] Session_start() corrupt HTML output with IE

2003-09-04 Thread Viraj Kalinga Abayarathna
Thank you Curt for the explanation.

Viraj

Curt Zirzow wrote:
> 
> * Thus wrote Viraj Kalinga Abayarathna ([EMAIL PROTECTED]):
> >
> >header("Cache-control: private");
> >
> > p.s.
> > and also if there is any one wo knows what exactly this header line
> > means,
> > please post a brief decription. thanks.
> 
> private means that only the intended person that is getting this
> file is able to cache it.  So if you're going through a proxy that
> proxy must not cache that file.
> 
> Curt
> --
> "I used to think I was indecisive, but now I'm not so sure."
> 
> --
> 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] -f function ???

2003-09-04 Thread Guillermo Scharffenorth
Ok, I get it know. But, can the use of this first parameter be turned on or
off using php.ini?  According to the developer of the script, it is turned
off in my php.ini, but I don't see how it can be turned off and there is no
documentation about it.  Does this parameter have anything to do with the -f
option of the Unix/Linux sendmail command?

Thanks,

Guillermo


"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote Guillermo Scharffenorth ([EMAIL PROTECTED]):
> > Hello,
> >
> > I am using a mailing list script which makes use of a function
called -f,
> > according to the developers of the script. The fact is that some
> > functionality of the script is not working and the developers claim -f
is
> > turned off in my system. I've looked everywhere trying to find info
about
> > this, but only found a small, not very enlightening, reference in the
php
> > manual under the function "mail."  Anyone knows where to find info
about -f?
>
> Its the fifth paramater to mail():
>   http://php.net/manual/en/function.mail.php
>
>
>
> Curt
> -- 
> "I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] session.save_path is a big security hole!

2003-09-04 Thread Rx

"Raditha Dissanayake" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> M, very interesting thread, thanx for starting this. Good comments
curt.
>
>
> >>1. (!!!) Absolutely easily generate new sessions with any content for
every
> >>site on server.
> >>
> >>
> >
> >
> >
>
> It's because of the 'suspect' nature of sessions and cookies that i
> never place userid,username or password in sessions. My tactic is to
> aways have 2 column mysql table and store session identifier and
> corresponding userid in it. So even if someone does create a bogus
> session they still have to find a way to insert a userid into the mysql
db.
>
Yep, there are many ways. But i think 90% of php users doesnt even realize
that every user on the same server can actually get full access to their
account through sessions. And i bet it can be done now on 90% of the hosting
companies :D The only workaround i thought out on system level, without
disabling ini_set is to create for every user unique session folder, with
random 20-30 chars length, and to set this dir for every user through
php_admin_value.
But theres still next problem below


> >3. Flood every http server writable directory with thousands or millions
> >files.
> >
> >
> set quotas. Some admins even set quota for the root user, which is
> inconvinient by safe.
>

Unfortunetly setting quotes (eg for apache user)doesnt prevent from flooding
out entire disk. For example i can have running a script that will check
user directories every 15 minutes and if some directory will contain large
amount of apache generated files, user account will be disabled and files
will be removed. But what to do if for example i have 500 users and every
user directory is flooded out with bogus files? Actually i can imaging some
sort of terrorising the server this that kind of attack :)


> >
> >
>
> -- 
> http://www.raditha.com/php/progress.php
> A progress bar for PHP file uploads.

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



Re: [PHP] HTML Template, PHP, Javascript & PATH_INFO

2003-09-04 Thread John W. Holmes
Richard A. DeVenezia wrote:
[snip]
I can do
- site.com/info/template.html and get two alerts
- site.com/info/content1.html and see a new text under H1
- site.com/info/slick.php/content1.html and get neither alert nor new text.
  - instead I get 4 browser (IE) 'problem alerts', I presume
  - 1. for not finding js1.js
  - 2. for not finding js2.js
  - 3. for not finding content1.js
  - 4. for not finding helloFromContent1() function
I think you're confusing HTML. While the server understands 
slick.php/content1.html, HTML probably doesn't and is looking for 
slick.php/content1.html/js1.js (and the other files).

I don't want to change my SRC references to be site absolute, I want them
relative.
Well, I'm glad that's what you want, but how about using it anyhow 
because it'll work. Like Chris said, you can use a function/variable to 
get the complete path so it's really no extra work for you.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


Re: [PHP] Question about Error Redirect (URL ShortCuts)

2003-09-04 Thread ccj
Thanks, but it's not the point, I think.
Because from aaa.php --> error.php is redirected by Apache.
The error.php could not get the POST data via $HTTP_RAW_POST_DATA.

If aaa.php send POST data to a existing file , say ccc.php,
of course we can get $_POST, $HTTP_RAW_POST_DATA in ccc.php,

But if aaa.php send POST data to a non-existing file , say bbb.php,
The apache redirects to error.php
(Via the mirror site setting : ERROR 401 /error.php in httpd.conf)
Thus the error.php can get some REDIRECT_ variables,
but not $_POST, nor $HTTP_RAW_POST_DATA.

So the session does not work in this case.

Best Regards,
CCJ

> GET data is passed in the URL, POST data is not so loss of the
> information would be expected.  It sounds like you should use sessions,
> it is a better way of passing data between pages.
>
> Take a look at http://www.php.net/manual/en/ref.session.php
>
> Jason
>
>
> ccj wrote:
>
> >Hi all
> >
> >Based on descriptions in /urlhowto.php  -- Get it on your site,
> >I tried to redirect GET/POST data to a third page, say,
> >
> >aaa.php ---> error.php ---> bbb.php
> >
> >aaa.php:
> >
> >
> >
> >error.php:
> > >$QSTRING = $_SERVER['REDIRECT_QUERY_STRING'] ;
> >
> >Header("Location: bbb.php?" . $QSTRING) ;
> >?>
> >
> >Everything goes right with GET method, but POST goes wrong in error.php:
> >
> >The $HTTP_RAW_POST_DATA is lost.
> >The error.php page could not get the posted data.
> >
> >Any idea ?
> >
> >Regards,
> >CCJ
> >
> >
> >

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



Re: [PHP] session.save_path is a big security hole!

2003-09-04 Thread Raditha Dissanayake
M, very interesting thread, thanx for starting this. Good comments curt.


1. (!!!) Absolutely easily generate new sessions with any content for every
site on server.
   

 

It's because of the 'suspect' nature of sessions and cookies that i 
never place userid,username or password in sessions. My tactic is to 
aways have 2 column mysql table and store session identifier and 
corresponding userid in it. So even if someone does create a bogus 
session they still have to find a way to insert a userid into the mysql db.

3. Flood every http server writable directory with thousands or millions
files.
 

set quotas. Some admins even set quota for the root user, which is 
inconvinient by safe.

 

--
http://www.raditha.com/php/progress.php
A progress bar for PHP file uploads.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PEAR

2003-09-04 Thread Richard Baskett
Ok I have loaded the new version of php 4.3.3, but now how in the world do I
enable PEAR? I have a couple of scripts that just call a pear php script,
but it says it doesn¹t exist.. does this mean that I need to change the
include path?  How do I include all those pear classes?

Thanks!

Rick

"Too much caution is bad for you. By avoiding things you fear, you may let
yourself in for unhappy consequences. It is usually wiser to stand up to a
scary-seeming experience and walk right into it, risking the bruises as hard
knocks. You are likely to find it is not as tough as you had thought.  Or
you may find it plenty tough, but also discover you have what it takes to
handle it." - Norman Vincent Peale

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



[PHP] cURL and relative paths

2003-09-04 Thread Colin Kettenacker
I'm coming up against a brick wall on this one.

Can one cURL in a web page while automatically resolving all the relative
file paths? I've fooled around with regexp to resolve this issue, but it is
not a real stable solution.

I tried the archives and googled, but there appears to be no solution to
this. 

Any advice?

ck

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



RE: [PHP] Am I dreaming or what :)

2003-09-04 Thread Chris W. Parker
John Taylor-Johnston 
on Thursday, September 04, 2003 4:57 PM said:

> But how do i get $files ?

What do you mean "get $files"?

This line right here:

>> $files  = split("\n",`ls *gif`);

"get"'s $files.

Try print_r($files); and see what happens.


Chris.


> thanks :)
> John
> 
> Raditha Dissanayake wrote:
> 
>> this is in fact pretty easy.
>> this should get you started
>> 
>> [code]
>> $files  = split("\n",`ls *gif`);
>> srand((double)microtime()*100);
>> 
>> $num = rand(0, count($files));
>> echo "$num = $files[$num]";
>> [/code]
>> 
>> John Taylor-Johnston wrote:
>>> I have a directory jammed-packed with images.
>>> I want to read the directory contents /www/usr/htm/images/
>>> and display randomly any *.gif or *.jpg in said directory.
>>> Do-able? Seriously? Ideas? Places to start?
> 
> --
> John Taylor-Johnston
> -
> "If it's not open-source, it's Murphy's Law."
> Université de Sherbrooke:
> http://compcanlit.ca/

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



Re: [PHP] Am I dreaming or what :)

2003-09-04 Thread John Taylor-Johnston
But how do i get $files ?
thanks :)
John

Raditha Dissanayake wrote:

> this is in fact pretty easy.
> this should get you started
>
> [code]
> $files  = split("\n",`ls *gif`);
> srand((double)microtime()*100);
>
> $num = rand(0, count($files));
> echo "$num = $files[$num]";
> [/code]
>
> John Taylor-Johnston wrote:
> >I have a directory jammed-packed with images.
> >I want to read the directory contents /www/usr/htm/images/
> >and display randomly any *.gif or *.jpg in said directory.
> >Do-able? Seriously? Ideas? Places to start?

--
John Taylor-Johnston
-
"If it's not open-source, it's Murphy's Law."
Université de Sherbrooke:
http://compcanlit.ca/

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



Re: [PHP] Creating Images

2003-09-04 Thread Curt Zirzow
* Thus wrote Jed R. Brubaker ([EMAIL PROTECTED]):
> I have been trying to write some image creation scripts, and although I have
> a version of PHP that includes image support, I keep getting errors related
> to imagecreatefrompng(). Here is the latest error:
> 
> Fatal error: Call to undefined function: imagecreatefrompng() in
> /web/html-docs/psych/jb4920/public_html/pic/picture.php on line 12
> 
> Isn't imagecreatfrompng() a built in function? Anyone run across something
> like this or a suggestion?

You need the png libraries installed. configure usually can figure
out where they are at but sometimes you may have to issue a

  configure [other options]  --with-png-dir=/path/to/libpng/dir/


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



[PHP] Re: Creating Images

2003-09-04 Thread Catalin Trifu
Hi,

RTFM: http://de.php.net/manual/en/ref.image.php

Cheers,
Catalin

"Jed R. Brubaker" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have been trying to write some image creation scripts, and although I
have
> a version of PHP that includes image support, I keep getting errors
related
> to imagecreatefrompng(). Here is the latest error:
>
> Fatal error: Call to undefined function: imagecreatefrompng() in
> /web/html-docs/psych/jb4920/public_html/pic/picture.php on line 12
>
> Isn't imagecreatfrompng() a built in function? Anyone run across something
> like this or a suggestion?
>
> Thanks for the help!
> Jed R. Brubaker

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



[PHP] Creating Images

2003-09-04 Thread Jed R. Brubaker
I have been trying to write some image creation scripts, and although I have
a version of PHP that includes image support, I keep getting errors related
to imagecreatefrompng(). Here is the latest error:

Fatal error: Call to undefined function: imagecreatefrompng() in
/web/html-docs/psych/jb4920/public_html/pic/picture.php on line 12

Isn't imagecreatfrompng() a built in function? Anyone run across something
like this or a suggestion?

Thanks for the help!
Jed R. Brubaker

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



RE: [PHP] Re: cookies under php 4.06

2003-09-04 Thread Jennifer Goodie
> >setcookie("UserName", $HTTP_POST_VARS['UserName'],
> time()+(60*10), "/",
> > $HTTP_SERVER_VARS['SERVER_NAME']);
> >setcookie("Password", $password, time()+(60*10), "/",
> > $HTTP_SERVER_VARS['SERVER_NAME']);
> >print "login - set cookie";
>
>
> sorry for kinda answering my own post... but anyway...
>
> setcookie("UserName", $HTTP_POST_VARS['UserName']);
> setcookie("Password", $password);
>
> solves my problem, although means i can't have a time limit on my
> cookies i
> guess... but can set a time limit with another cookie...

1.) I would not store the user's password in a cookie.

2.) As far as I know, set_cookie() has worked the same since PHP3, so your
problem is something else, not the PHP version.  Are you sure
$HTTP_SERVER_VARS['SERVER_NAME'] is the same as what's in the location bar
in your browser.  If the server name is set up as www.domain.com but the
user is just at http://domain.com the cookie won't set.

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



[PHP] Re: cookies under php 4.06

2003-09-04 Thread Comex
> sorry for kinda answering my own post... but anyway...
Or you could use header()..
http://wp.netscape.com/newsref/std/cookie_spec.html

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



RE: [PHP] A bd problem

2003-09-04 Thread Ralph Guzman
First, do not use HTML email for posting questions to the list.

Take a look at:

$not = $consulta->fetch_row($res);

not familiar with your BaseDatos class, but fetch_row will normally
return an enumerated array, this means that rather than using
$not['Descripcion'] you should be using $not['0'], $not['1'], $not['2'],
etc.

if you want to use an associative array ($not['Descripcion']) you should
be using 

$not = $consulta->fetch_array($res);

or

$not = $consulta->fetch_assoc($res);

-Original Message-
From: Carlos Castillo [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 04, 2003 2:34 PM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: [PHP] A bd problem
Importance: High

 
HI, i have the following problem
 
Im working with sql server 2000 in a windows xp pc, then in the bd i
have a table called "noticias" and a text type field, when i insert into
the field everything goes rigth, but when i try to get the info of teh
field, i can get all the info, is like the variable is not enough to
save all the info but im sure that all the info is in the bd, the code
is the following:
 
 $consulta = new BaseDatos;
 $consulta->connect();
 $sql = "select * from Noticias where Id=".$_GET["id"];
 $res = $consulta->query($sql);
 $not = $consulta->fetch_row($res);
 $not["Descripcion"] =
eregi_replace(chr(13),"",$not["Descripcion"]);
echo $not["Descripcion"];
when i do an echo for $not["Descripcion"] i can see that it doesnt have
all the info of the field Descripcion on the table noticias.
 
can you help me please?, is urgent!
 
thanks!
 
Carlos A. Castillo.
Ingeniero de desarrollo
[EMAIL PROTECTED]


Su Aliado Efectivo en Internet
www.imagine.com.co
(57 1)2182064 - (57 1)6163218
Bogotá - Colombia 

- Soluciones web para Internet e Intranet
- Soluciones para redes
- Licenciamiento de Software
- Asesoría y Soporte Técnico


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



Re: [PHP] session.save_path is a big security hole!

2003-09-04 Thread Curt Zirzow
* Thus wrote John W. Holmes ([EMAIL PROTECTED]):
> >>You didnt understand. I change save.session_path to other's site session
> >>directory, do session_start(), write every variable what i want, write 
> >>down
> >>session number, go to this site and using this generated session. You 
> >>cannt
> >>prevent this ever!
> 
> 
> Does enabling safe_mode counter any of these writing file issues?

unfortantly no.

> 
> We all know the solution is to have a dedicated server, of course. :)

Or a jailed system, usually a bit cheaper for the client.

Perhaps that is the best way to go as a hosting company, and only
offer a really locked down (disabling a bunch of functions) to
simple virtual hosts.

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] Front Page User Logout

2003-09-04 Thread Curt Zirzow
* Thus wrote John W. Holmes ([EMAIL PROTECTED]):
> John Welty wrote:
> 
> >I'm only accessing the result of the user logging in through
> >$GLOBALS["PHP_AUTH_USER"]
> >
> >I've tried unsetting that but it doesn't change anything. The only thing
> >that logs a user out is them closing their browser and reopening it. I'd
> >like a user to be able to switch usernames by clicking a link that would
> >accomplish the same thing that closing the browser does. Perhaps I need
> >clientside scripting for this?
> 
> There's no way to log out of Basic Authentication except by closing your 
> browser. There is one trick you can try, though. You can provide a link 
> to your side with a bad username and password, which will fail 
> authentication, and then redirect them back to the login page (assuming 
> that's what your application does). Have a "logout" link that points to 
> something like http://baduser:[EMAIL PROTECTED]

just to not frighten some end users (due to some browsers warning
about sending a password) mabey use:
  http://user:[EMAIL PROTECTED]/

That way the user can deduct at what it is doing and not worry
about sending it.


.0125

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] session.save_path is a big security hole!

2003-09-04 Thread John W. Holmes
You didnt understand. I change save.session_path to other's site session
directory, do session_start(), write every variable what i want, write down
session number, go to this site and using this generated session. You cannt
prevent this ever!


Does enabling safe_mode counter any of these writing file issues?

We all know the solution is to have a dedicated server, of course. :)

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


Re: [PHP] Front Page User Logout

2003-09-04 Thread John W. Holmes
John Welty wrote:

I'm only accessing the result of the user logging in through
$GLOBALS["PHP_AUTH_USER"]
I've tried unsetting that but it doesn't change anything. The only thing
that logs a user out is them closing their browser and reopening it. I'd
like a user to be able to switch usernames by clicking a link that would
accomplish the same thing that closing the browser does. Perhaps I need
clientside scripting for this?
There's no way to log out of Basic Authentication except by closing your 
browser. There is one trick you can try, though. You can provide a link 
to your side with a bad username and password, which will fail 
authentication, and then redirect them back to the login page (assuming 
that's what your application does). Have a "logout" link that points to 
something like http://baduser:[EMAIL PROTECTED]

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


Re: [PHP] A bd problem

2003-09-04 Thread John W. Holmes
Carlos Castillo wrote:

 
HI, i have the following problem
 
Im working with sql server 2000 in a windows xp pc, then in the bd i have a
table called "noticias" and a text type field, when i insert into the field
everything goes rigth, but when i try to get the info of teh field, i can
get all the info, is like the variable is not enough to save all the info
but im sure that all the info is in the bd, the code is the following:
 
 $consulta = new BaseDatos;
 $consulta->connect();
 $sql = "select * from Noticias where Id=".$_GET["id"];
 $res = $consulta->query($sql);
 $not = $consulta->fetch_row($res);
 $not["Descripcion"] = eregi_replace(chr(13),"",$not["Descripcion"]);
echo $not["Descripcion"];

when i do an echo for $not["Descripcion"] i can see that it doesnt have all
the info of the field Descripcion on the table noticias.
If you're using a VARCHAR(x) column where x is greater than 255, then 
you will not get anything past 255 characters. It's an issue with the 
connection library to mssql. Use a text column for anything over 255 
characters.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


[PHP] A bd problem

2003-09-04 Thread Carlos Castillo
Title: Mensaje



 
HI, i have the following 
problem
 
Im working with sql server 2000 in a windows 
xp pc, then in the bd i have a table called "noticias" and a text type field, 
when i insert into the field everything goes rigth, but when i try to get the 
info of teh field, i can get all the info, is like the variable is not enough to 
save all the info but im sure that all the info is in the bd, the code is the 
following:
 
 $consulta = new 
BaseDatos; $consulta->connect(); $sql = "select * from 
Noticias where Id=".$_GET["id"]; $res = 
$consulta->query($sql); $not = 
$consulta->fetch_row($res); $not["Descripcion"] = 
eregi_replace(chr(13),"",$not["Descripcion"]);
echo $not["Descripcion"];
when i do an echo for $not["Descripcion"] i 
can see that it doesnt have all the info of the field Descripcion on the 
table noticias.
 
can you help me please?, is 
urgent!
 
thanks!
 

Carlos A. 
Castillo.Ingeniero de desarrollo[EMAIL PROTECTED]
Su Aliado Efectivo en Internetwww.imagine.com.co(57 
1)2182064 - (57 1)6163218Bogotá - Colombia 
- Soluciones web para Internet e 
Intranet
- Soluciones para redes- Licenciamiento de 
Software- Asesoría y Soporte 
Técnico 


 


Re: [PHP] Front Page User Logout

2003-09-04 Thread John Welty
I'm only accessing the result of the user logging in through
$GLOBALS["PHP_AUTH_USER"]

I've tried unsetting that but it doesn't change anything. The only thing
that logs a user out is them closing their browser and reopening it. I'd
like a user to be able to switch usernames by clicking a link that would
accomplish the same thing that closing the browser does. Perhaps I need
clientside scripting for this?

Thanks,

--John

"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
How can I provide a link which will log the current user out so that
they
will be prompted again to login. I'm using frontpage authentication on
an
apache server. I'm using PHP4 to build the pages.
[/snip]

Are you taking the frontpage variables into PHP? If so you can unset()
those variables.

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



Re: [PHP] multiple select box

2003-09-04 Thread Robert Cummings
Did you remember the [] on the select field's name? Otherwise it will
treat data as a scalar and constantly overwrite until the last selected
entry is reached.

Cheers,
Rob.


On Thu, 2003-09-04 at 16:39, Steve Goodman wrote:
> Hey all,
> I'm curious if anyone else has ever come across this problem:
> I have a multiple select box named 'chosen'. When it is submitted, only the
> last option selected appears under $_POST['chosen'], when I print_r($_POST).
> Any ideas?
> 
> Thanks in advance,
> Steve
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
-- 
.-.
| Worlds of Carnage - http://www.wocmud.org   |
:-:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.|
`-'

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



Re: [PHP] session.save_path is a big security hole!

2003-09-04 Thread Curt Zirzow
* Thus wrote Rx ([EMAIL PROTECTED]):
> 
> "Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > * Thus wrote Rx ([EMAIL PROTECTED]):
> >
> > You can set the value with
> > php_admin_value save_path "/tmp"
> 
> If i set php_admin_value, user STILL can change the value with ini_set()! I
> tested it. php_admin_value only prevents changing value from .htaccess file.
> Actually this also make sense for me, values set by php_admin_value shouldnt
> be allowed to change ever.

I was not aware of this.

> 
> >
> > >
> >
> 
> You didnt understand. I change save.session_path to other's site session
> directory, do session_start(), write every variable what i want, write down
> session number, go to this site and using this generated session. You cannt
> prevent this ever!

hm. yes, I see your point on this.

> 
> > > 2. Delete other users sessions by setting gc to 100 and probably legal
> files
> > > starting with sess_*.
> >
> > I'm also not sure but technically gc_maxlifetime should never be
> > lower than cache_expire, if this is the case then there no issues
> > with setting gc_probablity to 100, cept for a bunch of overhead for
> > the users script.
> >
> Hm, what the connection with cache_expire? User set gc to 100 and
> maxlifetime to 1 sec, then that script will delete every session in
> directory.

The conection is that the gc shouldn't clean up a session that has
a lifetime still. so if gc_maxlifetime = 9 and cache_expire = 10,
gc shouldn't clean up anything less than 11. 

But then, this is a mute point since if you change cache_expire
at run time, gc wont know the difference. 

> 
> > Don't allow the person to create files. That is the only way to
> > prevent a user of doing this regardless of the save_path parameter.
> >
> 
> No, its not a valid point. Every user can access only certain directory with
> apache permissions or with his own. And i know which directory belongs to
> whom. However with session.save_path user can flood EVERY directory on
> server, and even i wont know which user did that!

Thanks for clarifying this.  I was not thinking on the same line as
you. So a malicious user can do something like:
  
  while (1) {
session_save_path(pick_a_writeabledir());
session_start();
session_write_close();
  }



Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] Q on "inhert" class code

2003-09-04 Thread jsWalter
Evans, thx for your effort.

I see what your says, as I noticed the trouble at 3 this morning!

This is how I fixed it...

$session = &Auth::_importGlobalVariable("session");
$session[$this->_sessionName]['data']['_loginAttempts'] =
$this->_loginAttempts;

Pretty much the way you indicated.

But then, as I read more, decoded the Class in my head more, I noticed that
they had a method to deal with this issue. So I figured I'd juut use that
method, in case something changes in future it won't bite me!

  // Store class var in session data
  Auth::setAuthData('_loginAttempts', $this->_loginAttempts);

Thanks for your help.

Walter

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



[PHP] multiple select box

2003-09-04 Thread Steve Goodman
Hey all,
I'm curious if anyone else has ever come across this problem:
I have a multiple select box named 'chosen'. When it is submitted, only the
last option selected appears under $_POST['chosen'], when I print_r($_POST).
Any ideas?

Thanks in advance,
Steve

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



[PHP] RE:[PHP] HTML Template, PHP, Javascript & PATH_INFO

2003-09-04 Thread Chris Sherwood
<-- snip -->
I can do
- site.com/info/template.html and get two alerts
- site.com/info/content1.html and see a new text under H1
- site.com/info/slick.php/content1.html and get neither alert nor new text.
  - instead I get 4 browser (IE) 'problem alerts', I presume
  - 1. for not finding js1.js
  - 2. for not finding js2.js
  - 3. for not finding content1.js
  - 4. for not finding helloFromContent1() function

I don't want to change my SRC references to be site absolute, I want them
relative.

Any ideas how I should 'wrap' my content using php and get functioning pages
?
<-- snip -->


have you thoought about doing an echo on your script tags and do a getenv?
that way you can simulate a relative path

ie
it was



  


now

";
echo "";
?>


hope this takes care of some of your issues.

Chris

[PHP] Use of php_value in .htaccess is not working

2003-09-04 Thread JR
Hello Everyone,

I am running Red Hat Enterprise Linux ES release 2.1 (Panama).
Originally I was using the Red Hat PHP package. This package was not the
most current version so I removed it and compiled PHP 4.3.3.

Since doing this I am unable to set things like path using php_value in
a .htaccess file. The apache config is the same Red Hat default that is
in use on other boxes that are not having this problem. The only
difference between this box and boxes without the issue is the fact that
I compiled the 4.3.3 rather than going with the Red hat package.

The configure options I used are below.

I can do non-PHP things with the .htacess file like setup basic
authentication from a password file, so I know the .htaccess files are
being parsed. 

Also Apache is unchanged from when this was not an issue. The only thing
changed is the removal of the old PHP install and re-install with 4.3.3.

Any help would be greatly appreciated.

Thanks,

JR

-
John Rudnick
RHCE #808003122507415
MySQL Certification #206067847

SallyJo, Inc., provides Top Notch Web Hosting & Programming!

Ask me about Dedicated Hosting starting at just $89 per month. 



./configure --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin
--sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share  --include
dir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec
--localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man
--infodir=/usr/share/info --prefix=/usr --with-config-file-path=/etc
--enable-force-cgi-redirect --disable-debug --enable-pic --disable-rpath
--enable-inline-optimization --with-bz2 --with-db3
--with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr
--with-gd --enable-gd-native-ttf --with-ttf --with-gdbm --with-gettext
--with-ncurses --with-gmp --with-iconv --with-jpeg-dir=/usr --with-mm
--with-openssl --with-png --with-regex=system --with-xml
--with-expat-dir=/usr --with-zlib --with-layout=GNU --enable-bcmath
--enable-debugger --enable-exif --enable-ftp --with-pear=/usr/share/pear
--enable-magic-quotes --enable-safe-mode --enable-sockets
--enable-sysvsem --enable-sysvshm --enable-discard-path
--enable-track-vars --enable-trans-sid --enable-yp --enable-wddx
--without-oci8 --with-mysql --enable-memory-limit --enable-bcmath
--enable-shmop --enable-versioning --enable-calendar --enable-dbx
--enable-dio --enable-mbstring --enable-mbstr-enc-trans
--with-apxs=/usr/sbin/apxs

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



[PHP] HTML Template, PHP, Javascript & PATH_INFO

2003-09-04 Thread Richard A. DeVenezia
Help:

--- problem

My page generated via a template can't find some javascript.

 setup

I am hosted on Apache 1.*

I have a folder containing many *.html containing content which I want to be
displayed in another style of page.

Suppose there is
foo/
foo/content1.html
...
foo/contentN.html
foo/content1.js
foo/template.html
foo/js1.js
foo/js2.js
foo/slick.css
foo/slick.php

The content might have it's own style and javascript parts

template.html
---

  
  :title:
  
  
  
  :script: :style: :link:
  
  
  Logo ...
  
/* navbar('js') */
:content:
  
  Copyright ...
  

---

slick.css
---
div#logo { background: #AAA }
div#content { background: #DDD }
div#links { background: #CCC }
div#copyright { background: #EEE }
---

content1.html
---


  Content 1
  


  Content is king
  
helloFromContent1()
  


---

content1.js
---
function helloFromContent1 () {
  document.write ('Hello from content1.js')
}
---

js1.js
---
alert ('js1 here')
---

js2.js
---
alert ('js2 here')
---

slick.php
---
$page not
found.");
return;
  }

  $template = 'template.html';
  $template = implode ("", file ($template));

  $source = implode ("", file ($page));

  preg_match ("|(.*)?|is",$source,  $head);  // i
insensitive, s newlines are a character
  preg_match ("|(.*)?|is",   $head[1], $title);
  preg_match_all ("|(.*?/SCRIPT>)|isU",$head[1], $script); // U
ungreedy
  preg_match_all ("|(

Re: [PHP] session.save_path is a big security hole!

2003-09-04 Thread Rx

"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote Rx ([EMAIL PROTECTED]):
> > Theres absolutely no control over session.save_path parameter in php. By
> > setting it to every directory he wants, every user can:
>
> You can set the value with
> php_admin_value save_path "/tmp"

If i set php_admin_value, user STILL can change the value with ini_set()! I
tested it. php_admin_value only prevents changing value from .htaccess file.
Actually this also make sense for me, values set by php_admin_value shouldnt
be allowed to change ever.


>
> >
> > 1. (!!!) Absolutely easily generate new sessions with any content for
every
> > site on server.
>
> prevented with open_basedir. Can you demonstrate how you expect to
> do this? Using open_basedir most can also resovle this issue.
>

You didnt understand. I change save.session_path to other's site session
directory, do session_start(), write every variable what i want, write down
session number, go to this site and using this generated session. You cannt
prevent this ever!

> > 2. Delete other users sessions by setting gc to 100 and probably legal
files
> > starting with sess_*.
>
> This might be a valid point if you also mention that if the user
> sets gc_maxlifetime to a value of 1  or lower than cache_expire,
> and  the gc_probablity at 100.  Although I havn't tested, and
> probably should be.
>
> I'm also not sure but technically gc_maxlifetime should never be
> lower than cache_expire, if this is the case then there no issues
> with setting gc_probablity to 100, cept for a bunch of overhead for
> the users script.
>
Hm, what the connection with cache_expire? User set gc to 100 and
maxlifetime to 1 sec, then that script will delete every session in
directory.

>
> > 3. Flood every http server writable directory with thousands or millions
> > files.
>
> Don't allow the person to create files. That is the only way to
> prevent a user of doing this regardless of the save_path parameter.
>

No, its not a valid point. Every user can access only certain directory with
apache permissions or with his own. And i know which directory belongs to
whom. However with session.save_path user can flood EVERY directory on
server, and even i wont know which user did that!


> >
> > session.save_path should be controlled under open_basedir variable or
some
> > other mechanism.
>
> Perhaps a better solution would be to have a php.ini setting for
> disabling ini settings:
>
> disable_ini session.save_path,session.gc_maxlifetime
>

Well i agree, that should be done too.

>
>
> Curt
> -- 
> "I used to think I was indecisive, but now I'm not so sure."

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



RE: [PHP] Thanks Richard Schwartz

2003-09-04 Thread Chris W. Parker
Curt Zirzow 
on Thursday, September 04, 2003 10:58 AM said:

> You should be more careful at whom your including these replies to :)

But public floggings are good every once in a while. :)


c.

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



Re: [PHP] Thanks Richard Schwartz

2003-09-04 Thread Curt Zirzow

You should be more careful at whom your including these replies to :)


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] session.save_path is a big security hole!

2003-09-04 Thread Curt Zirzow
* Thus wrote Rx ([EMAIL PROTECTED]):
> Theres absolutely no control over session.save_path parameter in php. By
> setting it to every directory he wants, every user can:

You can set the value with
php_admin_value save_path "/tmp"

> 
> 1. (!!!) Absolutely easily generate new sessions with any content for every
> site on server.

prevented with open_basedir. Can you demonstrate how you expect to
do this? Using open_basedir most can also resovle this issue.

> 2. Delete other users sessions by setting gc to 100 and probably legal files
> starting with sess_*.

This might be a valid point if you also mention that if the user
sets gc_maxlifetime to a value of 1  or lower than cache_expire,
and  the gc_probablity at 100.  Although I havn't tested, and
probably should be.

I'm also not sure but technically gc_maxlifetime should never be
lower than cache_expire, if this is the case then there no issues
with setting gc_probablity to 100, cept for a bunch of overhead for
the users script.


> 3. Flood every http server writable directory with thousands or millions
> files.

Don't allow the person to create files. That is the only way to
prevent a user of doing this regardless of the save_path parameter.

> 
> session.save_path should be controlled under open_basedir variable or some
> other mechanism.

Perhaps a better solution would be to have a php.ini setting for
disabling ini settings:

disable_ini session.save_path,session.gc_maxlifetime



Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



[PHP] Thanks Richard Schwartz

2003-09-04 Thread Joe Harman
Dude stop being a jerk, I don't treat people this way... Ah, anyhow...
It's not me who will judge you Is it?

> -Original Message-
> From: Richard Schwartz [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 04, 2003 11:28 AM
> To: Joe Harman
> Subject: Re: Thanks From Joe: ATM Archives and List Guidelines
> 
> 
> unsubscribe ***
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> OK, I already know your next post that will be such a great 
> challenge.   It
> will be a multipart question and all parts will have the same answer:
> 
> 1.  Where can I find a beautiful, bright, talented, 
> compassionate, and well educated woman, half my age, who will 
> love me and be devoted to me and our children.
> 
> 2.  Where can I find a doctor who will listen?
> 
> 3.  Where can I find a mechanic who will fix my car right the 
> first time.
> 
> 4.  Where can I find an honest lawyer?
> 
> 5.  Where can I find a realtor who places community interests 
> above profits?
> 
> 
> 
> 
> - Original Message - 
> From: "Joe Harman" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 03, 2003 9:42 PM
> Subject: Thanks From Joe: ATM Archives and List Guidelines
> 
> 
> >
> > 
> > Okay... Thanks to all of you... But this was the best email for 
> > guidelines I have ever seen wrote. (the 11 below)... I will stick 
> > through all the hazing... I promise... So filter me if you would 
> > like... But I hope to soon be an asset to the list...
> >
> > My next post should be challenging to even the most 
> seasoned ATMers... 
> > I promise!
> >
> > 
> > Joe
> >
> > :o)
> >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
> Behalf Of 
> > > George Anderson
> > > Sent: Wednesday, September 03, 2003 11:09 PM
> > > To: Joe Harman; atm
> > > Subject: Re: ATM Archives and List Guidelines
> > >
> > >
> > >
> > > Hi Joe
> > >
> > > Don't let the "rude manners" of some of the members put you off. 
> > > They are actually quite nice people who are quite willing 
> to share 
> > > information and ideas. They are just a little cranky at 
> responding 
> > > to the same seven questions (you've asked the first) that 
> get asked 
> > > by all new members. Remember the two old guys on the muppet show? 
> > > There are close to a thousand of us here. What you have just been 
> > > through is sort of an initiation ceremony that most new members go
> > > through. The HTML thing is a combination of netiquette and
> > > the fact that some members pay by the byte and have slow
> > > connections. Besides the "read the archives" chant from
> > > almost every member you will encounter the following
> > > responses to questions that you will ask over the next few months.
> > >
> > > 1) Read the archives  (stock answer for any question for which we 
> > > may or may not have the answer)
> > >
> > > 2) Check Texereau, it is part of the requisite book list
> > >
> > > 3) Don't read Texereau, it is an outdated fascist novel
> > >
> > > 4) The answer is in Ingalls Book 2
> > >
> > > 5) Read the archives (I'm sure someone asked this same 
> question back 
> > > in
> > > '95)
> > >
> > > 6) Grind more worry less (actually very true and valuable)
> > >
> > > 7) Verify the secondary size with Newt
> > >
> > > 8) Don't use Newt, it doesn't give a true representation
> > >
> > > 9) Read the archives (Did I mention this yet?)
> > >
> > > 10) No it can't be done, Peter Hoffenstoffer tried that 
> back in 98 
> > > and the mirror suffered from stig and potatoe chipping (check the 
> > > archives)
> > >
> > > 11) Yes it works, Peter fixed it with a new mirror cell and 
> > > used/eliminated the sling in '99 (read the archives)
> > >
> > > And yes there is a Cabal in the ATM list, the proof is that they 
> > > deny the presence of the Cabal. Why would they deny the 
> presence if 
> > > it didn't exist?   Pushing glass and making 
> telescopes is a zen 
> > > like pursuit, think back to the '70s and the show Kung-Fu 
> "Can you 
> > > snatch the pebble from my
> > > hand..."   Welcome to the list Grasshopper.
> > >
> > > Hopefully none have been offended.
> > >
> > > George Anderson  (who hasn't made enough mirrors to be 
> allowed to be
> > > curmudgenly)
> > > Montreal Canada
> > >
> > > Clear skies and good health
> > >
> > > Joe Harman wrote:
> > > >
> > > > Hello,
> > > >
> > > > I really appreciate those who help here on this list... So
> > > thank you
> > > > to all of you... I've got a couple of really great
> > > recommendations...
> > > > I will be very honest about this, this list is extremely
> > > picky... NO
> > > > HTML Mail... Search the archives before you post So
> > > before I get
> > > > chewed out anymore, I am asking that someone please send me
> > > a link to
> > > > the guidelines for this mail list... And to the archives so I 
> > > > don't accidentally offend anyone anymore... The site I got this
> > > email list
> > > > from listed no guidelines or archives.
> 

Re: [PHP] syntax error using header and SID

2003-09-04 Thread Tyler Lane
On Thu, 2003-09-04 at 09:33, bob pilly wrote:
> Hi all
> 
> Can someone tell me what the correct syntax is to pass
> a Session ID via the header redirect is? Im trying:
> 
> header( "Location: page2.php? (SID)?>" )

header( "Location: page2.php?". strip_tags( SID ) );

the problem you are having is that you are already inside php tags when
you are using the header function and don't need to make new php tags to
use the echo statement. and for that matter, you don't need to use the
echo statement at all. just append the SID to the end of the location.

> but it isnt working for me and all the docs i can find
> just deal with tagging it to the end of a hyperlink.
> 
> Any help would be greatly appreciated!
> 
> 
> 
> 
> Want to chat instantly with your online friends?  Get the FREE Yahoo!
> Messenger http://mail.messenger.yahoo.co.uk
-- 
Tyler Lane <[EMAIL PROTECTED]>
Lyrical Communications


signature.asc
Description: This is a digitally signed message part


RE: [PHP] Front Page User Logout

2003-09-04 Thread Jay Blanchard
[snip]
How can I provide a link which will log the current user out so that
they
will be prompted again to login. I'm using frontpage authentication on
an
apache server. I'm using PHP4 to build the pages.
[/snip]

Are you taking the frontpage variables into PHP? If so you can unset()
those variables.

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



RE: [PHP] Question regarding OOP and interitance

2003-09-04 Thread Jay Blanchard
[snip]
> FYI ... anything below PHP5 has a pseudo constructor.

And how will it be in PHP5 ?
[/snip]

PHP5 will be using the Zend 2 Engine, and gives a standard way of
declaring constructor methods by calling them by the name __construct().


An example from http://www.php.net/zend-engine-2.php

 

True destructors will also be available, as should be true private
methods.

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



Re: [PHP] -f function ???

2003-09-04 Thread Curt Zirzow
* Thus wrote Guillermo Scharffenorth ([EMAIL PROTECTED]):
> Hello,
> 
> I am using a mailing list script which makes use of a function called -f,
> according to the developers of the script. The fact is that some
> functionality of the script is not working and the developers claim -f is
> turned off in my system. I've looked everywhere trying to find info about
> this, but only found a small, not very enlightening, reference in the php
> manual under the function "mail."  Anyone knows where to find info about -f?

Its the fifth paramater to mail():
  http://php.net/manual/en/function.mail.php



Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] Passing Objects between scripts and guarateeing that a language has been choosen.

2003-09-04 Thread Curt Zirzow
* Thus wrote Webmaster ([EMAIL PROTECTED]):
> Hi,
> 
> I am just starting to understand how the session handling routines work in
> php.
> I can pass objects to other scripts. So I can put the language into the
> object that the visitor chose at the very first page.
> But what if a visitor bookmarked my homepage and comes back after a few
> weeks.
> How can I guarantee that a language is always choosen? I mean how is this
> done professionally?
> What do I have to write at the beginning of every page?
> 
> I hope it is clear what I am asking.

You should check the 'Accept-Language' header [1] that the client
usually sends:

$languages = $_SERVER['HTTP_ACCEPT_LANGUAGE'];

you'll have a string like: en;q=1.0, de;q=0.9, da;q=0.1

meaning that the user prefers english but if you don't have an
english translation, give me german, and last but not least, I can
read danish a bit.

If the client doesn't have the header then direct them to a page
that has them select their language choice. Then handle their
choice with session data [2].

I would have the session data override the Accept-language header
so that the user can manually override his browser settings.

You can see how google [3] does things by modifying your language
settings in your browser and your personal google settings. IMO
they have a very nice language detection system.


[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4
[2] http://php.net/session
[3] http://www.google.com/


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



[PHP] Front Page User Logout

2003-09-04 Thread John Welty
How can I provide a link which will log the current user out so that they
will be prompted again to login. I'm using frontpage authentication on an
apache server. I'm using PHP4 to build the pages.

Thanks,

--John

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



Re: [PHP] Passing objects as a reference and extracting the index of an associative array.

2003-09-04 Thread John W. Holmes
Webmaster wrote:

Hi,

i am using the smarty template engine.
Here is the problem that I would like to ask about:
function initTop(&$page, $array)
{
  for ($i=0; $iassignVars(, $array[$i])
  }
}
The function is supposed to know which object's attributes she is supposed
to change. Do I have to pass the object as a reference? Have never worked
with References before.
The array is supposed to be associative.
The funcion assignVars() is called like this:
$objektname->assignVars("indexname of ass. array", $arraywert);

How do I get the indexname for each arrrayvalue, so I can pass it to the
function assignVars?
There is no "assignVars" method within Smarty. Are you using something 
else overtop of it?

You can assign the whole array to Smarty like this:

$smarty->assign('some_name',$some_array);

Then, say you have $some_array['one'] = "Bob", you'd use a placeholder 
like {$some_name.one} to get the value "Bob" in your template.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


Re: [PHP] syntax error using header and SID

2003-09-04 Thread Chris Hayes
At 18:33 4-9-03, you wrote:
Hi all

Can someone tell me what the correct syntax is to pass
a Session ID via the header redirect is? Im trying:
header( "Location: page2.php?" )
You are making a row of mistakes that suggest it is a good idea to read a 
bit on PHP syntax and how variables are passed over pages.

For instance, you are calling a php function such as header(), you are 
already inside php tags (), or at least you SHOULD be.
Then, you work with SID, is that a CONSTANT ?

A good place to start is the first chapters of the online php manual on 
uk.php.net/manual/en and a tutorial on sessions on 
http://www.phpfreaks.com/tutorials/41/0.php 

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


Re: [PHP] syntax error using header and SID

2003-09-04 Thread John W. Holmes
bob pilly wrote:
Hi all

Can someone tell me what the correct syntax is to pass
a Session ID via the header redirect is? Im trying:
header( "Location: page2.php?" )
but it isnt working for me and all the docs i can find
just deal with tagging it to the end of a hyperlink.
header("Location: page2.php?" . SID);

You should use a complete URL, btw, including http:// and the domain name.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


Re: [PHP] Question regarding OOP and interitance

2003-09-04 Thread Decapode Azur

> FYI ... anything below PHP5 has a pseudo constructor.

And how will it be in PHP5 ?


> Since you are inheriting the class the 'constructor' for the parent class
> should work. If it doesn't (I have not tested it, and neither have
> you)then the class extension can contain a 'contstructor' that is a
> duplicate of the parent class 'constructor' but with the extension name.
> You'll have to test it to make sure.

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



[PHP] syntax error using header and SID

2003-09-04 Thread bob pilly
Hi all

Can someone tell me what the correct syntax is to pass
a Session ID via the header redirect is? Im trying:

header( "Location: page2.php?" )
but it isnt working for me and all the docs i can find
just deal with tagging it to the end of a hyperlink.

Any help would be greatly appreciated!




Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

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



[PHP] session.save_path is a big security hole!

2003-09-04 Thread Rx
Theres absolutely no control over session.save_path parameter in php. By
setting it to every directory he wants, every user can:

1. (!!!) Absolutely easily generate new sessions with any content for every
site on server.
2. Delete other users sessions by setting gc to 100 and probably legal files
starting with sess_*.
3. Flood every http server writable directory with thousands or millions
files.

session.save_path should be controlled under open_basedir variable or some
other mechanism.

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



[PHP] PHP eqivalent of 'smartypants', and other text educating for XHTML, etc

2003-09-04 Thread Justin French
Hi all,

Does anyone know of a PHP-oriented tool that achieves some of / all of 
/ more than the things that smartypants 
(http://daringfireball.net/projects/smartypants/) does?

For those too lazy for the link, it does smart/curly quote replacement, 
and a bunch of other cool ASCII => HTML conversions.

There is a Perl port, and I'm considering either writing a PHP port, or 
writing a PHP based script with a similar (but smaller) feature set 
from scratch.

I also want to achieve:

- a semantically correct version of nl2br() (converting the text into 
paragraphs)

- automatic list generation, eg:

convert:
* something
* something else
* a third, exciting something
into:

something 
something else 
a third, exciting something 

- and some other things i've got in my head

So, if anyone has seen anything similar (or part thereof), can they 
please provide a link or snippet.

Please, not interested in non-PHP solutions (exec()'ing a Perl script 
for example), because I want it to run on a base PHP install, and 
integrate effortlessly into my CMS.

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


[PHP] -f function ???

2003-09-04 Thread Guillermo Scharffenorth
Hello,

I am using a mailing list script which makes use of a function called -f,
according to the developers of the script. The fact is that some
functionality of the script is not working and the developers claim -f is
turned off in my system. I've looked everywhere trying to find info about
this, but only found a small, not very enlightening, reference in the php
manual under the function "mail."  Anyone knows where to find info about -f?

Thanks

Guillermo Scharffenorth

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



Re: [PHP] PHP

2003-09-04 Thread Chris Shiflett
--- Jalene Joyner <[EMAIL PROTECTED]> wrote:
> I have a user that needs for me to load a version of PHP 4.2.1 or
> higher. What I want to know is this available for version 7.3 of
> Linux?

Yes, although I think you mean to say Red Hat or SuSe or something, as the
latest test version of Linux is only 2.6.0.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

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



Re: [PHP] Passing Objects between scripts and guarateeing that a language has been choosen.

2003-09-04 Thread Matt Matijevich
[snip]
How can I guarantee that a language is always choosen? I mean how is
this
done professionally?
What do I have to write at the beginning of every page?
[/snip]


You have a bunch of options.

on each page you could add something like this to everypage:
 
if (!isset($_SESSION['language'])){
header("Location: pick_language.php");
}

This will make sure you have a language chosen on each page

to set the language sessions variable you could use something like
this:
$_SESSION['language'] = $_POST['language'];

You could set a permanent cookie (be careful because some users block
cookies) once the user picks a language, then use that cookie to set a
session variable.  This would be helpful is someone bookmarked the page,
something like this:

if (isset($_COOKIE['language'])) {
   $_SESSION['language'] = $_COOKIE['language'];
}

but there is many more ways to do this.  I would try a bunch of
differnet things just to see how things work.

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



[PHP] PHP

2003-09-04 Thread Jalene Joyner



I have a server running Redhat 7.3 and PHP version 4.1.2.###.  I have a
user that needs for me to load a version of PHP 4.2.1 or higher.  What I
want to know is this available for version 7.3 of Linux?

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



Re: [PHP] mysql Pattern Matching

2003-09-04 Thread Duncan Hill
> From: "Ralph Guzman" <[EMAIL PROTECTED]>
>
>
>> I know this question is best for the mySQL mailing list, but I am unable
>> to subscribe to their list at this moment so perhaps somebody here can
>> help me out.
>>
>> I have a table with a field where amenities are listed together using a
>> comma delimiter like: pool,spa,fitness-center

Mmm.. I'm jumping in late, and without knowledge of your app, but why not
normalise that column to its own table:

recid   masterrecamenity
  122  pool
  222  spa
  312  fitness-center

And run a unique key across all three columns (or drop recid and use two
columns).

select masterrec from amenities where amenity = 

The query will still grow in length, but it may be easier to work with..
*shrug*

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



Re: [PHP] mysql Pattern Matching

2003-09-04 Thread CPT John W. Holmes
From: "Ralph Guzman" <[EMAIL PROTECTED]>


> I know this question is best for the mySQL mailing list, but I am unable
> to subscribe to their list at this moment so perhaps somebody here can
> help me out.
>
> I have a table with a field where amenities are listed together using a
> comma delimiter like: pool,spa,fitness-center
>
> To search this table I use a query that looks something like this:
>
> SELECT * FROM properties WHERE amenities LIKE '%pool%' AND amenities
> LIKE '%spa%' AND amenities LIKE '%fitness-center%'
>
> This works, however let's say the user chooses to search for more
> amenities. This means the query would need multiple 'AND amenities LIKE
> '%%' statements.
>
> Is there a better way to write this?

You could use FIND_IN_SET().

SELECT * FROM properties WHERE FIND_IN_SET('pool',amenities) AND
FIND_IN_SET('spa',amenities) AND ...

It'll still grow as the number of amentities grow, but there's no getting
around that.

---John Holmes...

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



[PHP] Passing Objects between scripts and guarateeing that a language has been choosen.

2003-09-04 Thread Webmaster
Hi,

I am just starting to understand how the session handling routines work in
php.
I can pass objects to other scripts. So I can put the language into the
object that the visitor chose at the very first page.
But what if a visitor bookmarked my homepage and comes back after a few
weeks.
How can I guarantee that a language is always choosen? I mean how is this
done professionally?
What do I have to write at the beginning of every page?

I hope it is clear what I am asking.

Thank you very much.


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



Re: [PHP] suggestion: recursive calls

2003-09-04 Thread Robert Cummings
I've accidentally had infinite recursion at times. Under Linux if
configured, you can get a core dump which can be loaded in GDB to see
the stack. I usually know Its infinite recursion when GDB shows a
backtrack in the 10s of thousands.

Cheers,
Rob.


On Thu, 2003-09-04 at 06:04, Ronald van Raaphorst wrote:
> Hi all,
> 
> Not a real bug, but a suggestion:
> It would be nice if inifite recursive calls would somehow give an error.
> I spend quite some time to find the error in my php script.
> 
> Ronald
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
-- 
.-.
| Worlds of Carnage - http://www.wocmud.org   |
:-:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.|
`-'

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



Re: [PHP] Re: gettext i18n

2003-09-04 Thread Catalin Trifu
Thank you!


> putenv("LANG=de_DE");
> putenv("LANGUAGE=de_DE");  // better to be paranoid, works for me ;-)
this one did the trick !
> putenv("LC_ALL=de_DE");
> setlocale(LC_ALL, "de_DE", "german");
>
> (see some user comments in php manual)
i already read the all before posting here :)

Again thx,
Catalin

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



Re: [PHP] Re: gettext i18n

2003-09-04 Thread Christophe Chisogne
Catalin Trifu wrote:
Try:

putenv("LANG=de_DE") . '';
putenv("LC_ALL=de_DE") . '';
setlocale(LC_ALL, "de_DE", "german") . '';
I would have done this:

putenv("LANG=de_DE");
putenv("LANGUAGE=de_DE");  // better to be paranoid, works for me ;-)
putenv("LC_ALL=de_DE");
setlocale(LC_ALL, "de_DE", "german");
(see some user comments in php manual)

Then you can try to reload the apache webserver
(because of the gettext cache, which could hide modifications).
"/etc/init.d/apache reload" on a Debian GNU/Linux system.
"/etc/rc.d/httpd reload" on RedHat likes
Perhaps check german locales are correctly installed on the *nix server.
(php uses the setlocale() system call). Yes, locales are system 
specific. It should be better documented in the php manual :(

> btw! on win32 it works :(

I solved it the stupid way, because locale names are different on *nix
and windows (ex: fr_BE vs French_Belgium). On my test systems, some
aliases were common (french, dutch, german) but the path where php looks
for the mo file was different (ex fr_BE vs french, de_DE vs german).
So I simply copied the /de_DE dir to /german and so on.
(for french, I had fr/, fr_BE/ and french/ as dir for it to work
 on 2 linux servers and 1 test NT server :(
Hope it helps,

--
Christophe Chisogne
Developper, Publicityweb sprl
http://www.publicityweb.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: cookies under php 4.06

2003-09-04 Thread Chris Kranz

>setcookie("UserName", $HTTP_POST_VARS['UserName'], time()+(60*10), "/",
> $HTTP_SERVER_VARS['SERVER_NAME']);
>setcookie("Password", $password, time()+(60*10), "/",
> $HTTP_SERVER_VARS['SERVER_NAME']);
>print "login - set cookie";


sorry for kinda answering my own post... but anyway...

setcookie("UserName", $HTTP_POST_VARS['UserName']);
setcookie("Password", $password);

solves my problem, although means i can't have a time limit on my cookies i
guess... but can set a time limit with another cookie...

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



[PHP] cookies under php 4.06

2003-09-04 Thread Chris Kranz
okay, i know this is stupid, and i'm gonna kick myself when someone points
out the obvious...

i've just put a site online, and found the server's running an older version
of php (4.06). it's virtual hosting, so i have no control over this... also
can't tell you what OS it's running, but it is windows based...

the code works locally, although i had to change all $_COOKIE to
$HTTP_COOKIE_VARS, same with $_POST, $_SERVER, etc. etc.

i've had a quick look through the archives, and googled, but can't find much
help around for older installs of php.

my code, like i said, the functionality works, but it's just plain not
sending the cookie, my little print statements show up and all, but i get no
error, and i also get no cookie.




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



[PHP] Re: gettext i18n

2003-09-04 Thread Desi
Send me your messages.po file, I try it... Gettext is cool, it works 
very well for me...

Desi

Catalin Trifu wrote:
Hi,

Thanks for the reply, but it doesn't work
this way either.
in /www/locale I do have
de/
LC_MESSAGES/
messages.mo
de_DE/
LC_MESSAGES/
messages.mo
btw! on win32 it works :(

Catalin

"Desi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hello,

Try:

putenv("LANG=de_DE") . '';
putenv("LC_ALL=de_DE") . '';
setlocale(LC_ALL, "de_DE", "german") . '';
Desi

Catalin Trifu wrote:

   Hi,

   I want to add i18n support for my web site, but
it doesn't seem to work.
   PHP 4.3.3., Apache 1.3.28, Mandrake 9.0
   Here comes the test code. As you can see I try all sorts of things.
';
echo putenv("LC_ALL=de") . '';
echo setlocale(LC_ALL, "de", "german") . '';
echo bindtextdomain("messages", "/www/locale") . '';
echo textdomain("messages") . '';
echo gettext("User") . '';

echo strftime ("%A %e %B %Y", time()) . '';
?>
   The funny thing is that strftime prints correctly.
   Any ideas
Catalin.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: gettext i18n

2003-09-04 Thread Catalin Trifu
Hi,

Thanks for the reply, but it doesn't work
this way either.
in /www/locale I do have
de/
LC_MESSAGES/
messages.mo
de_DE/
LC_MESSAGES/
messages.mo

btw! on win32 it works :(

Catalin

"Desi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> Try:
>
> putenv("LANG=de_DE") . '';
> putenv("LC_ALL=de_DE") . '';
> setlocale(LC_ALL, "de_DE", "german") . '';
>
> Desi
>
>
> Catalin Trifu wrote:
> > Hi,
> >
> > I want to add i18n support for my web site, but
> > it doesn't seem to work.
> > PHP 4.3.3., Apache 1.3.28, Mandrake 9.0
> > Here comes the test code. As you can see I try all sorts of things.
> >
> >  >  echo putenv("LANG=de") . '';
> >  echo putenv("LC_ALL=de") . '';
> >  echo setlocale(LC_ALL, "de", "german") . '';
> >  echo bindtextdomain("messages", "/www/locale") . '';
> >  echo textdomain("messages") . '';
> >
> >  echo gettext("User") . '';
> >
> >  echo strftime ("%A %e %B %Y", time()) . '';
> > ?>
> >
> > The funny thing is that strftime prints correctly.
> > Any ideas
> >
> > Catalin.

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



[PHP] Re: gettext i18n

2003-09-04 Thread Desi
Hello,

Try:

putenv("LANG=de_DE") . '';
putenv("LC_ALL=de_DE") . '';
setlocale(LC_ALL, "de_DE", "german") . '';
Desi

Catalin Trifu wrote:
Hi,

I want to add i18n support for my web site, but
it doesn't seem to work.
PHP 4.3.3., Apache 1.3.28, Mandrake 9.0
Here comes the test code. As you can see I try all sorts of things.
';
 echo putenv("LC_ALL=de") . '';
 echo setlocale(LC_ALL, "de", "german") . '';
 echo bindtextdomain("messages", "/www/locale") . '';
 echo textdomain("messages") . '';
 echo gettext("User") . '';

 echo strftime ("%A %e %B %Y", time()) . '';
?>
The funny thing is that strftime prints correctly.
Any ideas
Catalin.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Setting register globals in http.conf

2003-09-04 Thread Chris Boget
I'm fairly new to apache so if I say something wrong, that's why.
Anyways, I have my virtual host set up in my httpd.conf file as
follows:


Port 80
DocumentRoot /blah/blah/blah
ServerName www.register_globals_must_be_on.com
php_value include_path ".:/blah/blah/blah:/blah"
php_value register_globals 1


I don't want it to be set to on for any of my other sites but for this
site, it has to be on.  Looking at:

http://us3.php.net/register_globals

I see that the way that I'm turning it on in the container is correct.
However, if the value is set to '1', I can't get to the site at all.  If
it is set to '0', I have no problems and can access the site normally.
I don't see anything in apache's error or access log that would give
any clue as to what is going wrong.

Does the above configuration look wrong to anyone?  Should I be
doing it differently?

thnx,
Chris

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



Re: [PHP] Question about Error Redirect (URL ShortCuts)

2003-09-04 Thread Jason Sheets
Hi ccj,

GET data is passed in the URL, POST data is not so loss of the 
information would be expected.  It sounds like you should use sessions, 
it is a better way of passing data between pages.

Take a look at http://www.php.net/manual/en/ref.session.php

Jason

ccj wrote:

Hi all

Based on descriptions in /urlhowto.php  -- Get it on your site,
I tried to redirect GET/POST data to a third page, say,
aaa.php ---> error.php ---> bbb.php

aaa.php:
   
   

error.php:
   

Everything goes right with GET method, but POST goes wrong in error.php:
The $HTTP_RAW_POST_DATA is lost.
The error.php page could not get the posted data.
Any idea ?

Regards,
CCJ
 

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


[PHP] gettext i18n

2003-09-04 Thread Catalin Trifu
Hi,

I want to add i18n support for my web site, but
it doesn't seem to work.
PHP 4.3.3., Apache 1.3.28, Mandrake 9.0
Here comes the test code. As you can see I try all sorts of things.

';
 echo putenv("LC_ALL=de") . '';
 echo setlocale(LC_ALL, "de", "german") . '';
 echo bindtextdomain("messages", "/www/locale") . '';
 echo textdomain("messages") . '';

 echo gettext("User") . '';

 echo strftime ("%A %e %B %Y", time()) . '';
?>

The funny thing is that strftime prints correctly.
Any ideas

Catalin.

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



Re: [PHP] suggestion: recursive calls

2003-09-04 Thread Jason Sheets
I wouldn't want to see a limit placed on recursion depth,  IMHO it is 
the responsibility of the programmer to limit recursion not the language 
itself otherwise the language is limiting the programmer.  Another 
possiblity is hitting the execution time limit, sounds like you are 
using IE with friendly errors turned on,  I prefer turning them off.

Jason

Andrew Brampton wrote:

I was just testing PHP with this code:

function blah($varible) {

   if ($varible > 860)
   exit();
   echo $varible . '';
   flush();
   blah($varible + 1);
}
blah(1);

?>

This would show 1 to 860, however if I tried any number greater than 860, ie
861 then the page would give the "This page cannot be displayed" page like
you were saying.
Normally apps in C, etc would throw a stack overflow error when you recursed
too high...
I'm guessing PHP doesn't implement this as a normal stack, and is crashing
out because we have hit the memory limit. The reason I say that is because
860 seems a very odd number to set the stack size to.
I'm also guessing that it wouldn't be too hard for the PHP Dev team to place
a limit on the recursion depth, or maybe it is a bit too hard and thats why
they didn't bother :)...
Andrew
- Original Message -
From: "Ronald van Raaphorst" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 04, 2003 11:40 AM
Subject: Re: [PHP] suggestion: recursive calls
 

I normally program in clarion (www.softvelocity.com) and an infinite
recursive call will cause a heap overflow...
As I only got a "This page cannot be displayed" page, an error must have
occurred, but it's not displayed...
At first I thought I had lost contact with the site, but then, after a lot
of tracing, I found the source of the error.
Ronald



"Marek Kilimajer" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
   

I don't think it is even possible, if the recursive calls don't seem
infinite to inteligent human being, how should a stupid computer program
find out.
Ronald van Raaphorst wrote:

 

Hi all,

Not a real bug, but a suggestion:
It would be nice if inifite recursive calls would somehow give an
   

error.
 

I spend quite some time to find the error in my php script.

Ronald

   

--
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] Passing objects as a reference and extracting the index of an associative array.

2003-09-04 Thread Webmaster
Hi,

i am using the smarty template engine.
Here is the problem that I would like to ask about:

function initTop(&$page, $array)
{
  for ($i=0; $iassignVars(, $array[$i])
  }
}


The function is supposed to know which object's attributes she is supposed
to change. Do I have to pass the object as a reference? Have never worked
with References before.

The array is supposed to be associative.
The funcion assignVars() is called like this:

$objektname->assignVars("indexname of ass. array", $arraywert);

How do I get the indexname for each arrrayvalue, so I can pass it to the
function assignVars?

Is there a php function?

Thank you very much.

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



RE: [PHP] Question regarding OOP and interitance

2003-09-04 Thread Jay Blanchard
[snip]
I would like to know a constructor function is also inherited to a child
class.
I mean the child class also needs to have a constructor function but it
must
have the same name as the class name.
How does that work?
[/snip]

FYI ... anything below PHP5 has a pseudo constructor. Since you are
inheriting the class the 'constructor' for the parent class should work.
If it doesn't (I have not tested it, and neither have you)then the class
extension can contain a 'contstructor' that is a duplicate of the parent
class 'constructor' but with the extension name. You'll have to test it
to make sure.

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



[PHP] Question regarding OOP and interitance

2003-09-04 Thread Webmaster
Good day,

I would like to know a constructor function is also inherited to a child
class.
I mean the child class also needs to have a constructor function but it must
have the same name as the class name.
How does that work?


Thank you very much.

BW

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



php-general Digest 4 Sep 2003 13:20:42 -0000 Issue 2277

2003-09-04 Thread php-general-digest-help

php-general Digest 4 Sep 2003 13:20:42 - Issue 2277

Topics (messages 161606 through 161645):

Session_start() corrupt HTML output with IE
161606 by: hecchan
161615 by: Viraj Kalinga Abayarathna
161621 by: Curt Zirzow
161623 by: Curt Zirzow
161632 by: Christophe Chisogne

Re: password systems
161607 by: Jason Sheets

Re: Restart Apache with PHP???
161608 by: Jason Sheets

Re: register_globals
161609 by: Jason Sheets

Re: Gripe
161610 by: Jason Sheets

Re: Too Advanced? Re: Cookies & Hidden Image
161611 by: Viraj Kalinga Abayarathna
161634 by: Marek Kilimajer

vars between instantiate class...
161612 by: jsWalter
161613 by: Raditha Dissanayake
161614 by: murugesan
161617 by: jsWalter

Re: web-mail problem
161616 by: Viraj Kalinga Abayarathna

Q on "inhert" class code
161618 by: jsWalter
161633 by: Evan Nemerson

auto 'jump' to link
161619 by: DougD
161620 by: Andrew Brampton
161622 by: Jackson Miller

Thank you -- Re: auto 'jump' to link
161624 by: DougD

Am I dreaming or what :)
161625 by: John Taylor-Johnston
161627 by: Raditha Dissanayake
161629 by: Evan Nemerson
161631 by: Dynamical.biz

Re: cookie crumbles
161626 by: John Taylor-Johnston

Uploading files via SSH
161628 by: Ben C.
161630 by: Evan Nemerson

suggestion: recursive calls
161635 by: Ronald van Raaphorst
161637 by: Marek Kilimajer
161638 by: Ronald van Raaphorst
161639 by: Marco Schuler
161641 by: Andrew Brampton

Re: how to include() N lines?
161636 by: David Robley

mysql Pattern Matching
161640 by: Ralph Guzman
161642 by: electroteque

is there a php version with curl already integrated?
161643 by: Chris
161644 by: murugesan

Question about Error Redirect (URL ShortCuts)
161645 by: ccj

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
--- Begin Message ---
Hi,
Using IE 6 (XP) i can't see the source generated for PHP even the page 
works properly (It doesn't happend with Mozilla or Opera).

If i comment out the line:
session_start()
This behaviour stops.
Any idea what's going on?
Thanks

hecchan
--- End Message ---
--- Begin Message ---
Hi hecchan,
I don't have a crear idea on what your problem is, but i have read
an article on phpfreak.com, it says to work the sessioned PHP scripts
correctly with IE6 you have to insert..

 header("Cache-control: private");

immediatly after starting the session.

try this.

Viraj

p.s.
and also if there is any one wo knows what exactly this header line
means,
please post a brief decription. thanks.



hecchan wrote:
> 
> Hi,
> Using IE 6 (XP) i can't see the source generated for PHP even the page
> works properly (It doesn't happend with Mozilla or Opera).
> 
> If i comment out the line:
> session_start()
> This behaviour stops.
> Any idea what's going on?
> 
> Thanks
> 
> hecchan
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
* Thus wrote Viraj Kalinga Abayarathna ([EMAIL PROTECTED]):
> 
>header("Cache-control: private");
> 
> p.s.
> and also if there is any one wo knows what exactly this header line
> means,
> please post a brief decription. thanks.

private means that only the intended person that is getting this
file is able to cache it.  So if you're going through a proxy that
proxy must not cache that file.



Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message ---
* Thus wrote hecchan ([EMAIL PROTECTED]):
> Hi,
> Using IE 6 (XP) i can't see the source generated for PHP even the page 
> works properly (It doesn't happend with Mozilla or Opera).
> 
> If i comment out the line:
> session_start()
> This behaviour stops.
> Any idea what's going on?

What is your session.cache_limiter ini setting?

private, nocache, public?



Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message ---
hecchan wrote:
Using IE 6 (XP) i can't see the source generated for PHP even the page 
works properly (It doesn't happend with Mozilla or Opera).
The "View source" in IE 5 and 6 is buggy : it doesnt work as soon as
"there are too many files in the Temp Internetfiles folder". sic.
Solution is of course emptying IE cache... or switching to mozilla ;-)
See M$ Knowledge base article Q306907

--
Christophe Chisogne
Developper, Publicityweb sprl
http://www.publicityweb.com
--- End Message ---
--- Begin Message ---
Take a look at pwgen, it is a comma

[PHP] Question about Error Redirect (URL ShortCuts)

2003-09-04 Thread ccj
Hi all

Based on descriptions in /urlhowto.php  -- Get it on your site,
I tried to redirect GET/POST data to a third page, say,

aaa.php ---> error.php ---> bbb.php

aaa.php:



error.php:


Everything goes right with GET method, but POST goes wrong in error.php:

The $HTTP_RAW_POST_DATA is lost.
The error.php page could not get the posted data.

Any idea ?

Regards,
CCJ

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



Re: [PHP] is there a php version with curl already integrated?

2003-09-04 Thread murugesan
Refer
http://in2.php.net/curl

-murugesan
- Original Message - 
From: "Chris" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 04, 2003 5:02 PM
Subject: [PHP] is there a php version with curl already integrated?


> hello,
> 
> i must admit, i'm quite a nub when it comes to compiling php myself, so 
> i'm wondering if there is any version of php with curl already bein part 
> of it? i'm running xp with apache 1.3.
> 
> cheers,
> chris
> 
> -- 
> 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] is there a php version with curl already integrated?

2003-09-04 Thread Chris
hello,

i must admit, i'm quite a nub when it comes to compiling php myself, so 
i'm wondering if there is any version of php with curl already bein part 
of it? i'm running xp with apache 1.3.

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


RE: [PHP] mysql Pattern Matching

2003-09-04 Thread electroteque
i'm doin this offlist

-Original Message-
From: Ralph Guzman [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 10:23 PM
To: PHP General Mailing List
Subject: [PHP] mysql Pattern Matching


I know this question is best for the mySQL mailing list, but I am unable
to subscribe to their list at this moment so perhaps somebody here can
help me out.

I have a table with a field where amenities are listed together using a
comma delimiter like: pool,spa,fitness-center

To search this table I use a query that looks something like this:

SELECT * FROM properties WHERE amenities LIKE '%pool%' AND amenities
LIKE '%spa%' AND amenities LIKE '%fitness-center%'

This works, however let's say the user chooses to search for more
amenities. This means the query would need multiple 'AND amenities LIKE
'%%' statements.

Is there a better way to write this?

I tried the following, but it did not work:

AND amenities LIKE ('%pool%','%spa%','%fitness-center%')

Any suggestions?

-- 
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] suggestion: recursive calls

2003-09-04 Thread Andrew Brampton
I was just testing PHP with this code:
 860)
exit();

echo $varible . '';
flush();

blah($varible + 1);
}

blah(1);

?>

This would show 1 to 860, however if I tried any number greater than 860, ie
861 then the page would give the "This page cannot be displayed" page like
you were saying.

Normally apps in C, etc would throw a stack overflow error when you recursed
too high...

I'm guessing PHP doesn't implement this as a normal stack, and is crashing
out because we have hit the memory limit. The reason I say that is because
860 seems a very odd number to set the stack size to.

I'm also guessing that it wouldn't be too hard for the PHP Dev team to place
a limit on the recursion depth, or maybe it is a bit too hard and thats why
they didn't bother :)...

Andrew
- Original Message -
From: "Ronald van Raaphorst" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 04, 2003 11:40 AM
Subject: Re: [PHP] suggestion: recursive calls


> I normally program in clarion (www.softvelocity.com) and an infinite
> recursive call will cause a heap overflow...
>
> As I only got a "This page cannot be displayed" page, an error must have
> occurred, but it's not displayed...
> At first I thought I had lost contact with the site, but then, after a lot
> of tracing, I found the source of the error.
>
> Ronald
>
>
>
> "Marek Kilimajer" <[EMAIL PROTECTED]> schreef in bericht
> news:[EMAIL PROTECTED]
> > I don't think it is even possible, if the recursive calls don't seem
> > infinite to inteligent human being, how should a stupid computer program
> > find out.
> >
> > Ronald van Raaphorst wrote:
> >
> > > Hi all,
> > >
> > > Not a real bug, but a suggestion:
> > > It would be nice if inifite recursive calls would somehow give an
error.
> > > I spend quite some time to find the error in my php script.
> > >
> > > Ronald
> > >
>
> --
> 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] mysql Pattern Matching

2003-09-04 Thread Ralph Guzman
I know this question is best for the mySQL mailing list, but I am unable
to subscribe to their list at this moment so perhaps somebody here can
help me out.

I have a table with a field where amenities are listed together using a
comma delimiter like: pool,spa,fitness-center

To search this table I use a query that looks something like this:

SELECT * FROM properties WHERE amenities LIKE '%pool%' AND amenities
LIKE '%spa%' AND amenities LIKE '%fitness-center%'

This works, however let's say the user chooses to search for more
amenities. This means the query would need multiple 'AND amenities LIKE
'%%' statements.

Is there a better way to write this?

I tried the following, but it did not work:

AND amenities LIKE ('%pool%','%spa%','%fitness-center%')

Any suggestions?

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



Re: [PHP] suggestion: recursive calls

2003-09-04 Thread Marco Schuler
Hi

Am Don, 2003-09-04 um 12.40 schrieb Ronald van Raaphorst:
> I normally program in clarion (www.softvelocity.com) and an infinite
> recursive call will cause a heap overflow...
> 
> As I only got a "This page cannot be displayed" page, an error must have
> occurred, but it's not displayed...

A computer cannot decide when a recursion is to deep. Imagine traversing
a realy big tree. There a recursion can get realy deep.

I don't know about the internals of php. But as it is an interpreter
language, I would say that all variables or even the parsing tree are
located on the heap. So this heap will probably be quite big! Thus, to
produce a heap overflow will take a rather long time. (Correct me if I
am wrong with my tought)

A workaround could be that you have a counter (static variable!) in your
recursion procedure or methode respectively. You increment this counter
on every entry into the procedure and compare it to a limit that _you_
specifiy.

--
Cheers!
 Marco


> At first I thought I had lost contact with the site, but then, after a lot
> of tracing, I found the source of the error.
> 
> Ronald
> 
> 
> 
> "Marek Kilimajer" <[EMAIL PROTECTED]> schreef in bericht
> news:[EMAIL PROTECTED]
> > I don't think it is even possible, if the recursive calls don't seem
> > infinite to inteligent human being, how should a stupid computer program
> > find out.
> >
> > Ronald van Raaphorst wrote:
> >
> > > Hi all,
> > >
> > > Not a real bug, but a suggestion:
> > > It would be nice if inifite recursive calls would somehow give an error.
> > > I spend quite some time to find the error in my php script.
> > >
> > > Ronald
> > >
> 
> -- 
> 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] suggestion: recursive calls

2003-09-04 Thread Ronald van Raaphorst
I normally program in clarion (www.softvelocity.com) and an infinite
recursive call will cause a heap overflow...

As I only got a "This page cannot be displayed" page, an error must have
occurred, but it's not displayed...
At first I thought I had lost contact with the site, but then, after a lot
of tracing, I found the source of the error.

Ronald



"Marek Kilimajer" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
> I don't think it is even possible, if the recursive calls don't seem
> infinite to inteligent human being, how should a stupid computer program
> find out.
>
> Ronald van Raaphorst wrote:
>
> > Hi all,
> >
> > Not a real bug, but a suggestion:
> > It would be nice if inifite recursive calls would somehow give an error.
> > I spend quite some time to find the error in my php script.
> >
> > Ronald
> >

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



Re: [PHP] suggestion: recursive calls

2003-09-04 Thread Marek Kilimajer
I don't think it is even possible, if the recursive calls don't seem 
infinite to inteligent human being, how should a stupid computer program 
find out.

Ronald van Raaphorst wrote:

Hi all,

Not a real bug, but a suggestion:
It would be nice if inifite recursive calls would somehow give an error.
I spend quite some time to find the error in my php script.
Ronald

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


[PHP] Re: how to include() N lines?

2003-09-04 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says...
> hello!
> 
> i need to include() only a given amount of lines (the first 10 for example)
> instead of a whole file.
> 
> does someone know how this has to be done?
> 
> 
> thanks a lot for your effort,
> best regards

include and friends only load a complete file. You might try fopen/fread 
and count the number of lines loaded.

Cheers
-- 
Quod subigo farinam

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

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



[PHP] suggestion: recursive calls

2003-09-04 Thread Ronald van Raaphorst
Hi all,

Not a real bug, but a suggestion:
It would be nice if inifite recursive calls would somehow give an error.
I spend quite some time to find the error in my php script.

Ronald

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



Re: [PHP] Too Advanced? Re: Cookies & Hidden Image

2003-09-04 Thread Marek Kilimajer
I don't accept third party cookies. Maybe your browser is set up so it 
does not too. Check the privacy & security settings.

Nicole wrote:
The cookie is being accessed by the same domain it was generated by. The
problem is, the script is being pulled up via a hidden image (which resides
on a different domain). So that may still be the problem anyway.
Thanks.

--

"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
At 23:55 03.09.2003, Nicole said:
[snip]
But the script just gets a blank cookie when accessed this way(via hidden
image); However, if the script was accessed directly, or the thankyou
page

resided on the same domain as the tracking script (which created the
cookie

to begin with), the cookie has the value that it was set with.
[snip]

That's it - cookies will only be sent to the same domain (hostname) they
have been generated at. You cannot pass cookies between domains
(hostnames).

--
  >O Ernest E. Vogelsinger
  (\)ICQ #13394035
   ^ http://www.vogelsinger.at/


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


Re: [PHP] Q on "inhert" class code

2003-09-04 Thread Evan Nemerson
It looks like you're trying to access a variable of a class, not an instance 
of that class. try something more like

$authObj = new Auth;
$session = &Auth::_importGlobalVariable("session");
$session[$authObj->_sessionName]['registered'] = true;

I'm pretty sure php4 doesn't allow access to variables with the :: operator. I 
sincerely doubt php5 does (although i suppose logically it could be used to 
access static variables...?)

Does your class extend Auth? if so you should use $this-> instead of 
instantiating a new object... I'm honestly not sure what you're trying to do 
here... Even if your class extends Auth, i don't see how changing $session 
would do you any good since it appears to be applicable only to whatever 
function you took that snippet from, not the entire object (which would look 
like $this->session instead of $session)

If you post a more thorough description of what you're trying to do, and 
explain the OOP relationships a bit more, that would help

-Evan


On Wednesday 03 September 2003 10:08 pm, jsWalter wrote:
> I have a parent Class that does this in one of it's methods...
>
>
> $session = &Auth::_importGlobalVariable("session");
> $session[$this->_sessionName]['registered'] = true;
>
> I would like to "hook" into this in on eof my methods in a child class
>
> I thought I could do this...
>
> [538]   $session = Auth::_importGlobalVariable("session");
> [539]   $session[Auth::_sessionName]['registered'] = true;
>
> But I get this error:
>
> Parse error: parse error, unexpected ']', expecting '(' in
> mypath\AuthUser.php on line 539
>
> OK, I guessed wrong (again).
>
> This is how PEAR::Auth deals with inserting its class vars into a session
> and I want to piggyback on that. No need to roll my own, I think.
>
> Can someone show me the errors of my ways?
>
> Thanks
>
> Walter

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



Re: [PHP] Session_start() corrupt HTML output with IE

2003-09-04 Thread Christophe Chisogne
hecchan wrote:
Using IE 6 (XP) i can't see the source generated for PHP even the page 
works properly (It doesn't happend with Mozilla or Opera).
The "View source" in IE 5 and 6 is buggy : it doesnt work as soon as
"there are too many files in the Temp Internetfiles folder". sic.
Solution is of course emptying IE cache... or switching to mozilla ;-)
See M$ Knowledge base article Q306907

--
Christophe Chisogne
Developper, Publicityweb sprl
http://www.publicityweb.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


  1   2   >