[PHP] AFter the URL in PHP

2004-01-23 Thread Randy Johnson
Hello,

I am not sure if this is a php thing or not but hope is...


I see some sites like this:

www.domain.com/tree

where tree is not a directory

for example 
www.domain.com/tree/   would not work


the word tree above is not really a directory but a username or id or whatever

Anybody know what I am talking about?

Thanks

Randy




[PHP] Using templates (Code & User Interface)

2004-01-23 Thread Hamid Hossain
Hi,

Always I have a problem that I don't know how to make my code away from the 
user interface files.

I tried to use some template classes, but I did'nt like what I tired because 
some if statments are used inside the template.

How can I prepare my code to be working in more that one template? Should I 
use some methodology like FuseBox.org

Regards,
Hamid Hossain
_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail

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


RE: [PHP] what PHP really needs

2004-01-23 Thread Hamid Hossain
As a ColdFusion Certified Developer I can say: You are right!

In CF you can fire a sql statment and store its result in a variable which 
is not going to be removed from the server's memory after responding to the 
user. That variable will be available for sometime declared by you when you 
created the query.

This is usefull, suppose you want to show the last 20 recoreds added to your 
site, you will fire the query once per hour! So, if your site visitors are 
1000 per hour, your transaction to the actual db will be 1 time per hour not 
1000 per hour.

Sounds Greate!

That also has a drawback, you have to be smart enough. You should use this 
feature only if your query is fixed and it should return some limited value. 
For example, you cannot store your search results because each and every 
visitor will use his own key words.

Regards,
Hamid Hossain
Saudi Arabia
Original Message Follows
From: "PHP general" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [PHP] what PHP really needs
Date: Fri, 23 Jan 2004 20:42:59 +0100
There's 1 really important thing missing in PHP as I see it, and it's the
ability to keep variables in memory for as long as
the programmer choose. If this was possible there could be some truly great
optimizations done. Some things are very
slow to create but very fast to work with. I wrote a XML class a couple of
days ago and while it's extremly quick to
search and work with, sadly it's rendered pretty much useless since creating
the tree which it uses isn't fast enough.
I've heard there's a feature like this in Cold Fusion, which every Cold
Fusion user seems to think of  as the holy grail,
and I would have to agree with them.
One thing I've heard they use this for is to load an entire database into
system memory. I don't know exactly how it's
works but imagine having the whole database in system memory. When you
change data you update it both in system
memory and on the drive, but when you select (which is what you mostly do),
you just query the mirror in system memory.
So how cost effective could this be? 1GB of system memory is pretty much
minimum on a decent server today.
Assuming the site generates aprox 1 million bytes worth of data every day
(storing images and other types of massive data
in the tables would perhaps not be apropiate) the site could be up and
runing for 1 thousand days. And if you just keep
tables that gets queried a lot, but doesn't get altered often, you could
most likely come up with a great compromise.
I can't say for sure how much faster things would be but I'm guessing at
several 1000% faster, however I might be way off.
The only drawback I can see is that there might be multi threading issues,
so if this would be implemented a new key word
would probably have to be introduced to make data mutexed, or perhaps the
other way around to avoid to many people
scratching their heads.
/Sebastian Karlsson

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail

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


Re: [PHP] can't figure out this mysql error

2004-01-23 Thread Jason Wong
On Saturday 24 January 2004 01:07, Chris W. Parker wrote:

> on Friday, January 23, 2004 8:54 AM said:
> > All of what you say makes sense. Hopefully your suggestion will help
> > me find the problem!
>
> In looking through my code I see that I already do this. EVERY call to a
> mysql function has "or die($this->stop("$current_line:".__LINE__));"
> along with the call. $this->stop() is method that prints out
> mysql_errno(); and mysql_error();.
>
> In this case the "or die" is not even being tripped meaning there isn't
> an error. I'm beginning to think it's a bug, but it's more likely that
> it's not.
>
> Here's another bit of crazy to throw in. The function I am trying to
> perform is that of adding a record to my db. Guess what? The record
> insertion is successul each time. And no I'm not closing the resource/db
> link before those two functions are called. They happen immediately
> after the the mysql_query() function.
>
> Sounds pretty fishy

Time to put the php debugger in action -- echo all your variables to see that 
contain what you expect them to contain.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
An expert is the person who avoids the small errors while sweeping on to the 
grand fallacy
-- Thoreau's Theories of Adaption n1
*/

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



Re: [PHP] Session time-out value

2004-01-23 Thread Jason Wong
On Saturday 24 January 2004 05:46, Pushpinder Singh wrote:

>I tried to keep a .htaccess file in the Dir that my application
> esided in and kept the session lifetime of about 8 hrs. However I
> checked to see after 2 hr and it had already kicked me out of the
> system. Please advise.

Does your hosting service allow you to use .htaccess files?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
You can't fall off the floor.
*/

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



Re: [PHP] How do you set up table columns for numerals?

2004-01-23 Thread David OBrien
normally auto_increment fields need to be of a number type  not varchar
-Dave
At 11:30 PM 1/23/2004, Freedomware wrote:
Giz wrote:

I looked at your page.  First off, you should add a primary key column that
has no information in it.  Just make this a number(4) called state_id.
OK, I gave it another try, but I don't see where I type in "4."

When I clicked Save, I got an error message: "This is not a number!" but 
it didn't specify what it was referring to.

I put a screenshot online at http://geowebworks.geobop.org/mysql/3.php - 
the last picture on the page. Thanks.

--
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] porting perl scripts to php

2004-01-23 Thread [EMAIL PROTECTED]
Hi,

I was wondering if there is an easy way to port perl scripts to php, or
maybe someone could recommend someone who could help me?

Thanks,
Al

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



Re: [PHP] How do you set up table columns for numerals?

2004-01-23 Thread Freedomware
Giz wrote:

I looked at your page.  First off, you should add a primary key column that
has no information in it.  Just make this a number(4) called state_id.
OK, I gave it another try, but I don't see where I type in "4."

When I clicked Save, I got an error message: "This is not a number!" but 
it didn't specify what it was referring to.

I put a screenshot online at http://geowebworks.geobop.org/mysql/3.php - 
the last picture on the page. Thanks.

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


RE: [PHP] How do you set up table columns for numerals?

2004-01-23 Thread Giz
I looked at your page.  First off, you should add a primary key column that
has no information in it.  Just make this a number(4) called state_id. 
Then you will be able to specify that it's auto_increment.  The problem you
had is that you tried to make a varchar column auto_increment which makes no
sense.  Auto_increment will start at 1 and each time you insert a new row
will assign a unique key = max(state_id)+1

Also any number columns should be number types.  You can apply formatting
(commas separating 100's) when you select the data or present it with php.

As for your other issues, I can't see what the error message was, but when
you are using number types like smallint, you shouldn't specify lengths..
these are implicit in the type.  A smallint for example is 2 bytes. This
means that you have 64k of possible integers that can be stored in there.
What you do want to make sure is that it's unsigned.


-Original Message-
From: Freedomware [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 23, 2004 6:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How do you set up table columns for numerals?

I'm having some roblems creating a table with phpMyAdmin. I think 
they're pretty minor problems, mostly relating to numerals.

Would someone be willing to look at my notes at 
http://geowebworks.geobop.org/mysql/3.php - especially the last picture 
- and suggest what I need to do to fix it?

It's also possible the instructions I'm following are flawed, though 
they look pretty sensible. Here's the last error message I got:

#1064 - You have an error in your SQL syntax.  Check the manual that 
corresponds to your MySQL server version for the right syntax to use 
near '(20), `Area` VARCHAR(6), `Area` SMALLINT(8), `HighestAltitude`

-- 
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] what PHP really needs

2004-01-23 Thread Jason Sheets
Chris Boget wrote:

I'm not really sure and am possibly wa off base but...cant something
like this also be done by using "global" for variables?
   

No, not really.  That wouldn't be accessable by all users, which, as it turns
out, is what the OP had asked for.
Chris

 

Like someone else mentioned using PHP's shared memory functions would 
get you close. 

I prefer to use something like Turck MMCache to cache the compiled php 
script rather than using shared memory.

PHP not making variables accessible to all instances is a feature a lot 
of people depend on, very few PHP programmers seem to unset variables 
when they are done with them unfortunately

If you are wanting to cache information consider serialize like others 
have said, there is very little PHP doesn't already do, if you are 
having a problem attack it from another angle because it is most likely 
you have not designed the best solution to the problem.

It is always best to define the problem before deciding on a solution.

Jason

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


Re: [PHP] Function for crypt and decript.

2004-01-23 Thread Justin French
On Friday, January 23, 2004, at 08:55  PM, 
<[EMAIL PROTECTED]> wrote:

Hi all,
are in PHP, functions for crypt and decrypt string?
I would to use this function in my script in PHP, how can I use this?
I need of an example for use this and a list of this function.
Thanks in advance.
READ THE MANUAL
SEARCH THE MANUAL
I was able to find this page by searching the entire site for 'encrypt' 
in around 10 seconds, and there are more pages to be found.

http://www.php.net/mcrypt

Justin French

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


Re: [PHP] Securing php from rogue php scripts

2004-01-23 Thread David T-G
Adrian, et al --

...and then Adrian Teasdale said...
% 
% Hi there

Hi!


% 
% I have been reading about certain php scripts that, if used incorrectly,
% can compromise servers. There are certain open source scripts that I

Interesting.


% know if (no names mentioned) that have exploits that allow this and I
% want to know if there is a "How to" or best practice anywhere for
% securing PHP against this.  I was told to add some stuff to the php.ini
% file to prevent certain actions (phpinfo ,system, include, chown, chmod,
% exec, passthru, mail, readfile , dir , read, readdir) but was wondering
% if someone could give some advice

1) I'm no expert, though I'd like to be somewhat closer

2) If you're not speaking of safe mode, then look at safe mode

3) Please share what you find to help others, including me.


% 
% 
% Thanks
% 
% Ade


TIA & HTH & HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


[PHP] How do you set up table columns for numerals?

2004-01-23 Thread Freedomware
I'm having some roblems creating a table with phpMyAdmin. I think 
they're pretty minor problems, mostly relating to numerals.

Would someone be willing to look at my notes at 
http://geowebworks.geobop.org/mysql/3.php - especially the last picture 
- and suggest what I need to do to fix it?

It's also possible the instructions I'm following are flawed, though 
they look pretty sensible. Here's the last error message I got:

#1064 - You have an error in your SQL syntax.  Check the manual that 
corresponds to your MySQL server version for the right syntax to use 
near '(20), `Area` VARCHAR(6), `Area` SMALLINT(8), `HighestAltitude`

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


RE: [PHP] Importing Text into Database - Can you recommend a tutorial?

2004-01-23 Thread Giz
CSV just stands for comma separate values.  CSV support is pretty common as
a way of moving data between applications, and most all spreadsheets support
it.  It's just a text file like this:

Value1,value2,value3

Sometimes you might have a string delimiter like so:

Value1,value2,"string 1 here",value3


-Original Message-
From: Freedomware [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 23, 2004 5:23 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Importing Text into Database - Can you recommend a
tutorial?

Jay Blanchard wrote,

"Ooops, sorry. Google for 'import CSV into MySQL' or hit the MySQL web
site"

Humberto Silva wrote:

> You can pick the headers from the speadsheets to construct the tables,
> export from the spreadsheets to .csv and import it to the new tables

Wow, thanks for the tips. I wasn't even aware of CSV - something that 
will be very useful for me.

-- 
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] "Additional Features for working with linked Tables have been deactivated."

2004-01-23 Thread Freedomware
It looks like all the databases I view with phpMyAdmin feature the 
following error message:

"The additional Features for working with linked Tables have been 
deactivated. To find out why click here."

When I click the link, I get this:

