Re: [PHP] Re: My SQL speed.

2002-08-02 Thread Ilia A.

On August 3, 2002 12:54 am, Jason Stechschulte wrote:
> On Sat, Aug 03, 2002 at 01:49:10AM -0300, Manuel Lemos wrote:
> > >Google has 1 billion pages and qurys in a few milliseconds...
> >
> > Real search engines do not use SQL databases.
>
> What do search engines use?  Is there something out there that explains
> how they work?

Generally search egines use various hash algorithms to store their data, such 
as B-trees, Hash Tables, etc... Even that, is not enough when dealing with an 
extremely large dataset, in which case expensive hardware is used to provide 
the necessary IO capacity to allow for fast look ups. If you are trully 
interested in how search engines do this, there are plenty of articles 
describing Google's setup in terms of hardware.

As far as fetching data from large MySQL databases it is not impossible or 
slow as some people claim. I have a 4 million record database in MySQL that 
is routinely accessed and most queries on that table are completed in 
0.01-0.03 seconds, speed mostly depending on the number of rows retrieved. 
Keep in mind that your system and database configuration will play a very 
large role in regard to performance once you go beyond a certain amount of 
data.


-- 
Ilia Alshanetsky
[EMAIL PROTECTED]
http://fud.prohost.org/forum/

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




Re: [PHP] isset($var) && !empty($var) same time!

2002-08-02 Thread lallous

Just use empty() ?!

With error_reporting(E_ALL) you'll get a bunch of warnings if you only use
empty() w/o the isset() !

use isset() first and then check wheter empty or not empty!

so there is not one function that tests for empty and isset same time!?

Elias
"Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Fri, Aug 02, 2002 at 04:48:17PM +0200, lallous wrote:
> >
> > function issne($var)
> > {
> >return isset($var) && !empty($var) ? true : false;
> > }
> >
> > is there is any builtin function that does that? (one function call).
>
> Yes.  Just use empty().  It automatically checks if the variable is:
>not set
>null
>an empty string
>zero
>
> If any of them are true, the empty() function returns true.  You don't
> need your function at all.
>
> --Dan
>
> --
>PHP classes that make web design easier
> SQL Solution  |   Layout Solution   |  Form Solution
> sqlsolution.info  | layoutsolution.info |  formsolution.info
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409



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




Re: [PHP] Re: Need Help with register_globals OFF

2002-08-02 Thread Monty

Thanks for the tips, Justin. Sounds like a good idea.

Do you, or anyone, know if the $_POST vars stay defined even after moving on
to another page? Do I also need to unset $_POST after passing the vars each
time?


> From: [EMAIL PROTECTED] (Justin French)
> Newsgroups: php.general
> Date: Sat, 03 Aug 2002 15:46:57 +1000
> To: Monty <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> Subject: Re: [PHP] Re: Need Help with register_globals OFF
>> 
>> Anyone want to share any tips on how to deal with form vars passed to a
>> script with register_globals turned off? Do you simply refer to them
>> directly with $_GET['var'] or do you initialize vars locally that contain
>> all the $_GET vars?
> 
> Well I usually choose to POST forms, not GET them, but yeah, I just deal
> with the vars as $_POST['var'].
> 
> If I'm referencing the vars a LOT, I make regular $vars out of each element
> in the POST array:
> 
> $myvar = $_POST['myvar'];
> 
> 
> If there's a lot of them, I do it with a foreach loop... something like:
> 
>  foreach($_POST as $key => $value)
> {
> $$key = $value;
> }
> ?>
> 
> ...will do the trick.  It achieves the same as register_globals, but only
> from one source, the POST array.


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




Re: [PHP] variables

2002-08-02 Thread Jason Wong

On Saturday 03 August 2002 12:55, Bob Lockie wrote:

> >$_REQUEST holds everything from $_GET, $_POST, and $_COOKIE combined, thus
> > you cannot differentiate where the value came from.
> >
> >If you want to be sure, be specific and use one of $_GET/$_POST/$_COOKIE.
>
> There is no reason other than knowing where it came from to choose one
> method over the other? For *most* applications it would seem that using
> REQUEST is better planning.

Knowing exactly where your variables are coming from ensures the integrity of 
your code and protects it from malicious users feeding it bogus values.

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

/*
You feel a whole lot more like you do now than you did when you used to.
*/


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




Re: [PHP] Re: Need Help with register_globals OFF

2002-08-02 Thread Justin French

on 03/08/02 3:35 PM, Monty ([EMAIL PROTECTED]) wrote:

> Well, to answer my own question, I found a decent tutorial on using sessions
> with the new register_globals off here:
> 
> http://www.wdvl.com/Authoring/Languages/PHP/Maintaining_state/session_variab
> les.html
> 
> Anyone want to share any tips on how to deal with form vars passed to a
> script with register_globals turned off? Do you simply refer to them
> directly with $_GET['var'] or do you initialize vars locally that contain
> all the $_GET vars?

Well I usually choose to POST forms, not GET them, but yeah, I just deal
with the vars as $_POST['var'].

If I'm referencing the vars a LOT, I make regular $vars out of each element
in the POST array:

$myvar = $_POST['myvar'];


If there's a lot of them, I do it with a foreach loop... something like:

 $value)
{
$$key = $value;
}
?>

...will do the trick.  It achieves the same as register_globals, but only
from one source, the POST array.


Justin


Justin


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




Re: [PHP] string questions

2002-08-02 Thread Musone Verdana

Use function explode, preg_split, split to split the text string.

$pieces = explode(" ", $address);
echo $pieces[0]; // will output 4455


- Original Message -
From: Jason Wong
Sent: Saturday, August 03, 2002 1:12 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] string questions

On Saturday 03 August 2002 00:35, webmaster wrote:
> I know there has to be an easy way to do this, but I just can't find the
> answer.  I need to strip out the first part of a text string.  I've
> figured out out to strip out the last part of a string using the
> following:
>
> $address = (4455 N. 45th St.);
>
> $test = strstr($address, " ");
> echo $test;
>
> The variable $test returns N. 45th St. without the 4455.  Is there a way
> to reverse this so I can just return 4455?

Use strpos() to find the position of the first space then substr() to extract  
from beginning to the space.

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

/*
The San Diego Freeway.  Official Parking Lot of the 1984 Olympics!
*/


--  
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.phpGet more from the Web.  FREE MSN 
Explorer download : http://explorer.msn.com



[PHP] Re: Need Help with register_globals OFF

2002-08-02 Thread Monty

Well, to answer my own question, I found a decent tutorial on using sessions
with the new register_globals off here:

http://www.wdvl.com/Authoring/Languages/PHP/Maintaining_state/session_variab
les.html

Anyone want to share any tips on how to deal with form vars passed to a
script with register_globals turned off? Do you simply refer to them
directly with $_GET['var'] or do you initialize vars locally that contain
all the $_GET vars?

Thanks.



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




[PHP] Re: My SQL speed.

2002-08-02 Thread Maxim Maletsky

Lord Loh. writes:
> How on earth does US Social Security dept. maintain so many records ?
> Google has 1 billion pages and qurys in a few milliseconds...
 


Weel, I work as a consultant on development of a similar system for Italian 
Government. (instead of Social Security numbers it handles all territoric 
matters and related payments, ownershipd to it... etc ...). BTW: software is 
interfaced via PHP. 

In this database, we have over a few billions of records in some few 
thousands databases hosted on some few hundreds servers physically located 
in some few dozens of regions of Italy. 

We use Oracle for it. And, neigher Oracle does magic here. The system is 
deeply thought and organized in all its details. Nothing is left for "a 
case" and everything is very well monitored and backed up. (not mentioning 
the synchronization methods). 

In my experience, mySQL has always failed performance-wise (when not crashed 
complitely) while trying to keep on a database consisting of 1.000.000+ 
records. 

For large DBs I would reccomend you PostgreSQL as it has, in my own opinion 
(and not to start a new thread here) a better ralational mechanism, which is 
crucial (as Manuel mentioned) to design the right logic within your 
application. 

TIP: look for repeating data in your DB, and try to "compress" it somehow. 
Try to see if you can split and reuse the records. Add more supporting 
tables and so on 


Maxim Maletsky
PHP Beginner (www.phpbeginner.com) 


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




Re: [PHP] Re: My SQL speed.

2002-08-02 Thread Manuel Lemos

Hello,

On 08/03/2002 01:54 AM, Jason Stechschulte wrote:
> On Sat, Aug 03, 2002 at 01:49:10AM -0300, Manuel Lemos wrote:
> 
>>>Google has 1 billion pages and qurys in a few milliseconds...
>>
>>Real search engines do not use SQL databases.
> 
> 
> What do search engines use?  Is there something out there that explains
> how they work?

They usually use read only DBM like databases that do not have the 
overhead or parsing SQL or doing joins to fetch the data.

-- 

Regards,
Manuel Lemos


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




php-general Digest 3 Aug 2002 05:13:32 -0000 Issue 1502

