Re: [PHP] Forgot what to install

2010-04-08 Thread shiplu
A tip for you. If you have internet access, type in sudo apt-get install phpmyadmin This will install all the dependencies and your server will be ready. On 4/9/10, David McGlone wrote: > Hey guys, quick question. I had to re-install my Ubuntu, and I forgot > what package I needed so firefox will

Re: [PHP] No notices for undefined index

2010-04-08 Thread shiplu
Hello Shawn, Why dont you report a bug? When we know the expected behavior or the way it SHOULD behave. and its not behaving that way. Its certainly a bug.. Only then we can know the real reason why the novicas are not showing up. On 4/8/10, Shawn McKenzie wrote: > So the first two print statemen

Re: [PHP] Forgot what to install

2010-04-08 Thread viraj
it's apache2 module for php #apt-cache search php5 apache libapache2-mod-php5 - server-side, HTML-embedded scripting language (Apache 2 module) ~viraj On Fri, Apr 9, 2010 at 8:32 AM, David McGlone wrote: > Hey guys, quick question. I had to re-install my Ubuntu, and I forgot > what package I ne

Re: [PHP] Forgot what to install

2010-04-08 Thread kranthi
you forgot httpd KK. On Fri, Apr 9, 2010 at 08:32, David McGlone wrote: > Hey guys, quick question. I had to re-install my Ubuntu, and I forgot > what package I needed so firefox will display the php files and not ask > me to if I want to download them. I've done installed PHP5, mysql, and > ph

[PHP] Forgot what to install

2010-04-08 Thread David McGlone
Hey guys, quick question. I had to re-install my Ubuntu, and I forgot what package I needed so firefox will display the php files and not ask me to if I want to download them. I've done installed PHP5, mysql, and php-mysql. What did I miss. I know the package name, but it's completely slipping my m

Re: [PHP] No notices for undefined index

2010-04-08 Thread kranthi
>> print $a[0]; // prints 5 >> print $a[100]; // Notice: Uninitialized string offset: 100 Yup, this should happen when 5 is treated as an array of characters. In other words as a string. $a = '5'; echo $a[0]; echo $a[100]; gives you the expected result regarding the original question, i think t

Re: [PHP] No notices for undefined index

2010-04-08 Thread Ashley Sheridan
On Thu, 2010-04-08 at 15:22 -0500, Shawn McKenzie wrote: > Shawn McKenzie wrote: > > Bob McConnell wrote: > >> In the first case, $a=5 creates a multi-typed variable. The interpreter > >> makes its best guess how the next two expressions should be interpreted. > >> In both cases, they look a lot l

Re: [PHP] Who uses Mantis, please help!

2010-04-08 Thread Jonathan Vivero
Review your mantis mail settings. If I remember well, there are two possibilities, direct (pop3) mail or phpmailer. In www.mantisbt.org you can find all information you need. I've been in the same situation, and found out how to resolve it with success. 2010/4/7 Paul M Foster > On Wed, Apr 07,

Re: [PHP] No notices for undefined index

2010-04-08 Thread Shawn McKenzie
Shawn McKenzie wrote: > Bob McConnell wrote: >> In the first case, $a=5 creates a multi-typed variable. The interpreter >> makes its best guess how the next two expressions should be interpreted. >> In both cases, they look a lot like an index into a character array >> (string), and 'test' evaluate

Re: [PHP] No notices for undefined index

2010-04-08 Thread Shawn McKenzie
Bob McConnell wrote: > In the first case, $a=5 creates a multi-typed variable. The interpreter > makes its best guess how the next two expressions should be interpreted. > In both cases, they look a lot like an index into a character array > (string), and 'test' evaluates numerically to zero. Both

Re: [PHP] No notices for undefined index

2010-04-08 Thread Shawn McKenzie
Andre Polykanine wrote: > Hello Shawn, > > Hm... isn't it expected behavior? Since you haven't defined a > $a['test'] item, PHP throws a notice... or I'm wrong? Yes it is expected. I'm saying the opposite that it doesn't in the first case. -- Thanks! -Shawn http://www.spidean.com -- PHP Gene

[PHP] APC with horde/imp: 99.9% miss rate and only one cached file

