php-general Digest 10 Aug 2003 05:04:55 -0000 Issue 2227

Topics (messages 158992 through 159017):

Possible bug w/ open_basedir?
        158992 by: Dan Brown

Re: How to display?
        158993 by: rush

Re: Pls Help-Looking for PHP Product for Articles
        158994 by: Alexandru COSTIN

Re: gzip to max  9
        158995 by: Evan Nemerson

Imagick
        158996 by: Jacob Marble
        158997 by: Jacob Marble
        159002 by: Chris Hubbard
        159003 by: Curt Zirzow
        159012 by: daniel.electroteque.org

Table listing of months
        158998 by: Ashley M. Kirchner

Simple cookie question
        158999 by: Matthew Koh
        159001 by: David Nicholson
        159004 by: Jim Lucas
        159005 by: Mike Migurski
        159015 by: Liam Gibbs

Re: Can't change include_path in php.ini
        159000 by: Machiste' N. Quintana

checking the return value of member function with empty
        159006 by: Edward Rudd
        159008 by: andu
        159009 by: Greg Beaver

Re: Configuring PHP to use aspell
        159007 by: andu
        159010 by: daniel.electroteque.org

Re: [ERR] Re: [PHP] Configuring PHP to use aspell]
        159011 by: daniel.electroteque.org

hanmir.com
        159013 by: daniel.electroteque.org

PHP5 class constants
        159014 by: Cristiano Duarte

files being downloaded when a 404 occurs
        159016 by: Rigi Toney

Freelance code optimizations
        159017 by: Jay Fitzgerald

Administrivia:

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

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

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


----------------------------------------------------------------------
--- Begin Message ---
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

        I'm running a Mitel SME Server v5.6, which is based on RedHat 7.3,
on which I've upgraded PHP to version 4.3.2 (stock PHP version is
4.1.2).  Since I upgraded to 4.3.2, I've encountered a recurring, but
intermittent, problem with any of my PHP apps--IMP, phpBB, phpmychat,
ISMail, etc.  Frequently, these apps will come up with blank pages. 
When this happens, the following error is logged in the system log:

Aug  8 10:10:27 e-smith httpd: PHP Warning:  Unknown(): open_basedir
restriction in effect. File(/opt/ISMail/maillist.php) is not within
the
allowed path(s): (/home/e-smith/files/ibays/howtos) in Unknown on
line 0

        The "File", of course, varies with the app in use, but the allowed
path is always the same.  Reloading the page will usually load it
correctly.

        There is no open_basedir restriction in my php.ini.  The only place
this restriction is set (with this path) in httpd.conf is in this
block:

<Directory /home/e-smith/files/ibays/howtos/html>
    AddType application/x-httpd-php .php .php3 .phtml
    AddType application/x-httpd-php-source .phps
    php_admin_value open_basedir /home/e-smith/files/ibays/howtos
</Directory>

        I never encountered this problem with PHP 4.1.2, but it's been
happening pretty frequently since I installed 4.3.2.  I haven't been
able to figure out any pattern to when it's going to happen, but I've
heard from some other SME users that they're running into the same
thing.

        It seems to me that this may be a bug with PHP, but I'm not sure
what to do to confirm or disconfirm that.  Any suggestions would be
appreciated.  Thanks!

- -- 
Dan Brown, KE6MKS, [EMAIL PROTECTED]
"Since all the world is but a story, it were well for thee to buy the
more enduring story rather than the story that is less enduring."
 -- The Judgment of St. Colum Cille
 

-----BEGIN PGP SIGNATURE-----
Version: PGP 7.0.4

iQA/AwUBPzUpGn6CI7gsQbX8EQJpVQCg7YMjDHUxOBMX+aaARGwIt8OtAlYAoJim
l65OQP72fbq2VWg7p1js+aYN
=PzZk
-----END PGP SIGNATURE-----



--- End Message ---
--- Begin Message ---
Here is small example on how to do it with PHP MySQL and TemplateTamer:

http://www.templatetamer.org/index.php?SimpleMySqlRowList

