php-general Digest 27 Oct 2006 08:33:12 -0000 Issue 4424
Topics (messages 243705 through 243733):
DATETIME or UNIX TIMESTAMPS?
243705 by: Marcelo de Moraes Serpa
243706 by: João Cândido de Souza Neto
243721 by: Larry Garfield
Re: <OPTION
243707 by: Jochem Maas
natsort()
243708 by: Sandy
243709 by: Dave Hamber
session id contains illegal characters
243710 by: Patrick Aljord
Running a Java Program
243711 by: Prathaban Mookiah
243712 by: Ray Hauge
243714 by: Prathaban Mookiah
243716 by: Ray Hauge
File extension for PHP's serialization format?
243713 by: Hamish Lawson
243715 by: Chris
243717 by: Hamish Lawson
243719 by: Chris
243730 by: Roman Neuhauser
243733 by: Hamish Lawson
Re: How does the Zend engine behave?
243718 by: jeff.phplist.tanasity.com
243722 by: Larry Garfield
243726 by: Sean Pringle
243728 by: Rasmus Lerdorf
Re: Job Opening
243720 by: Larry Garfield
243724 by: Kevin Waterson
243727 by: Chris
Problem compiling PHP 4.4.2 with mcrypt
243723 by: Tom Ray [Lists]
243725 by: Chris
Shopping Cart
243729 by: CK
243731 by: Chris
Re: counting records in db
243732 by: Satyam
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 ---
Hello list,
I've always used Unix Timestamps until now, but lately I've reading about
MySQL's datetime datatype and its benefits (dates before 1970, after 2030,
SQL functions to deal with them, etc). However, I don't see much support for
them in the PHP API. I'm also a Flash programmer and the Flash 8 API Date
datatype also only understands unix timestamps. Taking this into account,
I'm not really sure if it really worths it to "move" to the DATETIME
datatype. What would you do? Any advice would be much appreciated!
Marcelo.
--- End Message ---
--- Begin Message ---
I use always unix timestamp as well, except in birth date.
""Marcelo de Moraes Serpa"" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> Hello list,
>
> I've always used Unix Timestamps until now, but lately I've reading about
> MySQL's datetime datatype and its benefits (dates before 1970, after 2030,
> SQL functions to deal with them, etc). However, I don't see much support
> for
> them in the PHP API. I'm also a Flash programmer and the Flash 8 API Date
> datatype also only understands unix timestamps. Taking this into account,
> I'm not really sure if it really worths it to "move" to the DATETIME
> datatype. What would you do? Any advice would be much appreciated!
>
> Marcelo.
>
--- End Message ---
--- Begin Message ---
On Thursday 26 October 2006 15:36, Marcelo de Moraes Serpa wrote:
> Hello list,
>
> I've always used Unix Timestamps until now, but lately I've reading about
> MySQL's datetime datatype and its benefits (dates before 1970, after 2030,
> SQL functions to deal with them, etc). However, I don't see much support
> for them in the PHP API. I'm also a Flash programmer and the Flash 8 API
> Date datatype also only understands unix timestamps. Taking this into
> account, I'm not really sure if it really worths it to "move" to the
> DATETIME datatype. What would you do? Any advice would be much appreciated!
>
> Marcelo.
I tend to stick to unix timestamps as well, because date formats are
completely unstandard between different SQL databases. MySQL's date futzing
functions are nice, but they're different than Postgres', which are different
than Oracle's, etc.
Generally, most of the the math I need to do I can do in PHP either before or
after grabbing the timestamp.
I am sure there is a counter point, but this for what I do I just stick to
timestamps. :-)
--
Larry Garfield AIM: LOLG42
[EMAIL PROTECTED] ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson
--- End Message ---
--- Begin Message ---
Robert Cummings wrote:
> On Thu, 2006-10-26 at 15:31 +0200, Jochem Maas wrote:
>> bunch of space wasters ;-)
>>
>> <?php foreach (range(1, 31) as $d) echo '<option value="',$d,'"',($d =
>> $selDay?'
>> selected="selected"':''),'>',$d,'</option>'; ?>
>
> Specifically:
>
>> range(1, 31)
>
> Memory waster ;)
any idea as to what the damage is as compared to the classic for loop?
>
> Cheers,
> Rob.
--- End Message ---
--- Begin Message ---
Hi
php5
<code>
$d = '/somedir/subdir';
$od = opendir($d);
if ($od) {
$dl = scandir($d);
natsort($dl);
}
</code>
The sorted array is available through print_r().
How can I obtain a natsorted array that can be listed using :
while ($i <= $array_count){print $dl[$i]}
Thanks
--- End Message ---
--- Begin Message ---
natsort() places the array elements in natural order but not the keys.
If you want your elements printed using "print" in a loop either
reorganise the keys first or use "foreach".
The easiest method would be to use:
foreach($dl as $filename){
print $filename;
}
If you insist on using a while loop you could use:
$dl = array_merge($dl); to reorder the keys from 0 to array size-1.
then use:
while ($i <= $array_count){print $dl[$i]; $i++;}
If you use "while" you must increment $i to get all of the elements printed.
Alternatively you could use a for loop after reordering the keys:
for($i=0;$i<sizeof($dl);$i++){
print $dl[$i];
}
On 26/10/2006 22:05 Sandy wrote:
Hi
php5
<code>
$d = '/somedir/subdir';
$od = opendir($d);
if ($od) {
$dl = scandir($d);
natsort($dl);
}
</code>
The sorted array is available through print_r().
How can I obtain a natsorted array that can be listed using :
while ($i <= $array_count){print $dl[$i]}
Thanks
--- End Message ---
--- Begin Message ---
hey all,
I'm moving my page from php4 to php5 and I get this error:
Warning: Unknown: The session id contains illegal characters, valid
characters are a-z, A-Z, 0-9 and '-,' in Unknown on line 0
this is the code I use to start my session:
$_SESSION['user_id']=$user_id;
$_SESSION['user_login']=$user_login;
$_SESSION['user_pass']=$user_pass;
$_SESSION['user_level']=$user_level;
$_SESSION['session_bool']="true";
$sessionid = session_id();
$_SESSION['session_id']= $sessionid;
$user_real_id=$_SESSION['user_id'];
$user_real_login=$_SESSION['user_login'];
$realsessionid = $_SESSION['session_id'];
any idea what's wrong?
thanx in advance
Pat
--- End Message ---
--- Begin Message ---
Hello List,
I have a situation where, when the user logs into the system (Apache 2/PHP
5.1/Win XP) the php script should activate a Java program to run in the
background. This program will keep running in the background while everytime
the user requests something, the subsequent php scripts communicates with
this Java program on a preassigned port. (This is for controlling a robot I
descibed in on of my earlier mails)
My questions are:
1. How do I make the Java program to keep running even after the PHP script
terminates. In Linux I would have easily done using '&' - how about windows?
2. What is the safest way to do it?
Thanks in advance.
Prathap
P.S - Richard & Tedd - I appreciate your comments on my previous issue.
--- End Message ---
--- Begin Message ---
On Thursday 26 October 2006 6:48 pm, Prathaban Mookiah wrote:
> Hello List,
>
> I have a situation where, when the user logs into the system (Apache 2/PHP
> 5.1/Win XP) the php script should activate a Java program to run in the
> background. This program will keep running in the background while
> everytime the user requests something, the subsequent php scripts
> communicates with this Java program on a preassigned port. (This is for
> controlling a robot I descibed in on of my earlier mails)
>
> My questions are:
>
> 1. How do I make the Java program to keep running even after the PHP script
> terminates. In Linux I would have easily done using '&' - how about
> windows?
>
> 2. What is the safest way to do it?
>
>
> Thanks in advance.
>
> Prathap
>
> P.S - Richard & Tedd - I appreciate your comments on my previous issue.
Does the Java program HAVE to be started by a script? I've worked in a few
places that had desktop apps that would just run on startup, or a service,
and then the webserver/php would communicate to it since it's already
running. The downside to that is manual intervention when the program stops.
Although... you could probably to an exec() and if it was installed as a
service you should be able to run "net start <appname>' (or something like
that.
I haven't kept up on your previous post so I may be completely wrong ;)
--
Ray Hauge
Application Development Lead
American Student Loan Services
www.americanstudentloan.com
1.800.575.1099
--- End Message ---
--- Begin Message ---
Ray,
Nope - I cannot have the program running all the time because the port that
it this program will connect to will be accessed by other programs too. So it
needs to run only when the user is online and logged into the system.
Any ideas?
Prathap
---------- Original Message -----------
From: Ray Hauge <[EMAIL PROTECTED]>
To: [email protected]
Cc: "Prathaban Mookiah" <[EMAIL PROTECTED]>
Sent: Thu, 26 Oct 2006 18:39:26 -0500
Subject: Re: [PHP] Running a Java Program
> On Thursday 26 October 2006 6:48 pm, Prathaban Mookiah wrote:
> > Hello List,
> >
> > I have a situation where, when the user logs into the system (Apache 2/PHP
> > 5.1/Win XP) the php script should activate a Java program to run in the
> > background. This program will keep running in the background while
> > everytime the user requests something, the subsequent php scripts
> > communicates with this Java program on a preassigned port. (This is for
> > controlling a robot I descibed in on of my earlier mails)
> >
> > My questions are:
> >
> > 1. How do I make the Java program to keep running even after the PHP
script
> > terminates. In Linux I would have easily done using '&' - how about
> > windows?
> >
> > 2. What is the safest way to do it?
> >
> >
> > Thanks in advance.
> >
> > Prathap
> >
> > P.S - Richard & Tedd - I appreciate your comments on my previous issue.
>
> Does the Java program HAVE to be started by a script? I've worked
> in a few places that had desktop apps that would just run on startup,
> or a service, and then the webserver/php would communicate to it
> since it's already running. The downside to that is manual
> intervention when the program stops. Although... you could probably
> to an exec() and if it was installed as a service you should be able
> to run "net start <appname>' (or something like that.
>
> I haven't kept up on your previous post so I may be completely wrong
> ;)
>
> --
> Ray Hauge
> Application Development Lead
> American Student Loan Services
> www.americanstudentloan.com
> 1.800.575.1099
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
------- End of Original Message -------
--- End Message ---
--- Begin Message ---
On Thursday 26 October 2006 7:28 pm, Prathaban Mookiah wrote:
> Ray,
>
> Nope - I cannot have the program running all the time because the port that
> it this program will connect to will be accessed by other programs too. So
> it needs to run only when the user is online and logged into the system.
>
> Any ideas?
>
> Prathap
>
I kind of mentioned it before, but what about making the java program a
service? Then you could exec()/shell_exec() "net start" or "net stop" as
needed. Beyond that I don't have any ideas without checking Google.
--
Ray Hauge
Application Development Lead
American Student Loan Services
www.americanstudentloan.com
1.800.575.1099
--- End Message ---
--- Begin Message ---
I have a web application (not written in PHP) that can return data in
various formats, including JSON and PHP's serialization format. At the
moment my URL scheme looks like this:
staff/engineering?format=json
but I'd like to switch to using a file extension to denote the format:
staff/engineering.json
But what file extension should I use for PHP's serialization format?
Obviously it can't be .php - aside from being inaccurate (it's not PHP
code), using this extension would probably trigger the web server into
trying to run a (nonexistent) PHP script.
Thanks,
Hamish Lawson
--- End Message ---
--- Begin Message ---
Hamish Lawson wrote:
I have a web application (not written in PHP) that can return data in
various formats, including JSON and PHP's serialization format. At the
moment my URL scheme looks like this:
staff/engineering?format=json
but I'd like to switch to using a file extension to denote the format:
staff/engineering.json
But what file extension should I use for PHP's serialization format?
Obviously it can't be .php - aside from being inaccurate (it's not PHP
code), using this extension would probably trigger the web server into
trying to run a (nonexistent) PHP script.
You can rewrite the url using mod_rewrite or some such variant to handle
this.
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
Hello Chris
Thanks for responding.
> But what file extension should I use for PHP's serialization format?
> Obviously it can't be .php - aside from being inaccurate (it's not PHP
> code), using this extension would probably trigger the web server into
> trying to run a (nonexistent) PHP script.
You can rewrite the url using mod_rewrite or some such variant to handle
this.
Yes, there may well be ways to get round what the web server would
otherwise do when it encounters a .php extension, but I feel that I'd
be breaking an expectation. I'd much rather use an extension that was
specific to the serialization format.
Hamish
--- End Message ---
--- Begin Message ---
Hamish Lawson wrote:
Hello Chris
Thanks for responding.
> But what file extension should I use for PHP's serialization format?
> Obviously it can't be .php - aside from being inaccurate (it's not PHP
> code), using this extension would probably trigger the web server into
> trying to run a (nonexistent) PHP script.
You can rewrite the url using mod_rewrite or some such variant to handle
this.
Yes, there may well be ways to get round what the web server would
otherwise do when it encounters a .php extension, but I feel that I'd
be breaking an expectation. I'd much rather use an extension that was
specific to the serialization format.
You could "convert" it to a php file:
RewriteCond %{REQUEST_URI} *.json
RewriteRule ^(.*).json$ json.php?$1 [T=application/x-httpd-php,L]
Might not work straight away but that should give you an idea of what's
possible.
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
# [EMAIL PROTECTED] / 2006-10-27 02:06:22 +0100:
> Hello Chris
>
> Thanks for responding.
>
> >> But what file extension should I use for PHP's serialization format?
> >> Obviously it can't be .php - aside from being inaccurate (it's not PHP
> >> code), using this extension would probably trigger the web server into
> >> trying to run a (nonexistent) PHP script.
> >
> >You can rewrite the url using mod_rewrite or some such variant to handle
> >this.
>
> Yes, there may well be ways to get round what the web server would
> otherwise do when it encounters a .php extension, but I feel that I'd
> be breaking an expectation. I'd much rather use an extension that was
> specific to the serialization format.
Hamish,
there's no standard filename extension for PHP-serialized data,
I'd just use txt or something... .psdf or whatever.
--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991
--- End Message ---
--- Begin Message ---
Hello Chris
You could "convert" it to a php file:
RewriteCond %{REQUEST_URI} *.json
RewriteRule ^(.*).json$ json.php?$1 [T=application/x-httpd-php,L]
Thanks for continuing to work on this, but I'm afraid my inadequate
explanation has sent you in the wrong direction. Let's see if I can do
better. Forget for the moment that the files are generated dynamically
and instead suppose that they were static files. An example of a file
containing JSON data would be engineering.json. But what about the
equivalent information in PHP serialized format? Calling it
engineering.php would be inappropriate for the reasons I gave before.
Hamish
--- End Message ---
--- Begin Message ---
Richard Lynch wrote:
On Wed, October 25, 2006 11:58 am, [EMAIL PROTECTED] wrote:
Are the include files only compiled when execution hits them, or are
all
include files compiled when the script is first compiled, which would
mean a cascade through all statically linked include files. By
statically linked files I mean ones like "include ('bob.php')" - i.e
the
filename isn't in a variable.
As far as I know, the files are only loaded as execution hits them.
If your code contains:
<?php
if (0){
require 'foo.inc';
}
?>
Then foo.inc will never ever be read from the hard drive.
You realize you could have tested this in less time than it took you
to post, right?.
:-)
I don't know the extent to which the engine optimises performance, and I
know very little about how different versions of the engine deal with
the issue, but I guessed it depended on the behaviour of the engine,
cache and maybe optimiser, and know/knew I don't know enough... My
thinking: for dynamically linked files, one speed optimisation is to
load the file before it's needed, at the expense of memory, while
continuing execution of the loaded portions. It's easy to do if the
filename is static. The code may never be executed, but still takes up
space. Some data structures can also be pre-loaded in this way.
Are included files ever unloaded? For instance if I had 3 include
files
and no loops, once execution had passed from the first include file to
the second, the engine might be able to unload the first file. Or at
least the code, if not the data.
I doubt that the code is unloaded -- What if you called a function
from the first file while you were in the second?
I agree it's unlikely, but it's feasible if coded is loaded whenever
required. Especially if data and code are separated by the engine, and
that's quite likely because of the garbage collection.
Thirdly, I understand that when a request arrives, the script it
requests is compiled before execution. Now suppose a second request
arrives for the same script, from a different requester, am I right in
assuming that the uncompiled form is loaded? I.e the script is
tokenized
for each request, and the compiled version is not loaded unless you
have
engine level caching installed - e.g. MMCache or Zend Optimiser.
You are correct.
The Caching systems such as Zend Cache (not the Optimizer), MMCache,
APC, etc are expressly designed to store the tokenized version of the
PHP script to be executed.
Note that their REAL performance savings is actually in loading from
the hard drive into RAM, not actually the PHP tokenization.
Skipping a hard drive seek and read is probably at least 95% of the
savings, even in the longest real-world scripts.
The tokenizer/compiler thingie is basically easy chump change they
didn't want to leave on the table, rather than the bulk of the
performance "win".
I'm sure somebody out there has perfectly reasonable million-line PHP
script for a valid reason that the tokenization is more than 5% of the
savings, but that's going to be a real rarity.
Thanks - that's really useful - I didn't realise that the bulk of the
saving wasn't in tokenising.
Fourthly, am I right in understanding that scripts do NOT share
memory,
even for the portions that are simply instructions? That is, when the
second request arrives, the script is loaded again in full. (As
opposed
to each request sharing the executed/compiled code, but holding data
separately.)
Yes, without a cache, each HTTP request will load a "different" script.
Do you know if, when a cache is used, whether requests in the same
thread use the same in-memory object. I.e. Is the script persistent in
the thread?
Fifthly, if a script takes 4MB, given point 4, does the webserver
demand
8MB if it is simultaneously servicing 2 requests?
If you have a PHP script that is 4M in length, you've done something
horribly wrong. :-)
Sort of. I'm using Drupal with lots of modules loaded. PHP memory_limit
is set to 20MB, and at times 20MB is used. I think that works per
request. All the evidence points to that. So 10 concurrent requests,
which is not unrealistic, it could use 400MB + webserver overhead. And I
still want to combine it with another bit of software that will use 10
to 15MB per request. It's time to think about memory usage and whether
there are any strategies to disengage memory usage from request rate.
Of course, if it loads a 4M image file, then, yes, 2 at once needs 8M
etc.
Lastly, are there differences in these behaviors for PHP4 and PHP5?
I doubt it.
I think APC is maybe going to be installed by default in PHP6 or
something like that, but I dunno if it will be "on" by default or
not...
At any rate, not from 4 to 5.
Thanks.
Note that if you NEED a monster body of code to be resident, you can
prototype it in simple PHP, port it to C, and have it be a PHP
extension.
A good idea, but not feasible in this situation.
Thank you.
Jeff
This should be relatively easy to do, if you plan fairly carefully.
If a village idiot like me can write a PHP extension (albeit a
dirt-simple one) then anybody can. :-)
--- End Message ---
--- Begin Message ---
On Thursday 26 October 2006 20:28, [EMAIL PROTECTED] wrote:
> > If you have a PHP script that is 4M in length, you've done something
> > horribly wrong. :-)
>
> Sort of. I'm using Drupal with lots of modules loaded. PHP memory_limit
> is set to 20MB, and at times 20MB is used. I think that works per
> request. All the evidence points to that. So 10 concurrent requests,
> which is not unrealistic, it could use 400MB + webserver overhead. And I
> still want to combine it with another bit of software that will use 10
> to 15MB per request. It's time to think about memory usage and whether
> there are any strategies to disengage memory usage from request rate.
Drupal tends to use about 10 MB of memory in normal usage for a reasonable set
of modules in my experience, but a crapload more on the admin/modules page
because it has to load everything in order to do so. Normally you won't hit
that page very often. :-)
However, Drupal is deliberately friendly toward APC. I don't recall the stats
(I know someone made some pretty graphs at one point, but I can't find them),
but simply throwing APC at Drupal should give you a hefty hefty performance
boost. I believe APC does cache-one-run-many, so the code, at least, will
only be stored in RAM once rather than n times. (Richard is correct, though,
that data is generally larger than code in most apps.)
Also, search the Drupal forums for something called "Split mode". It was
something chx was putting together a while back. I don't know what it's
status is, but he claimed to get a nice performance boost out of it.
Cheers.
--
Larry Garfield AIM: LOLG42
[EMAIL PROTECTED] ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson
--- End Message ---
--- Begin Message ---
The Caching systems such as Zend Cache (not the Optimizer), MMCache,
APC, etc are expressly designed to store the tokenized version of the
PHP script to be executed.
Note that their REAL performance savings is actually in loading from
the hard drive into RAM, not actually the PHP tokenization.
Skipping a hard drive seek and read is probably at least 95% of the
savings, even in the longest real-world scripts.
Interesting. If PHP tokenization is such a small cost, what makes a
special caching system better than the OS for caching files in memory
after the first disk read?
--- End Message ---
--- Begin Message ---
Sean Pringle wrote:
>> The Caching systems such as Zend Cache (not the Optimizer), MMCache,
>> APC, etc are expressly designed to store the tokenized version of the
>> PHP script to be executed.
>>
>> Note that their REAL performance savings is actually in loading from
>> the hard drive into RAM, not actually the PHP tokenization.
>>
>> Skipping a hard drive seek and read is probably at least 95% of the
>> savings, even in the longest real-world scripts.
>
> Interesting. If PHP tokenization is such a small cost, what makes a
> special caching system better than the OS for caching files in memory
> after the first disk read?
APC actually executes the opcodes directly in shared memory, so unlike a
disk cache, you are not copying lots of stuff around. APC does need to
copy some things down into process-local memory, but most can be left
where it is. Disk caches also tend to expire pretty fast because
everything your OS does tends to touch the disk and when you application
starts eating memory your disk cache is the first to go when things get
tight. With a dedicated shared memory segment that won't happen.
Things will stay put.
It is also possible to run APC in no-stat mode which means it will never
touch the disk at all. If you are on an Intel cpu with an older OS like
freebsd4, disk-touching syscalls are massively slow and you can gain a
lot by skipping the up-to-date stat check on each request and include file.
Finally the compiler does more than just tokenize your script. It will
cache functions and classes when it can and rewrite the opcodes so these
functions and classes won't have to be created at execution time. Of
course, that assumes you haven't gone all framework-crazy and made
everything dynamic with autoload or weird conditional function and class
declarations. If it becomes a runtime decision whether class or a
function is declared, or heaven forbid, the same class takes on
different signatures based on some runtime condition, then there isn't
much the compiler can do to speed that up.
-Rasmus
--- End Message ---
--- Begin Message ---
On Wednesday 25 October 2006 22:15, Larry Garfield wrote:
> Well since the consensus seemed to be to allow job postings, I'll make
> one. :-)
>
> My company is looking for a few good PHP programmers.
>
> We are a Chicago-area web consulting firm developing web sites and web
> applications for a variety of clients, including several large academic
> institutions. We are looking for skilled PHP developers to join our team.
> (Sorry, that means yes, you'd have to work with me.) It's a small but
> growing company of less than 10 people, all fairly young and geeky. :-)
> Experience with PHP (although not necessarily prior work experience) is a
> must.
>
> If interested, contact me OFF-LIST for more information. Note: I am NOT in
> a hiring position, so do NOT send me your resume. :-) I'm just going to
> pass you on to the person who is.
As a follow-up, since several people have asked:
We are looking for permanent legal US residents only, and primarily for
people that can work on-site rather than telecommute. We are open to
hearing from off-site people who can consult for future reference,
however.
--
Larry Garfield AIM: LOLG42
[EMAIL PROTECTED] ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson
--- End Message ---
--- Begin Message ---
This one time, at band camp, Larry Garfield <[EMAIL PROTECTED]> wrote:
> My company is looking for a few good PHP programmers.
----8<--- snip -----------------
>
> As a follow-up, since several people have asked:
---8< --- snip -----------------
How much??
Kevin
--
"Democracy is two wolves and a lamb voting on what to have for lunch.
Liberty is a well-armed lamb contesting the vote."
--- End Message ---
--- Begin Message ---
Kevin Waterson wrote:
This one time, at band camp, Larry Garfield <[EMAIL PROTECTED]> wrote:
> My company is looking for a few good PHP programmers.
----8<--- snip -----------------
As a follow-up, since several people have asked:
---8< --- snip -----------------
How much??
My guess - $27 total :P If you really want to know, ask off list please.
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
I have to get a temporary server in place under a tight time frame and
am using a pre-existing server that wasn't configured really for hosting
websites. I've upgraded all the services on it like going from Apache
1.3.x to Apache 2.0.59 and PHP from it's old version to 4.4.2 however I
need to have mcrypt compiled with PHP and I'm running into a problem.
If I compile PHP without mcrypt I can install PHP without issue.
However, when I try to compile PHP with --with-mcrypt=/usr/local/mcrypt
I get the following error:
main/internal_functions.lo -lcrypt -lcrypt -lmcrypt -lltdl -lresolv -lm
-ldl -lnsl -lcrypt -lcrypt -o libphp4.la
/usr/lib/gcc-lib/i486-suse-linux/3.2/../../../../i486-suse-linux/bin/ld:
cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp4.la] Error 1
Now I went back and compiled without mcrypt and looked for that line and
this is what was there:
main/internal_functions.lo -lcrypt -lcrypt -lresolv -lm -ldl -lnsl
-lcrypt -lcrypt -o libphp4.la
I see that along with -lmcrypt not being there neither is -lltdl is
there something I'm missing? Do I need to have something else installed
on the box? Normally I haven't had this problem with this. But this is
an old suse 8.x box that is being used due to time frame issues.
Like I said I can compile PHP without mcrypt, but the project requires
mcrypt so any help on this would be appreciated.
Thanks!
--- End Message ---
--- Begin Message ---
Tom Ray [Lists] wrote:
I have to get a temporary server in place under a tight time frame and
am using a pre-existing server that wasn't configured really for hosting
websites. I've upgraded all the services on it like going from Apache
1.3.x to Apache 2.0.59 and PHP from it's old version to 4.4.2 however I
need to have mcrypt compiled with PHP and I'm running into a problem.
If I compile PHP without mcrypt I can install PHP without issue.
However, when I try to compile PHP with --with-mcrypt=/usr/local/mcrypt
I get the following error:
main/internal_functions.lo -lcrypt -lcrypt -lmcrypt -lltdl -lresolv -lm
-ldl -lnsl -lcrypt -lcrypt -o libphp4.la
/usr/lib/gcc-lib/i486-suse-linux/3.2/../../../../i486-suse-linux/bin/ld:
cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp4.la] Error 1
Now I went back and compiled without mcrypt and looked for that line and
this is what was there:
main/internal_functions.lo -lcrypt -lcrypt -lresolv -lm -ldl -lnsl
-lcrypt -lcrypt -o libphp4.la
I see that along with -lmcrypt not being there neither is -lltdl is
there something I'm missing? Do I need to have something else installed
on the box? Normally I haven't had this problem with this. But this is
an old suse 8.x box that is being used due to time frame issues.
Like I said I can compile PHP without mcrypt, but the project requires
mcrypt so any help on this would be appreciated.
Looks like mcrypt has an extra dependency.
Do you have the mcrypt-dev or mcrypt-devel package installed (whatever
suse calls it) ?
When I just went to install mcrypt on my debian machine it added
"libltdl3" to the list of packages it needed.
Do you have that one installed?
How come you're compiling and not installing the package(s) ? Is suse
too old to be able to install 4.4.2?
Last question :P how come you're installing 4.4.2 and not the latest -
4.4.4 ?
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
Hi,
A client has requested a cart with the following features, any leads
on such a package, preferably open-source?
Is there a way to add things like:
•Customer ratings to the cart?
•Qualifying criteria:
Is there a way to add that to the cart as a
checkbox with descriptor? For example, if someone's selling a monitor
that's
made with no toxic materials and 50% recycled plastic, the administrator
would check a box that says "no toxic" and another that says
"recycled" and
then add a descriptor for the recycled button that gives the amount of
recycled content?
•Data for accounting purposes:
(sales info and the like). I'd like to
collect customer info for internal purposes, or
if they opt-in, for further communication. I'd
like to get the usual web traffic stats
(referring sites, etc.).
Return True,
CK
Principal/Designer/Programmer -Bushidodeep
www.bushidodeep.com
___________________________
"An ideal is merely the projection,
on an enormously enlarged scale,
of some aspect of personality."
---------- Aldus Huxley
--- End Message ---
--- Begin Message ---
CK wrote:
Hi,
A client has requested a cart with the following features, any leads on
such a package, preferably open-source?
Have you done any research at all? We're not going to do your work for you..
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
----- Original Message -----
From: "Paul Novitski" <[EMAIL PROTECTED]>
While we're talking about optimization, I'd want to check to make sure
COUNT(*) didn't ask MySQL to generate a throw-away recordset consisting of
all fields. I wonder if it would be more machine-efficient to use
COUNT(`last_name`), specifying a single field, in this case the same field
your query is examining anyway.
If the fields mentioned in the where clause are keys or if there is no where
clause, a count(*) uses the index trees to make the count, it won't even
access the data racords at all. Moreover, it won't even read the whole
index tree node, just the header record of the block that indicates how many
key records that block contains. I don't really know about MySql or any
database engine, but these are techniques well known in the trade.
On the count(fieldname) issue, it is different from a count(*) and may give
different results. When you mentione a field it will only count records
where that field is not null. Select count(fieldname) from table is the
same as doing a select count(*) from table where fieldname is not null. It
will take just as longer as processing any additional where clause.
Satyam
--- End Message ---