[PHP] download php

2003-07-10 Thread Mantas Kriauciunas
Hello php-general,

  some hacker just tries his luck everyday to get me pissed, is it
  possible to make php files not downloadable? or coded? or something?
  because some dude knows my passwords every time, and with them
  passes the shity security to main user, thank god not root.

  So is there any way?

  if anyone knows any links or resources, please reply, i'll check
  them, i need to put this to end

  P.S system is freebsd.

  Thank you!!!

  there are even more and more kids that want to be named haker,
  lookin at their age, could be even my son:)

-- 
Best regards,
 Mantas  mailto:[EMAIL PROTECTED]



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



[PHP] /etc/passwd

2003-07-10 Thread Mantas Kriauciunas
Hello php-general,

 my server is running freebsd 5.0

 and yet i havent fixed bug that i knew long time ago, so can anyone
 point me with some links or resources about it, i could not find any
 good on google, maybe i don't know how to search.

 The problem is
 if the make script ? if($id) include($id); ?
 and then just write
 test.php?id=/etc/passwd , they see all the file.

 So how to make sure that no one can access other people files and
 server files? and is there any way that nobody would be able to
 download php files or how to make them look like code when they are
 downloaded. Thanks!

 P.S If someone knows good links please reply me! thanks a lot!

 ---Don't Get Mad, Ged Glad , Buy Gladware---

-- 
Best regards,
 Mantas  mailto:[EMAIL PROTECTED]



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



Re[2]: [PHP] /etc/passwd

2003-07-10 Thread Mantas Kriauciunas
Hello Marek,

Thanks for the answer, but i think you misunderstood me because of my
bad english. What i mean is the people with that code can access and
view files on any place on my server and see the passwords stored in
some files, decode them, and do stuff like that. I wanted to know how
to prevent that from happening? If the people make file like this, how
to protect myself so they could not view the /etc/passwd file?

Thursday, July 10, 2003, 5:13:33 AM, you wrote:


MK Mantas Kriauciunas wrote:

  The problem is
  if the make script ? if($id) include($id); ?
  and then just write
  test.php?id=/etc/passwd , they see all the file.
MK Check if $id is valid. Exact way depends on the structure of the files.
MK Example 1: All included files are in web root and are named 
MK something.html, something can contain letters, underscore, digits.
MK if($id  eregi('^[a-z0-9_]+\.html',$id)) include($id);

MK Example 2: The included files split into several directories, which can 
MK contain letters, underscore, digits.
MK if($id  eregi('^[a-z0-9_]+/[a-z0-9_]+\.html',$id)) include($id);

MK Sure, this assumes you have nothing to hide in your *.html files.

 
  So how to make sure that no one can access other people files and
  server files? and is there any way that nobody would be able to
  download php files or how to make them look like code when they are
  downloaded. Thanks!
 
  P.S If someone knows good links please reply me! thanks a lot!
 
  ---Don't Get Mad, Ged Glad , Buy Gladware---
 



-- 
Best regards,
 Mantasmailto:[EMAIL PROTECTED]



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



Re[2]: [PHP] /etc/passwd

2003-07-10 Thread Mantas Kriauciunas
Hello Wendell,

Thursday, July 10, 2003, 6:59:25 AM, you wrote:

  So how to make sure that no one can access other people files and
  server files? and is there any way that nobody would be able to
  download php files or how to make them look like code when they are
  downloaded. Thanks!

WB I think he means How do I keep people who have access to upload their
WB OWN php scripts to my server from accessing files outside their
WB directory?  :)

WB Check out the following:

 http://www.php.net/manual/en/features.safe-mode.php#ini.open-basedir

 http://www.php.net/manual/en/security.php
 http://www.php.net/manual/en/features.safe-mode.php#ini.safe-mode




Thanks a lot! that helped :)

-- 
Best regards,
 Mantasmailto:[EMAIL PROTECTED]



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



[PHP] directory size?

2003-04-03 Thread Mantas Kriauciunas
Hey
I looked up in the manual but found only 
Disk_total_space
Disk_free_space

Is there anything like total_space for directory?
Or I will have to think of something else?
Like counting every file size and adding it to total.
But if there is like 1000 files with directories in the main directory.
It will take time to count files from all the directories and output
total size of the main directory.

I hope I didn't make it sound too confusing:)
Thanks for any help!
Mantas Kriauciunas



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



RE: [PHP] Good Book?

2003-04-03 Thread Mantas Kriauciunas
Hey!

Well, if you are totally beginer you can start like I did, but you can
find better books out there.
I used this one:
http://search.barnesandnoble.com/textbooks/booksearch/isbninquiry.asp?us
erid=2WGTOMAKH3isbn=076153055X

There is Second Edition allready, I haven't seen it, maybe that one is
even better and with more stuff in it.

Have a good reading!
Best book would be the Manual :) helps a lot!

Good Luck!
Mantas Kriauciunas

-Original Message-
From: Bob X [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 31, 2003 3:35 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Good Book?


What is a good beginners book for PHP? I would like a little depth on
security.



-- 
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] best way to pass variables to iframe

