RE: [PHP] Re: Log files

2008-07-02 Thread Haluk AKIN
If you are planning to come up with relations between these errors and other
activities on your website then you need to use a database.
If you will use this error log only for debugging purposes then a text file
should be enough.

>From a coder's perspective the workload of coding both of these methods
should be similar.

Opening and closing a text file 1,000 or more times a day won't be a problem
either. Similarly, opening&closing that many database connections won't be
any problem either. Therefore, if I were you I wouldn't worry about the
performance.

Cheers,
Haluk



-Original Message-
From: John Comerford [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 03, 2008 12:54 AM
To: php-general@lists.php.net
Subject: Re: [PHP] Re: Log files

If you are logging errors, then maybe you should look at using a file 
instead of a database table.  I have seen an instance where a system 
used a table for error logging and writing to the log table caused and 
error, you can guess where that left things.

Shawn McKenzie wrote:
> Mark Bomgardner wrote:
>> I am writing an application in which I want to create log files.  I am
>> weighing the difference between using text files and using a database to
>> house the data.  It appears to me that there is really no advantage 
>> either
>> way or is there?  There are pros and cons to both methods, but I am
>> concerned about opening and closing a text file some many times that 
>> it may
>> cause and issue. The file may be opened and closed 1,000 or more times a
>> day.
>>
>>  
>>
>> Opinions please..
>>
>>  
>>
>> markb
>>
>>
>
> Using a database you're hitting a file the same number of times (the 
> database is in a file or files) but you have the mem/cpu overhead of 
> the db itself.  Having said that, if you are using a database already 
> for the site then might as well log to it.  I wouldn't implement a 
> database only for the purpose of logging.
>
> -Shawn
>


-- 
Option Systems Pty. Ltd.
53 Waverley Road, Malvern East, VIC 3145
PO Box 7, Caulfield East, VIC 3145
Phone: 03 9571 0100  Fax: 03 9571 0500
 
The information in this e-mail is confidential and is intended solely for
the addressee. 
Any views or opinions presented are solely those of the author 
and do not necessarily represent those of Option Systems Pty.Ltd.
If you are not the intended recipient, please delete this message and
contact the sender.


-- 
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] Re: Log files

2008-07-02 Thread John Comerford
If you are logging errors, then maybe you should look at using a file 
instead of a database table.  I have seen an instance where a system 
used a table for error logging and writing to the log table caused and 
error, you can guess where that left things.


Shawn McKenzie wrote:

Mark Bomgardner wrote:

I am writing an application in which I want to create log files.  I am
weighing the difference between using text files and using a database to
house the data.  It appears to me that there is really no advantage 
either

way or is there?  There are pros and cons to both methods, but I am
concerned about opening and closing a text file some many times that 
it may

cause and issue. The file may be opened and closed 1,000 or more times a
day.

 


Opinions please..

 


markb




Using a database you're hitting a file the same number of times (the 
database is in a file or files) but you have the mem/cpu overhead of 
the db itself.  Having said that, if you are using a database already 
for the site then might as well log to it.  I wouldn't implement a 
database only for the purpose of logging.


-Shawn




--
Option Systems Pty. Ltd.
53 Waverley Road, Malvern East, VIC 3145
PO Box 7, Caulfield East, VIC 3145
Phone: 03 9571 0100  Fax: 03 9571 0500

The information in this e-mail is confidential and is intended solely for the addressee. 
Any views or opinions presented are solely those of the author 
and do not necessarily represent those of Option Systems Pty.Ltd.

If you are not the intended recipient, please delete this message and
contact the sender.


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



[PHP] Re: Log files

2008-07-02 Thread Shawn McKenzie

Mark Bomgardner wrote:

I am writing an application in which I want to create log files.  I am
weighing the difference between using text files and using a database to
house the data.  It appears to me that there is really no advantage either
way or is there?  There are pros and cons to both methods, but I am
concerned about opening and closing a text file some many times that it may
cause and issue. The file may be opened and closed 1,000 or more times a
day.

 


Opinions please..

 


markb




