[PHP] Hashes in text files

2002-05-02 Thread Rodrigo
Can I store Hashes in text files? If yes, how? Can I store a multi dimensional array in a text file? If not how should I do to store the data in one file and the "pointer" in another file? Thanx, Rodrigo

[PHP] Help with Bookmark

2002-05-02 Thread Rodrigo
Hi guys I'm trying to make a online bookmark adress book, this bookmark adress book, would consist of the following: A text file named name.txt, that would content the name of each of the users. A text file named pass.txt, that would contain a non-secure password for each user. A text file f

Re: [PHP] Upgrading from libmcrypt 2.2.x to 2.4.x

2002-05-02 Thread Cédric Veilleux
Hi, Thanks for the hint. Just a small note to let you know that my code to decrypt a string will return a string with filled with null characters at the end. You should trim() it. Also, anybody knows how to detect if the PHP build is linked with 2.2 or 2.4? I would li

Re: [PHP] Upgrading from libmcrypt 2.2.x to 2.4.x

2002-05-02 Thread Tom Rogers
Hi Thanks for that info, was just what I needed :) You can also create $iv with this: $iv = pack("a".mcrypt_enc_get_iv_size($td),$iv); I use base64_encode() and base64_decode() to store the result and send via the web. Tom At 01:02 PM 3/05/2002, Cédric Veilleux wrote: >Hi, > > I had a

[PHP] Re: Variables within variable names

2002-05-02 Thread HeyJim
I agree with Jason and Miguel, but if you really want to do this, you could try: $type = "basic"; $user = $type."_user"; $$user = "jaxn"; echo $basic_user; I can see where something like this *could* be useful, but I'd still use the arrays. Jim. At 12:43 PM 5/2/02, Jackson Miller wrote: >I w

Re: [PHP] Virus I-Worm/Klez.H (Someone does not like me)

2002-05-02 Thread Ed Lazor
At 04:08 AM 5/3/2002 -0700, r wrote: >Hey all, >In the last 14 days i got 9 emails with this virus "I-Worm/Klez.H" >can anybody tell me how destructive this virus is and what exactly does it >do? http://www.symantec.com http://securityresponse.symantec.com/ There's a link on their main page with

Re: [PHP] Object Reference Serialization

2002-05-02 Thread Thies C. Arntzen
On Fri, May 03, 2002 at 12:34:01AM +1200, Adam Langley wrote: > Hi everyone, > > Im trying to store an object which contains an associative array of classes, > each of which contains an array of classes, so a 3-tier hierachy, in the > session object. However, the final tier gets lost upon > seria

Re: [PHP] Re: how do you route?

2002-05-02 Thread Ed Lazor
Thanks Phil =) Someone also sent me notes on using RewriteRule ![\.] /index.php$1 [L] I'll probably end up using the RewriteRule, only because I wasn't thinking about including gifs and such. Thanks again for the quick response =) At 10:16 PM 5/2/2002 -0700, Philip Hallstrom wrote: >The foll

[PHP] Re: [binarycloud-dev] Re: [PHP] Re: Seeking comments: Horde or BinaryCloud

2002-05-02 Thread alex black
> What is the guestimate release date for r2? it depends on how much additional help we receive. the data i/o pipeline is functional and nearing completion our presentation tools are under development and I expect those to go pretty quickly there is some work left to do on the make system. and

[PHP] Re: how do you route?

2002-05-02 Thread Philip Hallstrom
The following will make *every* request to this specific virtual host go through /path-to/script.php.This include .gifs, etc... everything. ServerName myserver.mydomain.org DocumentRoot /usr/local/www/myserver Action php-parse /path-to/script.php Action php-parse /p

[PHP] how do you route?

2002-05-02 Thread Ed Lazor
Is there a way to route every web page request through a specific script using PHP / Apache? I'm familiar with using ForceType to route all requests through /news/ to a script called news. Ie. ForceType application/x-httpd-php and creating a script called news

Re: [PHP] ereg

2002-05-02 Thread Jason Wong
On Friday 03 May 2002 12:51, Jason Soza wrote: > Hoping someone can help me here. I'm working with someone else's code and > I'm not familiar with ereg_replace(), can someone provide me an alternative > to the following? > > ereg_replace("[^a-z0-9._]", "", > ereg_replace (" ", "_", > ereg_replace(

Re: [PHP] Re: tutorial on global variables