2002-08-02 Thread php-general-digest-help


php-general Digest 3 Aug 2002 05:13:32 - Issue 1502

Topics (messages 110847 through 110932):

HELP with forms
110847 by: Dave Leather
110848 by: Michael Sweeney
110914 by: Bob Lockie

Re: include hassle
110849 by: Reuben D. Budiardja

HELP with fOpen
110850 by: Shane

Re: isset($var) && !empty($var) same time!
110851 by: Analysis & Solutions

Gracias
110852 by: Sebastian Tomasino

Thanks Matt
110853 by: Sebastian Tomasino

Function search utility
110854 by: Brian V Bonini
110860 by: Lars Olsson
110897 by: Brian V Bonini

Re: Need help to choose hosting!
110855 by: Michael Sweeney

Re: Protect PHP coding
110856 by: Randy Johnson
110905 by: Manuel Lemos
110906 by: Manuel Lemos

fsockopen limits
110857 by: Ilja Polivanovas

Reading in contents of URL
110858 by: Mike C

ODBC
110859 by: Ashley M. Kirchner
110879 by: Scott Fletcher
110912 by: Bob Lockie

wonder why php as apache module can work with virtual host
110861 by: Ryan

Re: value submit button
110862 by: Ryan

test
110863 by: Ryan

share librearies from repository
110864 by: Ricardo Javier Aranibar León

xml/mysql experts
110865 by: ibi

re:Using PHP to reboot the linux server
110866 by: Harpreet Kaur
110868 by: Nick Oostveen

Re: Using PHP to reboot the linux server
110867 by: Ryan
110874 by: Scott Fletcher

Vars passed via URL disappearing
110869 by: Monty
110871 by: Steve Edberg
110887 by: Monty
110904 by: David Freeman

User Authentication Problem.
110870 by: Tony Harrison

Re: ldap_add() - null values in fields produce an "value #0 invalid per syntax" error 
on ldap server
110872 by: Stig Venaas

Re: ldap_modify parameters?
110873 by: Stig Venaas

PHP and MySQL
110875 by: Erich Kolb
110878 by: Shane
110880 by: Monty
110916 by: Jason Wong

share libraries from repository
110876 by: Ricardo Javier Aranibar León

Parsing XML into PHP array.
110877 by: Scott Fletcher
110900 by: Analysis & Solutions

Email failure
110881 by: Scott Fletcher
110882 by: Shane

Help!!! CVS install broke for me!
110883 by: Rick Kukiela
110886 by: R'twick Niceorgaw

PHP4 and MySql - Search Results Question?
110884 by: Jason Caldwell
110893 by: Julio Nobrega
110894 by: Jason Caldwell
110923 by: Jason Wong

Regular expressions test code
110885 by: Børge Strand

php backtraces with gdb print gibberish for function name
110888 by: Joe Morris

server to server post
110889 by: Purushotham Komaravolu
110891 by: Purushotham Komaravolu
110896 by: skeller.healthtvchannel.org

difference
110890 by: Bob Lockie
110892 by: Joe Morris

Creating variables...
110895 by: Ashley M. Kirchner
110898 by: Bas Jobsen

Need Help with register_globals OFF
110899 by: Monty
110921 by: Jason Wong

Re: include()
110901 by: Chris Knipe
110915 by: Lord Loh.

FreeType 2 support ?
110902 by: R'twick Niceorgaw

string questions
110903 by: webmaster
110926 by: Jason Wong

mail problems
110907 by: Bob Lockie
110928 by: Jason Stechschulte
110932 by: Manuel Lemos

Question about sessions
110908 by: Varsha Agarwal
110917 by: Lord Loh.
110919 by: Jason Wong

Re: still need help with crash on make
110909 by: Bob Lockie

Re: Problems with HTML forms and PHP. Please Help !!
110910 by: Bob Lockie

Reg-Cache problem
110911 by: SenthilVelavan

variables
110913 by: Bob Lockie
110918 by: Jason Wong
110931 by: Bob Lockie

File Phrasing & Mark-ups
110920 by: Lord Loh.

Re: question about references
110922 by: Tom Rogers

My SQL speed.
110924 by: Lord Loh.
110925 by: Tyler Longren
110927 by: Manuel Lemos
110929 by: Jason Stechschulte

Re: mktime() question
110930 by: Tom Rogers

Administrivia:

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

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

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


--

--- Begin Message ---

Is there a way to read a FORM varaiable into PHP variable.  The kicker here
is the form variable is in a framed window.

Example, I have my main page in a 2 part frame (90%/10%).  The bottom 10%
has a form on it called 'fileform' with one text box called filevalue

-- source snippit --

  

-- end snippit --

