php-general Digest 28 Sep 2013 12:26:53 -0000 Issue 8380

2013-09-28 Thread php-general-digest-help

php-general Digest 28 Sep 2013 12:26:53 - Issue 8380

Topics (messages 322200 through 322200):

Re: How to capture uploaded file data
322200 by: Bastien

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---


Thanks,

Bastien

 On Sep 27, 2013, at 12:56 AM, Mariusz Drozdowski scheme...@wp.pl wrote:
 
 Hi all php experts,
 
 I would like to ask you all a question, I hope this is the right place
 to ask it.
 
 I'm writing a PHP extension now in c/c++. User uploads a file (could be POST
 or PUT method, but I can limit it to POST only). I need to capture the
 file data while being
 uploaded, without writing it to disk on the server. I need to process
 the data and (maybe,
 depending on a situation) send it somewhere else or save it to disk.
 Of course I know, that I can process the file
 after it has been uploaded (saved on disk on the server), but I would
 like to avoid it.
 I also need to do something opposite: I need to generate a file on the
 fly and send it
 to the user. All metadata of the generated file is known beforehand
 (e.g. size, name).
 
 I've been searching around for some time now and I could not find
 anything even close to the solution.
 Is there any example(s) or existing PHP extension that do(es) something
 like this (at least something simmilar) ?
 If you could give me any pointers that would be awesome.
 
 Thanks for your help 

The question I have is why? Should your upload fail for any reason you've got a 
half processed file that is non-recoverable.  No do-overs. If you stick to the 
standard processes with out the extension,

Upload
Save somewhere (or leave in temp upload folder)
Process
Send result back to user 
Unlink file

Generating the file and sending it to the user is also pretty standard

Create your dataset
Send appropriate headers
Send data
Close connection

For this, there usually isn't a need to save the file. You may run into issues 
streaming the data to certain browsers. 