Database mysql  running on localhost
$cfg['Servers'][$i]['pmadb'] ...not OK [ Documentation ]
$cfg['Servers'][$i]['relation'] ... not OK [ Documentation ]
General relation features: Disabled
$cfg['Servers'][$i]['table_info'] ...   not OK [ Documentation ]
Display Features: Disabled
$cfg['Servers'][$i]['table_coords'] ... not OK [ Documentation ]
$cfg['Servers'][$i]['pdf_pages'] ...not OK [ Documentation ]
Creation of PDFs: Disabled
$cfg['Servers'][$i]['column_info'] ...  not OK [ Documentation ]
Displaying Column Comments: Disabled
Bookmarked SQL-query: Disabled
MIME ...not OK [ Documentation ]
$cfg['Servers'][$i]['history'] ...  not OK [ Documentation ]
SQL-history: Disabled
Rather than troubleshoot all seven of these, can you see any evidence of 
a central problem that might be causing it? Or is there some way to work 
around it?

Thanks.

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


RE: [PHP] Why we love Microsoft (0t)

2004-01-23 Thread Robin Kopetzky
> Microsoft's lawyers probably could've handled it more tactfully, but
> they were required to take action.

Simple solution to a complex problem - Follow William Shakespeare's outlook
or the joke 'What's a thousand lawyers at the bottom of the ocean called? -
A good start...'

Robin 'Sparky' Kopetzky
Black Mesa Computers/Internet Service
Grants, NM 87020

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



Re: [PHP] what PHP really needs

2004-01-23 Thread John W. Holmes
Justin Patrin wrote:

Then you could use a serialized file in the filesystem that any app can 
read. For added speed, make a RAM-disk and store the file there. Slight 
overhead deserializing, but it's likely faster than recreating whatever 
it is (if it's large).
Then you've still got to worry about concurrency issues. Just reading 
the file isn't any good if you can't update the variables when 
appropriate. So that means the script needs to lock the file between 
reading, updating, and writing.

Like Chris said, though, this has been discussed before and Google 
likely has some possible solutions.

--
---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] Re: Why we love Microsoft (0t)

2004-01-23 Thread Freedomware
Ryan A wrote:

Hey all,
heres something really interesting about that lovely company called
microsoft...(heard of them?)
Anyway, a 17yr old kid by the name of Mike Rowe opens up a webdesigning
company and names
it MikeRoweSoft . . . a couple of days later he gets an email from microsoft's
lawyers to hand over the
domain for 10$...he refuses and says no way, how about 10,000? a couple of
days later he gets
a legal document of around 25 pages from the lawyers!! They are going after
him extortion!!
I have some thoughts about Microsoft. First, I don't go along with the 
argument that Microsoft is just protecting its coypright, tradename, 
etc. Sheez, this is the company that thinks it owns the rights to the 
word WINDOWS. (Let's hope they don't bring out more security flaws 
packaged as software named Doors, Ashtray, etc.) The key word here is 
PARODY. For examples, visit some political sites.

Even if Mike Rowe WAS stepping on Microsoft's toes, so what? Microsoft 
deserves it.

I worked for the Seattle School District for about sixteen years. I was 
horrified by the corruption in the district (which I later discovered 
afflicts Seattle in general) and began speaking out. One day I even 
decided to run for a seat on the Seattle School Board.

I was astounded when I received my first computer virus ever, on the day 
of the election, from a well known affiliate of the Seattle 
Times/Seattle Weekly/Microsoft who said he was sending it to me on 
behalf of Bill Gates Senior! It wiped out all the jpgs on my computer 
and came with the message, "It just goes to show, you can never be too 
careful."

It was especially amazing, because, at that time, I wasn't even a 
Microsoft critic; I was too focused on education issues. But that was a 
powerful piece of evidence to support what I know now: That Bill Gates 
effectively controls the Seattle School District (and everything else in 
 Seattle). Last year, Gates' partner in crime, Paul Allen, bankrolled a 
charter school initiative. This yeare, Gates is the most powerful 
charter school supporter. But these creeps don't give a damn about kids; 
it's just business for them.

Anyway, I heard through the grapevine that Bill Gates wanted to get rid 
of a bunch of teachers, and I wondered what trick they'd come up with 
for accomplishing that deed. They basically exploited the bad economy, 
then claimed they had simply lost more than $30 million dollars, then 
said, "Gee, we're going to have to let some people go."

That's how I lost my job, more than two years ago.

Sending me a computer virus was not a smart thing to do. Most people 
would have been intimidated. But if Gates had done a little research on 
me, he would have discovered that dirty tricks like that only make me 
angrier - and I go for the jugular. Losing my job doesn't make me any 
happier, but screwing children is WAY over the line. As far as I'm 
concerned, it's all war, all the time.

My latest present for Mr. Gates is taking shape at 
http://www.freedomware.us/ And he'll get yet another gift if I decide to 
run for public office again this year - state office this time around.

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


RE: [PHP] Why we love Microsoft (0t)

2004-01-23 Thread E. Stuart Hicks
Oops.  Make that 'there *aren't* many other collective groups...'.  My
typing's a bit off today.


-Original Message-
From: E. Stuart Hicks [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 23, 2004 6:26 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Why we love Microsoft (0t)

Between Amazon.com, SCO, UCITA, the Microsoft antitrust case, and many other
'incidents' thus far, there are many other collective groups of people that
understand trademark and copyright law better than us geeks.  Our field is
growing fast and promises to be lucrative as it matures and redefines large
parts of society as we know it.  Therefore, obviously, everyone and their
f-ing brother is trying to get in on the ground floor by *whatever means
necessary*.

Customer stupidity in things like being unable to distinguish between
Microsoft and MikeRoweSoft is hardly grounds for the kind of legal warfare
we're seeing today and would never hold up in most other sections of the
business world.  Many (probably most) of the people making these important
legal decisions for the technology community have no idea how technology
works and, therefore, aren't qualified to make these decisions.  (Reference
the whole 'one-click purchasing' concept that Amazon owns.)

Mike Rowe and his little business may not be all that important on the large
scale of things EXCEPT for the fact that it's setting a dangerous precedent
for future cases.  If Microsoft wins in the end, you can be damn sure
they'll bring the whole precedent concept up next time they chase after
someone.  

Stu


-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 23, 2004 6:14 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Why we love Microsoft (0t)

jon wrote:

> I'm not sure if it's obvious to you geeks, but for those who don't know
> trademark law, you need to defend your trademark or it falls into the
> public domain. Hence, if Canon's copiers refer to how well they xerox,
> then it's a problem. (Same way for Jello, Kleenex, etc...)
> 
> Microsoft's lawyers probably could've handled it more tactfully, but
> they were required to take action.
> 
>   -- jon

Great, just what I need, someone to give this geek (me) a clue.

-- 
By-Tor.com
It's all about the Rush
http://www.by-tor.com

-- 
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] Why we love Microsoft (0t)

2004-01-23 Thread E. Stuart Hicks
Between Amazon.com, SCO, UCITA, the Microsoft antitrust case, and many other
'incidents' thus far, there are many other collective groups of people that
understand trademark and copyright law better than us geeks.  Our field is
growing fast and promises to be lucrative as it matures and redefines large
parts of society as we know it.  Therefore, obviously, everyone and their
f-ing brother is trying to get in on the ground floor by *whatever means
necessary*.

Customer stupidity in things like being unable to distinguish between
Microsoft and MikeRoweSoft is hardly grounds for the kind of legal warfare
we're seeing today and would never hold up in most other sections of the
business world.  Many (probably most) of the people making these important
legal decisions for the technology community have no idea how technology
works and, therefore, aren't qualified to make these decisions.  (Reference
the whole 'one-click purchasing' concept that Amazon owns.)

Mike Rowe and his little business may not be all that important on the large
scale of things EXCEPT for the fact that it's setting a dangerous precedent
for future cases.  If Microsoft wins in the end, you can be damn sure
they'll bring the whole precedent concept up next time they chase after
someone.  

Stu


-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 23, 2004 6:14 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Why we love Microsoft (0t)

jon wrote:

> I'm not sure if it's obvious to you geeks, but for those who don't know
> trademark law, you need to defend your trademark or it falls into the
> public domain. Hence, if Canon's copiers refer to how well they xerox,
> then it's a problem. (Same way for Jello, Kleenex, etc...)
> 
> Microsoft's lawyers probably could've handled it more tactfully, but
> they were required to take action.
> 
>   -- jon

Great, just what I need, someone to give this geek (me) a clue.

-- 
By-Tor.com
It's all about the Rush
http://www.by-tor.com

-- 
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] Why we love Microsoft (0t)

2004-01-23 Thread John Nichel
jon wrote:

I'm not sure if it's obvious to you geeks, but for those who don't know
trademark law, you need to defend your trademark or it falls into the
public domain. Hence, if Canon's copiers refer to how well they xerox,
then it's a problem. (Same way for Jello, Kleenex, etc...)
Microsoft's lawyers probably could've handled it more tactfully, but
they were required to take action.
	-- jon
Great, just what I need, someone to give this geek (me) a clue.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Why we love Microsoft (0t)

2004-01-23 Thread jon
I'm not sure if it's obvious to you geeks, but for those who don't know
trademark law, you need to defend your trademark or it falls into the
public domain. Hence, if Canon's copiers refer to how well they xerox,
then it's a problem. (Same way for Jello, Kleenex, etc...)

Microsoft's lawyers probably could've handled it more tactfully, but
they were required to take action.

-- jon



