php-general Digest 28 Nov 2007 15:49:02 -0000 Issue 5152

Topics (messages 265110 through 265142):

Re: Can I create flash via php?
        265110 by: Jay Blanchard
        265111 by: Warren Vail
        265116 by: Ronald Wiplinger
        265118 by: George Pitcher

Array Slice without loosing index
        265112 by: Jeffery Fernandez
        265115 by: Andrés Robinet

Import contacts from GMX and Web.de with PHP
        265113 by: Merlin Morgenstern

Re: Array Slice without loosing index [SOLVED]
        265114 by: Jeffery Fernandez

Re: Nested include/require not working in 5.2
        265117 by: news_yodpeirs.thoftware.de

Re: Question about authenticating people...
        265119 by: pobox.verysmall.org

partial upload & no file errors
        265120 by: Olav Mørkrid

Re: how do i get a printout of original multipart post data
        265121 by: Olav Mørkrid

Seeking PHP developer in / near Amsterdam, Netherlands
        265122 by: T.Lensselink

Re: Newbie asks about multi-lingual website strategies
        265123 by: tedd
        265125 by: Jochem Maas
        265127 by: Jeff Benetti
        265129 by: Colin Guthrie
        265131 by: tedd
        265132 by: Jochem Maas
        265133 by: Colin Guthrie
        265136 by: Jean-Michel Philippon-Nadeau
        265137 by: Jochem Maas
        265139 by: Jochem Maas

Re: CVS TO ICAL
        265124 by: Wolf
        265134 by: Jochem Maas

The PHP License
        265126 by: AmirBehzad Eslami
        265128 by: Daniel Brown
        265130 by: Jochem Maas

Re: Nested include/require not working in 5.2 (SOLVED)
        265135 by: Mike Yrabedra

Re: Should I put pictures into a database?
        265138 by: AmirBehzad Eslami

Re: The PHP License [SOLVED]
        265140 by: AmirBehzad Eslami

maximum available memory for PHP5.2.5
        265141 by: Damian Lubosch

PHP RFC # 0001 --- List Etiquette
        265142 by: Daniel Brown

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
[snip]
I want to create flash animations via a web page. Is it possible? What
do I need. I do not want to use Windows !!!!
[/snip]

STFW http://www.google.com/search?hl=en&q=create+flash+using+PHP

--- End Message ---
--- Begin Message ---
Have you checked out ming?

http://ming.sourceforge.net/

Warren Vail 

-----Original Message-----
From: Ronald Wiplinger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 27, 2007 7:50 PM
To: PHP General list
Subject: [PHP] Can I create flash via php?

I want to create flash animations via a web page. Is it possible? What do I
need. I do not want to use Windows !!!!

bye

Ronald

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Jay Blanchard wrote:
> [snip]
> I want to create flash animations via a web page. Is it possible? What
> do I need. I do not want to use Windows !!!!
> [/snip]
>
> STFW http://www.google.com/search?hl=en&q=create+flash+using+PHP
>
>
>
>   
Excellent link (and bet I tried that one before!!!), .... can you please
help me to find the right page of the about 58,200,000 pages. (In words:
58 million 200 thousand)  ;-)

Thanks in advance!

bye

Ronald

--- End Message ---
--- Begin Message ---
Ronald,

Add 'example' to the end of the search query.

George

> -----Original Message-----
> From: Ronald Wiplinger [mailto:[EMAIL PROTECTED]
> Sent: 28 November 2007 8:07 am
> To: Jay Blanchard
> Cc: PHP General list
> Subject: Re: [PHP] Can I create flash via php?
> 
> 
> Jay Blanchard wrote:
> > [snip]
> > I want to create flash animations via a web page. Is it possible? What
> > do I need. I do not want to use Windows !!!!
> > [/snip]
> >
> > STFW http://www.google.com/search?hl=en&q=create+flash+using+PHP
> >
> >
> >
> >   
> Excellent link (and bet I tried that one before!!!), .... can you please
> help me to find the right page of the about 58,200,000 pages. (In words:
> 58 million 200 thousand)  ;-)
> 
> Thanks in advance!
> 
> bye
> 
> Ronald
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--- End Message ---
--- Begin Message ---
Hi all,

I am wanting to retain the array indexes after it being sliced. Here is what I 
have so far.

if ($user_count > $group_count)
{
        for ($i = 0; $i < $user_count; $i+=$group_count)
        {
                $output = array_slice($properties['users'], $i, $group_count);
                print_r($output);
        }
}

Every time the array is sliced it results with arrays which have new idexes. 
Is there a way I can retain the array indexes when slicing the array.

regards,
Jeffery
-- 
Internet Vision Technologies
Level 1, 520 Dorset Road
Croydon
Victoria - 3136
Australia
web: http://www.ivt.com.au
phone: +61 3 9723 9399
fax: +61 3 9723 4899