2003-01-28 Thread Mantas Kriauciunas
Hey!
I believe there was question like this, but I was wondering if someone
could point me with useful information about passing variables to
iframe.
Is there some tutorials about that? Or some help files about that, ways
to do it.
Thanks!
 
-mNTKz



[PHP] SSH change password!

2003-01-24 Thread Mantas Kriauciunas
Hey!

I was wondering with what command do you execute shell commands?

What I need is to change users password on the server, I want to write
that script and it needs to be safe. So I don't know what should I use.
I think I will need to check username and password, then log in through
website with it and then use passwd command on that user to change the
password. Or maybe I am wrong, I never done something like that.

Thanks for any info!

-mNTKz



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




RE: [PHP] SSH change password!

2003-01-24 Thread Mantas Kriauciunas
Hey!
Thanks for reply.

Well hmm.. is there any way to open some socket and log in with other
account or something like that? I mean use IE or other browser but the
main point is to log in with different account and change the password.
User can change password of their own not only root can change it.

And what I need this script for, is, not everyone knows how to use ssh
and I don't want to give access to 50 users that can run their
processes, my server will freeze. That's why I need to change it somehow
different, what about loging in with root and changing passwords, but
now again how to open connection to sshd.

By your reply I can guess that you state that there is no chanse..and if
there is it will be big security hole. 

:/

thnx again

-mNTKz

-Original Message-
From: Tom Woody [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 24, 2003 12:03 PM
To: Mantas Kriauciunas
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] SSH change password!

The one problem and serious security risk you will be introducing is
that if you run passwd as an unprivliged user you can only change the
password of the user you are running it as.  Therefore, the webserver
would be running as apache, so the only password it could change would
be for user apache.

To get passwd to change any password it has to be run as root, therefore
you would need to run the webserver as root.  You would be opening a
serious pandora's box with that option.

Since your users have access to the server through a shell account
(otherwise why bother with user accounts), you would be better served by
PuTTY or another ssh client that the users change their passwords by
logging in to the shell account.

On Fri, 24 Jan 2003 11:48:50 -0600
Mantas Kriauciunas [EMAIL PROTECTED] wrote:

 Hey!
 
 I was wondering with what command do you execute shell commands?
 
 What I need is to change users password on the server, I want to write
 that script and it needs to be safe. So I don't know what should I
 use. I think I will need to check username and password, then log in
 through website with it and then use passwd command on that user to
 change the password. Or maybe I am wrong, I never done something like
 that.
 
 Thanks for any info!
 
 -mNTKz
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
Tom Woody
Systems Administrator
NationWide Flood Research, Inc.
phone: 214-631-0400 x209
  fax: 214-631-0800

Don't throw your computer out the window, 
throw the Windows out of your computer! 


-- 
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] execute shell commands

2003-01-15 Thread Mantas Kriauciunas
Hey!
What I want to do is, There is user that logs into the channel. And I
need to make script to change his password. How do I execute shell
command: passwd ? or what should I do to change that password?
Thanks!
mNTKz



[PHP] Apache

2002-12-25 Thread Mantas Kriauciunas
Hey!
I'm using FreeBSD 4.5 as my server and I have loaded Apache 1.3.2 and
PHP 4.x . hare goes the question, sorry it isn't about php but still
maybe you can help me. When I type Http://www.example.com/~user the page
says that it doesn't exist.. But when I type in
Http://www.example.com/~user/ then it works. Well when I had PHPTriad
loaded on my windows I didn't have any problems. Why now it isn't
working without / ??
Thanks!



[PHP] pop-up

2002-08-18 Thread Mantas Kriauciunas

Hey php-general,

  whats the easyest way to send variables to pop-up?

  i got button like this:
  input type=BUTTON value=Preview onClick=\topWindow()\

  its not in the form its just standing hare.. do i add to post or
  how is the easy way to do it.. it just pops up window and i need
  to pass variables to that pop up whish takes variables from the form
  before that button. its preview.php that pops out.

-- 
Best regards,
 Mantas  

Contacts:
[EMAIL PROTECTED]
Http://www.mntkz.tk


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




Re[2]: [PHP] pop-up

2002-08-18 Thread Mantas Kriauciunas

Hello Justin,

i don't think that this thing will pass 300 simbols successfuly
i take $nw_text from TEXTAREA and i need to pass it to pop-up (other
window) there it will generate preview of that text with some stuff...
but i need to pass also 2 more ...so total is 3 things...one text and
other ones is just like date and username




Sunday, August 18, 2002, 12:22:11 AM, you wrote:

JF You need to modify topWindow() so that you can pass a query string to it,
JF which you can then use to add to the URL of the pop-up window.

JF SCRIPT
JF !--
JF function userpop(user_id)
JF {
JF var prefix = show_user.php?userid=;
JF var script = eval(prefix + user_id);
JF window.open(script, view_user,
JF toolbar=no,location=no,directories=no,status=yes,menubar=yes,scrollbars=yes
JF ,resizable=no,width=250,height=250);
JF }
// --
JF /SCRIPT

JF input type=BUTTON value=Preview onClick=userpop('justin');

JF This would pop-up a window with the dimensions listed, and I pass a userid
JF to it, which gets appended to the URL of the new window, passing a userid
JF variable into the target script via GET.