2002-05-02 Thread John Hughes
After reviewing http://www.php.net/manual/en/function.import-request-variables.php I was wondering if simply including this line at the top of all scripts import_request_variables("gP", ""); would eliminate the potential problem I would have if register_globals gets turned off unexpectedly?

[PHP] replace strings in looped fgetcsv results

2002-05-02 Thread Josh & Valerie McCormack
I have a text file with info and people's names in it. I have a csv file with people's names in it. I want to open both, read the text file into a variable, iterate through the csv file with fgetcsv and replace the names in the text file with data from the csv file. so, I have a csv file with

[PHP] ereg

2002-05-02 Thread Jason Soza
Hoping someone can help me here. I'm working with someone else's code and I'm not familiar with ereg_replace(), can someone provide me an alternative to the following? ereg_replace("[^a-z0-9._]", "", ereg_replace (" ", "_", ereg_replace("%20", "_", strtolower($original_name; Basically, I wan

Re: [PHP] Batch processing & HTML2PS

2002-05-02 Thread Jason Wong
On Friday 03 May 2002 07:03, Mrdini wrote: > > I think using the PDF functions would be a much better solution. You have > > full control over what gets printed where. Search on sourceforge for > > wrapper classes which make the PDF functions easier to use. > > Well, I didn't really look into thi

Re: [PHP] PHP with MySQL

2002-05-02 Thread Bogdan Stancescu
Ok. Then the second message was even more idiotic. Damn! :) Bogdan Miguel Cruz wrote: >Your message? Actually you're right. I just noticed in the manual: > > The simple form user is a synonym for user@"%". > >miguel > >On Fri, 3 May 2002, Bogdan Stancescu wrote: > >>Um. Sorry. That was idiot

Re: [PHP] PHP with MySQL

2002-05-02 Thread Miguel Cruz
Your message? Actually you're right. I just noticed in the manual: The simple form user is a synonym for user@"%". miguel On Fri, 3 May 2002, Bogdan Stancescu wrote: > Um. Sorry. That was idiotic. > > Bogdan > > Bogdan Stancescu wrote: > > > You can simply grant username instead of usern

Re: [PHP] PHP with MySQL

2002-05-02 Thread Bogdan Stancescu
Um. Sorry. That was idiotic. Bogdan Bogdan Stancescu wrote: > You can simply grant username instead of username@machine. > > Bogdan > > Paras Mukadam wrote: > >> Hi Gurus, >> one MySQL - PHP query : while granting permissions to particular user in >> MySQL, the administrator has to give usernam

Re: [PHP] Display Large Size .pdf file in IE through Apache server

2002-05-02 Thread Bogdan Stancescu
- Does "save as" result in a valid pdf? - Do other browsers render it correctly? - Do you send content-length along with the headers? Bogdan Zhu George-CZZ010 wrote: >I have a pdf file of size ~2M, and it can't be displayed through IE. >However, for smaller size pdf files, it works fine. The se

Re: [PHP] PHP with MySQL

2002-05-02 Thread Miguel Cruz
On Thu, 2 May 2002, Paras Mukadam wrote: > one MySQL - PHP query : while granting permissions to particular user in > MySQL, the administrator has to give username@machine_address !! Then how > can we connect to MySQL through PHP only by passing "username" as one of the > arguments to mysql_connec

Re: [PHP] PHP with MySQL

2002-05-02 Thread Bogdan Stancescu
You can simply grant username instead of username@machine. Bogdan Paras Mukadam wrote: >Hi Gurus, >one MySQL - PHP query : while granting permissions to particular user in >MySQL, the administrator has to give username@machine_address !! Then how >can we connect to MySQL through PHP only by pas

[PHP] Upgrading from libmcrypt 2.2.x to 2.4.x

2002-05-02 Thread Cédric Veilleux
Hi, I had an hard time converting my code from mcrypt 2.2.x to 2.4.x. There is a big lack of info about the difference between the two and I could not find anything to help me make the move. My problem was not getting things to work with either version of mcrypt, there are ple

Re: [PHP] Re: Seeking comments: Horde or BinaryCloud

2002-05-02 Thread Manuel Lemos
Hello, Francisco Reyes wrote: > On Thu, 2 May 2002, Manuel Lemos wrote: > > >>Francisco Reyes wrote: >> >>>Anyone has had a chance to use/try both Horde and BinaryCloud? >>>So far I tried Horde and got very dissapointed by the installation process >>>and "philosophy". >>> >> >>For BinaryCloud,