--- End Message ---
--- Begin Message ---
Notice that the fourth parameter of array_slice will only work in PHP 5, and
not for string keys.
There's no associative array slicing function that I know of (it would be a
good idea for PHP to incorporate one), so I use the following two, which
work for numeric or string keys, and work for PHP 4 or 5.

function xarray_slice_assoc($array, $keys) {
  /* TODO: Error Handling */
  $result = array();
  foreach ($keys as $key):
    // You can use array_key_exists instead of isset to allow for NULLs and
avoid PHP Notices
    if (isset($array[$key])):
      $result[$key] = $array[$key];
    endif;
  endforeach;
  return $result;
}

function xslice_assoc() {
  /* TODO: Error Handling */
  $args = func_get_args();
  $array = array_shift($args);
  return xarray_slice_assoc($array, $args);
}

You can call them like this:

$userLogin = xslice_assoc($_REQUEST, 'user', 'password');
// $userLogin is now an array with "user" and "password" fields, or only
"user", or only "password" or an empty array

$someRecords = xarray_slice_assoc($someRecordset, array(1, 25, 32, 4));
// $someRecors will contain records number 1, 25, 32 and 41 if they exist

Rob


Andrés Robinet | Lead Developer | BESTPLACE CORPORATION
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308
| TEL 954-607-4207 | FAX 954-337-2695
Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE:
bestplace |  Web: http://www.bestplace.biz | Web: http://www.seo-diy.com

> -----Original Message-----
> Hi all,
> 
> I am wanting to retain the array indexes after it being sliced. Here is
> what I
> have so far.
> 
> if ($user_count > $group_count)
> {
>       for ($i = 0; $i < $user_count; $i+=$group_count)
>       {
>               $output = array_slice($properties['users'], $i,
> $group_count);
>               print_r($output);
>       }
> }
> 
> Every time the array is sliced it results with arrays which have new
> idexes.
> Is there a way I can retain the array indexes when slicing the array.
> 
> regards,
> Jeffery
> --
> Internet Vision Technologies
> Level 1, 520 Dorset Road
> Croydon
> Victoria - 3136
> Australia
> web: http://www.ivt.com.au
> phone: +61 3 9723 9399
> fax: +61 3 9723 4899
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Hi there,

I would to provide the users of an internet community I am running the oportunity to import their adress books. As this seems to be a more complex script and others might have done it before, I am searching for a script that does that. I already found one that can do this for hotmail gmail aol etc, but not for the german e-mail providers like gmx and web.de

Has somebody a good hint where to search for it? I would be also happy to purchase it.

Best regards,

Merlin

--- End Message ---
--- Begin Message ---
oops me bad.. I just needed the last (4th) parameter added. 

cheers,
Jeffery

On Wed, 28 Nov 2007 04:59:35 pm Jeffery Fernandez wrote:
> Hi all,
>
> I am wanting to retain the array indexes after it being sliced. Here is
> what I have so far.
>
> if ($user_count > $group_count)
> {
>       for ($i = 0; $i < $user_count; $i+=$group_count)
>       {
>               $output = array_slice($properties['users'], $i, $group_count);
>               print_r($output);
>       }
> }
>
> Every time the array is sliced it results with arrays which have new
> idexes. Is there a way I can retain the array indexes when slicing the
> array.
>
> regards,
> Jeffery
> --
> Internet Vision Technologies
> Level 1, 520 Dorset Road
> Croydon
> Victoria - 3136
> Australia
> web: http://www.ivt.com.au
> phone: +61 3 9723 9399
> fax: +61 3 9723 4899



-- 
Internet Vision Technologies
Level 1, 520 Dorset Road
Croydon
Victoria - 3136
Australia
web: http://www.ivt.com.au
phone: +61 3 9723 9399
fax: +61 3 9723 4899

--- End Message ---
--- Begin Message ---
Did you look for files named config.php? I would try to find out which file 
is loaded instead of the wanted one. Maybe you could use 
fopen('config.php','r',TRUE); and check the contents of that file to get an 
idea where it comes from? If it happens only with a file of this name, I 
would assume that there is a file of this name somewhere in the include_path 
...

HTH, Thomas 

--- End Message ---
--- Begin Message ---
Jason Pruim wrote:
Set the main page, so that when you login, it accesses a master database, which has the username, password, and database name stored in it. Write the database name to a session variable, which I could then use in my mysql connect file for the database...

This sounds completely reasonable.

If all databases have the same structure, you may consider having actually only one database, identifying the records belonging to a given customer by 'customer_id'.

This way maintenance and further development of the 'databases' will be easier.

Iv

--- End Message ---
--- Begin Message ---
hello

under what EXACT circumstances does UPLOAD_ERR_PARTIAL and
UPLOAD_ERR_NO_FILE occur?

