RE: [PHP] Re: PHP Security Advisory: Vulnerability in PHP versions 4.2.0
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 around! ;) ) -Andy > -Original Message- > From: Ricky Dhatt [mailto:[EMAIL PROTECTED]] > > ./configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs > --with-ldap > > make > > make install > > /usr/local/apache/bin/apachectl restart > > Hmm...is the configure step really necessary? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL Backup and Restore
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 than the one the host provided. :) -Andy > -Original Message- > From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] > > I've never had any luck using PHPMyAdmin for dumping databases. > They always > time out over the 30 second limit. I know if it was my > installation, I could > fix it, but these are usually with hosting companies, where > that's the only > access they provide. It's very much a pain in the butt... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] web services and PHP
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.sourceforge.net/ -Andy > -Original Message- > From: Andrey Hristov [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 31, 2002 2:40 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] web services and PHP > > > > There are two ways (SOAP) to use SOAP library written in PHP > such as NuSOAP > by Dietrich Ayala or to use > PHP-SOAP toolkit (module for PHP written in C)by Brad > Lafountain(coding) and > Shane Caraveo(testing) (available at sourceforge.net). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Creating Image...
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 > -Original Message- > From: mp [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 31, 2002 11:11 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Creating Image... > > > I want to create simple image... > I execute this script: > > $im = imagecreate (50, 100); > $fp = fopen("test/im.jpg","w"); > fwrite($fp, imagegd($im)); > fclose($fp); > > But there is some problems about this... > Could somebody help me? > Could somebody help me? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP to create static images
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 directory as the script. Where ever you tell it to save the image, make sure your web server (if Apache - I don't know about IIS) has permission to write files to that directory. -Andy > -Original Message- > From: Campano, Troy [mailto:[EMAIL PROTECTED]] > Sent: Monday, June 24, 2002 12:40 PM > To: [EMAIL PROTECTED] > Subject: [PHP] PHP to create static images > > > I am doing some work with creating graphs using the GD library. > > Does anyone know how I can create the graphs statically so I can > save the output as a GIF or PNG? > > > I want to run a script that will take in say 10 datasets and then > create 10 PNG images on the file server. > > > > Any ideas? > > > thank you! > > > Troy Campano > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Image aliasing
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 particulars of your situation, but say you give him a dozen high quality JPEGS at 800x600 pixels and about 120K each... if he puts those on a page and resizes them to 96 x 72 in the HTML to make 'thumbnails', the user is still going to be stuck downloading 1440K! That's a pretty hefty page to download even if you have a broadband connection. (From an end-user standpoint, I find it *really* annoying when people do this!) Maybe you can point this out to the person you're supplying images to? It's not a PHP-based solution, but maybe it will help :) Good Luck, -Andy P.S. You could put together a PHP script that would use the GD 'imagecopyresampled' function to automatically generate the thumbnails for him, but that assumes 1) You have access to his server and 2) He has PHP ;) > -Original Message- > I'm wondering if anybody has ever figured out a way to get around the > absolutely abysmal way that Internet Explorer resizes images? > > The problem is that the person I'm supplying the images to refuses to use > two copies (a small one, and a large one) and instead uses one (just the > large one) and when he needs a small representation of it he > slaps the large > image in and sets the width and height tags. > > The problem comes in when I'm trying to supply him with good > looking images. > Sure, the large image looks fine, but that smaller image gets aliased to > hell and back. Can the large image be recompressed in such a way that it > doesn't noticeably damage the large version, but improves how it > looks when > arbitrarily shrunk in IE? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] redeclaring functions
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 do the exact same thing...but when the include files are > called, the second file recieves a redeclare error. > > Suggestions? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] parsing of SSI scripts.
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) know know that the PERL script's output should be parsed by PHP. -Andy > -Original Message- > From: Sandman [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 03, 2002 1:09 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] parsing of SSI scripts. > > > In article <008c01c222c9$fa9c3fb0$2f7e3393@TB447CCO3>, > [EMAIL PROTECTED] (1lt John W. Holmes) wrote: > > > I think I misunderstood your question. You have a Perl script > that returns > > HTML and SSI and you want that string, returned to PHP, to be parsed by > > Apache, so the SSI is evaluated, right? > > > > Okay, now that I've sorted that out, I don't have an answer for > you. Sorry. > > It seems like a very bad way to do things and you're making > things harder > > than they should be. > > > > In thinking about it, are you really sure that virtual won't do what you > > want? > > > > http://www.php.net/manual/en/function.virtual.php > > > > virtual() is an Apache-specific function which is equivalent to > in mod_include. It performs an Apache sub-request. It is > > useful for including CGI scripts or .shtml files, or anything > else that you > > would parse through Apache. Note that for a CGI script, the script must > > generate valid CGI headers. At the minimum that means it must generate a > > Content-type header. For PHP files, you need to use include() > or require(); > > > > > virtual() cannot be used to include a document which is itself > a PHP file. > > ^^ > > But my SSI script outputs data that contains PHP scripts, which I want to > have parsed. > > -- > Sandman[.net] > > -- > 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
RE: [PHP] Editing Word Documents
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)... then you could run a PHP script as a cron job to check for modified files in that directory every five or ten minutes, and have the script upload them as needed. It's not instantaneous, and there would definitely be some logistics to work out (what if two people are editing the same file at the same time, how do you account for that 5-10 minute lag, etc.) but it might be better than nothing. -Andy > -Original Message- > From: Chris Hewitt [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 09, 2002 3:47 AM > To: Kevin Stone > Cc: David Russell; php-general > Subject: Re: [PHP] Editing Word Documents > > > I think what the OP meant (certainly what I meant), is that the Word doc > is accessed from a normal link. Clients use windows and the browser has > the .doc mime type set and spawns Word. The user edits it. I had > (vainly) hoped for a way of setting the "File..Save As" to trigger PHP's > File Upload facility. > > Has anyone had this need, found a way around it or found it not possible? > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Security with XML
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 word in the pspell dictionary through MD5 and see if anything matches") attacks, but it would be better than plain text, at least. So, instead of Foo bar you would have Foo 37b51d194a7513e45b56f6524f2d51f2 When 'Foo' tries to log in, you would just use MD5() on the password he entered in the web form and compare it to the value in the XML file. If it matches, he's in... otherwise, it's not the right password. I'm sure others will come up with more secure ideas, but anything is more secure than passwords in plain text. :) -Andy > -Original Message- > From: Chris Earle [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 10, 2002 9:42 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Security with XML > > > I've created a db like system with XML and PHP, and I want to require a > username/password to change the contents of the file. > > How should I go about documenting the username/password? The contents of > the site aren't really all to important (no financial info or > anything like > that, mostly just links actually), but I don't want someone's information > stolen because someone found the "users.xml" file and opened it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] using pdf template
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 PDF generation, but they look pretty useful. Creating complex PDFs with just the base PDFLib functions is definitely a pain. :) -Andy > -Original Message- > From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] > Only using the commercial PDI library from pdflib.com > > On Thu, 11 Jul 2002, Tobias Talltorp wrote: > > > Is it possible to produce a PDF, use it as a template and populate > > predefined sections of it from a database? > > The PDFs I want to create are a little too complex for me to > produce from > > scratch. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: gd ->1:image resolution 2:font quality
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:Picture to create with gd, scale up by factor 69.4[?] (for 600dpi ) > Result is an huge 72 dpi picture. > 2:Resize and convert result picture to 600dpi by an external program. > > Next question: > Which external program I can use? > Have to work on windows 2. > This is not the reason for my lack of english skills ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Any PHP editor for windows
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 -Andy > -Original Message- > From: Dasmeet Singh [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 18, 2002 2:59 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Any PHP editor for windows > > > Hey, does anyone knows of a good PHP editor for windows. I have also > heard emacs is available for windows. Does anyone know where to download > it from? > Dasmeet > http://www.einfotimes.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Has anyone tried Serlient?
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) capabilities into one package. This allows users to distribute their website, or web applications just as a normal software application would be distributed." It looks interesting, but they don't offer a demo. They're also vague about MySQL support; the FAQ says "There might be ways to get it working." For that matter, what about extensions like GD and PDFlib? --Andy -- 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 Chat REALTIME
> -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 with PHP-GTK of late and just the other day it occurred to me that some sort of messaging client would be a great way to get my feet wet - by authoring in PHP on the client side (instead of trying to kluge something together in a web browser), sockets would cease to be a problem. :) I hadn't really considered the particulars of setting up a PHP script to essentially act as a messaging "server", so your posts have been quite instructive. Thanks! -Andy -- 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: Creating a pdf document
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, January 23, 2002 11:53 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Creating a pdf document > I was wondering if I could save the result of a query in a pdf document. I > looked for any functions that might help, but I got confused because I > could not see how/where exactly to insert the necessary .dll's. I'd like > to do this (saving the output of a query) by using mysql installed on a > Irix machine, and PHP4. > If this is not possible, could I create a pdf document or a word document > from a query from either Access database or mysql on a win2k system, > PHP4.1? > Any references that might help? > Thanks for your help! -- 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: Building my site... again - somewhat OT
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 site that I want spiders to crawl; this is the only page I need to submit to a search engine, and since I store my content in MySQL the page is always up to date. A friendly URL structure - some search engines will follow a link like "index.php?page=cars&subpage=ferrari", but I figured I would make my site crawlable by *any* spider that might come its way, and began using Apache mod_rewrite to translate urls internally; so when a browser requests a link like "/cars/ferrari/index.html", Apache will rewrite the URL to "index.php?page=cars&subpage=ferrari" internally. I'm not sure if this is an issue with the CGI version of PHP like the other URL rewriting method that has been mentioned. Another handy tag that some spiders (Most notably, Googlebot) obey is the ROBOTS meta tag, which tells the spider what to do with the current page: - Index the current page, and follow all of its links - Index the the current page, but don't follow any links - Don't index the current page, but follow all of its links - Don't index the current page, and don't follow any links; dead end. HTH, -Andy > -Original Message- > From: Torkil Johnsen [mailto:[EMAIL PROTECTED]] > Will > the web spiders and web crawlers ever follow a link like > index.php?page=cars&subpage=ferrari and will they ever index what > they find > there, and, and, and, and... > > Well... does anyone understand what I'm asking here? WOuld this be a good > way to build my site to ensure getting hits from search engines, > or should I > do this some other way? Anyone know? -- 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] Can this be done in PHP?
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, 1 Feb 2002, Lazor, Ed wrote: > > > I'm trying to understand how this banner exchange works and > whether it can > > be done in PHP. Here's the HTML you put on your web page: > > > > > > href="http://rpgx.rpgconsortium.com/xchange/engage.cgi?advert=NonS > SI&page=XX > > "> > > src="http://rpgx.rpgconsortium.com/xchange/engage.cgi?id=atfantasy > &page=01" > > border="0" width="468" height="60"> > > > > > > It... > > - displays a random banner image > > - takes you to the site relating to the displayed image > > > > How does it do that? Any ideas on how to do this in PHP? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Oddity
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: - http://www.php.net/manual/en/function.mysql-fetch-array.php The optional second argument result_type in mysql_fetch_array() is a constant and can take the following values: MYSQL_ASSOC, MYSQL_NUM, and MYSQL_BOTH. This feature was added in PHP 3.0.7. MYSQL_BOTH is the default for this argument. By using MYSQL_BOTH, you'll get an array with both associative and number indices. Using MYSQL_ASSOC, you only get associative indices (as mysql_fetch_assoc() works), using MYSQL_NUM, you only get number indices (as mysql_fetch_row() works). - HTH, -Andy > -Original Message- > From: Chris Boget [mailto:[EMAIL PROTECTED]] > > > $macroDataArray = mysql_fetch_array( $result ); > > I'm still curious what is going wrong, but I've found a work arround. > One of the things I love about PHP is that you learn something new > just about every day. Instead of fetch_array(), I can use fetch_assoc() > and it'll do just what I need. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: 72dpi with gdlibrary2?
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/manipulating images to send to the browser, it should be safe to assume that any image created with PHP will be 72 DPI. If you're talking about resizing a much larger image (for instance, a 3.5 inch by 5 inch JPEG created at 300 DPI), you just need to do some math to figure out how much to shrink it. If your source resolution is 300 DPI and your target resolution is 72 DPI, you need to multiply the number of pixels in the width and height of the 300 DPI original by a factor of 72/300, which equals .24. Or to put it another way: 5 inches at 300 DPI = 1500 pixels. 5 inches at 72 DPI = 360 pixels. 1500 pixels * .24 = 360 pixels. I hope that wasn't utterly confusing, but IANAMT (I Am Not A Math Teacher), either. :P You'll probably want to take a look at the imagecopyresized and imagecopyresampled functions: http://www.php.net/manual/en/function.imagecopyresized.php http://www.php.net/manual/en/function.imagecopyresampled.php (Imagecopyresampled produces much nicer results, but it's only available in 4.06 and later.) -Andy > -Original Message- > From: Andy [mailto:[EMAIL PROTECTED]] > > I would like to create images with 72 dpi with gdlibrary2.01 > > Is this possible? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: Creating Tab-Delimited Text File
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 > Subject: Creating Tab-Delimited Text File > > > Greetings All, > > What I want to do is create a tab-delimited text file for download from > records in a database. > I am not sure on how to do this. > > So what I want to do is as follows. > ON a page a button is clicked. > Script is activated that pulls records from a database. > From these records a tab-delimited text file is created. > A save dialogue box appears so the user to save the text file to > his harddrive. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] _SERVER variable insd prnt sttmnt
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 an arbitrary value to PHP_SELF in the query string, it would only show up in $_GET['PHP_SELF']. It also provides a quick way to bring pre- 4.1.2 scripts relying on the old global $PHP_SELF up to date. -Andy > -Original Message- > From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 29, 2002 8:30 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] _SERVER variable insd prnt sttmnt > > > > > // print "" . > > This is the problem with not breaking out of a string to display > a variable. > Ideally, you would do it this way: > > print ""; > > But some people just have a problem with doing it that way, so you can use > braces. > > print ""; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: Option for Serial or Comm port communication with PHP?
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 difficulty. As if that wasn't geeky enough, I pointed a webcam at it so that people could watch the light go on and off as they clicked the link. :) Having the light turn on and off without warning got old pretty quickly, so I took the script down... neat stuff, though! -Andy > -Original Message- > From: Ken Lancaster [mailto:[EMAIL PROTECTED]] > I was hoping to work on a hairbrained idea that would allow me to > use php to > control an X10 or other serial device (security system, irrigation > controller, etc,). I have read several hints at using the fopen > function to > do serial communications but these posts were a year old. Is it possbile > to do serial communications using php. What are the options? > > Thanks in advance for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: mysql and telnet.
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/chiliasp/odbc/direct/locale/en_US/LC_MESSAGES/ivmysql15.po > /home/sites/home/web/CFIDE/administrator/datasources/drivers/myodb > c_mysql.cfm > /home/sites/home/web/CFIDE/administrator/datasources/drivers/mysql.cfm > /home/sites/home/web/CFIDE/administrator/server_settings/drivers/mysql.cfm > /home/coldfusion/lib/locale/en_US/LC_MESSAGES/CFmysql15.mo > /home/coldfusion/lib/CFmysql15.so > /home/coldfusion/scripts/mysql_expire.cfm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: OOP .. I just don't get it.
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 // $db = new mysqlObject; $db->connect("localhost","username","password","mydatabase"); $db->doQuery("select * from mytable"); foreach($db->resultRows){ //Do stuff with the query results here } $db->disconnect(); / instead of something like: / $dbconnection = mysql_connect("localhost","username","password"); mysql_select_db("mydatabase",$dbconnection); $result = mysql_query("select * from mytable",$dbconnection); $resultrows = array(); while($row = mysql_fetch_array($result)){ $resultrows[] = $row; } foreach($resultrows as $temprow){ //Do stuff with the query results here } mysql_disconnect($dbconnection); // The first, most obvious advantage is that the code becomes a easier to read, which is important if you're working on a complex project. You could arguably create a set of regular functions for MySQL stuff if you really wanted to, but you'll have to keep careful track of any global variables you might be using; When you're working with a class all of your class variables and functions are properties of an object, always with the same name and easily accessed, but separate from any local variables you're working with. When you're working with a collection of functions, your variables are all over the place and prone to inconsistency. For instance, handling two different database connections in the same script is easy with a class; using the hypothetical example from above, you know that the results of your query are always going to be stored in the 'resultRows' property of the object, so it's as easy as accessing $foo->resultRows and $bar->resultRows. If you were using a collection of functions, you would have to come up with a second variable name to store results from the second connection for that particular script, and even if you try to maintain consistency among all the scripts on your site using your collection of database functions, chances are that things will get messy at some point; it's easier to keep track of commonly used variable and function names at the class level. Hmm, I hope that sort of made sense... it's a tough thing to explain. It took me a long time to get my head around the usefulness of OOP, too- as you said, examples are usually not very practical. The first explanation of OOP that I ever read dealt with a hypothetical 'vehicle' class, and although I understood the *theory*, I wondered for the longest time why I would want to write a program for describing different kinds of imaginary cars and turning them on and off, or extend it to describe imaginary boats and motorcycles. ;) -Andy > -Original Message- > From: mojo jojo [mailto:[EMAIL PROTECTED]] > I've been using php for a while now but I have not got my head around OOP > (classes). > > Why bother using them? I've read thru a few tutorials on using classes and > the examples given are quite simple. This is probably the problem - I just > can't see the benefit of using this style of programming. :: table class example snipped :: > Using a class doesn't appear to give me any benefits - in fact the code is > longer. > > I know that you can spawn more instances of the same class which sounds > useful, however I can also run my function as many times as I like using > different variables. > > What am I missing here? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to adress pictures stored outside of the http server root?
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 is Apache) Create a '.htaccess' file in the images directory and add the line Options -Indexes Either one ought to be less of a performance hit than doing a readfile() on each image you want to send to the browser. :) This article has more stuff on .htaccess: http://www.codingclick.com/article.php?page=0&aid=3 HTH, -Andy > -Original Message- > From: andy [mailto:[EMAIL PROTECTED]] > hmm sounds logical. The idea was to protect the image directory > from people > who would like to download all the image files. Somebody told me to place > the dir outside the document root. So this seems to be wrong. > > What would you suggest to prevent people from downloading all the image > files? > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] FTP RAW
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 the FTP Protocol RFC is helpful: http://www.w3.org/Protocols/rfc959/ -Andy > -Original Message- > From: Analysis & Solutions [mailto:[EMAIL PROTECTED]] > > I have written the code to upload using RAW FTP commands. > > Cool! > > How'd you get it to work? > > --Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: editors
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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Forms in 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" => "Option 1", "B" => "Option 2", "C" => "Option 3"); foreach(array_keys($menu_options) as $option_value){ $option_text = $menu_options[$option_value]; echo '$option_text'; } would just output $option_text $option_text $option_text which is probably not the desired output :) You need to use double quotes for variable substitution. Unfortunately, if you want to maintain XHTML compliance the tag attributes have to be double-quoted too... echo "$option_text\n"; (Might as well add a "\n" at the end of the line for readability in the browser's 'View Source' window!) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XHTML tag attribute quoting (Was Re: Forms in PHP)
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 same exact reason this thread got started... easier to read and faster to type than \" :) Oops, and shame on me - tag and attribute names in my previous code snippets should all be lower case, too, IE: echo "$option_text\n"; Of course, a page will render just fine in any modern browser whether tag attribute values are single or double quoted (or in most cases, even if they're not quoted at all.) But if everyone got in the habit of adhering to standards, and browsers implemented standards correctly (without extending them with propietary junk), what a nice world it would be. Oh, and world peace would be great too. :P Of course, I'm just as guilty of lax coding. The next time I begin a site from scratch my plan is to use PSGML mode in emacs, and edit against the XHTML 1.0 DTD. Strict? Yes, but clean and compliant :) (And PSGML does great code formatting as you go.) -Andy > Unfortunately, if you want to maintain XHTML > : compliance the tag attributes have to be double-quoted too... > : > : echo "$option_text\n"; > > Why stick with quotation marks? > > echo "$option_text\n";> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php hosting
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 the plunge and hosting on a dedicated Linux box at home, and found their support staff to be knowledgeable and responsive. Their basic account is $12.95/month for up to a gig of traffic, and they have an extensive web control panel. -Andy P.S. I don't work for Cedant or know anyone who works there, etc., etc.,.. I'm just a happy customer :) > -Original Message- > From: Heidi Belal [mailto:[EMAIL PROTECTED]] > Sent: Saturday, October 20, 2001 1:29 PM > To: Php > Subject: [PHP] php hosting > > Anybody know of good reliable hosting that supports > php, and has a control panel to go with it? > thanks, > Heidi -- 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: Forms and Netscape -- spacing problem -- Help!
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've never had a problem with this workaround in IE/Netscape 4.x as long as the tags are nested correctly. Not sure about Lynx/Konqueror/Opera. I try whenever possible to follow the W3C's standards, but inconsistent browser implementation of HTML and CSS usually gets in the way. :P > -Original Message- > Subject: Re: Forms and Netscape -- spacing problem -- Help! > > form tag in NS (4x - 6x) there is some additional space > -- 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: webmaster@php.net dude
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 helpful than knowing what it occurred near. As for knowing exactly what the problem is, that usually becomes self-evident once you look at the line indicated in the error message or the line immediately before or after. But, "A chacun son gout" as they say. -Andy > The only thing I would love to know is why isn't error checking more > precise/helpful. If I leave off a { by accident, why can't the error > say: > Duh! ERROR!! Alarm, alarm, alarm > You left of a } ya idiot! > Go look NEAR "something" and correct it stupid! > > I - at least - am cheap and use Wordpad to do my PHPing. Looking up line > numbers SUuuucks. > One advantage to Perl. Maybe the only one left! > > IS ANYONE LISTENING!! > > Thanks, > > John -- 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-general Digest 23 Nov 2001 14:10:17 -0000 Issue 1011
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. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] > Sent: Friday, November 23, 2001 6:10 AM > To: [EMAIL PROTECTED] > Subject: php-general Digest 23 Nov 2001 14:10:17 - Issue 1011 > > > > php-general Digest 23 Nov 2001 14:10:17 - Issue 1011 > > Topics (messages 75546 through 75577): > > Missing PHP.ini > 75546 by: John Monfort > 75547 by: Joseph Blythe > 75548 by: Martin Towell > 75549 by: John Monfort > 75551 by: David Robley > > Re: error handling and __LINE__ > 75550 by: Papp Gyozo > > Re: SQL in Function > 75552 by: David Robley > > strip php out of html > 75553 by: Joseph Blythe > 75554 by: David Robley > 7 by: Michael Sims > 75556 by: Joseph Blythe > 75558 by: Joseph Blythe > > Object Persistence like Resource Persistence already implemented? > 75557 by: Yermo M. Lamers > > MySQL query problem! > 75559 by: De Necker Henri > 75561 by: David Robley > 75562 by: De Necker Henri > 75564 by: David Robley > > Re: GD, PNG > 75560 by: Yamin Prabudy > 75563 by: Joseph Blythe > > read file > 75565 by: PHP Newbie > 75566 by: Andrey Hristov > > HTTP_REFERER > 75567 by: Jordan Elver > 75568 by: gaouzief > 75569 by: Sebastian Wenleder > 75570 by: Matt Williams > 75572 by: Jordan Elver > 75573 by: Matt Williams > 75577 by: Jordan Elver > > file upload troubles > 75571 by: Nikola Veber > 75574 by: fitiux > > php->html > 75575 by: Christoph Starkmann > > upload problems > 75576 by: Nikola Veber > > 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] > > > -- > -- 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: color problems when resizing image with GD
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 image with GD > The problem I'm having is that the resized image drops huge chunks of the > color pallette, creating what is basically a monochromatic image. -- 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] Dynamically created dropdowns
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
RE: [PHP] : IIS server doesn't recognize PHP pages
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 be something in IIS' config analagous to the Apache "AddHandler" configuration directive that lets you specify a local interpreter for .cgi, .pl, .php, etc... -Andy > I am almost sure that the problem is simply that the guy is very > expert with > NT/IIS/ASP/VBScript, and at a basic level on other topics, > included this one. > So, it must be a config issue, but which one? What should I tell him? -- 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: banner management system
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]] > Hello, > > any idea of a free and simple banner management system written in PHP. I > appreciate your help. -- 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: Image problem
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- > From: Peter Lalka [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 07, 2001 5:50 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Re: Image problem > > > > Thanks, in phpinfo list really isn't support for GIF:( > How can I manipulate jpeg images? Which functions are for this > img. format? > P. > > > |+-> > || Johan <[EMAIL PROTECTED]> | > || Odoslané kým: | > || php-general-return-77040-lalkap=emo.seas.sk@lis| > || ts.php.net | > || | > || | > || 07.12.2001 14:30 | > || | > |+-> > > >- > --| > | > | > | Komu: [EMAIL PROTECTED] > | > | Kópia: > | > | Predmet:[PHP] Re: Image problem > | > > >- > --| > > > > > I've instaled and cofigured php4 on WinNT with Apache Web server. > > I can't use any fuction of Image manipulation, 'cause I get this error > > message: ImageGif: No GIF support in this PHP build > > In phpinfo() is listed that: gd lib.> enabled, zlib lib.> enabled. > > What do I still miss there? > > In the newest version of GD library (think it since about 1.3 or > something) > > does support GIF, because GIF is a commerial image format. > > Use PNG or JPEG instead. That much better, or find a version with GIF > support. > > You can see what Image formats you GD can use by make a file with follow > content: > phpinfo(); > ?> > > :o) > > Regards, > > Johan > > -- > 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 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] Logo proposal
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 Protozoa Of course, the Penguin is already spoken for. :) Personally, I don't have a problem with the current PHP logo... From a marketing standpoint, I don't know; has MySQL become a more attractive prospect to the pointy haired bosses of the world since they streamlined their logo and added a Dolphin? It would be interesting to know. If PHP was going to adopt a mascot, I kinda like the idea of the Platypus. If you want to force a metaphor, think of PHP as an interesting language that fits between traditional scripting languages and the HTTP server - sort of like the Platypus is an interesting critter that fits somewhere between mammal and.. whatever else. :) -Andy > -Original Message- > From: Tim Ward [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 11, 2001 2:02 AM > To: PHP; Valentin V. Petruchek > Subject: RE: [PHP] Logo proposal > > > Chinchillas are fluffy, and I don't think anyone is using them for their > logo. > > -- > From: Valentin V. Petruchek [SMTP:[EMAIL PROTECTED]] > Sent: 10 December 2001 16:58 > To: PHP > Subject: [PHP] Logo proposal > > Hello world of php-programmers! > > It seemes to me PHP is very powerful tool and very popular among > web-programmers, too. As for me I use php for solving web tasks for > 2 years > and I'm very satisfied with it. > > It seemes to me current PHP logo (can be found by > http://www.php.net/gifs/logo.gif) doesn't suite to PHP. It's common > logo > without any idea except using title in it. > > I propose to create and develop new PHP logo corresponding to its > power. > > My propose is WoodPecker (e.g. like Woody). > > Other propositions? > > Respectfully, Zliy Pes http://www.zliypes.com.ua > > > > > > -- 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] Logo proposal - voting script!
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), there's been no indication that any animal mascot would be officially adopted by the project. ;) > -Original Message- > From: Michael Cronstrom [mailto:[EMAIL PROTECTED]] > Subject: [PHP] Logo proposal - voting script! > a voting script! > > at: http://zoon.se/vote/logo.php -- 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] PHPhish Logo
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] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] image code
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 already exists, the script skips over it, but if it doesn't it creates it as needed. -Andy > -Original Message- > From: Hugh Bothwell [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 19, 2001 1:02 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] image code > > > Seems pretty straightforward, actually; I would write a script > that takes as > parameters the name and desired size of a graphic, resizes it, and returns > the thumbnail ( look at ImageJPEG() ). Then I would write a script that > iterates through the files in the directory and, for each, gets a > thumbnail. > > The only problem is that this is a fair bit of work; if it's called at all > frequently, you might be better to create a static version. But that of > course does away with the 'self-updating' bit. > > A possible fix would be to write master page: > check how long since the page has been updated; if necessary, create and > save an updated version of the imagelist. Then forward the user to the > saved static version. This would let you have the page update itself on a > delayed basis, ie hourly. -- 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: bad form...
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 values - if anything is wrong, just output the form again, but this time prepopulate the valid fields and highlight the missing ones with red text or a red outline. -Andy > -Original Message- > From: motorpsychkill [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 20, 2001 12:13 AM > To: Php General List > Subject: bad form... > > > hello everyone, is it 'bad form' (no pun intended) to have a form point to > itself for processing, rather than forward the form variables to another > page? Anybody have any input on this? I try to have 1 page that is the > form and handles all the processing as well in order to keep the > page count > on my site low and for easier editing, blah blah blah > > thank you for you help! > > -- 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] protect source code
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 > > codes which is in human readable form. There isn't any way for me to > > protect my database and the only way that I had found out is to > use the PHP > > encoder provided by Zend.com to encode the source code. However, the > > price of a commercial license for each machine (since it use host ID or > > hostname as the key) is too costy and I am trying to find an > alternative or > > a cheaper packages available. Please help. -- 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: upgrading to gd2.0.1
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/install.configure.php -Andy > -Original Message- > From: Mark Maggelet [mailto:[EMAIL PROTECTED]] > Hi, > I just upgraded gd to 2.0.1 and recompiled apache1.3.20/php4.06. > when I do phpinfo() it says: > and when i call imagepng() it says: > Warning: ImagePng: No PNG support in this PHP build > > -- 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]somebody help me out here!
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 -Andy > -Original Message- > From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 09, 2001 9:57 AM > To: PHP General List (E-mail) > Subject: [PHP]somebody help me out here! > > > hey- > > I know I've seen an article/tutorial on the zend website very > recently about > parsing urls. It was about being able to use urls which are search engine > friendly and only use the forward slashes, and it also included > the code to > interpret all of that. Does anyone know of this article who can > direct me to > WHERE it was on that site, or if not, to a site that has a > similar article? > > thanks > chris > > -- 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: sorting results of opendir()
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 as $file){ echo "$file"; } > -Original Message- > From: kmurrah [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 09, 2001 11:06 AM > To: [EMAIL PROTECTED] > Subject: sorting results of opendir() > > > Greetings. > > I need to read the contents of a directory, sort it alphabetically, and > display it > > i'm doing find on the reading and displaying, but can someone help me with > the sort? > -- 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] Upcoming wrox php/flash book?
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 a Flash file without having to recompile it from its .FLA source. -Andy > -Original Message- > From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] > > See http://php.net/swf and also http://www.opaque.net/ming > -- 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: "report" generation with PHP
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: Matthew Garman [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 16, 2001 4:00 AM > To: [EMAIL PROTECTED] > Subject: "report" generation with PHP > > > > Hello: > > I wrote an small web application that interfaces a Microsoft Access > database. The database is fairly small and simple: it is a listing of > employees, their phone number(s) and their department. My interface > allows folks to view the phone list, search for a name, list by > department, etc., and allows certain users to update the phone book (add > employees, change phone numbers, etc). It's a fairly "typical" phonebook > application. > > The Access database has a macro in it that allows for the generation of a > report. The report is a nicely formatted listing of all the employees and > their phone numbers, grouped by department. Everybody fits on one page. > The whole purpose of this report is to be printable, and so that the one > page phone list can be distributed throughout the factory. > > Now I want to be able to generate this report from the web. It doesn't > have to use Access (and I would prefer that it didn't, so I can convert to > MySQL). But I don't know of a nice (and easy!) way to generate such a > report. Using HTML tables isn't acceptable---when you print, you still > get the header and footer that the browser adds (and it's unacceptable to > have everyone modify their browser's setup). Furthermore, the printable > list has to look as close as possible to the original, because if I start > changing formats, people will get upset. > > So I'm not really too sure where to start on this one. If anyone could > offer some suggestions, and point me in the right direction, it would be > sincerely appreciated! > > Thanks, > Matt > > -- > Matt Garman, [EMAIL PROTECTED] > "I'll tip my hat to the new constitution, Take a bow for the new > revolution > Smile and grin at the change all around, Pick up my guitar and play > Just like yesterday, Then I'll get on my knees and pray..." > -- Pete Townshend/The Who, "Won't Get Fooled Again" > > > > -- 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] can't get gd working at all
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 included. -Andy > -Original Message- > From: Matt Greer [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 25, 2001 11:46 AM > To: php-gen > Subject: Re: [PHP] can't get gd working at all > > > Ah ha, my host was wrong. gd is not installed on the server I'm on, but > they're moving me over to one that has it. > > Sorry everyone, but I didn't know enough about any of this to be able to > verify what they told me. > > Thanks for all the help. > > Matt > > -- 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: could i get a clue?
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 = "Some other text"; document.location = 'myscript.php?foo=' + foo + '&bar=' + bar; And although it's not exactly 'calling' a script from Javascript, you can use PHP to generate your script on the fly... handy if you need to do something with data from a database within a Javascript. (Not sure what that would be, but it might come in handy.) -Andy > -Original Message- > From: Richard Lynch [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 14, 2001 8:19 PM > To: [EMAIL PROTECTED] > Subject: Re: could i get a clue? > > > > ok a basic question. perhaps I dont know enough about javascript but > > anyway.. > > > > I want to call a php script from javascript. Anybody have any hints for > me? > > A link to a useful website would work as well. thanks mates > -- 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: ImagePNG problem
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 PNG24 images instead of PNG8 > images? Seems that ImageCreateFromPNG() can read PNG24, but ImagePNG() > writes only PNG8.> -- 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 development environment do you use for PHP?
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 document tree up to date with the CVS repository I run a cron job that performs 'cvs update -d' every five minutes from the server document root. When a project is ready to go live, all that's needed is a 'CVS export' command to generate a clean copy of the most recent files to go on the live server - meanwhile keeping a complete revision history in CVS in case there's ever a need to access an older version. It works quite nicely. I've never had much patience with development environments... they always seem like more trouble than they're worth. (Of course, I've never gotten very deep into a language like C with all the cross linking and Make files - I could see an IDE coming in handy in that case!) Oh, and my Linux 'box' is actually a VMWare virtual machine running Mandrake Linux 8.0 on my WinNT desktop. ;-) -Andy > -Original Message- > From: Greg Beaver [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 27, 2001 12:11 AM > To: [EMAIL PROTECTED] > Subject: What development environment do you use for PHP? > > > Hi, > > I'm curious what programs/platforms different people use to develop PHP. > > > Anyone have a sweet setup that makes it all easier? -- 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 development environment do you use for PHP?
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 unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: WebMail Client
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 turned off (even warnings) - with errors disabled it worked like a dream, although we had to wonder why they would have released code known to cause warning messages. I think a new version has come out since then, and maybe they've addressed some of those problems. Once set up it's a very impressive system both in appearance and functionality - it does use a lot of Javascript, so there might be issues between Netscape/IE/Konqueror/Mozilla/Mac/Windows/Linux. YMMV :) It requires Unix/Linux, Apache 1.3 and MySQL. -Andy > -Original Message- > From: Rosen [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 02, 2001 5:17 AM > To: [EMAIL PROTECTED] > Subject: WebMail Client > > > Hi, > Can someone recommend me some free php script for WebMail client > (like Squerriemail) ? > > Thanks, > Rosen > > > -- 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]