-Original Message-
From: Ryan A [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 23, 2004 2:01 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Why we love Microsoft (0t)


Hey all,
heres something really interesting about that lovely company called
microsoft...(heard of them?)

Anyway, a 17yr old kid by the name of Mike Rowe opens up a webdesigning
company and names it MikeRoweSoft (say it out loud..if you're really
daft not to get it just be reading it)..then registers
mikerowesoft.com...a couple of days later he gets an email from
microsoft's lawyers to hand over the domain for 10$...he refuses and
says no way, how about 10,000? a couple of days later he gets a legal
document of around 25 pages from the lawyers!! They are going after him
extortion!!

Read the whole thing at mikerowesoft.com its pretty amusing, gives a
totally new meaning to scumbags, sons of bitches and cheap
bastards...oops, hope i dont get sued for saying that.

Now that the whole story has gotten so much publicity, microsofts exec's
say they "could have handled it better" and "its gotten a bit out of
hand" and "they never intended for this to blow up so big".

I think it would be good if MicroSoft joins hands with the RIAA and
search for kids aged between 12 and 17 they can sue as the older ones
might be a little harder. (case you didnt get the above, the RIAA sued a
12 year old girl for dl'ing music, google for that)

In closing, I hope (and am cheering) that Mike Rowe kicks Micro's ass.

Cheers,
-Ryan

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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.564 / Virus Database: 356 - Release Date: 1/19/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.564 / Virus Database: 356 - Release Date: 1/19/2004
 

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



Re: [PHP] what PHP really needs

2004-01-23 Thread Justin Patrin
John W. Holmes wrote:

From: "Chris Boget" <[EMAIL PROTECTED]>

[snip]

[/snip]
Learn and use C++
Or sessions.
Along with serialize() and deserialize(), all are your friends in this
case.

He's talking about the same set of data being available to all instances of
PHP, though. I think they're called Application Variables. So if I set
$instance=1 as an application variable, any other PHP script that runs can
read that value. I imagine the same thing could be done with an object.
Either that or I'm way off base. It does sound useful, but I see how it
could be overused and abused.
---John Holmes...
Then you could use a serialized file in the filesystem that any app can 
read. For added speed, make a RAM-disk and store the file there. Slight 
overhead deserializing, but it's likely faster than recreating whatever 
it is (if it's large).

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


Re: [PHP] pass by reference

2004-01-23 Thread Justin Patrin
Kevin Waterson wrote:

This one time, at band camp, Tom Rogers <[EMAIL PROTECTED]> wrote:



php can output the stream without having to save it to a file first if
that is what is worrying you.


That was sorta my concern, but not so much as a file, does it copy to
memory anywhere, or, is it a direct stream to the browser?
Well, you're making a few copies doing it through PHP. Or possibly just 
one. When PHP fetches it from the DB, it's stored in a variable (and the 
data *may* be stored in an intermediate form by the PHP internals, but I 
certainly don't know for sure. My gut says that it is, though.).  Then 
you output it to the browser.

Yes, this is somewhat inefficient, but the only way I can think of to 
make it more efficient would be to make the images files and have the 
webserver send them directly. I suppose this terraserver might be able 
to "stream" the data as it gets it from the DB server, but it's still 
makign a copy. It just happens to be very small pieces of the image, 
outputted as they get to the server. While this is kinda cool, it seems 
a bit too far to go for normal applications. If you're worried this much 
about speed, you shouldn't be storing the images in the DB in the first 
place. Storing them as files will nearly always be faster than any other 
method (unless you've cached them in RAM somehow ;-).

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


Re: [PHP] Why we love Microsoft (0t)

2004-01-23 Thread Ryan A
Hey,
I totally disagree, this does not disgust me just because this guy is 17, it
would even if a 40yr old *millionaire*
went through the same thing, I would think it wrong
For example,
I firmly believe that a farmer growing and selling apples it totally within
his rights to have a website apple.tld
where he can advertise and sell his apples.

This guy didnt change his name to "Mike Rowe" or make it intentionally, he
got that name from his family, its
spelled totally different from "M i c r o S o f t " and he is even selling
different products compared to MS,
which in this day and age is hard to do coz they are in every damn thing.

I see there are other domains in question that MS is trying to take down,
which is understandable...eg:
micorosoft, microosoft etc ...their arguement being that consumers will get
confused, if you look at the
two last examples you can understand why, but you would have to be one of
the dumbest inbred
hillibillies to think that MicroSoft and MikeRoweSoft are spelled similarly.

Now for the RIAA bloodsuckers, right now they are going after Kazaa, true,
but not everyone uses that
program, spyware being on of the reasons, they go in for kazaalite (same as
kazaa, no spyware) found at
http://home.hccnet.nl/h.edskes/mirror.htm
http://doa2.host.sk

a lot of the other links/sites have been taken down
but personally _IF_ I were a music dl'er I would use something like
kazaalite, blogster, dc++, direct connect,
winMX etc as they are much better. Very unlikely that the RIAA scumbags will
try to buy all these companies
as more would just pop up.

CNN: Music downloading is on the rise after the RIAA starts sueing by 6% OCT
and 7% NOV (i couldnt find
stats for months after that)

Oh, BTH, I myself use windows (2000 pro)

Cheers,
-Ryan


>
> Well
> there's also the small fact that under US copyright law if a company
> doesn't
> enforce its rights over said copyright, they lose the right to use
> it exclusively.  Take a look at Kleenex - they failed to take steps to
> protect their name and now all tissue paper is known as Kleenex.
>
> If you step back and look at the situation from another angle - what if
> this 17yr kid was a 34yr old guy in a basement and what if Microsoft were
>
> Red Hat or SuSE or Debian or some company that alot of ppl

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



[PHP] PHP script to help write documentation (not from source, though!!)

2004-01-23 Thread John W. Holmes
Hi all. Does anyone know of any good programs to help write documentation?
I'm not looking for things like phpdoc that read/parse the comments of the
source code and create documentation, though.

I'm looking for something to help me write something like the MySQL manual
with chapter, images, links, etc, all numbered and formatted automatically.
Export to HTML file(s) is ideal.

I've checked out MaxgDoc (http://docs.maxg.info/index.php?script=1) which
looks nice, may be a little bloated, and has a XSS vulnerability in it's
search. So right off the bat you wonder how good the code is.

I've also looked at PHP Doc System
(http://www.alexking.org/index.php?content=software/phpdocsystem/content.php
) which looks nice, clean, and simple. I'll play with that one later on to
see if it's useful.

If anyone has any other suggestions, please let me know.

John Holmes...

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



[PHP] Question about PEAR::raiseError use in XML_RPC client

2004-01-23 Thread Luis Cruz
Greetings; I recently grabbed the latest source for XML_RPC from CVS for use with a 
project I am working on.  I grabbed the latest source rather than the stable build 
mainly because it includes a handy base class that defines a raiseError method.  
However, I am puzzled by own thing.  XML_RPC_Base::raiseError calls PEAR::raiseError 
but does not return the resulting object; no error handler has been set either.

Am I overlooking how the PEAR_Error object created by PEAR::raiseError would be 
propagated back to the caller?  It seems like the error would go undetected if not 
returned.


class XML_RPC_Base {
function raiseError($msg, $code)
{
include_once 'PEAR.php';
PEAR::raiseError(get_class($this) . ": " . $msg, $code);
}
}

---
Luis A. Cruz <[EMAIL PROTECTED]>
Web Project Manager
Astaro 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.566 / Virus Database: 357 - Release Date: 1/22/2004
 

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



Re: [PHP] Why we love Microsoft (0t) - JELLO

2004-01-23 Thread Ben Ramsey
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
As a humorous sidenote, I meant to say: let's hope that Windows (a
registered trademark brand of Microsoft) doesn't get to the level of
name recognition where the consumer refers to all graphical desktops as
"Windows."  ;-)
Roger Spears wrote:

| Another big one is Jello
|
| It's a brand if I'm not mistakenthe product is gelatin
|
| Jello brand gelatin
|
| but all forms of pudding and gelatin are sometimes referred to as Jello...
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFAEZn1IcIs3CP5DxwRAmPmAKC2S9i6wVyADenOoyjgu60DMr6CAACfWlan
M9QFo74/dGo+hXejNtJzmZY=
=KppL
-END PGP SIGNATURE-
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Why we love Microsoft (0t) - JELLO

2004-01-23 Thread Roger Spears
Another big one is Jello

It's a brand if I'm not mistakenthe product is gelatin

Jello brand gelatin

but all forms of pudding and gelatin are sometimes referred to as Jello...

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


[PHP] HEAD method in PHP 4.1.2

2004-01-23 Thread Lucas Gonze
Hello PHP world,

I need to fetch headers via a HEAD request.  This is doable via context 
options as of PHP 5.0.0, but the PHP on this server is 4.1.2.  
Upgrading PHP is not an option.

Does anybody know a way to do this?  I realize I can write my own HTTP 
client requests, but doing a good job with that a different thing.

Thanks in advance.

- Lucas Gonze

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


Re: [PHP] Why we love Microsoft (0t)

2004-01-23 Thread Ben Ramsey
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Copyright and trademark are two wholly separate things.  The
Kimberly-Clark Corporation has a registered trademark on the name and
logo for Kleenex.  Thus, no one else has a right to use the word
"Kleenex" to describe their product.  That, however, doesn't stop the
consumer from calling all facial tissues "Kleenex."  It does stop other
companies from referring to their facial tissues as "Kleenex."  Take a
look at a box of tissue paper that isn't a Kleenex brand.  You'll notice
that it does not call itself Kleenex but, most likely, "facial tissues."
Consumers are the ones taking companies' trademarks and using them to
describe other brands of products.  This does not mean that the company
is not protecting its trademarks, and Kimberly-Clark has not lost the
right to use Kleenex exclusively.  This just means that the company has
excellent brand recognition.  Other brands that have this same level of
recognition include Coke, Tylenol, Tupperware, etc.
- -Ben

Tim Thorburn wrote:
| Well there's also the small fact that under US copyright law if a
| company doesn't enforce its rights over said copyright, they lose the
| right to use it exclusively.  Take a look at Kleenex - they failed to
| take steps to protect their name and now all tissue paper is known as
| Kleenex.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFAEZiAIcIs3CP5DxwRAuJIAJwMnyTrKYIHDSDRtsmRezkTeXZDAgCgo/kv
gsAKDNnUf7vkggJOiMizVZY=
=bLBa
-END PGP SIGNATURE-
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Session time-out value

2004-01-23 Thread Pushpinder Singh
Hello All,

  I tried to keep a .htaccess file in the Dir that my application 
esided in and kept the session lifetime of about 8 hrs. However I 
checked to see after 2 hr and it had already kicked me out of the 
system. Please advise.

Thanks in advance
Pushpinder Singh
On Friday, January 23, 2004, at 02:45 PM, John Nichel wrote:

John W. Holmes wrote:

If you just change the session.save_path variable for one site on 
your
box to something like /tmp/onesite, do you still have to write your 
own
garbage routine?  Wont the autamatic php garbage collection know to 
only
cleanup sessions in the /tmp/onesite directory?
Is the garbage collection triggered with local values or global 
values? I
though I remembered reading somewhere that if you implemented your own
save_path by any means, you had to also implement your own garbage
collection. I can't find where it says that anywhere now, so maybe 
it's
changed (or never existed).
I would imagine it'd have to be triggered with global values for 
security
reasons. Otherwise I could change the lifetime to 1 second and 
generate a
bunch of traffic to my site and delete everyones session files after 1
second of inactivity.
---John Holmes...
I think you're correct.  I seem to remember that if you change the 
session save path (give it a local value), you have to handle your own 
garbage.  I have my own garbage collection routine, and I don't think 
I would have written one if I didn't have too.  hehe

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
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] Why we love Microsoft (0t)

2004-01-23 Thread Tim Thorburn
At 04:00 PM 1/23/2004, you wrote:
Hey all,
heres something really interesting about that lovely company called
microsoft...(heard of them?)
Anyway, a 17yr old kid by the name of Mike Rowe opens up a webdesigning
company and names
it MikeRoweSoft (say it out loud..if you're really daft not to get it just
be reading it)..then registers
mikerowesoft.com...a couple of days later he gets an email from microsoft's
lawyers to hand over the
domain for 10$...he refuses and says no way, how about 10,000? a couple of
days later he gets
a legal document of around 25 pages from the lawyers!! They are going after
him extortion!!
Well there's also the small fact that under US copyright law if a company 
doesn't enforce its rights over said copyright, they lose the right to use 
it exclusively.  Take a look at Kleenex - they failed to take steps to 
protect their name and now all tissue paper is known as Kleenex.

If you step back and look at the situation from another angle - what if 
this 17yr kid was a 34yr old guy in a basement and what if Microsoft were 
Red Hat or SuSE or Debian or some company that alot of ppl don't 
hate.  Clearly this kid knew what he was doing - prolly had no malicious 
intent, but knew that he was using a similar sounding name for his personal 
company.

If the emotion is taking out of the equation - then it would seem right 
that the company enforced its rights on someone who may or may not have 
been impeding on their registered works.

Not that I'm a huge MS person or anything - in fact I've spent the last few 
weeks converting 3 sites from ASP/Access to PHP/MySQL ... just seems they 
automatically are painted to be the bad guy without due consideration.

Now as for the RIAA - these kids could not have handled their situation in 
a worse way.  Suing everyone in sight might sound like a good idea behind 
closed doors ... but c'mon now.  They would have been much more effective 
to realize that consumers would rather have music readily available - make 
an effort to buy Kazaa (since thats the one P2P they seem to be going after 
the most) and setup a monthly fee based service.  They would have made a 
killing, kept their monies coming in (which only serve to make sure that 
the execs have a shiny new Jag for each day of the week - the artists 
themselves make little to nothing from the studios - the majority of their 
income comes from merchandising and concert tours).

But enough for this week :P  

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


Re: [PHP] Why we love Microsoft (0t)

2004-01-23 Thread Ryan A
> Can I hijack an OT thread?
NO, you may not. May you get boils and blisters all over your body for doing
so and
burn in hell for 300 years.

Hehe, just kidding,  I dont mind but if you do it to some of the others here
they might
not like it.

>..then your professor may grade it.  Of course, they save
> every paper that is ever submitted...for future comparisons of the same
> topic.
>
> Isn't this making money off of someone else's work?

True, but unless someone like you gets totally pissed with them and decides
to go the extra mile(s)
to make your own site and this into a free serviceI dont see this going
away anytime soon.

> The university I attend uses turnitin.com and
> I've pitched a fit on
> several occasions about using them.

"United we standdivided we get f***ed" , dont pitch your arguement
alone...try getting others
involved as I am sure lots of students must be as ticked off as you.

> Perhaps we (the students) should sue turnitin.com for making $$$ off of
> our hard work

Worth a try, but according to their site, they are storing stuff in digital
fingerprints in some way and
not the actual documents in full, plus are not really selling your ideas (so
they say) just verifying them.
And most importantly, they state they are following the law "to the letter"
in copyright and other stuff.
It would be a tough case, and getting a lawyer (however low and greedy) to
fight this for you would
be tough.


Just my $0.2

Cheers,
-Ryan

> Ryan A wrote:
>
> > Hey all,
> > heres something really interesting about that lovely company called
> > microsoft...(heard of them?)
> >
> > Anyway, a 17yr old kid by the name of Mike Rowe opens up a webdesigning
> > company and names
> > it MikeRoweSoft (say it out loud..if you're
> really daft not to get it just
> > be reading it)..then registers
> > mikerowesoft.com...a couple of days later he gets an email from
> microsoft's
> > lawyers

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



Re: [PHP] Why we love Microsoft (0t)

2004-01-23 Thread Brian V Bonini
On Fri, 2004-01-23 at 16:00, Ryan A wrote:
> Hey all,
> heres something really interesting about that lovely company called
> microsoft...(heard of them?)
> 

Remarkable isn't it, I saw that article a few days ago.

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



Re: [PHP] what PHP really needs

2004-01-23 Thread Chris Boget
> I'm not really sure and am possibly wa off base but...cant something
> like this also be done by using "global" for variables?

No, not really.  That wouldn't be accessable by all users, which, as it turns
out, is what the OP had asked for.

Chris

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



Re: [PHP] what PHP really needs

2004-01-23 Thread Ryan A
Hey,
I'm not really sure and am possibly wa off base but...cant something
like this also be done by
using "global" for variables?

Cheers,
-Ryan

On 1/23/2004 9:33:55 PM, John W. Holmes ([EMAIL PROTECTED]) wrote:
> From: "Chris Boget" <[EMAIL PROTECTED]>
>
> > >>[snip]
> > >>
> > >>[/snip]
> > >Learn and use C++
> >
> > Or sessions.
> > Along with serialize() and deserialize(), all are your friends in this
> case.
>
> He's talking about the same set of data being available to all instances
of
> PHP, though. I think they're
> called Application Variables. So if I set
> $instance=1 as an application variable, any other PHP script that runs
> can
> read that value. I imagine the same thing could be done with an object.
>
>
> Either that or I'm way off base. It does sound useful, but I see how it
> could be overused and abused.
>
> ---John Holmes...
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

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



[PHP] Why we love Microsoft (0t)

2004-01-23 Thread Ryan A
Hey all,
heres something really interesting about that lovely company called
microsoft...(heard of them?)

Anyway, a 17yr old kid by the name of Mike Rowe opens up a webdesigning
company and names
it MikeRoweSoft (say it out loud..if you're really daft not to get it just
be reading it)..then registers
mikerowesoft.com...a couple of days later he gets an email from microsoft's
lawyers to hand over the
domain for 10$...he refuses and says no way, how about 10,000? a couple of
days later he gets
a legal document of around 25 pages from the lawyers!! They are going after
him extortion!!

Read the whole thing at mikerowesoft.com its pretty amusing, gives a totally
new meaning to
scumbags, sons of bitches and cheap bastards...oops, hope i dont get sued
for saying that.

Now that the whole story has gotten so much publicity, microsofts exec's say
they "could have
handled it better" and "its gotten a bit out of hand" and "they never
intended for this to blow up
so big".

I think it would be good if MicroSoft joins hands with the RIAA and search
for kids aged between
12 and 17 they can sue as the older ones might be a little harder.
(case you didnt get the above, the RIAA sued a 12 year old girl for dl'ing
music, google for that)

In closing, I hope (and am cheering) that Mike Rowe kicks Micro's ass.

Cheers,
-Ryan

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



Re: [PHP] what PHP really needs

2004-01-23 Thread Chris Shiflett
--- "John W. Holmes" <[EMAIL PROTECTED]> wrote:
> He's talking about the same set of data being available to all
> instances of PHP, though. I think they're called Application Variables.

Yes, this is what he was talking about, which I think most people seem to
have misunderstood to be something else.

This type of question usually comes about because of the fundamental
differences between ColdFusion and PHP. Specifically, I use PHP as an
Apache moduke, so I'm using mod_php. I'm bound to Apache's behavior, since
I'm just adding features to Apache.

ColdFusion is a separate process, cfserver, and it talks to the Web server
over a socket. While this does have drawbacks due to the added overhead,
it also allows for a few extra features (application variables, ColdFusion
Administrator, etc.).

Still, for anyone who thinks application variables are great, search
Google for PHP application variables, and you'll find a plethera of
solutions that offer exactly that.

Hope that helps.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security Handbook
 Coming mid-2004
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] Segmentation fault problem

