Re: [PHP] Re: phpsadness - P.C. shmee seee.
On 6 June 2011 01:44, Robert Cummings wrote: > On 11-06-05 07:28 PM, Richard Quadling wrote: >> There is another approach. Regressive Enhancement. >> >> Essentially, create your site with all the bells and whistles enabled. >> Make full use of all / any standards compliant feature. >> >> For browsers not capable of supporting that, use emulation techniques. >> >> Sitepoint have a blog about this technique : >> >> http://blogs.sitepoint.com/regressive-enhancement-with-modernizr-and-yepnope/ > > From my cursory read... regressive enhancement would need to rely on > progressive enhancement to work :) If there's no JavaScript to do the > lifting, then how can you regress? > > An interesting read all the same. It's kind of like the compatibility layer > PEAR releases for older versions of PHP so they have access to newer > functions and stuff but implemented in PHP rather than C. > > Cheers, > Rob. If you were to start with a full bells and whistles HTML5/CSS3 site, then you would already have an issue with very very old and / or non visual browsers I think. If they don't have JS, then the level of FOOBAR is going to be even greater. So. Interesting but maybe useless. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: phpsadness - P.C. shmee seee.
On 11-06-06 05:18 AM, Richard Quadling wrote: On 6 June 2011 01:44, Robert Cummings wrote: On 11-06-05 07:28 PM, Richard Quadling wrote: There is another approach. Regressive Enhancement. Essentially, create your site with all the bells and whistles enabled. Make full use of all / any standards compliant feature. For browsers not capable of supporting that, use emulation techniques. Sitepoint have a blog about this technique : http://blogs.sitepoint.com/regressive-enhancement-with-modernizr-and-yepnope/ From my cursory read... regressive enhancement would need to rely on progressive enhancement to work :) If there's no JavaScript to do the lifting, then how can you regress? An interesting read all the same. It's kind of like the compatibility layer PEAR releases for older versions of PHP so they have access to newer functions and stuff but implemented in PHP rather than C. Cheers, Rob. If you were to start with a full bells and whistles HTML5/CSS3 site, then you would already have an issue with very very old and / or non visual browsers I think. If they don't have JS, then the level of FOOBAR is going to be even greater. So. Interesting but maybe useless. But it's an established fact that websites can be presented without JavaScript. It may look old-fashioned, but everyone can view it. Even in Netscape 4 a site can be readable (even if ugly). Exclusively require JavaScript to view the content and this is no longer the case. That's the problem with regressive enhancement, it requires feature X to be enabled to facilitate the regression... which isn't very regressive. If it can be viewed in lynx then there's a good chance it can be viewed/read aloud by anything. Yes, you might not be able to view some HTML 5 canvas application, but there's nothing preventing you from having a paragraph with a brief description and a link to an image which is then progressively enhanced to the full blown HTML 5 canvas version. I think regressive enhancement is a good idea, just that one shouldn't throw out progressive enhancement when ideally (yes I'm an idealist :) the two would work best together... - vanilla website - progressively enhance - regressively enhance where feature Y can be implemented given that feature X exists. Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP download page blocking other HTTP requests
I have a file download 'guardian' page which does something like this: $size = filesize($path); $fi = @finfo_file($path, FILEINFO_MIME_TYPE); @header('Content-type: ' . $fi); @header('Content-Length: ' . $size); @readfile($path); exit; ($path is derived from parameters in the request, including checks for nasties and some access control checks in the system) When a link is clicked which points to this script, the file is downloaded (well and good...), but in Firefox (3.x, 4.x at least), it seems to block any further interaction with the browser until the download is complete - some of the files are 60Gb and the server is on a 2mbit line, so it can take some time to download. Is there something on the Apache/PHP end that might be causing this blocking? (Apache 2.2.10, PHP 5.2.14) I suspect not, since using Chrome as the browser doesn't appear to have the same problem, but I wondered whether there was some way that FF was handling the headers might be causing it. I can't seem to devise a suitable Google search to get any mention of similar behaviour so I thought I'd ask some experts :) -- Peter Ford, Developer phone: 01580 89 fax: 01580 893399 Justcroft International Ltd. www.justcroft.com Justcroft House, High Street, Staplehurst, Kent TN12 0AH United Kingdom Registered in England and Wales: 2297906 Registered office: Stag Gates House, 63/64 The Avenue, Southampton SO17 1XS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: phpsadness - P.C. shmee seee.
At 8:36 AM -0400 6/6/11, Robert Cummings wrote: On 11-06-06 05:18 AM, Richard Quadling wrote: On 6 June 2011 01:44, Robert Cummings wrote: On 11-06-05 07:28 PM, Richard Quadling wrote: There is another approach. Regressive Enhancement. Essentially, create your site with all the bells and whistles enabled. Make full use of all / any standards compliant feature. For browsers not capable of supporting that, use emulation techniques. Sitepoint have a blog about this technique : http://blogs.sitepoint.com/regressive-enhancement-with-modernizr-and-yepnope/ From my cursory read... regressive enhancement would need to rely on progressive enhancement to work :) If there's no JavaScript to do the lifting, then how can you regress? An interesting read all the same. It's kind of like the compatibility layer PEAR releases for older versions of PHP so they have access to newer functions and stuff but implemented in PHP rather than C. Cheers, Rob. If you were to start with a full bells and whistles HTML5/CSS3 site, then you would already have an issue with very very old and / or non visual browsers I think. If they don't have JS, then the level of FOOBAR is going to be even greater. So. Interesting but maybe useless. But it's an established fact that websites can be presented without JavaScript. It may look old-fashioned, but everyone can view it. Even in Netscape 4 a site can be readable (even if ugly). Exclusively require JavaScript to view the content and this is no longer the case. That's the problem with regressive enhancement, it requires feature X to be enabled to facilitate the regression... which isn't very regressive. If it can be viewed in lynx then there's a good chance it can be viewed/read aloud by anything. Yes, you might not be able to view some HTML 5 canvas application, but there's nothing preventing you from having a paragraph with a brief description and a link to an image which is then progressively enhanced to the full blown HTML 5 canvas version. I think regressive enhancement is a good idea, just that one shouldn't throw out progressive enhancement when ideally (yes I'm an idealist :) the two would work best together... - vanilla website - progressively enhance - regressively enhance where feature Y can be implemented given that feature X exists. Cheers, Rob. To all: +1 Rob is right-on (as usual, he's annoying that way). Start basic and progressively enhance. If you do it the other way, chances are that you'll screw up along the way. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: phpsadness - P.C. shmee seee.
At 10:18 AM +0100 6/6/11, Richard Quadling wrote: If you were to start with a full bells and whistles HTML5/CSS3 site, then you would already have an issue with very very old and / or non visual browsers I think. If they don't have JS, then the level of FOOBAR is going to be even greater. So. Interesting but maybe useless. Richard Quadling That's why we get paid the big bucks. However, I start with the basics and then add-on. From my perspective and practice, the main point is to get what you got to say out there and then make it better for those who can support it. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] CodeBubbles for Eclipse Beta available!
While not PHP specifically, this is a plugin for Eclipse that is an entirely new paradigm in coding IDE and I've been watching & waiting for it for over a year now. I post it here because [a] it's pretty much the coolest thing since the invention of the IDE itself. [b] it's real and actually not vaporware [c] it's NOW open sourced!! [d] I'm hoping someone will take the reins and start a PHP version Code Bubbles Beta generally available for Java on top of Eclipse!! http://www.cs.brown.edu/people/spr/codebubbles/ More info here: http://www.andrewbragdon.com/codebubbles_site.asp http://lambda-the-ultimate.org/node/3854 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP download page blocking other HTTP requests
On 6 June 2011 13:55, Pete Ford wrote: > Is there something on the Apache/PHP end that might be causing this > blocking? (Apache 2.2.10, PHP 5.2.14) The browser and / or OS may be obeying the settings about the number of simultaneous connections per host. http://support.microsoft.com/kb/183110 / http://www.ietf.org/rfc/rfc2616.txt 8.1.4 Practical Considerations ... " Clients that use persistent connections SHOULD limit the number of simultaneous connections that they maintain to a given server. A single-user client SHOULD NOT maintain more than 2 connections with any server or proxy. A proxy SHOULD use up to 2*N connections to another server or proxy, where N is the number of simultaneously active users. These guidelines are intended to improve HTTP response times and avoid congestion." Also, (from googling) http://forums.serverbeach.com/showthread.php?6192-Max-Concurrent-Connections-Per-Host, mod_throttle and/or mod_bandwidth may be capable of restricting the number and/or speed of connections. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Going crazy with include & require not working
Here's my code: error_reporting(E_ALL); require_once('/var/www/mysite/includes/fpdi.php'); require_once('/var/www/mysite/includes/fpdf.php'); I have used fpdf many times and never had a problem with it. I've double checked my pathnames until I'm blue in the face. But for some reason, the script just STOPS at these lines. I've tried include, include_once, require, require_once and no error gets reported, it just stops. Help? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Going crazy with include & require not working
On Mon, Jun 6, 2011 at 5:50 PM, Brian Dunning wrote: > Here's my code: > > error_reporting(E_ALL); > require_once('/var/www/mysite/includes/fpdi.php'); > require_once('/var/www/mysite/includes/fpdf.php'); try adding this too: ini_set('display_errors', 1); I've realized I've had to do that before on many systems because it's not enabled random note: you don't need parens on require / include stuff since they're not actually functions -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help needed with php.ini
I remember that there's 2 php.ini in Fedora, one is for SAPI like apache or other CGIServer, and another is for CLI. Can you confirm that you edited a right config file? On Mon, Jun 6, 2011 at 4:55 AM, Camilo Sperberg wrote: > On 05-06-2011, at 10:31, Adam Tong wrote: > > > Hi, > > > > I can't set correctly the error display and reporting properties. I > > don't know what i'm doing wrong. > > > > Here is the section that i modified in php.ini: > > - > > display_errors = On > > ; Default Value: On > > ; Development Value: On > > ; Production Value: Off > > > > display_startup_errors = On > > ; Default Value: Off > > ; Development Value: On > > ; Production Value: Off > > > > error_reporting = E_ALL | E_STRICT > > ; Default Value: E_ALL & ~E_NOTICE > > ; Development Value: E_ALL | E_STRICT > > ; Production Value: E_ALL & ~E_DEPRECATED > > > > > > And here is the output of phpinfo(): > > - > > display_errorsOffOff > > display_startup_errorsOffOff > > doc_rootno valueno value > > docref_extno valueno value > > docref_rootno valueno value > > enable_dlOffOff > > error_append_stringno valueno value > > error_logno valueno value > > error_prepend_stringno valueno value > > error_reporting22527 22527 > > - > > > > I'm using a default installation (using yum) of php on Fedora14. This > > is my development environment, and want to see all the errors on > > standard output. > > > > Thank you > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > Have you modified the example values instead of the ones mid-way php.ini? > If so, scroll down to check. The latest settings should override the > previous one. > > Have you restarted apache with service httpd restart or /etc/init.d/httpd > restart? (or apachectl restart) > > In your php script or htaccess file, do you override those values? > > Sent from my iPhone 5 Beta [Confidential use only] > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Powered By Francis™. Welcome to my website: http://www.francistm.com Rewrite to francis...@gmail.com please.
[PHP] Can't use class "'DOMDocument"
Hi, When I try using DOMDocument I get the following error: Fatal error: Class 'DOMDocument' not found in ... I guess something has to be fixed in my php.ini? Here is my php version: # php -version PHP 5.3.6 (cli) (built: Mar 17 2011 20:58:15) Copyright (c) 1997-2011 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies I also noticed when I click reply in gmail it does not reply to the list. Sorry for that inconvenience for poeple who tried to help me while the previous issue was already resolved. Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Going crazy with include & require not working
At 5:50 PM -0700 6/6/11, Brian Dunning wrote: Here's my code: error_reporting(E_ALL); require_once('/var/www/mysite/includes/fpdi.php'); require_once('/var/www/mysite/includes/fpdf.php'); I have used fpdf many times and never had a problem with it. I've double checked my pathnames until I'm blue in the face. But for some reason, the script just STOPS at these lines. I've tried include, include_once, require, require_once and no error gets reported, it just stops. Help? -- Try placing at the top of the include: echo('fdi'); If you see it, then it's working up to there. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't use class "'DOMDocument"
On 6/6/2011 6:49 PM, Adam Tong wrote: Hi, When I try using DOMDocument I get the following error: Fatal error: Class 'DOMDocument' not found in ... I guess something has to be fixed in my php.ini? Here is my php version: # php -version PHP 5.3.6 (cli) (built: Mar 17 2011 20:58:15) Copyright (c) 1997-2011 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies I also noticed when I click reply in gmail it does not reply to the list. Sorry for that inconvenience for poeple who tried to help me while the previous issue was already resolved. Thank you http://us.php.net/manual/en/dom.setup.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php hide menu
I have three drop down menus in my form. How do I make it so the second and third menus are only visible once the prior menu was selected? Below is the first two drop down menus. Thanks in advance. // Generating first menu using array. $markets = array('MCI' => 'Kansas City', 'STL' => 'ST. Louis', 'ICT' => 'Wichita', 'OMA' => 'Omaha', 'LIN' => 'Lincoln'); echo "Choose Market\n"; foreach ($markets as $key => $market) { echo "$market\n"; } echo ""; // This will evaluate to TRUE so the text will be printed. if (isset($markets)) { echo "This var is set so I will print."; } // Then, later, validating the menu if (! array_key_exists($_POST['Market'], $choices)) { echo "You must select a market."; } $query="SELECT cell_sect FROM sector_list order by cell_sect"; $result = mysql_query ($query); echo "Choose Cell Sector"; // printing the list box select command while($cellSect=mysql_fetch_array($result)){//Array or records stored in $cellSect echo "$cellSect[cell_sect]"; /* Option values are added by looping through the array */ } echo "";// Closing of list box // This will evaluate to TRUE so the text will be printed. if (isset($cellSect)) { echo "This var is set so I will print."; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php hide menu
Sounds like a good job for client side JavaScript. Regards, -Josh Joshua Kehn | josh.k...@gmail.com http://joshuakehn.com On Jun 7, 2011, at 12:40 AM, Chris Stinemetz wrote: > I have three drop down menus in my form. How do I make it so the > second and third menus are only visible once the prior menu was > selected? > > Below is the first two drop down menus. > > Thanks in advance. > > // Generating first menu using array. > $markets = array('MCI' => 'Kansas City', > 'STL' => 'ST. Louis', > 'ICT' => 'Wichita', > 'OMA' => 'Omaha', > 'LIN' => 'Lincoln'); > echo "Choose Market\n"; > foreach ($markets as $key => $market) { > echo "$market\n"; > } > echo ""; > > // This will evaluate to TRUE so the text will be printed. > if (isset($markets)) { >echo "This var is set so I will print."; > } > > > > // Then, later, validating the menu > if (! array_key_exists($_POST['Market'], $choices)) { > echo "You must select a market."; > } > > $query="SELECT cell_sect FROM sector_list order by cell_sect"; > > $result = mysql_query ($query); > echo "Choose Cell Sector"; > // printing the list box select command > > while($cellSect=mysql_fetch_array($result)){//Array or records stored > in $cellSect > echo "$cellSect[cell_sect]"; > /* Option values are added by looping through the array */ > } > echo "";// Closing of list box > > // This will evaluate to TRUE so the text will be printed. > if (isset($cellSect)) { >echo "This var is set so I will print."; > } > > -- > 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