Re: [PHP] showing source
On Fri, 2007-05-18 at 01:50 -0400, James Lockie wrote: This almost works but all my and are replaced with . Rather use named entities, www.php.net/htmlentities --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] showing source
This almost works but all my and are replaced with . // open this file to show the source if (($fh = fopen( __FILE__, 'r' )) === FALSE){ die ('Failed to open source file (' . $_FILE_ . ') for reading!'); } else { $tags = array( , ); $safe_tags = array( \\, \\ ); print pre\n; // read the file line by line while (! feof( $fh )) { $currentLine = fgets( $fh, 255 ); $noTags = str_replace( $tags, $safeTags, $currentLine ); print $noTags; } fclose( $fh ); print /pre\n; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download speed limit
Rangel Reale wrote: Yes, I tried, this works, but I would like to control the send speed more, preferably via URL, as this programs will only be accessed by my desktop application, and I have full control of them. ok if its only your application thats going to use this data, you could 1. setup a ftp server that does bandwidth limiting. Then your application downloads the file via ftp. 2. rsync has a bandwidth limiting option aswell. But, if there is no other way, this will be the way! - Original Message - From: Greg Donald [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Thursday, May 17, 2007 6:55 PM Subject: Re: [PHP] Download speed limit On 5/17/07, Rangel Reale [EMAIL PROTECTED] wrote: Hmm that apache module isn't quite what I need, it just accepts or refuse connections based on bandwidth usage, it does not throttle the connection. Have you tried something like this? ?php $file = '/opt/local/apache2/htdocs/test_file.txt'; set_time_limit( 0 ); $handle = fopen( $file, 'rb' ); if( !$handle ) { die( 'fopen() failed' ); } header( 'Content-Type: text/plain' ); header( 'Content-Length: ' . filesize( $handle ) ); header('Content-Disposition: attachment; filename=' . basename( $file ) . '' ); while( ( !feof( $handle ) ) ( connection_status() == 0 ) ) { print( fread( $handle, 1024 * 8 ) ); sleep( 1 ); flush(); } fclose( $handle ); I get right at 8K/sec using that. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.7.0/803 - Release Date: 13/5/2007 12:17 -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] IE7 = end tag?
-Original Message- From: Jim Moseby [mailto:[EMAIL PROTECTED] Sent: 17 May 2007 21:29 To: 'rauhspund'; php-general@lists.php.net Subject: RE: [PHP] IE7 = end tag? #-- .meta info include(../plugins/lib/pluginmetadata.php); $_cached = !empty($_POST); ewiki_pmd($_cached); #-- defaults for the separately handled database settings in $db[] if (!($db = $_REQUEST[db])) { $db = array(type = NULL, server = localhost, dbname = test, table = ewiki, dir = /tmp, dba = /tmp/wiki.dbm, ); } I don't know if this will fix your problem, but you have an extraneous comma after'dba = /tmp/wiki.dbm,'. Also try enclosing NULL in quotes and see if your problem goes away. JM The extra comma at the end of the array definition is still valid syntax in PHP. Try for yourself: php -r '$a = array(a = foo, b = bar,); print_r($a);' NULL is a special type that means just that: http://uk.php.net/manual/en/language.types.null.php Enclosing it in quotes will define it as a string, something entirely different. The problem described is not to do with the PHP code supplied, but the setup of the webserver. As Stut correctly said, if PHP code is getting to the browser then webserver is not configured correctly. rauhspund, you are actually using a webserver with PHP aren't you and not just opening the PHP file directly with IE? Edward -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Tipos about which CMS use
Hi there, I'd like to replace my 'intranet' site with a CMS system to speed up the edit process. Some of my requirements are : - written in PHP :) - mysql based - documented/'well structured' - to allow development of customizations - ability to define which pages or sections are public and which are private (and in this case which users can access) - use AJAX (not mandatory) but since some access to the page will come from dial-up to reduce the need to transfer entire html just to update a search or list contents.. thanks http://opensourcecms.com/ Edward -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Browser Cache and PHP Namespace
Greetings, I had some problems with broser caching behaviors and php name space collision. I do lot of googling and try to figure what happened and I failed to figure. So I need help, Here Details 1-) Browser Cache Beahviors You know the back button problem. I search the net and found some header modifications to fix this problems. Like this ini_set('session.cache_limiter', 'private'); And this will lead the some caching issues. Time to time browser may forgot or misbehave with javascripts. Is there any suggestion for this. When visitor hit back button and previous page has retun data from post variables. 1-) Re posting without any message 2-) No content cache 2-) The another problem was developing aproach. Currently I'm working on large CMS thingy. My project be able to include php files anytime anywhere and unlimited amount. So time to time variable names will collide and it was so hard to detect. Is there any suggestion to avoid these kind of collisions. Thanks Sancar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Browser Cache and PHP Namespace
Sancar Saran wrote: Greetings, I had some problems with broser caching behaviors and php name space collision. I do lot of googling and try to figure what happened and I failed to figure. So I need help, Here Details 1-) Browser Cache Beahviors You know the back button problem. I search the net and found some header modifications to fix this problems. Like this ini_set('session.cache_limiter', 'private'); that's not a header, it's a php.ini setting. Just not-picking though, don't have an answer to this as I've personally never had problems with caching (then again, I also rarely use sessions) And this will lead the some caching issues. Time to time browser may forgot or misbehave with javascripts. Is there any suggestion for this. When visitor hit back button and previous page has retun data from post variables. 1-) Re posting without any message 2-) No content cache 2-) The another problem was developing aproach. Currently I'm working on large CMS thingy. My project be able to include php files anytime anywhere and unlimited amount. So time to time variable names will collide and it was so hard to detect. Prefix your variables if they're important. You probably couldn't care less if variables like $i, $j, $k, etc. are overwritten, but variables holding important content for you should be secured by either storing them in a specific place you know to be safe, or by prefixing them. eg: $myApp_foo, $myAll_bar, etc. If anyone makes an include for you, they will be very unlikely to use such names there too. The other way, which I personally prefer is to put everything important and non-local (ie. isn't confined to that one file it's run in) in special purpose arrays: $SETTINGS[various names], $SELF[names], $MYAPP_SAFE[names] Is there any suggestion to avoid these kind of collisions. Thanks Sancar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Setting Up A Simple Shopping Cart
-Original Message- From: revDAVE [mailto:[EMAIL PROTECTED] Sent: 18 May 2007 01:33 To: php php Subject: Re: [PHP] Setting Up A Simple Shopping Cart On 5/17/2007 7:05 AM, revDAVE [EMAIL PROTECTED] wrote: Hello folks, I am a PHP NEWBIE. - I have the following three choices for shopping carts on my server: CubeCart OS Commerce Zen Cart Q: Does anybody have any preferences for creating a simple store? Both OS Commerce Zen Cart look pretty cool so far Does anyone have any preferences? Again, try some at http://opensourcecms.com/. DYOR people. Edward -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: showing source
Why don't you use: highlight_file(__FILE__) ? - tul James Lockie wrote: This almost works but all my and are replaced with . // open this file to show the source if (($fh = fopen( __FILE__, 'r' )) === FALSE){ die ('Failed to open source file (' . $_FILE_ . ') for reading!'); } else { $tags = array( , ); $safe_tags = array( \\, \\ ); print pre\n; // read the file line by line while (! feof( $fh )) { $currentLine = fgets( $fh, 255 ); $noTags = str_replace( $tags, $safeTags, $currentLine ); print $noTags; } fclose( $fh ); print /pre\n; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't link image directory?
On 5/18/07, Haig (Home) [EMAIL PROTECTED] wrote: Hi everyone, I have a simple script that scans a directory and will output a list of sub directories as a hyperlink. Script is working fine. Only problem I have is that if there is a subdirectory called Image, my script won't see it. If I rename that subdirectory to anything else, it will see it. If I use a standard href line to link that image subdirectory, that's fine but then it won't show up alphabetically when the other folders are linked. Any ideas? Haig We can't guess what you did wrong, show us relevant parts of your code. Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: showing source
Why don't you use: highlight_file(__FILE__) ? OMG I have been coding that thing for MONTHS now... just to get syntax highlighting for my tutorial blog... maybe I shouldn't write tutorials... maybe I should rather read them *g* Thanks for this short, but awesome answer :o) I wasn't the one asking the question, but nonetheless you have just wrecked my weekend :oP If I could kick my own rear end, I would do so´for the next two days... Cheers mate, and have a great weekend! Chris - tul James Lockie wrote: This almost works but all my and are replaced with . // open this file to show the source if (($fh = fopen( __FILE__, 'r' )) === FALSE){ die ('Failed to open source file (' . $_FILE_ . ') for reading!'); } else { $tags = array( , ); $safe_tags = array( \\, \\ ); print pre\n; // read the file line by line while (! feof( $fh )) { $currentLine = fgets( $fh, 255 ); $noTags = str_replace( $tags, $safeTags, $currentLine ); print $noTags; } fclose( $fh ); print /pre\n; } -- 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
[PHP] Re: showing source
yup, highlight_file($file_name) is your magical answer. http://ca.php.net/highlight_file Make sure this function will only access specific directories. -- itoctopus - http://www.itoctopus.com M.Sokolewicz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Why don't you use: highlight_file(__FILE__) ? - tul James Lockie wrote: This almost works but all my and are replaced with . // open this file to show the source if (($fh = fopen( __FILE__, 'r' )) === FALSE){ die ('Failed to open source file (' . $_FILE_ . ') for reading!'); } else { $tags = array( , ); $safe_tags = array( \\, \\ ); print pre\n; // read the file line by line while (! feof( $fh )) { $currentLine = fgets( $fh, 255 ); $noTags = str_replace( $tags, $safeTags, $currentLine ); print $noTags; } fclose( $fh ); print /pre\n; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] stay logged in for session
hey guys, i am trying to set up a session so that when a user logs in, they will stay logged in until they close their browser. i have the session set up, however i keep getting an error saying: The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. -- this is my code, any help plz. -- checklogin.php: ?php session_start(); //set session variables $_SESSION['txtSurname'] = $_REQUEST['txtSurname']; $_SESSION['txtPassword'] = $_REQUEST['txtPassword']; session_write_close(); include('includes/dbconnect.php'); $nextpage = $_REQUEST['np']; $profile = $_REQUEST['ob']; //Matching usernames and passwords $uname = $_REQUEST['txtSurname']; $pword = $_REQUEST['txtPassword']; $user = SELECT * FROM oldboys WHERE OBSURNAME=' . $uname . ' AND PWORD=' . $pword . '; $ResSql = mysql_query($user) ; //If any errors then print `em out if (!$ResSql) { echo(pError performing query: . mysql_error() . /p); exit(); } //if user does not exist if (mysql_num_rows($ResSql)==0) { echo 'Incorrect username or password have been specified.br'; echo 'a href=updlogin.phpClick here to Log In/a'; exit; } else { header(Location: . $nextpage . ?ob= . $_REQUEST['ob'] . uname= . $_REQUEST['txtSurname'] . pword= . $_REQUEST['txtPassword']); } ? verify.php: ?php session_start(); if(!isset($_SESSION['txtSurname']) !isset($_SESSION['txtPassword'])) { header(location:updlogin.php?np= . $_REQUEST['np'] . ob= . $_REQUEST['ob']); } else { header(location: . $nextpage . ?np= . $_REQUEST['np'] . ob= . $_REQUEST['ob']); } ? --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] stay logged in for session
-Original Message- From: Joshua [mailto:[EMAIL PROTECTED] Sent: 18 May 2007 11:43 To: PHP.net Subject: [PHP] stay logged in for session hey guys, i am trying to set up a session so that when a user logs in, they will stay logged in until they close their browser. i have the session set up, however i keep getting an error saying: The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. -- this is my code, any help plz. -- checklogin.php: ?php session_start(); //set session variables $_SESSION['txtSurname'] = $_REQUEST['txtSurname']; $_SESSION['txtPassword'] = $_REQUEST['txtPassword']; session_write_close(); include('includes/dbconnect.php'); $nextpage = $_REQUEST['np']; $profile = $_REQUEST['ob']; //Matching usernames and passwords $uname = $_REQUEST['txtSurname']; $pword = $_REQUEST['txtPassword']; $user = SELECT * FROM oldboys WHERE OBSURNAME=' . $uname . ' AND PWORD=' . $pword . '; $ResSql = mysql_query($user) ; //If any errors then print `em out if (!$ResSql) { echo(pError performing query: . mysql_error() . /p); exit(); } //if user does not exist if (mysql_num_rows($ResSql)==0) { echo 'Incorrect username or password have been specified.br'; echo 'a href=updlogin.phpClick here to Log In/a'; exit; } else { header(Location: . $nextpage . ?ob= . $_REQUEST['ob'] . uname= . $_REQUEST['txtSurname'] . pword= . $_REQUEST['txtPassword']); } ? verify.php: ?php session_start(); if(!isset($_SESSION['txtSurname']) !isset($_SESSION['txtPassword'])) { header(location:updlogin.php?np= . $_REQUEST['np'] . ob= . $_REQUEST['ob']); } else { header(location: . $nextpage . ?np= . $_REQUEST['np'] . ob= . $_REQUEST['ob']); } ? --- HTTP Location headers require the full hostname, i.e. header(Location: http://www.example.com/page_to/redirect/to.php;); As others on this list will say however, you don't have to use a full redirect. Just use different PHP includes. E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] stay logged in for session
2007. 05. 18, péntek keltezéssel 12.43-kor Joshua ezt írta: hey guys, i am trying to set up a session so that when a user logs in, they will stay logged in until they close their browser. i have the session set up, however i keep getting an error saying: The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. it might be because one of your pages redirects to another, then the other one redirects back... -- this is my code, any help plz. -- checklogin.php: ?php session_start(); //set session variables $_SESSION['txtSurname'] = $_REQUEST['txtSurname']; $_SESSION['txtPassword'] = $_REQUEST['txtPassword']; why are you using $_REQUEST? I usually prefer using $_GET and $_POST to avoid confusion session_write_close(); include('includes/dbconnect.php'); $nextpage = $_REQUEST['np']; $profile = $_REQUEST['ob']; //Matching usernames and passwords $uname = $_REQUEST['txtSurname']; $pword = $_REQUEST['txtPassword']; $user = SELECT * FROM oldboys WHERE OBSURNAME=' . $uname . ' AND PWORD=' . $pword . '; this is just the best way to let hackers do SQL injection on your site. check those values first, then escape them with mysql_real_escape_string and pass them to mysql only after it greets Zoltán Németh $ResSql = mysql_query($user) ; //If any errors then print `em out if (!$ResSql) { echo(pError performing query: . mysql_error() . /p); exit(); } //if user does not exist if (mysql_num_rows($ResSql)==0) { echo 'Incorrect username or password have been specified.br'; echo 'a href=updlogin.phpClick here to Log In/a'; exit; } else { header(Location: . $nextpage . ?ob= . $_REQUEST['ob'] . uname= . $_REQUEST['txtSurname'] . pword= . $_REQUEST['txtPassword']); } ? verify.php: ?php session_start(); if(!isset($_SESSION['txtSurname']) !isset($_SESSION['txtPassword'])) { header(location:updlogin.php?np= . $_REQUEST['np'] . ob= . $_REQUEST['ob']); } else { header(location: . $nextpage . ?np= . $_REQUEST['np'] . ob= . $_REQUEST['ob']); } ? --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] stay logged in for session
2007. 05. 18, péntek keltezéssel 11.53-kor Edward Kay ezt írta: -Original Message- From: Joshua [mailto:[EMAIL PROTECTED] Sent: 18 May 2007 11:43 To: PHP.net Subject: [PHP] stay logged in for session hey guys, i am trying to set up a session so that when a user logs in, they will stay logged in until they close their browser. i have the session set up, however i keep getting an error saying: The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. -- this is my code, any help plz. -- checklogin.php: ?php session_start(); //set session variables $_SESSION['txtSurname'] = $_REQUEST['txtSurname']; $_SESSION['txtPassword'] = $_REQUEST['txtPassword']; session_write_close(); include('includes/dbconnect.php'); $nextpage = $_REQUEST['np']; $profile = $_REQUEST['ob']; //Matching usernames and passwords $uname = $_REQUEST['txtSurname']; $pword = $_REQUEST['txtPassword']; $user = SELECT * FROM oldboys WHERE OBSURNAME=' . $uname . ' AND PWORD=' . $pword . '; $ResSql = mysql_query($user) ; //If any errors then print `em out if (!$ResSql) { echo(pError performing query: . mysql_error() . /p); exit(); } //if user does not exist if (mysql_num_rows($ResSql)==0) { echo 'Incorrect username or password have been specified.br'; echo 'a href=updlogin.phpClick here to Log In/a'; exit; } else { header(Location: . $nextpage . ?ob= . $_REQUEST['ob'] . uname= . $_REQUEST['txtSurname'] . pword= . $_REQUEST['txtPassword']); } ? verify.php: ?php session_start(); if(!isset($_SESSION['txtSurname']) !isset($_SESSION['txtPassword'])) { header(location:updlogin.php?np= . $_REQUEST['np'] . ob= . $_REQUEST['ob']); } else { header(location: . $nextpage . ?np= . $_REQUEST['np'] . ob= . $_REQUEST['ob']); } ? --- HTTP Location headers require the full hostname, i.e. header(Location: http://www.example.com/page_to/redirect/to.php;); that is true, but usually it works with relative url-s also greets Zoltán Németh As others on this list will say however, you don't have to use a full redirect. Just use different PHP includes. E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] stay logged in for session
-Original Message- From: Joshua [mailto:[EMAIL PROTECTED] Sent: 18 May 2007 12:09 To: Edward Kay Subject: RE: [PHP] stay logged in for session On Fri, 2007-05-18 at 11:53 +0100, Edward Kay wrote: -Original Message- From: Joshua [mailto:[EMAIL PROTECTED] Sent: 18 May 2007 11:43 To: PHP.net Subject: [PHP] stay logged in for session hey guys, i am trying to set up a session so that when a user logs in, they will stay logged in until they close their browser. i have the session set up, however i keep getting an error saying: The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. -- this is my code, any help plz. -- checklogin.php: ?php session_start(); //set session variables $_SESSION['txtSurname'] = $_REQUEST['txtSurname']; $_SESSION['txtPassword'] = $_REQUEST['txtPassword']; session_write_close(); include('includes/dbconnect.php'); $nextpage = $_REQUEST['np']; $profile = $_REQUEST['ob']; //Matching usernames and passwords $uname = $_REQUEST['txtSurname']; $pword = $_REQUEST['txtPassword']; $user = SELECT * FROM oldboys WHERE OBSURNAME=' . $uname . ' AND PWORD=' . $pword . '; $ResSql = mysql_query($user) ; //If any errors then print `em out if (!$ResSql) { echo(pError performing query: . mysql_error() . /p); exit(); } //if user does not exist if (mysql_num_rows($ResSql)==0) { echo 'Incorrect username or password have been specified.br'; echo 'a href=updlogin.phpClick here to Log In/a'; exit; } else { header(Location: . $nextpage . ?ob= . $_REQUEST['ob'] . uname= . $_REQUEST['txtSurname'] . pword= . $_REQUEST['txtPassword']); } ? verify.php: ?php session_start(); if(!isset($_SESSION['txtSurname']) !isset($_SESSION['txtPassword'])) { header(location:updlogin.php?np= . $_REQUEST['np'] . ob= . $_REQUEST['ob']); } else { header(location: . $nextpage . ?np= . $_REQUEST['np'] . ob= . $_REQUEST['ob']); } ? --- HTTP Location headers require the full hostname, i.e. header(Location: http://www.example.com/page_to/redirect/to.php;); As others on this list will say however, you don't have to use a full redirect. Just use different PHP includes. E thx so much, it works now. Excellent. Please include the list on replies so that it all gets archived and others can see your responses. By the way, I suggest you have a read up on PHP security, especially SQL injection attacks. Looking at the code above, what would happen if the username I supplied was the following: foo'; DELETE FROM oldboys; # E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] stay logged in for session
Exactly! I still can't believe how many sites out there have the SQL injection problem. -- itoctopus - http://www.itoctopus.com Edward Kay [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -Original Message- From: Joshua [mailto:[EMAIL PROTECTED] Sent: 18 May 2007 12:09 To: Edward Kay Subject: RE: [PHP] stay logged in for session On Fri, 2007-05-18 at 11:53 +0100, Edward Kay wrote: -Original Message- From: Joshua [mailto:[EMAIL PROTECTED] Sent: 18 May 2007 11:43 To: PHP.net Subject: [PHP] stay logged in for session hey guys, i am trying to set up a session so that when a user logs in, they will stay logged in until they close their browser. i have the session set up, however i keep getting an error saying: The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. -- this is my code, any help plz. -- checklogin.php: ?php session_start(); //set session variables $_SESSION['txtSurname'] = $_REQUEST['txtSurname']; $_SESSION['txtPassword'] = $_REQUEST['txtPassword']; session_write_close(); include('includes/dbconnect.php'); $nextpage = $_REQUEST['np']; $profile = $_REQUEST['ob']; //Matching usernames and passwords $uname = $_REQUEST['txtSurname']; $pword = $_REQUEST['txtPassword']; $user = SELECT * FROM oldboys WHERE OBSURNAME=' . $uname . ' AND PWORD=' . $pword . '; $ResSql = mysql_query($user) ; //If any errors then print `em out if (!$ResSql) { echo(pError performing query: . mysql_error() . /p); exit(); } //if user does not exist if (mysql_num_rows($ResSql)==0) { echo 'Incorrect username or password have been specified.br'; echo 'a href=updlogin.phpClick here to Log In/a'; exit; } else { header(Location: . $nextpage . ?ob= . $_REQUEST['ob'] . uname= . $_REQUEST['txtSurname'] . pword= . $_REQUEST['txtPassword']); } ? verify.php: ?php session_start(); if(!isset($_SESSION['txtSurname']) !isset($_SESSION['txtPassword'])) { header(location:updlogin.php?np= . $_REQUEST['np'] . ob= . $_REQUEST['ob']); } else { header(location: . $nextpage . ?np= . $_REQUEST['np'] . ob= . $_REQUEST['ob']); } ? --- HTTP Location headers require the full hostname, i.e. header(Location: http://www.example.com/page_to/redirect/to.php;); As others on this list will say however, you don't have to use a full redirect. Just use different PHP includes. E thx so much, it works now. Excellent. Please include the list on replies so that it all gets archived and others can see your responses. By the way, I suggest you have a read up on PHP security, especially SQL injection attacks. Looking at the code above, what would happen if the username I supplied was the following: foo'; DELETE FROM oldboys; # E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] stay logged in for session
HTTP Location headers require the full hostname, i.e. header(Location: http://www.example.com/page_to/redirect/to.php;); that is true, but usually it works with relative url-s also greets Zoltán Németh Just because some user agents handle non-standard data doesn't make it correct. The HTTP spec says it has to be an absolute URI [1] so until that changes, I'll keep using and recommending absolute URIs. E [1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] stay logged in for session
2007. 05. 18, péntek keltezéssel 12.43-kor Edward Kay ezt írta: HTTP Location headers require the full hostname, i.e. header(Location: http://www.example.com/page_to/redirect/to.php;); that is true, but usually it works with relative url-s also greets Zoltán Németh Just because some user agents handle non-standard data doesn't make it correct. The HTTP spec says it has to be an absolute URI [1] so until that changes, I'll keep using and recommending absolute URIs. E [1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30 yes I know, you're right. I just wanted to add some additional info, but with saying usually I meant if you want to be sure, don't rely on this. I personally do not rely on this anymore, but some of my older scripts do and they all work up until now. maybe in the future I will have to rewrite them according to this requirement, but I hope not in the near future ;) greets Zoltán Németh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't link image directory?
On 5/18/07, Tijnema ! [EMAIL PROTECTED] wrote: On 5/18/07, Haig (Home) [EMAIL PROTECTED] wrote: Hi everyone, I have a simple script that scans a directory and will output a list of sub directories as a hyperlink. Script is working fine. Only problem I have is that if there is a subdirectory called Image, my script won't see it. If I rename that subdirectory to anything else, it will see it. If I use a standard href line to link that image subdirectory, that's fine but then it won't show up alphabetically when the other folders are linked. Any ideas? Haig We can't guess what you did wrong, show us relevant parts of your code. Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I'm guessing that it's just a typo, but are Image (first mention) and image (all lower-case, second mention) actually the exact same directory? Remember, all POSIX-based systems (*nix, Linux, BSD, MacOS) are all cAsE-sEnSiTiVe. Also, in addition to Tijnema's request, please supply your basic server configuration (WIMP, LAMP, et cetera). For example: Linux (Redhat 7.1) Apache 1.3.37 MySQL 3.23 PHP 3.4.4 Just *please* don't tell me you have that configuration! ;-P -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107
Re[2]: [PHP] stay logged in for session
Hi Edward, Friday, May 18, 2007, 12:43:43 PM, you wrote: Just because some user agents handle non-standard data doesn't make it correct. You mean user agents follow RFCs to the letter? :) Since when? :) I do agree with your comment, but it's a LOT more than some user agents. Every browser in popular use today would be closer to the mark. Hell, even the old-guard allowed for Location headers without an absolute URI. You *should* specify the full URI, and let's face it - it's just lazy not to - but unlike the myriad of CSS snafu's out there it's not like you are walking into a pit of doom and hellfire if you don't, because I'd wager 99.9% of your visitors would never even be affected, and the .1% that are probably just dusted off a beta build of NCSA Mosaic to prove their point ;) Cheers, Rich -- Zend Certified Engineer http://www.corephp.co.uk Never trust a computer you can't throw out of a window -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] IE7 = end tag?
The extra comma at the end of the array definition is still valid syntax in PHP. Try for yourself: php -r '$a = array(a = foo, b = bar,); print_r($a);' Interesting. Do you mean 'Valid Syntax' in that it 'works without error', or 'Valid Syntax' in that 'it was designed to work that way'? If the former, then I would argue as to whether it is valid syntax, since depending on it would be dangerous. If the latter, then I have learned something new, and I'd like to know more about why it is designed to work that way, and how I could use it to my advantage. I believe it is the latter, i.e. designed to work that way. I read something about it a few months ago but annoyingly can't find the reference. The reasoning was to make it easier for developers to manage files that define large arrays, such as config files. (You can add extra values to the end, copy/paste lines etc without having to worry too much about the trailing commas). It may only be acceptable in newer versions of PHP though. NULL is a special type that means just that: http://uk.php.net/manual/en/language.types.null.php Enclosing it in quotes will define it as a string, something entirely different. I am aware of what a NULL is. I suggested the quotes as a troubleshooting step, since code prior to the NULL was not being displayed. A 'knee jerk' suggestion, I concede. (Feel free to substitite your own descriptive phrase for 'knee jerk' if you must) :-) No need - I'm just as guilty as anyone for 'knee-jerk' posting :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Send HTML from PHP scripts ...
Hi, I am looking to send a HTML page via a PHP script. The currentl method I use is : mail($email,Kuldip Test email for multiple reciptient - $coursename - $coursedate, TEST , FROM: $adminemail); However I can not see how to send HTML ?. Can you help ?. Kuldip Mond FGI Ltd tel: +44(0)1926 405 780 fax: +44(0)1926 405 778 email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Upgrade to ITIL v3 - Click here for Free Seminars. ITIL v3 White Paper also available This message is confidential and may also be legally privileged. The information is intended for the use of the individual to whom it is addressed. Disclosure of the information contained is, or may be, prohibited by law. If you are not the intended recipient, please return this mail to the sender and delete the message. You should not copy it or use it for any purpose, nor disclose its contents to any other person. We thank you for your co-operation. FGI Ltd, Warwick Innovation Centre, Warwick Technology Park, Gallows Hill, Warwickshire, CV34 6UW. Registered in England No. 4385250
Re: [PHP] IE7 = end tag?
On 18/05/07, Jim Moseby [EMAIL PROTECTED] wrote: The extra comma at the end of the array definition is still valid syntax in PHP. Try for yourself: php -r '$a = array(a = foo, b = bar,); print_r($a);' Interesting. Do you mean 'Valid Syntax' in that it 'works without error', or 'Valid Syntax' in that 'it was designed to work that way'? It was designed to work that way (see the 'possible_comma' rule in zend_language_parser.y) If the latter, then I have learned something new, and I'd like to know more about why it is designed to work that way, and how I could use it to my advantage. Probably because 1. People often remove or comment out elements from lists and forget to remove the comma from the new last entry eg: $config = array( foo = bar, // baz = wibble ); 2. Perl already made the final comma optional for similar reasons. -robin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] IE7 = end tag?
The extra comma at the end of the array definition is still valid syntax in PHP. Try for yourself: php -r '$a = array(a = foo, b = bar,); print_r($a);' Interesting. Do you mean 'Valid Syntax' in that it 'works without error', or 'Valid Syntax' in that 'it was designed to work that way'? If the former, then I would argue as to whether it is valid syntax, since depending on it would be dangerous. If the latter, then I have learned something new, and I'd like to know more about why it is designed to work that way, and how I could use it to my advantage. NULL is a special type that means just that: http://uk.php.net/manual/en/language.types.null.php Enclosing it in quotes will define it as a string, something entirely different. I am aware of what a NULL is. I suggested the quotes as a troubleshooting step, since code prior to the NULL was not being displayed. A 'knee jerk' suggestion, I concede. (Feel free to substitite your own descriptive phrase for 'knee jerk' if you must) :-) JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't link image directory?
On 5/18/07, Haig Dedeyan [EMAIL PROTECTED] wrote: Sorry for the lack of information. I also was wrong about the subdirectory name. It's Images and not Image The workstation is running WinXP Pro while PHP 5 Apache 2 are on Suse 10.1. I also installed apache2 php5 on a WinXP Pro system and the same problem occurs. I have tried 7 workstations and they are all giving the same problem. Whether the subdirectory is Images or images, it makes no difference, the problem is still there. Once I rename that images or Images directory, all is fine. What are you trying to say here? It doesn't work with Images and images, but when you change it from images to Images it works? Clarify yourself please. Here's the code: ?php $path = '//path to directory/'; $dir_handle = opendir($path) or die(Unable to open $path); $paths = array(); while ($file = readdir($dir_handle)) { if(!is_dir($file)) { $paths[] = $path$file; } } closedir($dir_handle); sort($paths); echo 'ul'; $x=0; foreach ($paths as $link) { $show = substr($link,strrpos($link, '/')+1); echo lia href= 'file://$paths[$x]'$show/a/li\n; $x++; } echo '/ul'; ? Just did a quick look at your code, and it's quite strange what you have. First, you said you're script lists subdirectory's, but you're checking for everything that isn't a dir. So it's normal that your images subdirectory isn't listed. Second, why does your path start with // ? one is enough :) At last, why are you using file:// in your link? You're using a webserver to display the contents, but file:// links to files on the local hard drive. Unless the server is running on the same machine you're visiting the site with, it will fail to point to the right file. Tijnema ps. Please don't top post. On 5/18/07, Tijnema ! [EMAIL PROTECTED] wrote: On 5/18/07, Haig (Home) [EMAIL PROTECTED] wrote: Hi everyone, I have a simple script that scans a directory and will output a list of sub directories as a hyperlink. Script is working fine. Only problem I have is that if there is a subdirectory called Image, my script won't see it. If I rename that subdirectory to anything else, it will see it. If I use a standard href line to link that image subdirectory, that's fine but then it won't show up alphabetically when the other folders are linked. Any ideas? Haig We can't guess what you did wrong, show us relevant parts of your code. Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I'm guessing that it's just a typo, but are Image (first mention) and image (all lower-case, second mention) actually the exact same directory? Remember, all POSIX-based systems (*nix, Linux, BSD, MacOS) are all cAsE-sEnSiTiVe. Also, in addition to Tijnema's request, please supply your basic server configuration (WIMP, LAMP, et cetera). For example: Linux (Redhat 7.1) Apache 1.3.37 MySQL 3.23 PHP 3.4.4 Just *please* don't tell me you have that configuration! ;-P -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't link image directory?
At last, why are you using file:// in your link? You're using a webserver to display the contents, but file:// links to files on the local hard drive. Unless the server is running on the same machine you're visiting the site with, it will fail to point to the right file. I'm not positive, but I'm guessing that's why he mentioned the various workstations sounds like he's creating a Desktop-style script, not a web site script. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107
Re: [PHP] error_reporting(E_ALL) doesn't show anything
André Medeiros wrote: Either that, or ini_set('display_errors', '1'); On 5/15/07, Jim Lucas [EMAIL PROTECTED] wrote: Afan Pasalic wrote: hi, in php.ini is error_reporting turned off. and, to see an error have to open error_log. though, for me is much easier to have it on and see the errors on the screen. while developing, of course. I put on the beginning of the file error_reporting(E_ALL) to overwrite php.ini but it doesn't work. still can't see anything. what am I doing wrong? thanks. -afan make sure you have display_error = On either in your php.ini -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Unknown -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php http://www.php.net/manual/en/ref.errorfunc.php#ini.display-errors _Note:_ Although display_errors may be set at runtime (with ini_set()), it won't have any affect if the script has _fatal errors_. This is because the desired runtime action does not get executed. Also, get out of the habit of quoting integer values. ini_set('display_errors', 1); ini_set('display_errors', 0); - ini_set('display_errors', TRUE); ini_set('display_errors', FALSE); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't link image directory?
Sorry for the lack of information. I also was wrong about the subdirectory name. It's Images and not Image The workstation is running WinXP Pro while PHP 5 Apache 2 are on Suse 10.1. I also installed apache2 php5 on a WinXP Pro system and the same problem occurs. I have tried 7 workstations and they are all giving the same problem. Whether the subdirectory is Images or images, it makes no difference, the problem is still there. Once I rename that images or Images directory, all is fine. Here's the code: ?php $path = '//path to directory/'; $dir_handle = opendir($path) or die(Unable to open $path); $paths = array(); while ($file = readdir($dir_handle)) { if(!is_dir($file)) { $paths[] = $path$file; } } closedir($dir_handle); sort($paths); echo 'ul'; $x=0; foreach ($paths as $link) { $show = substr($link,strrpos($link, '/')+1); echo lia href= 'file://$paths[$x]'$show/a/li\n; $x++; } echo '/ul'; ? On 5/18/07, Tijnema ! [EMAIL PROTECTED] http://ca.f622.mail.yahoo.com/ym/[EMAIL PROTECTED]YY=7077y 5beta=yesy5beta=yesorder=downsort=datepos=0view=ahead=b wrote: On 5/18/07, Haig (Home) [EMAIL PROTECTED] http://ca.f622.mail.yahoo.com/ym/[EMAIL PROTECTED]YY=70 77y5beta=yesy5beta=yesorder=downsort=datepos=0view=ahead=b wrote: Hi everyone, I have a simple script that scans a directory and will output a list of sub directories as a hyperlink. Script is working fine. Only problem I have is that if there is a subdirectory called Image, my script won't see it. If I rename that subdirectory to anything else, it will see it. If I use a standard href line to link that image subdirectory, that's fine but then it won't show up alphabetically when the other folders are linked. Any ideas? Haig We can't guess what you did wrong, show us relevant parts of your code. Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I'm guessing that it's just a typo, but are Image (first mention) and image (all lower-case, second mention) actually the exact same directory? Remember, all POSIX-based systems (*nix, Linux, BSD, MacOS) are all cAsE-sEnSiTiVe. Also, in addition to Tijnema's request, please supply your basic server configuration (WIMP, LAMP, et cetera). For example: Linux (Redhat 7.1) Apache 1.3.37 MySQL 3.23 PHP 3.4.4 Just *please* don't tell me you have that configuration! ;-P -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107
[PHP] Re: Download speed limit
Rangel Reale wrote: Hello! For my application I need to limit the speed that my application sends data, in my case a binary file. I need to send the speed as a parameter, like: sendfile.php?speed=2 Would send the file at 20kb/s (forgetting about real byte counts for this example). To send the file, I am doing: $fp=fopen($this-contentfile,rb); while(!feof($fp)){ print(fread($fp,1024*8)); flush(); ob_flush(); } fclose($fp); If after ob_flush I do a sleep(), I can limit the speed, but I would like to limit at the speed of the parameter. Is there a way to do this? Thanks, Rangel Will this mean i can set my ?speed= Excellent! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Download speed limit
On 5/18/07, Jonathan [EMAIL PROTECTED] wrote: Rangel Reale wrote: Hello! For my application I need to limit the speed that my application sends data, in my case a binary file. I need to send the speed as a parameter, like: sendfile.php?speed=2 Would send the file at 20kb/s (forgetting about real byte counts for this example). To send the file, I am doing: $fp=fopen($this-contentfile,rb); while(!feof($fp)){ print(fread($fp,1024*8)); flush(); ob_flush(); } fclose($fp); If after ob_flush I do a sleep(), I can limit the speed, but I would like to limit at the speed of the parameter. Is there a way to do this? Thanks, Rangel Will this mean i can set my ?speed= Excellent! Yeah, that's nice, you limit it, but a little bit smart guy can set it to whatever he/she wants :) Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Send HTML from PHP scripts ...
Might want to put a small bit of effort in first... http://us.php.net/manual/en/function.mail.php Example 1075 Kuldip Mond [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I am looking to send a HTML page via a PHP script. The currentl method I use is : mail($email,Kuldip Test email for multiple reciptient - $coursename - $coursedate, TEST , FROM: $adminemail); However I can not see how to send HTML ?. Can you help ?. Kuldip Mond FGI Ltd tel: +44(0)1926 405 780 fax: +44(0)1926 405 778 email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Upgrade to ITIL v3 - Click here for Free Seminars. ITIL v3 White Paper also available This message is confidential and may also be legally privileged. The information is intended for the use of the individual to whom it is addressed. Disclosure of the information contained is, or may be, prohibited by law. If you are not the intended recipient, please return this mail to the sender and delete the message. You should not copy it or use it for any purpose, nor disclose its contents to any other person. We thank you for your co-operation. FGI Ltd, Warwick Innovation Centre, Warwick Technology Park, Gallows Hill, Warwickshire, CV34 6UW. Registered in England No. 4385250 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: Bounty
On Fri, 2007-05-18 at 17:08 +0200, Tijnema ! wrote: On 5/16/07, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] Where are the list administrators to ban this guy?? [/snip] This is an un-moderated list, so that makes us the police of our own list. Yes, it might be a un-moderated list, but there's someone who can ban users :) He banned himself so he wouldn't have to deal with it :| Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: Bounty
On 5/16/07, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] Where are the list administrators to ban this guy?? [/snip] This is an un-moderated list, so that makes us the police of our own list. Yes, it might be a un-moderated list, but there's someone who can ban users :) Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: showing source
M.Sokolewicz wrote: Why don't you use: highlight_file(__FILE__) ? I didn't know about that. Awesome, thanks. :-) I used the highlight_num from the comments to show line numbers. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ftp_get() - OpenVMS - semicolon in filenames
I am trying to use the php ftp_* functions to access files on an OpenVMS UCX FTP server. I can log in and list the files, but I can't use ftp_get() to get any of them. Instead I get a 'file not found' back from ftp_get(). I think the problem is in OpenVMS naming conventions. OpenVMS saves files with a semicolon and a version number appended to the end. So instead of overwriting files, it increments the version number. In my case, I have directory with ~100 files, all with the same name and different version numbers. For instance: FILENAME.EXT;1 FILENAME.EXT;2 {...} FILENAME.EXT;100 ...so my first suspicion is that ftp_get() doesn't understand what to do with the semicolon. STFW turns up a bug in PHP where garbage is appended to ASCII type transfers from OpenVMS, but I don't think that is relevant to this problem. I will likely have to deal with this if I can get the file to transfer, but one step at the time. If I use 'get' in a command line FTP client from the LAMP box I'm developing this on, I just specify the version number as part of the filename as you would expect. I have tried escaping the semicolon with a backslash. ftp_get() returns a Warning: ftp_get: File specification syntax error message. This is my first foray into the ftp_* functionality of PHP. Hopefully, someone here will have had to deal with this already, and will have an answer. Here is the code I have so far, for what its worth: ?php // This is a 'one use' utility on a private server, no need to sanitize $filename=$_POST['filename']; // Debugging $filename=preg_replace('/;/','\;',$filename); echo $filename; $local_file='/tmp/'.$filename; $ftp_server='host'; $ftp_username='username'; $ftp_userpass='password'; // set up basic connection $conn_id = ftp_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, $ftp_username, $ftp_userpass); // check connection if ((!$conn_id) || (!$login_result)) { echo FTP connection has failed!; echo Attempted to connect to $ftp_server for user $ftp_user_name; exit; } // try to download if (ftp_get($conn_id, $local_file, $filename, FTP_ASCII)) { echo Successfully written to $local_file\n; } else { echo There was a problem\n; } ftp_close($conn_id); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Download speed limit
- Original Message - From: Tijnema ! [EMAIL PROTECTED] To: Jonathan [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Friday, May 18, 2007 12:07 PM Subject: Re: [PHP] Re: Download speed limit On 5/18/07, Jonathan [EMAIL PROTECTED] wrote: Rangel Reale wrote: Hello! For my application I need to limit the speed that my application sends data, in my case a binary file. I need to send the speed as a parameter, like: sendfile.php?speed=2 Would send the file at 20kb/s (forgetting about real byte counts for this example). To send the file, I am doing: $fp=fopen($this-contentfile,rb); while(!feof($fp)){ print(fread($fp,1024*8)); flush(); ob_flush(); } fclose($fp); If after ob_flush I do a sleep(), I can limit the speed, but I would like to limit at the speed of the parameter. Is there a way to do this? Thanks, Rangel Will this mean i can set my ?speed= Excellent! Yeah, that's nice, you limit it, but a little bit smart guy can set it to whatever he/she wants :) Tijnema Hehehe yes, but as I said in a later message, only my application will be accessing this page (hopefully), and the problem is not on the sending server (which has lots of bandwidth) but on the receiving client, where my downloading is killing all its small bandwidth. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.7.0/803 - Release Date: 13/5/2007 12:17 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: showing source
Not that it really matters in this scenario, but if you rename a file to .phps you should be able to navigate to it in a web browser and have nice, highlighted syntax. It's pretty nice for internally viewing a file, but obviously I wouldn't recommend doing this with live files that contain sensitive information. James Lockie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] This almost works but all my and are replaced with . // open this file to show the source if (($fh = fopen( __FILE__, 'r' )) === FALSE){ die ('Failed to open source file (' . $_FILE_ . ') for reading!'); } else { $tags = array( , ); $safe_tags = array( \\, \\ ); print pre\n; // read the file line by line while (! feof( $fh )) { $currentLine = fgets( $fh, 255 ); $noTags = str_replace( $tags, $safeTags, $currentLine ); print $noTags; } fclose( $fh ); print /pre\n; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: showing source
On 5/18/07, Steve [EMAIL PROTECTED] wrote: Not that it really matters in this scenario, but if you rename a file to .phps you should be able to navigate to it in a web browser and have nice, highlighted syntax. It's pretty nice for internally viewing a file, but obviously I wouldn't recommend doing this with live files that contain sensitive information. Or just a symlink from .phps to .php for the file :) Tijnema James Lockie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] This almost works but all my and are replaced with . // open this file to show the source if (($fh = fopen( __FILE__, 'r' )) === FALSE){ die ('Failed to open source file (' . $_FILE_ . ') for reading!'); } else { $tags = array( , ); $safe_tags = array( \\, \\ ); print pre\n; // read the file line by line while (! feof( $fh )) { $currentLine = fgets( $fh, 255 ); $noTags = str_replace( $tags, $safeTags, $currentLine ); print $noTags; } fclose( $fh ); print /pre\n; } -- 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] Re: Download speed limit
On 5/18/07, Rangel Reale [EMAIL PROTECTED] wrote: - Original Message - From: Tijnema ! [EMAIL PROTECTED] To: Jonathan [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Friday, May 18, 2007 12:07 PM Subject: Re: [PHP] Re: Download speed limit On 5/18/07, Jonathan [EMAIL PROTECTED] wrote: Rangel Reale wrote: Hello! For my application I need to limit the speed that my application sends data, in my case a binary file. I need to send the speed as a parameter, like: sendfile.php?speed=2 Would send the file at 20kb/s (forgetting about real byte counts for this example). To send the file, I am doing: $fp=fopen($this-contentfile,rb); while(!feof($fp)){ print(fread($fp,1024*8)); flush(); ob_flush(); } fclose($fp); If after ob_flush I do a sleep(), I can limit the speed, but I would like to limit at the speed of the parameter. Is there a way to do this? Thanks, Rangel Will this mean i can set my ?speed= Excellent! Yeah, that's nice, you limit it, but a little bit smart guy can set it to whatever he/she wants :) Tijnema Hehehe yes, but as I said in a later message, only my application will be accessing this page (hopefully), and the problem is not on the sending server (which has lots of bandwidth) but on the receiving client, where my downloading is killing all its small bandwidth. Ok, then there's not a real problem, but to get to your problem, you could simple tell the script how many data to send per loop, and since you're sleeping 1 second each loop, should this amount be the same as the amount specified on the command line. so, this should work the way you want $sleep = $_GET['sleep']; $fp=fopen($this-contentfile,rb); while(!feof($fp)){ print(fread($fp,1024*$speed)); flush(); ob_flush(); sleep(1); } fclose($fp); Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.7.0/803 - Release Date: 13/5/2007 12:17 -- 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
[PHP] PHP5 Static functions called through __call() that don't exist... yet
Hi all, I am building an assertType object using static functions. What I want to keep away from is the following: code public static function assertString($para){ return $answer; }; public static function assertBool($para){ return $answer; }; ... public static function assertArray($para){ return $answer; }; /code What I would like to do is replace this with the following: code if (!class_exists('TypeAssert')) { class TypeAssert { private static $types = array( 'array','bool','float','integer','null','numeric', 'object','resource','scalar','string' ); public static function __call($method,$arguments) { $obj = self::assertStandardTypes($arguments[0]); return $obj-$method; } public static function assertStandardTypes($para) { $r = TypeAssert::getTypesObject(); if (is_array($para))$r-array = true; if (is_bool($para)) $r-bool = true; if (is_float($para))$r-float = true; if (is_integer($para)) $r-integer = true; if (is_null($para)) $r-null = true; if (is_numeric($para)) $r-numeric = true; if (is_object($para)) $r-object = true; if (is_resource($para)) $r-resource = true; if (is_scalar($para)) $r-scalar = true; if (is_string($para)) $r-string = true; return $r; } public static function getTypesObject() { $obj = (object) ''; for ($i = 0; $i count(self::$types); $i++) { $obj-{self::$types[$i]} = (bool) false; } return $obj; } } } echo('pre'); echo(TypeAssert::string('test')); echo('/pre'); /code I don't think this is possible (see http://marc.info/?l=php-generalm=114558851102060w=2 ). But I would LIKE for it to work (currently, the above code doesn't). Anybody have any insight on how I might get this to work? Thanks! -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: If the only tool you have is a hammer, you tend to see every problem as a nail. $$
[PHP] Re: Send HTML from PHP scripts ...
Kuldip Mond wrote: Hi, I am looking to send a HTML page via a PHP script. The currentl method I use is : mail($email,Kuldip Test email for multiple reciptient - $coursename - $coursedate, TEST , FROM: $adminemail); However I can not see how to send HTML ?. Can you help ?. Kuldip Mond FGI Ltd tel: +44(0)1926 405 780 fax: +44(0)1926 405 778 email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Upgrade to ITIL v3 - Click here for Free Seminars. ITIL v3 White Paper also available This message is confidential and may also be legally privileged. The information is intended for the use of the individual to whom it is addressed. Disclosure of the information contained is, or may be, prohibited by law. If you are not the intended recipient, please return this mail to the sender and delete the message. You should not copy it or use it for any purpose, nor disclose its contents to any other person. We thank you for your co-operation. FGI Ltd, Warwick Innovation Centre, Warwick Technology Park, Gallows Hill, Warwickshire, CV34 6UW. Registered in England No. 4385250 If you are intending to send HTML email you must set the appropriate mime-type in the header. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Can't link image directory?
shows me the subdirectories that exist in the directory I configure the script for, but no further levels of subdirectories as it stands. That could be modified *very* easily, but that's a different matter. On my system, it shows /images without a problem, which more or less adds to my initial suspicion --- check your httpd.conf file for Apache and make sure that directories matching a regexp'ed images (or similar) are not blocked from serving. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 Tijnema ! ...At last, why are you using file:// in your link? You're using a webserver to display the contents, but file:// links to files on the local hard drive. Unless the server is running on the same machine you're visiting the site with, it will fail to point to the right file. Thanks guys. Httpd.conf was blocking it from serving. I do only want to link the subdirectories and not the files within each directory, which is why I'm using that script. If I remove the ! character from the is_dir() command, I get a link for . And .. if a workstations ever switches to a flavour of linux. @ Tijnema ! You're correct, I didn't need to use file:
[PHP] Security Question, re directory permissions
I'm on a shared Linux host and have been wondering about security and directory other [world] permissions. The defaults are 755. The 'others' [world] can read them only. Is there a security hole if a dir on the doc root if a directory has permissions 757? If there is a security problem, what is it? Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] People's misbehavior on the list
some people don't remove the Re: prefix when answering to the questions It opens a new topic on the list and that's not appropriate . Thank ya - Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
Re: [PHP] People's misbehavior on the list
PHP Developer wrote: some people don't remove the Re: prefix when answering to the questions It opens a new topic on the list and that's not appropriate . Thank ya Any email client that uses the presence or absence of a Re: header to decide if posts are related is severely broken. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: [PHP] People's misbehavior on the list
On Fri, 2007-05-18 at 12:22 -0700, PHP Developer wrote: some people don't remove the Re: prefix when answering to the questions It opens a new topic on the list and that's not appropriate . Thank ya Sounds like you should use a different client... or stop whining. I noticed your email client didn't wrap your comment to 70 characters (or whatever is suggested in netiquette). Pot! Meet kettle! Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On 5/18/07, PHP Developer [EMAIL PROTECTED] wrote: some people don't remove the Re: prefix when answering to the questions It opens a new topic on the list and that's not appropriate . Thank ya Some people do not correctly capitalize and punctuate their sentences while posting on this list. I demand that you refrain from such crass behavior as it is terribly bothersome to my pedantic lifestyle. Thank you, -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
THAT'S WHY I ALWAYS TOP POST AND ALWAYS TYPE IN CAPS. :) On May 18, 2007, at 3:35 PM, Greg Donald wrote: On 5/18/07, PHP Developer [EMAIL PROTECTED] wrote: some people don't remove the Re: prefix when answering to the questions It opens a new topic on the list and that's not appropriate . Thank ya Some people do not correctly capitalize and punctuate their sentences while posting on this list. I demand that you refrain from such crass behavior as it is terribly bothersome to my pedantic lifestyle. Thank you, -- Greg Donald http://destiney.com/ -- 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
[PHP] People's misbehavior on the list
hey, I use Gmail but i have the same problem.
Re: [PHP] People's misbehavior on the list
Danial Rahmanzadeh wrote: hey, I use Gmail but i have the same problem. Whoever said Gmail was a good mail client?! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On 5/18/07, Roger B.A. Klorese [EMAIL PROTECTED] wrote: Whoever said Gmail was a good mail client?! I give up, who? -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On 5/18/07, Roger B.A. Klorese [EMAIL PROTECTED] wrote: Danial Rahmanzadeh wrote: hey, I use Gmail but i have the same problem. I use gmail too, and the messages are grouped nicely, I don't see any problem. Whoever said Gmail was a good mail client?! I do :) Tijnema -- 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] Security Question, re directory permissions
On 5/18/07, Al [EMAIL PROTECTED] wrote: I'm on a shared Linux host and have been wondering about security and directory other [world] permissions. The defaults are 755. The 'others' [world] can read them only. Is there a security hole if a dir on the doc root if a directory has permissions 757? If there is a security problem, what is it? Thanks... If you have a directory with 757 permissions, world can create new files there. And if you give files 757 (or 646) permissions, then world can edit that file. So if you have a doc dir, you probably don't want extra files there. It's not really a security problem, but if somebody notices it, he might write files there. Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On Fri, 2007-05-18 at 14:35 -0500, Greg Donald wrote: On 5/18/07, PHP Developer [EMAIL PROTECTED] wrote: some people don't remove the Re: prefix when answering to the questions It opens a new topic on the list and that's not appropriate . Thank ya Some people do not correctly capitalize and punctuate their sentences while posting on this list. I demand that you refrain from such crass behavior as it is terribly bothersome to my pedantic lifestyle. bAH? quit. whining, you silly: ass cant we all Just -- get along, Thank you, Your welcome; :) Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On Fri, 2007-05-18 at 14:43 -0500, Greg Donald wrote: On 5/18/07, Roger B.A. Klorese [EMAIL PROTECTED] wrote: Whoever said Gmail was a good mail client?! I give up, who? Tijnema! Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On 5/18/07, Greg Donald [EMAIL PROTECTED] wrote: On 5/18/07, Roger B.A. Klorese [EMAIL PROTECTED] wrote: Whoever said Gmail was a good mail client?! I give up, who? I do, it works great. No slow POP3 or such shit. I use web interface 24/7, web chat on the fly, messages are grouped, everything i need (headers etc) is showed when needed. Also, IP Addresses are not send with the mail, and that makes it also more anonymous. Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Include files....
Okay, Very Newbie-ish question coming! I can't figure out why my include won't work... Here's the text: index.php: ?PHP include 'defaults.php'; $link = mysql_connect($server, $username, $password) or die('Could not connect: ' . mysql_error()); echo 'Connected successfully BR'; mysql_select_db($database) or die('Could not select database: ' . mysql_error()); echo 'DB selected BR'; $result = mysql_query($query) or die(mysql_error()); $num=mysql_numrows($result); $i= 0; while($i $num) { $FName = mysql_result($result, $i,FName); $LName = mysql_result($result,$i,LName); $Add1 = mysql_result($result, $i,Add1); $Add2 = mysql_result($result, $i,Add2); $City = mysql_result($result, $i,City); $State = mysql_result($result, $i,State); $Zip = mysql_result($result, $i,Zip); $Date = date(m-d-y h:i:s,mysql_result($result, $i, Date)); $Record = mysql_result($result, $i, Record); $subName = mysql_result($result, $i,subName); $subEmail = mysql_result($result, $i,subEmail); $subPhone = mysql_result($result, $i,subPhone); $chkMember = unserialize(mysql_result($result, $i,chkMember)); $chkAdd = unserialize(mysql_result($result, $i,chkAdd)); $chkDel = unserialize(mysql_result($result, $i, chkDel)); $i++; //echo P$Record $FName, $LName,/P P$Add1,BR $Add2,BR/P P$City, $State, $Zip,/P $Date,BR $subName, $subEmail, $subPhone, $chkMember[$row], $chkAdd[$row], $chkDel[$row]BR; echo H3Name Address/H3; echo P id ='test' $FName $LName $Add1 $Add2 $Date/P; }; ? * defaults.php: $server = 'localhost'; $username = 'USERNAME'; $password = 'PASSWORD'; $database = 'DATABASE'; $query = 'SELECT * FROM current'; Yes I changed the values of username, password, and database. But when I use the same info inside the index.php file it all works just fine. Here is the error that it gives me: [Fri May 18 15:32:07 2007] [error] PHP Notice: Undefined variable: server in /Volumes/RAIDer/webserver/Documents/tests/legion/index.php on line 5 [Fri May 18 15:32:07 2007] [error] PHP Notice: Undefined variable: username in /Volumes/RAIDer/webserver/Documents/tests/legion/ index.php on line 5 [Fri May 18 15:32:07 2007] [error] PHP Notice: Undefined variable: password in /Volumes/RAIDer/webserver/Documents/tests/legion/ index.php on line 5 [Fri May 18 15:32:07 2007] [error] PHP Warning: mysql_connect() [a href='function.mysql-connect'function.mysql-connect/a]: Access denied for user 'USERNAME'@'localhost' (using password: NO) in / Volumes/RAIDer/webserver/Documents/tests/legion/index.php on line 5 Thanks in advance for helping me through my obvious friday afternoon brain fart... -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED]
Re: [PHP] People's misbehavior on the list
On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 14:43 -0500, Greg Donald wrote: On 5/18/07, Roger B.A. Klorese [EMAIL PROTECTED] wrote: Whoever said Gmail was a good mail client?! I give up, who? Tijnema! Is that like Yahoo! ? Or do people always yell his/her name? -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
plus 2853 mb FREE storage
Re: [PHP] People's misbehavior on the list
On 5/18/07, Greg Donald [EMAIL PROTECTED] wrote: On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 14:43 -0500, Greg Donald wrote: On 5/18/07, Roger B.A. Klorese [EMAIL PROTECTED] wrote: Whoever said Gmail was a good mail client?! I give up, who? Tijnema! Is that like Yahoo! ? Or do people always yell his/her name? Hmm, what else to put as last name? I chose !, could be something else too, you got better idea? Tijnema No ! here :P -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Security Question, re directory permissions
How can they write or edit files there without having ftp access or the site's file manager? Tijnema ! wrote: On 5/18/07, Al [EMAIL PROTECTED] wrote: I'm on a shared Linux host and have been wondering about security and directory other [world] permissions. The defaults are 755. The 'others' [world] can read them only. Is there a security hole if a dir on the doc root if a directory has permissions 757? If there is a security problem, what is it? Thanks... If you have a directory with 757 permissions, world can create new files there. And if you give files 757 (or 646) permissions, then world can edit that file. So if you have a doc dir, you probably don't want extra files there. It's not really a security problem, but if somebody notices it, he might write files there. Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Setting Up A Simple Shopping Cart
oscommerce is very bad on installin' new templates. come and join developing devenetstore. an open source project: www.devnetstore.com
Re: [PHP] People's misbehavior on the list
On 5/18/07, Danial Rahmanzadeh [EMAIL PROTECTED] wrote: plus 2853 mb FREE storage 2853.822438 now, to be exact :) O wait, since I copied the amount of MB, it has changed already, it is 2853.822762 now :) Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] People's misbehavior on the list
lol
Re: [PHP] Security Question, re directory permissions
On 5/18/07, Al [EMAIL PROTECTED] wrote: How can they write or edit files there without having ftp access or the site's file manager? SSH access? Telnet maybe? PHP script? CGI script? ASP script? There are a lot of possible ways someone can write there. Tijnema Tijnema ! wrote: On 5/18/07, Al [EMAIL PROTECTED] wrote: I'm on a shared Linux host and have been wondering about security and directory other [world] permissions. The defaults are 755. The 'others' [world] can read them only. Is there a security hole if a dir on the doc root if a directory has permissions 757? If there is a security problem, what is it? Thanks... If you have a directory with 757 permissions, world can create new files there. And if you give files 757 (or 646) permissions, then world can edit that file. So if you have a doc dir, you probably don't want extra files there. It's not really a security problem, but if somebody notices it, he might write files there. Tijnema -- 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] Include files....
On 5/18/07, Jason Pruim [EMAIL PROTECTED] wrote: Okay, Very Newbie-ish question coming! I can't figure out why my include won't work... Here's the text: index.php: ?PHP include 'defaults.php'; $link = mysql_connect($server, $username, $password) or die('Could not connect: ' . mysql_error()); echo 'Connected successfully BR'; mysql_select_db($database) or die('Could not select database: ' . mysql_error()); echo 'DB selected BR'; $result = mysql_query($query) or die(mysql_error()); $num=mysql_numrows($result); $i= 0; while($i $num) { $FName = mysql_result($result, $i,FName); $LName = mysql_result($result,$i,LName); $Add1 = mysql_result($result, $i,Add1); $Add2 = mysql_result($result, $i,Add2); $City = mysql_result($result, $i,City); $State = mysql_result($result, $i,State); $Zip = mysql_result($result, $i,Zip); $Date = date(m-d-y h:i:s,mysql_result($result, $i, Date)); $Record = mysql_result($result, $i, Record); $subName = mysql_result($result, $i,subName); $subEmail = mysql_result($result, $i,subEmail); $subPhone = mysql_result($result, $i,subPhone); $chkMember = unserialize(mysql_result($result, $i,chkMember)); $chkAdd = unserialize(mysql_result($result, $i,chkAdd)); $chkDel = unserialize(mysql_result($result, $i, chkDel)); $i++; //echo P$Record $FName, $LName,/P P$Add1,BR $Add2,BR/P P$City, $State, $Zip,/P $Date,BR $subName, $subEmail, $subPhone, $chkMember[$row], $chkAdd[$row], $chkDel[$row]BR; echo H3Name Address/H3; echo P id ='test' $FName $LName $Add1 $Add2 $Date/P; }; ? * defaults.php: $server = 'localhost'; $username = 'USERNAME'; $password = 'PASSWORD'; $database = 'DATABASE'; $query = 'SELECT * FROM current'; Yes I changed the values of username, password, and database. But when I use the same info inside the index.php file it all works just fine. Here is the error that it gives me: [Fri May 18 15:32:07 2007] [error] PHP Notice: Undefined variable: server in /Volumes/RAIDer/webserver/Documents/tests/legion/index.php on line 5 [Fri May 18 15:32:07 2007] [error] PHP Notice: Undefined variable: username in /Volumes/RAIDer/webserver/Documents/tests/legion/ index.php on line 5 [Fri May 18 15:32:07 2007] [error] PHP Notice: Undefined variable: password in /Volumes/RAIDer/webserver/Documents/tests/legion/ index.php on line 5 [Fri May 18 15:32:07 2007] [error] PHP Warning: mysql_connect() [a href='function.mysql-connect'function.mysql-connect/a]: Access denied for user 'USERNAME'@'localhost' (using password: NO) in / Volumes/RAIDer/webserver/Documents/tests/legion/index.php on line 5 Thanks in advance for helping me through my obvious friday afternoon brain fart... I guess you forget that defaults.php is a php file and needs to start with ?php and end with ? Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On Fri, 2007-05-18 at 22:08 +0200, Tijnema ! wrote: On 5/18/07, Danial Rahmanzadeh [EMAIL PROTECTED] wrote: plus 2853 mb FREE storage 2853.822438 now, to be exact :) O wait, since I copied the amount of MB, it has changed already, it is 2853.822762 now :) Anyone know if gmailFs supports RAID across multiple accounts? :) Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On May 18, 2007, at 2:55 PM, Robert Cummings wrote: On Fri, 2007-05-18 at 14:35 -0500, Greg Donald wrote: On 5/18/07, PHP Developer [EMAIL PROTECTED] wrote: some people don't remove the Re: prefix when answering to the questions It opens a new topic on the list and that's not appropriate . Thank ya Some people do not correctly capitalize and punctuate their sentences while posting on this list. I demand that you refrain from such crass behavior as it is terribly bothersome to my pedantic lifestyle. bAH? quit. whining, you silly: ass cant we all Just -- get along, Capt'n Kirk? Is that you? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Include files....
On May 18, 2007, at 4:12 PM, Tijnema ! wrote: Thanks in advance for helping me through my obvious friday afternoon brain fart... I guess you forget that defaults.php is a php file and needs to start with ?php and end with ? Tijnema Well there it is... The Brain fart... Or misunderstanding... I thought since I was calling it within another php script that I didn't have to include the ? ? tags? Obviously I was wrong... Thanks Tijnema! -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
Tijnema ! wrote: 2853.822438 now, to be exact :) O wait, since I copied the amount of MB, it has changed already, it is 2853.822762 now :) Tijnema Do you suppose they have little people running around the data center every day, shutting down machines, adding a hard drive or two, and put it back online? Go home, come back tomorrow and do it again? :) And let's not forget the night crew that installs new machines, but with only 1 drive in them, just so the day crew has something to do when they come in... *smirk* -- H | It's not a bug - it's an undocumented feature. + Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 IT Director / SysAdmin / Websmith . 800.441.3873 x130 Photo Craft Imaging . 3550 Arapahoe Ave. #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On May 18, 2007, at 4:15 PM, Robert Cummings wrote: On Fri, 2007-05-18 at 22:08 +0200, Tijnema ! wrote: On 5/18/07, Danial Rahmanzadeh [EMAIL PROTECTED] wrote: plus 2853 mb FREE storage 2853.822438 now, to be exact :) O wait, since I copied the amount of MB, it has changed already, it is 2853.822762 now :) Anyone know if gmailFs supports RAID across multiple accounts? :) Cheers, Rob. Only on the deluxe accounts... the rest of the people who can't afford them have to settle for using gerbils to move the info around between accounts ;) -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- 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] People's misbehavior on the list
On Fri, 2007-05-18 at 15:16 -0500, Edward Vermillion wrote: On May 18, 2007, at 2:55 PM, Robert Cummings wrote: On Fri, 2007-05-18 at 14:35 -0500, Greg Donald wrote: On 5/18/07, PHP Developer [EMAIL PROTECTED] wrote: some people don't remove the Re: prefix when answering to the questions It opens a new topic on the list and that's not appropriate . Thank ya Some people do not correctly capitalize and punctuate their sentences while posting on this list. I demand that you refrain from such crass behavior as it is terribly bothersome to my pedantic lifestyle. bAH? quit. whining, you silly: ass cant we all Just -- get along, Capt'n Kirk? Is that you? Scotty?? Cheers, The Capt'n -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On Fri, 2007-05-18 at 16:23 -0400, Jason Pruim wrote: On May 18, 2007, at 4:15 PM, Robert Cummings wrote: On Fri, 2007-05-18 at 22:08 +0200, Tijnema ! wrote: On 5/18/07, Danial Rahmanzadeh [EMAIL PROTECTED] wrote: plus 2853 mb FREE storage 2853.822438 now, to be exact :) O wait, since I copied the amount of MB, it has changed already, it is 2853.822762 now :) Anyone know if gmailFs supports RAID across multiple accounts? :) Cheers, Rob. Only on the deluxe accounts... the rest of the people who can't afford them have to settle for using gerbils to move the info around between accounts ;) Thought that was Hotmail... and the reason accounts were deleted after a few months of inactivity was because the gerbil died :/ Anyone ever see the aftermath of 2 starving gerbils in a cage? One not so starving gerbil -- and a mess. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: Anyone know if gmailFs supports RAID across multiple accounts? :) ROFL. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Include files....
On Fri, 2007-05-18 at 16:20 -0400, Jason Pruim wrote: On May 18, 2007, at 4:12 PM, Tijnema ! wrote: Thanks in advance for helping me through my obvious friday afternoon brain fart... I guess you forget that defaults.php is a php file and needs to start with ?php and end with ? Tijnema Well there it is... The Brain fart... Or misunderstanding... I thought since I was calling it within another php script that I didn't have to include the ? ? tags? Obviously I was wrong... You don't need to close the PHP context with ? PHP does it for you when it hits the end of the file... this is a feature. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Security Question, re directory permissions [long answer]
On 5/18/07, Al [EMAIL PROTECTED] wrote: I'm on a shared Linux host and have been wondering about security and directory other [world] permissions. The defaults are 755. The 'others' [world] can read them only. Is there a security hole if a dir on the doc root if a directory has permissions 757? If there is a security problem, what is it? Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php DISCLAIMER: Bare with me this is a bit of a long answer enjoy! I can't think of any good reason why you'd have 757 for your permissions, first of all. Secondly, yes, there are security holes in having world-writable directories on a shared system. Some scripts require that you have these permissions set, and this is primarily for uploading files. However, better care should be taken by the authors to work around the 777-required permissions. For example, if uploading an image on the web to a web-accessible directory, it could instead be done as follows: Set permissions on [directory] to 777. Run script createdir.php via the web: ? mkdir($dir_name); chmod($dir_name,0700); ? Set permissions on [directory] back to the original permissions (probably 750 or 755). The above example does the following: 1.) Sets the directory to allow everyone to read, write, and execute. 2.) Apache creates a directory and sets permissions so that only it can read, write, and execute what's in there. 3.) Sets the directory back to the original (hopefully secure) permissions. That means that you won't be able to add, remove, or modify anything in that directory, of course, including the directory itself, unless you do so via the web. For example, you won't be able to use FTP to upload to that directory, nor can you delete anything from there via FTP or SSH (unless your host has REALLY screwed something up). Of course, if php_suexec is running, or if you set the SUID on the script, then the scripts will execute as the user they belong to, not as apache/nobody/daemon or whatever Apache is set to run as. This means that the above paragraph does not apply, and even via Apache, it would be as though you had manually placed the files there. This is the most-secure operation as far as that goes, but can lead to problems of privilege escalation if someone is able to create files under the UID of a different user on the system and have suexec run the files. And a basic refresher on Unix permissions as a whole (these NEVER apply to root, who can do anything, anytime, anywhere): SpecialtyUserGroupEveryone # # # # Everyone knows the basics of chmod: - 75 5 `chmod 755 script.php` -rwxr-xr-x script.php - Owner can read, write, and execute - Members of primary group can read and execute (can't write to file) - Everyone else can read and execute (can't write to file) Another example: `chmod 640 script.php` -rw-r- script.php - Owner can read and write (can't execute file) - Members of primary group can read (can't write or execute file) - No one else (again, beside root) can read, write, or execute file Each bit is comprised of a math formula with values as follows: 4 - Read 2 - Write 1 - Execute 0 - No permissions (cannot be added to above numbers in permission bit, of course) So to get the number for the permission bit, simply add the above numbers together to get the sum. For example, if you want the owner of the file to be able read, write, and execute, the group to be able to read and execute, and the rest of the world to only be able to read, you'd do calculate the following: Owner (read, write, execute): 4 + 2 + 1 = 7 Group (read and execute): 4 + 1 = 5 Everyone (read only): 2 Your permissions as above would be 752 (`chmod 752 script.php`). Now, on to the 4-digit permission values you've probably seen elsewhere begin with what's called a 'specialty bit' which allows the owner (or root) to enforce one of the following: 4 - SUID (if executed, runs as owner, with owner permissions) 2 - GUID (if executed, runs as group, with group permissions) 1 - Sticky (if directory, only user can modify/rename/delete files within; if file, on only *nix systems, keep file in RAM upon delete) Using the same concept and convention as above with the math, you can create single or combination permissions on the specialty bit of the permissions. Some examples: 4755 - Owner can read/write/execute; group and everyone else can
Re: [PHP] People's misbehavior on the list
On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 22:08 +0200, Tijnema ! wrote: On 5/18/07, Danial Rahmanzadeh [EMAIL PROTECTED] wrote: plus 2853 mb FREE storage 2853.822438 now, to be exact :) O wait, since I copied the amount of MB, it has changed already, it is 2853.822762 now :) Anyone know if gmailFs supports RAID across multiple accounts? :) Cheers, Rob. -- Actually, I've seen a program that actually could use multiple accounts (unlimited), and so you could create an unlimited size disk, but unfortunately you won't get better speed when using RAID... :P Unless you have 3Gbit DSL line, you have slower speeds then using a normal hard drive, so it sucks. But who cares? Gmail is for mail, not for data :P Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Include files....
On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 16:20 -0400, Jason Pruim wrote: On May 18, 2007, at 4:12 PM, Tijnema ! wrote: Thanks in advance for helping me through my obvious friday afternoon brain fart... I guess you forget that defaults.php is a php file and needs to start with ?php and end with ? Tijnema Well there it is... The Brain fart... Or misunderstanding... I thought since I was calling it within another php script that I didn't have to include the ? ? tags? Obviously I was wrong... You don't need to close the PHP context with ? PHP does it for you when it hits the end of the file... this is a feature. Cheers, Rob. Yes, it does, but well, doesn't it look nice an ending ? ?? Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 22:08 +0200, Tijnema ! wrote: On 5/18/07, Danial Rahmanzadeh [EMAIL PROTECTED] wrote: plus 2853 mb FREE storage 2853.822438 now, to be exact :) O wait, since I copied the amount of MB, it has changed already, it is 2853.822762 now :) Anyone know if gmailFs supports RAID across multiple accounts? :) Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Man, I hope it's in the works soon because I'm sick and friggin' tired of dealing with having to switch between accounts to keep up with my 43TB of SPAM and midget/donkey porn. A nice 0+1/5 RAID stripe across accounts from the 98 remaining invites I have, coupled with Google's upcoming free WiFi, may just be enough to REALLY pleasure myself -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107
Re: [PHP] Include files....
On Fri, 2007-05-18 at 22:31 +0200, Tijnema ! wrote: On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 16:20 -0400, Jason Pruim wrote: On May 18, 2007, at 4:12 PM, Tijnema ! wrote: Thanks in advance for helping me through my obvious friday afternoon brain fart... I guess you forget that defaults.php is a php file and needs to start with ?php and end with ? Tijnema Well there it is... The Brain fart... Or misunderstanding... I thought since I was calling it within another php script that I didn't have to include the ? ? tags? Obviously I was wrong... You don't need to close the PHP context with ? PHP does it for you when it hits the end of the file... this is a feature. Cheers, Rob. Yes, it does, but well, doesn't it look nice an ending ? ?? Mostly, it looks like a dangling piece of rubbish. I never add the closing ? on a source-only file. And since I never mix code with content... I never see ? in my files *grin*. The code generated by the template compiler has the appropriate closing tags though... and of course since it's generated, it's a run-time soup of HTML and embedded PHP code :) Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] People's misbehavior on the list
maybe
Re: [PHP] People's misbehavior on the list
On Fri, 2007-05-18 at 16:35 -0400, Daniel Brown wrote: On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 22:08 +0200, Tijnema ! wrote: On 5/18/07, Danial Rahmanzadeh [EMAIL PROTECTED] wrote: plus 2853 mb FREE storage 2853.822438 now, to be exact :) O wait, since I copied the amount of MB, it has changed already, it is 2853.822762 now :) Anyone know if gmailFs supports RAID across multiple accounts? :) Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Man, I hope it's in the works soon because I'm sick and friggin' tired of dealing with having to switch between accounts to keep up with my 43TB of SPAM and midget/donkey porn. We need to talk. CALL ME!!! 613-DON-K-PRN! ;) Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On Fri, 2007-05-18 at 22:27 +0200, Tijnema ! wrote: On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 22:08 +0200, Tijnema ! wrote: On 5/18/07, Danial Rahmanzadeh [EMAIL PROTECTED] wrote: plus 2853 mb FREE storage 2853.822438 now, to be exact :) O wait, since I copied the amount of MB, it has changed already, it is 2853.822762 now :) Anyone know if gmailFs supports RAID across multiple accounts? :) Cheers, Rob. -- Actually, I've seen a program that actually could use multiple accounts (unlimited), and so you could create an unlimited size disk, but unfortunately you won't get better speed when using RAID... :P Unless you have 3Gbit DSL line, you have slower speeds then using a normal hard drive, so it sucks. But who cares? Gmail is for mail, not for data :P That would depend on whether Google throttles download speed of message packets. If it throttles on any given request, then making multiple asynchronous requests for striped data would improve your download speed. But of course, it would never be as fast as a local hard drive. That's why Dan just wants to backup his midget and donkey pr0n ;) Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 22:27 +0200, Tijnema ! wrote: On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 22:08 +0200, Tijnema ! wrote: On 5/18/07, Danial Rahmanzadeh [EMAIL PROTECTED] wrote: plus 2853 mb FREE storage 2853.822438 now, to be exact :) O wait, since I copied the amount of MB, it has changed already, it is 2853.822762 now :) Anyone know if gmailFs supports RAID across multiple accounts? :) Cheers, Rob. -- Actually, I've seen a program that actually could use multiple accounts (unlimited), and so you could create an unlimited size disk, but unfortunately you won't get better speed when using RAID... :P Unless you have 3Gbit DSL line, you have slower speeds then using a normal hard drive, so it sucks. But who cares? Gmail is for mail, not for data :P That would depend on whether Google throttles download speed of message packets. If it throttles on any given request, then making multiple asynchronous requests for striped data would improve your download speed. But of course, it would never be as fast as a local hard drive. That's why Dan just wants to backup his midget and donkey pr0n ;) Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Parse Error: Unexpected T_DONKEY on line 69. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107
Re: [PHP] People's misbehavior on the list
On Fri, 2007-05-18 at 16:47 -0400, Daniel Brown wrote: On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 22:27 +0200, Tijnema ! wrote: On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 22:08 +0200, Tijnema ! wrote: On 5/18/07, Danial Rahmanzadeh [EMAIL PROTECTED] wrote: plus 2853 mb FREE storage 2853.822438 now, to be exact :) O wait, since I copied the amount of MB, it has changed already, it is 2853.822762 now :) Anyone know if gmailFs supports RAID across multiple accounts? :) Cheers, Rob. -- Actually, I've seen a program that actually could use multiple accounts (unlimited), and so you could create an unlimited size disk, but unfortunately you won't get better speed when using RAID... :P Unless you have 3Gbit DSL line, you have slower speeds then using a normal hard drive, so it sucks. But who cares? Gmail is for mail, not for data :P That would depend on whether Google throttles download speed of message packets. If it throttles on any given request, then making multiple asynchronous requests for striped data would improve your download speed. But of course, it would never be as fast as a local hard drive. That's why Dan just wants to backup his midget and donkey pr0n ;) Parse Error: Unexpected T_DONKEY on line 69. Is that an E_RECOVERABLE in PHP5? Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 16:47 -0400, Daniel Brown wrote: On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 22:27 +0200, Tijnema ! wrote: On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 22:08 +0200, Tijnema ! wrote: On 5/18/07, Danial Rahmanzadeh [EMAIL PROTECTED] wrote: plus 2853 mb FREE storage 2853.822438 now, to be exact :) O wait, since I copied the amount of MB, it has changed already, it is 2853.822762 now :) Anyone know if gmailFs supports RAID across multiple accounts? :) Cheers, Rob. -- Actually, I've seen a program that actually could use multiple accounts (unlimited), and so you could create an unlimited size disk, but unfortunately you won't get better speed when using RAID... :P Unless you have 3Gbit DSL line, you have slower speeds then using a normal hard drive, so it sucks. But who cares? Gmail is for mail, not for data :P That would depend on whether Google throttles download speed of message packets. If it throttles on any given request, then making multiple asynchronous requests for striped data would improve your download speed. But of course, it would never be as fast as a local hard drive. That's why Dan just wants to backup his midget and donkey pr0n ;) Parse Error: Unexpected T_DONKEY on line 69. Is that an E_RECOVERABLE in PHP5? Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' Only if you have this in your php.ini: variables_order = OHCRAP -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107
Re: [PHP] Include files....
On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 22:31 +0200, Tijnema ! wrote: On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 16:20 -0400, Jason Pruim wrote: On May 18, 2007, at 4:12 PM, Tijnema ! wrote: Thanks in advance for helping me through my obvious friday afternoon brain fart... I guess you forget that defaults.php is a php file and needs to start with ?php and end with ? Tijnema Well there it is... The Brain fart... Or misunderstanding... I thought since I was calling it within another php script that I didn't have to include the ? ? tags? Obviously I was wrong... You don't need to close the PHP context with ? PHP does it for you when it hits the end of the file... this is a feature. Cheers, Rob. Yes, it does, but well, doesn't it look nice an ending ? ?? Mostly, it looks like a dangling piece of rubbish. I never add the closing ? on a source-only file. And since I never mix code with content... I never see ? in my files *grin*. The code generated by the template compiler has the appropriate closing tags though... and of course since it's generated, it's a run-time soup of HTML and embedded PHP code :) Cheers, Rob. Mostly for the very basic sites, I put HTML code at the end of my file, so i don't have to echo it and think about quotes. And a lot of times, i also have HTML in front of my code, or when using sessions, in between like this: ?php session_start(); ? htmlheadtitleTest/title/headbody ?php // Some PHP code here ? /body/html And then, the ? is a must :) Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On 5/18/07, Greg Donald [EMAIL PROTECTED] wrote: On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 14:43 -0500, Greg Donald wrote: On 5/18/07, Roger B.A. Klorese [EMAIL PROTECTED] wrote: Whoever said Gmail was a good mail client?! I give up, who? Tijnema! Is that like Yahoo! ? Or do people always yell his/her name? -- Greg Donald http://destiney.com/ I changed it to Tijnema, you happy now ?? :P:P Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
I changed it to Tijnema, you happy now ?? :P:P Tijnema Yes. Names with exclamation points are dumb. ;-P -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107
Re: [PHP] People's misbehavior on the list
On 5/18/07, Danbrown ! [EMAIL PROTECTED] wrote: I changed it to Tijnema, you happy now ?? :P:P Tijnema Yes. Names with exclamation points are dumb. ;-P What a nice name do you have right now :-) I like it ;) Tijnema -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] People's misbehavior on the list
[snip] ...some really funny and other not so funny stuff [/snip] It Must Be Friday [tm] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php5 cert
Anyone wanna share their insights into the php5 cert test? The php4 test was pretty simple for me, but that was a couple of years ago. It seems there's quite a bit of new material being covered on the php5 version. I figure with the same number of questions, things had to get more general if anything, right? -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On 5/18/07, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] ...some really funny and other not so funny stuff [/snip] It Must Be Friday [tm] For some people it is, and for it isn't anymore :-P Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On 5/18/07, Tijnema [EMAIL PROTECTED] wrote: On 5/18/07, Danbrown ! [EMAIL PROTECTED] wrote: I changed it to Tijnema, you happy now ?? :P:P Tijnema Yes. Names with exclamation points are dumb. ;-P What a nice name do you have right now :-) I like it ;) Tijnema -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 I just have to say you can tell it's Friday by everyone's messages today. And here's what I say: ? function sighRelief() { $key[] = 45,7,0,13,10; $key[] = 5,20,2,10,8,13,6; $key[] = 32,14,3; $lock = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890; for($i=0;$icount($key);$i++) { $l = explode(',',$key[$i]); for($j=0;$jcount($l);$j++) { $k .= $lock[$l[$j]]; } if($i (count($key) - 1)) { $k .= ; } else { $k .= !; } } return $k; } ? Have a great weekend! -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107
[PHP] Just to prove my point (used to be - Re: [PHP] People's misbehavior on the list)
PHP Developer wrote: some people don't remove the Re: prefix when answering to the questions It opens a new topic on the list and that's not appropriate . Thank ya - Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. Clients that rely on the subject to determine if it a new thread are broken. In fact, if you looked the headers of your email you will see a line like this message-id: [EMAIL PROTECTED] my client takes that line and make a reference to it like this. references: [EMAIL PROTECTED] it will also create a new message-id: line. something like this. message-id: [EMAIL PROTECTED] if anybody replies to my message, the process is repeated. Real, non-broken, email clients rely on the above lines to determine how messages belong to one another. Again, it has nothing to do with the subject line. Look at the subject line of this message. -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Unknown -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] People's misbehavior on the list
On 5/18/07, Tijnema [EMAIL PROTECTED] wrote: On 5/18/07, Danbrown ! [EMAIL PROTECTED] wrote: On 5/18/07, Tijnema [EMAIL PROTECTED] wrote: On 5/18/07, Danbrown ! [EMAIL PROTECTED] wrote: I changed it to Tijnema, you happy now ?? :P:P Tijnema Yes. Names with exclamation points are dumb. ;-P What a nice name do you have right now :-) I like it ;) Tijnema -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 I just have to say you can tell it's Friday by everyone's messages today. And here's what I say: ? function sighRelief() { $key[] = 45,7,0,13,10; $key[] = 5,20,2,10,8,13,6; $key[] = 32,14,3; $lock = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890; for($i=0;$icount($key);$i++) { $l = explode(',',$key[$i]); for($j=0;$jcount($l);$j++) { $k .= $lock[$l[$j]]; } if($i (count($key) - 1)) { $k .= ; } else { $k .= !; } } return $k; } ? Have a great weekend! or you could write it like this ? function sighRelief() { return Thank fucking God!; } ? Saves you some time, and resources :) and btw, it's saturday here now :) Tijnema Isn't it past your bedtime? ;-P -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107
Re: [PHP] Just to prove my point (used to be - Re: [PHP] People's misbehavior on the list)
On 5/19/07, Jim Lucas [EMAIL PROTECTED] wrote: PHP Developer wrote: some people don't remove the Re: prefix when answering to the questions It opens a new topic on the list and that's not appropriate . Thank ya - Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. Clients that rely on the subject to determine if it a new thread are broken. In fact, if you looked the headers of your email you will see a line like this message-id: [EMAIL PROTECTED] my client takes that line and make a reference to it like this. references: [EMAIL PROTECTED] it will also create a new message-id: line. something like this. message-id: [EMAIL PROTECTED] if anybody replies to my message, the process is repeated. Real, non-broken, email clients rely on the above lines to determine how messages belong to one another. Again, it has nothing to do with the subject line. Look at the subject line of this message. -- Jim Lucas Gmail does break your message now :( Just leave that damn title Re doesn't matter :) Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Just to prove my point (used to be - Re: [PHP] People's misbehavior on the list)
Jim Lucas wrote: PHP Developer wrote: some people don't remove the Re: prefix when answering to the questions It opens a new topic on the list and that's not appropriate . Thank ya - Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. Clients that rely on the subject to determine if it a new thread are broken. In fact, if you looked the headers of your email you will see a line like this message-id: [EMAIL PROTECTED] my client takes that line and make a reference to it like this. references: [EMAIL PROTECTED] it will also create a new message-id: line. something like this. message-id: [EMAIL PROTECTED] if anybody replies to my message, the process is repeated. Real, non-broken, email clients rely on the above lines to determine how messages belong to one another. Again, it has nothing to do with the subject line. Look at the subject line of this message. If the email client started a new thread for my last message, then your email client broken. Sounds like a Jeff Foxworthy joke... -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Unknown -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php