[PHP] Re: *Umlauts/UTF-8

2003-04-03 Thread Alexey Lysenkov
Please, anybody? I'm really stuck with this. Please, help, if you know 
the solution.

-Alex

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


Re: [PHP] *Umlauts/UTF-8

2003-04-03 Thread Alexey Lysenkov
I have the junk showing up in my browser (Moz 1.3 / IE5.5 on Win2K)
Strangely enough it happens only on one page - another page, containing 
even more text, shows all umlauts alright. I don't knwo where the 
problem is. :-/ Txt file self?...

Alex

Marek Kilimajer wrote:
Where do you get the ?'s and squares? In the browser? Did you specify 
encoding?



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


[PHP] Re: *Umlauts/UTF-8

2003-04-03 Thread Alexey Lysenkov
Sorry for disturbing. That was fault - the txt file was not properly 
encoded.

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


[PHP] *Umlauts/UTF-8

2003-04-02 Thread Alexey Lysenkov
Hello,

I am having a problem with umlauts in utf-8 encoded txt file, which is 
being read by my script. Instead of umlauts I get ? or squares or 
anything else, but not those umlauts. What is the problem, can anybody 
help, please?

Thanks.

ps. I've chosen utf-8, because I have to have Western European _and_ 
Cyrillic characters on the same page. utf-8 seems to be the only 
encoding to let me do that.

pps. originally posted at php.lang, but it seems that no one lives there 
anymore :-/

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


Re: [PHP] *Premature end of script headers

2002-12-19 Thread Alexey Lysenkov
I've found it! It's session thing.
Why? It stops at session_start, and moreover, I overslept this morning. Two
minutes ago it had to be ready, shit!..

I'm sorry.
At the other machine it runs as .exe not as mod, the guy said, version
4.0.5.
I can use only $HTTP_SESSION_VARS array, but I don't know how to get (and
not to set!) the session_id. I cannot think, please help.

-Alex



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




[PHP] *Cannot connect to db

2002-12-18 Thread Alexey Lysenkov
mySQL; php running in safe mode; compared to the other code on the same
server. here is mine - I don't get any connection. What could be wrong?
Also, what does this @ sign mean before the mysql_connect?

  function dbopen(){
  $tablename = balzerdez02;
  $dbname = marketingcompany;
  $hostname=localhost;
  $username=tmc;
 $password=t7t7k1k1;
  $dbconn=@mysql_connect($hostname,$username,$password);
  mysql_select_db($dbname) or die (Could not find the table);
  echo($dbconn :- connect);
  }

  dbopen();


Thanks.
-Alex



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




[PHP] Re: *Cannot connect to db

2002-12-18 Thread Alexey Lysenkov
Warning: MySQL Connection Failed: Access denied for user: 'tmc@localhost'
(Using password: YES) in e:\~~~\~~~\apache\website\~~~\testdb.php on line 8

The guy at the support says, that everybody else can connect no problems,
sent me the code, which I copy-pasted and I still have this error. :((



Bastian Vogt [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 leave out the @, and give us the error message.
 @ suppresses error messages of any function.

 HTH,
 Bastian



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




Re: [PHP] Re: *Cannot connect to db

2002-12-18 Thread Alexey Lysenkov
Well, you will laugh, but it worked. :)) Not really, the way you showed -  I
commented out the username and password and it worked! :))
Mang...
So whose fall was it? Definitely not php, right?... okay.
Thanks Gregory! :))

