|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 21 Dec 2005 05:26:18 -0000 Issue 3862
php-general-digest-help
lists.php.net
Date: Tue Dec 20 2005 - 23:26:18 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 21 Dec 2005 05:26:18 -0000 Issue 3862
Topics (messages 227736 through 227761):
Re: Write a FIFO file
227736 by: Robin Vickery
Re: pspell dictionary issue
227737 by: Adi
227749 by: John Nichel
227753 by: Adi
Hi!
227738 by: Nanu Kalmanovitz
227739 by: Gustav Wiberg
227742 by: Erin Fortenberry
227750 by: John Nichel
Caucho Resin adds PHP
227740 by: Marten Lehmann
Re: ×‘×¢× ×™×™×Ÿ: Re: [PHP] Hi!
227741 by: Mike Smith
Mathmatical formula
227743 by: Mike Smith
227745 by: Jay Blanchard
227746 by: Mike Smith
227747 by: Jay Blanchard
227748 by: Mike Smith
Re: XML Parser set option
227744 by: Derek Williams
Re: asianwhiteskin beauty product
227751 by: Stephen Leaf
Re: asianwhiteskin beauty product [Offficially OT]
227752 by: Jay Blanchard
Logging within Extension
227754 by: Michael B Allen
227757 by: Anas Mughal
227760 by: Michael B Allen
Re: Random Images with no duplicates?
227755 by: Mike
load balancer question
227756 by: jonathan
Help Desk software
227758 by: Daniel Lahey
227759 by: Glenn Sieb
select statement with variables ???
227761 by: Anasta
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
On 12/20/05, Ruben Rubio Rey <ruben
rentalia.com> wrote:
> Robin Vickery wrote:
>
> >I bet your script will finish as soon as you read from the other end -
> >for example by doing 'cat fifo' from a shell.
> >
> Thats it.
> I would like to use fifo, but thats a problem. If there is not process
> reading, it wont work.
> Is there any way to create process?
> Something like:
> exec("echo \"My text $var\" > fifo &"); //(This idea does not work)
Named pipes are blocking - if you open one for reading and there's
nothing writing then the reading process will be blocked. And as
you've just seen, the same happens if you open one for writing and
there's nothing reading it.
You can change that behaviour by specifying the O_NONBLOCK flag when
opening the pipe - if you're opening it for writing, the attempt will
fail immediately rather than waiting for something to read.
I don't know of a way to do that through fopen(), but you can probably
manage it using dio_open() if you *really* want to.
It might be better to rethink how your processes communicate?
-robin
attached mail follows:
I am not on a RPM based system(running slackware)... I have aspell 0.60.4
Adam.
attached mail follows:
Adi wrote:
> I am not on a RPM based system(running slackware)... I have aspell 0.60.4
Okay, what I am asking is this: I understand that you installed aspell
from source. However, it is quite possible that aspell already existed
on your machine. Slackware has a package management system. Check that
to see if a|pspell is also installed that way. Basically, you may have
two versions of a|pspell on your system which are conflicting with each
other.
--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
jnichel
dotcomholdingsofbuffalo.com
attached mail follows:
No sign of aspell packages on the machine...
Adam.
On 12/20/05, John Nichel <john
kegworks.com> wrote:
>
> Adi wrote:
> > I am not on a RPM based system(running slackware)... I have aspell
> 0.60.4
>
> Okay, what I am asking is this: I understand that you installed aspell
> from source. However, it is quite possible that aspell already existed
> on your machine. Slackware has a package management system. Check that
> to see if a|pspell is also installed that way. Basically, you may have
> two versions of a|pspell on your system which are conflicting with each
> other.
>
> --
> John C. Nichel IV
> Programmer/System Admin (ÜberGeek)
> Dot Com Holdings of Buffalo
> 716.856.9675
> jnichel
dotcomholdingsofbuffalo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Take care...
Adam
attached mail follows:
Hi!
Using a Win 2000 WS (work station), I'm trying to write the first PHP
page as shown at http://il2.php.net/manual/en/tutorial.firstpage.php.
The server is a Netware (Novell) 6.5 running Apache, PHP & MySQL all 3
on same server but different volumes.
I created the file named hello.php by copying and pasting the following
text to notepad and put it in my web server root directory I:\HTDocs:
Example 2-1. Our first PHP script: hello.php<html>:
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>
When I am accessing the site with IE browser at the
http://www.kalmanovitz.co.il/hello.php URL address I can see a blank
page.
The other pages are shown correctly.
Any Idea how to fix it and continue with the tutorial?
TIA
Nanu
attached mail follows:
Hi there!
View source-code of output. Maybe that could give you a clue! :-)
/G
http://www.varupiraten.se/
----- Original Message -----
From: "Nanu Kalmanovitz" <nanu
kalmanovitz.co.il>
To: <php-general
lists.php.net>
Sent: Tuesday, December 20, 2005 8:10 PM
Subject: [PHP] Hi!
> Hi!
>
> Using a Win 2000 WS (work station), I'm trying to write the first PHP
> page as shown at http://il2.php.net/manual/en/tutorial.firstpage.php.
>
> The server is a Netware (Novell) 6.5 running Apache, PHP & MySQL all 3
> on same server but different volumes.
>
>
> I created the file named hello.php by copying and pasting the following
> text to notepad and put it in my web server root directory I:\HTDocs:
>
> Example 2-1. Our first PHP script: hello.php<html>:
> <head>
> <title>PHP Test</title>
> </head>
> <body>
> <?php echo '<p>Hello World</p>'; ?>
> </body>
> </html>
>
>
> When I am accessing the site with IE browser at the
> http://www.kalmanovitz.co.il/hello.php URL address I can see a blank
> page.
> The other pages are shown correctly.
>
> Any Idea how to fix it and continue with the tutorial?
>
> TIA
>
> Nanu
>
>
>
>
>
>
>
>
>
>
attached mail follows:
It does't look like PHP is setup in Apache.
You should have a line that looks something like this;
And some others that look like this;
AddType application/x-httpd-php .php
AddType application/x-httpd-php .inc
AddType application/x-httpd-php-source .phps
Check out your apache config file.
-Erin
> Hi!
>
> Using a Win 2000 WS (work station), I'm trying to write the first PHP
> page as shown at http://il2.php.net/manual/en/tutorial.firstpage.php.
>
> The server is a Netware (Novell) 6.5 running Apache, PHP & MySQL all 3
> on same server but different volumes.
>
>
> I created the file named hello.php by copying and pasting the following
> text to notepad and put it in my web server root directory I:\HTDocs:
>
> Example 2-1. Our first PHP script: hello.php<html>:
> <head>
> <title>PHP Test</title>
> </head>
> <body>
> <?php echo '<p>Hello World</p>'; ?>
> </body>
> </html>
>
>
> When I am accessing the site with IE browser at the
> http://www.kalmanovitz.co.il/hello.php URL address I can see a blank
> page.
> The other pages are shown correctly.
>
> Any Idea how to fix it and continue with the tutorial?
>
> TIA
>
> Nanu
>
>
>
>
>
>
>
>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Nanu Kalmanovitz wrote:
> Hi!
>
> Using a Win 2000 WS (work station), I'm trying to write the first PHP
> page as shown at http://il2.php.net/manual/en/tutorial.firstpage.php.
>
> The server is a Netware (Novell) 6.5 running Apache, PHP & MySQL all 3
> on same server but different volumes.
>
>
> I created the file named hello.php by copying and pasting the following
> text to notepad and put it in my web server root directory I:\HTDocs:
>
> Example 2-1. Our first PHP script: hello.php<html>:
> <head>
> <title>PHP Test</title>
> </head>
> <body>
> <?php echo '<p>Hello World</p>'; ?>
> </body>
> </html>
>
>
> When I am accessing the site with IE browser at the
> http://www.kalmanovitz.co.il/hello.php URL address I can see a blank
> page.
> The other pages are shown correctly.
>
> Any Idea how to fix it and continue with the tutorial?
You need to tell Apache how to handle PHP pages. In your httpd.conf add
this line :
AddType application/x-httpd-php .php
See here in the manual for further explanation :
http://us2.php.net/manual/en/install.windows.apache1.php
--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
jnichel
dotcomholdingsofbuffalo.com
attached mail follows:
Hi,
has anyone read this:
http://www.theserverside.com/news/thread.tss?thread_id=38144
The Java-implementation of the PHP-spec is announced to be six times
faster than mod_php itself.
Regards
Marten
attached mail follows:
On 12/20/05, Nanu Kalmanovitz <nanu
kalmanovitz.co.il> wrote:
>
> Thanks!
>
> Since I am a newbie with the Apache \ PHP \ MySQL, can u tell me what file
> and what shall I add\change in it?
>
> TIA
>
> Nanu
>
Google for install php netware
Try: http://developer.novell.com/ndk/whitepapers/namp.htm
attached mail follows:
I have an application that allows the users to input a formula:
(Width*Height)/144
This formula gets updated with a part's specific width & height and
actually returns:
(36.00000*58.00000)/144
I use preg_replace to replace Width and Height with values from the
following array:
[Width] => 36.00000
[Height] => 58.00000
How can I get the resulting formula to actually calculate?
Simplified version of my code:
$partFormula = '(Width*Height)/144';
$prof = array('Width'=>36,'Height'=>58);
$find = array();
$replace = array();
foreach($prof AS $key => $val){
array_push($find,"[$key]");
array_push($replace,$val);
}
return preg_replace($find,$replace,$partFormula);
//returns (36.00000*58.00000)/144
eval() doesn't seem to do much for me (parse error, unexpected $end).
Thanks,
Mike
attached mail follows:
[snip]
I have an application that allows the users to input a formula:
(Width*Height)/144
This formula gets updated with a part's specific width & height and
actually returns:
(36.00000*58.00000)/144
I use preg_replace to replace Width and Height with values from the
following array:
[Width] => 36.00000
[Height] => 58.00000
How can I get the resulting formula to actually calculate?
Simplified version of my code:
$partFormula = '(Width*Height)/144';
$prof = array('Width'=>36,'Height'=>58);
$find = array();
$replace = array();
foreach($prof AS $key => $val){
array_push($find,"[$key]");
array_push($replace,$val);
}
return preg_replace($find,$replace,$partFormula);
//returns (36.00000*58.00000)/144
eval() doesn't seem to do much for me (parse error, unexpected $end).
[/snip]
Try;
$foo = preg_replace($find,$replace,$partFormula);
return $foo
attached mail follows:
> Try;
>
> $foo = preg_replace($find,$replace,$partFormula);
> return $foo
Unfortunately no. I also tried making the formula look like this:
<?php (36.00000*58.00000)/144 ?>
and returning it with:
eval('?>' . $a . '<?php ');
Mike
attached mail follows:
[snip]
> Try;
>
> $foo = preg_replace($find,$replace,$partFormula);
> return $foo
Unfortunately no. I also tried making the formula look like this:
<?php (36.00000*58.00000)/144 ?>
and returning it with:
eval('?>' . $a . '<?php ');
[/snip]
Let's do an experiment. Place these two lines of code in a page, then load
it in a browser;
<?php
$foo = (36.00000*58.00000)/144;
echo $foo;
?>
works fine for me. If you change
<?php (36.00000*58.00000)/144 ?>
to
<?php echo (36.00000*58.00000)/144; ?>
it also works.
attached mail follows:
> Let's do an experiment. Place these two lines of code in a page, then load
> it in a browser;
>
> <?php
>
> $foo = (36.00000*58.00000)/144;
> echo $foo;
>
> ?>
>
> works fine for me. If you change
>
> <?php (36.00000*58.00000)/144 ?>
>
> to
>
> <?php echo (36.00000*58.00000)/144; ?>
>
Yep, that does work. Thanks Jay.
Mike
attached mail follows:
Amol,
Pretty sure that it means the white space after a tag. for example:
<myName> Joe Dempsey</myName>
or (even worse, with CR)
<myName>
Joe Dempsey
</myName>
Amol Hatwar wrote:
> Hi,
>
> The PHP Manual entry for xml_parser_set_option lists an option called:
> XML_OPTION_SKIP_WHITE. I really couldn't decipher what this option
> enables or disables.
>
> The manual entry itself is a bit terse:
> "Whether to skip values consisting of whitespace characters."
>
> Doodling around with it in code got me no luck. Any ideas on what kind
> of whitespaces it does supress?
>
> Regards,
>
> ah
>
>
attached mail follows:
On Tuesday 13 December 2005 04:09, Raz wrote:
> Can I have some breast enlarger please?
Larger is not always better ;)
Is there any other men who prefer smaller/normal sized breasts?
attached mail follows:
[snip]
On Tuesday 13 December 2005 04:09, Raz wrote:
> Can I have some breast enlarger please?
Larger is not always better ;)
Is there any other men who prefer smaller/normal sized breasts?
[/snip]
Yes. Now, can this go to the alt.news.breastsize list?
attached mail follows:
I'm writing a PHP 4 extension and I would like to write debugging
information to the Apache error log.Does anyone know how to do
that? Basically I want error_log() but for within a C extension.
Thanks,
Mike
attached mail follows:
Might want to look into "Log4Cxx".
--
Anas Mughal
On 12/20/05, Michael B Allen <mba2000
ioplex.com> wrote:
>
> I'm writing a PHP 4 extension and I would like to write debugging
> information to the Apache error log.Does anyone know how to do
> that? Basically I want error_log() but for within a C extension.
>
> Thanks,
> Mike
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Anas Mughal
attached mail follows:
On Tue, 20 Dec 2005 20:02:58 -0500
Michael B Allen <mba2000
ioplex.com> wrote:
> I'm writing a PHP 4 extension and I would like to write debugging
> information to the Apache error log.Does anyone know how to do
> that? Basically I want error_log() but for within a C extension.
And the answer is php_error_docref. For example:
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Undefined variable: %s", varname);
Mike
attached mail follows:
"Mike" <hyatt65
hotmail.com> wrote in message news:...
I'd just like to thank everyone who helped me our with this. I think it's
great that so many people would be so helpful and not expect anything in
return. This list is quite a storehouse of info and I'm learning just from
reading the posts since I joined last week!
Again, thanks all.
-Mike
> ""Kilbride, James"" <James.Kilbride
gd-ais.com> wrote in message
> news:E0C1686B8F45434DA0E0A904672EA1A859C140
MAPF01-MAIL01.ad.gd-ais.com...
> Actually with this idea all you do is reduce $max after each successful
> pull and 'increment' over pictures you already have. That way you never
> have to pull another random number. You just may have to increment
> through the entire set of pulled images if you pulled a high enough
> number.
>
> for($i = 0; $i < $want; $i++) {
> $random = mt_rand(0,$max);
> for($j = 0; $j < $i; $j++) {
> if ($retrieved[$j] < $random) {
> $random++;
> }
> }
> $retrieved[] = $random;
> sort($retrieved);
> $max--;
> }
>
> Guarentees unique choices.
>
>
>
>> > I'm still very green with PHP, but am working to fix that.
>> >
>> > I've searched high and low for an answer to this question
>> and so far
>> > no solution has presented itself. I have a script to
>> populate my web
>> > page with random images:
>> >
>> > <?php
>> > #random images example
>> > #this is your file
>> > $file = "images.txt";
>> > #open the file
>> > $openFile = file($file);
>> > #generate a random number
>> > srand((double)microtime()*1000000);
>> > #get one of the entries in the file
>> > $random_image = $openFile[array_rand($openFile)]; #display
>> the entry
>> > echo "<img src='$random_image' height='170' width='100'></img>"; ?>
>> >
>> >
>> > This works beautifully, but my problem is that sometimes,
>> the same image
>> > displays twice or more on the same page-load. My page
>> requires 10 different
>> > places where my images need to load, but I can't have any
>> duplicate images
>> > show up.
>
>
attached mail follows:
I was having a discussion about scaling a php-based app. Most of the
sites I've worked on have easily fit into a single server model. I"m
looking at a site that will need to scale beyond that. The
anticipated bottleneck will be TCP connections and database
performance. I'm looking at load balancers and was wondering if
people had experience with one that they felt was up to task.
We do use sessions and I would not like to go to a saving session
data on another box or in the database. I would prefer for the
session identifier cookie to determine which box the user goes to.
thanks,
jonathan
attached mail follows:
Can anyone recommend some good Open-Source Help Desk software for
PHP? (I know this is a little off-topic, but I'm having a hard time
finding decent Open Source software.)
TIA
attached mail follows:
Daniel Lahey said the following on 12/20/2005 10:28 PM:
> Can anyone recommend some good Open-Source Help Desk software for
> PHP? (I know this is a little off-topic, but I'm having a hard time
> finding decent Open Source software.)
IMHO the best is RT, which is Perl and Mason.
(http://www.bestpractical.com/rt)
There are some nice PHP ones out there, but I don't have any experience
with them:
ruQueue: http://freshmeat.net/projects/ruqueue/
Hesk: http://www.phpjunkyard.com/free-helpdesk-software.php
Help Desk Software: http://www.helpdeskreloaded.com/
I'm sure there are more..
Best,
--Glenn
--
AIM: RainbearNJ YahooIM: rainbear_nj
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
~Benjamin Franklin, Historical Review of Pennsylvania, 1759
attached mail follows:
Can someone tell me why this select is wrong please---ive tried everything.
the $cat is the tablename .
$query=" SELECT title FROM $cat WHERE id='$id'";
full script below
<?
$id=$_POST['id'];
$cat=$_POST['cat'];
$db="flash_software";
$link = mysql_connect('localhost');
if (! $link)
die("Couldn't connect to MySQL");
mysql_select_db($db , $link)
or die("Couldn't open $db: ".mysql_error());
$query=" SELECT title FROM $cat WHERE id='$id'";
$result=mysql_query($query);
$num=mysql_num_rows($result);
$i=0;
while ($i < $num) {
$title=mysql_result($result,$i,"title");
?>
<table width="300" border="1" cellpadding="10" cellspacing="0"
bordercolor="#666666">
<tr align="center" valign="top">
<td align="center" colspan="1" rowspan="1" bgcolor="#333333">
<h3><font color="#FFFFFF" size="3">Edit and Submit changes</font></h3>
<form action="update_record.php" method="post">
<input type="hidden" name="ud_id" value="<? echo "$id" ?>">
Title:
<input type="text" name="ud_title" value="<? print "$title"?>"><br>
<input type="Submit" value="Update">
</form>
</td></tr></table>
<?
++$i;
}
?>
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]