2004-01-23 Thread E. Stuart Hicks
Didn't help.  I did, however, narrow it down to one line, though.



This consistently crashes PHP with a seg fault.

Stu


-Original Message-
From: E. Stuart Hicks [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 23, 2004 11:46 AM
To: 'Martin Luethi'; [EMAIL PROTECTED]
Subject: RE: [PHP] Segmentation fault problem

Interesting.  Well, ulimit replies 'unlimited' so I guess that's not the
problem.  I do have an older version of PCRE, though, so we'll see if
upgrading from 4.3 to 4.5 and then rebuilding the module helps.

Stu


-Original Message-
From: Martin Luethi [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 23, 2004 5:34 AM
To: [EMAIL PROTECTED]
Cc: E. Stuart Hicks
Subject: RE: [PHP] Segmentation fault problem

the function who is causing the seg fault is preg_match_all

maybe this helps (http://bugs.php.net/bug.php?id=20698):
[28 Nov 2002 6:26am EST] thingol at mail dot ru
If the text for preg_match_all is bigger than some value, many regexp
constructions causes php to terminate.

This code crashes php (on win32 only):


[28 Nov 2002 7:06am EST] [EMAIL PROTECTED]
Not really a PHP bug; bug is in the PCRE library itself
and is because you are asking it to capture a very large
number of individual character matches.
Increasing your stack size might help (ulimit).

g. martin luethi


Thu, 22 Jan 2004 14:20:56 -0500 "E. Stuart Hicks" <[EMAIL PROTECTED]>:

> Please disregard my last post - I'd switched Apache back from the debug
> module for the night and forgotten to turn it back on.
>
> I've attached the full trace but here's the main part:
>
> (gdb) print (char
> *)(executor_globals.function_state_ptr->function)->common.function_name
> $4 = 0x7bb69250 "preg_match_all"
> (gdb) frame 8
> #8  0x7baeabe4 in execute (op_array=0x1003a07d0) at
> /root/build/php-4.3.4/Zend/zend_execute.c:1660
> 1660
> zend_execute(EG(active_op_array) TSRMLS_CC);
> (gdb) frame 9
> #9  0x7baeabe4 in execute (op_array=0x1003af0c0) at
> /root/build/php-4.3.4/Zend/zend_execute.c:1660
> 1660
> zend_execute(EG(active_op_array) TSRMLS_CC);
> (gdb) frame 10
> #10 0x7baeabe4 in execute (op_array=0x10038f230) at
> /root/build/php-4.3.4/Zend/zend_execute.c:1660
> 1660
> zend_execute(EG(active_op_array) TSRMLS_CC);
> (gdb) frame 11
> #11 0x7bacde24 in zend_execute_scripts (type=8, retval=0x0,
> file_count=3)
> at /root/build/php-4.3.4/Zend/zend.c:884
> 884 zend_execute(EG(active_op_array)
TSRMLS_CC);
> (gdb) frame 12
> #12 0x7ba6dd08 in php_execute_script
> (primary_file=0x7fffef20)
> at /root/build/php-4.3.4/main/main.c:1729
> 1729retval = (zend_execute_scripts(ZEND_REQUIRE
> TSRMLS_CC, NULL, 3, prepend_file_p, primary_file, append_file_p) ==
> SUCCESS);
>
>
> Stu
>
>
> -Original Message-
> From: E. Stuart Hicks [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 22, 2004 2:07 PM
> To: 'Martin Luethi'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Segmentation fault problem
>
> I still can't access anything on bugs.php.net so I'm not sure exactly what
> you need.  I grabbed all of the execute() frames, though, and ran that
print
> function and got this:
>
> (gdb) print (char
> *)(executor_globals.function_state_ptr->function)->common.function_name
> Attempt to extract a component of a value that is not a structure.
> (gdb) frame 6
> #6  0x7babef00 in execute () from /home/httpd/modules/libphp4.so
> (gdb) frame 7
> #7  0x7babf244 in execute () from /home/httpd/modules/libphp4.so
> (gdb) frame 8
> #8  0x7babf244 in execute () from /home/httpd/modules/libphp4.so
> (gdb) frame 9
> #9  0x7babf244 in execute () from /home/httpd/modules/libphp4.so
> (gdb) frame 10
> #10 0x7babf244 in execute () from /home/httpd/modules/libphp4.so
>
> Does this help?
>
> Stu
>
>
> -Original Message-
> From: Martin Luethi [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 22, 2004 2:24 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Segmentation fault problem
>
> each php function is executed by the internal function "execute()"
> please include the details about this frames also (configure php with
> --enable-debug first) e.g.:
> (gdb) frame 6
> output...
> (gdb) print (char *)(executor_globals.function_state_ptr->function)-
>> common.function_name
> output...
>
> with this information you can see which php-command causing the seg fault
> -> http://bugs.php.net/bugs-generating-backtrace.php
>
> g. martin luethi
>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x7bacedcc in zend_parse_arg_impl (arg=0x1003853c0,
>> va=0x7ffe3a88, spec=0x7ffe3a58)
>> at /root/build/php-4.3.4/Zend/zend_API.c:259
>> 259 *p =
> Z_LVAL_PP(arg);
>> (gdb) bt
>> #0  0x7bacedcc in zend_parse_arg_impl (arg=0x1003853c0,
>> va=0x7ffe3a88, spec=0x7ffe3a58)
>> at /root/build/php-4.3.4/Zend/zend_API.c:259
>> #1  

RE: [PHP] what PHP really needs

2004-01-23 Thread Marlon Moyer
> -Original Message-
> From: PHP general
> Sent: Friday, January 23, 2004 1:43 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] what PHP really needs
> 
> 
> I've heard there's a feature like this in Cold Fusion, which every 
> Cold Fusion user seems to think of  as the holy grail, and I would 
> have to agree with them.

[Marlon Moyer]
ColdFusion allows you to store variables in several different scopes
including Session, Application, and Server.  You already know session
variables.  Application variables only exist within a specified application
and can have a timeout specified.  Server variables can be accessed by all
applications on that server.

> 
> One thing I've heard they use this for is to load an entire database 
> into system memory. I don't know exactly how it's works but imagine 
> having the whole database in system memory. When you change data you 
> update it both in system memory and on the drive, but when you select 
> (which is what you mostly do), you just query the mirror in system 
> memory.
> 
[Marlon Moyer]
I've never seen anyone load an entire database into the application scope
but it is common practice to load small queries that deal with the
application into the application scope.  For example, I have a calendar that
allows you to choose only certain dates.  These dates are in a table and can
be modified 1 or 2 times a week.  Instead of the application hitting the
database everytime, I store the query in an application variable.

> 
> The only drawback I can see is that there might be multi threading 
> issues, so if this would be implemented a new key word would probably 
> have to be introduced to make data mutexed, or perhaps the other way 
> around to avoid to many people scratching their heads.
> 
[Marlon Moyer]
You do have to account for race conditions, but I'd gladly deal with those
and still have the convenience of application variables.


> /Sebastian Karlsson
> 
> --
> 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] Apology (Re: what PHP really needs)

2004-01-23 Thread Chris W. Parker
John Nichel 
on Friday, January 23, 2004 12:30 PM said:

> Seems I struck a cord with some of the people on this mailing list
> with my Cold Fussion, ASP/.NET comment.  I forgot to put my little
> smirk ;) after the comment.  To those that I offended, I'm sorry. 
> Just a FYI though, it's in my contract that I must hack on the MS
> people at least once a day. ;)