JF I *think* all input's need to be in a form tag regardless... a better way
JF to test your script would be to take the input/form out of the equation, get
JF your javascript right with a simple A HREF tag:

JF A HREF=# onClick=userpop('justin');

JF And since this is a JavaScript thing, not a PHP thing, you might want to
JF address the issue(s) in comp.lang.javascript


JF Justin French



-- 
Best regards,
 Mantasmailto:[EMAIL PROTECTED]


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




[PHP] mysql_connect

2002-08-04 Thread Mantas Kriauciunas

Hey php-general,

  $db_host = localhost;

  how do i set with ip ?

  it works with localhost

  but it doesn't work:

  $db_host = IP.IP.IP.IP;

  or

  $db_host = Http://IP.IP.IP.IP/;;

  P.S IP i set numbers

  P.S.S i need to connet to mysql on other server

  thanks, sorry for dumb questionjust can't find answer

-- 
Best regards,
 Mantas  

Contacts:
[EMAIL PROTECTED]


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




[PHP] Need help to choose hosting!

2002-08-01 Thread Mantas Kriauciunas

Hey php-general,

  i want to buy hosting. but i can't find good one for me. maybe
  someone could point some links. but this is what i need!

  Storage up to 100MB
  normal transfer limit(best would be without)
  CGI/Perl/PHP/ASP/SSI/SSL
  MySQL database (can be only 1)
  some pop3 mailboxes
  free domain transfer (maybe free domain if i pay for 1 year ahead)
  FTP access
  SSH access
  Shell capability
  up to 3 background processes

  if anyone know combination like that i would appreaciate your help!
  thanks

-- 
Best regards,
 Mantas  

Contacts:
[EMAIL PROTECTED]


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




Re[2]: [PHP] Need help to choose hosting!

2002-08-01 Thread Mantas Kriauciunas

Hello Justin,

heh... sorry about that ASP thing... i copied from one hosting site
and just paste it hare. forgot about ASP :) i'll check out that
experthost.com :) thanks

JF Aside from shell, ssh  background processes, i can recommend experthost.com

JF How do you expect to get ASP (assuming you mean microsoft's Active Server
JF Pages) on a Unix box?

JF Sure, PHP could be on a Windows box, but I think your chances of finding a
JF solid host that supports ASP AND PHP on the one server is about zero.

JF Justin French


JF on 02/08/02 4:31 PM, Mantas Kriauciunas ([EMAIL PROTECTED]) wrote:

 Hey php-general,
 
 i want to buy hosting. but i can't find good one for me. maybe
 someone could point some links. but this is what i need!
 
 Storage up to 100MB
 normal transfer limit(best would be without)
 CGI/Perl/PHP/ASP/SSI/SSL
 MySQL database (can be only 1)
 some pop3 mailboxes
 free domain transfer (maybe free domain if i pay for 1 year ahead)
 FTP access
 SSH access
 Shell capability
 up to 3 background processes
 
 if anyone know combination like that i would appreaciate your help!
 thanks





-- 
Best regards,
 Mantasmailto:[EMAIL PROTECTED]


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




Re[2]: [PHP] Need help to choose hosting!

2002-08-01 Thread Mantas Kriauciunas

Hello Justin,

 Hey php-general,
 
 i want to buy hosting. but i can't find good one for me. maybe
 someone could point some links. but this is what i need!
 
 Storage up to 100MB
 normal transfer limit(best would be without)
 CGI/Perl/PHP/SSI/SSL
 MySQL database (can be only 1)
 some pop3 mailboxes
 free domain transfer (maybe free domain if i pay for 1 year ahead)
 FTP access
 SSH access
 Shell capability
 up to 3 background processes
 
 if anyone know combination like that i would appreaciate your help!
 thanks

sorry about the confusion but i dont need ASP but i realy do need SSH
access (shell) and up to 3 background processes. i can find 2 diferent
hosting. one website and one shell hosting. but i need 2 in one :)
thanks again

-- 
Best regards,
 Mantasmailto:[EMAIL PROTECTED]


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




[PHP] Explain?

2002-07-31 Thread Mantas Kriauciunas

Hey php-general,

  maybe somebody can explain me what happens in this line? because how
  mutch i read it..thought i don't get it :)

  list ($date, $laik) = split (' ', $row['time'], 2);

-- 
Best regards,
 Mantas  

Contacts:
[EMAIL PROTECTED]


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




[PHP] fullname

2002-07-30 Thread Mantas Kriauciunas

Hey php-general,

  is there some other easyer way to do in one line than this?:

$fullname = $session[f_name];
$fullname .=  ;
$fullname .= $session[l_name];  

P.S the thing is to add line in the middle of the first and last names
:)

Thanks
-- 
Best regards,
 Mantas  

Contacts:
[EMAIL PROTECTED]


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




Re: [PHP] Why won't this work?

2002-07-19 Thread Mantas Kriauciunas

Hello John,

Friday, July 19, 2002, 12:25:12 AM, you wrote:

JW Any ideas on why this won't work?  It will only include(inc/entrance.php)
JW It never, no matter what the value of $mode, displays collection.php.

thinking logicaly:

JW?php
JW$mode = entrance; $mode is entrance
JWif ($mode = entrance) {  looks if mode is entrance which is
JW include(inc/entrance.php);if was true so it includes entrance
JW}
JWelse if ($mode = collection) { looking again if for same $mode if it 
is collection but it was in first line entrance
JW include(inc/collection.php); if was false it never executes this 
part!
JW}

JW?

so what are you trying to get? both included?
if yes this will include both:

  ?php
   $mode = entrance;
   if ($mode = entrance) {
include(inc/entrance.php);
   }
   $mode = collection;
   if ($mode = collection) {
include(inc/collection.php);
   }

   ?


   sorry if i didn't understood the question!

-- 
Best regards,
 Mantasmailto:[EMAIL PROTECTED]


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




Re[2]: [PHP] Why won't this work?

2002-07-19 Thread Mantas Kriauciunas

Hello Rasmus,

Friday, July 19, 2002, 12:26:45 AM, you wrote:

RL You need == instead of = there

RL On Fri, 19 Jul 2002, John Wulff wrote:

 Any ideas on why this won't work?  It will only include(inc/entrance.php)
 It never, no matter what the value of $mode, displays collection.php.

?php
$mode = entrance;
if ($mode = entrance) {
 include(inc/entrance.php);
}
else if ($mode = collection) {
 include(inc/collection.php);
}

?

oh yea, didn't look closely and didn't understand question clearly :/
guess im tired:( good night...sorry about my letter:/
thnx

-- 
Best regards,
 Mantasmailto:[EMAIL PROTECTED]


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




[PHP] Thumbnails

2002-06-10 Thread Mantas Kriauciunas

Hey PHP General List,

  i am doin thing that uploads picture on the server(windows in my
  comp.) and if anybody can point me how to do fast thumbnails and
  when clicking on them it shows full size picture. I want to do it
  with one file. not cuting new one.

  And one more question. Can anybody point me to good tutorials about
  uploading files(it wont be more then 500kb) how it is done and all
  about that. I heared there were some bad bugs with uploading.
  Thanks for help to everyone.

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt


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




Re[2]: [PHP] Thumbnails

2002-06-10 Thread Mantas Kriauciunas

Hey John Holmes,

Got your email on:Monday, June 10, 2002, 5:10:54 PM writing:

:
JH Why reinvent the wheel?

to learn how to do stuff...knowleadge

JH http://gallery.jacko.com/modules.php?op=modloadname=Newsfile=index

JH or...

JH http://gallery.sourceforge.net

JH ---John Holmes...

thanks for the links

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt


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




Re[2]: [PHP] HTML to mysql - from msql to html

2002-05-05 Thread Mantas Kriauciunas

Hey PHP General List,

ok i solwed the problems with line breaks but i didn't use
nl12br() function. i did like this:

$newz = str_replace(\n,br,$myrow[3]);

now i am having problems with spaces

text is:
---
bla bla bla  foo
---

and shows:
---
bla bla bla foo
---

what do i have to do to get all those spaces? as i understand(english
is weak) nl12br() is for breaks only. what about spaces?

:
MC On Sat, 4 May 2002, Mantas Kriauciunas wrote:
  I have hare a little problem. Well i have in the page TEXTAREA
  thingy and there i wrote text like that(between lines):
 
  --
  foo bar
 
  more foo bar
  --
 
  now i do msql_query(UPDATE.); and it sets into the
  database with just space. and when i take it out from database there
  is no empty line in the middle.

MC View the source of the page displaying the retrieved data. If the text 
MC displays on multiple lines there, then you just need to call nl2br() on 
MC the string to convert internal line breaks to HTML breaks.

MC If the text does not show line breaks in the source (or when you use the 
MC mysql CLI to query), then you need to change the parameters of the 
MC TEXTAREA. Probably textarea wrap=soft but I'm not 100% sure offhand.

MC miguel



:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt


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




Re[3]: [PHP] HTML to mysql - from msql to html

2002-05-05 Thread Mantas Kriauciunas

Hey Miguel Cruz,

Got your email on:Sunday, May 05, 2002, 3:29:49 PM writing:

:
MC On Sun, 5 May 2002, Mantas Kriauciunas wrote:
 Hey PHP General List,
 
 ok i solwed the problems with line breaks but i didn't use
 nl12br() function. i did like this:
 
 $newz = str_replace(\n,br,$myrow[3]);
 
 now i am having problems with spaces
 
 text is:
 ---
 bla bla bla  foo
 ---
 
 and shows:
 ---
 bla bla bla foo
 ---
 
 what do i have to do to get all those spaces? as i understand(english
 is weak) nl12br() is for breaks only. what about spaces?

MC I think you're going to have a good time with pre/pre. You could try
MC swapping nbsp; for each space but they're sometimes wider than normal
MC spaces and I suspect may have other weird side effects as well.

MC As a print designer in a former life, by the way, the thought of you 
MC trying to format something with spaces makes my skin crawl. But I'm trying 
MC to keep my cool.

MC miguel



:

well i thought that it would be good to do with spaces.. but when i
researched more..and thought more i decided to leave it alone ;) its
just simple thing...that does not nessasary need spaces :).. thanks
for help everyone..i realy appreciate it.

P.S bad english is also in my way trying to learn

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt


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