Now inside the 90% window, I have ANOTHER frameset (broken into 3 parts.. a
left menu bar, a bottom instructional bar, and a main window.  I NEED the
main window to gra

[PHP] Re: mail problems

2002-08-02 Thread Manuel Lemos

Hello,

On 08/02/2002 10:34 PM, Bob Lockie wrote:
> I can't get mail to work on my system.
> It always tries to send mail as the user 'nobody' which my Apache 1.3.26 runs as.
> phpinfo() reports I have the correct path to the php.ini file which specifies it is 
>supposed
> to send as the user 'bob'.
> I have sendmail 8.12.5 and PHP 4.2.2 on the same RedHat Linux machine?

Use mail() 5th argument like this "[EMAIL PROTECTED]",


-- 

Regards,
Manuel Lemos


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




Re: [PHP] variables

2002-08-02 Thread Bob Lockie

On Sat, 3 Aug 2002 12:19:15 +0800, Jason Wong wrote:

>On Saturday 03 August 2002 10:43, Bob Lockie wrote:
>> What is the difference from using $_GET['some_var'] from using
>> $_REQUEST['some_var']? I think the documentation says either can be used to
>> do the same thing.
>
>$_REQUEST holds everything from $_GET, $_POST, and $_COOKIE combined, thus you 
>cannot differentiate where the value came from.
>
>If you want to be sure, be specific and use one of $_GET/$_POST/$_COOKIE.

There is no reason other than knowing where it came from to choose one method over the 
other?
For *most* applications it would seem that using REQUEST is better planning.





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




Re: [PHP] mktime() question

2002-08-02 Thread Tom Rogers

Hi,

Friday, August 2, 2002, 10:52:14 PM, you wrote:
JB> Good morning!

JB> I need to subtract months by their abbreviated month name, so shouldn't this
JB> work?

JB> print(date("M", mktime(date("M")-$i));

JB> and if I loop;

JB> Aug
JB> Jul
JB> Jun
JB> May
JB> 
Does this help...


$now = time();
$i = 36;
while($i > 0){
echo date('M-Y',$now).'';
$now = strtotime('-1 month',$now);
$i--;
}






-- 
regards,
Tom


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




Re: [PHP] Re: My SQL speed.

2002-08-02 Thread Jason Stechschulte

On Sat, Aug 03, 2002 at 01:49:10AM -0300, Manuel Lemos wrote:
> >Google has 1 billion pages and qurys in a few milliseconds...
> 
> Real search engines do not use SQL databases.

What do search engines use?  Is there something out there that explains
how they work?

-- 
Jason Stechschulte
[EMAIL PROTECTED]
http://www.ypisco.com
--
"We demand rigidly defined areas of doubt and uncertainty!"
-- Vroomfondel

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




Re: [PHP] mail problems

2002-08-02 Thread Jason Stechschulte

On Fri, Aug 02, 2002 at 09:34:20PM -0400, Bob Lockie wrote:
> I can't get mail to work on my system.
> It always tries to send mail as the user 'nobody' which my Apache 1.3.26 runs as.
> phpinfo() reports I have the correct path to the php.ini file which specifies it is 
>supposed
> to send as the user 'bob'.
> I have sendmail 8.12.5 and PHP 4.2.2 on the same RedHat Linux machine?

I'm not sure how sendmail works, but I think exim has a setting that you
have to set so it will allow you to send email as a different user.
Maybe there is something like that you need to set for sendmail also.

-- 
Jason Stechschulte
[EMAIL PROTECTED]
http://www.ypisco.com
--
Do you think that illiterate people get the full effect of alphabet soup?

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




[PHP] Re: My SQL speed.

2002-08-02 Thread Manuel Lemos

Hello,

On 08/03/2002 01:36 AM, Lord Loh. wrote:
> I have a database of mysql with 3 million records. No query is performed in
> less than 10 seconds!(With Index and all that)

The index will not do magic by itself, especially if it is not unique.



> Any way to speed this up ?

Sometimes your queries need to be rewritten


> How on earth does US Social Security dept. maintain so many records ?

Most likely they use Oracle or something as sophisticated that among 
other things can do table partitioning.


> Google has 1 billion pages and qurys in a few milliseconds...

Real search engines do not use SQL databases.



> I am not saying that they are using MySQL!
> 
> Should this be asked in a mysql list ? Please suggest a NNTP server!

Yes, MySQL is good but it is not magic. You can stretch it a bit with 
some optimization of your setup, but what often works better is 
rethinking your application. Does it really need to store 3 million records?


-- 

Regards,
Manuel Lemos


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




Re: [PHP] string questions

2002-08-02 Thread Jason Wong

On Saturday 03 August 2002 00:35, webmaster wrote:
> I know there has to be an easy way to do this, but I just can't find the
> answer.  I need to strip out the first part of a text string.  I've
> figured out out to strip out the last part of a string using the
> following:
>
> $address = (4455 N. 45th St.);
>
> $test = strstr($address, " ");
> echo $test;
>
> The variable $test returns N. 45th St. without the 4455.  Is there a way
> to reverse this so I can just return 4455?

Use strpos() to find the position of the first space then substr() to extract 
from beginning to the space.

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

/*
The San Diego Freeway.  Official Parking Lot of the 1984 Olympics!
*/


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




Re: [PHP] My SQL speed.

2002-08-02 Thread Tyler Longren


> Should this be asked in a mysql list ? Please suggest a NNTP server!

You could always take this to the mysql mailing list
[EMAIL PROTECTED]

tyler


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




[PHP] My SQL speed.

2002-08-02 Thread Lord Loh.

I have a database of mysql with 3 million records. No query is performed in
less than 10 seconds!(With Index and all that)

Any way to speed this up ?

How on earth does US Social Security dept. maintain so many records ?
Google has 1 billion pages and qurys in a few milliseconds...

I am not saying that they are using MySQL!

Should this be asked in a mysql list ? Please suggest a NNTP server!

Lord Loh.



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




Re: [PHP] Re: PHP4 and MySql - Search Results Question?

2002-08-02 Thread Jason Wong

On Saturday 03 August 2002 07:01, Jason Caldwell wrote:
> You cannot have COUNT(*) without having GROUP BY -- hence, by search query

Not sure what you mean -- SELECT COUNT(*) FROM table; -- works fine.

> will not produce the desired results -- I'm thinking that there may be
> something within PHP or MySQL (a Function) that reports the total found for
> a query whether or not a LIMIT clause is used?

You need 2 queries. 

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

/*
An optimist believes we live in the best world possible; 
a pessimist fears this is true.
*/


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




Re: [PHP] question about references

2002-08-02 Thread Tom Rogers

Hi,

Friday, August 2, 2002, 11:29:39 PM, you wrote:
JV> Tried to post this to the news group before, but I'm having trouble getting
JV> to my news server from work - hopefully I'm not posting a duplicate.


JV> I think I'm seeing the problem I'm seeing because I'm getting a copy of a
JV> var instead of a reference to it, but I'm not sure the best we to get around
JV> this problem.

JV> In my little sample script, I've got an array of objects.  When I use
JV> foreach to loop through the array and make a change to an item, it doesn't
JV> change the object in the array, just the var that I have while I'm in the
JV> foreach loop.

JV> What's the right way to loop through this array if I really want to change
JV> homer's name to marge in this example?  The way it is now, I see my echo
JV> saying that I'm changing the name, but when I do the second var_dump, it's
JV> the same as the first var_dump.

JV> Thanks in advance,
JV>Jesse

JV>  class Name {
JV> var $firstName;
JV> var $lastName;

JV> function Name($first, $last) {
JV> $this->firstName = $first;
JV> $this->lastName = $last;
JV> }
JV> }

JV> $names[] = new Name("joe", "shmo");
JV> $names[] = new Name("billy", "bob");
JV> $names[] = new Name("homer", "simpson");

?>>

JV> 
JV> 
JV> 
JV> 
JV>  foreach ($names as $name) {
JV> if (strcmp($name->firstName, "homer") == 0) {
JV> echo "changing homer to marge";
JV> $name->firstName = "marge";
JV> break;
JV> }
JV> }
JV> ?>
JV> 

JV> 
JV> 
JV> 

This should work:

foreach ($names as $key=>$val) {
if (strcmp($val->firstName, "homer") == 0) {
echo "changing homer to marge";
$names[$key]->firstName = "marge";
break;
}
}

-- 
regards,
Tom


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




Re: [PHP] Need Help with register_globals OFF

2002-08-02 Thread Jason Wong

On Saturday 03 August 2002 07:37, Monty wrote:
> I'm trying to use the more secure "register_globals=Off" setting for some
> simple scripts that do authentication and use sessions. But I'm ready to
> rip all my hair out!

Look at the chapter "Session handling functions". The setting of 
register_globals affects the using of sessions.

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

/*
panic: kernel segmentation violation. core dumped   (only kidding)
*/


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




[PHP] File Phrasing & Mark-ups

2002-08-02 Thread Lord Loh.

A function I have written to accept filenames, read it and phrase it's mark
ups. Is the second function of one line file a good idea ? Is there an
alternative ? Can problems arise if the size of the file being phrased is
very large ?
==

=



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




Re: [PHP] Question about sessions

2002-08-02 Thread Jason Wong

On Saturday 03 August 2002 10:19, Varsha Agarwal wrote:
> Hi,
> I am creating a session for user autentication. As I
> read from the help there are two ways for passing
> session IDs
> -Cookies
> -URL parameter.
>
> By default its passing it through cookies. I don't
> want to use any cookies in my program. Can anyone tell
> me how to go for the other way? i.e. through URL
> parameter??

Look in php.ini and set "session.use_cookies" to 0.

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

/*
sticktion
*/


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




Re: [PHP] variables

2002-08-02 Thread Jason Wong

On Saturday 03 August 2002 10:43, Bob Lockie wrote:
> What is the difference from using $_GET['some_var'] from using
> $_REQUEST['some_var']? I think the documentation says either can be used to
> do the same thing.

$_REQUEST holds everything from $_GET, $_POST, and $_COOKIE combined, thus you 
cannot differentiate where the value came from.

If you want to be sure, be specific and use one of $_GET/$_POST/$_COOKIE.

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

/*
Mark's Dental-Chair Discovery:
Dentists are incapable of asking questions that require a
simple yes or no answer.
*/


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




[PHP] Re: Question about sessions

2002-08-02 Thread Lord Loh.

>From the php docs(XC. Session handling functions)
==


Hello visitor, you have seen this page  times.;

 is necessary to preserve the session id
# in the case that the user has disabled cookies
?>

To continue, click here
===




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




Re: [PHP] PHP and MySQL

2002-08-02 Thread Jason Wong

On Saturday 03 August 2002 04:13, Erich Kolb wrote:
> Is there any way to speed up MySQL queries?

1) Use a faster computer
2) Read the mysql manual
3) Ask on the mysql list
4) Ask google

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

/*
I left my WALLET in the BATHROOM!!
*/


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





[PHP] Re: include()

2002-08-02 Thread Lord Loh.

How ever can ant of the apache restrictions stop any one from including the
script by giving the whole path.

ie /home/htdocs/include.inc or /home/abc/include.inc

Yes or No ?
I use win 2000 so it is not possible for me to experiment! but I have
hostings on servers like www.f2s.net and a project on www.sourceforge.net

If you are familiar with these systems, what do you comment?

Lord Loh.



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




Re: [PHP] HELP with forms

2002-08-02 Thread Bob Lockie

On Fri, 2 Aug 2002 12:14:51 -0500, Dave Leather wrote:

>Is there a way to read a FORM varaiable into PHP variable.  The kicker here
>is the form variable is in a framed window.
>
>Example, I have my main page in a 2 part frame (90%/10%).  The bottom 10%
>has a form on it called 'fileform' with one text box called filevalue
>
>-- source snippit --
>
>  
>
>-- end snippit --
>
>Now inside the 90% window, I have ANOTHER frameset (broken into 3 parts.. a
>left menu bar, a bottom instructional bar, and a main window.  I NEED the
>main window to grab the value from the 'fileform.filevalue' and return it to
>a PHP variable.

You wan to submit the form and display the results in another frame?
What is you FORM action above?
I assume some PHP program.
You have to submit the form, PHP is server side.
You want the results to go to a certain frame window.
I have no idea, maybe the TARGET="frame window name" attribute as part of your FORM.




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




[PHP] variables

2002-08-02 Thread Bob Lockie

What is the difference from using $_GET['some_var'] from using $_REQUEST['some_var']?
I think the documentation says either can be used to do the same thing.




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




Re: [PHP] ODBC

2002-08-02 Thread Bob Lockie


>Can PHP be used on an Apache server (linux) to connect to a (remote) MS
>Access server (NT) through ODBC?

Yes.


> If so, does anyone have examples of how this
>is done?

Nope, never done it.
It'll use the same PHP database commands probably.
Read www.php.net




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




[PHP] Reg-Cache problem

2002-08-02 Thread SenthilVelavan

Hello All,
I have the following lines in my program to disable the caching with the 
client.



But still the clients cache my pages.Installed versions in my server is PHP 4.2.2 and 
Apache 2.0.39.
Is there any other way to go.
Any help is appreciated.

Advance thanks and regards,
Senthil.



Re: [PHP] Problems with HTML forms and PHP. Please Help !!

2002-08-02 Thread Bob Lockie


Is register_globals off in your php.ini?
Try $var = $_REQUEST['var'];

>Hi! i have instaled PHP 4.2.2 in a slack 8.1 running apache 2.0.39.
>i have a proble with a very basic script (pass variables to a php
>script). Is seems not recieve variables, because print somthing like this:
>
>Your first name is .
>Your last name is .
>Your E-mail address is .
>This is what you had to say:
>
>In the server log say the variables appear don´t exist.
>Here i send this windows files (i try in XP with iis 5.1 and PJP 4.2.2 
>and is the same problem) to help you to help me :)
>ah! php is working because i test the  stuff and works !!!
>
>Tanks
>
>




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




