[PHP] Re: IP to geo-location advice
Patrick wrote: Hi Everyone Could anyone give me some advice on the best way to do IP to geo-location with php using open source code? Thanks in advance-Patrick That is not an easy problem. You can go to ARIN, APNIC, etc and get /8 and smaller assignments. But, if the new assignee hasn't SWIP'd their blocks, the world will think the old assignment is still true. Recently a block was assigned to a US company and their customers couldn't access hulu.com because there hadn't been a SWIP. hulu denied access because the block is still in the whois records as non-US. The big geolocation companies make a lot of mistakes. Because - they will not use a fine enough granularity to sort out where an ip connection is coming from. They'll usually stop at the last router within a large transit provider's block. For example: many local ISPs in northern california will all appear to be in stockton, etc. where some tier 1 routers are. For dynamic ip ranges it is even messier. For now, ip geolocation is very fuzzy. Much better to go by zip code or postal code. At least when zip areas are merged or changed you might get sufficient advance notice. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: RFC/Survey for Our Newer Folks (Including Lurkers)
Per Jessen wrote: pan wrote: Urgh ! What do I tell them? How about what you started with here: The information and support of php on windows is not as good. Overcoming resistance to open source software that runs on windows is easy. Overcoming the belief that it's a windows world is more difficult. I can show the values of php through the point of view windows offers. Getting phbs to look at non-MS OSs is not easy. It's a matter of one step at a time and choose your battles. Cost/benefit analysis is not enough. phbs do not understand or trust non-MS OSs. They do trust results and as long as win versions of php are available and well maintained I've got plenty to show them. What they know is that the pecl4windows website doesn't exist anymore. They know no new extension package has been offered. They believe new extensions, whether beta or not, are not likely to become available. They know that 1st quarter 2009 was to see windows.php.net be ready. They think delays == vaporware. They also believe that there is indifference (if not outright hostility) to php/win in the php developer community. Personally, I could care less about further entrenchment of windows in the business world. I'd like to see MS disappear. Unfortunately, these issues are real. If the point is to alienate businesses with a who cares about windows attitude, then why bother with win-php at all? If there is merit to introducing open source to current windows users, then why make it difficult to do so? Just looking to make life easier. Don't blame me for the attitudes of those who pay me. (And, no - compiling extensions is not an option). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: RFC/Survey for Our Newer Folks (Including Lurkers)
Daniel P. Brown wrote: What I would like to know is how you found out about this list. Hi, I've been using php in a unix enviroment from the beginning and always found sufficient and useful information without using news.php.net . Recently I've begun maintaining a mixed OS system and have a need to use php on windows (mostly to encourage the shop to move everything off windows) . The information and support of php on windows is not as good. Thus, I sought more sources and decided to use news.php.net. Not much for the MS platform and I have no answer to the owners when they suggest getting rid of all the freebsd/apache/php/mysql boxes. They are aware of all the pecl extensions and also aware that the windows.php.net site has not yet supported binary extension builds. Urgh ! What do I tell them? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP 5.3.0 Released!
Lukas Kahwe Smith wrote: Hello! The PHP Development Team would like to announce the immediate release of PHP 5.3.0. This release is a major improvement in the 5.X series, which includes a large number of new features and bug fixes. Release Announcement: http://www.php.net/release/5_3_0.php Downloads:http://php.net/downloads.php#v5.3.0 Changelog:http://www.php.net/ChangeLog-5.php#5.3.0 regards, Johannes and Lukas Great ! The downloads page is devoid of any note in re pRCL binaries for Windows. windows.php.net doesn't say anything either of which pre-existing PECL binaries will work with 5_3. Is the 5_2_6 set of PECL binaries compatible with 5_3 ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Graphing Libraries...?
li...@mgreg.com wrote in message news:4fcc2030-9483-49d9-962c-1849a0987...@mgreg.com... | Hi All, | | I'm currently looking for a quality (preferably open source) PHP | graphing library that will allow me to create various graphs and plot | points. I've seen several that do some amazing things, but cost a | fortune -- others are either limited, lack documentation, or don't | allow plotting of points for multiple entities within the same graph. | | Can anyone make any quality suggestions? | | Best, | Michael http://www.celeste.cn/PHP-GNUPlot/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] pecl4win - any updates?
Chris dmag...@gmail.com wrote in message news:496a6f34.1080...@gmail.com... pan wrote: Has there been any progress reinstating pecl packages for windows? per the comment on php.net, join the Windows Internals list (or perhaps the Windows PHP users list might have some info). Thanks for the response. I already read all the php lists and check the web sites often. That's why I threw out a general question to elicit information. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] pecl4win - any updates?
Has there been any progress reinstating pecl packages for windows? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: [PHP] exec() Error
use wget exec(wget http://www.mysite.com/calculate.php;); Only execute the php programe from web exec(/usr/bin/php /.../calculate.php) 2008/6/27 Boyd, Todd M. [EMAIL PROTECTED]: -Original Message- From: Wei, Alice J. [mailto:[EMAIL PROTECTED] Sent: Thursday, June 26, 2008 7:50 AM To: Boyd, Todd M.; php-general@lists.php.net Subject: RE: Re: [PHP] exec() Error Hi, Todd: It looks like I have some other errors in my Perl code, and I got it fixed, switched the permission to 755, and made attempts to call it using cURL through my working PHP script. Here is the code: // create a new cURL resource $ch = curl_init(); // set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, http://192.168.10.63/total.cgi;); curl_setopt($ch, CURLOPT_HEADER, false); // grab URL and pass it to the browser curl_exec($ch); // close cURL resource, and free up system resources curl_close($ch); This time, I do not get the script output from the script in total.cgi, but I got Forbidden You don't have permission to access /total.cgi on this server. I have switched the permission to both scripts at both servers. Is there something wrong I have done here? Alice, I do not program in Perl, nor do I use CGI often enough to help you much here. However, it looks to me like it's a webserver issue, and has nothing to do with your code itself. Whatever CGI module is being used must probably be told that total.cgi needs granular permissions. Your web administrator will be able to help you much more than I can at this point. HTH, Todd Boyd Web Programmer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- 潘治岐 手机: 13621265301 Email: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED]
[PHP] Exceptions
Peeps, I'm having an issue where throwing Exceptions are displaying a blank page even though the Exception is being caught in a try...catch statement. This is happening on our production server where warnings, errors, exceptions, etc. are not to be displayed to the user. The assumption is that even though an Exception is being thrown it should be caught rather than displaying a blank page. Is there a specific configuration variable that needs to be set in php.ini to allow warnings to not be displayed but Exceptions to still be caught? Or is this just a bug? Here is some code that replicates the issue: try { closeCallTracker($appId, $salesRepId); } catch (Exception $e) { // No need to display anything to user if call tracker is not closed } function closeCallTracker($appId, $salesRepId) { // Some code here... // A pretty near example of why the Exception is being thrown in our system if ($callTrackerAlreadyClosed) { throw new Exception('Can not close a call tracker that has already been closed.'); } } I'm expecting the program to continue as normal as the Exception has been caught appropriately... but instead this code is displaying a blank page. We're using PHP: 5.1.2 on SuSe This is really a bizarre issue and any help would be greatly appreciated. I've searched PHP.net and Google far too long on this issue. Thank you in advance. -ec _ Learn.Laugh.Share. Reallivemoms is right place! http://www.reallivemoms.com?ocid=TXT_TAGHMloc=us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Exceptions
Nathan, I was hoping for a bug! I'll take a deeper look at the ini. More research is needed, me thinks. It's become apparent that throwing an Exception for this particular case doesn't really make sense. I'll just return early rather than throwing an exception. The logging suggestion is a great idea, but not realistic given the amount of times this function is called. Thank you for your help! I'll update the list with my findings. -ec From: Nathan Nobbe [EMAIL PROTECTED] To: Peter Pan [EMAIL PROTECTED] CC: php-general@lists.php.net Subject: Re: [PHP] Exceptions Date: Thu, 9 Aug 2007 13:00:51 -0400 Peter, you are doing something called swallowing the exception. it may make sense for your application to continue processing if the closeCallTracker method throws an error, but at a minimum you should log the details of the exception so that you know why its occurring; something like: try { closeCallTracker($appId, $salesRepId); } catch (Exception $e) { // No need to display anything to user if call tracker is not closed MyPHPLog::logMsg($e-getMessage()); } also, i would assume processing does continue after you swallow the exception. in order to determine why a blank page is displaying you should follow the logic in your application to the point where it sends html to the client browser during a case where the closeCallTracker() method throws an error. -nathan On 8/9/07, Peter Pan [EMAIL PROTECTED] wrote: Peeps, I'm having an issue where throwing Exceptions are displaying a blank page even though the Exception is being caught in a try...catch statement. This is happening on our production server where warnings, errors, exceptions, etc. are not to be displayed to the user. The assumption is that even though an Exception is being thrown it should be caught rather than displaying a blank page. Is there a specific configuration variable that needs to be set in php.ini to allow warnings to not be displayed but Exceptions to still be caught? Or is this just a bug? Here is some code that replicates the issue: try { closeCallTracker($appId, $salesRepId); } catch (Exception $e) { // No need to display anything to user if call tracker is not closed } function closeCallTracker($appId, $salesRepId) { // Some code here... // A pretty near example of why the Exception is being thrown in our system if ($callTrackerAlreadyClosed) { throw new Exception('Can not close a call tracker that has already been closed.'); } } I'm expecting the program to continue as normal as the Exception has been caught appropriately... but instead this code is displaying a blank page. We're using PHP: 5.1.2 on SuSe This is really a bizarre issue and any help would be greatly appreciated. I've searched PHP.net and Google far too long on this issue. Thank you in advance. -ec _ Learn.Laugh.Share. Reallivemoms is right place! http://www.reallivemoms.com?ocid=TXT_TAGHMloc=us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Messenger Café open for fun 24/7. Hot games, cool activities served daily. Visit now. http://cafemessenger.com?ocid=TXT_TAGHM_AugHMtagline -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cache
The problem is that I don't know how to automaticly decide when it is the right moment to update the cache and this is very important. I get some data from a database and the PHP program doesn't know when the database gets updated by another program, so it cannot create the cache for that page immediately. What provides the new data? Can you run a html update from whatever is supplying the new data? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP
Dear Sir/Madam, I would like to make a page on which people may add records to a table and view them (As my web server does not support MYSQL, I may have to do it on text files). I would also like to sort them by descending order of time. Can you please tell me which functions are available for the following items I want to do? If possible, can you write a sample code for me? Thank you for your time and attention. *Date / Time *Name *E-mail (Check them too please) *Company *Vehicle *Route (Original) *Route (Now on) *Notes Yours faithfully, Cheung Pui Pan
[PHP] A binary compatibility alternative to mod_fastcgi
Hi, guys http://fastcgi.coremail.cn, I hope you like it... Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] virtual domain own php.ini
Robby Russell [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Trying to use own php.ini file (rather than the one that the webserver sees by default) for a web site (on a box that has many websites that utilize the other) and used the following instructions, but it doesn't seem to notice my own php.ini file. When the PHP interpreter starts up, it behaves according to settings specified in any availabe php.ini file. The Web server will look for this file in the following locations and in the following order: 1. The directory from which the PHP script was called 2. The root of your Web directory 3. The Web server's default php.ini Any thoughts? rtfm on ini_set() -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] virtual domain own php.ini
Richard Davey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello pan, Thursday, April 22, 2004, 8:19:39 PM, you wrote: p rtfm on ini_set() What on earth has ini_set() got to do with the web server not picking up the alternative php.ini file located in the web root? Sure it will allow you to change *some* of the ini variables, but that wasn't even the original issue I don't believe. virtual on most servers ini_set will be the best you can hope for security settings won't allow alternative php.ini file reads that's why -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] virtual domain own php.ini
John Nichel [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] pan wrote: Robby Russell [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Trying to use own php.ini file (rather than the one that the webserver sees by default) for a web site (on a box that has many websites that utilize the other) and used the following instructions, but it doesn't seem to notice my own php.ini file. When the PHP interpreter starts up, it behaves according to settings specified in any availabe php.ini file. The Web server will look for this file in the following locations and in the following order: 1. The directory from which the PHP script was called 2. The root of your Web directory 3. The Web server's default php.ini Any thoughts? rtfm on ini_set() That's not going to help the OP load a seperate ini file for virtual domains. ini_set() is good if you only need to change a few settings, but it would be a pain to set all the ini settings (not to mention that I don't think ini_set() will change all the ini settings). OP is on a virtual server real world experience says ini_set is going to be what you can do sorry for being cryptic and abrupt, but short answer seemed best -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] virtual domain own php.ini
Rick Fletcher [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] on most servers ini_set will be the best you can hope for security settings won't allow alternative php.ini file reads If we're talking about Apache, you can place php config commands in an .htaccess or httpd.conf file. Those files can easily be associated with a particular VirtualHost. Check out: http://www.php.net/configuration.changes for more info. yes, of course, but OP probably has as much access to this as custom php.ini -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[4]: [PHP] virtual domain own php.ini
Richard Davey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello pan, Thursday, April 22, 2004, 8:36:51 PM, you wrote: p on most servers ini_set will be the best you can hope for p security settings won't allow alternative php.ini file reads p that's why Perhaps it would have been more useful to state this in the original post. OP did say virtual I, as is my great fault, assumed experience and skipped a step or two in my reply to OP. Real world tends to do that to me, virtual even more so. regards, Pan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re:[PHP] Bookmark server
Chris W [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am planning on writing a bookmark server in php. The idea is I will have a database that stores all my internet favorites on a web server some where, so if I am doing some web browsing away from home and find a site I want to save, I can go to my bookmark server and save the url there. Most browsers have a mail link feature. Parse mail sent to a particular email address at your bookmark server. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] webppliance include - aaargh!
Anyone know how to get include to work with a webppliance web site? If (web-server:document-root = x){ switch(include-dir){ case 'below document-root: !---php.include works--- break; case 'above document-root': !---php-include failes--- break; default: !---intense frustration ensues--- } } ini_set('include_path') works except for directories above the virtual server document rooot of course keeping .php includes with sensitive data in a directory inaccesible to browsers is a best-practice issue - it doesn't seem possible within a webpplicance controlled virtual web server environment (unless someone has figured out how) Pan ' peeve:clients who buy web hosting accounts on MS2000/IIS5.0 instead of a nice *nix server' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Does remote file(image) exist ?
reply to both mail list and O.P. - Original Message - From: Stephen of Blank Canvas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 18, 2003 08:42 Subject: [PHP] Does remote file(image) exist ? Hi Everyone, Sorry I have no example code at all for this at all, I know some people don't like that but I just do not know where to start so am asking for help. I have a system there users can put a picture of themselves by method of URL in a MySQL field, however many of this image URL's do not work as users type them in wrong. So what I wanted to do was find a way to test to see if the image can be accessed, then if not display a default image. Hope that makes sense, anyone already done something like this and want to share code :-) Stephen Use curl, or write a script that executes a telnet session that issues HEAD commands The key command is the HEAD path-to-resource HTTP/1.0 Most servers are HTTP/1.1, but using 1.0 keeps backward compatibility. The path-to-resource is whatever the path is that would appear after the domain in the url. You would want to split the submitted URL into domain and path. You issue the telnet to $domain at port 80 telnet $domain 80 You issue the HEAD command HEAD /path-to-resource HTTP/1.0 What follows is the servers response. I've included live examples of both a 200 response (resource exists) and a 404 response (resource does not exist). Parse the responses and you will know that something exists or not. # telnet $domain 80 Trying {ip address}... Connected to $domain Escape character is '^]'. HEAD /pov/box.png HTTP/1.0 HTTP/1.1 200 OK Date: Sat, 18 Jan 2003 17:30:12 GMT Server: Apache/1.3.27 (Unix) PHP/4.2.3 Last-Modified: Fri, 13 Dec 2002 23:29:56 GMT ETag: 32e005-8c1d-3dfa6d74 Accept-Ranges: bytes Content-Length: 35869 Connection: close Content-Type: image/png Connection closed by foreign host. # telnet $domain 80 Trying {ip address}... Connected to $domain Escape character is '^]'. HEAD /pov/box1.png HTTP/1.0 HTTP/1.1 404 Not Found Date: Sat, 18 Jan 2003 17:30:58 GMT Server: Apache/1.3.27 (Unix) PHP/4.2.3 Connection: close Content-Type: text/html; charset=iso-8859-1 Connection closed by foreign host. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Elliptic curve cryptology
i cant find any example about Elliptic curve cryptology.. do you have any example? i cant understand without an example :) Ten seconds of googling produced these URLs. http://www.certicom.com/resources/w_papers/w_papers.html http://www.certicom.com/resources/ecc_tutorial/ecc_tutorial.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Image resolution and php
I need to get resolution information (dpi) from any image of jpg, gif or png formats. It would be sufficient to obtain pixel and inches dimension of such images and calculate resolution by simply dividing but I haven't found any function that gets effective dimensions in inches. As Jome wrote - getimagesize. Those image formats don't carry any printing format information. The number of inches an image will be depends on what is doing the presentation. You need to calculate your own inches depending on your own printing or display environment. If you want to learn about image file formats. http://www.wotsit.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php