...NO_FILE, does it happen ONLY if the user submits a form without
choose a file to upload, or can this one also cover corrupt file data
that php could not parse?

...PARTIAL, does it happen if the user presses STOP in his browser
while uploading or he pulls out his network cable? if so, then he will
never see any error message served upon this error... or does is it
this one that covers corrupt mime data in the post?

--- End Message ---
--- Begin Message ---
what is the thought behind php not providing access to original post
data? this removes any chance of analyzing corrupt upload data, which
is often the case with mobile browsers. can future versions of php
please include a way of viewing raw server requests in full?

On 26/11/2007, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> If you're with linux try netcat (nc) at listening mode.
> >
> > how can i get a raw and untouched printout of a multipart/form-data
> > POST? i need this to analyze what certain user agents do wrong when
> > uploading files.

--- End Message ---
--- Begin Message ---
If interested! Pls contact me off list.

--- End Message ---
--- Begin Message ---
At 12:56 AM +0100 11/28/07, Jochem Maas wrote:
Colin Guthrie wrote:
 tedd wrote:

...

 >
 > Sorry Tedd, but I'm not sure where the browser sniffing stuff came in.
 IE and FF both offer a UI to input the user's preferred language, it's
 an HTTP standard thing and nothign to do with user agents string
 parsing. It uses the Accept-Language header sent with http requests to
 detect the language. It's quite standard but problems usually crop up in
 e.g. Australia and the UK where a lot of people leave the default en-US
 language when en-GB or en-AU would be better. Again it's not infallible
 but it's a fairly good starting point.

ditto.

So, sniffing the browser to determine language isn't the same as browser sniffing -- OK.

Sorry, my bad.

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
tedd wrote:
> At 12:56 AM +0100 11/28/07, Jochem Maas wrote:
>> Colin Guthrie wrote:
>>>  tedd wrote:
>>
>> ...
>>
>>  >
>>  > Sorry Tedd, but I'm not sure where the browser sniffing stuff came in.
>>>  IE and FF both offer a UI to input the user's preferred language, it's
>>>  an HTTP standard thing and nothign to do with user agents string
>>>  parsing. It uses the Accept-Language header sent with http requests to
>>>  detect the language. It's quite standard but problems usually crop
>>> up in
>>>  e.g. Australia and the UK where a lot of people leave the default en-US
>>>  language when en-GB or en-AU would be better. Again it's not infallible
>>>  but it's a fairly good starting point.
>>
>> ditto.
> 
> So, sniffing the browser to determine language isn't the same as browser
> sniffing -- OK.

there is no sniffing of the browser - merely a case of parsing the contents of
the Accept-Language header if the browser sent it along with the request 
regardless
of what browser is being used.

there is no reason to assume that anyone would want to spoof the 
Accept-Language header
to contain something that doesn't correspond with what the user wants ... why 
set japanese
as a preferred language if you don't speak it? and if they do do that and end 
up getting a
site in japanese then really that is the users problem not the site developers.

it not the same as ouput different content/layout/etc based on the UserAgent 
string -
which is known to be spoofed in order to combat idiot developers attempts to 
force
people to use certain browser (for whatever reason)

I mean, we don't assume that the requested URL is not what the user really 
wanted?
e.g. user requests example.com/foo.php but we know that it's likely to be 
spoofed so
we'll help out and server them example.com/bar.php ???

besides which I did state that using Accept-Language header to determine a 
[probable]
suitable language should be done in addition to offering the user an explicit 
language
selection mechanism.

lastly I think using GEO-IP services to determine location and thereby an 
implied
language is worthless in general - I can be sitting anywhere on the planet and 
still want
to view content in Dutch, not to mention things like global corporate gateways, 
anonymous
proxies, etc, etc. The exception to this could be when the website in question 
is specifically
offering localised data (e.g. find me a restaurant/garage/whatever in Rotterdam)

> 
> Sorry, my bad.

no need for the sarcasm Tedd, seems we have differing opinions on this - 
although my gut
feeling is that your hung up on something that's not strictly relevant in this 
situation.

:-)

--- End Message ---
--- Begin Message ---
Wow! I love this group, ask and you shall receive.  Thanks everyone for the
comments and suggestions. 

 

The following snippet from Andrés Robinet would actually suit my current
project..

 

define('DEFAULT_LANG_ID', 'en');

 

function getLanguageId() {

  // Allow for language id override in $_GET, $_POST and $_COOKIE

  $req_lang_id = $_REQUEST['lang_id'];

  // Retrieve the one stored in the session if any

  $sess_lang_id = $_SESSION['lang_id'];

  // $lang_id will contain the lang id retrieved from request (overrides
session),

  // or from session or a default one

  $lang_id = isset($req_lang_id) ? $req_lang_id : (isset($sess_lang_id) ?

$sess_lang_id : DEFAULT_LANG_ID);

  // Save it for next time

  $_SESSION['lang_id'] = $lang_id;

  return $lang_id;

}

 

