[PHP] Uploading Large Files - Strange Issue

2008-08-06 Thread Anna Vester
Hello group,

I have a very strange issue coming up when uploading large files ( about
30MB). The problem is it works fine on my computer (and two others that I've
tested), but it doesn't work on my client's laptop. It comes up with error
code - 0 (which is upload successful), but the actual file is not on the
server. Here is my error checking code:

if ($sizeOK  $typeOK) {
switch($_FILES['items']['error'][$number]) {
case 0:
if(!file_exists(UPLOAD_DIR.$file)) {
$success =
move_uploaded_file($_FILES['items']['tmp_name'][$number], UPLOAD_DIR.$file);
}
else {
$success = 
move_uploaded_file($_FILES['items']['tmp_name'][$number],
UPLOAD_DIR.$postDate.$file);
$cp = true;

}

if ($success) {
$result[] = $file uploaded successfully;
} 
else {
$result[] = Error uploading $file. Please
try again.;
}
break;
case 3:
$result[] = Error uploading $file. Please try
again.;
default:
$result[] = System error uploading $file. Contact
Webmaster.;
}
}
elseif ($_FILES['items']['error'][$number] == 4) {
$result[] = 'You chose not to add this file.';
}
else {
$result[] = $file cannot be uploaded. Maximum size: $max.br /
Acceptable file types: pdf and mp3.br /Error number:  .
$_FILES['items']['error'][$number].br /;
}
=

So for some reason on his computer it doesn't go to the switch statement
(case 0), but goes to the very last else statement. 

So he always get this message:
bigfiles.mp3 cannot be uploaded. Maximum size: 51,000.00KB.
Acceptable file types: pdf and mp3
Error number: 0

Yet, it always seems to work when I do it on my computer.

Any insight into this issue would be very helpful.

Thank you.

Anna Vester



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



RE: [PHP] Uploading Large Files - Strange Issue

2008-08-06 Thread Anna Vester
[snip]
-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2008 9:44 PM
To: Anna Vester; php-general@lists.php.net
Subject: RE: [PHP] Uploading Large Files - Strange Issue

It is likely that it is not PHP causing the issue. What browser is he
using? What are his security settings for the browser? Have you viewed
the source of the upload form on his browser? 
[/snip]

He is using IE7 on Vista, he has a number of fishing add-ons (I don't
remember which exactly since I've seen his laptop only once before this
problem arose). Also he's been using You send it service just fine. That's
what bums me!

Thanks for such a quick response.

Anna 


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



Re: [PHP] Not quite OT but maybe close... Help with MySQL

2007-08-08 Thread Anna Vester
On 8/8/07, Jason Pruim [EMAIL PROTECTED] wrote:
 Hey everyone,

 I tried asking this question on the MySQL list but haven't gotten
 very many helpful responses... Does anyone know how to successfully
 import a excel file into MySQL (To make it on topic) Using PHP? I
 have tried using LOAD FILE in mysql and it just imports the first row
 of my excel file with no errors...

 Any ideas?
 --

Hey Jason,

Take a look at this link - http://www.modwest.com/help/kb6-253.html
The very first user commend/code might be something that you are looking for...

Hope this helps,

-- 
Anna Vester
Web Designer
http://www.veanndesign.com

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



Re: [PHP] PHP sorting csv array output

2007-05-15 Thread Anna Vester

Yep, that would be the perfect solution, but, unfortunately, database
is not an option for this project. Thanks for looking! I did get a
solution though from another list.
Here is a working version:

http://veanndesign.com/sorting.php

compare it to the not working one:

http://veanndesign.com/test.php

Anyways, thanks again!

Anna

On 5/13/07, Richard Lynch [EMAIL PROTECTED] wrote:

If you are going to sort it by various fields, I'd just throw it into
a database...

That said, http://php.net/usort should be able to do whatever you want.

On Thu, May 10, 2007 2:18 pm, Anna Vester wrote:
 Hello all,

 I have a question concerning .CSV array sorting. I have tried googling
 for an answer and have tried different techniques, but nothing seems
 to works as I would like it to work. Here is my situation:
 Test file is located here: http://veanndesign.com/test.php

 I would like to be able to sort the output by the Time Zone (or any
 other fields). Here is how my code looks like:
 http://veanndesign.com/test.html

 I believe that I need to get all the data from the .csv file dumped
 into 1 array, and I guess I am struggling at that point. I have tried
 using foreach inside of the while loop, but it doesn't seem to work.
 So what is the best and/or right way to sort this type of data?

 Hopefully, this email makes sense.

 Thanks in advance.

 --
 Anna Vester
 Web Designer
 http://www.veanndesign.com

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




