[PHP] converting date into database date format(newbie)
Hi, I am a newbie to php. I am reading date in the format 08-Aug-03 from a text file. While writing this date into the myqsl database's date column it shows '00-00-'. Is there a function or some other way to convert 08-Aug-03 type of dates in to format which is acceptable by date field of the mysql database. Thanks and regards Anil. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] email
hi i found a 'formmail' scripts from somewhere.. the problem isthe email which i get from this scripts has 'unprivilaged user' in the 'from' field. mail($form['recipient'], $form['sublect'],$mailbody, From:Web User); if i use this...in the from field..it says '[EMAIL PROTECTED]' I just need the from field to show 'Web User' (instead of 'unprivilaged user') Can i do this!! plz help thanks and regards anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] e-mail
hi i found a 'formmail' scripts from somewhere.. the problem isthe email which i get from this scripts has 'unprivilaged user' in the 'from' field. mail($form['recipient'], $form['sublect'],$mailbody, From:Web User); if i use this...in the from field..it says '[EMAIL PROTECTED]' I just need the from field to show 'Web User' (instead of 'unprivilaged user') Can i do this!! plz help thanks and regards anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php 4.2.3 giving prob.
hi, i am facing a strange problem i am using php 4.2.3 the url says http://ipaddress/admin/add_doc.php?id=264mode=add;. but in the php file when i try to print $id and $mode it couldnt print the values.. but in some other files it successfully reads the parameters from url. moreover, the same code is working fine in some older version of php..(on another machine) what m i doing wrong here? can someone give me some pointers. thanx and regards anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] addslashes and remove slashes.
Hi, Is it so that in php 4.2.3 we have to do both...addslashes and removeslashes ?? coz in one of the older versions the things are goin fine without using removeslashes but it doesnet seem to be the case in php4.2.2. thanx and regards anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] apache2.x and php
Hi, i came to know from someone that i can *not* make php a shared module in apache 2.x .It works only in 1.3x. If thats true can someone point me to some link saying the same. thanx and regards anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] comparison of apache 1.3.x and 2.x
Hi, Thanx for you mails. As per your suggestion i have decided to install apache 1.3.26(latest 1.3.x) with php-4.2.3. But, one thing still boggling me(and i couldnt find any documentaion about that) is that whats the major difference between apache1.3.x series and apache 2.x series...for what reason are both the threads beings processed?(i m asking this coz i want to know what will i be missing if i use 1.3.26 instead of 2.0.40. Can u plz gimme some pointers. Thanx and regards anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] intalling php.
Hi, I want to upload my website..i had a machine on local lan which had already php installed on it...so i made my website there.. Now on a news new unit. I am trying to install php on free bsd machine...the apache webserver is runniing fine.. on installing php it doesnt edit lines like: Load module libphp.so. .. Add module libphp.c .. I really got stuckcan someone plz tell me what probably i am doing wrong. thanx and regards anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Installing php - 4.2.3 with apache - 2.0.40
Hi, I am using following versions: php - 4.2.3 apache - 2.0.40 I am reffering to intallationg intruction at : http://www.php.net/manual/en/install.apache.php while intalling php i use the following: ./configure --prerfix=/usr/local -- with -mysql = /usr/local/msyql --with -tsrm -pth --enable -force -cgi - redirect --with -apxs2=/usr/local/bin/apxs2 BUT, i get the folling while the libtools script is running It couldnt find libphp4.a in /usr/local/modules/to move it to some other place with name libphp4.so And as a result it while i do apachctl startit says it cant find libphp4.so Can php - 4.2.3 and apache - 2.0.40 be used together?? In fact i dont want to use lower versions of both of them as lower versions of both have many vulnerabilities exploited by now. So, i got stuck at the mid of uploading my site. Hope to get some solutions. Thanx and regards anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] vulnerabilities??
hi, Is there any version of php and apache for which there are no known vulnerabilities?? regards anil :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] apache problem......
hi in my httpd.conf i have added a virtual host as: VirtualHost 10.70.0.215:90 # General setup for the virtual host DocumentRoot /netvcr/www/niksun ServerName niksun.com #ServerAdmin [EMAIL PROTECTED] ErrorLog |/usr/local/sbin/rotatelogs /var/log/httpd-error.log 172800 10 TransferLog |/usr/local/sbin/rotatelogs /var/log/httpd-access.log 172800 10 /VirtualHost but now if from browser i try to access http:10.70.0.215:90 the things go fine...but if i dont type 'http' and just type 10.70.0.215:90 in the browser.i get the following error message: The page cannot be displayed The page you are looking for might have been removed or had its name changed. -- Please try the following: a.. Open the s: home page, and then look for links to the information you want. b.. If you typed the page address in the Address bar, make sure that it is spelled correctly. -- Can someone one tell me when this error comes. Thanx and regards anil p.s. php,query, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] getting ip address of the user.
hi, Can i get the ip-address of the machines who accessed my website?? Plz give the pointer that on what lines shall i start for doing so. thanx and regards anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] is php4.2 supported on freebsd-4.2
Hi, i am using php.4.1.2. on freebsd 4.2 i want to upgrade from 4.1.2 to 4.2.2... The problem is: 1. Is php 4.2.2 supported on freebsd-4.2 ? 2. Can this happen that after upgrade(of php).some code doesnt work on 4.2.2 which was working on 4.1.2. thanx and regards anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] is php-4.2.3 a stable version?
Hi, i am using freebsd4.2 I couldnt find if the latest php-versiono 4.2.3 a stable version ?? i mean shall i use 4.2.2 or 4.2.3 ? thanx and regards anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] installing php-4.2.3
hi, i am a newbie to php... i have downloaded php-4.2.3.tar.gz from http://www.php.net/downloads.php can someone please point me to the right documentaion from where i can know what to do next.. I am using FreeBSD-4.2. thanx and regards anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] which version to use?
hi What version combinations of php and mysql should be used? regards anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] creating mail on submitting a form.
hi, In a form i have several text area.when i submit the form, I need to send a email at a particular id which contains the text entered in the text area. Can someone gimme a script which gives me and idea about how to do that...or some link where i can find that. Thanx and regards anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ' giving problem while inserting in table.
Hi, I am making a faq maintenance system using mysql and php. To insert a entry in to a faq table i am using the following query: - INSERT INTO faq_table_netvd (id,question, answer,netvcr,netdetector,add_date,mod_date,keyword,category,display,attach_ id) VALUES ('0','$frm[question]', '$frm[answer]','$frm[netvcr]','$frm[netdetector]','$frm[add_date]','$frm[mod _date]','$frm[keyword]','$frm[category]','$frm[display]','$frm[attach_id]') ); --- now the problem is when $frm[question] has some string like: why i can't eat. i get the following error: MySQL Error: You have an error in your SQL syntax near 't eat?' ,answer = 'Please recheck the power of your specs:)' ' at line 3.Putting a '\' before ' (e.g. \')solves my problem...but when i open the same quesion to edit it, again i have to put backslashes where ever i find ' in the quesion or answer. Can anyone please suggest a solution to this. thanx and regards anil [please ask if i havent explained the problem fully] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ' giving problem while inserting in table.
Hi, addslashes() works fine for me( and as John said i dint need to use stripslashes) NOW( :( ) whats happening is if i *want* to add a backslash in the string that also gets stripped off (as i have to specify many windows paths e.g. c:\niksun\config\ ). Is there any fix to this of its a trade off between ',,... and \ ? Note: putting a \\ to add \ doesnt help coz for one time it works one i open the entry in edit mode again i have to put \ before all the \. please help regards anil - Original Message - From: 1LT John W. Holmes [EMAIL PROTECTED] To: Martin Clifford [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 12, 2002 12:12 PM Subject: Re: [PHP] ' giving problem while inserting in table. You DON'T have to use stripslashes() on data coming out of a database. The slashes were there to escape certain characters so they could make it into the database. The actual slashes do not go into the database. If they are in your case, then you're using addslashes() twice, somehow. The only time you have to use stripslashes on database data is if your magic_quotes_runtime setting is on in php.ini. ---John Holmes... - Original Message - From: Martin Clifford [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 12, 2002 10:49 AM Subject: Re: [PHP] ' giving problem while inserting in table. Use addslashes() on ALL strings before inserting them into your database. Then, on your frontend, extract the data and use stripslashes() on all strings. Hope to help! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Anil Garg [EMAIL PROTECTED] 07/12/02 10:45AM Hi, I am making a faq maintenance system using mysql and php. To insert a entry in to a faq table i am using the following query: - INSERT INTO faq_table_netvd (id,question, answer,netvcr,netdetector,add_date,mod_date,keyword,category,display,attach_ id) VALUES ('0','$frm[question]', '$frm[answer]','$frm[netvcr]','$frm[netdetector]','$frm[add_date]','$frm[mod _date]','$frm[keyword]','$frm[category]','$frm[display]','$frm[attach_id]') ); --- now the problem is when $frm[question] has some string like: why i can't eat. i get the following error: MySQL Error: You have an error in your SQL syntax near 't eat?' ,answer = 'Please recheck the power of your specs:)' ' at line 3.Putting a '\' before ' (e.g. \')solves my problem...but when i open the same quesion to edit it, again i have to put backslashes where ever i find ' in the quesion or answer. Can anyone please suggest a solution to this. thanx and regards anil [please ask if i havent explained the problem fully] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ' giving problem while inserting in table.
thanx, its working perfect now anil :) - Original Message - From: 1LT John W. Holmes [EMAIL PROTECTED] To: Anil Garg [EMAIL PROTECTED]; Martin Clifford [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 12, 2002 12:46 PM Subject: Re: [PHP] ' giving problem while inserting in table. If you're using addslashes, then a string like this: It's going to be a good \ bad day Will be converted to It\'s going to be a good \\ bad day And then you can safely put that into your database. So I don't see why using a \ in your string is causing you problems. ---John Holmes... - Original Message - From: Anil Garg [EMAIL PROTECTED] To: 1LT John W. Holmes [EMAIL PROTECTED]; Martin Clifford [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 12, 2002 12:30 PM Subject: Re: [PHP] ' giving problem while inserting in table. Hi, addslashes() works fine for me( and as John said i dint need to use stripslashes) NOW( :( ) whats happening is if i *want* to add a backslash in the string that also gets stripped off (as i have to specify many windows paths e.g. c:\niksun\config\ ). Is there any fix to this of its a trade off between ',,... and \ ? Note: putting a \\ to add \ doesnt help coz for one time it works one i open the entry in edit mode again i have to put \ before all the \. please help regards anil - Original Message - From: 1LT John W. Holmes [EMAIL PROTECTED] To: Martin Clifford [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 12, 2002 12:12 PM Subject: Re: [PHP] ' giving problem while inserting in table. You DON'T have to use stripslashes() on data coming out of a database. The slashes were there to escape certain characters so they could make it into the database. The actual slashes do not go into the database. If they are in your case, then you're using addslashes() twice, somehow. The only time you have to use stripslashes on database data is if your magic_quotes_runtime setting is on in php.ini. ---John Holmes... - Original Message - From: Martin Clifford [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 12, 2002 10:49 AM Subject: Re: [PHP] ' giving problem while inserting in table. Use addslashes() on ALL strings before inserting them into your database. Then, on your frontend, extract the data and use stripslashes() on all strings. Hope to help! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Anil Garg [EMAIL PROTECTED] 07/12/02 10:45AM Hi, I am making a faq maintenance system using mysql and php. To insert a entry in to a faq table i am using the following query: - INSERT INTO faq_table_netvd (id,question, answer,netvcr,netdetector,add_date,mod_date,keyword,category,display,attach_ id) VALUES ('0','$frm[question]', '$frm[answer]','$frm[netvcr]','$frm[netdetector]','$frm[add_date]','$frm[mod _date]','$frm[keyword]','$frm[category]','$frm[display]','$frm[attach_id]') ); --- now the problem is when $frm[question] has some string like: why i can't eat. i get the following error: MySQL Error: You have an error in your SQL syntax near 't eat?' ,answer = 'Please recheck the power of your specs:)' ' at line 3.Putting a '\' before ' (e.g. \')solves my problem...but when i open the same quesion to edit it, again i have to put backslashes where ever i find ' in the quesion or answer. Can anyone please suggest a solution to this. thanx and regards anil [please ask if i havent explained the problem fully] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] hide a select tag
Hi, sorry for going a lil out of way of php. can i hide a drop down menu.(as i always want to pass the default value selected in the drop down. thanx and regards anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] to remove html tags from a string.
Hi, How to do whats written in the commented line(//) in the code below: ?php $term = .Btest/b; if(stristr($term,) stristr($term,) !stristr($term,br) !stristr($term,p) ){ printf(its html tag); // here i want to remove the html tags from $term and then print it.(here it should print '.test') } else{ printf(not a html tag.); } ? Thanx and regards anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] viewing php predefined fucntions
Hi, at this link: http://www.php.net/manual/en/funcref.php i can see the categories of the available functions, But How can i see all the fucnctions in php together (in one screen)? Is there a way to do that. Thank You anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] include_module()
Hi, Is include_module() a predefined functioin of php. I couldnt find it in documentaion. Is there any way i can view all the functions availabe together?? thanks anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] large tables scroll down:(
Hi, for viewing long tables. when i say SELECT * FROM abc i miss the upper entries of the table as they scroll down. is there something by which i can view a table page by page(as | more in unix) thanx anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] large tables scroll down:(
sorry folks by mistake i sent it to the wrong list. bye - Original Message - From: Jerome Houston [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, June 26, 2002 4:02 PM Subject: Re: [PHP] large tables scroll down:( there's a couple problems with your question: we don't know what tool you're using, what database you're you're using, and most importantly, this is not a PHP question. please use a hammer for a nail, and a screwdriver for a screw. thanks. From: Anil Garg [EMAIL PROTECTED] Hi, for viewing long tables. when i say SELECT * FROM abc i miss the upper entries of the table as they scroll down. is there something by which i can view a table page by page(as | more in unix) _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] debugger
hi thanx for ur mail. In fact i have to make changes in the code written by someone else. I want to use debugger to know the path in which the files are called. Which is the debugger for php? thanx anil - Original Message - From: B i g D o g [EMAIL PROTECTED] To: Anil Garg [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, June 26, 2002 5:54 PM Subject: Re: [PHP] debugger There are some IDE's that support debugging or you can just use the parser. It will tell you the problem and spit out a warning or error depending on how you have your php.ini set up. I usually have display_errors on so that I can use that as my debugger. Then when I go on a live server I have it turned off and I have errors being logged to a file. Debugger for poor developers... B i g D o g - Original Message - From: Anil Garg [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 26, 2002 2:47 PM Subject: [PHP] debugger hi, in perl i used perldb for debugging. whats to be used in php!! thanx anil -- 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] multiple webserver
hi, This is a bit off topic but can anyone please point me to a link where i can find a tutorial for setting multiple web server(by listening on different ports) on one machine. thanx anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] display_error=Off in php.ini
Hi, In php.ini file i have set: display_errors = Off log_errors = /var/log/php-errors.log but i cant see anything coming in to php-errors.log file. I have tried to change the query in my php code...but it dispays error on the gui( the display errors doesnt seem to get off). I hope someone can help me with this. thanx anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php.ini not creating logs
Hi, sorry i forgot to mention that. yes i restarted my webserver. In fact the error messages are getting hidden(on setting display_errors = Off) but the logs are not getting created:(log_errors = /var/log/php-errors.log ) in php.ini file. thanx anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.ini not creating logs
ya i have tried that too.. wot else can be the problem. my php.ini looks like this: ; Print out errors (as a part of the output). For production web sites, ; you're strongly encouraged to turn this feature off, and use error logging ; instead (see below). Keeping display_errors enabled on a production web site ; may reveal security information to end users, such as file paths on your Web ; server, your database schema or other information. display_errors = Off ; Even when display_errors is on, errors that occur during PHP's startup ; sequence are not displayed. It's strongly recommended to keep ; display_startup_errors off, except for when debugging. display_startup_errors = Off ; Log errors into a log file (server-specific log, stderr, or error_log (below)) ; As stated above, you're strongly advised to use error logging in place of ; error displaying on production web sites. log_errors = /var/log/php-errors.log ; Store the last error/warning message in $php_errormsg (boolean). track_errors = On ; Disable the inclusion of HTML tags in error messages. ;html_errors = Off ; String to output before an error message. ;error_prepend_string = font color=ff ; String to output after an error message. ;error_append_string = /font ; Log errors to specified file. ;error_log = Off --- - Original Message - From: Ray Hunter [EMAIL PROTECTED] To: Anil Garg [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, June 21, 2002 1:53 PM Subject: Re: [PHP] php.ini not creating logs Like i said make sure the webserver has the privilege to write to the log file... S RAY HUNTER email: [EMAIL PROTECTED] www: http://www.venticon.com aim: spinebl8d3 - Original Message - From: Anil Garg [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, June 21, 2002 11:40 AM Subject: [PHP] php.ini not creating logs Hi, sorry i forgot to mention that. yes i restarted my webserver. In fact the error messages are getting hidden(on setting display_errors = Off) but the logs are not getting created:(log_errors = /var/log/php-errors.log ) in php.ini file. thanx anil -- 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] increasing max size to upload
hi, how can i change the maximum size of the file being uploaded?? The line below does not seem to help me: input type=hidden name=MAX_FILE_SIZE value=25000 Do i need to make some more changes?? php ver i am using is mod_php4-4.1.2 I dont have a php.ini file anywhere!! i just have a file php.ini-dist in /usr/local/etc/ ...but i dont think it is being used. thanx anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] table porblem in netscape!!
I have made a table as shown below.. But when i open it in netscape in shows some blank space where i have used td tag. Can anyone plz help me with this!! - table bgcolor=?pv($top_color)?cellpadding=0 cellspacing=0 height=25 width=100% tr td class=tnav width=0 align=LEFT nbsp;b?pv($edition)?/b /td td class=tnav nowrap /td td class=tnav align=right nowrap Welcome ?=$PHP_AUTH_USER?! nbsp;nbsp;nbsp; /td /tr /table thanks anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] type=file
Hi, I am using php In a html form m using:input type=file name=file size=30 When i submit the form and try to retrieve the path written in the text box by using 'printf(%s,$file)' it returns a path /var/tmp/trash ... How can i print the path selected by browse button. Any ideas are appreciated. Thanx anil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php