Re: [PHP] still need help with crash on make

2002-08-02 Thread Bob Lockie


>Yes, there are many users they recommend to use apache 1.3.26 and php 4.2.2 !
>What useful of CVS ?

Apache2 is not supported yet.
The latest version from CVS (Concurrent Version System) might work.
If you don't have CVS then use Apache 1. :-)

>Bob Lockie wrote:
>
>> >Thanks, Tyler, I will if I have to, but is there someone out there who has
>> >done this on Linux?
>>
>> There are a bunch of people (I use 1.3.26) because Apache 2 support is experimental.
>> Grab the latest source of Apache from CVS and it should work.




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




[PHP] Question about sessions

2002-08-02 Thread Varsha Agarwal

Hi,
I am creating a session for user autentication. As I
read from the help there are two ways for passing
session IDs
-Cookies
-URL parameter.

By default its passing it through cookies. I don't
want to use any cookies in my program. Can anyone tell
me how to go for the other way? i.e. through URL
parameter??
Thanks,
Varsha

__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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




[PHP] mail problems

2002-08-02 Thread Bob Lockie


I can't get mail to work on my system.
It always tries to send mail as the user 'nobody' which my Apache 1.3.26 runs as.
phpinfo() reports I have the correct path to the php.ini file which specifies it is 
supposed
to send as the user 'bob'.
I have sendmail 8.12.5 and PHP 4.2.2 on the same RedHat Linux machine?




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




Re: [PHP] Re: Protect PHP coding

2002-08-02 Thread Manuel Lemos

Hello,

On 08/02/2002 02:39 PM, Randy Johnson wrote:
> Does the bcompiler below improve performance?  
> 
> make scripts run  faster?

Definetly YES, because you do not need compile the scripts before each 
execution as they are already executed. Think about the speedup more or 
less like you were using Zend Cache, except that you do not need to pay 
a fortune to use it! :-)

Regards,
Manuel Lemos

> 
> anybody have a testimonials on it's use??
> 
> 
> Thanks,
> 
> Randy
> - Original Message - 
> From: "Manuel Lemos" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, August 01, 2002 9:14 PM
> Subject: [PHP] Re: Protect PHP coding
> 
> 
> 
>>Hello,
>>
>>On 08/01/2002 01:58 PM, Yc Nyon wrote:
>>
>>>Is there any method to encrypt PHP files.
>>
>>Use bcompiler which is free and is part of PEAR/PECL official PHP 
>>extensions repository:
>>
>>http://pear.php.net/package-info.php?pacid=95
>>
>>-- 
>>
>>Regards,
>>Manuel Lemos
>>
>>
>>-- 
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
> 
> 
> 



-- 

Regards,
Manuel Lemos


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




[PHP] Re: Protect PHP coding

2002-08-02 Thread Manuel Lemos

Hello,

On 08/02/2002 11:06 AM, Lallous wrote:
> So...
> Is this equivalent to Zend Encoder?

Not exactly, but in some aspects it is/will be better like the ability 
to generate executable standalone PHP programs that you can distribute 
independently. There is also the question of the price that for Zend 
Encoder is ridiculously expensive.

Other than that, if you're main concerne is protecting your PHP code, 
you can do very well with bcompiler.


> Elias
> "Manuel Lemos" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 
>>Hello,
>>
>>On 08/01/2002 01:58 PM, Yc Nyon wrote:
>>
>>>Is there any method to encrypt PHP files.
>>
>>Use bcompiler which is free and is part of PEAR/PECL official PHP
>>extensions repository:
>>
>>http://pear.php.net/package-info.php?pacid=95
>>
>>--
>>
>>Regards,
>>Manuel Lemos
>>
> 
> 
> 



-- 

Regards,
Manuel Lemos


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




RE: [PHP] Vars passed via URL disappearing

2002-08-02 Thread David Freeman


 > I just upgraded to PHP 4.2.2 and am trying to make my sites work with
 > register_globals turned OFF. I notice, however, that with 
 > register_globals turned off any variables I pass via the URL don't
seem to be 
 > recognized by the script it was passed to.

 > I thought register_globals only affected session, cookie and get type
 > variables? Why is PHP ignoring the variables passed via the URL?

Variables passed via the URL are GET variables.  In v4.2.2 you can use
$_GET['variable_name'] to access them.

CYA, Dave




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




[PHP] string questions

2002-08-02 Thread webmaster

I know there has to be an easy way to do this, but I just can't find the
answer.  I need to strip out the first part of a text string.  I've
figured out out to strip out the last part of a string using the
following:

$address = (4455 N. 45th St.);

$test = strstr($address, " ");
echo $test;

The variable $test returns N. 45th St. without the 4455.  Is there a way
to reverse this so I can just return 4455?

Thanks,
-Elkan


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




[PHP] FreeType 2 support ?

2002-08-02 Thread R'twick Niceorgaw

Hi all,
I'm getting this error while running a simple script.

Warning: imageftbbox(): No FreeType 2 support in this PHP build in
/home/www/htdocs/button_create.php on line 11

Here's my phpinfo https://utkalika.yi.org/phpinfo.php (note the https)

While compiling PHP, It says freetype(2) support yes. FreeType 1.x no

What might be the problem ?

R'twick






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




Re: [PHP] include()

2002-08-02 Thread Chris Knipe

> If you run your own server, you can set it up so that each webmaster is
> locked into a private environment, but it's messy.  According to me, you
> would need a separate copy of apache for each site, each running under a
> different user, and they would need to run on separate ports, which is a
> nuisance.

It's called SuEXEC in Apache and compiled in the core of Apache, it's not a
module.

What it does, it allows Apache to use the Group and User directives inside
virtual hosts.

For example:


  DocumentRoot /blah
  User cust001
  Group cust001


In this case, all files in /blah would be owned by cust001:cust001 and
permissions as strict as 0600 can be given on the files in the directory.
Apache's processes serving requests on this virutal host, will drop
permissions to user and group cust001 as specified in the configuration, so
apache would have access to read it.

In other virtualhosts, either the default user / group is used, or they are
specified uniquely in a per-virtualhost basis.  The other virtual hosts will
thus run with different uid/gid meaning that other virtualhosts will not be
able to include code in other virtualhosts, even when they know the paths.

Because Apache drop permissions to the user/group specified, they will not
have access to read/write/execute the included filename in a different
virtualhost.

--
me



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




Re: [PHP] Parsing XML into PHP array.

2002-08-02 Thread Analysis & Solutions

> I send the XML request in a string to the
> credit bureau through cURL and vice versa.  Most of the PHP scripting I
> found everywhere spoke about breaking up the xml tag into the array only
> when they come from the file and is use for parsing.

The example on my page you looked at does get the stuff from a file, BUT,
it takes that content and puts it into a string.  All the xml_parse()
function needs is the string.  So, just feed it the string you get back
from the agency.

--Dan

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

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




[PHP] Need Help with register_globals OFF

2002-08-02 Thread Monty

I'm trying to use the more secure "register_globals=Off" setting for some
simple scripts that do authentication and use sessions. But I'm ready to rip
all my hair out!

Can someone recommend a good article online that clearly discusses what's
different when you have register_globals=Off? I've spent hours looking
through the PHP site but I'm just as confused as I was before I started. I
thought this setting only affected global variables, but, there are all
kinds of things not working properly, like the header() function. It just
won't work at all with register_globals=Off, but works just fine when I
switch it back on! 

Thanks.


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




Re: [PHP] Creating variables...

2002-08-02 Thread Bas Jobsen

> That same script also gets a value ($step) from another one.  Now I
> need to figure out which $var_list# to use based on this $step value.  Any
> suggestion on how to do this?
${'var_list'.$step}

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




RE: [PHP] Re: Function search utility

2002-08-02 Thread Brian V Bonini

Nope, it was this http://www.php.net/tips.php that I was thiking of
But thanks, I didn't know you could do that ;-)

-Brian