--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?





--
Anna Vester
Web Designer
http://www.veanndesign.com

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



[PHP] PHP sorting csv array output

2007-05-10 Thread Anna Vester

Hello all,

I have a question concerning .CSV array sorting. I have tried googling
for an answer and have tried different techniques, but nothing seems
to works as I would like it to work. Here is my situation:
Test file is located here: http://veanndesign.com/test.php

I would like to be able to sort the output by the Time Zone (or any
other fields). Here is how my code looks like:
http://veanndesign.com/test.html

I believe that I need to get all the data from the .csv file dumped
into 1 array, and I guess I am struggling at that point. I have tried
using foreach inside of the while loop, but it doesn't seem to work.
So what is the best and/or right way to sort this type of data?

Hopefully, this email makes sense.

Thanks in advance.

--
Anna Vester
Web Designer
http://www.veanndesign.com

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



Re: [PHP] PHP sorting csv array output

2007-05-10 Thread Anna Vester

On 5/10/07, Daniel Brown [EMAIL PROTECTED] wrote:


One place to start reading, Anna, would be the PHP manual for the
fgetcsv() function, which is specifically for CSV parsing.

http://www.php.net/fgetcsv


Thanks for your quick reply Daniel. Yes I've seen that function before
and i am using it to parse the file, which displays fine. I just need
to be able to sort that data (by Time Zone) prior to displaying. Sorry
If I wasn't clear.

Thanks.


--
Anna Vester
Web Designer
http://www.veanndesign.com

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



Re: [PHP] CSS vs. Tables OT

2007-04-17 Thread Anna V

On 4/17/07, Robert Cummings [EMAIL PROTECTED] wrote:


On Tue, 2007-04-17 at 18:53 -0500, Larry Garfield wrote:
 On Tuesday 17 April 2007 3:40 pm, Robert Cummings wrote:

   BTW, any web developer worth his or her salt with a reasonable
amount of
   practice can make CSS layouts that resize as well as table based
layouts
   everyday of the week. I will refer you to
http://www.csszengarden.com/
 
  Only with hacks.

 Using tables for layout *is* a hack.  A common one, but still a hack.

No, it's old school, the only way to do complex layout in the past. At
least tables are backward and forward compatible. CSS is only
semi-forward compatible.

Cheers,
Rob.



I've never never had used tables for layouts (I worked on pretty
complicated projects)... Heck, http://espn.com is CSS based, and it looks
pretty darn amazing.  Just my quick thought on this. :)
--
Anna Vester
Web Designer
http://www.veanndesign.com


Re: [PHP] CSS vs. Tables OT

2007-04-17 Thread Anna V

On 4/17/07, Robert Cummings [EMAIL PROTECTED] wrote:


On Tue, 2007-04-17 at 21:28 -0500, Anna V wrote:
 On 4/17/07, Robert Cummings [EMAIL PROTECTED] wrote:
 
  On Tue, 2007-04-17 at 18:53 -0500, Larry Garfield wrote:
   On Tuesday 17 April 2007 3:40 pm, Robert Cummings wrote:
  
 BTW, any web developer worth his or her salt with a reasonable
  amount of
 practice can make CSS layouts that resize as well as table based
  layouts
 everyday of the week. I will refer you to
  http://www.csszengarden.com/
   
Only with hacks.
  
   Using tables for layout *is* a hack.  A common one, but still a
hack.
 
  No, it's old school, the only way to do complex layout in the past. At
  least tables are backward and forward compatible. CSS is only
  semi-forward compatible.
 
  Cheers,
  Rob.
 
 
  I've never never had used tables for layouts (I worked on pretty
 complicated projects)... Heck, http://espn.com is CSS based, and it
looks
 pretty darn amazing.  Just my quick thought on this. :)

They certainly use CSS AND they use table for the main layout. Thank
you, thank you very much.

Cheers,
Rob.
--



Looks like, the only table they use is for the ad_container.

--
Anna Vester
Web Designer
http://www.veanndesign.com


Re: [PHP] CSS vs. Tables OT

2007-04-17 Thread Anna V

