Jump to content

birbal

Members
  • Posts

    2,543
  • Joined

  • Last visited

Everything posted by birbal

  1. birbal

    Filter string

    i want to customize that in my register page..only a-z,1-0 can be stored...how to filter the input from user. if user input other than a-z or 1-0 ..it will return a error..will the filter regexp work on it..give some idea on it.
  2. again i am here with a problem...i reinstalled apache 2.2 and php5.3 vc6 thread safe in my pc...problem is ..when i am using index.html or only http://localhost it is showing the default index.html..but incase of index.php file..it is showing forbidden error...dont have access...i searched net but did not find any good answer. what to do now? error in log apache Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.localhost] does not existWarning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.localhost] does not existhttpd.exe: Could not reliably determine the server's fully qualified domain name, using 175.40.***.*** for ServerName[Fri Oct 01 19:05:16 2010] [notice] Child 340: Child process is running[Fri Oct 01 19:05:17 2010] [notice] Child 480: Released the start mutex[Fri Oct 01 19:05:17 2010] [notice] Child 340: Acquired the start mutex.[Fri Oct 01 19:05:17 2010] [notice] Child 340: Starting 64 worker threads.[Fri Oct 01 19:05:17 2010] [notice] Child 340: Starting thread to listen on port 80.[Fri Oct 01 19:05:18 2010] [notice] Child 480: All worker threads have exited.[Fri Oct 01 19:05:18 2010] [notice] Child 480: Child process is exiting 1) (175.40.***.*** ) it is my ip..i am amazing why it is showing there...i thoght it suppose to be 127.0.0.1
  3. birbal

    online list

    and i mysql command promt returning empty set in session table. (mysql table where i storing session) id varchar(40)primary keycontent texttimestamp int not null this is the datastructrue of my table session
  4. birbal

    online list

    <?phpinclude "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\phpfunction.php";error_reporting(E_ALL);ini_set('error_log','C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\error.log');ini_set('html_errors', 0);ini_set('log_errors', 1);ini_set('display_errors', 0);$cOndb=connect_db("dtabase");//============================================================================================================//open session//============================================================================================================function custom_session_open($save_path,$session_name){return(true);}//============================================================================================================////close session//============================================================================================================function custom_session_close(){return custom_session_gc(get_cfg_var("session.gc_maxlifetime"));}//============================================================================================================//session read //============================================================================================================function custom_session_read($id){$output="";$qry=<<<ENDselect * from session where(id="$id")END;$res=query($qry);$row=q_out($ses_path,$ses_name);if($row) { $output=$row; }else { $output=""; }return $output;}//============================================================================================================//session write //============================================================================================================function custom_session_write($id,$ses_data){$curtime=time();$qry=<<<ENDinsert into session values("$id","$ses_data","$curtime") on duplicate key update id="$id",content="$ses_data",timestamp="$curtime"END;$res=query($qry);return(true);}//============================================================================================================//session destroy//============================================================================================================function custom_session_destroy($id){$qry=<<<ENDdelete from session where(id="$id")END;$res=query($qry);return(true);}//============================================================================================================//session garbage collection time in seconds//============================================================================================================function custom_session_gc($maxtime){$cur=time();$exp=$cur-$maxtime;$qry=<<<ENDdelete from session where(timestamp<$exp)END;return(true);}//============================================================================================================//============================================================================================================session_set_save_handler('custom_session_open','custom_session_close','custom_session_read','custom_session_write','custom_session_destroy','custom_session_gc');echo "session function is ok";?> this the code..quey(),q_out(),db_connect()..is customized function described in phpfunction.php(included)i dont have phpmyadmin...using mysql command prompt.pleas correct me..where i am wrong.
  5. all right i found vc6 non thread safe is apropiate for my situation...thanks again for all
  6. birbal

    online list

    ohh my mistake..here is the both file..sescheck.php <?phpinclude "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\session.php";echo "php starts";$_SESSION["testvar"]=13;echo "php end";?> sescheck1.php <?phpecho "starts";include "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\session.php";echo $_SESSION["testvar"];echo "ends";?> it is showing the session now...but it is not storing the session in datbase ...when i use this ..it is not showing stored session select * from session; why?
  7. i am too much confused with installing php...when i first time installed it i choose something wrong setup file..and faced lot of problems..i used net to install it (help)..1)if you please recomend me how to choose one of them it will be very helpful for me...i dont know diffrence beetwin thrad safe..and non thread safe..and vc6 and vc9..i am using windows xp sp 2...apache 2.2..previous php was installed manuallyplease give me a guide
  8. birbal

    online list

    [30-Sep-2010 07:47:50] PHP Notice: Undefined variable: _session in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sescheck1.php on line 9error showing thisno i cant use session variable to other page also.
  9. birbal

    online list

    1) table is ok as far i checked it and i had added mysql_error() with the all php_mysql function...they are not showing any thing.2) yes i checked it now writing down the error[30-Sep-2010 06:43:42] PHP Notice: A session had already been started - ignoring session_start() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\session.php on line 83
  10. 1) Error showing (output): php startsFatal error: Call to undefined function filter_list() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\val.php on line 62) is there any problem with this dveloper version release candidate? i was too confused with so many php setup files in their website
  11. 1) if i put include file out of web root how will i refer to that file?...include "______" ?????2) no ..i mean that when user load a pages he will show the image...but if user try to download the image file by the url...is there any way to stop it? eg <img src="http://something.com/img/image.jpg" /> here image will be shown in the page..but is there any way to stop downloading the file by accessinghttp://something.com/img/image.jpg3) it got my answerd in (1)..thank you!
  12. this is my php versionPHP Version 5.2.4RC3-dev
  13. birbal

    online list

    Ok ...but still have some problem in session...handler()...it is not still working..i followed all things. ..but when i am setting a session(eg. $_SESSION['code']=123) it is not storing it in database..
  14. [link]php.net/manual/en/function.filter-list.php[/link]filter list function comes with php standard installation as php.net is saying..so how could be that possible that filter_list() is not available or there are some problem?!it is not in include file...i am not testing any include file. just try to to execute validating function. it should return the all supported filter in my pc(remote server was doing that well).
  15. 1) what should be the file permission for my php function library file?...where the file can be included into any file and can be excuted...but user cant access or viw or download it...please any give me some info about file permissions...2) what should be the folder permission (for image) where i can use <img> tag for use...but user wont be able to download that3) if i put any folder outside of public_html and use absolute address (not URL) will it be safer?
  16. i am ahving some problems when i am using php validating function. so i ran these simple code to check. but it is not working in my computer (apache server in windows xp sp2 with php5)....i write down the code and the output what is showing my pc... <?phpecho "php starts";print_r(filter_list());echo "php ends";?> outputphp startsbut this code is working and showing all in remote server (other online host). i tested.so what is the problem occuring?
  17. birbal

    online list

    ok i checked..that is what i was looking for. thank you!but there is some problem.....(1)function custom_session_open($save_path, $session_name) here what parameter will be passed in $save_path and $session_name?(2) whe i am using the custom_session_write(),custom_session_read(),custom_session_destroy() it is working and interacting with the database. but when i am putting these in the session_set_save_handler() it is not working with datbase. i cant find where is wrong.
  18. birbal

    online list

    CAN U EXPLAIN IT MORE PLEASE
  19. birbal

    online list

    but there is a problem if user dont logout (i mean session does not unset) then how to check the user are online or not. so how can i do that automaticaly. i mean after a particular time user dont loads any page they will be cosidered as offline. and their session will be unset and cleared from database.
  20. birbal

    online list

    how can i check users are online or offline in my site. any one please give some idea on it
×
×
  • Create New...