2010-04-08 Thread Derek Chen-Becker
I suspect I've either done something horribly wrong or found a weird bug, probably the former. I'm running PHP 5.2.13 on Solaris 10 under Apache 2.2.14. Memory usage is 98.8% free (default 1 slice of 30MB). Here are stats on the cache: Cached Files1 (288.2 KBytes) Hits

Re: [PHP] Little php code - error

2010-04-08 Thread Jim Lucas
Paul M Foster wrote: > On Thu, Apr 08, 2010 at 04:26:08PM +0100, Ashley Sheridan wrote: > >> On Thu, 2010-04-08 at 12:17 -0300, Juan wrote: >> >>> 2010/4/8 Richard Quadling : On 8 April 2010 15:21, Juan wrote: > Hi guys, > I'm having trouble with the following little php code [0]. Th

RE: [PHP] No notices for undefined index

2010-04-08 Thread Bob McConnell
In the first case, $a=5 creates a multi-typed variable. The interpreter makes its best guess how the next two expressions should be interpreted. In both cases, they look a lot like an index into a character array (string), and 'test' evaluates numerically to zero. Both are valid offsets for a strin

Re: [PHP] No notices for undefined index

2010-04-08 Thread Andre Polykanine
Hello Shawn, Hm... isn't it expected behavior? Since you haven't defined a $a['test'] item, PHP throws a notice... or I'm wrong? -- With best regards from Ukraine, Andre Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 19

Re: [PHP] No notices for undefined index

2010-04-08 Thread Ashley Sheridan
On Thu, 2010-04-08 at 12:36 -0500, Shawn McKenzie wrote: > So the first two print statements generate NO notices, while the second > obviously generates: > > Notice: Undefined offset: 1 in /home/shawn/www/test.php on line 11 > > Notice: Undefined index: test in /home/shawn/www/test.php on line

[PHP] No notices for undefined index

