If all you're doing is applying the patch (not adding/removing any
extensions), you should be able to use
./config.nice
which will use all of the configuration commands from your last compile
(This is an extremely handy thing if your GD/Freetype setup was particularly
ornery the first time aroun
I encountered that same timeout problem once, and I wound up just installing
my own copy of PhpMyAdmin in an .htaccess protected directory on the server,
and extending the time limit there. It only took about 10 minutes to set
up, and as an added bonus it was a more recent version of PhpMyAdmin t
There is also a PEAR SOAP package available:
http://pear.php.net/package-info.php?pacid=87
Some web services also use XML-RPC, a simpler predecessor to SOAP:
http://www.xmlrpc.com
There are a couple of PHP classes available for implementing XML-RPC clients
and servers:
http://phpxmlrpc.source
To write a GD image to disk as a jpeg, do this instead:
$im = imagecreate(50,100);
imagejpeg($im, "test/im.jpg");
You don't need to use file handlers. Of course, without doing anything like
adding text or lines to $im, it will just be written to disk as a blank
image. :)
-Andy
> -Origin
To save an image to disk with the imagepng/imagejpg/imagewbmp functions all
you have to do is give the file name as the second parameter to the
function; so if you wanted to call the first graph 'graph1.png', it would go
something like
imagepng will attempt to save graph1.png in the same direct
Hi Morgan,
None that I'm aware of. I guess this is somewhat OT, but does the person
you're giving the images to realize that resizing the images by means of the
HTML width/height attributes doesn't do anything to size of the file the
person viewing the page has to download? I don't know the par
http://www.php.net/manual/en/function.include-once.php
http://www.php.net/manual/en/function.function-exists.php
HTH,
-Andy
> -Original Message-
> From: Taylor York [mailto:[EMAIL PROTECTED]]
>
> I am having a problem with two scripts that use the same function name.
> The two functions
I'm not sure if Apache will recursively process documents this way (Perl script ->
HTML output with embedded PHP -> parsed PHP), but what about adding this HTTP header
to your PERL script's output before the HTML/PHP code:
Content-type: application/x-httpd-php
That way Apache would (in theory)
Hmm, I don't know about intercepting the "Save As..." option from word to
trigger a PHP URL, but you could direct people to save their edited word
files to a specific directory on a network share on a PHP-enabled server
(easy enough on a Windows network, and not too much harder with Samba on
Linux
You could store passwords as MD5 hashes which of course is NOT really
encryption, but it would obfuscate the users' passwords. They would still
be vulnerable to social engineering ("Hmm, I'll try his wife's name, then
his dog's name, then his phone#," etc) and brute force ("I'm going to run
every
There are a couple of different PHP classes that people have written to make
PDF creation easier... maybe they would streamline the process enough that
you can make them from scratch after all.
http://www.pc4p.net/
http://ros.co.nz/pdf/
I didn't know about those the last time I had to deal with
The GIMP is free (as in speech), and I've found it to work quite well on
windows:
http://www.gimp.org/
The GIMP for Windows page:
http://www.gimp.org/~tml/gimp/win32/
-Andy
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]>
> My idea to solve the problem:
> 1:Pic
ftp://ftp.gnu.org/gnu/windows/emacs/latest
A helpful Emacs resource:
http://www.emacswiki.org/cgi-bin/wiki.pl
Be sure to download php-mode for Emacs, too!
http://sourceforge.net/projects/php-mode/
And PSGML if you do much with HTML/XHTML/XML:
http://www.lysator.liu.se/projects/about_psgml.html
Per Triplehash's website at http://www.triplehash.com/serlient:
"Triplehash Serlient lets you package, run and distribute your PHP and
CGI-based websites into Windows software.
Serlient does its work by combining intelligent web-server simulation
software and web-browsing (Internet ExplorerR) ca
> -Original Message-
> From: Joffrey van Wageningen [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 22, 2002 7:35 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP Chat REALTIME
>
> the real problem is how to get the data to the client without
> use of a socket
I've been tinkering
http://www.php.net/pdf
You'll need Thomas Mertz' PDFlib, which is free for personal/not-for-profit
use, but requires a license fee for commercial use:
http://www.pdflib.com/pdflib/index.html
-Andy
> -Original Message-
> From: Mihail Bota [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, J
Hi Torkil,
You may want to head over to Webmonkey and read their article about Search
Engine optimization:
http://hotwired.lycos.com/webmonkey/01/23/index1a.html
A few key points that have proven very helpful with my personal web site:
A central "crawler index" with links to each page on my
You might want to take a look at PhpAdsNew, a banner rotation/management
system using PHP and MySQL:
http://sourceforge.net/projects/phpadsnew
The system's admin tools assume that you're selling ad space, but there's no
reason you couldn't use it for a banner exchange instead.
-Andy
> On Fri,
You can also do
\n";
}
?>
(mysql_fetch_array uses MYSQL_BOTH for the second argument by default, which
returns an array using both numeric and associative keys - that's why you
were getting double results. :))
Per the manual:
--
IANAGE (I Am Not A GD Expert), but as far as I know the GD functions dealing
with image size don't concern themselves with the resolution of an image in
terms of dots per inch, just with the number of pixels.
Since most uses of the GD library functions in PHP will have to do with
creating/manipul
Which part are you having trouble with, specifically? The task as you've
described it is very straightforward, almost pseudo-code. :)
-Andy
> -Original Message-
> From: Phillip S. Baker [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 07, 2002 12:32 PM
> To: PHP Email List
> Subjec
For the sake of legibility you could always assign the contents of
$_SERVER['PHP_SELF'] to another variable before using it in the print
statement:
$PHP_SELF = $_SERVER['PHP_SELF'];
print "";
Shouldn't be a problem security-wise as long as register_globals is off;
Even if somebody tried to pass
I don't about accessing a serial port directly from PHP, but you can control
an X10 Firecracker on a Linix/BSD system by using the exec() command to run
BottleRocket:
http://mlug.missouri.edu/~tymm/
I threw together a script that would turn a lamp on and off from a web page
without to much diffi
Hmm, I'm assuming you're paying someone to host your site? Can't you give
the hosting company a quick call or e-mail re: whether or not they offer
MySQL? They would probably know better than we would. ;)
-Andy
> Thanks for the advice... But now I need to know what all this means:
>
> /home/chi
Well, the 'Table' class is definitely of limited usefulness..
but where classes come in especially handy is when you want to build
reusable code for handling common tasks, like, for instance, MySQL
connections and queries... so that your PHP code looks something like
/***
If you just want to prevent users from getting a listing of your image
directory, you can do a couple of things:
1) Put an empty 'index.html' (or whatever the server default is) in the
image directory, so anyone trying to browse the directory will get a blank
page.
or
2) (Assuming your server i
FTP with raw sockets is a little bit tricky because it actually requires a
second 'data' socket to be opened for each upload/download command.
Check out this excellent FTP class, which *doesn't* require PHP to be
compiled --with-ftp:
http://www.spencernetwork.org/ftp/ftp-class.txt
And of course
I like emacs - freely available for Windows and Linux, and if you use
php-mode for font locking you get nice automatic indentation, and (in
Xwindows - not sure about WinNT/XP/9X) syntax highlighting.
http://www.gnu.org/software/emacs/emacs.html
http://sourceforge.net/projects/php-mode/
--
PHP
>May I also suggest that you rewrite your echo statements as:
>
> echo 'Donate this item';
>
>Vastly improves legibility.
It's a problem, however, if you want to include a PHP variable in that echo
statement, if you're populating a SELECT menu with a loop, for instance;
$menu_options = array("A
Are single quotes valid around tag attributes in XHTML? I skimmed over the
W3C XHTML 1.0 spec before posting the previous message and got the
impression all attributes had to be double quoted. It would be great if
single quotes were valid, since I've fallen into the habit of using
them for the s
They've been mentioned on the list before, but I had a great experience with
Cedant.com. Apache, PHP4, MySQL, and shell access via SSH (and the ability
to compile your own software in a /home/youraccount/bin directory).
I hosted a site with them for a few months earlier this year before taking
t
It's almost certainly not W3C compliant, but if your form is inside a table
(I know, I know - you're not supposed to use tables for layout) you can hide
the tags outside the tags of the cell containing the form: E.G.:
I'm cheap too. That's why I use a free editor that does support line
numbers, like ConTEXT (http://www.fixedsys.com/context/) or EMACS. It's
been a long time since I had debugged anything in PERL, but it seems to me
that knowing exactly which line the problem is occurring on is a lot more
helpfu
You might want to give 'wget' a try - it's a GNU utility for downloading
mirrors of web sites:
http://www.gnu.org/software/wget/wget.html
If you use it with the '-r' and '-k' options it will crawl your site
recursively, and convert absolute links to relative ones in the downloaded
HTML files.
>
Are you using GD 2.0.1 and PHP 4.0.6? If yes then try
$dst_img = ImageCreateTrueColor ($new_w,$new_h);
(http://www.php.net/manual/en/function.imagecreatetruecolor.php)
-Andy
> -Original Message-
> From: Michael Hall [mailto:[EMAIL PROTECTED]]
> Subject: color problems when resizing
That's true, but you could use PHP and the MySQL data to generate the
JavaScript arrays for the dynamic menus... you can escape into PHP within
the
I'm not at all familiar with IIS, but in Apache terms it sounds like a MIME
type problem; the server doesn't know what to do with .PHP files, so it
assumes they're something that should be sent as a download/attachment
instead of parsing with PHP and sending as HTML - I would imagine there
would b
Try PhpAdsNew - it uses a MySQL backend:
http://sourceforge.net/projects/phpadsnew/
It may not be what you're looking for if your site gets *extreme* amounts of traffic,
but otherwise it's quite capable. (And free. :) )
-Andy
> -Original Message-
> From: Ali [mailto:[EMAIL PROTECTED]]
PHP needs to be compiled with libjpeg and libpng in addition to the GD
library to use those formats respectively. The PHP manual section covering
image functions (including those for manipulating JPEGs and PNGs) is at
http://www.php.net/manual/en/ref.image.php
-Andy
> -Original Message--
Maybe an animal beginning with "P" would be a good Mnemonic device (and good
for alliteration; think "The PHP Panda" or "The PHP Platypus".) Hmm, I
guess Panda and Platypus aren't particularly "powerful" animals, though. :/
Other animals beginning with "P":
Pelican
Panther (cheesy)
Polliwog
Pro
Hmm, I get a 404 error as of 17:44 GMT.
I hope that 'Mole' is one of the options on the list... I'm kind of inclined
to defer to Rasmus on the issue anyway, what with him being the guy
responsible for creating PHP in the first place. :)
I'm also keeping in mind that (unless I missed something),
Already used by PostgreSQL :)
http://www.postgresql.org
> -Original Message-
> From: John Lim [mailto:[EMAIL PROTECTED]]
>
> P for Pachyderm!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I wrote thumbnailing script that did exactly what you said below, but to
eliminate the needless regeneration of existing thumbnails I just did a
check to see if the thumbnail already exists:
if(!file_exists("/path/to/thumbnail.jpg")){
//Create the thumbnail here
}
If the thumbnail alre
As long as your code is well-formatted and well-commented, I don't think
it's a problem, especially for simple forms for quick DB inserts or sending
e-mail. You can do nice error handling without annoying Javascript alerts,
too; when the form is submitted you can check for missing/invalid field
v
You might want to check out APC - an open-source alternative to Zend's
commercial product. I've never used it, but it looks pretty good:
http://apc.communityconnect.com/
-Andy
> -Original Message-
> > I am on a project and the issue that struck me is how to
> protect my source
> > cod
If you want to manipulate PNG or JPEG images, you need to make sure you have
the PNG and JPEG libraries, and recompile PHP with GD as before, and
adding --with-png-dir=/path/to/pnglib, --with-jpeg-dir=/path/to/jpeglib
For the complete list of compilation options, see
http://php.net/manual/en/inst
There's a search engine optimization tutorial at Webmonkey:
http://hotwired.lycos.com/webmonkey/01/23/index1a.html?tw=e-business
It mentions doing the Amazon-style search-engine friendly URLs and links to
a page about mod_rewrite for Apache:
http://httpd.apache.org/docs/mod/mod_rewrite.html
-
Try reading the directory contents into an array, sorting it, *then*
outputting the contents of the array:
$dir = opendir(".");
$dirlist = array();
$index = 0;
while($file = readdir($dir) && $file != "." && $file != ".."){
$dirlist[$index++] = $file;
}
sort($dirlist);
foreach($dirlist
Also, PHP's .SWF generating capabilities aside, PHP could also be used to
generate included text on the fly - I forget the exact command, but I know
you can define the contents of a variable from an external file in Flash.
This would lend itself to updating a newsfeed or "What's New" blurb within
There's more than one way to skin a cat - if not directly from PHP to PDF,
why not PHP to a .TeX LaTeX file, then use exec() to run latex and dvi2pdf
on it. No license restrictions there that I know of, and you can get some
very nice results with LaTeX.
-Andy
> -Original Message-
> From
Glad your host got that straightened out - for future reference, an easy way
to look at the server's PHP config is to make a page using phpinfo -
It will show you whether GD (and other extensions) are installed, as well as
the image format(s) supported and whether or not Freetype support is
inc
No sure how you mean 'calling' the script... but in addition to using
something like
document.location='myscript.php'
It would theoretically be possible to pass javascript variables to a PHP
script in the same way by using something like
var foo = "Some Text";
var bar =
Make sure you have GD 2.0.1 and PHP 4.0.6 or later for creating true-color
PNGs, per the
manual:
http://php.net/manual/en/function.imagecreatetruecolor.php
-Andy
> -Original Message-
> From: Adrian Ciutureanu [mailto:[EMAIL PROTECTED]]
>
> Is there any way to tell ImagePNG() to create
I keep my web documents in a CVS repository on a Linux box, and use WinCVS
(GNU) to check files in and out on my WinNT desktop. I use ConTEXT
(freeware) for editing. Documentation and help are always available at
php.net and google.com. I have an Apache 'staging' server, and to keep the
docume
WinCVS is available from http://www.wincvs.org - they also have Mac and X
versions, although I've never tried them.
-Andy
> -Original Message-
> From: John Meyer [mailto:[EMAIL PROTECTED]]
>
> Where do you get WinCVS , by the by?
>
--
PHP General Mailing List (http://www.php.net/)
To
You might want to take a look at Netmania. (http://www.netmania.org)
Caveats: I helped install Netmania at a former employer back in February
2001, and with the then-current distribution we had all kinds of trouble
setting it up until we realized that it depended on having *all* error
handling t
56 matches
Mail list logo