[PHP] Re: Chat with PHP and MySQL - come and chat about Linux problems...

2001-03-15 Thread John Hinsley

Marian Vasile [EMAIL PROTECTED] wrote:

//snipped! This list is long enough!

The main problem I have with my chat is that after some use of it, the
server is going very very slowly.
Someone with (256Mb, 800Mhz and just my chat running (Linux also)) told me
that the chat is still doing this stuff.
The problem he told me about it, it's that the httpd (apache) connections
don't close.

//end snip

It could be that (although I'd expect them to close unless your code or
your Apache settings explicitly keep them open) or it could be the
forking (careful how you pronounce that!) of Apache. What kernel are you
using? Going to 2.4 should show an improvement in Apache performance if
the forking is the problem.

I'll try a look at the code, but there are far better code readers out
there than me!


-- 
**
Marx: "Why do Anarchists only drink herbal tea?"
Proudhon: "Because all proper tea is theft."
**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re:Fw: can't start apache

2001-03-03 Thread John Hinsley

 
 
 

Scott Wagner wrote:
 To: php 
 Sent: Thursday, March 01, 2001 11:55 PM
 Subject: can't start apache
 
 
 Hi
 I just installed mysql, apache and php4 on Linux Mandrake 7.0 from a cd I got with 
the book "PHP Fast and Easy"
 After installing apache it seemed ok and started normally.  But after installing 
PHP4 I get the following error message
 when I try to start apache:
 
 Syntax error on line 207 of httpd. config: cannot load 
/usr/apache_1.3.12/libexec/libphp4.so into server:
 /usr/loca/apache_1.3.12/libexec/libphp4.so: undefined symbol: mysql_init
 
  I used the following command to build php4:
 /configure --with-mysql=/usr/local/mysql-3.22.32-pc-linux-gnu-i686/ 
--with-apxs=/usr/local/apache_1.3.12/bin/apxs
 
 Including ./configure --activate-module=src/modules/modules/p in installation fails, 
saying directories do not exist.
 Looking at previous output it appears that the modules have already been activated.
 
 Any hints in a newbie-friendly format would be greatly appreciated.
 Thanks,
 SW