but the idea of getting a preferred language from the browser is also a
great strategy ( I didn’t know you could do that, I’m such a noob) so I
think that I will investgate that further. 

 

The problem with IP address is that usually it is not tied to one particular
user so I will scrap that idea.  

 

Am I correct that if two people are logged on using two different languages
that the session var will keep track of the different users (by IP I assume)
and the server won’t mess up?

 

Anyway thanks everyone for all the great help, I’m on a nearly vertical
learning curve here and it’s great to have this community to draw on.  I’m
pretty much working in a vacuum otherwise.

 

Jeff


--- End Message ---
--- Begin Message ---
tedd wrote:
> At 12:56 AM +0100 11/28/07, Jochem Maas wrote:
>> Colin Guthrie wrote:
>>>  tedd wrote:
>>
>> ...
>>
>>  >
>>  > Sorry Tedd, but I'm not sure where the browser sniffing stuff came in.
>>>  IE and FF both offer a UI to input the user's preferred language, it's
>>>  an HTTP standard thing and nothign to do with user agents string
>>>  parsing. It uses the Accept-Language header sent with http requests to
>>>  detect the language. It's quite standard but problems usually crop
>>> up in
>>>  e.g. Australia and the UK where a lot of people leave the default en-US
>>>  language when en-GB or en-AU would be better. Again it's not infallible
>>>  but it's a fairly good starting point.
>>
>> ditto.
> 
> So, sniffing the browser to determine language isn't the same as browser
> sniffing -- OK.
> 
> Sorry, my bad.

lol. If you define this as "sniffing" tedd, then I by that token you'd
have to define the "GET / HTTP/1.1 \n Host: www.mysite.com" bit as
sniffing too ;)

Col

--- End Message ---
--- Begin Message ---
At 3:01 PM +0100 11/28/07, Jochem Maas wrote:
tedd wrote:
 > So, sniffing the browser to determine language isn't the same as browser
 sniffing -- OK.

there is no sniffing of the browser - merely a case of parsing the contents of
the Accept-Language header if the browser sent it along with the request regardless
of what browser is being used.

there is no reason to assume that anyone would want to spoof the Accept-Language header to contain something that doesn't correspond with what the user wants ... why set japanese as a preferred language if you don't speak it? and if they do do that and end up getting a site in japanese then really that is the users problem not the site developers.

it not the same as ouput different content/layout/etc based on the UserAgent string - which is known to be spoofed in order to combat idiot developers attempts to force
people to use certain browser (for whatever reason)

I mean, we don't assume that the requested URL is not what the user really wanted? e.g. user requests example.com/foo.php but we know that it's likely to be spoofed so
we'll help out and server them example.com/bar.php ???

besides which I did state that using Accept-Language header to determine a [probable] suitable language should be done in addition to offering the user an explicit language
selection mechanism.

lastly I think using GEO-IP services to determine location and thereby an implied language is worthless in general - I can be sitting anywhere on the planet and still want to view content in Dutch, not to mention things like global corporate gateways, anonymous proxies, etc, etc. The exception to this could be when the website in question is specifically offering localised data (e.g. find me a restaurant/garage/whatever in Rotterdam)

Thanks for the explanation -- I didn't realize most of that.

 > Sorry, my bad.

no need for the sarcasm Tedd, seems we have differing opinions on this - although my gut feeling is that your hung up on something that's not strictly relevant in this situation.

:-)

Jochem:

This just hasn't been my week -- everyone (long story) thinks I'm being sarcastic when I'm not.

The "Sorry, my bad" means "I apologize, my mistake." How can that be taken as sarcasm?

As for being "hung-up" -- again, I'm clueless. I mistakenly thought that anything obtained from the browser was subject to suspicion as is any outside data. But apparently you can "trust" (I realize within certain limits) some things provided by the browser -- that's news to me.

Boy, I got to work on my communication skills because everyone can't be wrong, right?

Again, thanks for your explanation -- and that's not being sarcastic. I'm just trying to communicate without offending/annoying anyone. Maybe I should end every line with a smiley? :-)

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
Jeff Benetti wrote:

...

> Am I correct that if two people are logged on using two different languages
> that the session var will keep track of the different users (by IP I assume)
> and the server won’t mess up?

yes, the contents of $_SESSION are stored per user. this is tracked by way of a
session cookie (which is just another cookie really) that PHP (under normal 
circumstances)
automatically sends and parses (when you call session_start()).

> Anyway thanks everyone for all the great help, I’m on a nearly vertical
> learning curve here and it’s great to have this community to draw on.  I’m
> pretty much working in a vacuum otherwise.
> 

any room for that wizard named Brad in your vacuum?

--- End Message ---
--- Begin Message ---
Jeff Benetti wrote:
> Am I correct that if two people are logged on using two different languages
> that the session var will keep track of the different users (by IP I assume)
> and the server won’t mess up?