Were they comments like "My grandmother swears by VBScript! Are you
saying my poor grandma sucks??!"

People are so sensitive these days. Did anyone threaten to sue for lack
of sensitivity on your part?

Good grief.



Chris.

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



Re: [PHP] Apology (Re: what PHP really needs)

2004-01-23 Thread Clint Tredway
Hey, no biggie.. MS people should get hacked at least once a day... :)

John Nichel wrote:

Seems I struck a cord with some of the people on this mailing list 
with my Cold Fussion, ASP/.NET comment.  I forgot to put my little 
smirk ;) after the comment.  To those that I offended, I'm sorry.  
Just a FYI though, it's in my contract that I must hack on the MS 
people at least once a day. ;)

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


[PHP] Re: XML to PDF with XSL

2004-01-23 Thread Ammar Ibrahim
If this is Possible, Please Tell me, i'm also very interested in this.
Or if you know any method to 'find and replace' a string in a PDF file
please also tell me

e.g, i want to replace all occurnces of [name] with "John" From a PDF file
on the server, when i open it ofcourse it won't have [name] as name, it
encodes it.

Regards

"Aidan Lister" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Is this possible?
>
> I'm purely interested in PHP5 examples of transforming an XML file into
PDF
> using an XSL stylesheet.
>
> Thanks.

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



Re: [PHP] what PHP really needs

2004-01-23 Thread John W. Holmes
From: "Chris Boget" <[EMAIL PROTECTED]>

> >>[snip]
> >>
> >>[/snip]
> >Learn and use C++
>
> Or sessions.
> Along with serialize() and deserialize(), all are your friends in this
case.

He's talking about the same set of data being available to all instances of
PHP, though. I think they're called Application Variables. So if I set
$instance=1 as an application variable, any other PHP script that runs can
read that value. I imagine the same thing could be done with an object.

Either that or I'm way off base. It does sound useful, but I see how it
could be overused and abused.

---John Holmes...

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



[PHP] Apology (Re: what PHP really needs)

2004-01-23 Thread John Nichel
Seems I struck a cord with some of the people on this mailing list with 
my Cold Fussion, ASP/.NET comment.  I forgot to put my little smirk ;) 
after the comment.  To those that I offended, I'm sorry.  Just a FYI 
though, it's in my contract that I must hack on the MS people at least 
once a day. ;)

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Suggestion on executing external programs from within php

2004-01-23 Thread Jas
Using system in this manner may work for small scripts/programs that 
only need authentication of the webserver.  But for something like 
restarting a service I use a shell script run as a cron job then just 
call a system("touch /path/to/temp/file") which the cronjob looks at to 
see if it should restart a service.

just 2 cents
Jas
Ammar Ibrahim wrote:

maybe if you put Call1 and Call2 in seprate PHP files, and you call both of
them. i guess it would work
Ammar
"John Clegg" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi

I would like to be able to execute 2 system calls simultaneously. I am
not interested in the output and I would like to do the equivalent of a
fork as these programs take a long time.
eg

system('/usr/local/bin/process_file file1');
system('/usr/local/bin/process_file file2');
Any suggestions on what to use???

Cheers

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


Re: [PHP] what PHP really needs

2004-01-23 Thread Mike Migurski
>>> There's 1 really important thing missing in PHP as I see it, and it's
>>> the ability to keep variables in memory for as long as the programmer
>>> choose. If this was possible there could be some truly great
>>> optimizations done. Some things are very slow to create but very fast
>>> to work with. I wrote a XML class a couple of days ago and while it's
>>> extremly quick to search and work with, sadly it's rendered pretty
>>> much useless since creating the tree which it uses isn't fast enough.
>
>Sessions?

Sessions or cache files stored on a mount point mapped to RAM, even.
If you want to go that far.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



Re: [PHP] what PHP really needs

2004-01-23 Thread John Nichel
> On Fri, 2004-01-23 at 12:42, PHP general wrote:
>
>> There's 1 really important thing missing in PHP as I see it, and 
it's the
>> ability to keep variables in memory for as long as
>> the programmer choose. If this was possible there could be some 
truly great
>> optimizations done. Some things are very
>> slow to create but very fast to work with. I wrote a XML class a 
couple of
>> days ago and while it's extremly quick to
>> search and work with, sadly it's rendered pretty much useless since 
creating
>> the tree which it uses isn't fast enough.

Sessions?

>> I've heard there's a feature like this in Cold Fusion, which every Cold
>> Fusion user seems to think of  as the holy grail,
>> and I would have to agree with them.
Of course, Cold Fusion 'programmers' are only one step above Microsoft 
ASP/.NET 'programmers.

>> One thing I've heard they use this for is to load an entire database 
into
>> system memory. I don't know exactly how it's
>> works but imagine having the whole database in system memory. When you
>> change data you update it both in system
>> memory and on the drive, but when you select (which is what you 
mostly do),
>> you just query the mirror in system memory.

Great if you're the only one hitting the db, and it's on the same 
machine.  What happens when I have 15 webservers accessing the same 
database across 5 mirrored machines, and an update is made to one of my 
products?  If I'm only reading from what was loaded up in memory, I miss 
the update.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] what PHP really needs

2004-01-23 Thread Ray Hunter
You can use shared memory too...only on *nix flavors though.

--
Ray

On Fri, 2004-01-23 at 12:42, PHP general wrote:
> There's 1 really important thing missing in PHP as I see it, and it's the
> ability to keep variables in memory for as long as
> the programmer choose. If this was possible there could be some truly great
> optimizations done. Some things are very
> slow to create but very fast to work with. I wrote a XML class a couple of
> days ago and while it's extremly quick to
> search and work with, sadly it's rendered pretty much useless since creating
> the tree which it uses isn't fast enough.
> 
> I've heard there's a feature like this in Cold Fusion, which every Cold
> Fusion user seems to think of  as the holy grail,
> and I would have to agree with them.
> 
> One thing I've heard they use this for is to load an entire database into
> system memory. I don't know exactly how it's
> works but imagine having the whole database in system memory. When you
> change data you update it both in system
> memory and on the drive, but when you select (which is what you mostly do),
> you just query the mirror in system memory.
> 
> So how cost effective could this be? 1GB of system memory is pretty much
> minimum on a decent server today.
> Assuming the site generates aprox 1 million bytes worth of data every day
> (storing images and other types of massive data
> in the tables would perhaps not be apropiate) the site could be up and
> runing for 1 thousand days. And if you just keep
> tables that gets queried a lot, but doesn't get altered often, you could
> most likely come up with a great compromise.
> 
> I can't say for sure how much faster things would be but I'm guessing at
> several 1000% faster, however I might be way off.
> 
> The only drawback I can see is that there might be multi threading issues,
> so if this would be implemented a new key word
> would probably have to be introduced to make data mutexed, or perhaps the
> other way around to avoid to many people
> scratching their heads.
> 
> /Sebastian Karlsson


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



Re: [PHP] Re: simple ?- load page after submit

2004-01-23 Thread John Nichel
Matt Hedges wrote:
John,

yes, it's from an auto incremement field in MySQL

the id comes from a new db entry...

i really appreciate your help,
Matt
Please reply to the group, and not just me.  This way, other people who 
may have the same problem can find the answer in the archives.

If it's from a new database entry, set your id right after you run your 
insert query.  Something like

if ( @mysql_query ( "INSERT." ) ) {
$id = @mysql_insert_id();
}
- Original Message - 
From: "John Nichel" <[EMAIL PROTECTED]>
Matt Hedges wrote:


That doesn't work... I think the problem may be because I don't have the
id

defined anywhere in the code (but it automatically writes it to MySQL).
Huh?  Is this from an auto increment field in MySQL...when a new user
signs-up?

When I put the code below, I get a "can't send header" error.
You have to use the header() function BEFORE any output is sent to the
browser...or you could buffer the output.

I tried changing the echo to page, but the
page brings up page.php?id=  (id = nothing).
Where is 'id' coming from?  A form post?  New db entry?  Existing db
entry?
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] what PHP really needs

2004-01-23 Thread Chris Boget
>>[snip]
>>
>>[/snip]
>Learn and use C++

Or sessions.  
Along with serialize() and deserialize(), all are your friends in this case.

Chris

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



RE: [PHP] what PHP really needs

2004-01-23 Thread Jay Blanchard
[snip]

[/snip]

Learn and use C++

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



Re: [PHP] Session time-out value

2004-01-23 Thread John Nichel
John W. Holmes wrote:

If you just change the session.save_path variable for one site on your
box to something like /tmp/onesite, do you still have to write your own
garbage routine?  Wont the autamatic php garbage collection know to only
cleanup sessions in the /tmp/onesite directory?


Is the garbage collection triggered with local values or global values? I
though I remembered reading somewhere that if you implemented your own
save_path by any means, you had to also implement your own garbage
collection. I can't find where it says that anywhere now, so maybe it's
changed (or never existed).
I would imagine it'd have to be triggered with global values for security
reasons. Otherwise I could change the lifetime to 1 second and generate a
bunch of traffic to my site and delete everyones session files after 1
second of inactivity.
---John Holmes...

I think you're correct.  I seem to remember that if you change the 
session save path (give it a local value), you have to handle your own 
garbage.  I have my own garbage collection routine, and I don't think I 
would have written one if I didn't have too.  hehe

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Suggestion on executing external programs from within php

2004-01-23 Thread Ammar Ibrahim
maybe if you put Call1 and Call2 in seprate PHP files, and you call both of
them. i guess it would work

Ammar
"John Clegg" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi
>
> I would like to be able to execute 2 system calls simultaneously. I am
> not interested in the output and I would like to do the equivalent of a
> fork as these programs take a long time.
>
> eg
>
> system('/usr/local/bin/process_file file1');
> system('/usr/local/bin/process_file file2');
>
> Any suggestions on what to use???
>
> Cheers
>
> John Clegg

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



[PHP] what PHP really needs

2004-01-23 Thread PHP general
There's 1 really important thing missing in PHP as I see it, and it's the
ability to keep variables in memory for as long as
the programmer choose. If this was possible there could be some truly great
optimizations done. Some things are very
slow to create but very fast to work with. I wrote a XML class a couple of
days ago and while it's extremly quick to
search and work with, sadly it's rendered pretty much useless since creating
the tree which it uses isn't fast enough.

I've heard there's a feature like this in Cold Fusion, which every Cold
Fusion user seems to think of  as the holy grail,
and I would have to agree with them.

One thing I've heard they use this for is to load an entire database into
system memory. I don't know exactly how it's
works but imagine having the whole database in system memory. When you
change data you update it both in system
memory and on the drive, but when you select (which is what you mostly do),
you just query the mirror in system memory.

So how cost effective could this be? 1GB of system memory is pretty much
minimum on a decent server today.
Assuming the site generates aprox 1 million bytes worth of data every day
(storing images and other types of massive data
in the tables would perhaps not be apropiate) the site could be up and
runing for 1 thousand days. And if you just keep
tables that gets queried a lot, but doesn't get altered often, you could
most likely come up with a great compromise.

I can't say for sure how much faster things would be but I'm guessing at
several 1000% faster, however I might be way off.

The only drawback I can see is that there might be multi threading issues,
so if this would be implemented a new key word
would probably have to be introduced to make data mutexed, or perhaps the
other way around to avoid to many people
scratching their heads.

/Sebastian Karlsson

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



Re: [PHP] Session time-out value

2004-01-23 Thread John Nichel
John W. Holmes wrote:

From: "John Nichel" <[EMAIL PROTECTED]>

php_value session.gc_maxlifetime "number of seconds"


I'm really curious to see if any of this really works. I know it _should_,
but...
Assuming a shared/virtual server where all session files for all sites are
in the same location. When the garbage collector is triggered by a request
to the site with this setting in .htaccess, does it honor this setting for
all of the files? It doesn't know which ones were created just for this
site, right? So if another site has the default setting (no .htaccess) and a
request to that site triggers garbage collection, will this site's files be
deleted if they are more than 1440 (default) seconds old?
I realize you can set your own storage location (recommended), but you'll
also then have to implement your own garbage collection routine. If you have
to implement your own routine, then changing session.gc_maxlifetime doesn't
make much sense as you're going to code it into your routine anyhow...
Anyone want to comment on this? :)

---John Holmes...
Interesting question.  I guess it depends on how time is kept for the 
session files, and if the lifetime is somehow written to the file?  When 
the garbage collection runs, does it just take the global lifetime value 
into account, or does it 'look' at every file to see what the lifetime 
should be for that file?

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Test

2004-01-23 Thread Ammar Ibrahim
Test Message

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



[PHP] Re: file download using header (SOLVED)

2004-01-23 Thread Joshua Minnie
I found the solution, I ended up instead of using readfile, use fopen and
fpassthru.  Here is the code that solved the problem


> Okay, I found a solution to part one of my questions by changing my
headers,
> but for some reason I am still getting a fractional download of the file.
> Most commonly it's about 16.6KB of a 4MB file. The kicker is it says that
it
> completed successfully.
>
> Here is the modified code:
>  $download = 'url/path/to/file'.urldecode( $_GET['link'] );
> $type = urldecode( $_GET['type'] );
> $size = filesize( '/abs/path/to/file'.urldecode( $_GET['link'] ) );
> header("Pragma: public");
> header("Expires: 0"); // set expiration time
> header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
> // browser must download file from server instead of cache
> // force download dialog
> header("Content-Type: application/force-download");
> header("Content-Type: application/octet-stream");
> header("Content-Type: application/download");
> // use the Content-Disposition header to supply a recommended filename
> and
> // force the browser to display the save dialog.
> header("Content-Disposition: attachment;
> filename=".basename($download).";");
> /*
> The Content-transfer-encoding header should be binary, since the file
> will be read
> directly from the disk and the raw bytes passed to the downloading
> computer.
> The Content-length header is useful to set for downloads. The browser
> will be able to
> show a progress meter as a file downloads. The content-lenght can be
> determines by
> filesize function returns the size of a file.
> */
> header("Content-Transfer-Encoding: binary");
> header("Content-Length: ".(string)($size));
> readfile("$download");
> ?>
>
> > I am having some trouble making it possible to download a file using the
> > header function.  The problems are: (1) I get the dialog box to download
> the
> > file, but for some reason the type of file isn't getting passed to the
> box,
> > and (2) when I download a 4MB file it only seems to be getting 16.6KB.
> >
> > I haven't used header for this purpose before this, so maybe I am
missing
> > something.  I Googled around and found the content-disposition type I
> > thought I needed, I actually tried 3 different types (the file is a
> > compressed zip file).  I Googled around for tutorials on downloading
files
> > and still haven't found the answer to correcting my problem.  Here is
the
> > code I am using, maybe a couple more trained eyes looking at this could
> help
> > me out.
> >
> >  > $download = 'http://www.usa-financial.com'.urldecode(
$_GET['link'] );
> > $type = urldecode( $_GET['type'] );
> > $size = filesize( '/home2/www/usa-financial'.urldecode(
> > $_GET['link'] ) );
> > header("Content-type: $type");
> > header("Content-Disposition: attachment; filename=$download;");
> > header("Accept-Ranges: bytes");
> > header("Content-Length: $size");
> >
> > echo "\n";
> > ?>
> >
> > Josh

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



Re: [PHP] Ques: Conflicting functions in two include files.

2004-01-23 Thread Chris Shiflett
--- Robert Cummings <[EMAIL PROTECTED]> wrote:
> IMHO encapsulating functions in objects provides decent namespacing
> functionality. I can't really see a large need beyond what classes
> provide. True that then there's still an issue with class names, but
> that's less frequent a collision.

I think most people agree with you (this is PEAR's approach, after all),
but I have never been a fan of using classes solely for the purpose of
solving potential collision problems. Namespaces are one of the very few
things that I find myself wanting in PHP.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security Handbook
 Coming mid-2004
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] Session time-out value

2004-01-23 Thread John W. Holmes
> If you just change the session.save_path variable for one site on your
> box to something like /tmp/onesite, do you still have to write your own
> garbage routine?  Wont the autamatic php garbage collection know to only
> cleanup sessions in the /tmp/onesite directory?

Is the garbage collection triggered with local values or global values? I
though I remembered reading somewhere that if you implemented your own
save_path by any means, you had to also implement your own garbage
collection. I can't find where it says that anywhere now, so maybe it's
changed (or never existed).

I would imagine it'd have to be triggered with global values for security
reasons. Otherwise I could change the lifetime to 1 second and generate a
bunch of traffic to my site and delete everyones session files after 1
second of inactivity.

---John Holmes...

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



[PHP] IE corrupts JPEG at HTML upload, imagecreatefromjpeg() doesn't work after upload

2004-01-23 Thread Torsten Roehr
Hi there,

I am experiencing a strange problem with IE 5.0 while uploading a JPEG file.
Somehow IE changes/corrupts the file so that imagecreatefromjpeg() doesn't
work after the upload and triggers an error. If I upload the picture with
Opera 7.22 or Mozilla everything is fine.

Client is Windows (98SE, 2000) and server is Linux/Apache 1.3.

Any help appreciated! Big thanks in advance!


Best regards,

Torsten Roehr

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



[PHP] Access Violation at 77FCC61F?

2004-01-23 Thread Ben Ramsey
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Anyone know what this error means:

PHP has encountered an Access Violation at 77FCC61F

I'm running PHP 5.0 beta 3 on IIS 5.0 on a Win2K machine.  I received
the above error message multiple times after changing addslashes($value)
to str_replace("'", "''", $value) in my code.  Scripts would not run;
all I would get is that message.  This occured on all pages.
Then, I restarted IIS, and it works just fine.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFAEWaUIcIs3CP5DxwRAn/AAJ41XgmkZ5dVkA9viFiLIVnYI81UogCfVVki
shIGH2JTovkjshK59nqqtQ0=
=gHoh
-END PGP SIGNATURE-
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Session time-out value

2004-01-23 Thread Matt Matijevich

I'm really curious to see if any of this really works. I know it
_should_,
but...

Assuming a shared/virtual server where all session files for all sites
are
in the same location. When the garbage collector is triggered by a
request
to the site with this setting in .htaccess, does it honor this setting
for
all of the files? It doesn't know which ones were created just for
this
site, right? So if another site has the default setting (no .htaccess)
and a
request to that site triggers garbage collection, will this site's
files be
deleted if they are more than 1440 (default) seconds old?


Interesting question.  I dont know the answer.  From the manual it
looks like php garbage collection (at least on filesystems that are not
FAT) uses atime to determine how long to keep sessions around.  So, in a
shared envirenment, how would other websites know what the timeout of
another website on that same box be would be?


I realize you can set your own storage location (recommended), but
you'll
also then have to implement your own garbage collection routine. If you
have
to implement your own routine, then changing session.gc_maxlifetime
doesn't
make much sense as you're going to code it into your routine anyhow...


If you just change the session.save_path variable for one site on your
box to something like /tmp/onesite, do you still have to write your own
garbage routine?  Wont the autamatic php garbage collection know to only
cleanup sessions in the /tmp/onesite directory?

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



Re: [PHP] Ques: Conflicting functions in two include files.

2004-01-23 Thread Robert Cummings
On Fri, 2004-01-23 at 12:02, Chris Shiflett wrote:
> --- Al <[EMAIL PROTECTED]> wrote:
> > I have a page that calls functions from two different include files.  
> > Unfortunately, some of the functions have the same name; but are 
> > slightly different. 
> > 
> > I know I can change the names of the conflicting functions; but, that
> > is a bit of a chore.
> 
> I think this is exactly what you'll have to do. This is a direct result of
> the lack of namespacing in PHP, which is one of the valid complaints
> against it, although it does help to keep the syntax a bit simpler.

IMHO encapsulating functions in objects provides decent namespacing
functionality. I can't really see a large need beyond what classes
provide. True that then there's still an issue with class names, but
that's less frequent a collision.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



RE: [PHP] drop downs

2004-01-23 Thread Vail, Warren
If you are looking for something to plagiarize, I would start with;

http://www.hotscripts.com/JavaScript/Scripts_and_Programs/index.html

and there is always google to find other sources.

good luck,

Warren Vail


-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Friday, January 23, 2004 9:59 AM
To: Mark Luquette; php-gen
Subject: Re: [PHP] drop downs


From: "Mark Luquette" <[EMAIL PROTECTED]>

> I am migrating  a site that used cold fusion.
>
> It used a mouseover feature that dropped a
> box with links that responded to additional
> mouseover features.
> This is not a right side down arrow form like box.
>
> Any php scripts that do this ?

That is a client side effect. PHP is server side and has no control over
things like this. Use Javascript/DHTML, etc.

---John Holmes...

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

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



Re: [PHP] drop downs

2004-01-23 Thread John W. Holmes
From: "Mark Luquette" <[EMAIL PROTECTED]>

> I am migrating  a site that used cold fusion.
>
> It used a mouseover feature that dropped a
> box with links that responded to additional
> mouseover features.
> This is not a right side down arrow form like box.
>
> Any php scripts that do this ?

That is a client side effect. PHP is server side and has no control over
things like this. Use Javascript/DHTML, etc.

---John Holmes...

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



Re: [PHP] Session time-out value

2004-01-23 Thread John W. Holmes
From: "John Nichel" <[EMAIL PROTECTED]>

> php_value session.gc_maxlifetime "number of seconds"

I'm really curious to see if any of this really works. I know it _should_,
but...

Assuming a shared/virtual server where all session files for all sites are
in the same location. When the garbage collector is triggered by a request
to the site with this setting in .htaccess, does it honor this setting for
all of the files? It doesn't know which ones were created just for this
site, right? So if another site has the default setting (no .htaccess) and a
request to that site triggers garbage collection, will this site's files be
deleted if they are more than 1440 (default) seconds old?

I realize you can set your own storage location (recommended), but you'll
also then have to implement your own garbage collection routine. If you have
to implement your own routine, then changing session.gc_maxlifetime doesn't
make much sense as you're going to code it into your routine anyhow...

Anyone want to comment on this? :)

---John Holmes...

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



[PHP] drop downs

2004-01-23 Thread Mark Luquette
I am migrating  a site that used cold fusion.

It used a mouseover feature that dropped a box with links that responded to additional 
mouseover features.
This is not a right side down arrow form like box.

Any php scripts that do this ?

Thanks,

Mark L.

Re: [PHP] Session time-out value

2004-01-23 Thread John Nichel
Pushpinder Singh wrote:

Actually the user is only allowed to get to any page if he has logged 
on. Thus all the remaining pages check to see if a session has been 
registered, if so then the person is allowed to to go on with his 
session. If the session did not exist he is redirected to a login page.

Do you still suggest that I should touch all pages. or it will suffice 
to change only the first page. Also if I were to create a .htaccess file 
that is kept in the same dir as the application, what do I need to 
include in that file ?
I would probably be best to do it for everytime session_start is called, 
as I'm not 100% sure it only needs to be done once.  If you put it in a 
.htaccess file, you shouldn't have to do anythingmore than likely, 
your webserver is already configured to use .htaccess.  The syntax for 
that should be...

php_value session.gc_maxlifetime "number of seconds"

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Session time-out value

2004-01-23 Thread Matt Matijevich