rush
--
http://www.templatetamer.com/




--- End Message ---
--- Begin Message ---
    Hello,
    You could take a look at Komplete Lite - allows you to publish articles
and associate forums on them.

    Even if the user roles are not very powerful in the open version -
basically you will have what you want.

    http://www.interakt.ro/products/KompleteLite/

                    Alexandru

-- 
Alexandru COSTIN
Chief Operating Officer
http://www.interakt.ro/
+4021 312 5312
"Stephen Toutonghi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I'm looking for a product that will help me create a documentation
> system. I'd like to be able to post individual articles on an intranet,
> and have user's create comments on the articles that become part of the
> article. And editor could then review the comments and add to the
> article where appropriate, remove comments where appropriate. A good
> example of what I'm looking for is the kind of format used on this page:
>
> http://www.php.net/manual/en/ref.dbx.php
>
> where there's an article, and comments below it.
>
> Any ideas?
>
> Thanks,
>
> Steve
>



--- End Message ---
--- Begin Message ---
try setting zlib.output_compression_level in your php.ini



On Saturday 09 August 2003 09:42 am, Decapode Azur wrote:
> Dear All,
>
>
> <?php
> function wrl2wrz($buffer) { return gzencode ($buffer, 9); }
> ob_start("wrl2wrz");
>
> /* here the file */
>
> ob_end_flush(); # end of the output buffering
> ?>
>
> In this exemple with output beffering it is possible to select the maximum
> compression level,
>
> is it possible to select the maximum compression level too
> when writing in a file like below ??
>
> $gzp = fopen($output_file, 'w');
> gzwrite($gzp, $content);
> gzclose($gzp);
>
>
> I think that the default compression level here is 6,
> and I would like to bring it to the maximum value 9.

-- 
"A leader is the wave pushed ahead by the ship."

-Leo Nikolaevich Tolstoy


--- End Message ---
--- Begin Message ---
Hello all-
    Does anyone here use Imagick in PHP?  I've tried the example .php files
using a miriad of version combinations and I always get this error:

Fatal error: Call to undefined function: imagick_readimage() in
/usr/local/lib/php/docs/imagick/examples/border.php on line 5



--- End Message ---
--- Begin Message ---
Excuse me, I accidentally sent that last incomplete message.
I have successfully compiled PHP 4.3.3RC3 with the --with-imagick flag after
compiling and installing ImageMagick 5.5.7 (that was a headache on it's
own).  The following error keeps cropping up:

Fatal error: Call to undefined function: imagick_readimage() in
/usr/local/lib/php/docs/imagick/examples/border.php on line 5

I've tried compiling PHP without the --with-imagick flag and then doing a
"pear install imagick" to get the pear version 0.9.7 package.  The same
problem occurs.  I don't even know how to use imagick yet; I can't get the
thing to work with example files, so I can't start writing my own stuff yet.
Does anyone at this NG use the imagick tools?  Is there something I have to
include maybe?  Like "require 'imagick.php'" or something?  I can't find any
files that look appropriate for that.

Thanks in advance,

Jake

LandEZ



--- End Message ---
--- Begin Message ---
Jacob,
Yes I've used imagemagick with php.  I found that none of the online
documentation worked for me.  I was unable to use the imagemagick class and
the tutorials seemed to refer to older versions.

That being said, here's some code that does work, maybe you can extrapolate
from it.
Feel free to contact me if you have questions.

<snipet>
/*** rename the file.
* Note: I've got a form that supports multiple file uploads, hence the
$_FILES array
* the renameFile() function creates a unique file name for the image being
uploaded
* so no existing files are overwritten
*/
$photo_name = renameFile($_FILES["photo"]["name"][$i],0);
$photo_location = "/www/gallery/photos/";
// copy file from /tmp to photos/tmp
copy ($_FILES["photo"]["tmp_name"][$i],$photo_location.$photo_name);
$command = "/usr/bin/identify -verbose '".$photo_location.$photo_name."'";
exec ($command,$result,$value);
</snipet>