Re: [PHP] Re: Seeking comments: Horde or BinaryCloud

2002-05-02 Thread Francisco Reyes
On Thu, 2 May 2002, Manuel Lemos wrote: > Francisco Reyes wrote: > > Anyone has had a chance to use/try both Horde and BinaryCloud? > > So far I tried Horde and got very dissapointed by the installation process > > and "philosophy". > > > > For BinaryCloud, you need to wait for r2 to be ready soo

Re: [PHP] asking about upload file

2002-05-02 Thread Rasmus Lerdorf
Did you read the chapter in the manual on that? On Fri, 3 May 2002, wong wrote: > please help me > how upload 5 file gif or jpeg together with php. > > RiZaL > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mail

[PHP] asking about upload file

2002-05-02 Thread wong
please help me how upload 5 file gif or jpeg together with php. RiZaL -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Seeking comments: Horde or BinaryCloud

2002-05-02 Thread Manuel Lemos
Hello, Francisco Reyes wrote: > Anyone has had a chance to use/try both Horde and BinaryCloud? > So far I tried Horde and got very dissapointed by the installation process > and "philosophy". > > BinaryCloud seems interesting, but was wondering if anyone could comment > on it before I try it. In

[PHP] Seeking comments: Horde or BinaryCloud

2002-05-02 Thread Francisco Reyes
Anyone has had a chance to use/try both Horde and BinaryCloud? So far I tried Horde and got very dissapointed by the installation process and "philosophy". BinaryCloud seems interesting, but was wondering if anyone could comment on it before I try it. In particular the PDF manual(?) doesn't reall

[PHP] Re: PHP with MySQL

2002-05-02 Thread Mike Eheler
Typically it's done like: $db = mysql_connect('localhost','username','password'); The MySQL database detects what host you're connecting from, and appends that to your username. I'm not sure if it's possible to specify an alternate host. So if both PHP and MySQL are on the same machine, and y

RE: [PHP] PHP with MySQL

2002-05-02 Thread John Holmes
mysql_connect("host","username","password"); If there is no password, leave it blank. "host" is the name or IP address of the MySQL server. Set it to localhost if it's on the same machine as the script. ---John Holmes... > -Original Message- > From: Paras Mukadam [mailto:[EMAIL PROTECTE

[PHP] PHP with MySQL

2002-05-02 Thread Paras Mukadam
Hi Gurus, one MySQL - PHP query : while granting permissions to particular user in MySQL, the administrator has to give username@machine_address !! Then how can we connect to MySQL through PHP only by passing "username" as one of the arguments to mysql_connect() ? Thanks. Paras. -- PHP Genera

Re: [PHP] Email-attachment not working

2002-05-02 Thread Ashley M. Kirchner
Jason Wong wrote: > On Thursday 02 May 2002 19:31, 1LT John W. Holmes wrote: > > > Do we have to upload the file first, which is to be attached? > > > > No. When you press the submit button, just speak slowly and clearly where > > the file is and PHP will understand you. What kind of video card d

[PHP] Re: Virus I-Worm/Klez.H (Someone does not like me)

2002-05-02 Thread David Robley
In article <004601c1f292$d5340df0$0a6da8c0@lgwezec83s94bn>, [EMAIL PROTECTED] says... > Hey all, > In the last 14 days i got 9 emails with this virus "I-Worm/Klez.H", though > my virus scanner detected it and told me to trash it, i am really curious > can anybody tell me how destructive this viru

Re: [PHP] Email-attachment not working

2002-05-02 Thread David Robley
In article <001401c1f1cc$f5461dc0$2f7e3393@TB447CCO3>, [EMAIL PROTECTED] says... > > Do we have to upload the file first, which is to be attached? > > No. When you press the submit button, just speak slowly and clearly where > the file is and PHP will understand you. What kind of video card do y

Re: [PHP] PHP 4.2.0 and $argc/$argv

2002-05-02 Thread Philip Olson
See the register_globals directive. If it is on, $argv will be created. Otherwise it will not. And as we all now know, PHP 4.2.0 defaults register_globals = off. Consider using $_SERVER['argv'] instead. regards, Philip Olson On Fri, 3 May 2002, Andre wrote: > > Is there something spe

