php-general Digest 14 Jan 2005 17:14:22 -0000 Issue 3227
Topics (messages 206343 through 206375):
Re: php editor
206343 by: Greg Donald
206345 by: Greg Donald
206357 by: eoghan
206359 by: zerof
206360 by: zerof
206368 by: Zouari Fourat
206370 by: Bostjan Skufca . domenca.com
Re: Begining CVS
206344 by: Greg Donald
Re: Help with encryption
206346 by: Tom Rogers
206347 by: Greg Donald
206350 by: Jochem Maas
Re: regex help
206348 by: Bret Hughes
206351 by: Jason Wong
206371 by: Robin Vickery
206373 by: Ford, Mike
Re: Preventing execution without inclusion
206349 by: Thomas Goyne
206354 by: Adam Hubscher
206356 by: Jacek Blech
206365 by: Stan F
206372 by: Jochem Maas
Re: Data Enryption
206352 by: John Nichel
custom superglobals?
206353 by: Justin French
writing binary data to file
206355 by: Davide
Simple question: $_POST
206358 by: Stuart Felenstein
Re: sendmail crash
206361 by: Michiel van der Blonk
php5 threadsafe / apache2 mpm=worker
206362 by: Jason Morehouse
404 custom handler on a cgi-wrap PHP - No input specified error
206363 by: Luke Barker
206366 by: Matthew Weier O'Phinney
Re: Help please!!
206364 by: Jay Blanchard
Re: calling php functions as library or cmd line
206367 by: Robert Cummings
Need help with array/foreach
206369 by: Collin Davis
Re: mysql improved extensions affected_rows
206374 by: Tom
Re: strange in MySQL Query.
206375 by: Jochem Maas
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 ---
On Thu, 13 Jan 2005 22:11:05 +0000, Justin <[EMAIL PROTECTED]> wrote:
> Is there a Debugger for PHP?
php -l filename.php for basic syntax check.
If you need more than that you can turn of full error reporting and
view the errors directly on the screen:
error_reporting( E_ALL );
ini_set( 'display_errors', 1 );
But later when you go to a production environment I'd go with:
error_reporting( E_ERROR | E_WARNING | E_PARSE );
ini_set( 'display_errors', 0 );
ini_set( 'log_errors', 1 );
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--- End Message ---
--- Begin Message ---
On Thu, 13 Jan 2005 16:37:24 -0800 (PST), welly limston
<[EMAIL PROTECTED]> wrote:
> i'm usually use Dreamweaver to edit php code
> and debug in it
> it's very help ones us
> why don't u try
Why don't you mail me $399 and I will. :)
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--- End Message ---
--- Begin Message ---
Since I do Java, Python etc. on OSX/windows/Linux, I'm using Eclipse
with the PHPEclipse (PHPEclipse.de), I'm just starting PHP, but I'm
pretty happy with it so far. One thing I am wondering about is the
situation which Debugging in PHP4 / PHP5. Is there a Debugger for PHP?
http://dd.cron.ru/dbg/downloads.php
eoghan
--- End Message ---
--- Begin Message ---
http://www.maguma.com/
----
zerof
--- End Message ---
--- Begin Message ---
http://www.maguma.com/
----
zerof
--- End Message ---
--- Begin Message ---
I used PHPedit 0.6, PHPDesigner 2005, PHPed and Zend on windows.
and vi, eclipse and zend on linux.
Here's what i prefer :
if u'r looking for a free editor try eclipse/linux or PHPDesigner 2005/windows
and if u can afford the licence try the Zend, am using it by now and
it's magic ! plus it runs on windows/linux !
On Thu, 13 Jan 2005 18:29:30 -0500, GH <[EMAIL PROTECTED]> wrote:
> On linux I use thee KDE IDE program...
>
>
> On Thu, 13 Jan 2005 14:02:17 -0600, Greg Donald <[EMAIL PROTECTED]> wrote:
> > On Thu, 13 Jan 2005 18:02:12 +0200, William Stokes <[EMAIL PROTECTED]>
> > wrote:
> > > I'm quite new with writing php code. I was considering of using some kind
> > > of
> > > php editor program to help with the syntax. Know any goog ones?
> >
> > vim.org
> > editplus.com
> >
> > Both support PHP syntax highlighting.
> >
> > --
> > Greg Donald
> > Zend Certified Engineer
> > http://destiney.com/
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
1. Does anybody know an editor that supports Smarty tags natively or via some
sort of custom extension/configuration?
2. Does anybody use Scite (for Un*x) or SciteFlash (for Windows)? I prefer
it's clean and lightweight interface (once properly configured)...
Regards,
Bostjan
On Thursday 13 January 2005 17:02, William Stokes wrote:
> Hello,
>
> I'm quite new with writing php code. I was considering of using some kind
> of php editor program to help with the syntax. Know any goog ones?
>
> Thanks
> -Will
--- End Message ---
--- Begin Message ---
On Fri, 14 Jan 2005 01:30:39 +0100, Jochem Maas <[EMAIL PROTECTED]> wrote:
> do you use a visual client
> for subversion?
No. I use svn from command line.
> the reason I ask is that I found cvs a nightmare until
> someone pointed me to tortoiseCVS - which is just too easy to use!
> And I just noticed tortoiseSVN exists which seems to be the subversion
> counterpart...(can't tell if the projects/devs are related or whether
> the name is merely a little mark of respect towards its cvs counterpart)
>
> Also did you step over to subversion out of need for extra functionality
> or was it originally down to curiosity
I began to use it because I was contracting work from a company who
used it. I saw all the things in it that were improved compared to
cvs. So I switched at home too.
Some things are worse though. Like in cvs it's pretty simple to hide a file:
echo 'config.php' > .cvsignore
versus the more complicated syntax for hiding one with subversion:
svn propset svn:ignore -F 'config.php' .
> personally I'm still struggling
> with the concepts of branches and tag too much to dive in and learn even
> more powerful functionality.
Subversion shines here. When you create the initial tree you make the
trunk, branches, and tags directories from the start.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--- End Message ---
--- Begin Message ---
Hi,
Friday, January 14, 2005, 7:53:30 AM, you wrote:
BD> Howdy all -
BD> I have RTFM and STFW and I still can't get encryption to work. What I
BD> finally ended up with from the PHP documentation is long, unwieldy,
BD> confusing, and doesn't work. I give up. I threw my big mess away and
BD> would like to start from scratch.
BD> Could anyone point me to a web page or other documentation that shows a
BD> SIMPLE example of encryption? I need two-way encryption & decryption,
BD> not a one-way hash. I'll be using this to obfuscate get parameters.
BD> Any pointers appreciated. Thanks all,
BD> - Brian
Here is a class that uses mcrypt that might be helpful:
class encrypt_class{
var $secret;
function encrypt_class(){
$this->secret = 'put pass string here';
}
Function encode($id){
$eid = $iv = 0;
$len = strlen($id);
$id = $len.'-'.$id; //encode the string length for trimming later
$td = mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, "");
$key = substr($this->secret, 0, mcrypt_enc_get_key_size ($td));
$iv = pack("a".mcrypt_enc_get_iv_size($td),$iv);
mcrypt_generic_init ($td, $key, $iv);
$eid = base64_encode(mcrypt_generic ($td, $id));
mcrypt_generic_deinit($td);
return $eid;
}
Function decode($eid){
$id = $iv = 0;
$td = mcrypt_module_open (MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, "");
$key = substr($this->secret, 0, mcrypt_enc_get_key_size ($td));
$iv = pack("a".mcrypt_enc_get_iv_size($td),$iv);
mcrypt_generic_init ($td, $key, $iv);
$id = mdecrypt_generic ($td, base64_decode($eid));
$len = strtok($id,'-');
$id = substr($id,(strlen($len)+1),$len);
mcrypt_generic_deinit($td);
return $id;
}
}
//useage
$str = "Hello World";
$enc = new encrypt_class();
$estr = $enc->encode($str);
echo "$estr<br>";
$dstr = $enc->decode($estr);
echo "$dstr<br>";
--
regards,
Tom
--- End Message ---
--- Begin Message ---
On Thu, 13 Jan 2005 13:53:30 -0800, Brian Dunning
<[EMAIL PROTECTED]> wrote:
> Could anyone point me to a web page or other documentation that shows a
> SIMPLE example of encryption?
I know absolutely nothing about encryption. There are like 6 people
in the entire world who know something about it, but sadly.. I'm not
one of them. Good luck in your quest.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--- End Message ---
--- Begin Message ---
Brian Dunning wrote:
Howdy all -
I have RTFM and STFW and I still can't get encryption to work. What I
good man! (for trying that is) bummer its not working yet...
finally ended up with from the PHP documentation is long, unwieldy,
confusing, and doesn't work. I give up. I threw my big mess away and
you could have lived with the 'long, unwieldy, confusing' part no doubt!
would like to start from scratch.
does that mean you tried using the mcrypt extension? I guess it must do.
Could anyone point me to a web page or other documentation that shows a
SIMPLE example of encryption? I need two-way encryption & decryption,
this tutorial (2 parts) at webmonkey does quite a good job
of taking you thru it step by step:
http://webmonkey.wired.com/webmonkey/programming/php/tutorials/tutorial1.html
also there has just been a thread on this list which might help you (in
case you hadn't seen/read it)
subject: Data Encryption
started by: [EMAIL PROTECTED]
started on: 12-Jan-2005
AFAIKT though proper encryption and SIMPLE just don't go hand in hand.
on the other hand encryption and ''brainfreeze' were made for each other
:-) if you ask me.
not a one-way hash. I'll be using this to obfuscate get parameters.
do you just want to obfuscate or is it important that content is
actually secure?
I can imagine that the issue is compounded in your case by the fact that
the GET params are pushed over the wire (which may garbble the encrypted
strings - can anyone confirm/deny that hypothesis?) in which case use of
url_encode()/url_decode() may need to be used to protect the integrity
of the strings.
---
If the parameters are taken from a fixed list of values - e.g.
columnnames for instance then maybe one-way encryption will work for
you. for instance say you have a sortby GET param, you could take the
columnnames of your table and hash them with md5sum() or sha1() and
stick them into the relevant urls - then if/when a url comes back to the
server the hash in the GET param could be checked against the hashes of
the columnnames until you find a match - if you find a match you know
which column was requested.
The example is contrived but hopefully you understand what I mean and
you can determine whether this is a possibility for you.
---
Lastly you may have to ask yourself if it's necessary/feasable to do GET
param encryption (in bang for buck kind of way). Unfortunately I can
imagine that such a decision may have been made for you by some
non-tehnical manager (it wouldn't be the first time!).... in which case
arm yourself with a good argument and go batter him with it ;-)
Any pointers appreciated. Thanks all,
- Brian
--- End Message ---
--- Begin Message ---
On Thu, 2005-01-13 at 15:06, Jason Morehouse wrote:
> Hello,
>
> I normally can take a bit of regex fun, but not this time.
>
> Simple enough, in theory... I need to match (count) all of the bold tags
> in a string, including ones with embedded styles (or whatever else can
> go in there). <b> and <b style="color:red">. My attempts keep matching
> <br> as well.
>
interesting. I usually try to specifically describe in english what I
am looking for. in your case, I would say a string that begins with <
followed by zero or more spaces followed by a b or a B followed by zero
or more spaces followed by zero or more anything followed by >
/<\s*[bB]\s*.*>/
or perhaps it is enough to say match a < followed by 0 or more spaces
followed by a b or a B and not followed by a r or a R and followed by
zero or more anything followed by >
/<\s*[bB][^rR].*>/
These are untested but should be close and can be used in preg*
functions. the greedy matching might grab too much stuff and I always
forget how to do that when I hit it.
try them, let us see the results and we can get there
Bret
--- End Message ---
--- Begin Message ---
On Friday 14 January 2005 05:06, Jason Morehouse wrote:
> Simple enough, in theory... I need to match (count) all of the bold tags
> in a string, including ones with embedded styles (or whatever else can
> go in there). <b> and <b style="color:red">. My attempts keep matching
> <br> as well.
Quick-n-dirty:
preg_match_all('/(<b>|<b\s+.*>)/iU', $doo, $match);
Feel free to extend to check for closing tags :)
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
New Year Resolution: Ignore top posted posts
--- End Message ---
--- Begin Message ---
On Thu, 13 Jan 2005 16:06:32 -0500, Jason Morehouse <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I normally can take a bit of regex fun, but not this time.
>
> Simple enough, in theory... I need to match (count) all of the bold tags
> in a string, including ones with embedded styles (or whatever else can
> go in there). <b> and <b style="color:red">. My attempts keep matching
> <br> as well.
Put in a \b to match a wordbreak after the 'b'. Something like this maybe:
/<b\b[^>]*>/i
.
-robin
--- End Message ---
--- Begin Message ---
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
> -----Original Message-----
> From: Jason Morehouse
> Sent: 13/01/05 21:06
>
> I normally can take a bit of regex fun, but not this time.
>
> Simple enough, in theory... I need to match (count) all of the bold
> tags
>
> in a string, including ones with embedded styles (or whatever else can
> go in there). <b> and <b style="color:red">. My attempts keep
> matching <br> as well.
Just off the top of my head (and untested!), I'd try something like
/<b(\s+[^>]*)?>/
Cheers!
Mike
--- End Message ---
--- Begin Message ---
On Thu, 13 Jan 2005 16:25:30 -0600, Adam Hubscher
<[EMAIL PROTECTED]> wrote:
1 (the preferred way): user accesses
http://www.example.org/index.php?function=Join, this loads the class
NewUser and begins its implementation. Because of the __autoload, it
includes class.join.php, in order to utilize the class.
2 (the wrong way): user accesses
http://www.example.org/includes/class.join.php without going through
index.php.
I am trying to prevent 2 from even occuring, utilizing a piece of code
that would check if index.php had included it, or not. This code would
be in the beginning of all the class files, at the top, before any other
code was to be executed.
Ideally, you'd put all of the files users aren't supposed to access
outside of the document root, so there just isn't a uri that points to the
file.
If (as your question makes it sound) the includes do nothing but define a
class, and don't actually run any code, then it really doesn't matter if
users directly access an include, as nothing will happen.
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
http://www.smempire.org
--- End Message ---
--- Begin Message ---
Thomas Goyne wrote:
On Thu, 13 Jan 2005 16:25:30 -0600, Adam Hubscher
<[EMAIL PROTECTED]> wrote:
1 (the preferred way): user accesses
http://www.example.org/index.php?function=Join, this loads the class
NewUser and begins its implementation. Because of the __autoload, it
includes class.join.php, in order to utilize the class.
2 (the wrong way): user accesses
http://www.example.org/includes/class.join.php without going through
index.php.
I am trying to prevent 2 from even occuring, utilizing a piece of
code that would check if index.php had included it, or not. This code
would be in the beginning of all the class files, at the top, before
any other code was to be executed.
Ideally, you'd put all of the files users aren't supposed to access
outside of the document root, so there just isn't a uri that points to
the file.
If (as your question makes it sound) the includes do nothing but define
a class, and don't actually run any code, then it really doesn't matter
if users directly access an include, as nothing will happen.
Ok, thats what I expected to be the case - I was just being cautious.
Unfortunately with what the application is providing for (a game
server), there is a large userbase of people that would potentially do
anything in their power... or learning ability, to inflict harm upon the
users and the database of the site/game server which I am running.
Security has been my primary lack-of-sleep for the last few days, and
this was one of the last things eluding me.
Thank you very much Thomas!
--- End Message ---
--- Begin Message ---
Adam Hubscher wrote:
I am trying to prevent 2 from even occuring, utilizing a piece of code
that would check if index.php had included it, or not. This code would
be in the beginning of all the class files, at the top, before any
other code was to be executed.
use the 2 constants/variables available in PHP scripts to check if the
class file has been included by another php script:
__FILE__ // the name of the file the current codeline is a part of
$_SERVER["SCRIPT_FILENAME"] // the name of the primary php file, that
has included the current file
so it may be enough for you to do something like this in you class files:
<?php
if ( basename(__FILE__) != 'index.php' ) {
// redirection to index.php ...
}
class Join
{}
?>
As of yet, it has eluded me...
hth, bye.
--- End Message ---
--- Begin Message ---
----- Original Message -----
From: "Adam Hubscher" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, January 14, 2005 1:25 AM
Subject: [PHP] Preventing execution without inclusion
> From within the application, I use one page to include
> classes/variables and so on. Is there a way (I may have been missing it
> in the documentation for PHP, however I didnt see anything related) to
> prevent a user from directly accessing/executing *.php by the file
> making sure taht it was only included by index.php?
>
> For example:
>
> config.php defines:
>
> function __autoload($class_name) {
>
> $class_name = strtolower($class_name);
> include_once('class.'.$class_name.'.php');
> }
>
> as per PHP5 example
>
> 1 (the preferred way): user accesses
> http://www.example.org/index.php?function=Join, this loads the class
> NewUser and begins its implementation. Because of the __autoload, it
> includes class.join.php, in order to utilize the class.
>
> 2 (the wrong way): user accesses
> http://www.example.org/includes/class.join.php without going through
> index.php.
>
> I am trying to prevent 2 from even occuring, utilizing a piece of code
> that would check if index.php had included it, or not. This code would
> be in the beginning of all the class files, at the top, before any other
> code was to be executed.
A common way to do it:
# in your index.php just before any inclusion
define( '__INDEX__', true );
# in other files
if( !defined( '__INDEX__' ) ) die( 'You cannot execute this script' );
Sorry if I didn't get u the right way, I'm too tired..
WBR
Stan F
>
> As of yet, it has eluded me...
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Adam Hubscher wrote:
From within the application, I use one page to include
classes/variables and so on. Is there a way (I may have been missing it
in the documentation for PHP, however I didnt see anything related) to
prevent a user from directly accessing/executing *.php by the file
making sure taht it was only included by index.php?
there are any number of ways to do this I can think of three of hand:
1. use a suitably configured .htaccess to deny access to the dir where
you 'include' files are.
2. place the include directory outside of the webroot.
3. add something like the following to all your include files:
if (!defined('OK_TO_INCLUDE')) { die('go away nosey parker!'); }
and make sure to define the constant before you include any of your
'include' files. e.g.
define('OK_TO_INCLUDE', true);
---
hope that gives you an idea.
oh and turning off the server also works ;-)
For example:
config.php defines:
function __autoload($class_name) {
$class_name = strtolower($class_name);
include_once('class.'.$class_name.'.php');
}
as per PHP5 example
1 (the preferred way): user accesses
http://www.example.org/index.php?function=Join, this loads the class
NewUser and begins its implementation. Because of the __autoload, it
includes class.join.php, in order to utilize the class.
2 (the wrong way): user accesses
http://www.example.org/includes/class.join.php without going through
index.php.
I am trying to prevent 2 from even occuring, utilizing a piece of code
that would check if index.php had included it, or not. This code would
be in the beginning of all the class files, at the top, before any other
code was to be executed.
As of yet, it has eluded me...
--- End Message ---
--- Begin Message ---
Jochem Maas wrote:
John Nichel wrote:
Jochem Maas wrote:
<snip>
(no disrespect to Zend, but ZCE _sounds_ a lot like MSCE and everyone
knows what thats worth ;-) - just a but of humour guys!)
<snip>
Oh yeah, I can hear all the Zend people laughing from here.
good cos that means they have a better sense of humour that most
Softies. my dig was at MCSE actually, which is just as unfounded as
likening it to ZCE, and nobody seems to be complaining about me ripping
into MCSE - double standards guys!
I'm sorry I can't take this too seriously (IT that is) - half the people
on the planet don't even have running water. and with regard to IT, the
target is moving so fast that any form of certification is bound to go
out of date faster than a can of milk in the sahara.
Another thing about certification and exams - if you take them and pass
it tells the world exactly one thing - your good at cramming info and
passing exams. And as far as commercial certification goes my own,
jaded, opinion is that these setups are there to make money not because
of some altruistic desire to increase general competance.
But just to be absolutely clear:
Zend people, ZCEs, anyone else remotely offended; I was only joking, I
didn't mean any offence and I apologize if I caused any. My view on Zend
is that overall its a great company, the guys that run it and work there
deserve the success they are getting and I commend them for the way they
are integrating a commercial business with Open Source.
How's the view from on top of your soap box?
--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com
--- End Message ---
--- Begin Message ---
Hi,
Is it possible to define my own superglobal variable or array?
Rather than doing `global $cfg;` in all of my functions, I'd like to
just set $cfg as a superglobal in one place and forget about it.
Yes, I'm aware I could use $GLOBALS['cfg'], but I'd much prefer it
worked like $_GET etc.
---
Justin French, Indent.com.au
[EMAIL PROTECTED]
Web Application Development & Graphic Design
--- End Message ---
--- Begin Message ---
hi,
I must change some bytes in array filled from a msssql text field; now I do:
function adjust (&$ar_in) {
$ar_in{0}='�';
$ar_in{1}='�';
$ar_in{3}='�';
$ar_in{4}='�';
$ar_in{5}='�';
$ar_in{7}='�';
}
I've copied/pasted values from an hex editor and this works ok. Question
is: does exists a more elegant way to do this, using directly hex values
in the script?
I tried $ar_in{0}=0xFF for example, but when I write on file I got hex
32 (ascii '2').
--- End Message ---
--- Begin Message ---
When using $_POST vars is it required that a form is
used ?
In other words I can create an href link and echo
variable and pick them up using $_GET in the following
page.
No so with $_POST ?
Stuart
--- End Message ---
--- Begin Message ---
Hi
> > Is the above the ACTUAL email you are sending?
Haha. That would be a funny email. No, this is just sample text. The actual
email is 8KB and contains no images/attachments.
> (I just tried googling the problem but the only thing that seemed
> related that I came up with were Michiel posts :-S )
Yeah I tried that too... I feel so alone..
Anyway, some new information: I found a workaround. I am using the Smarty
template engine. When I delete all smarty variables from the template I do
get a page, instead of the 404. So, it must mean that Smarty trips over
something that either sendmail or the PEAR code does. When I take out the
sendmail line everything also works fine, so it's a combination of things.
The only remaining problem is this pain in the back of my head in the
'Mental Frustration' lobe.
Any new insights are welcome. I'll post the problem to the Smarty list.
Michiel
--
*****************************
Michiel van der Blonk
CaribMedia Marketing & Consultancy N.V.
Oranjestad, Aruba
Tel: (297) 583-4144 Fax: (297) 582-6102
http://www.caribmedia.com
----------------------------------------------------
Website Design, Web Application Development,
Web Hosting, Internet Marketing
----------------------------------------------------
Operators of:
Visit Aruba - http://www.VisitAruba.com
Aruba Links - http://www.ArubaLinks.com
Aruba Business Directory - http://www.visitaruba.com/business/
Aruba Real Estate Locator - http://www.arubarealestate.com
Aruba Bulletin Board - http://bb.visitaruba.com/
Aruba Trip Reports - http://tripreports.visitaruba.com
Aruba Chat - http://chat.visitaruba.com
The VisitAruba Plus SAVINGS CARD - http://www.visitaruba.com/plus/
Contents of this communication are confidential and legally privileged. This
document is intended solely for use of the individual(s) or entity/entities
to whom it is addr
"Jochem Maas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Richard Lynch wrote:
> > Michiel van der Blonk wrote:
> >
>
> ...
>
> >
> > Is the above the ACTUAL email you are sending?
> >
> > Or merely a demonstrative sample?
> >
> > Cuz, like, if the email you are REALLY sending is *HUGE* then I'd not
be
> > surprised by the messages above...
> >
>
> Richard, what do you consider huge. I mean people (read: some of my
> idiot co-worker) happily send 10Meg attachments via sendmail all day
> long (okay so its not via PHP, but I sometimes use the phpMailer script
> to send emails using PHP/sendmail and I have successfully done so with
> 10+ Megs of files attached).
>
> is it possible he is hitting a PHP memory limit?
>
> (I just tried googling the problem but the only thing that seemed
> related that I came up with were Michiel posts :-S )
--- End Message ---
--- Begin Message ---
Hello,
Just wondering if anyone is using the apache worker module with php?
I've complied php5 with zend threadsafe support, and apache2 with the
MPM worker module on a Linux box. Everything seems sweet.
mysqli_thread_safe() reports true... anyone know if this configuration
may include modules that aren't threadsafe?
with-apxs2=/usr/local/apache2/bin/apxs with-gd enable-gd-native-ttf
with-pspell with-zlib with-freetype-dir with-curlwrappers
with-mime-magic with-curl enable-shmop with-jpeg-dir
with-mcrypt=/usr/lib with-mysqli enable-magic-quotes
with-enable-sockets enable-roxen-zts
Thanks,
-J
--
Jason Morehouse
Vendorama - Create your own online store
http://www.vendorama.com
--- End Message ---
--- Begin Message ---
Hi,
This maybe a PHP problem, but is associated with Apache too - so my
apologies if it is slightly off topic. My web hosts use a CGI wrap
version of PHP 4.3.10
I have made a 404 custom error handler, using .htaccess in a directory
- it is usppoed to route all unfound pages to error.php, and works as
expected for .htm and .html pages as well as gifs etc. But ofr .php
scripts, e.g /path/to/wrongurl.php it doesnt show my page -
instead it shows No Input file specified.. After some Googling I have
only found people witht eh similar problem without solutions.
Can any one help me on this? I should say that in IE it just gets the
default 404 ( I think this is windows own one responding to the
particular http response header) - in firefox you get the 'No input '
error
thanks for any advice
Luke
--
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
* Luke Barker <[EMAIL PROTECTED]>:
> This maybe a PHP problem, but is associated with Apache too - so my
> apologies if it is slightly off topic. My web hosts use a CGI wrap
> version of PHP 4.3.10
>
> I have made a 404 custom error handler, using .htaccess in a directory
> - it is usppoed to route all unfound pages to error.php, and works as
> expected for .htm and .html pages as well as gifs etc. But ofr .php
> scripts, e.g /path/to/wrongurl.php it doesnt show my page -
> instead it shows No Input file specified.. After some Googling I have
> only found people witht eh similar problem without solutions.
>
> Can any one help me on this? I should say that in IE it just gets the
> default 404 ( I think this is windows own one responding to the
> particular http response header) - in firefox you get the 'No input '
> error
Can you post the error.php page here, or a link to somewhere where we
can view the source?
--
Matthew Weier O'Phinney | mailto:[EMAIL PROTECTED]
Webmaster and IT Specialist | http://www.garden.org
National Gardening Association | http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
--- End Message ---
--- Begin Message ---
[snip]
Thanks guys for any help troubleshooting this.
[/snip]
Is the drive full? Enough memory? An unusual number of connections? Any
other applications added to the system? what do you see when you run
top? Have you looked at a MySQL process list?
--- End Message ---
--- Begin Message ---
On Thu, 2005-01-13 at 09:46, Cere Davis wrote:
> Does anyone know how to write php libraries in a modular way so that you
> can both test the libraries/functions on the command line with arguments
> and/or use the php library as a part of your web code with 'require_once()'
> syntax? Sort of like how Python or Ruby works?
Yes.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
Hi,
Long time reader, first time poster. I've been using Dreamweaver to
generate my PHP (I know - but I'm a designer... most of this makes
absolutely zero sense to me), but I've run into something that I know could
be done better. If you look here: http://pastebin.com/228804 you can see
that I have several MySQL queries. Now I know that surely these can be
concatenated into an array or something, but I have no idea how to do that -
I've googled until I'm blue in the face, read tutorials about arrays and
foreach loops but I just can't make sense of it. Any help anybody could
give me would be greatly appreciated.
Thanks,
Collin Davis
--- End Message ---
--- Begin Message ---
Richard Lynch wrote:
Tom wrote:
I've just started playing with the php5 improved mysqli extensions.
I have the following code:-
<?php
$mysqlim = new mysqli("localhost", "myUser", "myPassword","myDB");
$updateQuery = "UPDATE client SET status = 'INACTIVE' WHERE clientName =
'Tom'";
if ($mysqli->query($updateQuery))
{
$updateCount = $mysqli->affected_rows;
echo "<br>updateCount = $updateCount";
}
else
{
excpetionHandler("updateFailed: ".$updateQuery);
}
?>
This returns "updateCount = 1"
However, when I check the underlying table, there are actually 4 rows
updated (and yes, before anyone asks, I have repeated this several
times, correctly resetting the data before each run)
Is this a known bug, or am I doing something stupid?
(php 5.0.2, apache 2.0.49)
How many rows actually had 'Tom' for their clientName?...
I mean, is the '1' wrong because it should be 4, or is it changing records
it shouldn't?
It correctly updates 4 rows, but returns 1 as the count.
I think that this may actually be a mysql issue - I've put the same
php/apache configs onto another similar box, the only difference being
that the second box is mysql 5.0.1, whereas the problem is reported
against 5.0.0 (both alpha's!). The correct value is returned from the
second box.
Thanks
Tom
--- End Message ---
--- Begin Message ---
adwin wijaya wrote:
Hi...
Adwin,
(btw: [email protected] would be a better place for this question)
do you realise that GROUP is an SQL keyword (as in the GROUP BY clause)
and as such you will need to escape it using backticks (in the case of
MySQL).
Also I have a sneaking suspicion that TYPE might be a reserved word too
- you may want to put that in backticks too.
I have an query for mysql that looks like:
SELECT "group" as type FROM mytable WHERE id ="101010"
UNION
SELECT "individual" as type FROM myothertable WHERE id="101010"
The strange result if only one result displayed from myothertable, so
the "type" will become "indiv" instead of individual.
that sounds to me like the result is being grouped!
But when I tried to switch the query become :
SELECT "individual" as type FROM myothertable WHERE id="101010"
UNION
SELECT "group" as type FROM mytable WHERE id ="101010"
it could displaye the result correctly. I dont know why .. is this mysql
bug ?
--- End Message ---