[PHP] session looses variable

2004-06-17 Thread Anthony Weston
Hi, This is what is probably a newbie session problem. I've been having some trouble with sessions on php 4.0.6, I'm developing a website in which I don't have direct control over the server. Due to some other problems I created a test counter script to try to narrow down where the problem

[PHP] Email with attachment function

2004-06-17 Thread Mark Cubitt
Hello, I'm trying to write a function that sends an email with an attachment using sendmail, But I can't seem to get it working, the code I currently have is below, Any ideas would be much appreciated. I'm probably doing something stupid as the output is what its meant to be except it isn't

[PHP] Re: Email with attachment function

2004-06-17 Thread Merlin
Hi Mark, don't try to invent the wheel twice. There are great functions for that already available. Try to search for phpmailer. Thats a great one. Merlin Mark Cubitt wrote: Hello, I'm trying to write a function that sends an email with an attachment using sendmail, But I can't seem to get it

[PHP] Re: PDF Templates with PHP

2004-06-17 Thread Torsten Roehr
Merlin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] HI there, I am wondering if it is possible to generate a pdf page with pdflib based on a existing pdf document. For example using an invoice template and filling in the values with php. The last time I checked it (1 year ago)

[PHP] how to build php from sources on windows using nmake

2004-06-17 Thread Eadala Dhananjaya Reddy
Hi, Can someone tell me how to build the php from sources on windows using nmake. I know how to export .mak make file from visual studio. But If I go that way, I couldn't see the support for oci8 support related stuff. Thanks Dhananjaya __ Do

[PHP] PHP 4 and PHP 5 on same windows server

2004-06-17 Thread Chris Lott
Are there instructions available (or can anyone fill me in) on the best way to set up PHP 5 to run on my Windows/Apache server concurrently with my PHP4 install? I am currently running PHP4 as an Apache module... c -- Chris Lott -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] What's this

2004-06-17 Thread Pieter from SA
Hi This has me confused, is this Java or a php class, a constant or what?, i have never seen this kind of action. form method=post action={S_MODE} In what type of file will i find the S_MODE. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] PHP 4 and PHP 5 on same windows server

2004-06-17 Thread Thijs Lensselink
Well you can compile php4 as apache module (.so) and load it the normal way. Then you can compile php5 as a cgi binary and load it in a virtual host like this: ScriptAlias /cgi-bin/ /var/www/cgi-bin/ Action php5-script /cgi-bin/php5/php AddHandler php5-script .php .phtml Options

RE: [PHP] What's this

2004-06-17 Thread Jay Blanchard
[snip] This has me confused, is this Java or a php class, a constant or what?, i have never seen this kind of action. form method=post action={S_MODE} In what type of file will i find the S_MODE. [/snip] A quick Google indicates .NET -- PHP General Mailing List (http://www.php.net/) To

[PHP] Re: What's this

2004-06-17 Thread Christof Rath
Pieter From Sa wrote: form method=post action={S_MODE} It seems to be part of a template. There should be a kind of template class or at least a substitution routine, which will be called before the page will be displayed, that replaces {S_MODE} with a useful value. c. -- PHP General Mailing

[PHP] PHP5: serialize private properties

2004-06-17 Thread Christof Rath
Is it possible (I think it has to) to serialize object with private properties (and of course storing these properties as well)? I couldn't using the magic __sleep() function... Best regards, c. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: What's this

2004-06-17 Thread Pieter from SA
This type of action is used in a lot of files in PHPbb. I need to change someting in the Jump to at the bottom of Search and memberlist pages. Pieter From Sa [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi This has me confused, is this Java or a php class, a constant or what?, i

[PHP] crazy readdir bug

2004-06-17 Thread Matt Richards
Imagine the following: 362class someClass { 363 function someFunction() { 364if($rDirectory = opendir(/templates)) { 365 while(false != ($strFile = readdir($srDirectory))) { 366print $strFile.br /; 367 } 368 } 369 } 370} The class is constructed successfully, the function

[PHP] Re: Thanks :)

2004-06-17 Thread Hitcho
attachment: sscnekarpd.bmp-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] html problem