> -Original Message-
> From: Lars Olsson [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 02, 2002 2:41 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: Function search utility
> 
> 
> It still works...try http://www.php.net/mysql or 
> http://www.php.net/fopen for example...
> 
> /lasso ([EMAIL PROTECTED])
> 
> 
> 
> Brian V Bonini wrote:
> > There used to be a utility that let you search php functions from the
> > address bar in your browser by simply appening PHP to the 
> function name eg,
> > php mail I thikn it might of been an IE only thing...
> > 
> > I can't remember were I originally got it form and can not find 
> it again,
> > does anyone know?
> > 
> > -Brian
> > 
> 
> 
> -- 
> 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] server to server post

2002-08-02 Thread skeller

> I am new to php, can anybody pls help me out with my query?
>  How to do a server to server post in php, without client
> knowing about it.

There's a function called Post2Host. Look in the archives of this newsletter
or in Google Groups and you'll find the code for it.


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




[PHP] Creating variables...

2002-08-02 Thread Ashley M. Kirchner


I don't know what else to title this message with, hence the subject.

I have a script that defines a few variables like this:

$var_list1 = Array(...);
$var_list2 = Array(...);
$var_list3 = Array(...);
etc.

Further down the script I have this piece:

while (list($key,$value) = each($var_list)) {   // which $var_list?
  if ($$value == '') {
$url .= "&".$value."=";
$error = 1;
  } else {
$url .= "&".$value."=". urlencode(stripslashes($$value)) ."";
  }
}


That same script also gets a value ($step) from another one.  Now I need to
figure out which $var_list# to use based on this $step value.  Any suggestion
on how to do this?



--
W | I haven't lost my mind; it's backed up on tape somewhere.
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  IT Director / SysAdmin / WebSmith . 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.




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




[PHP] Re: PHP4 and MySql - Search Results Question?

2002-08-02 Thread Jason Caldwell

You cannot have COUNT(*) without having GROUP BY -- hence, by search query
will not produce the desired results -- I'm thinking that there may be
something within PHP or MySQL (a Function) that reports the total found for
a query whether or not a LIMIT clause is used?

Thanks


"Julio Nobrega" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>   You could select everything, count the results, and just show 15
results.
>
>   I am not sure that a COUNT() with LIMIT will perform the desired effect.
>
> --
> Julio Nobrega
> Pode acessar:
> http://www.inerciasensorial.com.br
>
>
> "Jason Caldwell" <[EMAIL PROTECTED]> escreveu na mensagem
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I'm using PHP4 and MySQL --
> >
> > I'm trying to write a small search engine -- got it working, however,
what
> > I'd like to do is return the TOTAL records found.
> >
> > You see, right now I am using LIMIT within my SQL -- so I only return 15
> > results at a time.
> >
> > How do I get the total (say for example there are 2000 records) -- do I
> need
> > to COUNT(*) first, then perform another SELECT query for my search?
> >
> > Or, is there a PHP/MYSQL command that returns the total records matching
> my
> > SELECT query irregardless of the LIMIT ??
> >
> > Thanks
> > Jason
> >
> >
>
>



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




[PHP] Re: PHP4 and MySql - Search Results Question?

2002-08-02 Thread Julio Nobrega

  You could select everything, count the results, and just show 15 results.

  I am not sure that a COUNT() with LIMIT will perform the desired effect.

--
Julio Nobrega
Pode acessar:
http://www.inerciasensorial.com.br


"Jason Caldwell" <[EMAIL PROTECTED]> escreveu na mensagem
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm using PHP4 and MySQL --
>
> I'm trying to write a small search engine -- got it working, however, what
> I'd like to do is return the TOTAL records found.
>
> You see, right now I am using LIMIT within my SQL -- so I only return 15
> results at a time.
>
> How do I get the total (say for example there are 2000 records) -- do I
need
> to COUNT(*) first, then perform another SELECT query for my search?
>
> Or, is there a PHP/MYSQL command that returns the total records matching
my
> SELECT query irregardless of the LIMIT ??
>
> Thanks
> Jason
>
>



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




[PHP] Re: difference

2002-08-02 Thread Joe Morris

It was changed for security reasons:

http://www.php.net/release_4_1_0.php

joe

Bob Lockie wrote:

> What is the difference from using $_GET['some_var'] from using $_REQUEST['some_var']?
> I think the documentation says either can be used to do the same thing.
>
> What is the performance difference from having register_globals turned off from 
>having it turned on?
> I assume the default was changed for performance reasons?


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




[PHP] server to server post

2002-08-02 Thread Purushotham Komaravolu



Hi all,
I am new to php, can anybody pls help me out with my query?
 How to do a server to server post in php, without client knowing about it.
Thanks
Puru



[PHP] difference

2002-08-02 Thread Bob Lockie


What is the difference from using $_GET['some_var'] from using $_REQUEST['some_var']?
I think the documentation says either can be used to do the same thing.

What is the performance difference from having register_globals turned off from having 
it turned on?
I assume the default was changed for performance reasons?




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




[PHP] server to server post

2002-08-02 Thread Purushotham Komaravolu

Hi all,
I am new to php, can anybody pls help me out with my query?
 How to do a server to server post in php, without client knowing about it.
Thanks
Puru



[PHP] php backtraces with gdb print gibberish for function name

2002-08-02 Thread Joe Morris

I have have a PHP script that is core dumping, I'm trying to find out
exactly where.  I carefully followed the instructions on

http://bugs.php.net/bugs-generating-backtrace.php

with a little help in creating an apache debug build using:

http://www.bowiesnyder.com/writings/gdb_apache.htm

however, when I get to the end bit where it's supposed to print out the
function that was causing the seg fault (I've already typed "frame x"
where x is the lowest-numbered execute() call), I get crap:

(gdb) print (char
*)(executor_globals.function_state_ptr->function)->common.function_name
$2 = 0x83a2be0 "´\221/\b\024àJ\bÜï[\b´ì0\b"

where it should say, according to the bugs.php.net page above, something
like:

(gdb) print (char
*)(executor_globals.function_state_ptr->function)->common.function_name
$14 = 0x80fa6fa "pg_result_error"

I can't find any docs anywhere on what else I can ask executor_globals
for... getting executor_globals.active_op_array->function_name returns
one of my functions, but that's not terribly useful without knowing what
line of it caused the segfault.

Any suggestions for futher probing?

joe




Re: [PHP] Vars passed via URL disappearing

2002-08-02 Thread Monty

Thanks, Steve.  So, does this mean I now have to re-declare all vars passed
via the URL or a form POST in every script that uses them? Or is there a
quicker, easier way to make use of these vars with register_globals off in a
script?

Thanks!


> From: [EMAIL PROTECTED] (Steve Edberg)
> Newsgroups: php.general
> Date: Fri, 2 Aug 2002 12:45:41 -0700
> To: Monty <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> Subject: Re: [PHP] Vars passed via URL disappearing
> 
> 'variables passed via the URL' = 'GET variables'
> 
> -steve
> 


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




RE: [PHP] Help!!! CVS install broke for me!

2002-08-02 Thread R'twick Niceorgaw

I also got exactly the same errors this morning. Thought may be its
because I'm using a beta version of RedHat Linux (Limbo).

-Original Message-
From: Rick Kukiela [mailto:[EMAIL PROTECTED]] 
Sent: Friday, August 02, 2002 4:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Help!!! CVS install broke for me!

ok, i do a make and it makes fine but when the make install i get an
infinite loop of this error:

Warning: mkdir(): File exists in /usr/local/src/php4/pear/System.php on
line
235

I went to the code and i tried putting a line that says this:

if(file_exists("$newdir")) { $ret = exec("/bin/rm -rf $newdir"); }

I put that right above the line thats erroring in the while loop. It
fixed
the problem with that but then when it gets to XML_RPC the CPU usage
goes up
to 100% and will not output any errors or anything. It looks  like its
caught in a loop

anyway, anyone have any ideas??

my systems is FreeBSD 4.6
apache 1.3.26
libtool 1.4
autoconf 2.53
automake 1.5

configure line:
./configure --with-imap=/usr/local --with-xml --with-mysql
--enable-track-va
rs --with-mm=/usr/local --with-gettext --with-mcrypt=/usr/local
--enable-ftp
 --enable-sockets --with-apache=../apache_1.3.26





-- 
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] Regular expressions test code

2002-08-02 Thread Børge Strand


I'm starting work on regular expressions in PHP these days. Just
thought I'd share my test code for others out there who are fresh
starters with the language and regular expressions.


file parser.php:
\n";
print "\n";
print "Testing regular expressions\n";
print "\n";
print "\n";

$string = $_REQUEST['string'];
$pattern = $_REQUEST['pattern'];

print '' . "\n";
print 'STRING:' . 
"\n";
print 'PATTERN:' 
. "\n";
print '' . "\n";
print '' . "\n";
print 'preg_match("' . $pattern . '","' . $string . '") says: ' . "\n";

//$pattern = "/^[a-z\-0-9]+_[a-z\-0-9]+_[0-9]+$/"; // example pattern
if (preg_match($pattern, $string))
print 'YES';
else
print 'NO';

print "\n";
print "\n"

?>


--
Børge

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




[PHP] PHP4 and MySql - Search Results Question?

2002-08-02 Thread Jason Caldwell