Sessions are per-user and are not global (you'd need to use something
like memcache or similar for global persistence). PHP is different from
e.g. ASP/JSP which implement a "Share everything" system, vs PHP's
"Share nothing" (these are real terms believe it or not!).

Sessions usually work via a cookie that PHP set's automatically the is
stored for the duration of their visit on your site (till they restart
their webbrowser). By default the cookie is called PHPSESSID. If a user
has cookies disabled PHP can rewrite your HTML URLs on the fly to
include the argument on the GET vars (sess_use_trans_id) but this is far
from reliable.

HTHs

Col

--- End Message ---
--- Begin Message ---
Dear Tedd, Dear List,

tedd wrote:
As for being "hung-up" -- again, I'm clueless. I mistakenly thought that anything obtained from the browser was subject to suspicion as is any outside data. But apparently you can "trust" (I realize within certain limits) some things provided by the browser -- that's news to me.

You are right. Being suspicious with data coming from the browser is a pretty good reflex. But, as long as you use the accept-language header only for detecting the user's native language, you do not risk a lot. In the worst case, your will set your site's language to something that is not the user's native language. In that case, you only need to allow him to change this setting manually.

You can base yourself on information provided by the browser, but as you say, I believe that we should not rely completely on it. This is why allowing the user to change his language, in your case, becomes important.

It's always a balance between risk and usability.

Hope this helps,


Jean-Michel

--- End Message ---
--- Begin Message ---
tedd wrote:
> At 3:01 PM +0100 11/28/07, Jochem Maas wrote:

...

> Jochem:
> 
> This just hasn't been my week -- everyone (long story) thinks I'm being
> sarcastic when I'm not.

ouch!

> 
> The "Sorry, my bad" means "I apologize, my mistake." How can that be
> taken as sarcasm?

guess it's down to my input filters ;-) not to worry, no feelings were hurt in
the process.

> 
> As for being "hung-up" -- again, I'm clueless. I mistakenly thought that
> anything obtained from the browser was subject to suspicion as is any
> outside data. But apparently you can "trust" (I realize within certain
> limits) some things provided by the browser -- that's news to me.

your right about the trust issue but I don't think trust is the point in this 
case.
looking at what the browser offered as accepted languages is merely a way of 
trying to
be helpful - you still have to parse the relevant header in a safe way.

> 
> Boy, I got to work on my communication skills because everyone can't be
> wrong, right?

let's be positive, next week it will be better!

> 
> Again, thanks for your explanation -- and that's not being sarcastic.
> I'm just trying to communicate without offending/annoying anyone. Maybe
> I should end every line with a smiley?  :-)

dunno about that smiley, it might become annoying ;-)

> 
> Cheers,
> 
> tedd
> 

--- End Message ---
--- Begin Message ---
Jean-Michel Philippon-Nadeau wrote:
> Dear Tedd, Dear List,
> 
> tedd wrote:
>> As for being "hung-up" -- again, I'm clueless. I mistakenly thought
>> that anything obtained from the browser was subject to suspicion as is
>> any outside data. But apparently you can "trust" (I realize within
>> certain limits) some things provided by the browser -- that's news to me.
> 
> You are right. Being suspicious with data coming from the browser is a
> pretty good reflex. But, as long as you use the accept-language header
> only for detecting the user's native language, you do not risk a lot. In
> the worst case, your will set your site's language to something that is
> not the user's native language. In that case, you only need to allow him
> to change this setting manually.
> 
> You can base yourself on information provided by the browser, but as you
> say, I believe that we should not rely completely on it. This is why
> allowing the user to change his language, in your case, becomes important.

yes! that's what I was trying to say :-)

> 
> It's always a balance between risk and usability.
> 
> Hope this helps,
> 
> 
> Jean-Michel
> 

--- End Message ---
--- Begin Message ---
Always make sure you reply to the list...

And yes, you can export as an ical format, just look at an ical file and
format your output to it.  It's just like doing the CSV/CVS/TXT or any
other file, you just have to put it in the right format with the right
extension when exporting.

Wolf

Mohamed Jama wrote:
> Thanks for the reply Wolf, sorry if I wasn't clear I meant as in php
> class I already have a class to export from my mysql database to cvs,
> just wondering if its possible to do it the same and export as ical
> format ?
> 
> -----Original Message-----
> From: Wolf [mailto:[EMAIL PROTECTED] 
> Sent: 27 November 2007 17:52
> To: Mohamed Jama
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] CVS TO ICAL
> 
> cvs to ical from google:
> http://www.google.com/search?q=convert%3A+cvs+to+ical&ie=utf-8&oe=utf-8&;
> aq=t&rls=org.mozilla:en-US:official&client=firefox-a
> 
> mysql to ical from google:
> http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen
> -US%3Aofficial&hs=hBP&q=convert%3A+mysql+to+ical&btnG=Search
> 
> Looks like lots of ways to do it...
> 
> Where is your script busted?
> 
> Wolf
> 
> ---- Mohamed Jama <[EMAIL PROTECTED]> wrote: 
>>  
>>
>> Hey Guys just wondering if there is a away to convert a cvs to ical
> file
>> or how to import from mysql to ical format?
>>
> 
> 