I tried installing the files of the CD too, and tied myself up in knots,
although I like the general style of the book. In the end, I adopted the
path of least resistance and simply installed the SuSE rpms (although I
wouldn't recommend this on RedHat or Mandy!) and everything worked out
of the crate. 

I'd advise you delete what you've installed and just grab the relevant
rpms from Mandrake or RedHat's site (or off the CD). The important thing
is not that they match the version numbers in the book correctly, but
that they are appropriate to your version of Mandrake. Be aware that the
RedHat rpm for MySQL was faulty (maybe they've fixed it now): you need
to either compile that with no dependencies (see man rpm for details) or
grab the rpm from the MySQL site.

Let us know how you get on.

-- 
**
Marx: "Why do Anarchists only drink herbal tea?"
Proudhon: "Because all proper tea is theft."
**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP Editors

2001-02-14 Thread John Hinsley

You could try Xemacs, which has colour syntax highlighting and a built
in psychoanalist! (No, really!) But I prefer Gvim. You need (say) gvim
5.7 and the vim 5.7rt. If you're running a *nix, build it against Gtk.
It's charityware, and looks and works the same on any platform. Menu
driven and Grep style search and replace, unlimited undoos, colour sytax
hightlighting, lots of ready made macros and so on. Get it from 

http://www.vim.org  
-- 
**
Marx: "Why do Anarchists only drink herbal tea?"
Proudhon: "Because all proper tea is theft."
**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re:Apache and PHP

2001-02-04 Thread John Hinsley

"Patrick L. Olson" [EMAIL PROTECTED] wrote:

 if I call it like http://127.0.0.1/cgi-bin/one.php
 with the shebang line #!php.exe
 I get the following error
 No input file specified
 if I call it without the shebang I get
 the Internal Server Error
 Error logs indicate the the #! is needed
 if I call it in the web root as
 http://127.0.0.1/one.php4
 it prints the code to the screen
 any insight welcome
 

Well, I know nothing about Windows, or SSI, but if I were trying to run
a php script from Apache_as_localhost I'd do:

http://localhost/php_script_thingy.php

Unless you're doing something a bit wierd and wonderful the script must
be in your htdocs (or whatever else you've called doc root) and should
be called (according to what you've told Apache) by .php. 

Initially I ran into a lot of problems (self-created) by putting php
stuff into the cgi bin and, after upgrading to php4, by trying to call
stuff as php4 (as I used to call stuff by php3).

Hope this helps.

-- 
**
Marx: "Why do Anarchists only drink herbal tea?"
Proudhon: "Because all proper tea is theft."
**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re:What version of Linux?

2001-02-03 Thread John Hinsley


Christian Reiniger [EMAIL PROTECTED] wrote:

 Well, my home server is a wimpy P90 with 48MB RAM. It serves as web 
 server (all my technical docs, php website testing, more), web cache 
 (WWWoffle), web filter (junkbuster), file server (nfs and samba), 
 masquerading internet gateway, firewall, mail server (also processing my 
 pretty big .procmailrc), print server and propably also something else :)
 Ah, yes. MySQL for my php stuff also runs on it.

That's pretty impressive!

 
 The only problem I have with its performance is that it's only connected 
 to my other machines via 10 MBit ethernet (well, and the ram is a bit on 
 the low side). The processor's limits aren't reached by a long shot.

It'd be interesting to do some benchmarking on it. My guess (nothing
more) is that the limitations are RAM, disk read/write speed and network
speed in that order.

 
  The 486 could be used as a Windows box connected to the server and/or
  as an X client (in which case 32Mb of RAM would be just fine).
 
 I'd say a combination of good text editor + browser requires more 
 resources than a apache+PHP+mysql in such a scenario. And don't forget 
 that you have to sit in front of the development (client) box all day and 
 getting a decent graphics card for a 486 is *hard*

Yes, I must admit that while I find an VGA display on Windows just about
acceptable, it's not something I would like to live with permanently.
But I think that Win 98 + 32Mb + Xclient (maybe with the Windows version
of Gvim as editor) should be workable.

Of course, the reason that 486s are being abandoned (apart from hype)
are mainly down to the lack of decent video cards and the
price/compatability issues surrounding memory. (Which gives Penguin
heads the chance to snap them up for next to nothing and turn them into
print servers, firewalls, and routers!)

-- 
**
Marx: "Why do Anarchists only drink herbal tea?"
Proudhon: "Because all proper tea is theft."
**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re:What version of Linux?

2001-02-02 Thread John Hinsley


 Christian Reiniger [EMAIL PROTECTED] wrote:

 
 On Friday 02 February 2001 05:32, John Hinsley wrote:
 
   I want to install my personal server on a old Intel 486 machine, 36
   Mb RAM, 2 Gb HardDisk, VGA, to develop in PHP. What version of Linux
   do I need to install?
 
  But I'm unsure of what you "really" intend using this machine for. Do
  you really want a home network (in which case conventional wisdom
  suggests that the server should be the most powerful box on site) or
 
 Well, you'll have great trouble getting several 100k hits per day on a 
 home server, so a small machine completely suffices :)

Yes, yes. But you assume that our friend wants to use the 486 box as an
Intranet server, to run cgi and php scripts on, and punt out HTML
documents to the rest of his network, and pretty much that alone.

I simply was _not_ prepared to make that assumption, which is why I
asked for more detail :-0

Let me elaborate a little:

Unless you have existing Win or Mac boxes (I omit Sun workstations and
Ataris only because not many folk have them at home) that you want to
pick up all this HTML stuff which Apache or
whatever_your_choice_of_web_server is dishes out, it probably makes
sense not to build a little 486 server, but to use the hard drive to put
into a (more powerful) dual boot box: you can then run all your HTML
stuff as localhost (and use a gui too!). You could then use your 486 as
a firewall.

If you're going to the hastle of building a home network, you might
consider using the more powerful machine as an all singing, all dancing
fileserver, application server and intranet server (pick your choice)!
The 486 could be used as a Windows box connected to the server and/or as
an X client (in which case 32Mb of RAM would be just fine).

None of these solutions is "right" per se, but they do bear thinking
about! Hence, again, the call for more detail.


-- 
**
Marx: "Why do Anarchists only drink herbal tea?"
Proudhon: "Because all proper tea is theft."
**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re:What version of Linux?

2001-02-01 Thread John Hinsley


 "Andrs de la Varga" [EMAIL PROTECTED] wrote:

 
 I want to install my personal server on a old Intel 486 machine, 36 Mb RAM,
 2 Gb HardDisk, VGA, to develop in PHP. What version of Linux do I need to
 install?

Stay clear of any version built specifically for 586 machines. This
certainly means Mandrake, but may include late versions of other
distributions, so check with their home site.

But I'm unsure of what you "really" intend using this machine for. Do
you really want a home network (in which case conventional wisdom
suggests that the server should be the most powerful box on site) or
just something to run php or CGI scripts on with Apache or whatever?

If you can get back with details of what you want to do with that little
old box (and what other machines and Operating Systems you have) I can
maybe be of more help. Personally, I like SuSE.
-- 
**
Marx: "Why do Anarchists only drink herbal tea?"
Proudhon: "Because all proper tea is theft."
**

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: PHP a lightweight language?

2001-02-01 Thread John Hinsley


 Michael Hall [EMAIL PROTECTED] wrote
 

 
 I'm interested in the proposition made recently on this list that PHP is
 somehow a 'lightweight' language that some people don't take seriously. I
 am relatively new to Linux and open source programming and only really
 know PHP and some shell scripting, though I am now starting to explore
 Python.

Seems to me that most languages can be considered "lightweight" in some
respects. After all, couldn't C be considered lightweight compared with
machine code?

And then, most languages are written in something else (something
heavier?): if I remember correctly, Squeak is about the only thing that
really eats its own dog food. And, from what I remember, such recursion
wasn't straightforward!

It's really a silly discussion. PHP does what it does exceptionally
well. You'd be barking mad to write an operating system in it, but you'd
be equally crazy to write a C application to do what a shell script does
or to use Java to run a regex on a text file. 

The reason, I think, that there are so many languages out there is that
each has its advantages when used in a particular context. It may be
able to work out of context, but the overheads in development and/or
compilation or run time build up.

-- 
**
Marx: "Why do Anarchists only drink herbal tea?"
Proudhon: "Because all proper tea is theft."
**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Editor

2001-01-30 Thread John Hinsley



 [EMAIL PROTECTED] wrote:

 Hi,
 
 I know this has been asked before but I can`t seem to get the archive email 
 thingy to work, basically I`m looking for a free or cheap editor that has the 
 lines numbered so that it`s a bit easier for me to debug my scripts.


You don't mention what platform you're working on, but who cares?

The only editor you'll ever need is gvim. Available for just about any
platform and looks and works the same on *nix and Windows (never tried
the Mac version).

It has: line counts, colour syntax highlighting for everything from Ada
to zsh (via php and MySQL), and auto-indentation for many languages.
It's either easy to use out of the crate or massively configurable (can
run its own scripts and macros). 

Most of the "for sale but cheap" editors are attempts to emulate gvim
which is Gpled charityware (Help Uganda!). Magic. I could live without
it, but I probably wouldn't write any code.

You need to download (I'm guessing you're using Windows?) (say) gvim 5.7
and the vim 5.7 rt (run time libraries) from the pc directory of
ftp.vim.org.

Happy coding and help Uganda.

-- 
**
Marx: "Why do Anarchists only drink herbal tea?"
Proudhon: "Because all proper tea is theft."
**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: HTTP_USER_AGENT and preg_match

2001-01-22 Thread John Hinsley

Got it in the end. It should be:

snip


if  ((preg_match("/Mozilla/i", "$agent"))  (preg_match("/Gecko/i",
"$agent")))  {
$result = "You are using Netscape 6 or a later version of Mozilla.";

snip

But the thought occurs that there must be a site out there somewhere
which lists the HTTP_USER_AGENT tags for *all* browsers?
-- 
**
Marx: "Why do Anarchists only drink herbal tea?"
Proudhon: "Because all proper tea is theft."
**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Spell checker?

2001-01-20 Thread John Hinsley

Nik Gare [EMAIL PROTECTED] wrote

 Does anyone know where I could find a text list of every
 word in the English language ;-)

You could try (also) getting hold of ispell

a search on www.google.com/linux

or sunsite should get it.

You'll need something capable of uncompressing tar archives to peek at
it.

-- 
**
Marx: "Why do Anarchists only drink herbal tea?"
Proudhon: "Because all proper tea is theft."
**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] RE: Ethics question...

2001-01-19 Thread John Hinsley

Rasmus Lerdorf wrote:
 
  I think the single most importand piece of software that saves us the
  most money is thttpd.  That all runs in a single thread and uses
  select to pump out content.  Since it is a single thread, it never
  chews up tons of memory forking children.
 
 By the way, there is a PHP module for thttpd.
 
 -Rasmus


Interesting. But (and I'm unsure of *exactly* what thttpd does) 2.4 also
has a httpd built into the kernel, capable of rendering static content
at "blistering" speed. So you could use Apache for dynamic, the kernel
daemon for static.

Without any benchmarks (or even a hardware profile!) I can't really add
much more. But it's worth looking into.

Incidentally, the must 2.4 gung ho distro seems to be SuSE, which I rate
well above RedHat in terms of value, support and stability.
-- 
**
Marx: "Why do Anarchists only drink herbal tea?"
Proudhon: "Because all proper tea is theft."
**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Ethics question...

2001-01-18 Thread John Hinsley

Frank Joerdens [EMAIL PROTECTED] wrote:

(the context is Microsoft using other OSs)

 Do you know for a fact that they do? If so, how? That'd be a very cool
 tidbit of information to share . . .


See also:

http://www.unix-vs-nt.org/kirch/

A good document to hit clients/funders/bosses over the head with if they
insist you use NT/IIS (yuk!) [makes sign of the cross and exits, stage
left]
-- 
**
Marx: "Why do Anarchists only drink herbal tea?"
Proudhon: "Because all proper tea is theft."
**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] I love/hate FrontPage - need another HTML editor.

2001-01-17 Thread John Hinsley

Coming in on this late and from another platform:

I use Bluefish and Gvim under Unix. Of the two, Gvim is probably the
most configurable editor out there (macros, syntax highlighting, runs
its own scripts, uses a variety of scripting languages) and is available
for Windows. It's free (well, it's really charity ware) and Open Source. 

While Bluefish is a nice non-gui HTML editor, Gvim is what I use for
"serious" coding in C, C++, Perl, Python, PHP and so on and on. It has
"unlimited" undoos and built in syntax highlighting for languages I've
never encountered in the "real world" (and a few I've never heard of).
Highly recommended.

Incidentally, could'nt you use PHP to manage the "look" at a CSS level?
Should this be the job of the editor?
-- 
**
Marx: "Why do Anarchists only drink herbal tea?"
Proudhon: "Because all proper tea is theft."
**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]