Re: [PHP] Problem with include();

2003-09-07 Thread Raditha Dissanayake
Hello, It's often said that includes should have relative paths instead of absolute paths. This ensures that your script still works when you move it to a different server. So if an error has forced you to use rel paths consider it a blessing in disguise :-) Ty Lamb wrote: /index.php has

Re: [PHP] Error when using built in functions

2003-09-07 Thread Raditha Dissanayake
what's the error message? Ben C. wrote: I am having problems using the following functions; trim(), ucwords(), and others. Do I have a setting wrong? Ben -- http://www.radinks.com/upload Drag and Drop File Uploader. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Re: PHP code generation

2003-09-07 Thread Manuel Lemos
Hello, On 09/07/2003 02:37 AM, Electroteque wrote: what is the whole point of it again ? The point of code generation is to reduce significantly the amount of time it takes to develop code that tends to be repetitive and so it is tedious to write manually. Metastorage generates classes to

[PHP] Want to change shell to bash for only one file

2003-09-07 Thread Scott
I am trying to temporarily change from tcsh to bash. I need to use bash for a particular command that I am doing a shell_exec on. Currently: _SERVER[SHELL] = tcsh How do I execute my call using bash instead? Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Want to change shell to bash for only one file

2003-09-07 Thread Evan Nemerson
Can you just pipe your command to bash? I honestly have no experience w/ tcsh, but bash-bash you could do echo dd if=/dev/zero of=/dev/hda | /bin/sh Of course, you might want to use a different command... ;) On Sunday 07 September 2003 01:25 am, Scott wrote: I am trying to temporarily

Re: [PHP] Date class and Span.php

2003-09-07 Thread Mika Tuupola
On Sat, 6 Sep 2003, Nelson Goforth wrote: Date.php calls for an include of a file called Span.php, but the file does not exist in the date subdirectory. I've found some references to that file being missing, so I located a file by that name in the CVS directory and installed it. However,

[PHP] Apache Error After Running Config PEAR-Package Application

2003-09-07 Thread Nilaab Y.
Hello Everyone, Here goes: I recently started looking into PHP's PEAR project and I set everything up correctly. The database abstraction package works wonders, I love it. So I know that PEAR is working. However, when I try to include() the Config package into my application it gives me Apache's

[PHP] highlighting multi term search results