--- End Message ---
--- Begin Message ---
Wolf wrote:
> Always make sure you reply to the list...
> 
> And yes, you can export as an ical format, just look at an ical file and
> format your output to it.  It's just like doing the CSV/CVS/TXT or any
> other file, you just have to put it in the right format with the right
> extension when exporting.

sometimes you just get the urge to say something like "No that's impossible,
PHP is completely incompatible with the iCal format, it's a non-ICal scripting
language" or "No, the php-class-creation-magic-wand doesn't support iCal output
generator functionality"

... but then that's probably because today is a virtual monday.

> 
> Wolf
> 
> Mohamed Jama wrote:
>> Thanks for the reply Wolf, sorry if I wasn't clear I meant as in php
>> class I already have a class to export from my mysql database to cvs,
>> just wondering if its possible to do it the same and export as ical
>> format ?
>>
>> -----Original Message-----
>> From: Wolf [mailto:[EMAIL PROTECTED] 
>> Sent: 27 November 2007 17:52
>> To: Mohamed Jama
>> Cc: [EMAIL PROTECTED]
>> Subject: Re: [PHP] CVS TO ICAL
>>
>> cvs to ical from google:
>> http://www.google.com/search?q=convert%3A+cvs+to+ical&ie=utf-8&oe=utf-8&;
>> aq=t&rls=org.mozilla:en-US:official&client=firefox-a
>>
>> mysql to ical from google:
>> http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen
>> -US%3Aofficial&hs=hBP&q=convert%3A+mysql+to+ical&btnG=Search
>>
>> Looks like lots of ways to do it...
>>
>> Where is your script busted?
>>
>> Wolf
>>
>> ---- Mohamed Jama <[EMAIL PROTECTED]> wrote: 
>>>  
>>>
>>> Hey Guys just wondering if there is a away to convert a cvs to ical
>> file
>>> or how to import from mysql to ical format?
>>>
>>
> 

--- End Message ---
--- Begin Message ---
Hi list,

Below statement is borrowed from PHP License here[1]:

     The name "PHP" must not be used to endorse or promote products
     derived from this software without prior written permission. For
     written permission, please contact [EMAIL PROTECTED]


Does this mean that saying this website is "Powered by PHP" is illegal
without a written permission?


P.S.
1. http://www.opensource.org/licenses/php.php

--- End Message ---
--- Begin Message ---
On Nov 28, 2007 9:39 AM, AmirBehzad Eslami <[EMAIL PROTECTED]> wrote:
> Hi list,
>
> Below statement is borrowed from PHP License here[1]:
>
>      The name "PHP" must not be used to endorse or promote products
>      derived from this software without prior written permission. For
>      written permission, please contact [EMAIL PROTECTED]
>
>
> Does this mean that saying this website is "Powered by PHP" is illegal
> without a written permission?
>
>
> P.S.
> 1. http://www.opensource.org/licenses/php.php
>

    No, that's fine to state.  Using it to power a website is not
redistributing PHP, only using it as a platform.  What this means in
the context of that portion of the license, related to the whole,
could be reworded as such:

    "You can redistribute PHP in any way, shape, or form you want, so
long as you don't use the name PHP anywhere in the name of the package
you're distributing."

    However, if you're creating software which uses the PHP engine or
is programmed in the PHP language, you'll need permission prior to
using "PHP" in the name.  Examples of software that use that are
phpBB2, phpFox, et cetera.

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

--- End Message ---
--- Begin Message ---
AmirBehzad Eslami wrote:
> Hi list,
> 
> Below statement is borrowed from PHP License here[1]:
> 
>      The name "PHP" must not be used to endorse or promote products
>      derived from this software without prior written permission. For
>      written permission, please contact [EMAIL PROTECTED]
> 
> 
> Does this mean that saying this website is "Powered by PHP" is illegal
> without a written permission?

no. if you say "Powered by PHP" you are merely endorsing and/or promoting PHP
itself and notsome derivative.

the PHP group don't want you to create a fork of PHP and then go name it PHPFork
or something like that.

they don't like it when applications written in PHP use PHP in the application 
name,
the reason being it gives the impression to the unwashed masses that said 
application
is a product of or endorsed by the PHP group ... take for instance PHPBB - 
given the
ammount of flak that project has had with regard to security flaws you can 
understand
why the PHP group would like to distant itself from said project.

that said the enforcement of this license requirement is patchy at best ... as 
the
project named PHPBB illustrates, which makes me wonder in how far this 
particular
requirement is enforcible and/or legally binding.

basically if you have an application written in PHP and want to share it with 
the world
it shouldn't be hard enough to come up with a catchy name that doesn't include 
'PHP'
in the name ... heck you were creative to write the code in the first place!

rgds,
Jochem

> 
> 
> P.S.
> 1. http://www.opensource.org/licenses/php.php
> 

--- End Message ---
--- Begin Message ---
on 11/27/07 3:49 PM, Wolf at [EMAIL PROTECTED] wrote:

> 
> ---- Mike Yrabedra <[EMAIL PROTECTED]> wrote:
>> on 11/27/07 1:53 PM, Wolf at [EMAIL PROTECTED] wrote:
>> 
>>> 
>>> ---- Mike Yrabedra <[EMAIL PROTECTED]> wrote:
>>>> on 11/27/07 1:43 PM, Wolf at [EMAIL PROTECTED] wrote:
>>>> 
>>>>> 
>>>>> ---- Mike Yrabedra <[EMAIL PROTECTED]> wrote:
>>>>>> on 11/27/07 11:46 AM, Jochem Maas at [EMAIL PROTECTED] wrote:
>>>>>> 
>>>>>>> Mike Yrabedra wrote:
>>>>>>>> 
>>>>>>>> I am not able to use includes or requires in nested files using php
>>>>>>>> 5.2.3
>>>>>>>> (osx)
>>>>>>>> 
>>>>>>>> Including or Requiring files directly works.
>>>>>>>> 
>>>>>>>> Including files, that also have includes in them, does not.
>>>>>>>> 
>>>>>>>> Say you have this...
>>>>>>>> 
>>>>>>>> -TopDirectory
>>>>>>>> --index.php (contains include("includes/top.php"); )
>>>>>>>> --includes (folder)
>>>>>>>> ---config.php (contains echo "crap"; )
>>>>>>>> ---top.php (contains include("config.php"); )
>>>>>>>> 
>>>>>>>> When you load the index.php file you would expect the word "crap" to
>>>>>>>> show,
>>>>>>>> but it does not. I think the getcwd is staying specific to the top
>>>>>>>> folder,
>>>>>>>> so the path stays the same throughout.
>>>>>>>> 
>>>>>>>> This does not happen in 5.1.6
>>>>>>> 
>>>>>>> nothing changed in php - the CWD has always been the dir in which the
>>>>>>> explicitly
>>>>>>> called script lives in and it does not change because your inside an
>>>>>>> included
>>>>>>> file.
>>>>>>> 
>>>>>>> my guess is your include_path no longer includes '.' so php is not
>>>>>>> trying
>>>>>>> to
>>>>>>> find the file
>>>>>>> in the directory of the script which is doing the include.
>>>>>>> 
>>>>>>>> 
>>>>>>>> Is there a fix for this or is it PHP causing the problem?
>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> Here is what I have for include_path...
>>>>>> 
>>>>>> include_path = ".:/usr/local/pear"
>>>>>> 
>>>>>> Everything seems to be in order?
>>>>>> 
>>>>>> -- 
>>>>>> Mike Yrabedra B^)>
>>>>>> 
>>>>>> -- 
>>>>>> PHP General Mailing List (http://www.php.net/)
>>>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>> 
>>>>> The first question I have is what does the Error log show?
>>>>> 
>>>>> You should have error reporting turned on so you can see where the script
>>>>> is
>>>>> barfing on the coding.
>>>>> 
>>>>> Wolf
>>>> 
>>>> 
>>>> One more thing, it only does this IF the nested include file is named
>>>> 'config.php'.
>>>> 
>>>> No error is thrown because it is pulling the 'config.php' file from
>>>> somewhere, I just do not know where.
>>>> 
>>>> If I change the name of the file from 'config.php' to 'config1.php', then
>>>> everything works fine.
>>>> 
>>>> Is there a way to figure out where and why it is pulling this mystery
>>>> 'config.php' file from?
>>>> 
>>>> -- 
>>>> Mike Yrabedra B^)>
>>> 
>>> What does the error message log tell you?  It should be readily available in
>>> it....
>>> 
>>> Wolf
>> 
>> 
>> The include tag is not throwing any error.
>> 
>> If I call the same file with a read file method, then I get this error....
>> 
>> Warning: readfile(config.php) [function.readfile]: failed to open stream: No
>> such file or directory in....
>> 
>> Even though the file calling it is in the same directory as 'config.php'
>> 
> 
> Your include path should be along the lines of:
> include_path = ".:/usr/local/pear:/server/path/to/web/includes/folder"
> so if your server root is /var/htdocs/www it would look like:
> include_path = ".:/var/htdocs/www/includes:/usr/local/pear"
> 
> Notice that I changed the order to look local first, then go to the includes
> folder.
> 
> HTH,
> Wolf