2004-06-17 Thread Brent Clark
Hi all When ever I do echo on my variable I get the following out: Business%20Class is there a way to strip the %20, or what ever be displaying if the future. If someone could assist, it would be most appreciated. Kind Regards Brent Clark -- PHP General Mailing List (http://www.php.net/) To

[PHP] Very strange bug. Opendir/Readdir

2004-06-17 Thread Matt Richards
Imagine the following: 362class someClass { 363 function someFunction() { 364if($rDirectory = opendir(/templates)) { 365 while(false != ($strFile = readdir($srDirectory))) { 366print $strFile.br /; 367 } 368 } 369 } 370} The class is constructed successfully, the

[PHP] Problems with arrays

2004-06-17 Thread Phpu
Hi, I have this array: $array = array(element1, element2, element3, element4) I want to list all elements of this array, so i used: foreach ($array as $index = $element) { $InputString = $element; echo $InputString; } but this code lists the elements like this:

Re: [PHP] html problem

2004-06-17 Thread Oliver Hankeln
Brent Clark wrote: Hi all When ever I do echo on my variable I get the following out: Business%20Class is there a way to strip the %20, or what ever be displaying if the future. It looks like this is urlencoded. (%20 = hex 20 = Space) use echo urldecode($var); to output it. Oliver -- PHP General

Re: [PHP] Problems with arrays

2004-06-17 Thread Oliver Hankeln
Phpu wrote: Hi, I have this array: $array = array(element1, element2, element3, element4) I want to list all elements of this array, so i used: foreach ($array as $index = $element) { $InputString = $element; echo $InputString; } but this code lists the elements like

Re: [PHP] Problems with arrays

2004-06-17 Thread Steve Douville
What are you outputting? html, text, email body...?? - Original Message - From: Phpu [EMAIL PROTECTED] To: Oliver Hankeln [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:06 AM Subject: Re: [PHP] Problems with arrays I've tried this but it is not working ...

Re: [PHP] Problems with arrays

2004-06-17 Thread Phpu
I want the element of the array to be displayed in a select field - Original Message - From: Steve Douville [EMAIL PROTECTED] To: Phpu [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 4:12 PM Subject: Re: [PHP] Problems with arrays What are you outputting? html,

Re: [PHP] Problems with arrays

2004-06-17 Thread Steve Douville
Can you give us the code from select to /select? - Original Message - From: Phpu [EMAIL PROTECTED] To: Steve Douville [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:14 AM Subject: Re: [PHP] Problems with arrays I want the element of the array to be displayed in

Re: [PHP] Problems with arrays

2004-06-17 Thread Phpu
Here is the code: select name=model class=gform onchange=model_jump('parent', this) option value=0 ? foreach ($nav_model_names as $index = $element) { $InputString = $element; echo $InputString; } ?/option /select - Original Message

[PHP] Re: PDF Templates with PHP

2004-06-17 Thread Matt Matijevich
[snip] I am wondering if it is possible to generate a pdf page with pdflib based on a existing pdf document [/snip] Look into the pdflib examples that you get when you download pdflib. I am pretty sure there is an example invoice template in it. Also look into the pdf blocks in pdflib. -- PHP

Re: [PHP] Problems with arrays

2004-06-17 Thread Steve Douville
I'm going to take a leap and make an assumption that what you want to end up with is a select list of model names. I'm not sure what the value should be, whether you want the value returned to you to be the $index the model or the $element value. You can adjust either way. (By the way, you don't

Re: [PHP] Problems with arrays

2004-06-17 Thread Daniel Clark
echo $InputString . 'BR'; // for HTML echo $InputString\n; // for output to screen Hi, I have this array: $array = array(element1, element2, element3, element4) I want to list all elements of this array, so i used: foreach ($array as $index = $element) {

[PHP] Re: Email with attachment function

2004-06-17 Thread Manuel Lemos
Hello, On 06/17/2004 04:38 AM, Mark Cubitt wrote: Hello, I'm trying to write a function that sends an email with an attachment using sendmail, But I can't seem to get it working, the code I currently have is below, Any ideas would be much appreciated. I'm probably doing something stupid as the

RE: [PHP] Problems with arrays

2004-06-17 Thread Ford, Mike [LSS]
On 17 June 2004 14:27, Phpu wrote: Here is the code: select name=model class=gform onchange=model_jump('parent', this) option value=0 ? foreach ($nav_model_names as $index = $element) { $InputString = $element; echo $InputString; } /option

Re: [PHP] html problem

2004-06-17 Thread Angelo binc2
Hi Brent, Looks like the urldecode() method can help you. Check it out in the manual Angelo Brent Clark [EMAIL PROTECTED] 6/17/2004 2:51:23 PM Hi all When ever I do echo on my variable I get the following out: Business%20Class is there a way to strip the %20, or what ever be displaying

Re: [PHP] Read Last Lines of a Text File

2004-06-17 Thread Scott Miller
* Thus wrote Scott Miller ([EMAIL PROTECTED]): I have a text file (log file) that I want to be able to read the last 30 or 40 lines of. I've created the code below, but since this file is so large (currently 8 MB) it won't work. The code works on smaller files, but not this one. Can

RE: [PHP] Very strange bug. Opendir/Readdir[Scanned]

2004-06-17 Thread Michael Egan
Matt, I've only just started to have a look at this. Having first tried to see if the code worked outside the class I was receiving the same error message but this might be attributable to line 365 including a reference to $srDirectory rather than $rDirectory. I'll carry on working with it.

Re: [PHP] Very strange bug. Opendir/Readdir

2004-06-17 Thread Curt Zirzow
* Thus wrote Matt Richards ([EMAIL PROTECTED]): Imagine the following: 362class someClass { 363 function someFunction() { 364if($rDirectory = opendir(/templates)) { 365 while(false != ($strFile = readdir($srDirectory))) { Looks like a typo, you're assigning rDirectory but using

Re: [PHP] Read Last Lines of a Text File

2004-06-17 Thread Oliver Hankeln
Scott Miller wrote: * Thus wrote Scott Miller ([EMAIL PROTECTED]): I have a text file (log file) that I want to be able to read the last 30 or 40 lines of. I've created the code below, but since this file is so large (currently 8 MB) it won't work. The code works on smaller files, but not this

Re: [PHP] ImageMagick

2004-06-17 Thread Decapode Azur
Does anyone knows if PHP library for ImageMagick has multilanguage support? I am planning to use it but I have not found anything related to this on their site Do you mean for the error messages ? IMHO the error messages are for the programer, so there is not a real need to be multi-language.

Re: [PHP] Read Last Lines of a Text File

2004-06-17 Thread Scott Miller
- Original Message - From: Oliver Hankeln [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:13 AM Subject: Re: [PHP] Read Last Lines of a Text File Scott Miller wrote: * Thus wrote Scott Miller ([EMAIL PROTECTED]): I have a text file (log file) that I want

Re: [PHP] Read Last Lines of a Text File

2004-06-17 Thread Oliver Hankeln
Scott Miller wrote: I've changed my script to the following: ?php $file =/var/log/radius.log; $fp = popen(/usr/bin/tail -$limit $file, 'r'); if (! $fp ) { echo 'unable to pipe command'; } while (!feof($fp) ) { $line = fgets($fp); print $line; } ? And now get the following errors: Warning: Wrong

[PHP] Problem with mail()

2004-06-17 Thread Keith Aldridge
New to php, can't see the problem with mail(). Server running 4.0.0 Path to sendmail: /var/sbin/sendmail Using a simple form for test purposes, collect three pieces of info: name, address, csz then POST to the page containing the code below. All of the echo statements produce the

Re: [PHP] Read Last Lines of a Text File

2004-06-17 Thread Scott Miller
- Original Message - From: Oliver Hankeln [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:29 AM Subject: Re: [PHP] Read Last Lines of a Text File Scott Miller wrote: I've changed my script to the following: ?php $file =/var/log/radius.log; $fp =

Re: [PHP] Read Last Lines of a Text File

2004-06-17 Thread Daniel Clark
Try adding number of bytes to read. $line = fgets($fp, 4096); * Thus wrote Scott Miller ([EMAIL PROTECTED]): I have a text file (log file) that I want to be able to read the last 30 or 40 lines of. I've created the code below, but since this file is so large (currently 8 MB) it

Re: [PHP] Read Last Lines of a Text File

2004-06-17 Thread Oliver Hankeln
Scott Miller wrote: - Original Message - From: Oliver Hankeln [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:29 AM Subject: Re: [PHP] Read Last Lines of a Text File Scott Miller wrote: I've changed my script to the following: ?php $file =/var/log/radius.log;

Re: [PHP] index.php not loading up

2004-06-17 Thread Marek Kilimajer
Nguyen, Long P (Mission Systems) wrote --- napĂ­sal:: Doesn't look like it.. DocumentRoot /var/www/html short_open_tag is OFF. This means that ? does not mark the beginnig of PHP code. This: http://158.114.148.90/? echo $sys_graphics . alt=Keystone 2 / will result in this link:

Re: [PHP] Re: What's this

2004-06-17 Thread Keith Greene
This stuff is common in PHPbb. Usually you will find the constants like that located in the template files. The definitions for those constants are usually found in the php file associated with that template file. For example, if you found form method=post action={S_MODE} in

Re: [PHP] Read Last Lines of a Text File

2004-06-17 Thread Scott Miller
- Original Message - From: Oliver Hankeln [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 10:01 AM Subject: Re: [PHP] Read Last Lines of a Text File Scott Miller wrote: - Original Message - From: Oliver Hankeln [EMAIL PROTECTED] To: [EMAIL

RE: [PHP] Value in URL issue

2004-06-17 Thread Mike R
Thanks to all for your help - I nuked php, re-installed it, and everything is cool now. Still odd why it started happening to begin with. :\ :) -Mike -Original Message- From: Gabino Travassos [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 5:02 PM To: [EMAIL

RE: [PHP] Unexpected behaviuor with __CLASS__

2004-06-17 Thread Rick Fletcher
on RedHat with PHP 4.3.6 the following code produces 'test' - I'm expecting 'test2': class test { function printClass() { echo __CLASS__; } } class test2 extends test { } test2::printClass(); I would like to get/echo the name of the class calling the method

Re: [PHP] Problem with mail()

2004-06-17 Thread John Nichel
Keith Aldridge wrote: New to php, can't see the problem with mail(). snip ?php if (mail($to, $subj, $body)) { echo (Successful send); } else { echo (Failed); } ? Please don't send email to a mailing list asking for read reciepts. Can the box that you're testing this script

Re: [PHP] Read Last Lines of a Text File

2004-06-17 Thread Matt Matijevich
[snip] ?php $file =/var/log/radius.log; $fp = popen(/usr/bin/tail -$limit $file, 'r'); if (! $fp ) { echo 'unable to pipe command'; } while (!feof($fp) ) { $line = fgets($fp, 4096); print $line.br; } ? I've tried bumping up the 4096 to a higher number because it currently only shows me

Re: [PHP] Read Last Lines of a Text File

2004-06-17 Thread Scott Miller
[snip] ?php $file =/var/log/radius.log; $fp = popen(/usr/bin/tail -$limit $file, 'r'); if (! $fp ) { echo 'unable to pipe command'; } while (!feof($fp) ) { $line = fgets($fp, 4096); print $line.br; } ? I've tried bumping up the 4096 to a higher number because it

[PHP] PDF generator?

2004-06-17 Thread Dustin Wish with INDCO Networks
I have a PDF that I need to insert values into from a web form. I would like to input directly into the PDF from the web. Any pointers to the right direction? Dustin Wish System Engineer Programmer INDCO Networks Pres. OSSRI Pres. WTA Arkansas

Re: [PHP] PDF generator?

2004-06-17 Thread Matt Matijevich
[snip] I have a PDF that I need to insert values into from a web form. I would like to input directly into the PDF from the web. [/snip] http://www.php.net/pdf if you want to get the license. http://www.php.net/fdf fdf There is also the option on just editing the text in the pdf but I have not

Re: [PHP] Problem with mail()

2004-06-17 Thread Ashwin Purohit
So what do you get as the error message? Does it just return failed? Also, I think using parentheses with echo statements like yours is unnecessary. Keith Aldridge wrote: New to php, can't see the problem with mail(). ?php if (mail($to, $subj, $body)) { echo Successful send; } else { echo

Re: [PHP] Problem with mail()

2004-06-17 Thread qwerty
This should work: if (mail($to, $subj, $bodytext)) { echo Mail send; } else { echo ... something go wrong: } One tip: when configuring/installing php, if there is not /usr/bin/sendmail it asumes that there is no way of send mails so mail function always return false, check that just in case.

[PHP] wierd sendmail/mail problems

2004-06-17 Thread pmd
Hi all, am baffled...I've got a function to email a message that works perfectly as a simple function. I've written it 2 ways, (1) using mail and (2) writing the message to a tempfile and then sending the tempfile to sendmail both ways work. Now here's the problem...when I incorporate this

[PHP] Odd behavior with unset, array indexes, and types

2004-06-17 Thread Michael Sims
Just noticed this today. The following script: quote $a = 2; $b = ceil(3 / 2); if ($a == $b) { print \$a and \$b are the same.\n; } $foo[$a] = '2'; if (isset($foo[$b])) { print \$foo[\$b] is set.\n; } unset($foo[$b]); print_r($foo); /quote Results in this output: quote $a and $b are

Re: [PHP] Odd behavior with unset, array indexes, and types

2004-06-17 Thread Thomas Goyne
On Thu, 17 Jun 2004 16:52:32 -0500, Michael Sims [EMAIL PROTECTED] wrote: ceil() returns a variable of type double. In the above script I expected $foo to become an empty array after calling unset(). But it seems that unset() will not remove an array element when you refer to its key

RE: [PHP] Odd behavior with unset, array indexes, and types

2004-06-17 Thread Michael Sims
Thomas Goyne wrote: On Thu, 17 Jun 2004 16:52:32 -0500, Michael Sims [EMAIL PROTECTED] wrote: ceil() returns a variable of type double. In the above script I expected $foo to become an empty array after calling unset(). But it seems that unset() will not remove an array element when you

Re: [PHP] Problem with mail()

2004-06-17 Thread Curt Zirzow
* Thus wrote Keith Aldridge ([EMAIL PROTECTED]): New to php, can't see the problem with mail(). Server running 4.0.0 Path to sendmail: /var/sbin/sendmail Please don't double/quad space, it makes things hard to read ... if (mail($to, $subj, $body)) { echo

[PHP] http to https

2004-06-17 Thread Ryan Schefke
I'm getting some strange behavior when trying to go from http to an https script. After clicking a form submit button the script will execute the two lines below. It does this and sends it to the correct page without the https, only http. What is strange is when I go back on my browswer and

Re: [PHP] http to https

2004-06-17 Thread Andre Dubuc
Hi Ryan, I encountered all sorts of problems attempting to do the same (especially with AOL, Yahoo, etc click-throughs). I finally resolved the problem by calling https on the page itself (which is listed then as http) like so at the top (after my session_start(); of course: ?php if

RE: [PHP] http to https

2004-06-17 Thread Chris W. Parker
Ryan Schefke mailto:[EMAIL PROTECTED] on Thursday, June 17, 2004 4:28 PM said: [snip] [snip] [snip] What am I doing wrong? you're pressing the return key too much. 0_0 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] http to https

2004-06-17 Thread Ryan Schefke
Quick follow up... Has anyone had any issues with redirecting from an http script to https? Every time I try to to a redirect to https it hangs. For example, I write a simple script like this, nothing... ?php header ('Location https://www.tgwedding.com/payment6.php'); ? ...but if I type that

RE: [PHP] http to https

2004-06-17 Thread Ryan Schefke
Hi Andre, Thanks for responding. I'm not using sessions, just cookies. I used your recommendation in the code below (which gets executed if the submit button is pushed. It still sends it to http://www.tgwedding.com/payment6.php; instead of https://www.tgwedding.com/payment6.php; Any advice

[PHP] This weird behavior is killing

2004-06-17 Thread php.net
The way PHP handles includes is very weird, for example: - create a folder, name it f ex includes - create 2 sub-folders, call them level1 and level2 - now lets create a file, includes.php includes.php -- ? echo testing; ?

Re: [PHP] This weird behavior is killing

2004-06-17 Thread Daniel Silva
Php.Net wrote: The way PHP handles includes is very weird, for example: - create a folder, name it f ex includes - create 2 sub-folders, call them level1 and level2 - now lets create a file, includes.php includes.php -- ? echo testing; ?

[PHP] DBG Debugger

2004-06-17 Thread gary
I've downloaded DBG but can't get it to work with any of the IDEs it supposedly works with. Can anyone supply links to an IDE and a DBG version that integrate and work together correctly? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] http to https

2004-06-17 Thread Andre Dubuc
Well, I'm no php-guru, that's for sure, but if you are trying to call: https://www.tgwedding.com/payment6.php from http://www.tgwedding.com/payment6.php might be where the problem lies. You might need to do a 'refresh' since What is strange is when I go back on my browser and resubmit, it

Re: [PHP] http to https

2004-06-17 Thread hitek
try placing an exit(); after your header line. At 04:27 PM 6/17/2004, Ryan Schefke wrote: I'm getting some strange behavior when trying to go from http to an https script. After clicking a form submit button the script will execute the two lines below. It does this and sends it to the correct

[PHP] Config sh problem and Imagick

2004-06-17 Thread [EMAIL PROTECTED]
Sorry but I am having problems with the PHP-Install list. Anyone have any insights on compling with Imagick. Is that what is causing this problem of the error at the bottom of the message? Here is my configure statement: ./configure --with-apxs=/usr/local/www/bin/apxs --enable-ftp --with-dom

[PHP] Intermittent PHP operation

2004-06-17 Thread Jeff
Hello all... I am new to php and the news group so sorry if I don't provide all of the info you need. Just ask and I will post more. My question is this... it appears like my php is operating intermittently when connecting to mysql. I have the die statements in my connection code... but the

Re: [PHP] Config sh problem and Imagick

2004-06-17 Thread Curt Zirzow
* Thus wrote [EMAIL PROTECTED]: Sorry but I am having problems with the PHP-Install list. Anyone have any insights on compling with Imagick. Is that what is causing this problem of the error at the bottom of the message? Here is my configure statement: ./configure

[PHP] PHP based image database

2004-06-17 Thread Chris Lott
I'm looking for an open source, PHP-based image repository/database application. There are numerous examples on the web of this kind of application, but I am hoping to find something designed for (or more suitable for) scientific images. In particular, something that uses standard meta-data

Re: [PHP] Odd behavior with unset, array indexes, and types

2004-06-17 Thread Curt Zirzow
* Thus wrote Michael Sims: Thomas Goyne wrote: On Thu, 17 Jun 2004 16:52:32 -0500, Michael Sims [EMAIL PROTECTED] wrote: ceil() returns a variable of type double. In the above script I expected $foo to become an empty array after calling unset(). But However, array indexes are