2010-04-08 Thread Shawn McKenzie
So the first two print statements generate NO notices, while the second obviously generates: Notice: Undefined offset: 1 in /home/shawn/www/test.php on line 11 Notice: Undefined index: test in /home/shawn/www/test.php on line 12 This sucks. A bug??? error_reporting(E_ALL); ini_set('display_e

Re: [PHP] contant /

2010-04-08 Thread John Black
On 04/08/2010 06:51 PM, Andre Polykanine wrote: > 2. (Just a suggestion) It's better to put the SQL tables and > fields between grave accents (backquotes). But if you do that then you will have to remove them again when you decide to switch or support PostgreSQL. -- John After coming into cont

Re: [PHP] contant /

2010-04-08 Thread Andre Polykanine
Hello Jack, I have tons of errors like this and now I'm eliminating them, so I'll tell what to do: 1. Put apostrophes (single quotes) around the array item: $auth['company_name'] instead of $auth[company_name]; 2. (Just a suggestion) It's better to put the SQL tables and fields between grave accen

Re: [PHP] contant /

2010-04-08 Thread Ashley Sheridan
On Thu, 2010-04-08 at 12:26 -0400, Jack wrote: > I get a couple of errors like this one for undefined variable: > > PHP Notice: Undefined variable: s_company_name > > And this one for undefined contstant > > PHP Notice: Use of undefined constant account_type - assumed 'account_type' > > >

Re: [PHP] contant /

2010-04-08 Thread Dan Joseph
On Thu, Apr 8, 2010 at 12:26 PM, Jack wrote: > I get a couple of errors like this one for undefined variable: > > PHP Notice: Undefined variable: s_company_name > > And this one for undefined contstant > > PHP Notice: Use of undefined constant account_type - assumed > 'account_type' > f_put_co

[PHP] contant /

2010-04-08 Thread Jack
I get a couple of errors like this one for undefined variable: PHP Notice: Undefined variable: s_company_name And this one for undefined contstant PHP Notice: Use of undefined constant account_type - assumed 'account_type' I am putting a piece of code from each so that hopefully someone ca

Re: [PHP] Little php code - error

2010-04-08 Thread Ashley Sheridan
On Thu, 2010-04-08 at 12:00 -0400, Paul M Foster wrote: > On Thu, Apr 08, 2010 at 04:26:08PM +0100, Ashley Sheridan wrote: > > > On Thu, 2010-04-08 at 12:17 -0300, Juan wrote: > > > > > 2010/4/8 Richard Quadling : > > > > On 8 April 2010 15:21, Juan wrote: > > > >> Hi guys, > > > >> I'm having

Re: [PHP] Little php code - error

2010-04-08 Thread Paul M Foster
On Thu, Apr 08, 2010 at 04:26:08PM +0100, Ashley Sheridan wrote: > On Thu, 2010-04-08 at 12:17 -0300, Juan wrote: > > > 2010/4/8 Richard Quadling : > > > On 8 April 2010 15:21, Juan wrote: > > >> Hi guys, > > >> I'm having trouble with the following little php code [0]. The output > > >> from th

Re: [PHP] Little php code - error

2010-04-08 Thread Ashley Sheridan
On Thu, 2010-04-08 at 12:17 -0300, Juan wrote: > 2010/4/8 Richard Quadling : > > On 8 April 2010 15:21, Juan wrote: > >> Hi guys, > >> I'm having trouble with the following little php code [0]. The output > >> from the server is : " > >> * Parse error: syntax error, unexpected '{' in file.php on

Re: [PHP] Little php code - error

2010-04-08 Thread Juan
2010/4/8 Richard Quadling : > On 8 April 2010 15:21, Juan wrote: >> Hi guys, >> I'm having trouble with the following little php code [0]. The output >> from the server is : " >> * Parse error: syntax error, unexpected '{' in file.php on line 27 * >> >> Let's assume that file.php is the file that

Re: [PHP] Little php code - error

2010-04-08 Thread Richard Quadling
On 8 April 2010 15:21, Juan wrote: > Hi guys, > I'm having trouble with the following little php code [0]. The output > from the server is : " > * Parse error: syntax error, unexpected '{' in file.php on line 27 * > > Let's assume that file.php is the file that is giving me some troubles. > > The

Re: [PHP] Little php code - error

2010-04-08 Thread Richard Quadling
On 8 April 2010 15:21, Juan wrote: > Hi guys, > I'm having trouble with the following little php code [0]. The output > from the server is : " > * Parse error: syntax error, unexpected '{' in file.php on line 27 * > > Let's assume that file.php is the file that is giving me some troubles. > > The

Re: [PHP] Little php code - error

2010-04-08 Thread Peter Lind
On 8 April 2010 16:30, David Otton wrote: > On 8 April 2010 15:21, Juan wrote: > >> The structure is pretty easy to understand, however I'm not able to >> solve this. Could you tell me why I'm not able to run this code. > > Your else has a condition on it > > } else (empty($b) and empty($c)) { >

Re: [PHP] Little php code - error

2010-04-08 Thread David Otton
On 8 April 2010 15:21, Juan wrote: > The structure is pretty easy to understand, however I'm not able to > solve this. Could you tell me why I'm not able to run this code. Your else has a condition on it } else (empty($b) and empty($c)) { Should be } else { BTW, the "and" is fine. -- PHP G

Re: [PHP] Little php code - error

2010-04-08 Thread Dan Joseph
On Thu, Apr 8, 2010 at 10:21 AM, Juan wrote: > Hi guys, > I'm having trouble with the following little php code [0]. The output > from the server is : " > * Parse error: syntax error, unexpected '{' in file.php on line 27 * > Sorry, I gave you bad information... Its the else line. else doesn't

Re: [PHP] Little php code - error

2010-04-08 Thread Dan Joseph
On Thu, Apr 8, 2010 at 10:21 AM, Juan wrote: > Hi guys, > I'm having trouble with the following little php code [0]. The output > from the server is : " > * Parse error: syntax error, unexpected '{' in file.php on line 27 * > > Let's assume that file.php is the file that is giving me some trouble

Re: [PHP] Sort two coupled arrays {my solution]

2010-04-08 Thread Robert Cummings
tedd wrote: At 8:28 AM -0400 4/8/10, Andrew Ballard wrote: On Wed, Apr 7, 2010 at 6:46 PM, Ryan Sun wrote: > rsort(array_combine(array2, array1)); you should expect array( 'Personal Email' => 75, 'USPS mail' => 40, 'Personal Phone' => 31, 'Web site' => 31, 'Text Message' => 31

Re: [PHP] Little php code - error

2010-04-08 Thread Devendra Jadhav
Can you paste your code somewhere? On Thu, Apr 8, 2010 at 7:51 PM, Juan wrote: > Hi guys, > I'm having trouble with the following little php code [0]. The output > from the server is : " > * Parse error: syntax error, unexpected '{' in file.php on line 27 * > > Let's assume that file.php is the

[PHP] Little php code - error

2010-04-08 Thread Juan
Hi guys, I'm having trouble with the following little php code [0]. The output from the server is : " * Parse error: syntax error, unexpected '{' in file.php on line 27 * Let's assume that file.php is the file that is giving me some troubles. The structure is pretty easy to understand, however I'

Re: [PHP] Sort two coupled arrays {my solution]

2010-04-08 Thread Andrew Ballard
On Thu, Apr 8, 2010 at 9:55 AM, tedd wrote: > At 8:28 AM -0400 4/8/10, Andrew Ballard wrote: >> >> On Wed, Apr 7, 2010 at 6:46 PM, Ryan Sun wrote: >> >>  > >>> >>>  rsort(array_combine(array2, array1)); >>> >>>  you should expect array( >>>  'Personal Email' => 75, >>>  'USPS mail' => 40, >>>  'P

RE: [PHP] Beginner's question: How to run a PHP web application locally?

2010-04-08 Thread Tom Calpin
>> Hi List, >> >> The other day, I read an article that mentioned about a tool that would >> permit to simulate a web environment for PHP, so that testing could be made >> before uploading the page on the server. Unfortunately, I don't seem to find >> the article again. >> >> So here am I

Re: [PHP] Sort two coupled arrays {my solution]

2010-04-08 Thread tedd
At 8:28 AM -0400 4/8/10, Andrew Ballard wrote: On Wed, Apr 7, 2010 at 6:46 PM, Ryan Sun wrote: > rsort(array_combine(array2, array1)); you should expect array( 'Personal Email' => 75, 'USPS mail' => 40, 'Personal Phone' => 31, 'Web site' => 31, 'Text Message' => 31 ) logically

Re: [PHP] Sort two coupled arrays {my solution]

2010-04-08 Thread tedd
At 6:46 PM -0400 4/7/10, Ryan Sun wrote: rsort(array_combine(array2, array1)); you should expect array( 'Personal Email' => 75, 'USPS mail' => 40, 'Personal Phone' => 31, 'Web site' => 31, 'Text Message' => 31 ) logically, the items are your key but not the count of votes Logically

Re: [PHP] Sort two coupled arrays {my solution]

2010-04-08 Thread Andrew Ballard
On Wed, Apr 7, 2010 at 6:46 PM, Ryan Sun wrote: > On Wed, Apr 7, 2010 at 6:29 PM, tedd wrote: [snip] >> >> Let's look at the problem again (a vote collection problem): >> >> Array 1 >> ( >>    [1] => 75 >>    [2] => 31 >>    [3] => 31 >>    [4] => 31 >>    [5] => 40 >> ) >> >> Array 1 is an arr

Re: [PHP] Beginner's question: How to run a PHP web application locally?

2010-04-08 Thread Ashley Sheridan
On Thu, 2010-04-08 at 17:24 +0530, Midhun Girish wrote: > The best option in windows would be xampp or wamp same goes true > with linux. > > > Midhun Girish > > > > On Thu, Apr 8, 2010 at 5:12 PM, Bastien Helders > wrote: > > Hi List, > > > > The other day, I read an article that me

Re: [PHP] Beginner's question: How to run a PHP web application locally?

2010-04-08 Thread Midhun Girish
The best option in windows would be xampp or wamp same goes true with linux. Midhun Girish On Thu, Apr 8, 2010 at 5:12 PM, Bastien Helders wrote: > Hi List, > > The other day, I read an article that mentioned about a tool that would > permit to simulate a web environment for PHP, so t

Re: [PHP] Beginner's question: How to run a PHP web application locally?

2010-04-08 Thread Ashley Sheridan
On Thu, 2010-04-08 at 13:42 +0200, Bastien Helders wrote: > Hi List, > > The other day, I read an article that mentioned about a tool that would > permit to simulate a web environment for PHP, so that testing could be made > before uploading the page on the server. Unfortunately, I don't seem to

[PHP] Beginner's question: How to run a PHP web application locally?

2010-04-08 Thread Bastien Helders
Hi List, The other day, I read an article that mentioned about a tool that would permit to simulate a web environment for PHP, so that testing could be made before uploading the page on the server. Unfortunately, I don't seem to find the article again. So here am I with this question: What should