<snipet>
/*** get verbose information
* in the rename code above $command contains the 'verbose' information from
imagemagick
*/
$arrlength = count($result);
for ($tmpi = 0; $tmpi < $arrlength; $tmpi++)
{
        if(eregi('Geometry', $result[$tmpi]))
        {
        $tmp1 = explode(' ', $result[$tmpi]);
                $tmp1length = count ($tmp1);
                for ($tmpj = 0; $tmpj < $tmp1length; $tmpj++)
                {
                        $tmp2 = explode('x', $tmp1[$tmpj]);
                        $tmp2length = count ($tmp2);
                        if ($tmp2length > 1)
                        {
                                $x = $tmp2[0];  // this is the image width
                                $y = $tmp2[1];  // this is the image height
                        }
                }
        }
}
</snipet>

<snipet>
/***
* the following code takes the dimensions of the image, and if the image is
too big,
* resizes  the image down to the max image size.
*/
if ($x > $image_max_width || $y > $image_max_height)// resize photo to max
dimensions
{
        $x = $image_max_width;
        $y = $image_max_height;
        $command = "/usr/bin/convert -geometry ". $x ."x". $y ."
".$photo_location.$photo_name ." ".$photo_location.$photo_name;
        exec ($command,$result,$value);
}
</snipet>

I know you can do compositing with Imagemagick, but I haven't tried that.  I
assume it's as complex as everything else with Imagemagick.  Imagemagick is
a pain, but the quality of the resized images so far surpasses GD(2) that
it's worth the work.
Good luck.
Chris