Using a database you're hitting a file the same number of times (the 
database is in a file or files) but you have the mem/cpu overhead of the 
db itself.  Having said that, if you are using a database already for 
the site then might as well log to it.  I wouldn't implement a database 
only for the purpose of logging.


-Shawn

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



[PHP] PHPNews Vs phpns

2008-07-02 Thread John Comerford
I am looking at including news on a website I am putting together.  From 
my google searches it seems the two main players are PHPNews and phpns.


Are these the main open source news systems ?
Is one considered better than the other ?
Anyone got any real world experiences with either of these products ?
Anyone recommend an alternative ?

TIA,
 JC

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



Re: [PHP] how to create a slide show using PHP5

2008-07-02 Thread Michael Kubler

You could look into something like PicLens lite.
http://piclens.com/lite/webmasterguide.php

It's more of an image viewer than slideshow. But the FFox plugin works 
great with Flickr, youtube, etc..

Basically you create a media RSS feed of the photos or video.
There's two flavours.
PicsLens is the plugin for browsers, while PicLens lite uses javascript 
and lets people who don't have the browser plugin view the photos.




Michael Kubler
*G*rey *P*hoenix *P*roductions 



philip wrote:

Hi everyone,

I want to create a slide show of photos for my web site. How is this 
done using php5? I am using Opensuse 10.3, Apache, PHP5.


TIA for any assistance,

Philip



Re: [PHP] Log files

2008-07-02 Thread Chris
Mark Bomgardner wrote:
> I am writing an application in which I want to create log files.  I am
> weighing the difference between using text files and using a database to
> house the data.  It appears to me that there is really no advantage either
> way or is there?  There are pros and cons to both methods, but I am
> concerned about opening and closing a text file some many times that it may
> cause and issue. The file may be opened and closed 1,000 or more times a
> day.

Opening/closing a file that number of times won't cause a problem, 1,000
 isn't a lot a day. If you needed to write something 1,000 times a
minute, you probably couldn't do that with a file without getting into
contention/locking issues.

What will you do with the logs once you have them?

Do you need to run reports based on the data in them?
Will you need to search for information in the logs?

If you need to run reports or search for info in the logs, I'd use a
database.

If you just need the logs for "Person A logged in at this time" type
messages then a file should be fine.

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

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



Re: [PHP] how to create a slide show using PHP5

2008-07-02 Thread philip

Bastien Koert wrote:



On Wed, Jul 2, 2008 at 4:37 PM, philip <[EMAIL PROTECTED] 
> wrote:


Hi everyone,

I want to create a slide show of photos for my web site. How is
this done using php5? I am using Opensuse 10.3, Apache, PHP5.

TIA for any assistance,

Philip

-- 
Philip Ramsey

learning PHP and MySQL for building a better world
philipramsey.is-a-geek.net 