[PHP] PHP 4.2.0 and $argc/$argv

2002-05-02 Thread Andre
Is there something special you've to do to get $argc and $argv in PHP 4.2.0? In php.ini, register_argc_argv is set to On. Is there some other configuration variable that I should look at? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/u

Re: [PHP] Virus I-Worm/Klez.H (Someone does not like me)

2002-05-02 Thread heinisch
Sorry if this mail sounds like flame, but "google" (49) is your friend, or if you like a lot of pages use www.alltheweb.com (494). Thats a good side of Opera 6, there are two fields, where you can enter searchwords, one for google, one for alltheweb. Makes it easier to search and one does it more

Re: [PHP] Virus I-Worm/Klez.H (Someone does not like me)

2002-05-02 Thread Evan Nemerson
http://www.wired.com/news/technology/0,1282,52055,00.html On Friday 03 May 2002 04:08 am, you wrote: > Hey all, > In the last 14 days i got 9 emails with this virus "I-Worm/Klez.H", though > my virus scanner detected it and told me to trash it, i am really curious > can anybody tell me how des

[PHP] Re: more session "bugs"?

2002-05-02 Thread Mike Eheler
register_globals *is* off (I haven't touched a global variable since _SESSION/POST/GET/REQUEST and the like were introduced), and what about this is "wrong behaviour"? Mike Yasuo Ohgaki wrote: > Disable register_globals. Then it should work. > BTW, this is wrong behavior, but it's documented.

[PHP] Re: more session "bugs"?

2002-05-02 Thread Yasuo Ohgaki
Disable register_globals. Then it should work. BTW, this is wrong behavior, but it's documented. -- Yasuo Ohgaki Mike Eheler wrote: > Here's a test you can try yourself. > > On your server, set up these two files: > > test.php > > session_start(); > if ($_REQUEST['var']) $_SESSION['v

[PHP] PHP4.2.0 + Apache2.0.34 on Win32 Concluded.

2002-05-02 Thread vins
Hi There. All is sorted out now. Installation of PHP4 and Apache2 on win32 has been a difficult task. To load the sapi flavour (module) into apache2 try the following. Add these lines into your configuration file for Apache2. LoadModule php4_module c:/PHP/experimental/apache2filter.dll A

Re: [PHP] Re: getting a function name of the calling function

2002-05-02 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Miguel Cruz) wrote: > I'm guessing he wants to do something like a stack trace to figure out how > a function managed to get itself called with bad data. > > With utility functions that may get called hundreds of times in a single > run, that

[PHP] Re: more session "bugs"?

2002-05-02 Thread Mike Eheler
Pardon the parse error in test-unset.php. change: header("Location: test.php")); to: header("Location: test.php"); Mike Mike Eheler wrote: > Here's a test you can try yourself. > > On your server, set up these two files: > > test.php > > session_start(); > if ($_REQUEST['var']) $_SE

Re: [PHP] Batch processing & HTML2PS

2002-05-02 Thread Mrdini
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Jason Wong) wrote: > On Friday 03 May 2002 02:05, Mrdini wrote: > > Hi, > > > > I'm currently working on a warehouse system, and I'd like to print some > > labels pretty accurately. > > > > At the moment, I'm using Mozilla to print, but this jus

[PHP] more session "bugs"?

2002-05-02 Thread Mike Eheler
Here's a test you can try yourself. On your server, set up these two files: test.php Click here to unset Click here to set test-unset.php -- What's supposed to happen: You click on the set link, this sets the variable. You then click on the unset link. This loads anoth

Re: [PHP] Re: getting a function name of the calling function

2002-05-02 Thread Miguel Cruz
On Wed, 1 May 2002, CC Zona wrote: > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Joshua E Minnie) wrote: > > > Does anybody know of any constants or predefined functions that will > > retrieve the calling functions name? For example: > > > > > function new_func($somedata) { > > ech

Re: [PHP] eregi

2002-05-02 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Miguel Cruz) wrote: > On Thu, 2 May 2002, CC Zona wrote: > > [EMAIL PROTECTED] (Miguel Cruz) wrote: > >> preg_match("/{$start}(.*?)end/", $rf, my_var); > > > > Leave out the braces. > > Don't they get removed by the parser's handling of "doubl

Re: [PHP] Pointer Size