[PHP] HTML to mysql - from msql to html

2002-05-04 Thread Mantas Kriauciunas

Hey PHP General List,

 I have hare a little problem. Well i have in the page TEXTAREA
 thingy and there i wrote text like that(between lines):

 --
 foo bar

 more foo bar
 --

 now i do msql_query(UPDATE.); and it sets into the
 database with just space. and when i take it out from database there
 is no empty line in the middle. I can see only like that when i do
 echo $myrow[1] after fetching array:

 --
 foo bar more foo bar
 --

 so how should i do and what should i use to put it like it was set.

 P.S i know there have been some questions like that but i didn't see
 them myself

 thanks for helping me out :)

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt


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




[PHP] if cant use header what should i use? or how to do this?

2002-05-03 Thread Mantas Kriauciunas

Hey PHP General List,

  I have code like this(code starts at 100 line and has lots of
  outputs):
if($news==del) {
if(!$nr) {
   show_news_menu();
   show_news_del();
} 
else if($nr) { 
  if($do_del) {
$online = @mysql_connect($db_address,$db_user,$db_pass) or die(MySQL 
Not Connected);
mysql_select_db($db_name,$online) or die(NO DATABASE FOUND);
if (!$result = @mysql_query(DELETE FROM news WHERE id = \$nr\) ) {
  echo Query Error;
}
die;
   }
   else if($do_cancel) {
   Header(Location: menu?pg=news);  wrong
   } else {
 show_news_menu();
 show_news_del();
  ECHO SOME HTML STUFF(comments) 
   }
}

 }

i have problem with Header, how should i change it? any suggestions?
is there any other function to redirect? or should i make some
fucntion my self..or what shoud i do ?
thanks

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt


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




Re[2]: [PHP] if cant use header what should i use? or how to do this?

2002-05-03 Thread Mantas Kriauciunas

Hey PHP General List,

well i cant do that...because i have lots of outputs before it..and i
need them all..so..what should i do? error is like that:

Warning: Cannot add header information - headers already sent by (output started at 
C:\webaz\st\admin\menu.php:26) in C:\webaz\st\admin\menu.php on line 123

is there other posibility or i have to change all the code in other
lines that it will not be any outputs? if there is any other way to
redirect it would be great that u would help me...tank you

Got your email on:Friday, May 03, 2002, 4:07:23 PM writing:

:
JS I think it's because you need an absolute URL in there as opposed to 
JS the relative one you're using, i.e. Location: 
JS http://www.example.com/menu?pg=news;

JS Try that, and try looking here:
JS http://www.php.net/manual/en/function.header.php

JS HTH,

JS Jason Soza

JS - Original Message -
JS From: Mantas Kriauciunas [EMAIL PROTECTED]
JS Date: Friday, May 3, 2002 4:59 pm
JS Subject: [PHP] if cant use header what should i use? or how to do this?

 Hey PHP General List,
 
  I have code like this(code starts at 100 line and has lots of
  outputs):
if($news==del) {
if(!$nr) {
   show_news_menu();
   show_news_del();
} 
else if($nr) { 
  if($do_del) {
$online = 
 @mysql_connect($db_address,$db_user,$db_pass) or die(MySQL Not 
 Connected);mysql_select_db($db_name,$online) or 
 die(NO DATABASE FOUND);
if (!$result = @mysql_query(DELETE FROM news 
 WHERE id = \$nr\) ) {
  echo Query Error;
}
die;
   }
   else if($do_cancel) {
   Header(Location: menu?pg=news);  wrong
   } else {
 show_news_menu();
 show_news_del();
  ECHO SOME HTML STUFF(comments) 
   }
}
 
 }
 
 i have problem with Header, how should i change it? any suggestions?
 is there any other function to redirect? or should i make some
 fucntion my self..or what shoud i do ?
 thanks



:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt


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




Re[2]: [PHP] if cant use header what should i use? or how to do this?

2002-05-03 Thread Mantas Kriauciunas

Hey 'PHP General List',

Got your email on:Friday, May 03, 2002, 7:59:29 PM writing:

:
else if($do_cancel) {
Header(Location: menu?pg=news);  wrong

JH Why can't you just check for $do_cancel at the beginning of the script.
JH If you really have to re-direct to another page, why do you have to
JH ouput anything before hand? It's not going to be shown, anyhow. Any page
JH with this problem needs to have it's logic rethought. 

JH If you can't or are unwilling to do that, then use output buffering.

JH ---John Holmes...



:

thank you all for help.. problems have been solved. there was some
logic things that i did in wrong way... thanks

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt


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




[PHP] Kinda HTML and PHP question....

2002-05-01 Thread Mantas Kriauciunas

Hey PHP General List,

   I have news thing in MySQL database... i made tables that is good
   to look under 800x600 and highet.. now i am outputing from database
   $full_news line like this:

echo Full Story:br$myrow[3]brbr\n;

 so the problem is... like some stupid people put word...without
 spaces or something without them...just letters no spaces...and
 it doesn't warp the text. What do you think i should do at that
 point? What do you do in your sites to protect that? because my
 tables get wight bigger..they are set to wight=100% . thanks for
 any help or any suggestion what should i do.
   

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt


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




[PHP] Interesting Links, can be not PHP

2002-04-22 Thread Mantas Kriauciunas

Hey PHP General List,

  Well i have seen some strange links last few months earlyer i
  didn't look at them because i didn't care... and now i am curious...
  how to understand link like this Http://www.foo.com/# and thats
  it... links ends and as it sayes for example it links to Our Works
  page on that website... how to understand that # ? can anybody
  expain? or give link to explanation ?

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt


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




Re[2]: [PHP] Interesting Links, can be not PHP

2002-04-22 Thread Mantas Kriauciunas

Hey PHP General List,

Got your email on:Monday, April 22, 2002, 10:29:52 PM writing:

:
MT it's a bookmark

MT basically, it's telling the browser to scroll the page down until it finds
MT the named bookmark

MT eg
MT a name=topTop of page/a
MT blah...
MT ...
MT a href=#topgo to top/a

MT clicking on that link will scrol the page to top

MT in your case, it's a no-name bookmark, and most browsers treat this as
MT either don't move or top

MT it's useful when doing onClicks, etc. when you don't want to user to go to
MT a different page

MT HTH


MT -Original Message-
MT From: Mantas Kriauciunas [mailto:[EMAIL PROTECTED]]
MT Sent: Tuesday, April 23, 2002 5:17 PM
MT To: PHP General List
MT Subject: [PHP] Interesting Links, can be not PHP


MT Hey PHP General List,

MT   Well i have seen some strange links last few months earlyer i
MT   didn't look at them because i didn't care... and now i am curious...
MT   how to understand link like this Http://www.foo.com/# and thats
MT   it... links ends and as it sayes for example it links to Our Works
MT   page on that website... how to understand that # ? can anybody
MT   expain? or give link to explanation ?


:

Thanks for your brief explanation. Now i understand little more. I got
confused before whyt it is only # no letters.. thanks again ;)

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt


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




[PHP] MySQL question

2002-04-21 Thread Mantas Kriauciunas

Hey PHP General List,

  Amm... can anybody point me to some good tutorial that talks about
  SELECT from detabase? what i need is ... like i have table with lots
  of rows and i need to output them all to the page... it goes
  like most of news sections in the page... thanks for help.
  (i need to learn more about SELECT'ing things from database)

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt


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




[PHP] PHPTriad

2002-04-21 Thread Mantas Kriauciunas

Hey PHP General List,

  Im using PHPTriad as webserver. And i am having some problems. It
  goes ok but sometimes after mutch requests. server freezes nobody
  can access it until i restart apache. What could be wrong? Well i
  have cam page that refreshes every 5 seconds it shows my cam. Maybe
  that makes too mutch requests. Any suggestions? thanks

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt


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




[PHP] .phps

2002-04-19 Thread Mantas Kriauciunas

Hey [EMAIL PROTECTED],

 as i understand files .phps should view code nice and in colors...
 but when i set up everything good in http.conf and (as i think)
 everything is perfect it wants me to download that .phps
 file...what can be wrong? im using PHPTriad on win2k

 thank you

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt


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




[PHP] phpMyAdmin protection

2002-04-15 Thread Mantas Kriauciunas

Hey PHP General List,

  Can anybody point me to tutorial or real good explanation site how
  to keep Http://localhost/phpmyadmin off for other users. I am using
  it to help me with MySQL database but other peaople can access
  it. I know there is something with .httacces but i dont know
  anything about that .httacces. SO please if anybody can point me to
  some explanation how to secure phpmyadmin or just explain bu them
  selves.

  Thank You.

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt


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




[PHP] not about php... about server for php .. its apache question if anybody feelin like answering , thanks

2002-04-02 Thread Mantas Kriauciunas

Hey [EMAIL PROTECTED],

  Im new at this so i got some problems that i would like to solve.
  First i have Linux Debian 2.2.19 version running on my poor server
  :) and i installed apache web server...everything goes well... i can
  access peoples websites like this Http://localhost/~user/ but
  uploading is terrible. Because you have to send though SSH. I wanted
  to do FTP server but i don't know how to do it.. i looked at some
  manuals of apache and didn't fount how to do like this:

  user goes to ftp://localhost/ then he writes his user name and
  password and he can access his public_html folder to upload files or
  delete them. How to do this thing? is there some tutorials that i
  couldn't find? or anybody can help me directly? i would appreciate
  it.
  
  Thank You.

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt


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




[PHP] MySQL ID

2002-03-29 Thread Mantas Kriauciunas

Hey [EMAIL PROTECTED],

  I have few users in my small page. And it goes with ID numbers. I
  did auto increasement. And i think all the settings are ok. but in
  phpMyAdmin it shows ID numbers starting from 5 and i have 10 users
  so when i deleted row(user) with ID number 9 i have id number going
  like 5 6 7 8 10  . So i have like two questions. How to do that
  autoincreasement started from 0 and how to do that all id number
  where by order without missing some of them when i delete them. Like
  how so make that ID number 10 to be number 9 in the list..and all
  other number to go down by one. Is there simple way to do it?

  P.S i am so sorry that my english is weak. I am just learning ESL ir
  highschool :)

  Thanks for helping everybody

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt


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