-----Original Message-----
From: Jacob Marble [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 09, 2003 1:22 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Imagick


Excuse me, I accidentally sent that last incomplete message.
I have successfully compiled PHP 4.3.3RC3 with the --with-imagick flag after
compiling and installing ImageMagick 5.5.7 (that was a headache on it's
own).  The following error keeps cropping up:

Fatal error: Call to undefined function: imagick_readimage() in
/usr/local/lib/php/docs/imagick/examples/border.php on line 5

I've tried compiling PHP without the --with-imagick flag and then doing a
"pear install imagick" to get the pear version 0.9.7 package.  The same
problem occurs.  I don't even know how to use imagick yet; I can't get the
thing to work with example files, so I can't start writing my own stuff yet.
Does anyone at this NG use the imagick tools?  Is there something I have to
include maybe?  Like "require 'imagick.php'" or something?  I can't find any
files that look appropriate for that.

Thanks in advance,

Jake

LandEZ



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


--- End Message ---
--- Begin Message ---
* Thus wrote Jacob Marble ([EMAIL PROTECTED]):
> Excuse me, I accidentally sent that last incomplete message.
> I have successfully compiled PHP 4.3.3RC3 with the --with-imagick flag after
> compiling and installing ImageMagick 5.5.7 (that was a headache on it's
> own).  The following error keeps cropping up:

yeah, imagick is a pain to install, i've done it before :)  If
you're just wanting imagick to do resampling or converting, i would
suggest using gd, it might be able todo what you want and is easier
to use:

http://us2.php.net/gd



> 
> Fatal error: Call to undefined function: imagick_readimage() in
> /usr/local/lib/php/docs/imagick/examples/border.php on line 5
> 
> I've tried compiling PHP without the --with-imagick flag and then doing a
> "pear install imagick" to get the pear version 0.9.7 package.  The same
> problem occurs.  I don't even know how to use imagick yet; I can't get the
> thing to work with example files, so I can't start writing my own stuff yet.
> Does anyone at this NG use the imagick tools?  Is there something I have to
> include maybe?  Like "require 'imagick.php'" or something?  I can't find any
> files that look appropriate for that.

There is a pear mailing list/news group, you might get better help over there.
http://us3.php.net/mailing-lists.php

HTH,

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

--- End Message ---
--- Begin Message ---
yeh i have found even if you give the path the jpeg-v6 it wont configure it
the first time round takes about 5 goes !

> * Thus wrote Jacob Marble ([EMAIL PROTECTED]):
>> Excuse me, I accidentally sent that last incomplete message.
>> I have successfully compiled PHP 4.3.3RC3 with the --with-imagick flag
>> after compiling and installing ImageMagick 5.5.7 (that was a headache
>> on it's own).  The following error keeps cropping up:
>
> yeah, imagick is a pain to install, i've done it before :)  If
> you're just wanting imagick to do resampling or converting, i would
> suggest using gd, it might be able todo what you want and is easier to
> use:
>
> http://us2.php.net/gd
>
>
>
>>
>> Fatal error: Call to undefined function: imagick_readimage() in
>> /usr/local/lib/php/docs/imagick/examples/border.php on line 5
>>
>> I've tried compiling PHP without the --with-imagick flag and then
>> doing a "pear install imagick" to get the pear version 0.9.7 package.
>> The same problem occurs.  I don't even know how to use imagick yet; I
>> can't get the thing to work with example files, so I can't start
>> writing my own stuff yet. Does anyone at this NG use the imagick
>> tools?  Is there something I have to include maybe?  Like "require
>> 'imagick.php'" or something?  I can't find any files that look
>> appropriate for that.
>
> There is a pear mailing list/news group, you might get better help over
> there. http://us3.php.net/mailing-lists.php
>
> HTH,
>
> Curt
> --
> "I used to think I was indecisive, but now I'm not so sure."
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php




--- End Message ---
--- Begin Message ---
I have the following snippet of code:


<?php
// contents of $monthlyarchivereverse is generated by a different
// piece within a content managent system. The data, or format
// can not be changed.
$monthlyarchivereverse = array("/08/index.html August 2003",
"/07/index.html July 2003",
"/06/index.html June 2003",
"/05/index.html May 2003"
);
$monthlyarchive = array_reverse($monthlyarchivereverse);
function lightdark($rest) {
if ($rest%2) {
$color = "#eee";
} else {
$color = "#fff";
}
return $color;
}
foreach ($monthlyarchive as $string) {
list($link, $month, $year) = split(" ",$string);
$shortmonth = substr($month,0,3);
$a[$year][] = "<a href=\"$link\">$shortmonth</a>";
}
reset($a);
$array_first_key = key($a);
while (count($a[$array_first_key]) < 12) {
array_unshift($a[$array_first_key], " ");
}
foreach ($a as $year=>$list_of_strings) {
echo "<table class=\"mcalendar\">\n";
echo " <tr><th colspan=\"4\" class=\"mcalendar\">$year</th></tr>\n <tr>\n";
foreach ($list_of_strings as $key=>$date_string) {
if($key%4 || $key==0) {
} else {
echo " </tr>\n <tr>\n";
}
echo " <td class=\"mcalendar\" style=\"background-color : ".lightdark($key).";\">".rtrim($date_string)."</td>\n";
}
echo " </tr>\n</table>\n";
}
?>


Which when run, will generate a table that looks like this, with each month hyperlinked to its respective link from the array:

   +-----------------------+
   |     |     |     |     |
   +-----------------------+
   |     |     |     |     |
   +-----------------------+
   | May | Jun | Jul | Aug |
   +-----------------------+


I now want to change this, to something like this:


   +-----------------------+
   | Jan | Feb | Mar | Apr |
   +-----------------------+
   | May | Jun | Jul | Aug |
   +-----------------------+
   | Sep | Oct | Nov | Dec |
   +-----------------------+

...where only those months that have an associated hyperlink will be linked, and the others will just be displayed without a link. How can I achieve this?



--- End Message ---
--- Begin Message ---
This may be a stupid question, but I'm trying to set up a system where I can
take a poll from visitors to my website and then set a cookie so that they
can't vote more than once (until they clear their cookies at least).
Problem is, I don't want to put it at the top of my page, because what if
somebody opens up a poll but decides not to vote, then later changes his
mind.  The cookie will prevent him from voting.  I want the cookie to be set
right after the user clicks the vote button, but every time I do that, I get
an error about headers already being sent.  Is there any way around this?

Thanks



--- End Message ---
--- Begin Message ---
Hello,

This is a reply to an e-mail that you wrote on Sun, 10 Aug 2003 at
00:24, lines prefixed by '>' were originally written by you.
> This may be a stupid question, but I'm trying to set up a system
where
> I can
> take a poll from visitors to my website and then set a cookie so
that
> they
> can't vote more than once (until they clear their cookies at
least).
> Problem is, I don't want to put it at the top of my page, because
what
> somebody opens up a poll but decides not to vote, then later
changes
> his
> mind.  The cookie will prevent him from voting.  I want the cookie
to
> be set
> right after the user clicks the vote button, but every time I do
that,
> I get
> an error about headers already being sent.  Is there any way
around
> this?

You cannot send any headers after you have sent output as this is how
HTTP works, a set of headers are sent, double newline, then all the
content.  You can't go back in time and add more headers.

There are two ways round your problem...

1. Set your cookie right at the top of the script, so as your first
line have something like:
if(isset($_POST['vote'])){ setcookie(....); }

2. Use output buffering, this will make PHP buffer all of your
content and not send it till you tell it to (or until it reaches the
end of the file).
Read more at:
http://uk.php.net/ref.outcontrol

All the best,

David.

--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/
Free PHP error handling script: www.phpmachine.com/error-handler/

          Professional Web Development by David Nicholson
                    http://www.djnicholson.com/

    QuizSender.com - How well do your friends actually know you?
                     http://www.quizsender.com/

--- End Message ---
--- Begin Message ---
Assuming that you have a process page that stores the submitted choice, have
the process page make the cookie setting and then redirect back to the first
page.

Or better yet, I like it when my original page never leaves and a popup
window is openned to save my choice and then show me the results for that
given vote.

Jim Lucas
----- Original Message -----
From: "Matthew Koh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 09, 2003 4:22 PM
Subject: [PHP] Simple cookie question


> This may be a stupid question, but I'm trying to set up a system where I
can
> take a poll from visitors to my website and then set a cookie so that they
> can't vote more than once (until they clear their cookies at least).
> Problem is, I don't want to put it at the top of my page, because what if
> somebody opens up a poll but decides not to vote, then later changes his
> mind.  The cookie will prevent him from voting.  I want the cookie to be
set
> right after the user clicks the vote button, but every time I do that, I
get
> an error about headers already being sent.  Is there any way around this?
>
> Thanks
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--- End Message ---
--- Begin Message ---
>There are two ways round your problem...
>
>1. Set your cookie right at the top of the script, so as your first line
>have something like: if(isset($_POST['vote'])){ setcookie(....); }
>
>2. Use output buffering, this will make PHP buffer all of your content
>and not send it till you tell it to (or until it reaches the end of the
>file). Read more at: http://uk.php.net/ref.outcontrol

3. Use PHP's session features. Start your session at the top of the page,
like usual, and then set a flag in $_SESSION when the poll is is
completed. This will allow you to set other arbitrary flasg as well.
See: http://php.net/session

---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca            http://mike.teczno.com/contact.html


--- End Message ---
--- Begin Message ---
> This may be a stupid question, but I'm trying to set up a system where I
can
> take a poll from visitors to my website and then set a cookie so that they
> can't vote more than once (until they clear their cookies at least).
> Problem is, I don't want to put it at the top of my page, because what if
> somebody opens up a poll but decides not to vote, then later changes his
> mind.  The cookie will prevent him from voting.  I want the cookie to be
set
> right after the user clicks the vote button, but every time I do that, I
get
> an error about headers already being sent.  Is there any way around this?

Does it have to be a cookie? I use the IP address and store that somewhere.


--- End Message ---
--- Begin Message ---
 
Yes, I restarted Apache and checked it with phpinfo(), but no change. I
think I'm doing something wrong here. I wrote the new path as this (after
creating the folder for it)
 