On 4/17/07, Paul Novitski [EMAIL PROTECTED] wrote:


At 4/17/2007 07:53 PM, Robert Cummings wrote:
On Tue, 2007-04-17 at 21:28 -0500, Anna V wrote:
   I've never never had used tables for layouts (I worked on pretty
  complicated projects)... Heck, http://espn.com is CSS based, and it
looks
  pretty darn amazing.  Just my quick thought on this. :)

They certainly use CSS AND they use table for the main layout.


Just to be accurate: if you look at the espn.com source you'll see
that the only table on the page contains an advertisement in the
masthead and doesn't contain the main layout.  Because it's the
exception and because it's an ad, my guess is that it's markup
imposed on the designers from the outside.  I didn't see a similar
structure on the few sub-pages I glanced at, so it doesn't appear to
be part of the overall layout strategy.

Regards,

Paul



Exactly, that's what I was trying to express... sometimes you can not
control what is coming to your website through advertisements' content.

--
Anna


Re: [PHP] web browser shows blank page when accessing *.php file

2006-10-02 Thread Anna Barnes

Dear All
I just thought I'd drop you a line about how I fixed this in the  
end.  I had an idea that because the ical I was loading had about  
24months worth of data it was taking too long so I just created a new  
one and published that. It now works, however, it does stall  
sometimes in which case I have to open a new web browser window and  
retype the url (regardless of the web browser)


Thanks
Anna
www.fmri.org/calendar

On Sep 21, 2006, at 5:46 PM, Martin Marques wrote:



On Thu, 21 Sep 2006 17:13:44 -0400, Anna Barnes  
[EMAIL PROTECTED] wrote:


and the error_log file says

[Tue Sep 19 15:53:57 2006] [error] PHP Fatal error: Maximum execution
time of 60 seconds exceeded in /websites/ical/functions/
ical_parser.php on line 494


What is there in line 494 of ical_parser.php?

--
-
Lic. Martín Marqués |   SELECT 'mmarques' ||
Centro de Telemática|   '@' || 'unl.edu.ar';
Universidad Nacional|   DBA, Programador,
del Litoral |   Administrador
-




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



[PHP] Re: web browser shows blank page when accessing *.php file

2006-09-22 Thread Anna Barnes

Hi All
This is all very weird and it may be that it isn't a php problem  
after all.


Here is line 494 in ical_parser.php
 ereg (([^:]+):(.*), $line

Additional information is
a) the mac that publishes the ical is always up, no probs there  
although I should check if a system update has been done recently.
b) The webserver that hosts the calendar is definitely up because all  
the other web pages work.
c) The athentication definitely works since if I put in the wrong  
username and password it comes back with an error.
d) the whole thing worked perfectly until a few days ago. I've  
managed to get it up again by restarting httpd but then it fails  
again shortly after.

e) I've made no changes to the webserver.
f) Is it possible that its trying to access too much data from the  
calendar i.e it is possible to go back 18 months and look at the  
schedule.


I'm just about to archive the existing scanner.ics file and republish  
another one to see it that works.

thanks
Anna

On Sep 22, 2006, at 8:06 AM, Kae Verens wrote:


Anna Barnes wrote:

[Tue Sep 19 15:53:57 2006] [error] PHP Fatal error: Maximum  
execution time of 60 seconds exceeded in /websites/ical/functions/ 
ical_parser.php on line 494

Not quite sure where to go from here.


ical_parser sounds like it is a function which sucks in  
information from other computers. if one of those computers is  
down, then your program will probably timeout while waiting for the  
information.


Kae


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



[PHP] web browser shows blank page when accessing *.php file

2006-09-21 Thread Anna Barnes
We are publishing an ical calendar from a mac on a webserver running  
apache on solaris 8. However, its suddenly stopped working via  
webrowser. I have tried to stop and start the httpd to get it going  
again but to no avail.


when I access through safari or explorer on OSX.4 the access_log file  
says


mac-abarnes.fmri.columbia.edu - abarnes [19/Sep/2006:15:51:47 -0400]  
GET / HTTP/1.1 302 5
mac-abarnes.fmri.columbia.edu - abarnes [19/Sep/2006:15:52:47 -0400]  
GET /week.php HTTP/1.1 200 5


and the error_log file says

[Tue Sep 19 15:53:57 2006] [error] PHP Fatal error: Maximum execution  
time of 60 seconds exceeded in /websites/ical/functions/ 
ical_parser.php on line 494


