[PHP] Fatal error
Dear members,I get an error,What does mean my error? : Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/votting/vote_implement.php on line 8 = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net ___ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Header sending
Dear members,I need to post a header without Form tag. Already i have used input tag (hidden type),But i don't kbow to how do it. Please guide me Yours,Mohsen = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net ___ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] list of Months
You can do it: ? $month=array(Febrey,.); echo select name=\nameofyourtag\ for ($i=1;$i13;$i++) { echo option value=\$i\$month[$i]; } echo /select --- [EMAIL PROTECTED] wrote: Hi, to create a list of all months in drop-down menu I use this code: ?php $month_names = array(1='Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); ? select name=QuoteMonth option value=/option ?php for($i=1; $i=12; $i++) { if(date('m') == $i) $selected_QuoteMonth = 'SELECTED'; else $selected_QuoteMonth = ''; echo option value=$i $selected_QuoteMonth $i /option; } ? /select Is there any better way? Thanks for any help. Afan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] validate a tag
Dear,I have a input text tag that it named question. Also i have a 2 radio bottum. When i receive their value,I want to test that question tag is empty or not.If empty,I again send to client until client fill out this tag. Can u solve my problem? ?php function display_form() { echo form action=\.$_SERVER['PHP_SELF']. \ method=\post\; echo Your questioninput type=\text\ name=\question\ br /; echo radio type input type=\radio\ name=\type_of_reply\ value=\0\br /; echo check box type input type=\radio\ name=\type_of_reply\ value=\1\br /; echo input type=\submit\; /* if (empty($HTTP_POST_VARS['question'])) { echo please fill out question field.; display_form(); }//end of if*/ }//end of display_form func function test_var() { if (empty($HTTP_POST_VARS['question'])) { echo please fill out question field.; display_form(); }//end of if }//end of func function insert_to_question() { display_form(); while(empty($HTTP_POST_VARS['question'])) test_var(); }//end of insert_to_question func insert_to_question(); ? = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PEAR Auth
I was working with Auth class.That was working good. But i receive following errror: Fatal error: Undefined class name 'db' in /var/www/html/votting/Auth/Container/DB.php on line 130 Please guide me. = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net ___ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $HTTP_POST_VARS
Dears,I need to my program is waitting while $HTTP_POST_VARS change Please guide me.. = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net ___ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sessions session_start() my problem
Dears,I have 3 files. k.php : ? session_start(); $S_userk=$HTTP_POST_VARS['u']; $S_pass=$HTTP_POST_VARS['p']; //echo $S_pass; session_register('S_userk'); session_register('S_passk'); include 'http://1.1.1.1/membership/login.php?g=0'; ? login.php: define(HOST,localhost); define(USER,root); define(PASS, ); define(DB,mem); /// session_start(); if ($HTTP_GET_VARS['g']==1) { $username=$S_username; $password=$S_password; //print $username; } else if ($HTTP_GET_VARS['g']==0) { $password=$S_passk; $username=$S_userk; } $S_username=$username; $S_password=$password; if(empty($S_username) empty($S_password) ) { mysql_connect(HOST,USER) or die(connect); mysql_select_db(DB) or die(db); $result=mysql_query(SELECT count(*) as numfound FROM usernames where user='$username' and pass='$password') or die(jjjgar); $result_ar=mysql_fetch_array($result); if($result_ar['numfound'] 1 ) { //echo ffdsfsfsdvfdsfdssc; //curl_exec(curl_init('http://1.1.1.1/membership/index.html')); header('Location: index.html'); exit; } session_register('S_username'); session_register('S_password'); echo Logged in successfully!; But when i loggin in my site,I recv following warnings: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/html/membership/k.php:2) in /var/www/html/membership/k.php on line 3 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/html/membership/k.php:2) in /var/www/html/membership/k.php on line 3 Please explaine me on my warnings. Yours,Mohsen. = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My work phone is : +98216054096-7 My home phone is: +98213810146 My emails is [EMAIL PROTECTED] My website is: http://webnegar.net __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Sessions session_start() my problem
I have deleted session_start() at login.php Thus i have 1 session_start() But i receive them yet. Yours,Mohsen --- Jasper Howard [EMAIL PROTECTED] wrote: that was a bit confusing, but it looks like you call session_start() more than once in a script. You only need to call it once, and you need to call it before any headers get sent, at the top of the script is a good place. If you're scripts are already setup like that just ignore me. Oh, also, if you include a file that has session_start() in it you'll get that warning too. -- -- Jasper Howard :: Database Administration Velocity7 1.530.470.9292 http://www.Velocity7.com/ -- Pahlevanzadeh Mohsen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Dears,I have 3 files. k.php : ? session_start(); $S_userk=$HTTP_POST_VARS['u']; $S_pass=$HTTP_POST_VARS['p']; //echo $S_pass; session_register('S_userk'); session_register('S_passk'); include 'http://1.1.1.1/membership/login.php?g=0'; ? login.php: define(HOST,localhost); define(USER,root); define(PASS, ); define(DB,mem); /// session_start(); if ($HTTP_GET_VARS['g']==1) { $username=$S_username; $password=$S_password; //print $username; } else if ($HTTP_GET_VARS['g']==0) { $password=$S_passk; $username=$S_userk; } $S_username=$username; $S_password=$password; if(empty($S_username) empty($S_password) ) { mysql_connect(HOST,USER) or die(connect); mysql_select_db(DB) or die(db); $result=mysql_query(SELECT count(*) as numfound FROM usernames where user='$username' and pass='$password') or die(jjjgar); $result_ar=mysql_fetch_array($result); if($result_ar['numfound'] 1 ) { //echo ffdsfsfsdvfdsfdssc; //curl_exec(curl_init('http://1.1.1.1/membership/index.html')); header('Location: index.html'); exit; } session_register('S_username'); session_register('S_password'); echo Logged in successfully!; But when i loggin in my site,I recv following warnings: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/html/membership/k.php:2) in /var/www/html/membership/k.php on line 3 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/html/membership/k.php:2) in /var/www/html/membership/k.php on line 3 Please explaine me on my warnings. Yours,Mohsen. = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My work phone is : +98216054096-7 My home phone is: +98213810146 My emails is [EMAIL PROTECTED] My website is: http://webnegar.net __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dynamic Function with return?
1 way is here.You can use object OOP. --- bskolb [EMAIL PROTECTED] wrote: Sample Code: // ?PHP // version 4.3.6 function testFunction($foo) { return $foo==TEST; } function wrapper($foofunc, $foovar) { return eval(return $foofunc($foovar);); } echo wrapper(testFunction, TEST); ? // This code works. It calls the function and receives the appropriate return value. But, is there a better way of doing this? It seems a bit round-a-bout. Thanks! = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] an error before register a session
Dears,When i run rm -rf /tmp/sess_* ,It are meaning that i clean every session. When i want to my program,I receive following warning : Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0 But,When i regist at least 1 session,I don't recv it. Please guide me Yours,Moshen = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net ___ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Need Help for Session
1.You must call session_start before making a HTML for client. 2.Please use if (!session_is_registered('vb1')) session_register('vb1'); --- S. Kang [EMAIL PROTECTED] wrote: Afzal Hussain ) wrote: Sir, I am afzal hussain from bangladesh. Acually i am getting some problem using session in php. This is the sample code that i have written, session_start(); //$vbl=This variable is registered; //session_register('vbl'); $_SESSION['vb1'] = This variable is registered; //echo $vbl; echo $_SESSION['vb1']; ? it shows this output. Warning: Cannot send session cookie - headers already sent by (output started at c:/program files/abria merlin/apache/htdocs/session.php:3) in c:/program files/abria merlin/apache/htdocs/session.php on line 4 Warning: Cannot send session cache limiter - headers already sent (output started at c:/program files/abria merlin/apache/htdocs/session.php:3) in c:/program files/abria merlin/apache/htdocs/session.php on line 4 Warning: open(/tmp\sess_178d4e9e23a4d7b1f061f93e7f172496, O_RDWR) failed: m (2) in c:/program files/abria merlin/apache/htdocs/session.php on line 4 This variable is registered Finding no other way i am sending this email to u. Could u pls tell me what s\could be the problem. and How i can i solve that problem. thanks you very much. afzal Hussian - Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] My code has problem.
My code is: ? include_once('./auth/Auth.php'); function x(){echo xxx;} $parameterforauth=array(dsn=, table=usernames, usernamecol=user, passwordcol=pass); $ptr_auth_C=new auth(DB,$parameterforauth,x); $ptr_auth_C-start(); ? My output is : Warning: _factory(Auth/Container/DB.php): failed to open stream: No such file or directory in /var/www/html/forum/auth/Auth.php on line 218 Fatal error: _factory(): Failed opening required 'Auth/Container/DB.php' (include_path='.:/usr/share/pear') in /var/www/html/forum/auth/Auth.php on line 218 Please guide me. = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail functions help
Dear,Please use following command for test of your SMTP server: telnet localhost 25 You must recv following message if your SMTP server is up: Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. 220 localhost.localdomain ESMTP Sendmail 8.12.10/8.12.10; Tue, 31 Aug 2004 14:44:01 +0430 /Mohsen --- [EMAIL PROTECTED] wrote: I'm trying to use the eFiction fanction/story archiving script for my website (view the script here: http://www.thesonicworld.net/efiction/), but the registration process is giving me trouble. It's one of those where you fill in your email and username and they send you a default password. Well, I'm not getting that e-mail. I was told I need to make sure my mail functions are active. Furthermore I have been told lots of things about SMTP servers and webservers and localhost and I'm really not following. What is my SMTP server? How do I enable it/make sure its working? If it isn't working, how do I get it to work? -Andrew = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() function problem
Please install a mailserver until your SMTP server will be up. When your SMTP server is down,mail func doesn't work. My suggesstion: Please work under UNIX systems. Yours,Mohsen --- Dre [EMAIL PROTECTED] wrote: Hi I was trying to use the mail() function, but it did not work, maybe because of some settings problem or something that I can't figure out I went online and tried to execute the following //=== ?php $from = $_POST['from']; $subject = $_POST['subject']; $content = $_POST['content']; $to = [EMAIL PROTECTED]; $headers = From:.$from; if(mail($to, $subject, $content, From: $from)) { echosent; } else{ echo not sent; } ? //=== the variable values sent from a Form in another and they are sent correctly but I keep having this error //=== Warning: mail(): Failed to connect to mailserver at localhost port 25, verify your SMTP and smtp_port setting in php.ini or use ini_set() in C:\Program Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line 194 //=== my php.ini settings for the mail function are //= [mail function] ; For Win32 only. SMTP = localhost smtp_port = 25 sendmail_from = [EMAIL PROTECTED] //= thanks in advance Dre, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() function problem
Please switch to a UNIX box.For example Fedora. Because it has everythings that you need. --- Dre [EMAIL PROTECTED] wrote: I'm using an Apache server .. doesn't it come with a sendmail program ?? I really don't know Jasper Howard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] do you have a sendmail program on your testing server? -- -- Jasper Howard :: Database Administration Velocity7 1.530.470.9292 http://www.Velocity7.com/ -- Dre [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi I was trying to use the mail() function, but it did not work, maybe because of some settings problem or something that I can't figure out I went online and tried to execute the following //=== ?php $from = $_POST['from']; $subject = $_POST['subject']; $content = $_POST['content']; $to = [EMAIL PROTECTED]; $headers = From:.$from; if(mail($to, $subject, $content, From: $from)) { echosent; } else{ echo not sent; } ? //=== the variable values sent from a Form in another and they are sent correctly but I keep having this error //=== Warning: mail(): Failed to connect to mailserver at localhost port 25, verify your SMTP and smtp_port setting in php.ini or use ini_set() in C:\Program Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line 194 //=== my php.ini settings for the mail function are //= [mail function] ; For Win32 only. SMTP = localhost smtp_port = 25 sendmail_from = [EMAIL PROTECTED] //= thanks in advance Dre, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] My problem
Dears, My mysqld is up. I inserted mohsen as username, md5 of mohsen as password. I have mem as bank.usernames as my table. i have user pass as my fields. i inserted mohsen as user md5 of it as pass. It are meaning : mohsen : 80393af8b3d99736c8b0d49d9a9da4ffxxx But my code isn't work: ? include_once('Auth/Auth.php'); function Login() { echo xxx; echo form method=\post\ action=\.$_SERVER['PHP_SELF']. \\; echo input type=\text\ name=\u\ br /; echo input type=\password\ name=\p\ br /; echo input type=\submit\; echo /form; } $username=$_POST['u']; $password=$_POST['p']; $parameterforauth=array(dsn=mysql://$username:[EMAIL PROTECTED]/mem, table=usernames, usernamecol=user, passwordcol=pass); $ptr_auth_C=new Auth(DB,$parameterforauth,'Login'); $ptr_auth_C-start(); if ($ptr_auth_C-getAuth()) echo Successfuly loggined!!!; ? I can't see Successfuly loggined!!! Please guide me.. --Mohsen = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() function problem
If you use Windows as your server,You must install M$Exchange server.It is a mailserver under Windows. Of course,If you want to install Linux,I can help u. It has benefit for u. Even i made a group on yahoo phplovers. You can join to my group will get help. It has 56 members. My email address is m_pahlevanzadeh at yahoo dot com If you have a question on Linux,I can help u. But it is your chioce...Linux or Windows. When you develop under windows,You must upload it to an UNIX box.May be you will have problem. Please start with Linux as your OS. Yours,Mohsen --- Dre [EMAIL PROTECTED] wrote: Sorry .. but I'm really so new at this I'm using Apache Server on a MS Windows XP Pro. OS, and I'm trying to send a mail through a form .. what do I need to install or configure to be able to do this. thanks in advance Dre [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm using an Apache server .. doesn't it come with a sendmail program ?? I really don't know Jasper Howard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] do you have a sendmail program on your testing server? -- -- Jasper Howard :: Database Administration Velocity7 1.530.470.9292 http://www.Velocity7.com/ -- Dre [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi I was trying to use the mail() function, but it did not work, maybe because of some settings problem or something that I can't figure out I went online and tried to execute the following //=== ?php $from = $_POST['from']; $subject = $_POST['subject']; $content = $_POST['content']; $to = [EMAIL PROTECTED]; $headers = From:.$from; if(mail($to, $subject, $content, From: $from)) { echosent; } else{ echo not sent; } ? //=== the variable values sent from a Form in another and they are sent correctly but I keep having this error //=== Warning: mail(): Failed to connect to mailserver at localhost port 25, verify your SMTP and smtp_port setting in php.ini or use ini_set() in C:\Program Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line 194 //=== my php.ini settings for the mail function are //= [mail function] ; For Win32 only. SMTP = localhost smtp_port = 25 sendmail_from = [EMAIL PROTECTED] //= thanks in advance Dre, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Auth class----MySQL user
Dears,My code is : ? function Login() { echo xxx; echo form method=\post\ action=\.$_SERVER['PHP_SELF']. \\; echo input type=\text\ name=\u\ br /; echo input type=\password\ name=\p\ br /; echo input type=\submit\; echo /form; } $username=$_POST['u']; $password=$_POST['p']; echo md5('mohsen'); $parameterforauth=array(dsn=mysql://$username:[EMAIL PROTECTED]/mem, table=usernames, usernamecol=user, passwordcol=pass); $ptr_auth_C=new Auth(DB,$parameterforauth,'Login'); $ptr_auth_C-start(); if ($ptr_auth_C-getAuth()) echo Successfuly loggined!!!; ? I have opened mysql shell, i have typed following statement: use mem grant all privileges on usernames to [EMAIL PROTECTED]; set password for mohsen=password('loverx'); insert into usernames values (user='mohsen',pass=md5('loverx')); commit; But i can't loggin into my program.(with mohsen as username loverx as password) Thsu i can't see Successfuly loggined!!! Please guide me. Yours,Mohsen. = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Users of RDBMS
Dears, I need to create user for MySQL. Please guide me.. = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Auth class /usr/share/pear
Deras,I have deleted /usr/share/pear/* Also i have downloaded PEAR.1.3.5.Then i copy content of PEAR.1.3.5 directory to /usr/share/pear But now i recv following message: Warning: _factory(Auth/DB.php): failed to open stream: No such file or directory in /var/www/html/forum/Auth/Auth.php on line 218 Fatal error: _factory(): Failed opening required 'Auth/DB.php' (include_path='.:/usr/share/pear') in /var/www/html/forum/Auth/Auth.php on line 218 I'm using Auth class. Please guide me.. Yours,Mohsen = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Virtual Host problem
please send it to Apache mailling list. --- a.k.a kioto [EMAIL PROTECTED] wrote: Hi all i've try to configure Apache with Virtual Host in the main configuration file of Apache i have modify like this: #NameVirtualHost *:80 NameVirtualHost * # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # VirtualHost *:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/apache/users/default ServerName mordoch /VirtualHost VirtualHost *:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/apache/users/mysite ServerName mysite /VirtualHost VirtualHost *:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/apache/users/brothersite ServerName brother /VirtualHost I have insert a file index.php in all main folder of virtaul host: /usr/local/apache/users/default/index.php /usr/local/apache/users/mysite/index.php /usr/local/apache/users/brothersite/index.php I have modified the file hosts in etc/hosts. 39.244.88.126 mordoch 127.0.0.1 mordoch 127.0.0.1 localhost 127.0.0.1 mysite 127.0.0.1 brother When i try to view with my browser i type on my addressbar http://localhost i receive a message error like this: Warning: Unknown(/usr/local/apache_1.3.31/users/default/index.php): failed to open stream: Permission denied in Unknown on line 0 Warning: (null)(): Failed opening '/usr/local/apache_1.3.31/users/default/index.php' for inclusion (include_path='.:/usr/local/php/lib/php') in Unknown on line 0 I receive this error for all virtual host that i have create. The chmod of all folder is set to 777. What are the reason ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Server's IP Adress
You can use getbyhostname() func. --- Kevin Javia [EMAIL PROTECTED] wrote: Greetings, How can I get Server's IP address? I know $_SERVER[SERVER_ADDRSS] but this do not work all the time. Is there any other method? Thanks a ton in advance. Kevin. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] GLOBAL reserved word
Dears,We can introduce a external variable to our function with GLOBAL reserved word.same following : ? $n=3 function nn() { global $n; echo $n; }//end of func ? But i need to introduce a array.Name of my array is month. I typed global $month;.But it didn't work. Please guide me until i can use an external array. Yours,Mohsen. = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net ___ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best way to save preferences?
You should use XML files,But XML files will be lock when you want to multiuser read it. Also arrays is having overhead for your server.Best way is using databses. Yours,Mohsen. --- Victor Spång Arthursson [EMAIL PROTECTED] wrote: Which is the best way to save preferences (for a site) to make them easily accessable for changes? What I want is a way to save arrays and read them in again without having to use a database Thankful for suggests, sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Post vars without using html form
You must use Socket Programming. PHP have been supported socket programming. You can choose port 80 then use its functions. Yours,Mohsen --- Harry.de [EMAIL PROTECTED] wrote: Does anybody know, how to post vars without using html. I'd like to send data to an external website and receive the http answer. The external website awaits post vars from a form. Tanks, Harry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net ___ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best way to save preferences?
Dear,I mean that you can't read XML file in multiuser mode. --- Marek Kilimajer [EMAIL PROTECTED] wrote: Pahlevanzadeh Mohsen wrote: You should use XML files,But XML files will be lock when you want to multiuser read it. It's not necessery to lock files for reading. Also arrays is having overhead for your server.Best way is using databses. Yours,Mohsen. --- Victor Spång Arthursson [EMAIL PROTECTED] wrote: Which is the best way to save preferences (for a site) to make them easily accessable for changes? ini files, pure php (fastest), some custom format (slowest) What I want is a way to save arrays and read them in again without having to use a database Thankful for suggests, sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net ___ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php