- Original Message -
From: Gregory Hernandez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 6:05 PM
Subject: [PHP] Re: *Cannot connect to db


 just humor with this:

 try commenting out the lines

 $dbname = marketingcompany;
 $hostname=localhost;

 to appear as

 // $dbname = marketingcompany;
 // $hostname=localhost;

 i had the same problem you are having and for some reason which i still
 don't understand, the solution i proposed above worked.  i don't think
 this is the correct way to solve this.  but, for now (it was a project
 for a class) i'll live with it.

 gregory


  Alexey Lysenkov [EMAIL PROTECTED] - 12/18/02 10:49 AM 
 Warning: MySQL Connection Failed: Access denied for user:
 'tmc@localhost'
 (Using password: YES) in e:\~~~\~~~\apache\website\~~~\testdb.php on
 line 8

 The guy at the support says, that everybody else can connect no
 problems,
 sent me the code, which I copy-pasted and I still have this error. :((



 Bastian Vogt [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi,
 
  leave out the @, and give us the error message.
  @ suppresses error messages of any function.
 
  HTH,
  Bastian



 --
 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] *Premature end of script headers

2002-12-18 Thread Alexey Lysenkov
What does THAT mean? My script cannot execute on this goddamn server,
running goddamn safe-damn-mode!
A line in the error.log:

[Wed Dec 18 14:18:55 2002] [error] [client 217.***.*.***] Premature end of
script headers: e:/~~~/~~~/apache/php/php.exe

Regards,
Alex

What should I tell the support guy, who is running this server? He claims,
that every other client is alright and happy with him - and why not, of
course - it's just that I want to be happy too!



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




Re: [PHP] *Premature end of script headers

2002-12-18 Thread Alexey Lysenkov
Not that I am really bothered with it... The thing should run in 12 hours, and the guy 
is gone, I guess, to have his late night beer, and me is sitting here and battling 
with either my stupidity or his.
Anyways. phpinfo() runs okay


  Adam Voigt [EMAIL PROTECTED] wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Calm down. Does it do that same error if you have something simple like: 

  ?php phpinfo(); ? 

  On a page all by itself? 

  On Wed, 2002-12-18 at 13:12, Alexey Lysenkov wrote: 
What does THAT mean? My script cannot execute on this goddamn server, 
running goddamn safe-damn-mode! 
A line in the error.log: 

[Wed Dec 18 14:18:55 2002] [error] [client 217.***.*.***] Premature end of 
script headers: e:/~~~/~~~/apache/php/php.exe 

Regards, 
Alex 

What should I tell the support guy, who is running this server? He claims, 
that every other client is alright and happy with him - and why not, of 
course - it's just that I want to be happy too! 



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

-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc
   




[PHP] *OK, more eval for today

2002-12-18 Thread Alexey Lysenkov
I know, it's eval = evil, but I don't see any other way I can check for 120 variables 
submitted via post, without making a temp variable, assigning a value of the posted 
Var and checking for it (and deciding on the further run of the script). Anyways, I 
took a classical eval thing and am doing fine with it. It looks like this:

$temp = \$php_q3_.$i; // $i is a loop index
eval (\$temp = \$temp\;);

works alright. Now, how do I eval directly from the $HTTP_POST_VARS?

I am trying to do this:

$tempVar1 = '\$HTTP_POST_VARS[\q4_'.$i.']';
  eval(\$tempVar1=\$tempVar1\;);

and am obviously failing. If you know any other way to validate 120-150 variables in a 
loop and then rewrite the values into the fields (checkboxes, radios and selects) - 
should an error had been made - let me know.

Best Regards,
Alex

p.s. you do help! :)



Re: [PHP] *OK, more eval for today

2002-12-18 Thread Alexey Lysenkov
Okay, wait.
How?

say, I have a field of checkboxes in 3 columns and 6 rows. I need at least
one checked.
At the moment every checkbox has the name of kind: q3_4_1 , where 4 stands
for row and 1 for column. Now, how do I name them and loop through them?
Plus, if $HTTP_POST_VAR[q3_4_1] wasn't checked at all, the value is not
passed over, right? So I get... null, I believe. So with my eval I first do
if(isset()) and then go on. How would I I behave in your case?
Please, John, if you could be even more specific?

Sweating Alex


John W. Holmes [EMAIL PROTECTED] wrote in message
001e01c2a6ca$22310e00$7c02a8c0@coconut">news:001e01c2a6ca$22310e00$7c02a8c0@coconut...
 Why not name your form elements php_q3[] and then just loop through the
 array. That would cut the need for eval().

 ---John W. Holmes...

 PHP Architect - A monthly magazine for PHP Professionals. Get your copy
 today. http://www.phparch.com/

  -Original Message-
  From: Alexey Lysenkov [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, December 18, 2002 2:08 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] *OK, more eval for today
 
  I know, it's eval = evil, but I don't see any other way I can check
 for
  120 variables submitted via post, without making a temp variable,
  assigning a value of the posted Var and checking for it (and deciding
 on
  the further run of the script). Anyways, I took a classical eval thing
 and
  am doing fine with it. It looks like this:
 
  $temp = \$php_q3_.$i; // $i is a loop index
  eval (\$temp = \$temp\;);
 
  works alright. Now, how do I eval directly from the $HTTP_POST_VARS?
 
  I am trying to do this:
 
  $tempVar1 = '\$HTTP_POST_VARS[\q4_'.$i.']';
eval(\$tempVar1=\$tempVar1\;);
 
  and am obviously failing. If you know any other way to validate
 120-150
  variables in a loop and then rewrite the values into the fields
  (checkboxes, radios and selects) - should an error had been made - let
 me
  know.
 
  Best Regards,
  Alex
 
  p.s. you do help! :)





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