-- 
PHP General Mailing List (http://www.php.net/)

To unsubscribe, visit: http://www.php.net/unsub.php


2 parts to this

1. pull a series on [random] images from the system to show the user
2. client side javascript code to load the images in a slide show fashion

You may want to get an existing one and pull it apart to see how 
they've done it


--

Bastien

Cat, the other other white meat 

Hi Bastien,

Thank you for your quick response. Where may I find sample? I tried 
searching the web but only found samples and tutorials that required 
flash for the actual slide show. Since I run Linux and Adobe/Macromedia 
do not make a flash editor for Linux, flash is not an option.


TIA,

Philip

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



Re: [PHP] how to create a slide show using PHP5

2008-07-02 Thread Børge Holen
On Thursday 03 July 2008 00:14:45 tedd wrote:
> At 4:37 PM -0400 7/2/08, philip wrote:
> >Hi everyone,
> >
> >I want to create a slide show of photos for my web site. How is this
> >done using php5? I am using Opensuse 10.3, Apache, PHP5.
> >
> >TIA for any assistance,
> >
> >Philip
>
> Philip:
>
> With a combination of php, html, and javascript, you can get this:
>
> http://webbytedd.com/c/fade-cycle/
>
> The javascript is there.
>
> Cheers,
>
> tedd

thats a NICE as in  _NICE_ slideshow, best I've seen in... hell best I've seen 
ever.

>
> --
> ---
> http://sperling.com  http://ancientstones.com  http://earthstones.com



-- 
---
Børge Holen
http://www.arivene.net

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



Re: [PHP] how to create a slide show using PHP5

2008-07-02 Thread tedd

At 4:37 PM -0400 7/2/08, philip wrote:

Hi everyone,

I want to create a slide show of photos for my web site. How is this 
done using php5? I am using Opensuse 10.3, Apache, PHP5.


TIA for any assistance,

Philip


Philip:

With a combination of php, html, and javascript, you can get this:

http://webbytedd.com/c/fade-cycle/

The javascript is there.

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



RE: [PHP] how to create a slide show using PHP5

2008-07-02 Thread Haluk AKIN
Hi,

If you are fine with using flash you could use some ready solution like
this:

 http://www.entheosweb.com/Flash/Photo_Gallery4/index.asp

For ready solutions like this you won't need a flash editor.

Haluk

-Original Message-
From: Bastien Koert [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 02, 2008 5:07 PM
To: philip
Cc: php-general@lists.php.net
Subject: Re: [PHP] how to create a slide show using PHP5

On Wed, Jul 2, 2008 at 5:02 PM, philip <[EMAIL PROTECTED]> wrote:

> Bastien Koert wrote:
>
>>
>>
>> On Wed, Jul 2, 2008 at 4:37 PM, philip <[EMAIL PROTECTED]> [EMAIL PROTECTED]>> wrote:
>>
>>Hi everyone,
>>
>>I want to create a slide show of photos for my web site. How is
>>this done using php5? I am using Opensuse 10.3, Apache, PHP5.
>>
>>TIA for any assistance,
>>
>>Philip
>>
>>--Philip Ramsey
>>learning PHP and MySQL for building a better world
>>philipramsey.is-a-geek.net 
>>
>>--PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>> 2 parts to this
>>
>> 1. pull a series on [random] images from the system to show the user 
>> 2. client side javascript code to load the images in a slide show 
>> fashion
>>
>> You may want to get an existing one and pull it apart to see how 
>> they've done it
>>
>> --
>>
>> Bastien
>>
>> Cat, the other other white meat
>>
> Hi Bastien,
>
> Thank you for your quick response. Where may I find sample? I tried 
> searching the web but only found samples and tutorials that required 
> flash for the actual slide show. Since I run Linux and 
> Adobe/Macromedia do not make a flash editor for Linux, flash is not an
option.
>
> TIA,
>
> Philip
>

google php slide show

Did you mean: php
*slideshow*

zinkwazi.com > *PHPSlideShow* Feb 2006:
*phpslideshow* v0.9.6 now supports JavaScript image preloading! *...* *
PHPSlideShow* is the easiest way to create a web based *slide show* from a *
...*
www.zinkwazi.com/wp/scripts/ - 31k -
Cached-
Similar
pages-
Note
this
*PHP*/SWF *Slideshow* > Introduction A
simple, yet powerful *PHP* tool to create attractive web slideshows from
dynamic image files and data.
www.maani.us/*slideshow*/ - 8k -
Cached-
Similar
pages-
Note
this
*PHP*/SWF *Slideshow* >
TutorialIf
*slideshow*.*php*, *slideshow*.swf, or sample.*php* aren't in the same
directory as *...* The path for *slideshow*.*php* must be relative to
prevent the server from *...*
www.maani.us/*slideshow*/index.*php*?menu=Tutorial - 11k -
Cached-
Similar
pages
-
Note
this
More results from www.maani.us
>
freshmeat.net: Project details for *PHP
Slideshow*
*PHPSlideShow* is a little script that creates a web based *slide show* with
NEXT and BACK buttons to *...* http://www.zinkwazi.com/scripts/*phpslideshow
*.tar.gz *...*
freshmeat.net/projects/*php**slideshow*/ - 22k -
Cached-
Similar
pages-
Note
this
The *PHP* Resource Index: Complete Scr

Re: [PHP] Log files

2008-07-02 Thread Børge Holen
On Wednesday 02 July 2008 22:36:24 Mark Bomgardner wrote:
> I am writing an application in which I want to create log files.  I am
> weighing the difference between using text files and using a database to
> house the data.  It appears to me that there is really no advantage either
> way or is there?  There are pros and cons to both methods, but I am
> concerned about opening and closing a text file some many times that it may
> cause and issue. The file may be opened and closed 1,000 or more times a
> day.
>
>
>
> Opinions please..

for the ease of it, I would go for the database. 
There is of course the details regarding the rest of the site to take into 
consideration
damn database is easy... <- take this one and go for files if not sustainable 
enought.

>
>
>
> markb



-- 
---
Børge Holen
http://www.arivene.net

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



Re: [PHP] URL Rewrite

2008-07-02 Thread Børge Holen
On Wednesday 02 July 2008 13:34:32 Bastien Koert wrote:
> On Wed, Jul 2, 2008 at 6:33 AM, Per Jessen <[EMAIL PROTECTED]> wrote:
> > Subhranil wrote:
> > > Hi All,
> > >
> > > I want to show one URL at browser and content of different URL.
> >
> > Take a look at apache url rewriting.
> >
> >
> > /Per Jessen, Zürich
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> You could look at using an iframe or frames in general, or ajax call into a
> div

that suggestion is wrong on so many levels. using a "hack" to manage something 
ment to be handled before page is sent.

I lean toward the apache rewritemod



-- 
---
Børge Holen
http://www.arivene.net

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



Re: [PHP] how to create a slide show using PHP5

2008-07-02 Thread Bastien Koert
On Wed, Jul 2, 2008 at 5:02 PM, philip <[EMAIL PROTECTED]> wrote:

> Bastien Koert wrote:
>
>>
>>
>> On Wed, Jul 2, 2008 at 4:37 PM, philip <[EMAIL PROTECTED]> [EMAIL PROTECTED]>> wrote:
>>
>>Hi everyone,
>>
>>I want to create a slide show of photos for my web site. How is
>>this done using php5? I am using Opensuse 10.3, Apache, PHP5.
>>
>>TIA for any assistance,
>>
>>Philip
>>
>>--Philip Ramsey
>>learning PHP and MySQL for building a better world
>>philipramsey.is-a-geek.net 
>>
>>--PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>> 2 parts to this
>>
>> 1. pull a series on [random] images from the system to show the user
>> 2. client side javascript code to load the images in a slide show fashion
>>
>> You may want to get an existing one and pull it apart to see how they've
>> done it
>>
>> --
>>
>> Bastien
>>
>> Cat, the other other white meat
>>
> Hi Bastien,
>
> Thank you for your quick response. Where may I find sample? I tried
> searching the web but only found samples and tutorials that required flash
> for the actual slide show. Since I run Linux and Adobe/Macromedia do not
> make a flash editor for Linux, flash is not an option.
>
> TIA,
>
> Philip
>

google php slide show

Did you mean: php
*slideshow*

zinkwazi.com » *PHPSlideShow* Feb 2006:
*phpslideshow* v0.9.6 now supports JavaScript image preloading! *...* *
PHPSlideShow* is the easiest way to create a web based *slide show* from a *
...*
www.zinkwazi.com/wp/scripts/ - 31k -
Cached-
Similar
pages-
Note
this
*PHP*/SWF *Slideshow* > Introduction A
simple, yet powerful *PHP* tool to create attractive web slideshows from
dynamic image files and data.
www.maani.us/*slideshow*/ - 8k -
Cached-
Similar
pages-
Note
this
*PHP*/SWF *Slideshow* >
TutorialIf
*slideshow*.*php*, *slideshow*.swf, or sample.*php* aren't in the same
directory as *...* The path for *slideshow*.*php* must be relative to
prevent the server from *...*
www.maani.us/*slideshow*/index.*php*?menu=Tutorial - 11k -
Cached-
Similar
pages-
Note
this
More results from www.maani.us
»
freshmeat.net: Project details for *PHP
Slideshow*
*PHPSlideShow* is a little script that creates a web based *slide show* with
NEXT and BACK buttons to *...* http://www.zinkwazi.com/scripts/*phpslideshow
*.tar.gz *...*
freshmeat.net/projects/*php**slideshow*/ - 22k -
Cached-
Similar
pages-
Note
this
The *PHP* Resource Index: Complete Scripts: Images and Graphs: *Slide*
*...*Version:
1 - Released: 08/10/07 - Free - Requirement(s): *PHP* 4/5, Jump to URL. A
customizable script which creates a user-navigated *slide show* from any *
...*
*php*.resourceindex.com/Complete_Scripts/Images_and_Graphs/*Slide*_*Show*s/
- 28k - 
Cached

Re: [PHP] Re: Inspiration for a Tombstone.

2008-07-02 Thread Daniel Brown
On Mon, Jun 30, 2008 at 1:31 PM, Shawn McKenzie <[EMAIL PROTECTED]> wrote:
>
> Fatal error: Call to undefined function shawn() in /home/shawn/life.php on
> line 1

I like it.  ;-P

-- 

Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

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



Re: [PHP] how to create a slide show using PHP5

2008-07-02 Thread Bastien Koert
On Wed, Jul 2, 2008 at 4:37 PM, philip <[EMAIL PROTECTED]> wrote:

> Hi everyone,
>
> I want to create a slide show of photos for my web site. How is this done
> using php5? I am using Opensuse 10.3, Apache, PHP5.
>
> TIA for any assistance,
>
> Philip
>
> --
> Philip Ramsey
> learning PHP and MySQL for building a better world
> philipramsey.is-a-geek.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
2 parts to this

1. pull a series on [random] images from the system to show the user
2. client side javascript code to load the images in a slide show fashion

You may want to get an existing one and pull it apart to see how they've
done it

-- 

Bastien

Cat, the other other white meat


[PHP] Log files

2008-07-02 Thread Mark Bomgardner
I am writing an application in which I want to create log files.  I am
weighing the difference between using text files and using a database to
house the data.  It appears to me that there is really no advantage either
way or is there?  There are pros and cons to both methods, but I am
concerned about opening and closing a text file some many times that it may
cause and issue. The file may be opened and closed 1,000 or more times a
day.

 

Opinions please..

 

markb



[PHP] how to create a slide show using PHP5

2008-07-02 Thread philip

Hi everyone,

I want to create a slide show of photos for my web site. How is this 
done using php5? I am using Opensuse 10.3, Apache, PHP5.


TIA for any assistance,

Philip

--
Philip Ramsey
learning PHP and MySQL for building a better world
philipramsey.is-a-geek.net

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



Re: [PHP] Variable not showing up.

2008-07-02 Thread Jim Lucas

Couple things, read in-line...

Steve Marquez wrote:

Greetings,

The following code works in every way except one. The variable, 
$linkspage, in the link, will not replace with information from the 
database for some reason. No matter what else I put in $id_num, 
$filename or whatever it replaces, but not $linkspage. The variable does 
work above, in the query.


Does this make sense? I hope so.

Thanks for any help.



I suggest using 

include '../cms/cnx.php';
$linkspage = $_GET["linkspage"];



Holly cow, clean this variable before you use it in an SQL statement!!!

Use mysql_real_escape_string() if nothing else.


/* Performing SQL query */
$query = "SELECT * FROM cms_pages WHERE linkspage='$linkspage' ORDER BY 
id_num DESC";


What are the name of all the columns in this table?  Could one of them be called 
'likespage' by change?



$result = mysql_query($query) or die("Query failed");
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
extract ( $line );


Never, Never, Never run extract like this.  Refer to the



?>
">

   
echo ''.$filename.'';


What is this for?  Just use

echo $filename;


}
echo '';

}


