php-general Digest 28 Mar 2007 12:42:38 -0000 Issue 4702
Topics (messages 251502 through 251533):
Re: pear returns prompt
251502 by: Chris
Re: Optimization of all mysql databases on a server
251503 by: itoctopus
changing array to a string
251504 by: Richard Kurth
251505 by: Chris
251506 by: Peter Lauri
251508 by: Richard Kurth
using for loop in function
251507 by: Richard Kurth
251510 by: Chris
251512 by: Jim Lucas
251531 by: Myron Turner
PHP 5.2.1: Some scripts are being parsed, but most aren't
251509 by: Eddie
251511 by: Hap-Hang Yu
251513 by: Mario Guenterberg
251532 by: Myron Turner
251533 by: Mario Guenterberg
How can i convert one object to another. Convert Exception object to
MyException Object.
251514 by: Mathijs
251518 by: Zoltán Németh
251525 by: Jochem Maas
Re: Language detection with PHP
251515 by: Satyam
251530 by: Robin Vickery
Zend Guard Performance Problem
251516 by: Sancar Saran
251517 by: Chris
251519 by: Sancar Saran
251526 by: Jochem Maas
251529 by: Chris
HELO command when sending email using PHP
251520 by: Angelo Zanetti
251521 by: demo
251522 by: Angelo Zanetti
251523 by: demo
251524 by: demo
PDO mssql + multiple rowsets
251527 by: Javier Ruiz
Re: POST + QUERY
251528 by: Dan Shirah
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 ---
Farid Hamjavar wrote:
Greetings,
Linux Redhat AS 4 with PHP 5.1.6
When I execute pear, I get my prompt back:
Ask the pear list - http://pear.php.net/support/lists.php
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
You're right, it was running from a browser, you need to use set_time_limit.
--
itoctopus - http://www.itoctopus.com
"Chris" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Jochem Maas wrote:
> > Tijnema ! wrote:
> >> On 3/26/07, Chris <[EMAIL PROTECTED]> wrote:
> >>> itoctopus wrote:
> >>>> The purpose of this script is to optimize all associated tables in
all
> >>>> databases on a mysql server. This script is working great, you can
> >>> put in a
> >>>> CRON and run it every day. Feel free to throw in your 2 cents!
> >>> It's going to time out if you have any large databases or tables.
> >
> > php will not timeout on the commandline unless you actually specify
> > a timeout - unlike php as used as a webserver SAPI.
>
> Considering the amount of html in the script I guessed (maybe
> incorrectly) it was for running from a browser - which is why I
> mentioned about the timeout issue.
>
> A command line script isn't going to have <br/>'s or tables or anything
> (well, none that I've written recently do).
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
When I submit the for below it gives me an array that looks like this
"array(5) { [0]=> string(1) "3" [1]=> string(1) "4" [2]=> string(1) "5"
[3]=> string(1) "6" [4]=> string(1) "7" } "
I would like to convert it to a string like this "3,4,5,6,7"
<form action="test.php" method="post">
<table>
<tr><td colspan="2" align="left"><input name="subscriptions[]" value="3"
type="checkbox">test message
</td></tr><tr><td colspan="2" align="left"><input name="subscriptions[]"
value="4" type="checkbox">test message
</td></tr><tr><td colspan="2" align="left"><input name="subscriptions[]"
value="5" type="checkbox">test message
</td></tr><tr><td colspan="2" align="left"><input name="subscriptions[]"
value="6" type="checkbox">test message
</td></tr><tr><td colspan="2" align="left"><input name="subscriptions[]"
value="7" type="checkbox">test message
</td></tr>
</table>
<input type="hidden" name="doit" value="yes">
<input type="submit" name="submit">
</form>
--- End Message ---
--- Begin Message ---
Richard Kurth wrote:
When I submit the for below it gives me an array that looks like this
"array(5) { [0]=> string(1) "3" [1]=> string(1) "4" [2]=> string(1) "5"
[3]=> string(1) "6" [4]=> string(1) "7" } "
I would like to convert it to a string like this "3,4,5,6,7"
$ids = implode(',', $_POST['subscriptions']);
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Richard Kurth [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 28, 2007 6:12 AM
> To: [email protected]
> Subject: [PHP] changing array to a string
>
> When I submit the for below it gives me an array that looks like this
> "array(5) { [0]=> string(1) "3" [1]=> string(1) "4" [2]=> string(1) "5"
> [3]=> string(1) "6" [4]=> string(1) "7" } "
> I would like to convert it to a string like this "3,4,5,6,7"
>
>
> <form action="test.php" method="post">
> <table>
> <tr><td colspan="2" align="left"><input name="subscriptions[]" value="3"
> type="checkbox">test message
> </td></tr><tr><td colspan="2" align="left"><input name="subscriptions[]"
> value="4" type="checkbox">test message
> </td></tr><tr><td colspan="2" align="left"><input name="subscriptions[]"
> value="5" type="checkbox">test message
> </td></tr><tr><td colspan="2" align="left"><input name="subscriptions[]"
> value="6" type="checkbox">test message
> </td></tr><tr><td colspan="2" align="left"><input name="subscriptions[]"
> value="7" type="checkbox">test message
> </td></tr>
> </table>
> <input type="hidden" name="doit" value="yes">
> <input type="submit" name="submit">
>
> </form>
[Peter Lauri - DWS Asia]
Check www.php.net/implode
Best regards,
Peter Lauri
www.dwsasia.com - company web site
www.lauri.se - personal web site
www.carbonfree.org.uk - become Carbon Free
--- End Message ---
--- Begin Message ---
Richard Kurth wrote:
> When I submit the for below it gives me an array that looks like this
> "array(5) { [0]=> string(1) "3" [1]=> string(1) "4" [2]=> string(1) "5"
> [3]=> string(1) "6" [4]=> string(1) "7" } "
> I would like to convert it to a string like this "3,4,5,6,7"
$ids = implode(',', $_POST['subscriptions']);
Thanks I keep trying explode and forgot about implode
--- End Message ---
--- Begin Message ---
The function below will create a group of checkboxes it will also check
the checkbox that is stored in the table field that is in $select_value this
works fine if there is only one value in the variable but if there is more
stored like 1,2,3,4 it will not work. I am trying to figure out how to use
the following for loop to add the number to each checkbox and if they match
mark the checkbox checked
$ExplodeIt = explode(",",$select_value,",");
$Count = count($ExplodeIt);
for ($i=0; $i < $Count; $i++) {
}
function checkbox($sqlu,$name,$value1,$value2,$select_value){
$name_result = safe_query($sqlu);
while($rowu=mysql_fetch_array($name_result)){
echo "<tr><td colspan=\"2\" align=\"left\"><input type='checkbox' name='"
. $name . "[" . $rowu[$value1] . "]' value=\"$rowu[$value1]\"";
if($select_value==$rowu[$value1]) {
echo " checked>$rowu[$value2]\n</td></tr><BR>";
}else{
echo ">$rowu[$value2]\n</td></tr><BR>";
}
}
}
--- End Message ---
--- Begin Message ---
Richard Kurth wrote:
The function below will create a group of checkboxes it will also check
the checkbox that is stored in the table field that is in $select_value this
works fine if there is only one value in the variable but if there is more
stored like 1,2,3,4 it will not work. I am trying to figure out how to use
the following for loop to add the number to each checkbox and if they match
mark the checkbox checked
$ExplodeIt = explode(",",$select_value,",");
$Count = count($ExplodeIt);
for ($i=0; $i < $Count; $i++) {
}
function checkbox($sqlu,$name,$value1,$value2,$select_value){
$name_result = safe_query($sqlu);
while($rowu=mysql_fetch_array($name_result)){
echo "<tr><td colspan=\"2\" align=\"left\"><input type='checkbox' name='"
. $name . "[" . $rowu[$value1] . "]' value=\"$rowu[$value1]\"";
Pass in an array to this function and then do:
if (in_array($rowu[$value1], $selected_items)) {
echo " CHECKED";
}
echo rest of stuff....
or get the function to handle one item or multiple:
if (!is_array($select_value)) {
$select_value = array($select_value);
}
If that doesn't work then what are you passing in (ie what is
$select_value) and what is in the data (print_r($rowu)) ?
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
Richard Kurth wrote:
The function below will create a group of checkboxes it will also check
the checkbox that is stored in the table field that is in $select_value this
works fine if there is only one value in the variable but if there is more
stored like 1,2,3,4 it will not work. I am trying to figure out how to use
the following for loop to add the number to each checkbox and if they match
mark the checkbox checked
$ExplodeIt = explode(",",$select_value,",");
$Count = count($ExplodeIt);
for ($i=0; $i < $Count; $i++) {
}
function checkbox($sqlu,$name,$value1,$value2,$select_value){
$name_result = safe_query($sqlu);
while($rowu=mysql_fetch_array($name_result)){
echo "<tr><td colspan=\"2\" align=\"left\"><input type='checkbox' name='"
. $name . "[" . $rowu[$value1] . "]' value=\"$rowu[$value1]\"";
if($select_value==$rowu[$value1]) {
echo " checked>$rowu[$value2]\n</td></tr><BR>";
}else{
echo ">$rowu[$value2]\n</td></tr><BR>";
}
}
}
I have used in_array as a way of doing what you are looking for.
function checkbox($sqlu,$name,$value1,$value2,$select_value){
$name_result = safe_query($sqlu);
while ( $rowu = mysql_fetch_array($name_result) ) {
$checked = '';
if ( in_array($rowu[$value1], $select_value) ) {
$checked = ' checked="checked"';
}
echo <<<HTML
<tr>
<td colspan="2" align="left">
<input
type="checkbox"
name="{$name}[{$rowu[$value1]}]"
value="{$rowu[$value1]}"
{$checked} />{$rowu[$value2]}
</td>
</tr>
HTML;
}
}
Personally, I would change your SQL query to return only the two columns
that you are wanting to display. And also use the mysql_fetch_assoc()
SELECT id AS colA, name AS colB FROM myTable;
and not this
SELECT * FROM myTable;
This would then allow me to write your function this way.
function checkbox($sqlu,$name,$selected=array()){
if ( ( $name_result = safe_query($sqlu) ) === false ) {
die('something went wrong');
}
while ( $rowu = mysql_fetch_assoc($name_result) ) {
$checked = '';
if ( in_array($rowu['colA'], $selected) ) {
$checked = ' checked="checked"';
}
echo <<<HTML
<tr>
<td colspan="2" align="left">
<input type="checkbox"
name="{$name}[{$rowu['colA']}]"
value="{$rowu['colA']}"
{$checked} />{$rowu['colB']}
</td>
</tr>
HTML;
}
}
Hope this helps
--- End Message ---
--- Begin Message ---
Richard Kurth wrote:
The function below will create a group of checkboxes it will also check
the checkbox that is stored in the table field that is in $select_value this
works fine if there is only one value in the variable but if there is more
stored like 1,2,3,4 it will not work. I am trying to figure out how to use
the following for loop to add the number to each checkbox and if they match
mark the checkbox checked
$ExplodeIt = explode(",",$select_value,",");
$Count = count($ExplodeIt);
for ($i=0; $i < $Count; $i++) {
}
$select_value = "1,2,3,4";
$ExplodeIt = explode(",",$select_value,",");
Using print_r(), you will get
Array
(
[0] => 1,2,3,4
)
count($ExplodeIt) = 1
$ExplodeIt = explode(",",$select_value);
Using print_r(), you will get:
Array
(
[0] => 1
[1] => 2
[2] => 3
[3] => 4
)
count($ExplodeIt) = 4
--
_____________________
Myron Turner
http://www.room535.org
http://www.bstatzero.org
http://www.mturner.org/XML_PullParser/
--- End Message ---
--- Begin Message ---
Hi all,
Previously, I had installed Apache 1.3.37 with PHP 5.2.1 as
a static module on Ubuntu 6.06. I am having a problem where,
for some reason, some of my PHP scripts just show source
code, while some are parsed.
In the meantime, while trying to get this issue fixed, I
decided to upgrade to Ubuntu 6.10, the latest Ubuntu
release, to see if that helped the problem.
As stated above, some of my PHP scripts just show source
code both in Apache and the CLI, and some are actually
parsed. I know this is not an Apache problem since I get
the same results in the CLI.
This is a paid script, and I am unable to post code, but
in generic terms, I have narrowed it down to the following
code.
require_once($(DIR VARIABLE NAME HERE)."/(NAME HERE).php");
include_once("includefilenamehere.inc");
The first line of the code completely makes it show the
line of code, and the second line makes it show the
include file, even if the second line is executed without
the first line. Unfortunately, this is the only information
I've been able to locate in my debugging.
For debugging purposes, I also downgraded to PHP 4.4.6, and
I had the same exact problem. It looks like it is a problem
with a library possibly? An strace reports that PHP is trying
to search for libraries in /usr/local/mysql/lib/mysql, but if
I put them in there, it still doesn't function correctly.
Any help is more than appreciated.
Thank you very much,
Eddie
--- End Message ---
--- Begin Message ---
Check your php files. Make sure the PHP code are enclosed in the tag
<?php ... ?>, not <? ... ?>
There's a php.ini option to accept <? ... ?>. It's: short_open_tag = On
2007/3/28, Eddie <[EMAIL PROTECTED]>:
Hi all,
Previously, I had installed Apache 1.3.37 with PHP 5.2.1 as
a static module on Ubuntu 6.06. I am having a problem where,
for some reason, some of my PHP scripts just show source
code, while some are parsed.
In the meantime, while trying to get this issue fixed, I
decided to upgrade to Ubuntu 6.10, the latest Ubuntu
release, to see if that helped the problem.
As stated above, some of my PHP scripts just show source
code both in Apache and the CLI, and some are actually
parsed. I know this is not an Apache problem since I get
the same results in the CLI.
This is a paid script, and I am unable to post code, but
in generic terms, I have narrowed it down to the following
code.
require_once($(DIR VARIABLE NAME HERE)."/(NAME HERE).php");
include_once("includefilenamehere.inc");
The first line of the code completely makes it show the
line of code, and the second line makes it show the
include file, even if the second line is executed without
the first line. Unfortunately, this is the only information
I've been able to locate in my debugging.
For debugging purposes, I also downgraded to PHP 4.4.6, and
I had the same exact problem. It looks like it is a problem
with a library possibly? An strace reports that PHP is trying
to search for libraries in /usr/local/mysql/lib/mysql, but if
I put them in there, it still doesn't function correctly.
Any help is more than appreciated.
Thank you very much,
Eddie
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
--
Hap-Hang Yu, Jay
--- End Message ---
--- Begin Message ---
On Tue, Mar 27, 2007 at 10:22:40PM -0700, Eddie wrote:
> Hi all,
>
> Previously, I had installed Apache 1.3.37 with PHP 5.2.1 as
> a static module on Ubuntu 6.06. I am having a problem where,
> for some reason, some of my PHP scripts just show source
> code, while some are parsed.
Hi...
I have a problem something similar. Any scripts would be parsed, any
would be downloaded in fireofx 2.x. I use Ubuntu 6.10. My solution
is to start the ancient Mozilla browser, with this browser works
everything fine. I think it is a firefox problem?! My server is
apache 2.0.55 with php 5.2.1.
Greetings
Mario
--
-----------------------------------------------------
| havelsoft.com - Ihr Service Partner für Open Source |
| Tel: 033876-21 966 |
| Notruf: 0173-277 33 60 |
| http://www.havelsoft.com |
| |
| Inhaber: Mario Günterberg |
| Mützlitzer Strasse 19 |
| 14715 Märkisch Luch |
-----------------------------------------------------
signature.asc
Description: Digital signature
--- End Message ---
--- Begin Message ---
Mario Guenterberg wrote:
On Tue, Mar 27, 2007 at 10:22:40PM -0700, Eddie wrote:
Hi all,
Previously, I had installed Apache 1.3.37 with PHP 5.2.1 as
a static module on Ubuntu 6.06. I am having a problem where,
for some reason, some of my PHP scripts just show source
code, while some are parsed.
Hi...
I have a problem something similar. Any scripts would be parsed, any
would be downloaded in fireofx 2.x. I use Ubuntu 6.10. My solution
is to start the ancient Mozilla browser, with this browser works
everything fine. I think it is a firefox problem?! My server is
apache 2.0.55 with php 5.2.1.
Greetings
Mario
It's hard to see how this could be a browser issue. Firefox does not
parse the scripts. The scripts are parsed on the server, under Apache.
The server outputs the result of the parsing and the browser displays
the result.
--
_____________________
Myron Turner
http://www.room535.org
http://www.bstatzero.org
http://www.mturner.org/XML_PullParser/
--- End Message ---
--- Begin Message ---
On Wed, Mar 28, 2007 at 07:20:37AM -0500, Myron Turner wrote:
> It's hard to see how this could be a browser issue. Firefox does not
> parse the scripts. The scripts are parsed on the server, under Apache.
> The server outputs the result of the parsing and the browser displays
> the result.
I know that the browser does not parse the scripts. But what the
hell is the problem? I have changed the apache log settings to debug
and nothing to see in the log files. The amusing of this is the
old mozilla works fine with the same script. Firefox pop up a download
window. The script is well formed, <?php ?> tags are included. I
would not be surprised when I see the source of the script in
firefox. But a download window???
The problem is very irregularly. Sometimes the effect steps on new
scripts, sometimes on old scripts that worked before.
Greetings
Mario
--
-----------------------------------------------------
| havelsoft.com - Ihr Service Partner für Open Source |
| Tel: 033876-21 966 |
| Notruf: 0173-277 33 60 |
| http://www.havelsoft.com |
| |
| Inhaber: Mario Günterberg |
| Mützlitzer Strasse 19 |
| 14715 Märkisch Luch |
-----------------------------------------------------
signature.asc
Description: Digital signature
--- End Message ---
--- Begin Message ---
Hello there,
I am trying to convert one object to another, something like clone.
For example.
---
class MyException extends Exception {
// My functions etc.. etc..
}
function ExceptionHandler($exception) {
// Convert an NoN MyException to an MyException????
}
set_exception_handler('ExceptionHandler');
---
Then when i do a:
throw new Exception('My Message', 1);
And i don't catch it my self, it will get into the ExceptionHandler.
Now i have some special methods within MyException to handle stuff.
And i want to copy/convert the $exception (Exception) object to a
MyException object to use its methods.
Thx in advanced.
--- End Message ---
--- Begin Message ---
2007. 03. 28, szerda keltezéssel 08.55-kor Mathijs ezt írta:
> Hello there,
>
> I am trying to convert one object to another, something like clone.
>
> For example.
> ---
> class MyException extends Exception {
> // My functions etc.. etc..
> }
>
> function ExceptionHandler($exception) {
> // Convert an NoN MyException to an MyException????
> }
>
> set_exception_handler('ExceptionHandler');
> ---
>
> Then when i do a:
> throw new Exception('My Message', 1);
why not use
throw new MyException('My Message', 1);
and then you don't have to convert it
greets
Zoltán Németh
>
> And i don't catch it my self, it will get into the ExceptionHandler.
> Now i have some special methods within MyException to handle stuff.
> And i want to copy/convert the $exception (Exception) object to a
> MyException object to use its methods.
>
> Thx in advanced.
>
--- End Message ---
--- Begin Message ---
Mathijs wrote:
> Hello there,
>
> I am trying to convert one object to another, something like clone.
>
> For example.
> ---
> class MyException extends Exception {
> // My functions etc.. etc..
> }
>
> function ExceptionHandler($exception) {
> // Convert an NoN MyException to an MyException????
> }
>
> set_exception_handler('ExceptionHandler');
> ---
>
> Then when i do a:
> throw new Exception('My Message', 1);
lets assume you can't throw a MyException to start with then, although
it does beg the question why.
secondly if the Exception reaches ExceptionHandler what is the point of
converting it? it would seem to me that rethrowing a MyException at that
point would only result in an uncaught exception, no?
anyway here is some untest stuff, although going by the manual
it's gonig to be a partial solution (given that the methods or Exception
are final) depending on what exactly you do/want with MyException:
class MyWrapperException extends MyException
{
private $mytrace;
function __construct($e) {
parent::__construct();
// no idea if these will be set properly
$this->message = $e->getMessage();
$this->code = $e->getCode();
$this->file = $e->getFile();
$this->line = $e->getLine();
// it doesn't seem possible to override the stack trace of
// an exception
$this->mytrace = $e->getTrace();
}
}
function ExceptionHandler($e) {
$my = new MyWrapperException($e);
// do something with $my
}
>
> And i don't catch it my self, it will get into the ExceptionHandler.
> Now i have some special methods within MyException to handle stuff.
> And i want to copy/convert the $exception (Exception) object to a
> MyException object to use its methods.
>
> Thx in advanced.
>
--- End Message ---
--- Begin Message ---
----- Original Message -----
From: "Zoltán Németh" <[EMAIL PROTECTED]>
In formal english, it's not allowed to use 've 'm etc, I'm should be
written as I am. So that's not gonna work i think.
But words like and are really english i think :)
Keep in mind that this is quite a hard way i think, but i don't have a
better solution.
Just for example, Dutch and Afrikaans are not very different, so it's
really hard to see which of the 2 the text is written in.
Tijnema
ps. If you can't get the difference between Dutch and Afrikaans, guess
for Dutch :) It's a lot more used then Afrikaans.
yeah, looking for very frequently used words seems better idea.
greets
Zoltán Németh
In Spanish, as it happens with many languages that use diacritical marks, in
informal chatting you often skip them. This has a long tradition in the
internet since years ago the support for those extra characters was
non-existent and today it is still somewhat patchy. I used to have two
modes of writing in Spanish, formal writing with all proper accents, tilde
and umlauts and email mode, without any of those. Nowadays, with support
for languages using the Roman alphabet widely available, there is no need to
omit diacritical marks, but you will often find them missing, particularly
in comments to blogs and other informal writing, just because of laziness or
carelessness or simply lack of formal education and in that I include
foreigners who more or less handle the language but not the minor details.
If English had accents, I would probably skip them.
So, using a spelling dictionary is not a good idea unless you can count your
input to be properly written. A text in Spanish with its accents missing
will give you lots of errors, and we use just one sort of accent (acute)
plus tilde and umlaut. The French use three sorts of accents, there is a
far higher chance of getting misspellings. I don't know how abundant
accents are in Magyar, for me Zoltan Nemeth is the same as Zoltán Németh,
but the first is a misspelling.
This problem also affect the frequency of individual letters. Should you
first convert accented vowels to their plain version? Because if you find
accented letters, it is a sure sign that it is not English, but if there is
none, it doesn't mean it is English, it might be some non-English text
without the correct accents. Should you count 'a' and 'á' separate or add
them together because people often omit the accent?
So, I also vote for the frequently used words approach and against the
lowest number of misspellings. And I would first convert everything to
plain, with no accents, both for the needle and the haystack.
Satyam
PS: also, it is accepted practice to omit accents on uppercase letters such
as in headings. It is not gramatically correct but a typographical
convention which the printing industry has been using for ages: the accents
simply don't fit nicely.
--- End Message ---
--- Begin Message ---
On 28/03/07, Satyam <[EMAIL PROTECTED]> wrote:
if you find accented letters, it is a sure sign that it is not English
That's a rather naïve approach. Written accents in English may be
rather passé, but they do exist.
-robin
--- End Message ---
--- Begin Message ---
Hi,
Recently we bought Zend Guard and because of Zend encoder we have to use
another Opcode cacher other than APC.
After searching net I found eAccelerator.
After installing eAccelerator with Zend Guard I saw more than %30 percent
performance lost against Normal PHP + APC.
Here my setup
;eAccelarator
zend_extension="/usr/lib/php5/20060613+lfs/eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
[Zend]
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.2.6
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.2.6
zend_optimizer.version=3.2.6
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
E accelerator gives %100 boost for normal php and not much as APC.
Is anyone have any idea about this ? Any suggestion to another opcode cacher
and or Zend Guard options.
Regards
Sancar
--- End Message ---
--- Begin Message ---
Sancar Saran wrote:
Hi,
Recently we bought Zend Guard and because of Zend encoder we have to use
another Opcode cacher other than APC.
After searching net I found eAccelerator.
After installing eAccelerator with Zend Guard I saw more than %30 percent
performance lost against Normal PHP + APC.
Wouldn't it be better to talk to Zend directly about this? Since you've
purchased their software they give you support and are pretty helpful.
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
On Wednesday 28 March 2007 11:36, Chris wrote:
> Sancar Saran wrote:
> > Hi,
> >
> > Recently we bought Zend Guard and because of Zend encoder we have to use
> > another Opcode cacher other than APC.
> >
> > After searching net I found eAccelerator.
> >
> > After installing eAccelerator with Zend Guard I saw more than %30 percent
> > performance lost against Normal PHP + APC.
>
> Wouldn't it be better to talk to Zend directly about this? Since you've
> purchased their software they give you support and are pretty helpful.
>
Really ???,
Owww how can I miss this....
Maybe you did not notice they sell own Expensive opcode cache...
If I understand your point of view, I can guess your reply. "If you had rich
enogh to buy a encoder, you can buy that zend cache".
Thank you...
--- End Message ---
--- Begin Message ---
Sancar Saran wrote:
> On Wednesday 28 March 2007 11:36, Chris wrote:
>> Sancar Saran wrote:
>>> Hi,
>>>
>>> Recently we bought Zend Guard and because of Zend encoder we have to use
>>> another Opcode cacher other than APC.
>>>
>>> After searching net I found eAccelerator.
>>>
>>> After installing eAccelerator with Zend Guard I saw more than %30 percent
>>> performance lost against Normal PHP + APC.
>> Wouldn't it be better to talk to Zend directly about this? Since you've
>> purchased their software they give you support and are pretty helpful.
>>
>
> Really ???,
>
> Owww how can I miss this....
>
> Maybe you did not notice they sell own Expensive opcode cache...
>
> If I understand your point of view, I can guess your reply. "If you had rich
> enogh to buy a encoder, you can buy that zend cache".
your assumption, as to what he really meant, is unfounded - the mindset required
to go from what he said to what your assuming he said is not becoming of anyone
who wants to call himself a programmer.
go to Zend, you gave them money so you'll find they will give you advice, and
explain your problem - quite probably they will have a solution that will satify
you and if they just throw the 'buy ZendCache' advice in your face *then* you
can
BITCH AT THEM for their 'take-your-money-and-leave-out-to-dry' attitude
not people on this list (who, generally, have nothing to do with Zend).
right now you have no idea what their stance might be, you might ask them and
they'll come back at you with 'use APC, but change ini setting X Y and Z'
>
> Thank you...
your welcome.
>
--- End Message ---
--- Begin Message ---
On 3/28/07, Sancar Saran <[EMAIL PROTECTED]> wrote:
On Wednesday 28 March 2007 11:36, Chris wrote:
> Sancar Saran wrote:
> > Hi,
> >
> > Recently we bought Zend Guard and because of Zend encoder we have to use
> > another Opcode cacher other than APC.
> >
> > After searching net I found eAccelerator.
> >
> > After installing eAccelerator with Zend Guard I saw more than %30 percent
> > performance lost against Normal PHP + APC.
>
> Wouldn't it be better to talk to Zend directly about this? Since you've
> purchased their software they give you support and are pretty helpful.
>
Really ???,
Owww how can I miss this....
Maybe you did not notice they sell own Expensive opcode cache...
If I understand your point of view, I can guess your reply. "If you had rich
enogh to buy a encoder, you can buy that zend cache".
If you have a performance drop of that much something is going wrong
with the interaction between zend & apc.
Two sets of people can solve this:
- zend
- apc.
Zend is the obvious choice because they have access to their source code.
Plus you paid for their software - which includes support.
They might just go "Option X in APC doesn't work well with Zend Guard
- change this setting"
Or they might go "Hey, that's really crap, no idea what's going on
there - give us access to your server or send us a backtrace"
Or they might say something else.
You don't know until you ask.
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
Hi all.
I am sending emails using the SMTP connection with PHP using the
HTMLMimeMail class. Now there is a setting there for the HELO command
text, can anyone explain to me what this is and what it should be set to?
TIA.
--
------------------------------------------------------------------------
Angelo Zanetti
Systems developer
------------------------------------------------------------------------
*Telephone:* +27 (021) 469 1052
*Mobile:* +27 (0) 72 441 3355
*Fax:* +27 (0) 86 681 5885
*
Web:* http://www.zlogic.co.za
*E-Mail:* [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
--- End Message ---
--- Begin Message ---
please check the RFC 821, it shows the SMTP protocol.
HELO domain.com
it should fill your Mail server domain in order to prevent email going through
most of anti-spam.
----- Original Message -----
From: "Angelo Zanetti" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, March 28, 2007 5:10 PM
Subject: [PHP] HELO command when sending email using PHP
> Hi all.
>
> I am sending emails using the SMTP connection with PHP using the
> HTMLMimeMail class. Now there is a setting there for the HELO command
> text, can anyone explain to me what this is and what it should be set to?
>
> TIA.
> --
> ------------------------------------------------------------------------
> Angelo Zanetti
> Systems developer
> ------------------------------------------------------------------------
>
> *Telephone:* +27 (021) 469 1052
> *Mobile:* +27 (0) 72 441 3355
> *Fax:* +27 (0) 86 681 5885
> *
> Web:* http://www.zlogic.co.za
> *E-Mail:* [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
demo wrote:
please check the RFC 821, it shows the SMTP protocol.
HELO domain.com
it should fill your Mail server domain in order to prevent email going through
most of anti-spam.
Thanks, so if Im running localhost, the HELO command will also be localhost?
--- End Message ---
--- Begin Message ---
by the way, here is php issues maillist not EMAIL issues:)
if any problem with SMTP or email, please contact me directly
--
http://tssoft.3322.org:8080/2.1/
demo:demodemo
it's my email server developped by MSVC
----- Original Message -----
From: "Angelo Zanetti" <[EMAIL PROTECTED]>
To: "demo" <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Wednesday, March 28, 2007 5:33 PM
Subject: Re: [PHP] HELO command when sending email using PHP
>
>
> demo wrote:
>> please check the RFC 821, it shows the SMTP protocol.
>>
>> HELO domain.com
>> it should fill your Mail server domain in order to prevent email going
>> through most of anti-spam.
>>
> Thanks, so if Im running localhost, the HELO command will also be localhost?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
localhost is ok if u just send mail in the LAN.
if you send mail in the internet, it may not be ok, bcoz it will be cut by
anti-spam.
most smtp servers always validate your HELO area and your DNS and check if
them match.
----- Original Message -----
From: "Angelo Zanetti" <[EMAIL PROTECTED]>
To: "demo" <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Wednesday, March 28, 2007 5:33 PM
Subject: Re: [PHP] HELO command when sending email using PHP
>
>
> demo wrote:
>> please check the RFC 821, it shows the SMTP protocol.
>>
>> HELO domain.com
>> it should fill your Mail server domain in order to prevent email going
>> through most of anti-spam.
>>
> Thanks, so if Im running localhost, the HELO command will also be localhost?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Hi!
I want to use PDO in my apps for connecting to several RDBSs, one of them,
sql server 2000 and 2005. I tried to use as DSN something like "mssql:..."
(as I've seen in the php manual pages) but I get a PDOException with the
message "Unable to open PDO connection [wrapped: could not find driver]". I
can work well with the mssql built-in functions (like mssql_connect,
mssql_query and so on...) and even I can almost work perfectly using in my
dsn "dblib:...".
So first question: is the PDO's driver "mssql" deprecated or is it me doing
something wrong in the PHP installation?
BTW, I use php-5.2.1
In case that the answer to the first question is that "mssql" is no more
used as a PDO driver, I have a problem... I have stored procedures in sql
server that return multiple rowsets, I've seen that PDO offers
functionability to manage this, but not for the dblib driver... if I try to
use the $stmt->nextRowSet() method, I get an exception like "Driver does not
support this function: driver does not support multiple rowsets"
What can I do then to work with my stored procs?
Thanks in advance
--- End Message ---
--- Begin Message ---
using mssql_fetch_assoc worked out great. I had actually typed it in before
but the code formatting didn't change the color of the text like it normally
does for my mssql functions so I assumed it wasn't valid and deleted it.
Thanks to everyone for your help!
On 3/27/07, Jim Lucas <[EMAIL PROTECTED]> wrote:
Dan Shirah wrote:
> Okay, I thought this was VERY simple, but I cannot wrap my mind around
what
> I am doing wrong.
>
>
> echo $_POST['max_id']; *The echo returns the correct result
> *if($_POST['max_id'] ='') { *This is suppose to run the below query if
> $_POST['max_id'] is not blank*
>
> $max_id = $_POST['max_id']; *Sets my POST value to a variable*
> $info = "SELECT * FROM payment_request WHERE id = '$max_id'"; *Selects
> record from my database by the matching ID's*
> $result_info = mssql_query($info) or die(mssql_error()); *Puts the
query
> results into a variable*
> $row_info = ifx_fetch_row($result_info); *Makes a row in an array for
all
> the returned fields from my query*
>
> $my_info = $row_info['my_value'];
>
> <input type="Text" value="<?php echo $my_info; ?>" size="20"
maxlength="16"
> name="my_value"> *However, this box returns no data.*
>
> I should be using if($_POST['max_id'] ='') { and
notif($_POST['max_id']
> !=='') { correct? Since it is a comparative function just the =
should
> be correct.
>
Can someone take a look at this solution and tell me if this would be a
descent solution for his
problem?
I use this logic all over my code base, let me know if it is efficient,
clean, well structured, etc...
if ( isset($_POST['max_id']) ) {
$max_id = (int)$_POST['max_id'];
if ( empty($max_id) ) {
die('not a valid id');
# or some other, more graceful, way of catching the error
}
$SQL = "SELECT * FROM payment_request WHERE id = '{$max_id}'";
if ( ( $result_info = mssql_query($SQL) ) === false ) {
die(mssql_error());
# again, maybe something more graceful here
}
if ( mssql_num_rows( $result_info ) == 0 ) {
die('nothing to display');
# again, maybe something more graceful here
} else {
while ( $row_info = mssql_fetch_array($result_info) ) {
echo '<input type="Text"
value="'.$row_info['my_value'].
'" size="20" maxlength="16" name="my_value">';
}
}
}
--
Enjoy,
Jim Lucas
Different eyes see different things. Different hearts beat on different
strings. But there are times
for you and me when all such things agree.
- Rush
--- End Message ---