2002-05-02 Thread Miguel Cruz
On Thu, 2 May 2002, [iso-8859-4] marius petravièius wrote: > I'm trying to get the size of pointer. > > First I use >$res = fsockopen( $server, $port ); > then > echo fgets( $handle, 1024 ); > But it only gets only one line. So I need to know the size of then > pointer. I tried to

[PHP] Virus I-Worm/Klez.H (Someone does not like me)

2002-05-02 Thread r
Hey all, In the last 14 days i got 9 emails with this virus "I-Worm/Klez.H", though my virus scanner detected it and told me to trash it, i am really curious can anybody tell me how destructive this virus is and what exactly does it do? also have any body else on this list recieved this? Please a

Re: [PHP] srand thought

2002-05-02 Thread Mike Eheler
Yeah. If I understand correctly, if you do, like: Then, I believe, the theory is that you will get the same "random" number twice. Mike Miguel Cruz wrote: > On Thu, 2 May 2002, Gerard Samuel wrote: > >>Quick question. Im using srand to seed array_rand in a script. >>I read that srand shoul

Re: [PHP] Re: case-insensitive str_replace

2002-05-02 Thread Philip Olson
This is a feature request, see: stri_replace() to compliment str_replace() : http://bugs.php.net/bug.php?id=5919 Regards, Philip Olson On Thu, 2 May 2002, CC Zona wrote: > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Reuben D Budiard

Re: [PHP] PHP and Log Analyzers

2002-05-02 Thread Miguel Cruz
But it sounds like she's specifically trying to count the incidence of various query parameters. If they were POSTed in, that data wouldn't be recorded in the log and she'd have to create a whole separate mechanism for tracking them. miguel On Wed, 1 May 2002, 1LT John W. Holmes wrote: > What

Re: [PHP] eregi

2002-05-02 Thread Miguel Cruz
On Thu, 2 May 2002, CC Zona wrote: > [EMAIL PROTECTED] (Miguel Cruz) wrote: >> preg_match("/{$start}(.*?)end/", $rf, my_var); > > Leave out the braces. Don't they get removed by the parser's handling of "double-quoted" strings long before anything makes it to preg_match()? I almost always use

Re: [PHP] srand thought

2002-05-02 Thread Miguel Cruz
On Thu, 2 May 2002, Gerard Samuel wrote: > Quick question. Im using srand to seed array_rand in a script. > I read that srand should only be called once per script under the srand > manual page. > Im using ADODB, and that also uses srand. Now should that warning be a > literal warning or shoul

Re: [PHP] eregi

2002-05-02 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Miguel Cruz) wrote: > On Thu, 2 May 2002, Fredrik Arild Takle wrote: > > eregi("$start(.*)end", $rf, $my_var); > > > > And I want it to stop at the first presedence of $end, not the last (thats > > what this is doing). > > Try preg, which is f

Re: [PHP] XML to HTML?!

2002-05-02 Thread Miguel Cruz
On Wed, 1 May 2002, Fredrik Arild Takle wrote: > "Miguel Cruz" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > On Wed, 1 May 2002, Fredrik Arild Takle wrote: > > >>>Wrap into a output buffer. ob_start, ob_get_contents > > > > > > This was neat. > > > I did:

[PHP] Display Large Size .pdf file in IE through Apache server

2002-05-02 Thread Zhu George-CZZ010
I have a pdf file of size ~2M, and it can't be displayed through IE. However, for smaller size pdf files, it works fine. The server is running Apache and PHP. Does anyone have any suggestion of how to fix this problem? Thank you very much in advance. -- PHP General Mailing List (http://www.php

Re: [PHP] Re: case-insensitive str_replace

2002-05-02 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Reuben D Budiardja) wrote: > On Thursday 02 May 2002 04:08 pm, J Smith wrote: > > preg_replace() can be used with arrays. > > Yeah, but how to make it case-insensitive beside changing the my search and > replace strings to a regular expression

Re: [PHP] eregi