Wait, just replace the entire previous code with this

Note: long tag instead of short :)
" .
 str_replace('.php', '', $filename) . "";

  }

} else {

  # well duh...
  echo 'No results!';

}

?>

their is no need for a condition, because the way that you have it, if it fails, 
then it doesn't print anything at all.





?>




--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare


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



[PHP] Variable not showing up.

2008-07-02 Thread Steve Marquez

Greetings,

The following code works in every way except one. The variable,  
$linkspage, in the link, will not replace with information from the  
database for some reason. No matter what else I put in $id_num,  
$filename or whatever it replaces, but not $linkspage. The variable  
does work above, in the query.


Does this make sense? I hope so.

Thanks for any help.

$query = "SELECT * FROM cms_pages WHERE linkspage='$linkspage' ORDER  
BY id_num DESC";

$result = mysql_query($query) or die("Query failed");
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
extract ( $line );

?>
			$linkspage"; ?>">

';

}

?>

--
Steve Marquez
Marquez Design
e-mail: [EMAIL PROTECTED]
web: http://www.marquez-design.com



[PHP] Using zend_hash_find when key is of Integer type

2008-07-02 Thread Ambrish

Hi All,

I am writing a PHP extension and over here I am trying to use zend_hash_find
API to search for key in a hash. But the problem here is "my key is an
integer and not *char". So this zend_hash_find will not work.