Also if I were to create a .htaccess 
file that is kept in the same dir as the application, what do I need to

include in that file ?


something like:

 php_value session.gc_maxlifetime 25000

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



[PHP] Re: file download using header

2004-01-23 Thread Joshua Minnie
Okay, I found a solution to part one of my questions by changing my headers,
but for some reason I am still getting a fractional download of the file.
Most commonly it's about 16.6KB of a 4MB file. The kicker is it says that it
completed successfully.

Here is the modified code:


> I am having some trouble making it possible to download a file using the
> header function.  The problems are: (1) I get the dialog box to download
the
> file, but for some reason the type of file isn't getting passed to the
box,
> and (2) when I download a 4MB file it only seems to be getting 16.6KB.
>
> I haven't used header for this purpose before this, so maybe I am missing
> something.  I Googled around and found the content-disposition type I
> thought I needed, I actually tried 3 different types (the file is a
> compressed zip file).  I Googled around for tutorials on downloading files
> and still haven't found the answer to correcting my problem.  Here is the
> code I am using, maybe a couple more trained eyes looking at this could
help
> me out.
>
>  $download = 'http://www.usa-financial.com'.urldecode( $_GET['link'] );
> $type = urldecode( $_GET['type'] );
> $size = filesize( '/home2/www/usa-financial'.urldecode(
> $_GET['link'] ) );
> header("Content-type: $type");
> header("Content-Disposition: attachment; filename=$download;");
> header("Accept-Ranges: bytes");
> header("Content-Length: $size");
>
> echo "\n";
> ?>
>
> Josh

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



Re: [PHP] Session time-out value

2004-01-23 Thread Pushpinder Singh
Actually the user is only allowed to get to any page if he has logged 
on. Thus all the remaining pages check to see if a session has been 
registered, if so then the person is allowed to to go on with his 
session. If the session did not exist he is redirected to a login page.

Do you still suggest that I should touch all pages. or it will suffice 
to change only the first page. Also if I were to create a .htaccess 
file that is kept in the same dir as the application, what do I need to 
include in that file ?

Thanks
Pushpinder
On Friday, January 23, 2004, at 12:13 PM, John Nichel wrote:

Pushpinder Singh wrote:

Thanks much John,
 I have about 8 different pages that are all session linked. Do I 
have to add this ini_set() at the beginning of all the 
session_start() calls on all these pages.
You should only have to do it for the first time session_start() is 
called, but not knowing where a person might enter your site, it would 
be best to do it for all of them.  Another option is to put the 
ini_set(), session_start(), and anything else which needs to be 
called/set across multiple pages, in a configuration file, and just 
require that file in your pagesthis way, you only have to make 
changes in one place.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
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: simple ?- load page after submit

2004-01-23 Thread Katie Dewees
Matt Hedges wrote:

> When I put the code below, I get a "can't send header" error.
>
> I tried changing the echo to page, but
> the page brings up page.php?id=  (id = nothing).


If it says it can't send the headers, that means that headers have already
been outputted. PHP automatically sends headers before anything is printed
to the page. In other words, make sure that you put your header() call
before any echo statements on the page.

Not having the id value is a different problem. If you've just inserted
something and need to get it out, there are functions to retrieve the most
recent auto-increment value from the database. If you're using MySQL it is
mysql_insert_id().

Katie Dewees
Web Developer/PHP Programmer
[EMAIL PROTECTED]
http://www.evans-young.com

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



Re: [PHP] Re: simple ?- load page after submit

2004-01-23 Thread John Nichel
Matt Hedges wrote:

That doesn't work... I think the problem may be because I don't have the id
defined anywhere in the code (but it automatically writes it to MySQL).
Huh?  Is this from an auto increment field in MySQL...when a new user 
signs-up?

When I put the code below, I get a "can't send header" error.
You have to use the header() function BEFORE any output is sent to the 
browser...or you could buffer the output.

I tried changing the echo to page, but the
page brings up page.php?id=  (id = nothing).
Where is 'id' coming from?  A form post?  New db entry?  Existing db entry?

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] How do I regain the ability to create databases

2004-01-23 Thread Chris W. Parker
Freedomware 
on Friday, January 23, 2004 3:19 AM said:

> HOWEVER, it said the better method was to type in either "http" or (I
> can't remember the second choice offhand). I think I did it on line
> 133 (see below.

Just to clarify. The difference between the two methods is that in the
case where you specify your username/password within the config file,
phpMyAdmin will use that data to connect to the db REGARDLESS of who
accesses the phpMyAdmin url. If you put the mysql root username/password
in there you'll give root access to anyone that knows the url.

On the other hand if you choose http and leave the username/password
blank you force the person trying to use phpMyAdmin to enter a valid
username and password each time they try to use it. And of course this
includes you too.

Also the http setting is being ignored because you've defined a
username/password within the config file. I imagine that when it's
loading it's first page and doing it's checks it sees that you've got
those values defined and it just skips the other part because it's not
even worth thinking about (the http part that is).



HTH,
Chris.

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



Re: [PHP] Session time-out value

2004-01-23 Thread John Nichel
Pushpinder Singh wrote:

Thanks much John,

 I have about 8 different pages that are all session linked. Do I have 
to add this ini_set() at the beginning of all the session_start() calls 
on all these pages.
You should only have to do it for the first time session_start() is 
called, but not knowing where a person might enter your site, it would 
be best to do it for all of them.  Another option is to put the 
ini_set(), session_start(), and anything else which needs to be 
called/set across multiple pages, in a configuration file, and just 
require that file in your pagesthis way, you only have to make 
changes in one place.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Session time-out value

2004-01-23 Thread Matt Matijevich

  I have about 8 different pages that are all session linked. Do I have

to add this ini_set() at the beginning of all the session_start() calls

on all these pages.


Not 100% sure, but I think if you dont add ini_set() before all of your
session_start() calls, session.gc_maxlifetime would get set back to the
default value.

Is this on apache? you could just drop it in a htaccess file, that way
you dont have to change any php code.

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



[PHP] Re: simple ?- load page after submit

2004-01-23 Thread Matt Hedges
That doesn't work... I think the problem may be because I don't have the id
defined anywhere in the code (but it automatically writes it to MySQL).

When I put the code below, I get a "can't send header" error.

I tried changing the echo to page, but the
page brings up page.php?id=  (id = nothing).


any suggestions?
thanks
matt


"Matt Hedges" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> I've built a page where someone can enter in their information...
> currently, when they hit submit, a screen comes back and says "thanks for
> entering your info.  (echo "Thank you! Information entered.\n";)"
>
> I want when they hit submit for it to take them to their page
> (personalpage.php?id=$id)...
>
> How do I do this?
>
>
> thanks,
> Matt

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



[PHP] php4apache.dll - compiled version with -DEAPI

2004-01-23 Thread Baudin JF
Hi,

I'm looking for a compiled version of php4apache.dll for win32 with
the -DEAPI option. Can you tell me where i can find it for download ?

Thanks

Jeff

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



RE: [PHP] can't figure out this mysql error

2004-01-23 Thread Chris W. Parker
Chris W. Parker <>
on Friday, January 23, 2004 8:54 AM said:

> All of what you say makes sense. Hopefully your suggestion will help
> me find the problem!

In looking through my code I see that I already do this. EVERY call to a
mysql function has "or die($this->stop("$current_line:".__LINE__));"
along with the call. $this->stop() is method that prints out
mysql_errno(); and mysql_error();.

In this case the "or die" is not even being tripped meaning there isn't
an error. I'm beginning to think it's a bug, but it's more likely that
it's not.

Here's another bit of crazy to throw in. The function I am trying to
perform is that of adding a record to my db. Guess what? The record
insertion is successul each time. And no I'm not closing the resource/db
link before those two functions are called. They happen immediately
after the the mysql_query() function.

Sounds pretty fishy



Chris.

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



Re: [PHP] Session time-out value

2004-01-23 Thread Pushpinder Singh
Thanks much John,

 I have about 8 different pages that are all session linked. Do I have 
to add this ini_set() at the beginning of all the session_start() calls 
on all these pages.

Thanks again and I am sorry if my question sounded lame.

Pushpinder Singh

On Friday, January 23, 2004, at 11:49 AM, John Nichel wrote:

Pushpinder Singh wrote:

Thanks John,
 I dont have rights t change this value for my webserver. I only want 
this value to be changed for my application. Is there a way to take 
care of this ? Thanks again !!
Pushpinder
Before you call session_start()

ini_set ( "session.gc_maxlifetime", "number of seconds" );

http://us3.php.net/ini_set

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
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] Ques: Conflicting functions in two include files.

2004-01-23 Thread Chris Shiflett
--- Al <[EMAIL PROTECTED]> wrote:
> I have a page that calls functions from two different include files.  
> Unfortunately, some of the functions have the same name; but are 
> slightly different. 
> 
> I know I can change the names of the conflicting functions; but, that
> is a bit of a chore.

I think this is exactly what you'll have to do. This is a direct result of
the lack of namespacing in PHP, which is one of the valid complaints
against it, although it does help to keep the syntax a bit simpler.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security Handbook
 Coming mid-2004
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] sessions not registering inside a function.

2004-01-23 Thread Jarratt Ingram
Thank you John, 

I did manage to get it working by calling global $AuthUser after i ran
the function on the main page and it seems to have resolved the issue. 

have a good weekend 
J

On Fri, 2004-01-23 at 16:38, John W. Holmes wrote:
> From: "Jarratt Ingram" <[EMAIL PROTECTED]>
> 
> > I have created a login system, which works as expected on php 4.2. When
> > i was asked to move it onto an older server using 4.0.6, the system
> > stopped registering sessions.
> >
> > main page:
> >  >
> > function login($username, $password){
> > global $HTTP_SESSION_VARS;
> > session_register('AuthUser');
> > $HTTP_SESSION_VARS['AuthUser'] = $username;
> >
> > This code was modified to backdate it to version 4.0.6, and now it wont
> > register the session. Is it because its inside the function, or to do
> > with the older version of php?
> >
> > If i move it out of the function the session gets registered correctly.
> 
> I think you're registering a variable that only has a scope within the
> function. Try adding a "global $AuthUser;" after "global
> $HTTP_SESSION_VARS;"
> 
> ---John Holmes...

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



Re: [PHP] Ques: Conflicting functions in two include files.

2004-01-23 Thread John Nichel
Al wrote:

I have a page that calls functions from two different include files.  
Unfortunately, some of the functions have the same name; but are 
slightly different.
I know I can change the names of the conflicting functions; but, that is 
a bit of a chore.
Is it possible to control from which include file the functions are used?
I tried putting the include statement just before the function call, 
hoping the server would replace the functions with the new include.  I'm 
using include_once.  It didn't work.
include_once() is not going to let another include "overwrite" function 
names.

I tried putting the include file with the function call inside of a 
function.  Didn't work, still executed the functions stated at the top 
of the page.
Any suggestions?

Rename the functions, and save yourself the headaches down the road.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] can't figure out this mysql error

2004-01-23 Thread Chris W. Parker
Jason Wong 
on Thursday, January 22, 2004 8:49 PM said:

> The if-clause will never be evaluated because if there had been an
> error your program would have dieded on the previous line.

Heh.. yeah I thought about that as I was examining the code for this
post. But thanks for confirming.

> I'm sure if php tells you it's invalid you can bet your *** it's
> invalid! Check for errors and report with mysql_error() after _each_
> and _every_ call to the mysql_* functions.

All of what you say makes sense. Hopefully your suggestion will help me
find the problem!



Thanks,
Chris.

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



Re: [PHP] simple ?- load page after submit

2004-01-23 Thread Matt Matijevich

Or, correctly:

header("Location: http://www.yourdomain.com/personalpage.php?id=$id";);



to add to what john said, you could make it a little easier to move
your script from place to place if you use some php variables and the
dirname function.

this comes right from the manual:

http://"; . $_SERVER['HTTP_HOST']
 . dirname($_SERVER['PHP_SELF'])
 . "/" . $relative_url);