I'm using PHP4 and MySQL --

I'm trying to write a small search engine -- got it working, however, what
I'd like to do is return the TOTAL records found.

You see, right now I am using LIMIT within my SQL -- so I only return 15
results at a time.

How do I get the total (say for example there are 2000 records) -- do I need
to COUNT(*) first, then perform another SELECT query for my search?

Or, is there a PHP/MYSQL command that returns the total records matching my
SELECT query irregardless of the LIMIT ??

Thanks
Jason



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




[PHP] Help!!! CVS install broke for me!

2002-08-02 Thread Rick Kukiela

ok, i do a make and it makes fine but when the make install i get an
infinite loop of this error:

Warning: mkdir(): File exists in /usr/local/src/php4/pear/System.php on line
235

I went to the code and i tried putting a line that says this:

if(file_exists("$newdir")) { $ret = exec("/bin/rm -rf $newdir"); }

I put that right above the line thats erroring in the while loop. It fixed
the problem with that but then when it gets to XML_RPC the CPU usage goes up
to 100% and will not output any errors or anything. It looks  like its
caught in a loop

anyway, anyone have any ideas??

my systems is FreeBSD 4.6
apache 1.3.26
libtool 1.4
autoconf 2.53
automake 1.5

configure line:
./configure --with-imap=/usr/local --with-xml --with-mysql --enable-track-va
rs --with-mm=/usr/local --with-gettext --with-mcrypt=/usr/local --enable-ftp
 --enable-sockets --with-apache=../apache_1.3.26





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




RE: [PHP] Email failure????

2002-08-02 Thread Shane

Yes Scott, I get that too. But hey, it's friday!

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




[PHP] Email failure????

2002-08-02 Thread Scott Fletcher

What give??  I post the command and replied to some other posting.  It made
it through and was posted without a problem!  I kept getting the email from
PHP server saying "
Sorry. Your message could not be delivered to:

brian-phplist,emc (The name was not found at the remote site. Check that

the name has been entered correctly.)"   This for every other users??




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




[PHP] Re: PHP and MySQL

2002-08-02 Thread Monty

Indexes

Putting strings in single quotes instead of double (WHERE id = 'something')

Normalized database design.

- Monty

> From: [EMAIL PROTECTED] (Erich Kolb)
> Organization: R&B Receivables Management, Inc.
> Reply-To: "Erich Kolb" <[EMAIL PROTECTED]>
> Newsgroups: php.general
> Date: Fri, 2 Aug 2002 15:13:24 -0500
> To: [EMAIL PROTECTED]
> Subject: PHP and MySQL
> 
> Is there any way to speed up MySQL queries?
> 
> 


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




[PHP] Re: ODBC

2002-08-02 Thread Scott Fletcher

Yes!  Unfortunately, you'll have to install the special driver on the
Linux/Unix becuase of the communication difference between UNIX & Windows as
well as the language difference between these two.  I tried using iODBC and
openLINK.  After 1 1/2 years, I decided that open source code for this is no
good because they are not compactable and it is such a big, big pain in the
butt!!!  So, I ended up moving the website on UNIX to windows.  Why, because
of the way the data type is being coverted between 2 platform and character
length or type is strictly limited.  I have not tried to buy such a $600 or
$800 driver software to see how well it does because it is a waste of money
and MS kept changing the programming in the MS Access and MS SQL making the
drivers useless.

"Ashley M. Kirchner" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Can PHP be used on an Apache server (linux) to connect to a (remote)
MS
> Access server (NT) through ODBC?  If so, does anyone have examples of how
this
> is done?  And if not, what other choices do I have?
>
> --
> W | I haven't lost my mind; it's backed up on tape somewhere.
>   +
>   Ashley M. Kirchner    .   303.442.6410 x130
>   IT Director / SysAdmin / WebSmith . 800.441.3873 x130
>   Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
>   http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.
>
>
>



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




RE: [PHP] PHP and MySQL

2002-08-02 Thread Shane

-Original Message-
here any way to speed up MySQL queries?
--
Sure, ask for only the data you need. or halt your query when you have what you need.

HTH

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




[PHP] Parsing XML into PHP array.

2002-08-02 Thread Scott Fletcher

I'm having trouble getting the XML string to be broken up into the PHP
array.  Here's how it work.  I send the XML request in a string to the
credit bureau through cURL and vice versa.  Most of the PHP scripting I
found everywhere spoke about breaking up the xml tag into the array only
when they come from the file and is use for parsing.  Problem here is it is
illegal to store the credit inquiry information to a file on the server
except temporary storing it in the RAM but then it will have to be destroyed
when it is done.  I don't need to parse it, just want to use the tag name as
the name in the array with the data from the tag as data to that array name.
What is the work around for this??

Thanks,
 FletchSOD



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




[PHP] share libraries from repository

2002-08-02 Thread Ricardo Javier Aranibar León

Hi List,
I need your help.
I wrote my classes with php where I defined my objects, then I created my 
repository in  /usr/share/php , in this
directory are my clasess.
Now, from my directory web I like to call to my classes, then I modified my 
php.ini (/etc/php.ini) and inserted
this line, in the option "Paths and Directories"
   include_path = ".:/usr/share/php"
and restart apache.
In my page index.php I call to my class with this form
   
But when I like to see my page I have two message:
1) Warning: Failed opening 'plantilla.class' for inclusion 
(include_path='.:/usr/share/php')in
/usr/local/httpd/htdocs/index.php on line 2

2)Fatal error: Cannot instantiate non-existent class: pagina in
/usr/local/httpd/htdocs/index.php on line 3

If somebody can help me I'll tahnkfull, my box linux is SuSE 7.3, PHP 4.04 
and Apache.



_
Charle con sus amigos online usando MSN Messenger: http://messenger.msn.com


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




[PHP] PHP and MySQL

2002-08-02 Thread Erich Kolb

Is there any way to speed up MySQL queries?



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




[PHP] Re: Using PHP to reboot the linux server

2002-08-02 Thread Scott Fletcher

First thing first!  Open up the terminal and log in.  Then type the command,
if the machine doesn't reboot or if you got an error message, it meant the
command is not correct.  Once you get the correct command then use it in
PHP.  It's much simplier that way.  If PHP can't reboot the machine then it
mean many things, like no authority to do it or path statement, shell, etc.

For linux, it use "shutdown -r now"
For some UNIX, it use "shutdown -Fr" or "shutdown -r", etc.

"Ryan" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is it `reboot -n` ??
>
> Harpreet Kaur wrote:
> > I am using the below command in the php page to reboot the linux server.
> > But nothing happens . Where am i wrong or do i have to give a path or
> > nething . Please help.
> >
> >
> > $output = shell_exec(`reboot`);
> > echo $output;
> >
> >
> >
> > _
> > Join the world's largest e-mail service with MSN Hotmail.
> > http://www.hotmail.com
> >
>



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




Re: [PHP] ldap_modify parameters?

2002-08-02 Thread Stig Venaas

On Thu, Aug 01, 2002 at 09:52:12AM -0400, Chad Day wrote:
> Also tried that, no success, unless I am missing something.
> 
> ...
>   $info["st"]="stchanged!";
> ...
> 
>   ldap_modify($ds, 'uid=testing,cn=online-leagues.com', $info);
> 
> Fatal error: LDAP: Unknown Attribute in the data in
> /usr/local/www/sites/online-leagues.com/htdocs/ldapform.php on line 31