Can anyone tell me how can I use zend_hash_find (or any other API) to search
key, where key is of integer type?

Regards,
Ambrish Bhargava
-- 
View this message in context: 
http://www.nabble.com/Using-zend_hash_find-when-key-is-of-Integer-type-tp18239318p18239318.html
Sent from the PHP - General mailing list archive at Nabble.com.


RE: [PHP] CURL de-bugging: So why am I not getting the results page on the target site?

2008-07-02 Thread Boyd, Todd M.
> -Original Message-
> From: Chris [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 01, 2008 9:42 PM
> To: [EMAIL PROTECTED]
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] CURL de-bugging: So why am I not getting the
results
> page on the target site?
> 
> ioannes wrote:
> > I didn't get any brave response on this, but given the other thread
> on
> > 'encription' I was wondering could anyone decrypt the __VIEWSTATE
> string
> > at the end of this message.  It is part of the input page whose
> results
> > page I am trying to retrieve back onto my server for further php
> work.
> > I replicated the source from that input page onto a page on my
> server,
> > and when I click the submit button it correctly goes to the target
> > results page, on the other site though, however it did not work
> without
> > the whole of the string below.  The experiment proved though that
> > without the __VIEWSTATE the results page will not return.  So I am
> just
> > wondering, as I have not been able to repeat this using curl, what
> the
> >  is included in that string. There's a challenge for anyone with
> > whatever resources it takes.
> 
> echo base64_decode($view_state_string);
> 
> viewstate in asp.net is like sessions in php (I believe, I could be
> completely wrong :P).