Also one of the main downsides to your upload is high load situations or large 
file situations (where file size exceeds php's upload limit). 

My personal preference is to save that file to disk so that if needed I can 
work with it later ( if say the server load is high) and email the results to 
the user. 


---End Message---


php-general Digest 29 Sep 2013 02:33:32 -0000 Issue 8381

2013-09-28 Thread php-general-digest-help

php-general Digest 29 Sep 2013 02:33:32 - Issue 8381

Topics (messages 322201 through 322206):

create a local temp table in local machine
322201 by: iccsi
322202 by: Bastien
322203 by: iccsi
322204 by: Bastien
322205 by: iccsi

Switch Statement
322206 by: Ethan Rosenberg

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---

I need create a local table on the local machine.
I would like to know is it possible to down on server side or client side or 
jQuery to do the work.

Your information and help is great appreciated,

regards,


Iccsi, 

---End Message---
---BeginMessage---


Thanks,

Bastien

 On Sep 28, 2013, at 3:24 PM, iccsi inu...@gmail.com wrote:
 
 I need create a local table on the local machine.
 I would like to know is it possible to down on server side or client side or 
 jQuery to do the work.
 Your information and help is great appreciated,
 
 regards,
 
 
 Iccsi

If you're looking to create a SQl table then most but not all browsers can use 
SQLite locally for data storage ( it does require newer browsers). 

You haven't stated the goal for this so other options could include sending csv 
or json data down to the browser and using jquery, angular or some other JS 
framework to manipulate that data may also be an option


---End Message---
---BeginMessage---

Thanks for the message and help,
because I use jQuery autocomplete which has performance issue for thousands 
records due to network load data.
I want to load the data to local table to resolve performance issue, if it 
possible I can load to an array in the memory.


Thanks again for helping,

Regards,

iccsi,

Bastien  wrote in message 
news:2fd3037d-f68d-47b3-ac4f-007d9559d...@gmail.com...




Thanks,

Bastien


On Sep 28, 2013, at 3:24 PM, iccsi inu...@gmail.com wrote:

I need create a local table on the local machine.
I would like to know is it possible to down on server side or client side 
or jQuery to do the work.

Your information and help is great appreciated,

regards,


Iccsi


If you're looking to create a SQl table then most but not all browsers can 
use SQLite locally for data storage ( it does require newer browsers).


You haven't stated the goal for this so other options could include sending 
csv or json data down to the browser and using jquery, angular or some other 
JS framework to manipulate that data may also be an option


---End Message---
---BeginMessage---


 On Sep 28, 2013, at 6:00 PM, iccsi inu...@gmail.com wrote:
 
 Thanks for the message and help,
 because I use jQuery autocomplete which has performance issue for thousands 
 records due to network load data.
 I want to load the data to local table to resolve performance issue, if it 
 possible I can load to an array in the memory.
 
 Thanks again for helping,
 
 Regards,
 
 iccsi,
 
 Bastien  wrote in message 
 news:2fd3037d-f68d-47b3-ac4f-007d9559d...@gmail.com...
 
 
 
 Thanks,
 
 Bastien
 
 On Sep 28, 2013, at 3:24 PM, iccsi inu...@gmail.com wrote:
 
 I need create a local table on the local machine.
 I would like to know is it possible to down on server side or client side or 
 jQuery to do the work.
 Your information and help is great appreciated,
 
 regards,
 
 
 Iccsi
 
 If you're looking to create a SQl table then most but not all browsers can 
 use SQLite locally for data storage ( it does require newer browsers).
 
 You haven't stated the goal for this so other options could include sending 
 csv or json data down to the browser and using jquery, angular or some other 
 JS framework to manipulate that data may also be an option
 

I had exactly this situation, large list with the autocomplete. I cached the 
list to a JS file and ran the autocomplete from that. It works well if the list 
is relatively static which mine was. It will be tougher if the list is dynamic, 
but you could send the data down after the initial page load. 

HTH

Bastien---End Message---
---BeginMessage---

Thanks for the information and help,
Yes, my data is pretty much static,
Can you please give me some link for the solution?
It is the solution I am looking for my current situation,

Thanks a million for helping,

Regards,

Iccsi,

Bastien  wrote in message 
news:deb5dfe9-ec7f-4bc5-9e2e-acfb85039...@gmail.com...





On Sep 28, 2013, at 6:00 PM, iccsi inu...@gmail.com wrote:

Thanks for the message and help,
because I use jQuery autocomplete which has performance issue for 
thousands records due to network load data.
I want to load the data to local table to resolve performance issue, if it 
possible I can load to an array in the memory.


Thanks again for helping,

Regards,

iccsi,

Bastien  wrote in message 

Re: [PHP] How to capture uploaded file data

2013-09-28 Thread Bastien


Thanks,

Bastien

 On Sep 27, 2013, at 12:56 AM, Mariusz Drozdowski scheme...@wp.pl wrote:
 
 Hi all php experts,
 
 I would like to ask you all a question, I hope this is the right place
 to ask it.
 
 I'm writing a PHP extension now in c/c++. User uploads a file (could be POST
 or PUT method, but I can limit it to POST only). I need to capture the
 file data while being
 uploaded, without writing it to disk on the server. I need to process
 the data and (maybe,
 depending on a situation) send it somewhere else or save it to disk.
 Of course I know, that I can process the file
 after it has been uploaded (saved on disk on the server), but I would
 like to avoid it.
 I also need to do something opposite: I need to generate a file on the
 fly and send it
 to the user. All metadata of the generated file is known beforehand
 (e.g. size, name).
 
 I've been searching around for some time now and I could not find
 anything even close to the solution.
 Is there any example(s) or existing PHP extension that do(es) something
 like this (at least something simmilar) ?
 If you could give me any pointers that would be awesome.
 
 Thanks for your help 

The question I have is why? Should your upload fail for any reason you've got a 
half processed file that is non-recoverable.  No do-overs. If you stick to the 
standard processes with out the extension,