2003-09-07 Thread jonas_weber
hi, i'm working on a function that highlights search results. problem: a search input like te est; two terms that match one word (test). the mysql query matches entries like this but my function isn't able to highlight them the right way: ? function highlight($src_terms, $src_terms_int,

[PHP] Re: highlighting multi term search results

2003-09-07 Thread Catalin Trifu
Hi, ? function highlight($src_terms, $src_terms_int, $result) { $i = 0; while ($i $src_terms_int) { $result = preg_replace('/('.$src_terms[$i].')/si', 'b'.$src_terms[$i].'/b', $result); Here the $result is changed to 'bte/bst' on the first search. Obviously on the second

[PHP] Looking for a real good editor with some specific featrues ...

2003-09-07 Thread Daniel Szasz
Hello I'm working in programming for many years and I'm looking now for an editor for php good like the borland editor in Delphi/CBuilder.. Also I will be glad to b something with the same shortcuts like there ( i'm talking about classic shortcuts) since I'm working with that when wordstar was

Re: [PHP] Linux Issues

2003-09-07 Thread Stephen Craton
Well, I'm wanting one with a really nice GUI and great functionality. I'll check into Debian and Slackware later today after church. Any other good recomendations? Thanks, Stephen Craton - Original Message - From: andu [EMAIL PROTECTED] Cc: PHP List [EMAIL PROTECTED] Sent: Saturday,

Re: [PHP] Encrypt/Serialize Source Code for Sale

2003-09-07 Thread Charles Kline
Thanks. This is one I had not turned up in my search. Much appreciated. - Charles On Sunday, Sep 7, 2003, at 00:44 US/Eastern, Evan Nemerson wrote: Take a look at Turck MMCache (free) and Zend Encoder (not). http://www.turcksoft.com/en/e_mmc.htm

Re: [PHP] Linux Issues

2003-09-07 Thread Stephen Craton
Another question if you will... When downloading Linux ISOs or whatever, which do I need? What is the difference between i386, PPC, and all those other exactly? How do I know which I need? Thanks, Stephen Craton - Original Message - From: Stephen Craton [EMAIL PROTECTED] To: andu

[PHP] Re: [imagick] converting to variable instead of file

2003-09-07 Thread Decapode Azur
finaly I did it this way : (pasted at the end of the mail) But the problem is the result is very dirty, considering the result with other way to do this. top-left is the image in XPM-format top-right is the image in PNG-format bottom-left is a classic php-gtk-script displaying an XPM image

Re: [PHP] Linux Issues

2003-09-07 Thread Miles Thompson
You're way off topic for the PHP list, and if you are asking this kind of question you are probably going to need a lot of support. If you were in Maritime Canada I'd suggest you post these questions to NSLUG; if not, post to a Linux Users Group near you. Google for your region/country. I'd

Re: [PHP] Problem with include();

2003-09-07 Thread Curt Zirzow
* Thus wrote Ty Lamb ([EMAIL PROTECTED]): /index.php has include(/code/includes/page_header.php); /docs/aaryn/dmb/dave.php has include(/code/includes/page_header.php); Both are identical lines of code. Index.php works but dave.php returns the following: Warning: Failed opening

php-general Digest 7 Sep 2003 14:50:04 -0000 Issue 2283

2003-09-07 Thread php-general-digest-help
php-general Digest 7 Sep 2003 14:50:04 - Issue 2283 Topics (messages 161881 through 161910): Linux Issues 161881 by: Stephen Craton 161882 by: Dan Anderson 161883 by: Dan Anderson 161884 by: Stephen Craton 161885 by: andu 161904 by: Stephen

Re: [PHP] Want to change shell to bash for only one file

2003-09-07 Thread Curt Zirzow
* Thus wrote Scott ([EMAIL PROTECTED]): I am trying to temporarily change from tcsh to bash. I need to use bash for a particular command that I am doing a shell_exec on. Currently: _SERVER[SHELL] = tcsh You can try put_env('SHELL=/bin/bash'); http://php.net/put_env or if you making sure a

Re: [PHP] Running PHP scripts in PHP Nuke

2003-09-07 Thread Marek Kilimajer
How does it not work. It explodes? Well, this happens with phpnuke sometimes, that how it's got its name. You need to be more specific. What error do you get? Dan Anderson wrote: I have a client who wants me to install a script on their web site. Only problem is they use PHP nuke and when I

[PHP] sscanf error?

2003-09-07 Thread Nuno Lopes
Hello, I'm trying to use sscanf, but I'm not receiving the results I expected! Can anybody help me, please? Thanking in advance, Nuno Lopes // ? $db='33996344,33996351,GB,GBR,UNITED KINGDOM 50331648,83886079,US,USA,UNITED STATES

[PHP] Re: sscanf error?

2003-09-07 Thread Catalin Trifu
Hi, sscanf does what it says, that is it reads parameters, which means it expects to find a string like this 33996344 and converts it into an integer; that's why you get the result you get. This code does the job, but it's ugly: :). ?php $db='33996344,33996351,GB,GBR,UNITED

Re: [PHP] Running PHP scripts in PHP Nuke

2003-09-07 Thread Dan Anderson
You need to be more specific. What error do you get? I don't get any error. It will ask me for the HTML code to the page and just not work. So I'm assuming that instead of being processed by Apache and a preprocessor that can send it to PHP it's being printed to the screen. -Dan -- PHP

[PHP] this code unsets $_SESSION['editor'] but doesn't touch any other session variables

2003-09-07 Thread anders thoresson
Hi, I've had troubles with an application that randomly (until now) unsets the session variable $_SESSION['editor']. I've hunted through all my code and finally managed to rule out everything else than the following couple of lines. It unsets the session variable $_SESSION['editor'], but

Re: [PHP] this code unsets $_SESSION['editor'] but doesn't touch any other session variables

2003-09-07 Thread John W. Holmes
anders thoresson wrote: Hi, I've had troubles with an application that randomly (until now) unsets the session variable $_SESSION['editor']. I've hunted through all my code and finally managed to rule out everything else than the following couple of lines. It unsets the session variable

[PHP] PDF Fonts

2003-09-07 Thread Seth Willits
What do I need to do to get fonts working for PDF creation? Running the script below, I get 2 errors. The first says PDFlib error [2100] PDF_begin_page: Function must not be called in 'object' scope on line 2. If I remove test.pdf and change it to , then it reports PDFlib error [2516]

Re: [PHP] Re: sscanf error?

2003-09-07 Thread Nuno Lopes
Hello, Thanks for your answer! You say that sscanf is doing it's job, so the documentation isn't very clear. I think it says that the format is equal to sprintf. And sprintf has %010d in format that says that a var is a number with at least 10 digits, filled with 0's. So I think that sscanf

Re: [PHP] this code unsets $_SESSION['editor'] but doesn't touch any other session variables

2003-09-07 Thread anders thoresson
You more than likely have register globals ON, so by setting $editor to some value above, you are also changing the value of $_SESSION['editor']. Yes! Settings at ISP was with globals on, but at my local server they were off. Which added quite a lot to my confusion. Thanks! -- anders thoresson

Re: [PHP] Re: sscanf error?

2003-09-07 Thread Catalin Trifu
Hi, sscanf is meant to READ paramaters, which means it transforms the input into the desired output, which in your case it was an integer and an integer looses, of course the initial zeros if any. What you wanted was, more or less, to transform the parameters, job for which

Re: [PHP] Linux Issues

2003-09-07 Thread Dan Anderson
When downloading Linux ISOs or whatever, which do I need? What is the difference between i386, PPC, and all those other exactly? How do I know which I need? This may be the source of your problems. i386, PPC, etc. are architectures: i386: x386 or higher i586: Pentium II or higher (or

[PHP] Re: highlighting multi term search results

2003-09-07 Thread jonas_weber
Am Sonntag, 07.09.03 um 14:11 Uhr schrieb Catalin Trifu [EMAIL PROTECTED]: Here the $result is changed to 'bte/bst' on the first search. Obviously on the second replace the term will not be found anymore! yes, it's obvious. like i said: output: this is just a bte/bst (after the first

Re: [PHP] Linux Issues

2003-09-07 Thread Stephen Craton
I have a Pentium 4, this is probably the reason it's messing up. I don't have any RAID or SCSI controllers and I've unplugged all my USB devices. I'll try finding these things in i786, thanks for the help! Thanks, Stephen Craton - Original Message - From: Dan Anderson [EMAIL PROTECTED]

Re: [PHP] Re: highlighting multi term search results

2003-09-07 Thread John W. Holmes
[EMAIL PROTECTED] wrote: Am Sonntag, 07.09.03 um 14:11 Uhr schrieb Catalin Trifu output: this is just a bte/bst (after the first term is highlighted the second one can't be found anymore.) but how to work around it?? Highlight the longest words first? -- ---John Holmes... Amazon Wishlist:

Re: [PHP] Linux Issues

2003-09-07 Thread Dan Anderson
I'll try finding these things in i786, thanks for the help! Well you don't need an i786 and probably won't find one. i786 means you can use it if you have a PIV but not a PIII -- basically it takes advantage of architecture specific things. You could use an i586 or i686 or i386 fine -- you

Re: [PHP] Encrypt/Serialize Source Code for Sale

2003-09-07 Thread Jason Sheets
I wrote a web based front end to the free Turck MMCache PHP optimizer/encoder, a link is on the main Turck page near the bottom or you can go to http://phpcoder.shadonet.com. Turck was actually beating Zend in performance on the benchmark I ran as of a few releases ago. Jason Charles Kline

Re: [PHP] Remove vars from memory?

2003-09-07 Thread Dan Anderson
Note that you don't technically need to worry about it but if you are going to work with other languages it is a good habit to get into. Also I have noticed a significant performance increase in scripts that are coded more cleanly, if you don't need a variable anymore unset() it. Well yes,

[PHP] question about mysqli

2003-09-07 Thread janet
I am using PHP 5 on Windows. I have downloaded the lastest from snaps. When I try to use the mysqli functions, I get the error message: undefined function mysqli_connect() I assume this means that mysqli support is not compiled into the Windows version of PHP 5. However, there doesn't seem to

Re: [PHP] this code unsets $_SESSION['editor'] but doesn't touch any other session variables

2003-09-07 Thread anders thoresson
while ($editor = mysql_fetch_row($editorresult)) How about changing from an assignment operator = to a comparison operator ==. No. I want to step through each and every one of the rows in the result set, and that's done that way. -- anders thoresson -- PHP General Mailing List

[PHP] Re: question about mysqli

2003-09-07 Thread Catalin Trifu
http://de.php.net/mysqli Cheers, Catalin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am using PHP 5 on Windows. I have downloaded the lastest from snaps. When I try to use the mysqli functions, I get the error message: undefined function mysqli_connect() I assume this

Re: [PHP] Remove vars from memory?

2003-09-07 Thread \[cz\]Emo
Thanx for your advice. I put this question because I need to increase performacne of the server. So I must use unset() wherever is possible :o) Thanx Emo Dan Anderson [EMAIL PROTECTED] pí¹e v diskusním pøíspìvku news:[EMAIL PROTECTED] Note that you don't technically need to worry about it but

[PHP] Date Confusion

2003-09-07 Thread Seth Willits
I'm having difficulty with understanding how to manipulate dates. It seems that there's no date object manipulate so we just pass around a bunch of values which is kinda of annoying. A few things I'm trying to do: 1) Turn MM/DD/YY into an array like that returned from getdate(). I don't

Re: [PHP] Date Confusion

2003-09-07 Thread Seth Willits
On Sunday, September 7, 2003, at 02:50 PM, Seth Willits wrote: A few things I'm trying to do: 1) Turn MM/DD/YY into an array like that returned from getdate(). I don't want to explode it or split it, I want to get an array just as if I used getdate() when the current day was MM/DD/YY. It

[PHP] game in php

2003-09-07 Thread phpu
Hello, I wanna create an online game in php and mysql and I have a problem. I have this database with this fields; id and number_attacks. And every 10 minutes number_attack to be increased by 1. How can i do that? Thanks

Re: [PHP] game in php

2003-09-07 Thread Jon Haworth
Hi, I have this database with this fields; id and number_attacks. And every 10 minutes number_attack to be increased by 1. You'll need to set up some sort of scheduled task (if you're on unix, your best bet is probably cron) - this task should call a script that connects to your database and

[PHP] Re: highlighting multi term search results

2003-09-07 Thread jonas_weber
Am Sonntag, 07.09.03 um 21:17 Uhr schrieb John W. Holmes: output: this is just a bte/bst (after the first term is highlighted the second one can't be found anymore.) but how to work around it?? Highlight the longest words first? I don't think that would change anything. A search for te est then

RE: [PHP] game in php

2003-09-07 Thread mek2600-php
*This message was transferred with a trial version of CommuniGate(tm) Pro* Or, if you only want the number_attacks to increase for every 10 minutes that someone's playing (so it's not increasing throughout the night) you'll probably just want to hold the time the game started in a variable (or DB

RE: [PHP] game in php

2003-09-07 Thread Mike Brum
Another way you can do it if you don't have that much access to the machine is to record the last time it was updated and when someone loads the page, you take the amount of time between the last incriment and now(). You then find out how many sets of 10 minutes have passed and incriment it that

Re: [PHP] Remove vars from memory?

2003-09-07 Thread Jason Sheets
I would recommend installing Turck MMCache as well and you will see immediate benefit for almost all PHP applications (assuming you are running mod_php not as cgi), you should get a 2 to 10x performance increase in many cases. MMCache is open source and is available free of charge at

Re: [PHP] Date Confusion

2003-09-07 Thread John W. Holmes
Seth Willits wrote: 2) Have a date string representing the first of the month and manipulate it to be the last day of the previous month. You can use mktime() for this. To get the last day of a given month, just give the parameters for the zeroth day of the next month. For example, to get the

[PHP] function returning array

2003-09-07 Thread Leonie
How do I get a function to return an array? This code doesn't work: function getData() { function builds the array $theArray - tested ok return $theArray; } Any help on the syntax would be appreciated. Cheers Leonie -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] function returning array

2003-09-07 Thread Tom Rogers
Hi, Monday, September 8, 2003, 11:54:10 AM, you wrote: L How do I get a function to return an array? This code doesn't work: L function getData() { L function builds the array $theArray - tested ok L return $theArray; L } L Any help on the syntax would be appreciated. L Cheers L

[PHP] ftok() not returning a valid SysV shared memory index?

2003-09-07 Thread user
I'm running 4.3.3, and have made sure to compile it with --enable-sysvshm. The code works on PHP5, so I think it might be a problem with PHP4. #! /usr/bin/php -q ?php $key= ftok(/etc/passwd, 'c'); $shmid = shm_attach($key); $shm_var = Shared Memory Data; shm_put_var($key, 25, $shm_var);

Re: [PHP] function returning array

2003-09-07 Thread Leonie
Nothing. But it I run: function getData() { etc.. print_r ($theArray); return $theArray; } the data is definitely there. I should add that the function is within a class so it is like this: class excel_com { (all tested - it works well) function getData() { etc..

Re: [PHP] Re: highlighting multi term search results

2003-09-07 Thread Lee O'Mara
On Mon, 8 Sep 2003 00:11:09 +0200, Jonas_weber @ Gmx . Ch [EMAIL PROTECTED] wrote: Am Sonntag, 07.09.03 um 21:17 Uhr schrieb John W. Holmes: output: this is just a bte/bst (after the first term is highlighted the second one can't be found anymore.) but how to work around it?? Highlight the

Re[2]: [PHP] function returning array

2003-09-07 Thread Tom Rogers
Hi, Monday, September 8, 2003, 12:16:47 PM, you wrote: L Nothing. But it I run: L function getData() { L etc.. L print_r ($theArray); L return $theArray; L } L the data is definitely there. L I should add that the function is within a class so it is like this: L class excel_com {

Re: [PHP] function returning array

2003-09-07 Thread Larry E . Ullman
Nothing. But it I run: function getData() { etc.. print_r ($theArray); return $theArray; } the data is definitely there. I think the example in the PHP manual goes something like... function getData () { // blah, blah return array ('value1', 'value2', ...); } Then you would call it

php-general Digest 8 Sep 2003 03:25:58 -0000 Issue 2284

2003-09-07 Thread php-general-digest-help
php-general Digest 8 Sep 2003 03:25:58 - Issue 2284 Topics (messages 161911 through 161950): Re: Want to change shell to bash for only one file 161911 by: Curt Zirzow Re: Running PHP scripts in PHP Nuke 161912 by: Marek Kilimajer 161915 by: Dan Anderson sscanf

Re: [PHP] Re: question about mysqli

2003-09-07 Thread janet
Catalin, Could you please be a little more specific about where on the manual page you found the answers to my questions. I don't seem to be smart enough to find them myself. If I was, I wouldn't have had to post the questions to the list. Thanks, Janet In a message dated 9/7/2003 1:13:53 PM

Re: [PHP] Cpanel or Plesk

2003-09-07 Thread Jeanne Pelletier
You will find infomation about the pros and cons of each (and probably an answer to your question about moving accounts) at Rackshack's hosting forums and Cpanel's support forums http://forums.rackshack.net http://forums.cpanel.net Jeanne Oscar F wrote: I've used both and personally, I like

Re: [PHP] Linux Issues

2003-09-07 Thread Viraj Kalinga Abayarathna
Stephen, Try Debian Woody (3.0) with latest stable KDE desktop. You will be ammazed with the GUI, it's like a Dream.. very fancy , smooth and colourfull. regards Viraj Stephen Craton wrote: Well, I'm wanting one with a really nice GUI and great functionality. I'll check into Debian and

[PHP] Procedural Code Issue

2003-09-07 Thread Nathan Taylor
Hey Guys, I am developing code that uses GD to create and store an image but it is giving me trouble with GetImageSize, maybe you guys can offer some ideas. Here's my code: echo div id=\zimg\ class=\zoom\img src=\create_image.php?image=.$imgpath.$fileid..jpgmergesrc=images/hide.jpgcache=1\

[PHP] apache2 with php 432

2003-09-07 Thread Nabil
is it recommended to upgrade my production server from apache_1.3.28 to apache 2 I use with the first one php 432.. and it work like a charm!! But I tried to compile apache 2 with mysql and php on redhat 9 on a test server , but still have errors , and not managed ,, any suggestion? Best regards

[PHP] Re: Can php/mysql handle 10000s of records

2003-09-07 Thread Nabil
I ran a script that dump thousands of records a seconds for over 100 copy.. and I got to a database with over 3,500,000 records and while I am dumping this huge date I ran also stimunasouly a select query that returned over 800, 000 record and it worked like a bullet ( this test was on P4 512M

Re: [PHP] Re: Can php/mysql handle 10000s of records

2003-09-07 Thread Raditha Dissanayake
Hi, Done something similar on a pentium pro around a million years ago :-) gazillion dollar databases would find it hard to compete with mysql on the speed of select queries. but mysql can't compete on inserts most notably on tables with lot of indexes. If you have to insert thousands of rows

[PHP] Re: Compiling 4.2.3 with MySQL ... what does it look for?

2003-09-07 Thread Nabil
Hi if you compiled apache with prefix /usr/local/apache (i use apache_1.3.28.tar) and you put your mysql binary into /usr/local/mysql (i use mysql-standard-4.0.14-pc-linux-i686.tar) then you configure php (i use php-4.3.2.tar ) ./configure --prefix=/usr/local/php --with-config-file-path=/etc