2002-05-02 Thread Miguel Cruz
On Thu, 2 May 2002, Fredrik Arild Takle wrote: > eregi("$start(.*)end", $rf, $my_var); > > And I want it to stop at the first presedence of $end, not the last (thats > what this is doing). Try preg, which is faster and gives you more control (here the ? munificence operator). preg_match("/{$st

RE: [PHP] Search engine indexing

2002-05-02 Thread John Holmes
Most will index a plain PHP page just like an .html page. If there is a query string in the URL, like index.php?id=34, then some search engines won't index it. There are methods for creating your URL so that it can be indexed and still pass values, read some tutorials on Devshed.com or PHPbuilde

[PHP] Re: case-insensitive str_replace

2002-05-02 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (J Smith) wrote: > Reuben D Budiardja wrote: > > > I am in need of a case-insensitive str_replace. > > > > The feature that I use in str_replace is to put the 'search' and 'replace' > > argument as an array, as described in the documentation fo

RE: [PHP] SESSIONS

2002-05-02 Thread John Holmes
You can't mix PHP and JavaScript. They are two entirely different languages that execute in completely different ways. PHP executes to create the HTML _AND_ JavaScript. One PHP is finished; it sends you the code and is finished. It has no interaction with the HTML or JavaScript except to create it

Re: [PHP] Search engine indexing

2002-05-02 Thread Miguel Cruz
On Tue, 30 Apr 2002, Charl wrote: > Are PHP files indexed the same way as plain HTML files by search engines? Search engines don't know or care how pages were generated (PHP, ASP, Perl, telekinesis, cosmic rays, etc.). They'll slurp up anything with HTML or text on it. Some will read PDFs and oth

RE: [PHP] Problems upgrading PHP..

2002-05-02 Thread John Holmes
> What did I do wrong? You didn't read the documentation on the program you just loaded. The change log and "features" page, etc, all talk about the changes in PHP and what you need to use to access session variables and get/post variables. Register_globals is off by default, and there are new

Re: [PHP] Re: tutorial on global variables

2002-05-02 Thread Philip Olson
> I have several scripts that take it for granted PHP will assign > variables to the information in the URL as in your example $a from > example.com/foo.php?a=apple Okay, so they depend on the behavior that register_globals provides. > Will these scripts fail when my commercial Web host upgrade

[PHP] Object Reference Serialization

2002-05-02 Thread Adam Langley
Hi everyone, Im trying to store an object which contains an associative array of classes, each of which contains an array of classes, so a 3-tier hierachy, in the session object. However, the final tier gets lost upon serialization/deserialization, why is this and how can I prevent this from happ

[PHP] Re: SESSIONS

2002-05-02 Thread Mike Eheler
Javascript cannot interact with PHP. You have to realise that the PHP code has been already executed long before the javascript gets a chance to. Mike Morten Nielsen wrote: > Hi, > I got a php and a javascript page. In the PHP page I register a SESSION call > 'info'. I would then like to put a

[PHP] session_write_close() bug in 4.1.2?

2002-05-02 Thread Mike Eheler
user-defined session handlers. I'll start with how I have set up the handlers, please correct the process if it is wrong: -- BOF -- function sess_open($save_path, $session_name) { // open a database connection } function sess_close() { // close the database connection } function ses

Re: [PHP] Re: case-insensitive str_replace

2002-05-02 Thread Mike Eheler
Well to make it case insensitive, you could change them to '/search/i'. Adding that /i makes them case-insensitive. Mike Reuben D Budiardja wrote: > On Thursday 02 May 2002 04:08 pm, J Smith wrote: > >>preg_replace() can be used with arrays. >> > > Yeah, but how to make it case-insensitive be

Re: [PHP] Re: case-insensitive str_replace

2002-05-02 Thread Reuben D Budiardja
On Thursday 02 May 2002 04:08 pm, J Smith wrote: > preg_replace() can be used with arrays. Yeah, but how to make it case-insensitive beside changing the my search and replace strings to a regular expression? The problem is that I have a big array for search and replace, and it would be most lab

[PHP] Re: case-insensitive str_replace

2002-05-02 Thread J Smith
preg_replace() can be used with arrays. J Reuben D Budiardja wrote: > > Hi, > I am in need of a case-insensitive str_replace. I've tried the search the > archive and documentation, but the mostly suggested thing is to use > eregi_replace. But this does not really solve the problem for me sin

[PHP] Re: getting a function name of the calling function

2002-05-02 Thread Joshua E Minnie
"Cc Zona" <[EMAIL PROTECTED]> wrote: [snip] > A step up would be to use the error handling functions instead > . Then you can customize which errors get > reported to the user, under what circumstances, how, whether to forward the > reports to you as well, plus the oppor

RE: [PHP] upgrade

2002-05-02 Thread Hong Tian
Pushkar, The followings are used for compiling Apache+mysql+php with DSO. Questions are: At step (3), Is it correct to compile PHP as a DSO by using --with-apxs=/usr/local/apache/bin/apxs ? At the step (4), should I add the following two lines? > --enable-shared=ssl > --activate-module=src/mo

[PHP] case-insensitive str_replace

2002-05-02 Thread Reuben D Budiardja
Hi, I am in need of a case-insensitive str_replace. I've tried the search the archive and documentation, but the mostly suggested thing is to use eregi_replace. But this does not really solve the problem for me since the argument for eregi_replace can't be an array. The feature that I use in

Re: [PHP] Search engine indexing

2002-05-02 Thread Rasmus Lerdorf
yup On Tue, 30 Apr 2002, Charl wrote: > Are PHP files indexed the same way as plain HTML files by search engines? > > -- Charl > > > > -- > 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/)