Upload
Save somewhere (or leave in temp upload folder)
Process
Send result back to user 
Unlink file

Generating the file and sending it to the user is also pretty standard

Create your dataset
Send appropriate headers
Send data
Close connection

For this, there usually isn't a need to save the file. You may run into issues 
streaming the data to certain browsers. 

Also one of the main downsides to your upload is high load situations or large 
file situations (where file size exceeds php's upload limit). 

My personal preference is to save that file to disk so that if needed I can 
work with it later ( if say the server load is high) and email the results to 
the user. 



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



[PHP] create a local temp table in local machine

2013-09-28 Thread iccsi

I need create a local table on the local machine.
I would like to know is it possible to down on server side or client side or 
jQuery to do the work.

Your information and help is great appreciated,

regards,


Iccsi, 



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



Re: [PHP] create a local temp table in local machine

2013-09-28 Thread Bastien


Thanks,

Bastien

 On Sep 28, 2013, at 3:24 PM, iccsi inu...@gmail.com wrote:
 
 I need create a local table on the local machine.
 I would like to know is it possible to down on server side or client side or 
 jQuery to do the work.
 Your information and help is great appreciated,
 
 regards,
 
 
 Iccsi

If you're looking to create a SQl table then most but not all browsers can use 
SQLite locally for data storage ( it does require newer browsers). 

You haven't stated the goal for this so other options could include sending csv 
or json data down to the browser and using jquery, angular or some other JS 
framework to manipulate that data may also be an option



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



Re: [PHP] create a local temp table in local machine

2013-09-28 Thread iccsi

Thanks for the message and help,
because I use jQuery autocomplete which has performance issue for thousands 
records due to network load data.
I want to load the data to local table to resolve performance issue, if it 
possible I can load to an array in the memory.


Thanks again for helping,

Regards,

iccsi,

Bastien  wrote in message 
news:2fd3037d-f68d-47b3-ac4f-007d9559d...@gmail.com...




Thanks,

Bastien


On Sep 28, 2013, at 3:24 PM, iccsi inu...@gmail.com wrote:

I need create a local table on the local machine.
I would like to know is it possible to down on server side or client side 
or jQuery to do the work.

Your information and help is great appreciated,

regards,


Iccsi


If you're looking to create a SQl table then most but not all browsers can 
use SQLite locally for data storage ( it does require newer browsers).


You haven't stated the goal for this so other options could include sending 
csv or json data down to the browser and using jquery, angular or some other 
JS framework to manipulate that data may also be an option



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



Re: [PHP] create a local temp table in local machine

2013-09-28 Thread Bastien


 On Sep 28, 2013, at 6:00 PM, iccsi inu...@gmail.com wrote:
 
 Thanks for the message and help,
 because I use jQuery autocomplete which has performance issue for thousands 
 records due to network load data.
 I want to load the data to local table to resolve performance issue, if it 
 possible I can load to an array in the memory.
 
 Thanks again for helping,
 
 Regards,
 
 iccsi,
 
 Bastien  wrote in message 
 news:2fd3037d-f68d-47b3-ac4f-007d9559d...@gmail.com...
 
 
 
 Thanks,
 
 Bastien
 
 On Sep 28, 2013, at 3:24 PM, iccsi inu...@gmail.com wrote:
 
 I need create a local table on the local machine.
 I would like to know is it possible to down on server side or client side or 
 jQuery to do the work.
 Your information and help is great appreciated,
 
 regards,
 
 
 Iccsi
 
 If you're looking to create a SQl table then most but not all browsers can 
 use SQLite locally for data storage ( it does require newer browsers).
 
 You haven't stated the goal for this so other options could include sending 
 csv or json data down to the browser and using jquery, angular or some other 
 JS framework to manipulate that data may also be an option
 

I had exactly this situation, large list with the autocomplete. I cached the 
list to a JS file and ran the autocomplete from that. It works well if the list 
is relatively static which mine was. It will be tougher if the list is dynamic, 
but you could send the data down after the initial page load. 

HTH

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



Re: [PHP] create a local temp table in local machine

2013-09-28 Thread iccsi

Thanks for the information and help,
Yes, my data is pretty much static,
Can you please give me some link for the solution?
It is the solution I am looking for my current situation,

Thanks a million for helping,

Regards,

Iccsi,

Bastien  wrote in message 
news:deb5dfe9-ec7f-4bc5-9e2e-acfb85039...@gmail.com...





On Sep 28, 2013, at 6:00 PM, iccsi inu...@gmail.com wrote:

Thanks for the message and help,
because I use jQuery autocomplete which has performance issue for 
thousands records due to network load data.
I want to load the data to local table to resolve performance issue, if it 
possible I can load to an array in the memory.


Thanks again for helping,

Regards,

iccsi,

Bastien  wrote in message 
news:2fd3037d-f68d-47b3-ac4f-007d9559d...@gmail.com...




Thanks,

Bastien


On Sep 28, 2013, at 3:24 PM, iccsi inu...@gmail.com wrote:

I need create a local table on the local machine.
I would like to know is it possible to down on server side or client side 
or jQuery to do the work.

Your information and help is great appreciated,

regards,


Iccsi


If you're looking to create a SQl table then most but not all browsers can 
use SQLite locally for data storage ( it does require newer browsers).


You haven't stated the goal for this so other options could include 
sending csv or json data down to the browser and using jquery, angular or 
some other JS framework to manipulate that data may also be an option




I had exactly this situation, large list with the autocomplete. I cached the 
list to a JS file and ran the autocomplete from that. It works well if the 
list is relatively static which mine was. It will be tougher if the list is 
dynamic, but you could send the data down after the initial page load.


HTH

Bastien= 



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



[PHP] Switch Statement

2013-09-28 Thread Ethan Rosenberg

Dear List -

I have a working program.  I made one change in a switch statement, and 
it does not work.  I'm probably missing something fundamental.


Here are some code SNIPPETS...  [please note that all my debug 
statements are at the left margin]


Setup...

?php
session_start();
session_name(STORE);
set_time_limit(2400);
ini_set('display_errors', 'on');
ini_set('display_startup_errors', 'on');
error_reporting(-2);

ini_set('error_reporting', 'E_ALL | E_STRICT');
ini_set('html_errors', 'On');
ini_set('log_errors', 'On');
require '/home/ethan/P/wk.inc'; //password file
$db = Store;
$cxn =mysqli_connect($host,$user,$password,$db);
if (!$cxn)
{
die('Connect Error (' . mysqli_connect_errno() . ') '
. mysqli_connect_error());
}// no error
if($_REQUEST['welcome_already_seen']!= already_seen)  
  
show_welcome();

//end setup
function show_welcome() //this is the input screen
{
snip

	echo  input type='hidden' name='welcome_already_seen' 
value='already_seen';

echo  input type='hidden' name='next_step' value='step20' /;

snip
}


//end input screen

//Switch statement

echo 'before';
print_r($_POST); //post#1   

switch ( $_POST['next_step'] )
{

case 'step20':
{
pint_r($_POST); //post#2
echo 'step20';
if(!empty($_POST['Cust_Num']))
good();
if(empty($_POST['Cust_Num']))
bad();
break;
} //end step20

snip
} //end switch



post#1

beforeArray
(
[Cust_Num] = 123
[Fname] =
[Lname] =
[Street] =
[City] =
[state] = NY
[Zip] = 10952
[PH1] =
[PH2] =
[PH3] =
[Date] =
[welcome_already_seen] = already_seen
[next_step] = step20

)

Cust_Num state and Zip are as entered.

The switch statement is never entered, since post#2 is never displayed, 
and neither good() or bad() functions are entered.		



TIA

Ethan



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



Re: [PHP] Switch Statement

2013-09-28 Thread Aziz Saleh
Ethan, can you do a var_dump instead of print_r. It might be that next_step
has spaces in it causing the switch to not match.

Aziz


On Sat, Sep 28, 2013 at 10:33 PM, Ethan Rosenberg 
erosenb...@hygeiabiomedical.com wrote:

 Dear List -

 I have a working program.  I made one change in a switch statement, and it
 does not work.  I'm probably missing something fundamental.

 Here are some code SNIPPETS...  [please note that all my debug statements
 are at the left margin]

 Setup...

 ?php
 session_start();
 session_name(STORE);
 set_time_limit(2400);
 ini_set('display_errors', 'on');
 ini_set('display_startup_**errors', 'on');
 error_reporting(-2);

 ini_set('error_reporting', 'E_ALL | E_STRICT');
 ini_set('html_errors', 'On');
 ini_set('log_errors', 'On');
 require '/home/ethan/P/wk.inc'; //password file
 $db = Store;
 $cxn =mysqli_connect($host,$user,$**password,$db);
 if (!$cxn)
 {
 die('Connect Error (' . mysqli_connect_errno() . ') '
 . mysqli_connect_error());
 }// no error
 if($_REQUEST['welcome_already_**seen']!= already_seen)

 show_welcome();

 //end setup
 function show_welcome() //this is the input screen
 {
 snip

 echo  input type='hidden' name='welcome_already_seen'
 value='already_seen';
 echo  input type='hidden' name='next_step' value='step20' /;

 snip
 }


 //end input screen

 //Switch statement

 echo 'before';
 print_r($_POST); //post#1

 switch ( $_POST['next_step'] )
 {

 case 'step20':
 {
 pint_r($_POST); //post#2
 echo 'step20';
 if(!empty($_POST['Cust_Num']))
 good();
 if(empty($_POST['Cust_Num']))
 bad();
 break;
 } //end step20

 snip
 } //end switch



 post#1

 beforeArray
 (
 [Cust_Num] = 123
 [Fname] =
 [Lname] =
 [Street] =
 [City] =
 [state] = NY
 [Zip] = 10952
 [PH1] =
 [PH2] =
 [PH3] =
 [Date] =
 [welcome_already_seen] = already_seen
 [next_step] = step20

 )

 Cust_Num state and Zip are as entered.

 The switch statement is never entered, since post#2 is never displayed,
 and neither good() or bad() functions are entered.


 TIA

 Ethan



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




Re: [PHP] create a local temp table in local machine

2013-09-28 Thread Bastien


Thanks,

Bastien

 On Sep 28, 2013, at 8:24 PM, iccsi inu...@gmail.com wrote:
 
 Thanks for the information and help,
 Yes, my data is pretty much static,
 Can you please give me some link for the solution?
 It is the solution I am looking for my current situation,
 
 Thanks a million for helping,
 
 Regards,
 
 Iccsi,

I don't have a link unfortunately. The system I did it for is proprietary. But 
I do recall it was a pretty switch in the JS to view the list from the static 
file. The JS file with the static data was just an array and the autocomplete 
looked at that as the data source

Sorry

Bastien

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



[PHP] Re: Switch Statement

2013-09-28 Thread Jim Giner

On 9/28/2013 10:33 PM, Ethan Rosenberg wrote:

Dear List -

I have a working program.  I made one change in a switch statement, and
it does not work.  I'm probably missing something fundamental.

Here are some code SNIPPETS...  [please note that all my debug
statements are at the left margin]

Setup...

?php
 session_start();
 session_name(STORE);
 set_time_limit(2400);
 ini_set('display_errors', 'on');
 ini_set('display_startup_errors', 'on');
 error_reporting(-2);

 ini_set('error_reporting', 'E_ALL | E_STRICT');
 ini_set('html_errors', 'On');
 ini_set('log_errors', 'On');
 require '/home/ethan/P/wk.inc'; //password file
 $db = Store;
 $cxn =mysqli_connect($host,$user,$password,$db);
 if (!$cxn)
 {
 die('Connect Error (' . mysqli_connect_errno() . ') '
 . mysqli_connect_error());
 }// no error
 if($_REQUEST['welcome_already_seen']!= already_seen)
 show_welcome();

 //end setup
 function show_welcome() //this is the input screen
 {
 snip

 echo  input type='hidden' name='welcome_already_seen'
value='already_seen';
 echo  input type='hidden' name='next_step' value='step20' /;

 snip
 }


 //end input screen

 //Switch statement

echo 'before';
print_r($_POST); //post#1

 switch ( $_POST['next_step'] )
 {

 case 'step20':
 {
pint_r($_POST);//post#2
echo 'step20';
 if(!empty($_POST['Cust_Num']))
 good();
 if(empty($_POST['Cust_Num']))
 bad();
 break;
 } //end step20

 snip
 } //end switch



post#1

beforeArray
(
 [Cust_Num] = 123
 [Fname] =
 [Lname] =
 [Street] =
 [City] =
 [state] = NY
 [Zip] = 10952
 [PH1] =
 [PH2] =
 [PH3] =
 [Date] =
 [welcome_already_seen] = already_seen
 [next_step] = step20

)

Cust_Num state and Zip are as entered.

The switch statement is never entered, since post#2 is never displayed,
and neither good() or bad() functions are entered.


TIA

Ethan


Once again you are posting code that has no chance of running.  And 
since you are DISABLING error reporting with that -2 value you won't 
even know you have bad code.


Try again.  Post#2 will never display since you aren't printing it.

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



[PHP] Re: Switch Statement

2013-09-28 Thread Jim Giner

?php
 session_start();
 session_name(STORE);
 set_time_limit(2400);
 ini_set('display_errors', 'on');
 ini_set('display_startup_errors', 'on');
 error_reporting(-2);

 ini_set('error_reporting', 'E_ALL | E_STRICT');
 ini_set('html_errors', 'On');
 ini_set('log_errors', 'On');


Ethan,Ethan,Ethan - what is all this stuff you have at the top???  Do 
you know how any of this is supposed to be written?  You can not put 
Constants in quotes - they become just plain strings then, not Constants 
with the predefined values you (and the functions) are expecting.  For 
example, 'on' is NOT the same as the use of the word :  on.  And your 
error_reporting setting (which you are attempting to do TWICE) is 
actually causing your script to NOT show any errors, which is preventing 
you from seeing that your script dies at the misspelled print statement 
and never gets to the pair of if statements that should call your good 
and bad functions.


Hate to do this to you, but you've been attempting to pick up PHP for 
two years now almost and from this latest post you appear to not have 
learned anything.


And WHY would you EVER want to have a time limit of 2400 seconds???

And stop burying functions in the middle of your straight line code. 
It's ridiculous and makes reading your scripts a royal PIA.




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



Re: [PHP] create a local temp table in local machine

2013-09-28 Thread iccsi

Thanks for the message,
Do you have any information how to create JS file and how to access from 
jQuery auto complete?

Thanks again for helping,

Regards,

Iccsi,



Bastien  wrote in message 
news:57469e24-56e6-40c9-8176-64cd8444f...@gmail.com...




Thanks,

Bastien


On Sep 28, 2013, at 8:24 PM, iccsi inu...@gmail.com wrote:

Thanks for the information and help,
Yes, my data is pretty much static,
Can you please give me some link for the solution?
It is the solution I am looking for my current situation,

Thanks a million for helping,

Regards,

Iccsi,


I don't have a link unfortunately. The system I did it for is proprietary. 
But I do recall it was a pretty switch in the JS to view the list from the 
static file. The JS file with the static data was just an array and the 
autocomplete looked at that as the data source


Sorry

Bastien 



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



Re: [PHP] Re: Switch Statement

2013-09-28 Thread Ethan Rosenberg

On 09/28/2013 11:59 PM, Jim Giner wrote:

?php
 session_start();
 session_name(STORE);
 set_time_limit(2400);
 ini_set('display_errors', 'on');
 ini_set('display_startup_errors', 'on');
 error_reporting(-2);

 ini_set('error_reporting', 'E_ALL | E_STRICT');
 ini_set('html_errors', 'On');
 ini_set('log_errors', 'On');


Ethan,Ethan,Ethan - what is all this stuff you have at the top???  Do
you know how any of this is supposed to be written?  You can not put
Constants in quotes - they become just plain strings then, not Constants
with the predefined values you (and the functions) are expecting.  For
example, 'on' is NOT the same as the use of the word :  on.  And your
error_reporting setting (which you are attempting to do TWICE) is
actually causing your script to NOT show any errors, which is preventing
you from seeing that your script dies at the misspelled print statement
and never gets to the pair of if statements that should call your good
and bad functions.

Hate to do this to you, but you've been attempting to pick up PHP for
two years now almost and from this latest post you appear to not have
learned anything.

And WHY would you EVER want to have a time limit of 2400 seconds???

And stop burying functions in the middle of your straight line code.
It's ridiculous and makes reading your scripts a royal PIA.


Jim -

Thanks.

Changed error_reporting to -1. No error messages. No change in output.

Ethan

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



Re: [PHP] Switch Statement

2013-09-28 Thread Ethan Rosenberg

On 09/28/2013 10:53 PM, Aziz Saleh wrote:

Ethan, can you do a var_dump instead of print_r. It might be that next_step
has spaces in it causing the switch to not match.

Aziz



snip

Aziz -

Used var_dump no further information

Ethan


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



Re: [PHP] Re: Switch Statement

2013-09-28 Thread Jim Giner

On 9/29/2013 1:29 AM, Ethan Rosenberg wrote:

On 09/28/2013 11:59 PM, Jim Giner wrote:

?php
 session_start();
 session_name(STORE);
 set_time_limit(2400);
 ini_set('display_errors', 'on');
 ini_set('display_startup_errors', 'on');
 error_reporting(-2);

 ini_set('error_reporting', 'E_ALL | E_STRICT');
 ini_set('html_errors', 'On');
 ini_set('log_errors', 'On');


Ethan,Ethan,Ethan - what is all this stuff you have at the top???  Do
you know how any of this is supposed to be written?  You can not put
Constants in quotes - they become just plain strings then, not Constants
with the predefined values you (and the functions) are expecting.  For
example, 'on' is NOT the same as the use of the word :  on.  And your
error_reporting setting (which you are attempting to do TWICE) is
actually causing your script to NOT show any errors, which is preventing
you from seeing that your script dies at the misspelled print statement
and never gets to the pair of if statements that should call your good
and bad functions.

Hate to do this to you, but you've been attempting to pick up PHP for
two years now almost and from this latest post you appear to not have
learned anything.

And WHY would you EVER want to have a time limit of 2400 seconds???

And stop burying functions in the middle of your straight line code.
It's ridiculous and makes reading your scripts a royal PIA.


Jim -

Thanks.

Changed error_reporting to -1. No error messages. No change in output.

Ethan

CORRECT ALL THE WRONG SHIT AND YOULL GET ERROR MESSAGES!!!

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



Re: [PHP] Re: Switch Statement

2013-09-28 Thread Jim Giner

On 9/29/2013 1:38 AM, Jim Giner wrote:

   session_start();
 session_name(STORE);
 set_time_limit(2400);
 ini_set('display_errors', 'on');
 ini_set('display_startup_errors', 'on');
 error_reporting(-2);

 ini_set('error_reporting', 'E_ALL | E_STRICT');
 ini_set('html_errors', 'On');
 ini_set('log_errors', 'On');

This is what you should have in place of all of the above:

session_start();
error_reporting(E_ALL | E_STRICT | E_NOTICE);	ini_set('display_errors', 
'1');

set_time_limit(2);// if you use more than 2 secs you have a problem




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