The problem is that $info contains not just the LDAP data, but also
a list of attributes, like say $info[2] == "st". I wish that were
never put in there, but we have to live with it now. You either have
to create a new array with exactly you want in the entry (or I guess
remove these extra values, use var_dump($info) and you should see
what I'm talking of), or instead use ldap_mod_replace() using say

$mods["st"] = "stchamged";
ldap_mod_replace($ds, 'uid=testing,cn=online-leagues.com', $mods);

Stig

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




Re: [PHP] Re: ldap_add() - null values in fields produce an "value #0 invalid per syntax" error on ldap server

2002-08-02 Thread Stig Venaas

On Thu, Jul 18, 2002 at 08:17:59PM -0500, Richard Lynch wrote:
> #0 is basically just LDAP's way to represent NULL, most likely.
> 
> >$info["mail"]="";  // <- NULL VALUE HERE
> >// The following lines also produce the same result...
> >//$info["mail"]=NULL;  // <--- NULL value here
> >//$info["mail"]="\0";  // <--- NULL value here
> >//$info["mail"];   // <--- NULL value here
> 
> Whoa!
> 
> Never mind.
> 
> Something is very broken in the LDAP stuff if '' and NULL from PHP are being
> turned into NULL in LDAP, and then LDAP complains about it...

Nah... "" and NULL (and I suppose "\0") are all being changed to the
string "" before PHP attempts to add it. What I think the LDAP server
tries to say, is that the syntax doesn't accept an empty string as
value. I tried to create an LDIF file containing an attribute with no
value, like this:

dn: cn=stig,o=photos,dc=venaas,dc=no
objectClass: photo
cn: stig
description:

and I got exactly the same error from ldap_add(1). So this is in my
opinion an LDAP issue and not a PHP issue. OpenLDAP 2 has more
proper schema checking. Perhaps you could try to turn off schema
checking? Or I guess in theory the syntax for the relevant attribute
could be made more relaxed. You could try to ask about this on the
openldap-software list if you need more LDAP help.

Stig

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




Re: [PHP] Vars passed via URL disappearing

2002-08-02 Thread Steve Edberg

At 3:29 PM -0400 8/2/02, Monty wrote:
>I just upgraded to PHP 4.2.2 and am trying to make my sites work with
>register_globals turned OFF. I notice, however, that with register_globals
>turned off any variables I pass via the URL don't seem to be recognized by
>the script it was passed to.
>
>So, if I pass "http://my.site.com/page.php?id=2002";, the variable "id" is
>empty when I try to access it in page.php ...
>
>if (!empty($id)) { do stuff...}
>else { echo "error"; }
>
>With register_globals OFF, the above produces the error message. With
>register_globals ON, it works fine.
>
>I thought register_globals only affected session, cookie and get type
>variables? Why is PHP ignoring the variables passed via the URL?


'variables passed via the URL' = 'GET variables'

-steve


-- 
++
| Steve Edberg  [EMAIL PROTECTED] |
| University of California, Davis  (530)754-9127 |
| Programming/Database/SysAdmin   http://pgfsun.ucdavis.edu/ |
++
| The end to politics as usual:  |
| The Monster Raving Loony Party (http://www.omrlp.com/) |
++

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




[PHP] User Authentication Problem.

2002-08-02 Thread Tony Harrison

Hi, I need to authenticate users on an included page on my website, but the
problem is, I cant get it to work.
view it included at http://members.lycos.co.uk/ajohnh/ (Source at
http://members.lycos.co.uk/ajohnh/source/index.txt)
the actual file:
http://members.lycos.co.uk/ajohnh/templates/twoShea/head.php (source at
http://members.lycos.co.uk/ajohnh/source/head.txt)
the location of the script that sets the cookie (I hard-coded the user and
password combo for user ramonezrule into it):
http://members.lycos.co.uk/ajohnh/templates/twoShea/setcookie.php (source
at: http://members.lycos.co.uk/ajohnh/source/setcookie.txt)



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




[PHP] Vars passed via URL disappearing

2002-08-02 Thread Monty

I just upgraded to PHP 4.2.2 and am trying to make my sites work with
register_globals turned OFF. I notice, however, that with register_globals
turned off any variables I pass via the URL don't seem to be recognized by
the script it was passed to.

So, if I pass "http://my.site.com/page.php?id=2002";, the variable "id" is
empty when I try to access it in page.php ...

if (!empty($id)) { do stuff...}
else { echo "error"; }

With register_globals OFF, the above produces the error message. With
register_globals ON, it works fine.

I thought register_globals only affected session, cookie and get type
variables? Why is PHP ignoring the variables passed via the URL?

Thanks. 

Monty


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




Re: [PHP] re:Using PHP to reboot the linux server

2002-08-02 Thread Nick Oostveen

Does the user apache is running as have access to reboot the server?

At 07:18 PM 8/2/2002 +, you wrote:
>I am using the below command in the php page to reboot the linux server. 
>But nothing happens . Where am i wrong or do i have to give a path or 
>nething . Please help.
>
>
>$output = shell_exec(`reboot`);
>echo $output;
>
>
>
>_
>Join the world's largest e-mail service with MSN Hotmail. 
>http://www.hotmail.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] Re: Using PHP to reboot the linux server

2002-08-02 Thread Ryan

Is it `reboot -n` ??

Harpreet Kaur wrote:
> I am using the below command in the php page to reboot the linux server. 
> But nothing happens . Where am i wrong or do i have to give a path or 
> nething . Please help.
> 
> 
> $output = shell_exec(`reboot`);
> echo $output;
> 
> 
> 
> _
> Join the world’s largest e-mail service with MSN Hotmail. 
> http://www.hotmail.com
> 


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




[PHP] re:Using PHP to reboot the linux server

2002-08-02 Thread Harpreet Kaur

I am using the below command in the php page to reboot the linux server. But 
nothing happens . Where am i wrong or do i have to give a path or nething . 
Please help.


$output = shell_exec(`reboot`);
echo $output;



_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




[PHP] xml/mysql experts

2002-08-02 Thread ibi

Looking for people who understand the xml/php/mysql/.
Has anyone seen an xml/php application with mysql.   If you have
please send me the link.  thanks.   For those wanting to try an xml
server,
this is the place ixiasoft.http://www.ixiasoft.com/?from=textmldemo


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




[PHP] share librearies from repository

2002-08-02 Thread Ricardo Javier Aranibar León

Hi List,
I need your help.
I wrote my classes with php where I defined my objects, then I created my 
repository in  /usr/share/php , in this directory are my clasess.
Now, from my directory web I like to call to my classes, then I modified my 
php.ini (/etc/php.ini) and inserted this line, in the option "Paths and 
Directories"
   include_path = ".:/usr/share/php"
and restart apache.
In my page index.php I call to my class with this form
   
But when I like to see my page I have two message:
1) Warning: Failed opening 'plantilla.class' for inclusion 
(include_path='.:/usr/share/php')in /usr/local/httpd/htdocs/index.php on 
line 2

2)Fatal error: Cannot instantiate non-existent class: pagina in
/usr/local/httpd/htdocs/index.php on line 3

If somebody can help me I'll tahnkfull, my box linux is SuSE 7.3, PHP 4.04 
and Apache.

_
MSN Fotos: la forma más fácil de compartir e imprimir fotos. 
http://photos.msn.es/support/worldwide.aspx


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




[PHP] test

2002-08-02 Thread Ryan

test


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




[PHP] Re: value submit button

2002-08-02 Thread Ryan

ug

Florian SchäFer wrote:
> Hallo out there,
> 
> i hava an document, with one form and two Submit buttons.
> How can i check in the target document wich button is pressed?
> tried something like   if ($submit == 'xxx') .
> anyone has a hint?
> 
> 


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




[PHP] wonder why php as apache module can work with virtual host

2002-08-02 Thread Ryan

I dunno why some webhosting company can do virtual host by php as apache
module. That means they seem to work fine with the virtual host uid/gid
permission when using php. But they use php as apache modulehow do
to that ??

Thx all !!


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




[PHP] Re: Function search utility

2002-08-02 Thread Lars Olsson

It still works...try http://www.php.net/mysql or 
http://www.php.net/fopen for example...

/lasso ([EMAIL PROTECTED])



Brian V Bonini wrote:
> There used to be a utility that let you search php functions from the
> address bar in your browser by simply appening PHP to the function name eg,
> php mail I thikn it might of been an IE only thing...
> 
> I can't remember were I originally got it form and can not find it again,
> does anyone know?
> 
> -Brian
> 


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




[PHP] ODBC

2002-08-02 Thread Ashley M. Kirchner


Can PHP be used on an Apache server (linux) to connect to a (remote) MS
Access server (NT) through ODBC?  If so, does anyone have examples of how this
is done?  And if not, what other choices do I have?

--
W | I haven't lost my mind; it's backed up on tape somewhere.
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  IT Director / SysAdmin / WebSmith . 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.




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




[PHP] Reading in contents of URL

2002-08-02 Thread Mike C

I am trying to create a really simple proxy using PHP.

Basically, i need to:

1. read in the contents of a URL.
2. get the content-type
3. set the content type for the response
4. write the contents of the URL to the response.

here is what i have thus far:

$dataURL = "http://www.foo.com/data.xml";;
$fp = fopen($dataURL, "r");
$content = fread($fp, true);
echo($content);
fclose($fp);

I am running into two problems. One, the second param for fread takes 
the size of the file / content. how do i get this?

there is a comment at:
http://www.php.net/manual/en/function.fread.php

which says to just specify a constant and it will work, but what ever 
number i specify, that is the amount of data that is read.

how do i retrieve the content type?

thanks for any help...

mike c

[EMAIL PROTECTED]


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




[PHP] fsockopen limits

2002-08-02 Thread Ilja Polivanovas

Hi to all,


1. does any body know how to limit number of attempts to connect to the
remote pc. not by time but for attempts.
(sorry, offtopic ) 2. can anybody explain why sometimes connection attempt
to a closed ports hangs-up remote link, and sometimes not? the remote pc is
the same.


Thanks.



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




Re: [PHP] Re: Protect PHP coding

2002-08-02 Thread Randy Johnson

Does the bcompiler below improve performance?  

make scripts run  faster?

anybody have a testimonials on it's use??


Thanks,

Randy
- Original Message - 
From: "Manuel Lemos" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 01, 2002 9:14 PM
Subject: [PHP] Re: Protect PHP coding