Not quite sure where to go from here.

thanks
Anna
http://ical.fmri.columbia.edu/week.php

Re: [PHP] web browser shows blank page when accessing *.php file

2006-09-21 Thread anna barnes

Hi Curt and Martin,
Thanks for getting back to me.  I'll take a look at the exact line 474 
tomorrow. The reason I didn't mention it specifically is that it's only 
suddenly stopped working and nothing in that code has changed.


It doesn't work in any browser, netscape, IE, firefox etc on Solaris9 or 
WindowsXP


The 'signature url' is actually the calendar function that doesn't work. 
I wanted to know if it works outside our LAN.  What's weird is that it 
asks for the username and password, it authenticates but then won't load 
the page.


kindest regards
Anna

Curt Zirzow wrote:


On 9/21/06, Anna Barnes [EMAIL PROTECTED] wrote:


We are publishing an ical calendar from a mac on a webserver running
apache on solaris 8. However, its suddenly stopped working via
webrowser. I have tried to stop and start the httpd to get it going
again but to no avail.

when I access through safari or explorer on OSX.4 the access_log file
says



You are being rather specific to browsers, so does this mean this
behaviour doesn't happen when you use Firefox on OSX or IE/FF on
windows?



mac-abarnes.fmri.columbia.edu - abarnes [19/Sep/2006:15:51:47 -0400]
GET / HTTP/1.1 302 5
mac-abarnes.fmri.columbia.edu - abarnes [19/Sep/2006:15:52:47 -0400]
GET /week.php HTTP/1.1 200 5

and the error_log file says

[Tue Sep 19 15:53:57 2006] [error] PHP Fatal error: Maximum execution
time of 60 seconds exceeded in /websites/ical/functions/
ical_parser.php on line 494

Not quite sure where to go from here.



As mentioned, you need to evaluate what line 494 is actually doing..
is this a loop of some sort that is causing the max execution timeout?

Is there a browser specific thing that causes the line 494 to timeout.

What exactly is going on in the 494 area of ical_parser.php



thanks
Anna
http://ical.fmri.columbia.edu/week.php



btw, your signature url doesnt work without a proper username and 
password.



Curt


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



[PHP] optimizing arrays

2004-05-11 Thread Anna
Hi There,

What techniques are there to optimise the use of very large arrays?  I have
an array of over 380K keys and values that is being processed incrementally,
however the longer it runs the more time is seems to be taking - an array of
100k items is taking 1 hour to process, and array of 400k items is taking 9
hours to process.

I'm chunking up the array into smaller arrays, but that doesn't seem to be
making much difference.

Thanks
Anna

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



[PHP] ftell ? fseek ? help, please