Re: [PHP] *OK, more eval for today

2002-12-18 Thread Alexey Lysenkov
am trying



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




Re: [PHP] *OK, more eval for today

2002-12-18 Thread Alexey Lysenkov
It worked for validation! :) Hooray.
Now, I guess, I have to set the same logic for the whole other bumch of
questions God..
Most probably will post here today later again.

Cheers, John!

-Alex



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




Re: [PHP] *Premature end of script headers

2002-12-18 Thread Alexey Lysenkov
Guys? The support guy says that my php-script brings his php interpreter to
crash. I am astonished (wow-what a powerful man I am :) ) - no, but really,
it doesn't crash MY server? He also said, it happens just right after the
file is being asked for, that is, as I suspect, somewhere in the first lines
of my php code.
I run 4.2.0, he runs 4.0.5 . Both Safe-mode on, both, as I suspect, on
Windows, mySQL as well.
What could in these first lines of the code, which follows, bring his
machine to death? Please, someone - it's so urgent, really...


?php
session_start();
$parseOkay = false;
$varsOkay = false;
$cookOkay = false;

$coo = time().-.session_id();

$hersteller = array (.);
$herstellerNr = array (2,1,4,3,5,6);

$frage5 = array(..);
$frage5bedeutung = array();

$frage1warn = false;
$php_q1 = 0;

$frage2warn = false;
$php_q2 = 0;

$frage3warn = false;

$frage4warn = false;

$frage5warn = false;
$frage5_count = 0;

$php_q6 = 0;

$php_q7 = 0;

$php_q8 = ;

$php_q9 = ;

ob_start();
if(isset($HTTP_COOKIE_VARS[foo])) {
 $coo = $HTTP_COOKIE_VARS[foo];
 $cookOkay = true;
}

if(isset($HTTP_GET_VARS[parse])){
 require(uservars.php); // BROWSER, IP, DATE;
 require(resetvars.php);
 $parseOkay = true;
}
ob_end_flush();
?

thanks.

Almost dead, but happy, that the thing works at least on ONE machine,
Alex



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




[PHP] *arrays/evaluating - ! urgent !

2002-12-17 Thread Alexey Lysenkov
Hello,
another newbie here.

Here is a loop:

for($f=0;$fcount($frage5);$f++){
$ff = $f+1;
echo(tr\n);
echo(td align=\right\ valign=\top\$frage5[$f]/td\n);
for($h=0;$hcount($hersteller);$h++){
 $hh = $h+1;
 $varName = q5_.$ff._.$hh;
 echo(td align=\center\ valign=\middle\select
name=\$varName\\n);
 $tempQar = array_values(\$arq_5_.$hh.);
 eval(\$tempQar=\$tempQar\;);
  for($v=0;$v7;$v++){
   if((int)$tempQar[$f] == $v){
$sel = selected;
   }else{
$sel = ;
   }
   echo(option value=\$v\ $sel$v/option\n);
  }
 echo(/select\n/td\n);
}
   }

Arrays hersteller as well as frage5 are set manually, so they are okay.They
are printing out okay as well.
The logic is as follows - not to make (frage5*hersteller) variables, I
manually set 5 empty arrays with the names arq5_1, arq5_2 and
arq5_[hersteller], etc. Now, when the form is submitted and something is
being wrong with the input, it returns the form (practically, goes through
the whole html again) and sets the selected fields to the options, radios
and values already submitted. Supposed to be nice, so you correct only what
you did wrong.
What I am failing to achieve with this code, is keeping the options of the
selects in the manner they were selected when submitting. In the include,
which validates the input it works alright. Here is the code:

for($i=1;$icount($hersteller)+1;$i++){
  $tempQar = array_values(\$arq_5_.$i.);
  eval(\$tempQar=\$tempQar\;);
  for($a=0;$acount($frage5);$a++){
   $aa = $a+1;
   $tempVar = \$rq_q5_.$aa._.$i;
   eval(\$tempVar=\$tempVar\;);
   $tempQar[$a] = $tempVar;
  }
  for($v=0;$vcount($tempQar);$v++){
   if($tempQar[$v] == 0){
$frage5_count++;
   }
  }
}
if($frage5_count  3){
 $varsOkay = false;
 $frage5warn = true;
}

If I put print_r($tempQar) after the second for... statement, it prints
out the array, which is alright - with every value submitted in its place.
But somehow, almost the same thing doesn't work in the main, so to say,
file. Could anyone help? Please? It's urgent.

Regards,
Alex



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