> Hello,
> 
> On 08/01/2002 01:58 PM, Yc Nyon wrote:
> > Is there any method to encrypt PHP files.
> 
> Use bcompiler which is free and is part of PEAR/PECL official PHP 
> extensions repository:
> 
> http://pear.php.net/package-info.php?pacid=95
> 
> -- 
> 
> Regards,
> Manuel Lemos
> 
> 
> -- 
> 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] Need help to choose hosting!

2002-08-02 Thread Michael Sweeney

I just moved my domain over to phpwebhosting.com. The transfer went very
smoothly and so far I've been satisfied. The only hitch I can see in
your requirements might be the background processes (bots, what?). But
it's probably worth asking them about. 

..michael..

On Thu, 2002-08-01 at 23:31, Mantas Kriauciunas wrote:
> Hey php-general,
> 
>   i want to buy hosting. but i can't find good one for me. maybe
>   someone could point some links. but this is what i need!
> 
>   Storage up to 100MB
>   normal transfer limit(best would be without)
>   CGI/Perl/PHP/ASP/SSI/SSL
>   MySQL database (can be only 1)
>   some pop3 mailboxes
>   free domain transfer (maybe free domain if i pay for 1 year ahead)
>   FTP access
>   SSH access
>   Shell capability
>   up to 3 background processes
> 
>   if anyone know combination like that i would appreaciate your help!
>   thanks
> 




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




[PHP] Function search utility

2002-08-02 Thread Brian V Bonini

There used to be a utility that let you search php functions from the
address bar in your browser by simply appening PHP to the function name eg,
php mail I thikn it might of been an IE only thing...

I can't remember were I originally got it form and can not find it again,
does anyone know?

-Brian


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




[PHP] Thanks Matt

2002-08-02 Thread Sebastian Tomasino

thank you matt for explain what´s wrong.. short but helpfull !!!

Sebastian


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




[PHP] Gracias

2002-08-02 Thread Sebastian Tomasino

Muchas gracias fernando por tu explicacion !!  Con Mas detalle Imposible  !!
todavia no se como es que me llego tu respuesta a mi correo y no aparece 
aca en el news group (soy nuevo usando news) pero igual muchas gracias..

Sebastian.


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




Re: [PHP] isset($var) && !empty($var) same time!

2002-08-02 Thread Analysis & Solutions

Folks:

On Fri, Aug 02, 2002 at 07:01:38PM +0200, Jürgen wrote:
> 
> Why would i ever want to use isset() then?

Because sometimes you just want to check if something is set due to null, 
'' and 0 being important.

   $var = '';
   empty($var);  // evaluates to true
   isset($var);  // evaluates to true

   unset($var);
   empty($var);  // evaluates to true
   isset($var);  // evaluates to false


> If i understood you correctly, would the following
> 
> op = isset($_GET['op']) && !empty($_GET['op']) ? $_GET['op'] : '';
> 
> be the same as
> 
> op = !empty($_GET['op']) ? $_GET['op'] : '';

Yes.  They do the same thing.  Couple things to think about, though.  If 
$_GET['op'] is 0, those commands will turn it into ''.  Probably not what 
you want.  Also, though less important, if it's already '', there's no 
need to do the step of resetting it to ''.  Sometimes, a cleaner test is:

  $op = isset($_GET['op']) ? $_GET['op'] : '';

--Dan

PS:  Don't be lazy.  Trim unneeded parts of prior postings.

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

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




[PHP] HELP with fOpen

2002-08-02 Thread Shane

No lock in the archives, so here it goes...
Greetings all, I am using fOpen to try and create a new file in a local directory on a 
remote server. Each time I run my script is says "PERMISSION DENIED" but the sys admin 
swears the entire directory is set to 777.

Does anyone know if a setting has to be set in PHP for dynamic file creation to take 
place?
I can use fOpen to read a file, I just cant write without the above error.

Please, any help is appreciated, my deadline is looming.

Thanks
- NorthBayShane

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




Re: [PHP] include hassle

2002-08-02 Thread Reuben D. Budiardja

On Friday 02 August 2002 10:41 am, lallous wrote:
> I mean this:
>
> i have this tree:
>
> ./libs/*.php
> ./user/file1.php
>
> now i'm in ./user/ directory
> i run file1.php
> it includes ../libs/lib1.php which in turn will include helper.php
> (./users/helper.php) <-- will fail!
>
> how can i programmatically set the include path?
>
> Elias
>
- You can use an absolute path. 
- You can also specified all the includes path that will be find by php 
automatically in your php.ini. You might want to specify your /libs directory 
there, if you're including a lot of files from that directory.
Either or both should work

Rdb

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




Re: [PHP] HELP with forms

2002-08-02 Thread Michael Sweeney

What do you mean, "return it to a php variable"?

The closest I can come to understanding your question is that you want
the form input in your bottom frame to be sent to another frame in your
top window for submission.

If that's any place close to correct, you need a javascript solution. In
any case, it won't/can't become a "php variable" until it is sent back
to the server. So why not submit the form from your bottom frame with a
target of the frame that you need the variable in and refresh that
frame?

..michael..

On Fri, 2002-08-02 at 10:14, Dave Leather wrote:
> Is there a way to read a FORM varaiable into PHP variable.  The kicker here
> is the form variable is in a framed window.
> 
> Example, I have my main page in a 2 part frame (90%/10%).  The bottom 10%
> has a form on it called 'fileform' with one text box called filevalue
> 
> -- source snippit --
> 
>   
> 
> -- end snippit --
> 
> Now inside the 90% window, I have ANOTHER frameset (broken into 3 parts.. a
> left menu bar, a bottom instructional bar, and a main window.  I NEED the
> main window to grab the value from the 'fileform.filevalue' and return it to
> a PHP variable.
> 
> Any ideas
> Dave
> 




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




[PHP] HELP with forms

2002-08-02 Thread Dave Leather

Is there a way to read a FORM varaiable into PHP variable.  The kicker here
is the form variable is in a framed window.

Example, I have my main page in a 2 part frame (90%/10%).  The bottom 10%
has a form on it called 'fileform' with one text box called filevalue

-- source snippit --

  

-- end snippit --

Now inside the 90% window, I have ANOTHER frameset (broken into 3 parts.. a
left menu bar, a bottom instructional bar, and a main window.  I NEED the
main window to grab the value from the 'fileform.filevalue' and return it to
a PHP variable.

Any ideas
Dave




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




Re: [PHP] isset($var) && !empty($var) same time!

2002-08-02 Thread Jürgen

But if this is true what you say, that empty() checks for
not set
   null
   an empty string
   zero

Why would i ever want to use isset() then?

If i understood you correctly, would the following

op = isset($_GET['op']) && !empty($_GET['op']) ? $_GET['op'] : '';

be the same as

op = !empty($_GET['op']) ? $_GET['op'] : '';

?

*confused*


"Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Fri, Aug 02, 2002 at 04:48:17PM +0200, lallous wrote:
> >
> > function issne($var)
> > {
> >return isset($var) && !empty($var) ? true : false;
> > }
> >
> > is there is any builtin function that does that? (one function call).
>
> Yes.  Just use empty().  It automatically checks if the variable is:
>not set
>null
>an empty string
>zero
>
> If any of them are true, the empty() function returns true.  You don't
> need your function at all.
>
> --Dan
>
> --
>PHP classes that make web design easier
> SQL Solution  |   Layout Solution   |  Form Solution
> sqlsolution.info  | layoutsolution.info |  formsolution.info
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409



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




Re: [PHP] PHP Hosting

2002-08-02 Thread Andrew Brampton

This has been discussed in great detail before..
but the simplist solution is running PHP in safe mode, it does limit the
user to certain things, but it stops them bringing the server down or
altering others files

andrew
- Original Message -
From: "Matt Babineau" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 02, 2002 2:04 PM
Subject: [PHP] PHP Hosting


> If any PHP hosts are out there I have a question:
>
> How do you keep users from erasing / altering files out side of their
> web folder with PHP? Doesn't PHP run in the system user context? Is is
> possible to prevent a user from using PHP to alter anything but in their
> Web folder?
>
> Matt Babineau
> MCWD / CCFD
> -
> e:   [EMAIL PROTECTED]
> p: 603.943.4237
> w:   http://www.criticalcode.com
> PO BOX 601
> Manchester, NH 03105
>
>


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




[PHP] FATAL: emalloc(): Unable to allocate -83128 bytes

2002-08-02 Thread Klaus Svarre

I get the error msg mentioned above when I use the ereg() function.
What is it, that I don't know?
Best regards
Klaus



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




Re: [PHP] Why Protect PHP coding?

2002-08-02 Thread Nick Oostveen

Check out the Zend Encoder at http://www.zend.com to generate encoded php 
files.  It is, however, a bit pricey.

At 12:47 AM 8/2/2002 -0400, php @ banana wrote:
>Just out of curiosity when and why?
>
> >Is there any method to encrypt PHP files.
> >
> >Nyon
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>--__-__-__
>eat pasta
>type fasta
>
>
>--
>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




  1   2   >