[PHP] [newbie] Something is messed up, anybody can help?

2002-03-25 Thread Mantas Kriauciunas

Hey PHP General List,

Intro:
I am creating small login script and few things doesn't work right.
Code is hare:

admin.php

if(isset($subm_login))
{
$session[logged]=0;
$session[uzeriz]=;
$result = mysql_query(select * from uzer where user='$uzr_name' and 
pass='$uzr_passwd');
 if(!$result)   {
 echo This error should not be hare. But it sayes that it could not 
search for your user;
 } else {
  if(mysql_num_rows($result)!=1) {
   echo Login Not Found;
} else {
  while($row = mysql_fetch_row($result)){
  $session[uzeriz]=$row[user];
  $session[logged]=1;
  $session[pass]=$row[pass];
  }
}
 }
 session_register(session);
}

if( $session[logged]==1 )
{
  draw_admin_menu($session[uzeriz]);
}
if( $session[logged]==0 )
{
draw_login_box();
}

--
adm_func.php (this file is included in admin.php)

function draw_admin_menu($uzer)
{
global $session;
echo pUser Logged In/p\n;
echo p--/p\n;
echo p$uzer/P\n;
}

--

Problem:
the problem is that i cant see $uzer its empty. nothing is
therewhat i am doing wrong? all table names and everything is
correct but i get empty thing.

If that is dumb question im sorry :) i am kinda new in this :)

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt



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




Re[2]: [PHP] [newbie] Something is messed up, anybody can help?

2002-03-25 Thread Mantas Kriauciunas

Hey PHP General List,

Well thanks for helping but still i get nothing and i have no idea
why. I changed the line as you said to:

if( $session[logged]==1 )
{
  draw_admin_menu($uzeriz);
}

and took out that while.
It shows the box but the $uzeriz that i pass doesn't show up :/

maybe anybody see more mistakes?

:

Got your email on:Monday, March 25, 2002, 5:45:49 AM writing:

:
RE 1.  Just pass uzeriz to the function, not session(uzeriz);

RE 2.  FYI: you don't need this construct:  while($row =
RE mysql_fetch_row($result)){
RE Based upon the previous tests, there is ONLY 1 entry.  Therefore, go with:
RE $row = mysql_fetch_row($result);


RE -Original Message-
RE From: Mantas Kriauciunas [mailto:[EMAIL PROTECTED]]
RE Sent: Monday, March 25, 2002 6:39 AM
RE To: PHP General List
RE Subject: [PHP] [newbie] Something is messed up, anybody can help?


RE Hey PHP General List,

RE Intro:
RE I am creating small login script and few things doesn't work right.
RE Code is hare:

RE admin.php

RE if(isset($subm_login))
RE {
RE $session[logged]=0;
RE $session[uzeriz]=;
RE $result = mysql_query(select * from uzer where user='$uzr_name' and
RE pass='$uzr_passwd');
RE  if(!$result)   {
RE  echo This error should not be hare. But it sayes that it
RE could not search for your user;
RE  } else {
RE   if(mysql_num_rows($result)!=1) {
REecho Login Not Found;
RE } else {
RE   while($row = mysql_fetch_row($result)){
RE   $session[uzeriz]=$row[user];
RE   $session[logged]=1;
RE   $session[pass]=$row[pass];
RE   }
RE }
RE  }
RE  session_register(session);
RE }

RE if( $session[logged]==1 )
RE {
RE   draw_admin_menu($session[uzeriz]);
RE }
RE if( $session[logged]==0 )
RE {
RE draw_login_box();
RE }

RE --
RE adm_func.php (this file is included in admin.php)

RE function draw_admin_menu($uzer)
RE {
RE global $session;
RE echo pUser Logged In/p\n;
RE echo p--/p\n;
RE echo p$uzer/P\n;
RE }

RE --

RE Problem:
RE the problem is that i cant see $uzer its empty. nothing is
RE therewhat i am doing wrong? all table names and everything is
RE correct but i get empty thing.

RE If that is dumb question im sorry :) i am kinda new in this :)

RE :--:
RE Have A Nice Day! 
RE  Mantas Kriauciunas A.k.A mNTKz

RE Contacts:
RE [EMAIL PROTECTED]
RE Http://mntkz-hata.visiems.lt



:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt



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




Re[4]: [PHP] [newbie] Something is messed up, anybody can help?

2002-03-25 Thread Mantas Kriauciunas

Hey PHP General List,

Well it didn't work with $_session[logged]

and now i found one more interesting thing. it works if i do like
this:

.
$row = mysql_fetch_row($result);
$session[uzeriz]=$uzr_name;
$session[logged]=1;
.
then i pass:
.
draw_admin_menu($session[uzeriz]);
.

and it works so why does $row[user] is empty? when i pass like
this:
.
$row = mysql_fetch_row($result);
$session[uzeriz]=$row[user];
$session[logged]=1;
.

???

P.S thanks to people who is helping me out.

:
Got your email on:Monday, March 25, 2002, 1:12:03 PM writing:

:
eczc maybe you need $_session[logged] instead of $session[logged]

eczc Eric