Re: [PHP] Re: tutorial on global variables

2002-05-02 Thread John Hughes
Thank you for this explanation. I have several scripts that take it for granted PHP will assign variables to the information in the URL as in your example $a from example.com/foo.php?a=apple Will these scripts fail when my commercial Web host upgrades from PHP 4.1.x to 4.2? If so, can I 'upgra

[PHP] SESSIONS

2002-05-02 Thread Morten Nielsen
Hi, I got a php and a javascript page. In the PHP page I register a SESSION call 'info'. I would then like to put a value into 'info' in my javascript page. Is that possible? I have tried the following: And that works fine. But when I have an IF statement like: if(x==1) { $INFO["value"]=1;

[PHP] Search engine indexing

2002-05-02 Thread Charl
Are PHP files indexed the same way as plain HTML files by search engines? -- Charl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] help: eregi problem (?)

2002-05-02 Thread Fredrik Arild Takle
Hi, I'm doing: eregi("$start(.*)end", $rf, $my_var); And I want it to stop at the first presedence of $end, not the last (thats what this is doing). Any hints? Best Regards Fredrik A. Takle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.p

RE: [PHP] PRIMARY KEY vs. INDEX

2002-05-02 Thread Steve Bradwell
I was just doing some reading on indexes when I saw this post and I have a question about "Over Indexing". I have a MySQL table that stores inventory transactions, in, out etc. I mainly store fields that are primary indexes in other tables, Paul DuBois' MySQL book says that anything used in a wher

[PHP] eregi

2002-05-02 Thread Fredrik Arild Takle
Hi, I'm doing: eregi("$start(.*)end", $rf, $my_var); And I want it to stop at the first presedence of $end, not the last (thats what this is doing). Any hints? Best Regards Fredrik A. Takle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.p

[PHP] » PHP Installation Problems «

2002-05-02 Thread vins
I have installed php4 with apache 1.3.24. Downgraded apache again. LOL When I wan't to submit a form from say form.php to from2.php with the following fields : input field name=stuff input stuff contains "Hello World" when i submit form.php form2.php displays nothing. I've set form2.p

Re: [PHP] Re: tutorial on global variables

2002-05-02 Thread Philip Olson
An issue/confusion of register_globals, global, and variable scope exists out there; here are some thoughts: a) As of PHP 4.2.0, register_globals defaults to off. This is a major change to consider. register_globals is a PHP directive that lives in php.ini, the configuration file th

RE: [PHP] PRIMARY KEY vs. INDEX

2002-05-02 Thread SP
True. -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: May 2, 2002 3:26 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] PRIMARY KEY vs. INDEX On Friday 03 May 2002 03:17, SP wrote: > Yeah this isn't specifically about php but most people use databases so I > think

Re: [PHP] Batch processing & HTML2PS

2002-05-02 Thread Jason Wong
On Friday 03 May 2002 02:05, Mrdini wrote: > Hi, > > I'm currently working on a warehouse system, and I'd like to print some > labels pretty accurately. > > At the moment, I'm using Mozilla to print, but this just won't do, > especially not when we're expecting to print something like 4,000 labels

[PHP] srand thought

2002-05-02 Thread Gerard Samuel
Quick question. Im using srand to seed array_rand in a script. I read that srand should only be called once per script under the srand manual page. Im using ADODB, and that also uses srand. Now should that warning be a literal warning or should that be 'use srand once per page'?? Thanks --

[PHP] Pointer Size