?> 

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



[PHP] Ques: Conflicting functions in two include files.

2004-01-23 Thread Al
I have a page that calls functions from two different include files.  
Unfortunately, some of the functions have the same name; but are 
slightly different. 

I know I can change the names of the conflicting functions; but, that is 
a bit of a chore. 

Is it possible to control from which include file the functions are used? 

I tried putting the include statement just before the function call, 
hoping the server would replace the functions with the new include.  I'm 
using include_once.  It didn't work.

I tried putting the include file with the function call inside of a 
function.  Didn't work, still executed the functions stated at the top 
of the page. 

Any suggestions?

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


Re: [PHP] Session time-out value

2004-01-23 Thread John Nichel
Pushpinder Singh wrote:

Thanks John,

 I dont have rights t change this value for my webserver. I only want 
this value to be changed for my application. Is there a way to take care 
of this ? Thanks again !!

Pushpinder
Before you call session_start()

ini_set ( "session.gc_maxlifetime", "number of seconds" );

http://us3.php.net/ini_set

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Segmentation fault problem

2004-01-23 Thread E. Stuart Hicks
Interesting.  Well, ulimit replies 'unlimited' so I guess that's not the
problem.  I do have an older version of PCRE, though, so we'll see if
upgrading from 4.3 to 4.5 and then rebuilding the module helps.

Stu


-Original Message-
From: Martin Luethi [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 23, 2004 5:34 AM
To: [EMAIL PROTECTED]
Cc: E. Stuart Hicks
Subject: RE: [PHP] Segmentation fault problem

the function who is causing the seg fault is preg_match_all

maybe this helps (http://bugs.php.net/bug.php?id=20698):
[28 Nov 2002 6:26am EST] thingol at mail dot ru
If the text for preg_match_all is bigger than some value, many regexp
constructions causes php to terminate.

This code crashes php (on win32 only):


[28 Nov 2002 7:06am EST] [EMAIL PROTECTED]
Not really a PHP bug; bug is in the PCRE library itself
and is because you are asking it to capture a very large
number of individual character matches.
Increasing your stack size might help (ulimit).

g. martin luethi


Thu, 22 Jan 2004 14:20:56 -0500 "E. Stuart Hicks" <[EMAIL PROTECTED]>:

> Please disregard my last post - I'd switched Apache back from the debug
> module for the night and forgotten to turn it back on.
>
> I've attached the full trace but here's the main part:
>
> (gdb) print (char
> *)(executor_globals.function_state_ptr->function)->common.function_name
> $4 = 0x7bb69250 "preg_match_all"
> (gdb) frame 8
> #8  0x7baeabe4 in execute (op_array=0x1003a07d0) at
> /root/build/php-4.3.4/Zend/zend_execute.c:1660
> 1660
> zend_execute(EG(active_op_array) TSRMLS_CC);
> (gdb) frame 9
> #9  0x7baeabe4 in execute (op_array=0x1003af0c0) at
> /root/build/php-4.3.4/Zend/zend_execute.c:1660
> 1660
> zend_execute(EG(active_op_array) TSRMLS_CC);
> (gdb) frame 10
> #10 0x7baeabe4 in execute (op_array=0x10038f230) at
> /root/build/php-4.3.4/Zend/zend_execute.c:1660
> 1660
> zend_execute(EG(active_op_array) TSRMLS_CC);
> (gdb) frame 11
> #11 0x7bacde24 in zend_execute_scripts (type=8, retval=0x0,
> file_count=3)
> at /root/build/php-4.3.4/Zend/zend.c:884
> 884 zend_execute(EG(active_op_array)
TSRMLS_CC);
> (gdb) frame 12
> #12 0x7ba6dd08 in php_execute_script
> (primary_file=0x7fffef20)
> at /root/build/php-4.3.4/main/main.c:1729
> 1729retval = (zend_execute_scripts(ZEND_REQUIRE
> TSRMLS_CC, NULL, 3, prepend_file_p, primary_file, append_file_p) ==
> SUCCESS);
>
>
> Stu
>
>
> -Original Message-
> From: E. Stuart Hicks [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 22, 2004 2:07 PM
> To: 'Martin Luethi'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Segmentation fault problem
>
> I still can't access anything on bugs.php.net so I'm not sure exactly what
> you need.  I grabbed all of the execute() frames, though, and ran that
print
> function and got this:
>
> (gdb) print (char
> *)(executor_globals.function_state_ptr->function)->common.function_name
> Attempt to extract a component of a value that is not a structure.
> (gdb) frame 6
> #6  0x7babef00 in execute () from /home/httpd/modules/libphp4.so
> (gdb) frame 7
> #7  0x7babf244 in execute () from /home/httpd/modules/libphp4.so
> (gdb) frame 8
> #8  0x7babf244 in execute () from /home/httpd/modules/libphp4.so
> (gdb) frame 9
> #9  0x7babf244 in execute () from /home/httpd/modules/libphp4.so
> (gdb) frame 10
> #10 0x7babf244 in execute () from /home/httpd/modules/libphp4.so
>
> Does this help?
>
> Stu
>
>
> -Original Message-
> From: Martin Luethi [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 22, 2004 2:24 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Segmentation fault problem
>
> each php function is executed by the internal function "execute()"
> please include the details about this frames also (configure php with
> --enable-debug first) e.g.:
> (gdb) frame 6
> output...
> (gdb) print (char *)(executor_globals.function_state_ptr->function)-
>> common.function_name
> output...
>
> with this information you can see which php-command causing the seg fault
> -> http://bugs.php.net/bugs-generating-backtrace.php
>
> g. martin luethi
>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x7bacedcc in zend_parse_arg_impl (arg=0x1003853c0,
>> va=0x7ffe3a88, spec=0x7ffe3a58)
>> at /root/build/php-4.3.4/Zend/zend_API.c:259
>> 259 *p =
> Z_LVAL_PP(arg);
>> (gdb) bt
>> #0  0x7bacedcc in zend_parse_arg_impl (arg=0x1003853c0,
>> va=0x7ffe3a88, spec=0x7ffe3a58)
>> at /root/build/php-4.3.4/Zend/zend_API.c:259
>> #1  0x7bacfa54 in zend_parse_arg (arg_num=4, arg=0x1003853c0,
>> va=0x7ffe3a88,
>> spec=0x7ffe3a58, quiet=0) at
>> /root/build/php-4.3.4/Zend/zend_API.c:439
>> #2  0x7bacff40 in zend_parse_va_args (num_args=0,
>> type_spec=0x7bb6906c "ll",
>> va=0x7ffe3a88, flags=0) at
>> /root/bui

Re: [PHP] simple ?- load page after submit

2004-01-23 Thread John W. Holmes
From: "Katie Dewees" <[EMAIL PROTECTED]>
> Matt Hedges wrote:
> > I want when they hit submit for it to take them to their page
> > (personalpage.php?id=$id)...
> 
> header("Location: personalpage.php?id=$id");

Or, correctly:

header("Location: http://www.yourdomain.com/personalpage.php?id=$id";);

---John Holmes...

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



Re: [PHP] Session time-out value

2004-01-23 Thread John W. Holmes
From: "Pushpinder Singh" <[EMAIL PROTECTED]>
>   I dont have rights t change this value for my webserver. I only want
> this value to be changed for my application. Is there a way to take
> care of this ? Thanks again !!

You can use an .htaccess file or (maybe) ini_set() (before
session_start()!!).

Consult your friendly PHP manual. :)

---John Holmes...

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



Re: [PHP] sessions not registering inside a function.

2004-01-23 Thread John W. Holmes
From: "Jarratt Ingram" <[EMAIL PROTECTED]>

> I have created a login system, which works as expected on php 4.2. When
> i was asked to move it onto an older server using 4.0.6, the system
> stopped registering sessions.
>
> main page:
> 
> function login($username, $password){
> global $HTTP_SESSION_VARS;
> session_register('AuthUser');
> $HTTP_SESSION_VARS['AuthUser'] = $username;
>
> This code was modified to backdate it to version 4.0.6, and now it wont
> register the session. Is it because its inside the function, or to do
> with the older version of php?
>
> If i move it out of the function the session gets registered correctly.

I think you're registering a variable that only has a scope within the
function. Try adding a "global $AuthUser;" after "global
$HTTP_SESSION_VARS;"

---John Holmes...

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



RE: [PHP] simple ?- load page after submit

2004-01-23 Thread Katie Dewees
Matt Hedges wrote:
> Hello,
> 
> I've built a page where someone can enter in their information...
> currently, when they hit submit, a screen comes back and says "thanks
> for entering your info.  (echo "Thank you! Information entered.\n";)"
> 
> I want when they hit submit for it to take them to their page
> (personalpage.php?id=$id)...
> 
> How do I do this?
> 
> 
> thanks,
> Matt

add this instead of the echo:

header("Location: personalpage.php?id=$id");

Katie Dewees
Web Developer/PHP Programmer
[EMAIL PROTECTED]
http://www.evans-young.com 

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



[PHP] simple ?- load page after submit

2004-01-23 Thread Matt Hedges
Hello,

I've built a page where someone can enter in their information...
currently, when they hit submit, a screen comes back and says "thanks for
entering your info.  (echo "Thank you! Information entered.\n";)"

I want when they hit submit for it to take them to their page
(personalpage.php?id=$id)...

How do I do this?


thanks,
Matt

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



[PHP] sessions not registering inside a function.

2004-01-23 Thread Jarratt Ingram
Hello All, 

I have created a login system, which works as expected on php 4.2. When
i was asked to move it onto an older server using 4.0.6, the system
stopped registering sessions.

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



Re: [PHP] Session time-out value

2004-01-23 Thread Pushpinder Singh
Thanks John,

 I dont have rights t change this value for my webserver. I only want 
this value to be changed for my application. Is there a way to take 
care of this ? Thanks again !!

Pushpinder



On Friday, January 23, 2004, at 11:28 AM, John Nichel wrote:

Pushpinder Singh wrote:

Hello All,
I am using php and Mysql in my application. The problem is that the 
system automatically logs the user out of the system after 24 
minutes. I would like to extend the session lifetime to about 2-3 
hrs. I know there is a way to do it using a .htaccess file kept in 
the same folder as the application. Does anyone know how this is done 
??
Thanks in advance
Pushpinder
Increase session.gc_maxlifetime in your php.ini file, and restart your 
webserver.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Session time-out value

2004-01-23 Thread John Nichel
Pushpinder Singh wrote:

Hello All,

I am using php and Mysql in my application. The problem is that the 
system automatically logs the user out of the system after 24 minutes. I 
would like to extend the session lifetime to about 2-3 hrs. I know there 
is a way to do it using a .htaccess file kept in the same folder as the 
application. Does anyone know how this is done ??

Thanks in advance
Pushpinder
Increase session.gc_maxlifetime in your php.ini file, and restart your 
webserver.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Session time-out value

2004-01-23 Thread John W. Holmes
From: "Pushpinder Singh" <[EMAIL PROTECTED]>

> I am using php and Mysql in my application. The problem is that the
> system automatically logs the user out of the system after 24 minutes.
> I would like to extend the session lifetime to about 2-3 hrs. I know
> there is a way to do it using a .htaccess file kept in the same folder
> as the application. Does anyone know how this is done ??

Adjust the "session.gc_maxlifetime" setting. It's 1440 seconds by
default.This controls the amount of time that unaccessed session files are
seen as "garbage" and deleted. If you raise the limit, the files (and hence
the sessions) will last longer.

---John Holmes...

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



[PHP] Session time-out value

2004-01-23 Thread Pushpinder Singh
Hello All,

I am using php and Mysql in my application. The problem is that the 
system automatically logs the user out of the system after 24 minutes. 
I would like to extend the session lifetime to about 2-3 hrs. I know 
there is a way to do it using a .htaccess file kept in the same folder 
as the application. Does anyone know how this is done ??

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


  1   2   >