Ehrm... you're not *completely* wrong. ;) I do most of my programming at
work in ASP.NET/VB.NET, and I've come to understand that the VIEWSTATE
in an ASP.NET page is more or less for retaining form values and
client-side settings. IIS/ASP.NET still uses sessions--and in much the
same way as PHP.


Todd Boyd
Web Programmer




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



Re: [PHP] PHP-CLI and the "less" command (kubuntu)

2008-07-02 Thread Mattias Thorslund

Stut wrote:

On 2 Jul 2008, at 02:58, Mattias Thorslund wrote:

Hi everyone,

I have a CLI application that produces lots of output to the 
terminal, so I like to send the output along to the "less" command. 
This has always worked very nicely. Moving to the top or bottom of 
the output used to require just hitting the "home" or "end" key, and 
the up and down arrows as well as page up and page down worked nicely.


After upgrading to Hardy on Kubuntu, the behavior changed. Now, it 
seems to preempt the navigation and instead print ugly codes for each 
press on a "navigational key" (one of those mentioned above), such as 
^[OF. When I press "enter", the desired scroll is executed. Scrolling 
up and down is one thing, but it's particularly a pain when trying to 
search through the output, as it would no longer look up previous 
search arguments.


I thought at first it's a problem with Konsole, my terminal program, 
or with "less" itself. But I've now tried in different terminal 
programs, and reading output other than output from PHP, and the ONLY 
time it happens is when I pipe output from PHP to "less". I have 
added a small test script that exhibits the problem on my system. It 
may work well the first time, but when repeating the same command a 
second time, the "weird" behavior starts.


It could very well be some kind of problem with "less", but since I 
can only reproduce the problem with output from PHP CLI, I thought 
it's worth asking here.


Did something about PHP CLI output change lately?


This has nothing to do with PHP. The keystrokes are processed by less 
so your problem lies there or more likely with the terminal emulation 
you're using. Please try a more relevant list.


-Stut


I agree the keystrokes are processed by less. This is probably more a 
problem with "less". Yes I will ask on other lists as well.


I thought it was irrelevant to PHP until I tried to provoke the same 
behavior by reading large files or other console input. Nope, only PHP 
output does it, so I figured someone here might have encountered this 
behavior too.


Mattias

Maybe you didn't


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



Re: [PHP] URL Rewrite

2008-07-02 Thread Bastien Koert
On Wed, Jul 2, 2008 at 6:33 AM, Per Jessen <[EMAIL PROTECTED]> wrote:

> Subhranil wrote:
>
> >
> > Hi All,
> >
> > I want to show one URL at browser and content of different URL.
> >
>
>
> Take a look at apache url rewriting.
>
>
> /Per Jessen, Zürich
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
You could look at using an iframe or frames in general, or ajax call into a
div

-- 

Bastien

Cat, the other other white meat


Re: [PHP] CURL de-bugging: So why am I not getting the results page on the target site?

2008-07-02 Thread ioannes

Thanks Chris and Andrew,

An interesting article here on VIEWSTATE in asp: 
http://www.dotnetjohn.com/articles.aspx?articleid=71 refers to MAC 
encoding using SHA1 or MD5, alternatively Triple DES symmetric 
algorithm.  However, in either event, VIEWSTATE seems to be just what is 
sent by the server which the server expects to receive back unmodified.  
I tried the same input form as on the target server on a test page on my 
site with the action on the form to the target server and that works OK 
to get the results page on the target server.  I have also tested on my 
server that the CURL POST variables are giving sensible inputs like the 
ones that the page would produce on GET.  In the process, I also learned 
that colons in the POST variable names don't need to be changed for HTML 
encoding, spaces in the variable values do need to be, anyway the POST 
variables seem to work OK as I said.  Whatever is or is not being sent 
by the script as opposed to the input form on a test page of my site is 
the difference that I am looking for.  I will try another site see can I 
learn anything in the process.


Oh, and decoding the string as suggested 
(print_r(base64_decode($view_state_string));) gives one value in the 
array and a mixture of English and other characters plus most of the 
page: eg d2Ö8 Version=0.0.0.0, and other 
characters that do not copy to this email etc.  As above, I don't see 
that this is interfering with CURLing the results page if it is simply 
sent back in the post.


John

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



Re: [PHP] URL Rewrite

2008-07-02 Thread Per Jessen
Subhranil wrote:

> 
> Hi All,
> 
> I want to show one URL at browser and content of different URL.
> 


Take a look at apache url rewriting. 


/Per Jessen, Zürich


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



[PHP] URL Rewrite

2008-07-02 Thread Subhranil

Hi All,

I want to show one URL at browser and content of different URL.

Like user can see the URL at address bar like http://localhost/test/home/ 
or http://localhost/test/tech/php/but content of page will be
http://localhost/test/index.php
The URL of the address bar will never change to
http://localhost/test/index.php

Still a  newbie! 

Thanks,
Subhranild.

-- 
View this message in context: 
http://www.nabble.com/URL-Rewrite-tp18233803p18233803.html
Sent from the PHP - General mailing list archive at Nabble.com.


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



Re: [PHP] PHP-CLI and the "less" command (kubuntu)

2008-07-02 Thread Stut

On 2 Jul 2008, at 02:58, Mattias Thorslund wrote:

Hi everyone,

I have a CLI application that produces lots of output to the  
terminal, so I like to send the output along to the "less" command.  
This has always worked very nicely. Moving to the top or bottom of  
the output used to require just hitting the "home" or "end" key, and  
the up and down arrows as well as page up and page down worked nicely.


After upgrading to Hardy on Kubuntu, the behavior changed. Now, it  
seems to preempt the navigation and instead print ugly codes for  
each press on a "navigational key" (one of those mentioned above),  
such as ^[OF. When I press "enter", the desired scroll is executed.  
Scrolling up and down is one thing, but it's particularly a pain  
when trying to search through the output, as it would no longer look  
up previous search arguments.


I thought at first it's a problem with Konsole, my terminal program,  
or with "less" itself. But I've now tried in different terminal  
programs, and reading output other than output from PHP, and the  
ONLY time it happens is when I pipe output from PHP to "less". I  
have added a small test script that exhibits the problem on my  
system. It may work well the first time, but when repeating the same  
command a second time, the "weird" behavior starts.


It could very well be some kind of problem with "less", but since I  
can only reproduce the problem with output from PHP CLI, I thought  
it's worth asking here.


Did something about PHP CLI output change lately?


This has nothing to do with PHP. The keystrokes are processed by less  
so your problem lies there or more likely with the terminal emulation  
you're using. Please try a more relevant list.


-Stut

--
http://stut.net/

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



[PHP] FW: [SPAM] [PHP] FIFO files on PHP?

2008-07-02 Thread Chris Scott
> -Original Message-
> From: Waynn Lue [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 01, 2008 11:06 PM
> To: php-general@lists.php.net
> Subject: [SPAM] [PHP] FIFO files on PHP?
> Importance: Low
> 
> I'm trying to build a queue out using FIFO files (someone on the MySQL
> list suggested checking them out instead of using the database), but
> I'm running into a problem because of the synchronous fwrite call.
> Here's the code:
> 
>   $fifoFile = '/tmp/fifo';
>   if (!file_exists($fifoFile)) {
> posix_mkfifo($fifoFile, 0600);
>   }
>   $fp = fopen($fifoFile, "w");
>   fwrite($fp, "content");
>   fclose($fp);
> 
> But this will block until something actually reads the pipe.  Is there
> any way to write to the pipe, then go away as opposed to waiting until
> something consumes it?  Otherwise, I may just go back to a database
> table.
> 
> Thanks,
> Waynn
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

Fifo nodes are equivalent to a pipe (|) and have no size on the file
system and therefore the write won't finish until some process reads
from the node. See the man page http://linux.die.net/man/7/fifo .


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



[PHP] Session variables disappear (some of them only)

2008-07-02 Thread karma


Hi !

I have a very weird issue since the last Apache upgrade (-> 2.2.8-r3, a month ago), but I'm not sure it is related (well, I'm 
pretty sure it's not).


Like many people, I've written an application that use PHP session variables, like 
$_SESSION["my_variable"].

Sometimes (it doesn't happen all the time), _some_ of these variables are not written in the session file and they are lost 
after a simple header("Location:...); (same domain). The session file is in the right directory (permissions are fine), but some 
of my variables are missing.


The facts :
- Apache 2.2.9 + PHP 5.2.6_rc4 running on a Gentoo (up-to-date)
- all my scripts begin with session_start(). I've tried to add session_write_close() before every header(Location:...) call, it 
doesn't help.
- I didn't change anything in my program (it has been running just fine for 2 years), it just began to fail from time to time (I 
would say 10 times a day). There is no hidden unset() function : it would fail for everyone.

- these variables are all set correctly, and they don't have reserved names.
- only a few variables disappear, but they are always the same ones (could it 
depend on their position in the session file ?!?)
- the session files are very small (max 100ko)
- it seems that it doesn't depend on the browser, but IE6 and IE7 seem to be the most affected ones (it may be because my users 
mostly use these browsers).

- I can't reproduce this issue from my local network (any OS/browser - it would 
be too easy :)
- reverting to the previous stable Apache and/or PHP versions doesn't help.
- I didn't change any php.ini directive.

Any idea ?

Thanks !


PS: if you need more details, just ask. The only thing I can't do is pasting 
the code : the scripts are quite huge.

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