include_path = "C:\includes"
 
Includes was the folder I created for, well, the includes. Is there anything
I can do about the internal path PHP falls back on? Maybe I should write it
like this: include_path = ".;c:\includes"
 
What should I do? Please help.
 
--Machiste' N. Quintana

--- End Message ---
--- Begin Message ---
I am having this rather annoying syntax problem.

I have this..
if (!empty($this->GetParam('someparameter')) {
  // OK do something since the parameter is set.
}
However that fails with this parse error

parse error, expecting `')''

Why???

If I do this
$var = $this->GetParam('someparameter'));
if (!empty($var)) {
  // same thing as before
}
it works fine with no error..

This *SHOULD* be syntactically correct, but php doesn't think so.
Should I file a bug on this one?
Oh yeah, normal information about running environment.
PHP version 4.3.2



--- End Message ---
--- Begin Message ---
On Sat, 09 Aug 2003 20:00:57 -0500
"Edward Rudd" <[EMAIL PROTECTED]> wrote:

> I am having this rather annoying syntax problem.
> 
> I have this..
> if (!empty($this->GetParam('someparameter')) {
>   // OK do something since the parameter is set.
> }

 if (!empty($this->GetParam('someparameter'))) {
   // OK do something since the parameter is set.
 }

> However that fails with this parse error
> 
> parse error, expecting `')''
> 
> Why???
> 
> If I do this
> $var = $this->GetParam('someparameter'));
> if (!empty($var)) {
>   // same thing as before
> }
> it works fine with no error..
> 
> This *SHOULD* be syntactically correct, but php doesn't think so.
> Should I file a bug on this one?
> Oh yeah, normal information about running environment.
> PHP version 4.3.2
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 