eczc - Original Message -
eczc From: Mantas Kriauciunas [EMAIL PROTECTED]
eczc To: PHP General List [EMAIL PROTECTED]
eczc Sent: Monday, March 25, 2002 5:59 PM
eczc Subject: Re[2]: [PHP] [newbie] Something is messed up, anybody can help?


 Hey PHP General List,

 Well thanks for helping but still i get nothing and i have no idea
 why. I changed the line as you said to:

 if( $session[logged]==1 )
 {
   draw_admin_menu($uzeriz);
 }

 and took out that while.
 It shows the box but the $uzeriz that i pass doesn't show up :/

 maybe anybody see more mistakes?

 :

 Got your email on:Monday, March 25, 2002, 5:45:49 AM writing:

 :
 RE 1.  Just pass uzeriz to the function, not session(uzeriz);

 RE 2.  FYI: you don't need this construct:  while($row =
 RE mysql_fetch_row($result)){
 RE Based upon the previous tests, there is ONLY 1 entry.  Therefore, go
eczc with:
 RE $row = mysql_fetch_row($result);


 RE -Original Message-
 RE From: Mantas Kriauciunas [mailto:[EMAIL PROTECTED]]
 RE Sent: Monday, March 25, 2002 6:39 AM
 RE To: PHP General List
 RE Subject: [PHP] [newbie] Something is messed up, anybody can help?


 RE Hey PHP General List,

 RE Intro:
 RE I am creating small login script and few things doesn't work right.
 RE Code is hare:

 RE admin.php

 RE if(isset($subm_login))
 RE {
 RE $session[logged]=0;
 RE $session[uzeriz]=;
 RE $result = mysql_query(select * from uzer where
eczc user='$uzr_name' and
 RE pass='$uzr_passwd');
 RE  if(!$result)   {
 RE  echo This error should not be hare. But it sayes
eczc that it
 RE could not search for your user;
 RE  } else {
 RE   if(mysql_num_rows($result)!=1) {
 REecho Login Not Found;
 RE } else {
 RE   while($row = mysql_fetch_row($result)){
 RE   $session[uzeriz]=$row[user];
 RE   $session[logged]=1;
 RE
eczc $session[pass]=$row[pass];
 RE   }
 RE }
 RE  }
 RE  session_register(session);
 RE }

 RE if( $session[logged]==1 )
 RE {
 RE   draw_admin_menu($session[uzeriz]);
 RE }
 RE if( $session[logged]==0 )
 RE {
 RE draw_login_box();
 RE }

 RE --
 RE adm_func.php (this file is included in admin.php)

 RE function draw_admin_menu($uzer)
 RE {
 RE global $session;
 RE echo pUser Logged In/p\n;
 RE echo p--/p\n;
 RE echo p$uzer/P\n;
 RE }

 RE --

 RE Problem:
 RE the problem is that i cant see $uzer its empty. nothing is
 RE therewhat i am doing wrong? all table names and everything is
 RE correct but i get empty thing.

 RE If that is dumb question im sorry :) i am kinda new in this :)

:



:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt



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




Re[2]: [PHP] Using EditPlus with PHP

2002-03-24 Thread Mantas Kriauciunas

Hey PHP General List,

I have problem also with editplus. Well i have same as Martin has but
i get warning =  Unable to load dynamic library
'c:\web\php\extensions/php_java.dll' - The specified modyle could not
be found.  But what is interesting that php_java.dll is in the place
in that directory and it doesn't find it. Well any suggestions what
should i do ?

Thanks

:

Got your email on:Sunday, March 24, 2002, 2:25:02 PM writing:

MT Doesn't look like anyone's replied to this...

MT I just have a button with the following parameters

MT Menu Text: Parse w/ PHP4- I have a Parse w/ PHP3 and Parse w/
MT PHP-GTK :)
MT Command: C:\Program Files\httpd\php\php.exe
MT Argument: $(FilePath)
MT Initial directory: $(FileDir)

MT and I have the Capture output checkbox selected

MT HTH
MT Martin

MT -Original Message-
MT From: Luca Grossi [mailto:[EMAIL PROTECTED]]
MT Sent: Sunday, March 24, 2002 2:00 PM
MT To: [EMAIL PROTECTED]
MT Subject: [PHP] Using EditPlus with PHP


MT  I'm sorry if this question has been asked before
MT but could anyone give me instructions on how to debug and interpret php
MT scripts using Edit Plus ? I download the php modules for edit plus so
MT it recognise the syntax. But how do I setup the user tools , so I can check
MT for bugs in the script and run it

MT Thanks



:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt



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




[PHP] mail...

2002-03-24 Thread Mantas Kriauciunas

Hey PHP General List,

  Why do i get 5 copies of each email? not always but sometime 3
  sometimes 2 sometimes 5. Is this the only me (coz something is
  messed up with mail server or mail client) or some ppl also gets
  more than one

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt



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




[PHP] refreshing form

2002-03-20 Thread Mantas Kriauciunas

Hey [EMAIL PROTECTED],

I am doing small simple voting script for my site..and i don't want to
refresh whole site how should i refresh only the form? i can't find
info anywhere... so i am trying over hare..i am new so i dunno what is
this cong about. and i am using DB for my voting poll

thanks for help if there will be any ;)

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt



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