2004-02-09 Thread Anna Yamaguchi
I would like to read first 224 bytes from a file A1, write them to another
(Bfile, and then coming back to file A1 read bytes from 225 to the end of
(Bfile.
(BCould somebody help me with this? Please.
(B
(BAnna
(B
(B[EMAIL PROTECTED]

[PHP] php/html debug

2002-11-08 Thread Anna Gyor
Hi,

is there any software on the market with I can test my html/php based web
portal? I mean for example the data flow between html forms and php
files/scripts. For Example a login form on html site and a check with an
other php site and I want begin the test on the html site and check weather
the right values goes to the php script.

Thanks!



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




[PHP] PHP debugger

2002-10-04 Thread Anna Gyor

Hello,

is there any application with I can test my php-based web site? I know Zend
Studio and PHPEdit but I can't use them if any variable comes from an other
html site.

(For example in logging there are loginname and password as html variable
and the debugger don't see them and the script doesn't works.)

Thanks!



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




[PHP] Global variables

2002-10-02 Thread Anna Gyor

Hello,

how can I use global variables in my web portal? I have read the php
documentation, but it works only in the same file.
I want use more global variable on many php site.

For example:
In login.php I use the code

 $first=mysql_result($result,0,FIRST_NAME);

and I want to print this $first variable all of my php site.


Thanks!



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




[PHP] Call HTML from php

2002-10-01 Thread Anna Gyor

Hi,

how can I call a html site from my php script? I want to redirect the user
to different html site depends on the php script result.

Thanks!




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




Re: [PHP] Call HTML from php

2002-10-01 Thread Anna Gyor

First thanks a lot, but

I have the following code:

?
$database=PH;
mysql_connect(localhost,test,test);
@mysql_select_db($database);
$query = SELECT ph_user.FIRST_NAME, FROM ph_user  WHERE (ph_user.FIRST_NAME
= \test\  );
$result=mysql_query($query);
$num=mysql_num_rows($result);
mysql_close();
if ($num  0){ Header(Location: file://c:/Test/company.html); }
else { Header(Location: file://c:/Test/register.html); }
?

And I become an error message:

Warning: Cannot add header information - headers already sent by (output
started at C:\Program Files\Apache Group\Apache2\htdocs\redirect.php:3) in
C:\Program Files\Apache Group\Apache2\htdocs\redirect.php on line 11

What can I do?

Thanks!


John Wards [EMAIL PROTECTED] az alábbiakat írta a következo
hírüzenetben: [EMAIL PROTECTED]
 header(location:http://yourstuff;);

 Do this before any output to the user. eg echos or displaying html

 John
 - Original Message -
 From: Anna Gyor [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, October 01, 2002 8:40 PM
 Subject: [PHP] Call HTML from php


  Hi,
 
  how can I call a html site from my php script? I want to redirect the
user
  to different html site depends on the php script result.
 
  Thanks!
 
 
 
 
  --
  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] Call HTML from php

2002-10-01 Thread Anna Gyor

I hev deleted the row:
$num=mysql_num_rows($result);
which generates an error message (the output, what you said)  and now the
script works!

Thanks!


John Wards [EMAIL PROTECTED] az alábbiakat írta a következo
hírüzenetben: [EMAIL PROTECTED]
 what is on line 3?

 is the ? tag online 1?

 - Original Message -
 From: Anna Gyor [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, October 01, 2002 9:35 PM
 Subject: Re: [PHP] Call HTML from php


  First thanks a lot, but
 
  I have the following code:
 
  ?
  $database=PH;
  mysql_connect(localhost,test,test);
  @mysql_select_db($database);
  $query = SELECT ph_user.FIRST_NAME, FROM ph_user  WHERE
 (ph_user.FIRST_NAME
  = \test\  );
  $result=mysql_query($query);
  $num=mysql_num_rows($result);
  mysql_close();
  if ($num  0){ Header(Location: file://c:/Test/company.html); }
  else { Header(Location: file://c:/Test/register.html); }
  ?
 
  And I become an error message:
 
  Warning: Cannot add header information - headers already sent by (output
  started at C:\Program Files\Apache Group\Apache2\htdocs\redirect.php:3)
in
  C:\Program Files\Apache Group\Apache2\htdocs\redirect.php on line 11
 
  What can I do?
 
  Thanks!
 
 
  John Wards [EMAIL PROTECTED] az alábbiakat írta a következo
  hírüzenetben: [EMAIL PROTECTED]
   header(location:http://yourstuff;);
  
   Do this before any output to the user. eg echos or displaying html
  
   John
   - Original Message -
   From: Anna Gyor [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Tuesday, October 01, 2002 8:40 PM
   Subject: [PHP] Call HTML from php
  
  
Hi,
   
how can I call a html site from my php script? I want to redirect
the
  user
to different html site depends on the php script result.
   
Thanks!
   
   
   
   
--
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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Calling an external C function under Unix

2002-09-25 Thread Anna Sotnichenko

Hello All!

I want to transfer a PHP script with minimum changes from IIS under Win2000
to Unix. My ISAPI PHP script calls some external C-functions through PHP
W32api extension.
Is there a way to call external C-function from PHP-script under UNIX?

Thanks in advance.



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




[PHP] html input and php (newbie)

2002-09-24 Thread Anna Gyor

Hi,

I just began to learn php and I have te following code. How can I get the
input field value in the php script? Because my script doesn't work.
$UserName is always an empty string.

?php
if ($submit == click){
  echo Hello, $UserName;
}
else{
?
  htmlbody

  form method=post action=input.php3

  Enter Your Name
  input type=text name=UserName/inputbr

  input type=submit name=submit value=click/input
  ? echo Hello, $UserName;  ?
  /form

  /body/html
?
}

?



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




[PHP] New York Remembrance

2001-10-03 Thread Irmingard Anna Kotelev

 Dear friends,

the madness incarnate of  September 11th, 2001 is one which will never 
be
forgotten. How could it be?
This shook the entire world, and my heart was broken along with all of
yours.

I have created a slide show in respectful tribute to all who passed, as
well as the heroics of the people. I know that America...the world... will
not allow this attack to ruffle it's feathers, and I stand and applaude 
for
the strength and resolve of it's people.

God bless America...God bless the world.

Do sign my 'Response to this Tribute' if compelled and please pass this 
on to at least one friend.

http://www.aurumxxl.de/ny/ny.htm

Irmingard Anna Kotelev
Photographer

25th of September 2001


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP4 session management and internal HTML links

2001-04-23 Thread Anna Lyse


I wrote a HTML page using PHP 4.0 and its session management and I am
getting very strange results.
I found out that it only happens when I use href=#1. There is no problem
with href=file.php#1.

Original code:

table width=100%
  tr
tda href=#1Gesuchte Tauml;tigkeit/a/td
tda href=#2Gesuchte Tauml;tigkeit/a/td
tda href=#3Gesuchte Tauml;tigkeit/a/td
  /tr
/table


form action=bewerbung.php method=post
input type=hidden name=cmd value=send
input type=hidden name=login value=? echo $login; ?

a name=1




Result in IE:

table width=100%
  tr
tda href= #1Gesuchte Tauml;tigkeit/a/td
tda href= #2Gesuchte Tauml;tigkeit/a/td
tda href= #3Gesuchte Tauml;tigkeit/a/td
  /tr
/table


form action=bewerbung.php method=post
input type=hidden name=cmd value=send
input type=hidden name=login
value=?SID=0b04e7e464152a73d8217c244bb38626 #1Gesuchte Tauml;tigkeit/a/td
tda href= #2Gesuchte Tauml;tigkeit/a/td
tda href= #3Gesuchte Tauml;tigkeit/a/td
  /tr
/table


form action=bewerbung.php method=post
input type=hidden name=cmd value=send
input type=hidden name=login
value=?SID=0b04e7e464152a73d8217c244bb38626 #2Gesuchte Tauml;tigkeit/a/td
tda href= #3Gesuchte Tauml;tigkeit/a/td
  /tr
/table


form action=bewerbung.php method=post
input type=hidden name=cmd value=send
input type=hidden name=login
value=?SID=0b04e7e464152a73d8217c244bb38626 #3Gesuchte Tauml;tigkeit/a/td
  /tr
/table


form action=bewerbung.php?SID=0b04e7e464152a73d8217c244bb38626
method=post
input type=hidden name=cmd value=send
input type=hidden name=login value=sdi3

a name=1

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] include(blah.php?var=this); doesn't work?!

2001-02-10 Thread Anna

- Original Message -
From: "thor" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, February 08, 2001 11:58 AM
Subject: Re: [PHP] include("blah.php?var=this"); doesn't work?!


 Any include page you use will automatically use any variable that has been
set in the master page.

snip

Unless you use include(http://file);
Then you can pass variables in the filename. This
does come in handy in some cases.

Anna


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] my bugaboo.

2001-02-10 Thread Anna

- Original Message -
From: "Floyd Baker" [EMAIL PROTECTED]



 Hello and thanks to all for the help on the magic quotes, etc.
 It gives me a better handle on what I'm dealing with.

 Except for one more thing.

 When I bring back text from a field which contains a ', and try to apply
it as
 the value of an input box, it still truncates in the box.

 When I simply print $text, it prints out correctly as *Don't do this* .
 When I make $text the default value of an input box, it shows as *Don*.

 If the slash is still in place, it reads *Don\'t* above the box and *Don\*
in
 the box.

 My bugaboo continues..  :-

 Thanks again for any further advice.

 Floyd


That's  a problem with HTML.
example:
input type='text' name='textName' value='Don't do this'
Sees the ' in Don't as the signal for the end of the value string.
I haven't come up with an automatic way to deal with this,
but what I have done is in these lines (where there might be an apostrophe)
make sure I use double quotes:
input type="text" name="textName" value="Don't do this"
or
print "input type=\"text\" name=\"textName\" value=\"Don't do this\"";

Of course, then you may have the same trouble with double quotes. To avoid
that you can do ereg_replace("\"", "''", $text) -- that is, replace a double
quote with two single quotes? I think, I've never bothered.

Hope this helps somehow.

Anna


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Fetching Local Weather

2001-02-09 Thread Anna

- Original Message -
From: "JB" [EMAIL PROTECTED]


Hey Coders,

I know there's a couple premade scripts to grab weather on hotscripts.com.
I wanted to know if anyone has a simple method to fetch the day's local
weather from something like yahoo. All I really need is the temperature,
condition (rainy, sunny)and maybe windspeed. If I could include the icon for
the condition that would be good too. Anyone have a simple solution for this
that I can dump into my code?

Thanks.

Using combinations of:


$string=implode(file("http address"), "");
$array=explode("some starter tag", $string);
$array=explode("some end tag", $array[1]);

$endString=$array[0];

With the odd ereg_replace() to tweak the data you
can grab info from wherever you want.
However, you should get permission from the site,
since this would count as a hit/page view on their site.

Anna


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP]Spider script in PHP.

2001-02-09 Thread Anna

- Original Message -
From: "Angerer, Chad" [EMAIL PROTECTED]


 I am not sure if this is the correct wording.  But I am wondering about a
 good tutorial about writing a PHP script that will spider a directory
 structure and extract the file names and insert them into a database.
Also
 this spidering would be done on a directory and its child with mp3 files
and
 I would like to extract the ID3 tag from it.  Any pointers to a good
 starting point/reference point would be greatly appreciated.

 Thanks.

 Chad


The manual. Use combinations of opendir(), readdir(), is_file(), etc.

Anna


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] mysql not reporting errors

2001-02-09 Thread Anna

- Original Message -
From: "Christian Dechery"

 WHy PHP is not showing SQL syntax (or any) errors?

 I'm using Win98Me with Apache 1.3.12 and PHP 4.x.

 it works... if I run a correct query it runs normally, but if I go like:

 $query="selct nonexistingfield from nonexistingtable with all crazy
syntax";
 mysql_query($query);

 it doesn't tell me there's an error... in fact it doesn't show anything...
 why is that?

Because it's a pain to have error messages popping up all the time?
Here is what I do with every query I every write:


$query="yada yada";
$result=mysql_query($query, $connection);
if($result=="" || $result=="0")
{
 //if it is a page for my use, I print the error
// if it is a page for the general public, I email the
//error to myself, and print "There was a problem
//completing your request", or something like that.
 print "Error : ".mysql_error($connection)."br\n";
}
else
{
 while($row=mysql_fetch_row($result))
 {
  //do whatever you want to do with the data.
 }
}

I greatly prefer this to display "0 is not a mysql result index" for
everyone to see, if/when something goes wrong.

Anna


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] tracking the current url

2001-02-09 Thread Anna

- Original Message -
From: "McShen" [EMAIL PROTECTED]



 hi

 Can you tell me how to  track the current url by using PHP? for example,
 Mike is visiting
http://www.celebritieszones.com/showthumb/britney_spears/1/
 and i wanna make a PHP script so it tells Mike that he is currently
browing
 http://www.celebritieszones.com/showthumb/britney_spears/1/

 I tried to use

 $url_array=explode("\",$REQUEST_URI);

 But it didn't work. It showed Array instead of the URL when i tried to
 display it.


Of course, trying to print $url_array will print "Array".
You just turned the $REQUEST_URI string into an
array (that being what explode does).

If you want Mike to know the name of the file he's on,
print $PHP_SELF.
The info the location bar (not counting the root domain name)?
print $REQUEST_URI.
The domain name?
$HTTP_HOST

http://www.php.net/manual/en/html/language.variables.predefined.html

Anna


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Where to put the include()

2001-02-07 Thread Anna

- Original Message - 
From: "Remi Ricard" [EMAIL PROTECTED]


 Hi,
 
 I want to know why in the second file I don't get
 a=134 as expected.
snip 
 // file that don't work as expected
 // print a=
 ?PHP
 function f2()
 {
   include ('./fileToBeIncluded.php');
   f1();
 }
 echo "html";
 f2();
 echo "/html";
 ?

Hi,

Functions are separate blocks of code from the rest 
of the file. If you declare a function or variable inside 
a function (as you do here, since you include the file 
which contains a function inside the function) it 
will not be available to the rest of the script.

I think. :-)

Anna


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Sorry! Help needed!

2001-01-23 Thread Anna

Sorry for it isnt PHP related, but maybe someone can answer or point where 
to look

I have some disagreement with one person about method="post"... Is this 
possible and good use as action html files: for example -  process form 
data to other page via html...

Cant find answer nowhere... always are only server side form handler...

AnnA


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]