2002-05-02 Thread marius petravičius
hello, php-general, I'm trying to get the size of pointer. First I use $res = fsockopen( $server, $port ); then echo fgets( $handle, 1024 ); But it only gets only one line. So I need to know the size of then pointer. I tried to do it with fstat(), but it didn't work.. So can anyb

Fw: [PHP] date

2002-05-02 Thread Richard Emery
When/If you read the PHP manual, you'll discover that the second parameter MUST be a timestamp; not a text string. - Original Message - From: Norman Zhang <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 02, 2002 2:17 PM Subject: [PHP] date Hi, I am doing a test with the

[PHP] Batch processing & HTML2PS

2002-05-02 Thread Mrdini
Hi, I'm currently working on a warehouse system, and I'd like to print some labels pretty accurately. At the moment, I'm using Mozilla to print, but this just won't do, especially not when we're expecting to print something like 4,000 labels next week :D $client is the MySQL record where the

Re: [PHP] PRIMARY KEY vs. INDEX

2002-05-02 Thread Jason Wong
On Friday 03 May 2002 03:17, SP wrote: > Yeah this isn't specifically about php but most people use databases so I > think this is relevant. I like it when we have discussions like these > instead of someone posting up a bunch of code and asking to find a missing > ' or }. Yes, but that's what t

Re: [PHP] date

2002-05-02 Thread Richard Baskett
Date takes a timestamp, so you would need to do something like this instead: $mydate = strtotime('2002-05-02'); $tdate = date("d M Y", $mydate); Echo $tdate; Cheers! Rick I remember a man of some standing who once came to see me and told me that a friend of his who claimed no small spiritual a

Re: [PHP] date

2002-05-02 Thread Jason Wong
On Friday 03 May 2002 03:17, Norman Zhang wrote: > Hi, > > I am doing a test with the date function, > > $mydate="2002-05-02" > $tdate=date("d M Y", "$mydate"); > echo "$tdate" > > I should expect 02 May 2002. But I get a strange result "31 Dec 1969". Why? > How can I correct this? Please RTFM, d

RE: [PHP] PRIMARY KEY vs. INDEX

2002-05-02 Thread SP
Yeah this isn't specifically about php but most people use databases so I think this is relevant. I like it when we have discussions like these instead of someone posting up a bunch of code and asking to find a missing ' or }. -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTE

[PHP] date

2002-05-02 Thread Norman Zhang
Hi, I am doing a test with the date function, $mydate="2002-05-02" $tdate=date("d M Y", "$mydate"); echo "$tdate" I should expect 02 May 2002. But I get a strange result "31 Dec 1969". Why? How can I correct this? Regards, Norman -- PHP General Mailing List (http://www.php.net/) To unsub

RE: [PHP] PRIMARY KEY vs. INDEX

2002-05-02 Thread SP
Indexes are good but the only thing you have to look out for is not over using it. So don't index all your fields because it will make your database a lot bigger and add more time when inserting and updating. -Original Message- From: Dan Hardiker [mailto:[EMAIL PROTECTED]] Sent: May 2,

RE: [PHP] Problems upgrading PHP..

2002-05-02 Thread Rasmus Lerdorf
Is it showing the right build date? The configure switches should match what you used. -R On Thu, 2 May 2002, Chad Day wrote: > Well, that worked for variable tracking, but MySQL seems to have been broken > in the process.. or rather, PHP accessing it.. > > Warning: MySQL: Unable to save resul

RE: [PHP] Problems upgrading PHP..

2002-05-02 Thread Chad Day
Well, that worked for variable tracking, but MySQL seems to have been broken in the process.. or rather, PHP accessing it.. Warning: MySQL: Unable to save result set in /usr/local/www/vhosts/bangable.com/htdocs/forums/admin/db_mysql.php on line 92 If I do a phpinfo();, my PHP configure line read

RE: [PHP] Problems upgrading PHP..

2002-05-02 Thread Chad Day
php.ini didn't exist before apparently on this server I'm on.. or rather, it was a 0 byte file. Thanks, Rasmus. Chad -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 02, 2002 2:58 PM To: Chad Day Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Problems upg

[PHP] bad row offset

2002-05-02 Thread Joshua E Minnie
I am a little confused with an error I am receiving on a function I am using. Here is the function: function get_user_data($user,$field) { # get_user_data is a base function assuming no errors have # been passed and will return the data of a specific field # based on the value of $user db_con

  1   2   >