Isn't it always the obvious thing that fixes things?? ;-)

Inside the '/usr/local/pear' was the pear 'Config.php' file.

PHP was not using the local version, but grabbing this one instead.

I have adjusted the include_path so that this will no longer happen.

Thanks to everyone that chimed in. :-)



-- 
Mike Yrabedra B^)>

--- End Message ---
--- Begin Message ---
On Wednesday 21 November 2007 03:14:43 Ronald Wiplinger wrote:
> I have an application, where I use pictures. The size of the picture is
> about 90kB and to speed up the preview, I made a thumbnail of each
> picture which is about 2.5 to 5kB.
> I use now a directory structure of   ../$a/$b/$c/<pictures>

I rather to store images on the file-system, since database is another
level over the file-system. However, I still need to store a pointer for
every image into the database. This leads to storing the file names
twice: one time in file-system, and one time in db.
Isn't this redundancy?

Sometimes we can avoid this, especially if we have an image per
record (e.g., Users' Avatars).

Suppose you allow each user to upload a GIF/PNG/JPEG image;
the below code assigns the correct image for every user:

    foreach ($users as &$user) {
        $user['avatar'] = reset(glob('../img/avatars/' . $user['id'] .
'.*'));
    }

If you can grant the images are .GIF, then you can reduce the
overhead of searching for images:

    foreach ($users as &$user) {
        $user['avatar'] = '../img/avatars/' . $user['id'] . '.gif';
    }

Regards,
Behzad

--- End Message ---
--- Begin Message ---
Thanks Jochem and Daneil. I got it.

--- End Message ---
--- Begin Message ---
Hello!

I have a php application (self-written) that has to compute a huge
amount of data (several GB). I am using PHP as a module of apache.

The problem is that the apache process seems to use at most 2GB of
memory. My two 64-Bit Debian servers have 4GB and 8GB of RAM and about
80GB Swap but only 2GB are used.

Do you have an idea what parameters I could change to make php use more
memory?

BTW: It really is not a memory hole problem. The app is doing tons of
calculation over a 50GB database.


I already set the limits in php.ini to "-1".


Thanks in advance,
Damian

--- End Message ---
--- Begin Message ---
    Good morning (/afternoon/evening) all;

    This is more or less an RFC-type email, hence the subject line.  I
would like to see your comments on this case, and maybe we can forge
some sort of agreement or unofficial treaty or something.

    Oftentimes we see a user post a question to the list, with ongoing
discussion back-and-forth on a troublesome issue, and when a solution
is found, the subject line has an added [SOLVED] tag on it.  While
this makes sense in a forum style arena, where posts are binded
statically in the same group, it defeats the purpose of mailing list
archives such as Nabble and GMANE.  A recent email from this morning
illustrates the problem, as displayed presently at this page:
        http://www.nabble.com/PHP---General-f140.html

    The email  with the subject "The PHP License" received commentary
from both Jochem Maas and myself, and the OP (AmirBehzad Eslami)
replied to the message, appending the [SOLVED] tag to the subject.
This is not a serious issue in this particular matter, as it was a
simple thank-you message out of politeness (which is greatly
appreciated, Amir!).  However, using just a single example should help
to emphasize my point exponentially when you consider the frequency of
occurrences we see following the [SOLVED]-appended route.

    On 12 September, 2007, Zbigniew Szalbot posted a message to the
list about a segmentation fault in PHP 5.2.3.  Over the next 24
hours-plus, exactly sixty comments passed back-and-forth on the
thread.  When a solution was found, it was posted in a separate email
with the [SOLVED] tag added to the subject line, and two additional
comments added to that (entirely new) thread.

    Why is this such a critical issue?  Because if we hope not to have
to answer the same questions over and over again, instructing people
to properly STFW, then we should at least be contributing to proper
archival and documentation of problems we've successfully solved.
Using the aforementioned example, we check Google for the same
problem:

        http://www.google.com/search?q=php+5.2.3+segmentation+fault+core+dumped

    Hooray!  Someone else has had the exact same list of problems, and
now I can simply go through all of the responses and it should
(fingers crossed!) correct my issues as well.

    Message 58.... 59.... getting close!.... sixty-one.... WHAT?!?  No
solution?  Back to Google.... only to find that each result is exactly
the same discussion, never including the final three emails.

    So the summary of my proposal is as follows:

        1.) An issue has been identified with the list whereby
improper archival will likely lead to repeat questions and unnecessary
traffic to the list.
        2.) I propose that we discontinue the act of subject
modification to indicate a change in status of the issue (SOLVED,
ALSO, ANOTHER PROBLEM, etc.) unless a completely different problem is
reached or question is asked.  This will allow a step-by-step document
(of sorts) to be created and made "searchable" on the web.



    Comments welcomed!

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

--- End Message ---

Reply via email to