-- 
Andu

--- End Message ---
--- Begin Message --- Hi,

empty() is confusing, because it is not a function, but a language construct, like isset(). As such, you can only use it on variables, and not on expressions or function return values.

See the very small print Note at the bottom of:

http://www.php.net/empty

Note: Because this is a language construct and not a function, it cannot be called using variable functions

Note: empty() only checks variables as anything else will result in a parse error. In otherwords, the following will not work: empty(addslashes($name)).

Regards,
Greg
--
phpDocumentor
http://www.phpdoc.org

Edward Rudd wrote:
I am having this rather annoying syntax problem.

I have this..
if (!empty($this->GetParam('someparameter')) {
  // OK do something since the parameter is set.
}
However that fails with this parse error

parse error, expecting `')''

Why???

If I do this
$var = $this->GetParam('someparameter'));
if (!empty($var)) {
  // same thing as before
}
it works fine with no error..

This *SHOULD* be syntactically correct, but php doesn't think so.
Should I file a bug on this one?
Oh yeah, normal information about running environment.
PHP version 4.3.2




--- End Message ---
--- Begin Message ---
On Sat, 9 Aug 2003 10:29:58 -0400
"Jeff Lewis" <[EMAIL PROTECTED]> wrote:

> I have the following set up...
> 
> RH Linux version 7.3
> 
> PHP 4.3.2
> 
> Aspell installed on the server
> 
> I have NEVER configured PHP and am looking for some assistance in
> configuring PHP to use Aspell so I can take advantage of this great
> feature that (as I can see from my searches) is not as well
> documented.

You are supposed to use pspell (see manual) and do:
configure --with-pspell[=dir].

> 
> I'm not sure of the path to my Aspell either...
> 
> Jeff
> 
> 


-- 
Andu

--- End Message ---
--- Begin Message ---
talking of aspell how could i intergrate this into a search engine, so i
could correct typos in a search ?
> I have the following set up...
>
> RH Linux version 7.3
>
> PHP 4.3.2
>
> Aspell installed on the server
>
> I have NEVER configured PHP and am looking for some assistance in
> configuring PHP to use Aspell so I can take advantage of this great
> feature that (as I can see from my searches) is not as well documented.
>
> I'm not sure of the path to my Aspell either...
>
> Jeff




--- End Message ---
--- Begin Message ---
how do we get this guy off the list

-------- Original Message --------
Subject: [ERR] Re: [PHP] Configuring PHP to use aspell
From: [EMAIL PROTECTED]
Date: Sun, August 10, 2003 11:17 am
To: [EMAIL PROTECTED]

Transmit Report:

 To: [EMAIL PROTECTED], 402 Local User Inbox Full ([EMAIL PROTECTED])


talking of aspell how could i intergrate this into a search engine, so i
could correct typos in a search ?
> I have the following set up...
>
> RH Linux version 7.3
>
> PHP 4.3.2
>
> Aspell installed on the server
>
> I have NEVER configured PHP and am looking for some assistance in
> configuring PHP to use Aspell so I can take advantage of this great
> feature that (as I can see from my searches) is not as well documented.
>
> I'm not sure of the path to my Aspell either...
>
> Jeff




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


--- End Message ---
--- Begin Message ---
http://www.hanmir.com/ anyone know korean , we need to speak to the
administrator of the server to turn this bloody annoying message off , i've
never seen anything like this before how rude to send auto messages back



--- End Message ---
--- Begin Message ---
This code:
<?
class Priority {
        const DEBUG = 0;
        const INFO = 1;
        const WARN = 2;
        const ERROR = 3;
        const FATAL = 4;

        const MAX_PRIORITY = FATAL;
}

class ExtendedPriority extends Priority {
        const REMOTE = Priority::MAX_PRIORITY + 1;
        const URGENT = parent::MAX_PRIORITY + 2;
}
?>

results in this error:

PHP Fatal error:  Unsupported operand types in /test.php on line 13

Shouldn't class constants support simple expressions ?


Cristiano Duarte



--- End Message ---
--- Begin Message ---
Hello,

I'm using Apache 2.0.47 (Unix) with PHP 4.3.3RC2.

My httpd.conf file reads :

AddType application/x-httpd-php .html

... and then a little further down

ErrorDocument 404 /404redir.html

(404redir.hml is a PHP file, consisting of : <?php header("Location:
/404.html"); ?> ) The reason why I do this is so that the Google Adsense
doesnt' display welfare ads, since the 404 page contains a lot of keywords!

Anyway, the problem is this.

When a 404 occurs, for say a directory ... http://localhost/heidkjsdjksd
.... which doesnot exist... everything works great... i get redirected as
per requirement. Now when a .php files occurs .. it still works
(http://localhost/sdjkdkjskd.php) .... BUT when a .html files occurs...
http://localhost/crap.html .... it starts to download the file... and the
browser says can't download!!!

And now when I add a .php file to my AddType... it happens for the .php file
too... so since i've moved my website.. and had .php files... i can't use
the .php extension otherwise 404's don't get logged and taken care of!

Help appreciated. thank you.
Tony.



--- End Message ---
--- Begin Message ---
I have written an online event registration system and I am curious to
know if there is anyone out there who could either take my code and
optimize it for me or basically help me learn how to optimize my code
off-list. I am a php nub and I know there are probably all kinds of bugs
and duplications in my code but I think I have coded it free of all
errors, warnings and notices. I would rather someone help me learn basic
optimization techniques like functions and such off list because I would
hate to have to keep spending money to have my code optimized....
 
I am a somewhat slow learner in that I cannot learn from reading - the
stuff on functions, for example, is confusing to me - I can only learn
by examples with explanations of why certain things are done.
 
If ya'll think I will be too much of a pain to help, I will understand -
but I would like to learn....
 

==========================================

Jay Fitzgerald, Design Director

- Certified Professional Webmaster (CPW-A)

- Certified Professional Web Designer (CPWDS-A)

- Certified Professional Web Developer (CPWDV-A)

- Certified E-Commerce Manager (CECM-A)

- Certified Small Business Web Consultant (CWCSB-A)

 

Bayou Internet -  <http://www.bayou.com/> http://www.bayou.com

Toll Free: 888.30.BAYOU (22968)

Vox: 318.338.2034 / Fax: 318.338.2506

E-Mail:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]

ICQ: 38823829 / AIM: bayoujf / MSN: bayoujf / Yahoo: bayoujf

========================================== 

 

--- End Message ---

Reply via email to