RE: [PHP-DB] Showing an image
what you should actually do is save that script as something like image.php and then on the page where you want to have text + images, do something like html body img src=image.php?uid=xxx border=0br I am some text under the image that is grabbed from the DB /body /html assuming that the image.php page accesses teh DB based on a car called uid' which represents a key to pull the right image, in this case it is xxx :) HTH Beau // -Original Message- // From: kachaloo [mailto:[EMAIL PROTECTED]] // Sent: Monday, 2 July 2001 3:38 PM // To: [EMAIL PROTECTED] // Subject: [PHP-DB] Showing an image // // // HI, // I want to show an image from a database but to do that I am using : // $result = @mysql_query($sql); // $data = @mysql_result($result, 0, PICTURE); // $type = @mysql_result($result, 0, FILETYPE); // Header(Content-type: $type); // echo $data; // // // but after this I also want to show some text info. How can I // do this ? I // will have to use something else besides header. Please Help. // Thanks, // Vishal // // // // -- // PHP Database Mailing List (http://www.php.net/) // To unsubscribe, e-mail: [EMAIL PROTECTED] // For additional commands, e-mail: [EMAIL PROTECTED] // To contact the list administrators, e-mail: // [EMAIL PROTECTED] // -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] adding Carrol O'Conner in a form
Hi, The slash is added because you have magic_quotes_gpc() turned on in your php configuration file - when magic_quotes are on, all ' (single-quote), (double quote), \ (backslash) and NUL's are escaped with a backslash automatically. You can turn this configuration directive off or you can use stripslahes() to remove the slashes. Dobromir Velev -Original Message- From: Ken Sommers [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Sunday, July 01, 2001 7:22 AM Subject: [PHP-DB] adding Carrol O'Conner in a form HI, IF i add my name as Carol O'Conner in a form and Echo (PHP 4.06 on win 95) it back I see Carol O\'Conner If I pass that name along to another page I'll see it as: Carol O\\\'Conner Even if I use : ?php echo(htmlspecialchars ($name, ENT_QUOTES)); ? IF I enter my name as:Carol O'Conner died I'll see it echoed as Carol O\'Conner died so I am thrilled that the came back and was displayed as it was typed in by the user but how do I get rid of that pesky slash \ ? so I can echo exactly what the user typed in? I am already using: ?php echo(htmlspecialchars ($name, ENT_QUOTES)); ? Thanks for the help, ken -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Oracle password funtion?
Hi, i was wondering if there's a funktion within oracle for md5 encryption of a string, like there is in mysql (password()). Best Robert -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Oracle Replication via PHP
Hi all, Is it possible to replicate Oracle server to other Oracle servers via PHP? I'll make an example to make it clearer: There is one web server (Apache) and two database servers (Oracle) for example Ora1 and Ora2 all are in 1 LAN. All requests are through Apache and with PHP scripts, the request will be redirected to Ora1 (priority #1).If Ora1 is down, the request will be redirected to Ora2 (priority #2). But when Ora1 is up, the server will try to request to Ora2 for the change and when Ora1 is ready, the request will be redirected to Ora1 again. I'm considering to ping-ing Ora1 to check whether Ora1 up or down by using socket() to Oracle port.I think the big problem is writing a PHP scripts to auto-redirect, is there any idea? regards, Tathit -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] define variable by querying MySQL
Hi, I'm not sure what were you trying to do but there are some very obvious errors 1. You cannot embed one php openning tag (?) in another 2. mysql_numrows() is not a valid mysql function - may be you were trying to use mysql_num_rows() If you are trying to put all fields my_name into the $WELCOME variable (I can't think of a reason to do this) and then echo it may be you could use this code #start code ? $link = mysql_connect(localhost,username,password) or die (Could not connect to MySQL!); mysql_select_db(database,$link); $result = mysql_query(select * from table_name); while ($row=mysql_fetch_array($result)){ $WELCOME.=$row[my_name]; } echo $WELCOME; ? #end code Dobromir Velev -Original Message- From: Matt Nigh [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Monday, July 02, 2001 1:01 AM Subject: [PHP-DB] define variable by querying MySQL hello list. i have a problem that is relatively simple, but I can't seem to figure it out. is there any way to define a variable by querying a MySQL database? here's an example of code I tried using: ? $WELCOME = echo ?php $link = mysql_connect(localhost,username,password); if(!$link) die (Could not connect to MySQL!); mysql_select_db(database,$link); $result = mysql_query(select * from table_name); $num=mysql_numrows($result); for($x=0;$x$num;$x++) { $row=mysql_fetch_object($result); print $row-my_name; } mysql_close($link); ? ; ; ? ? echo($WELCOME); ? it kept coming up with the following : Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in c:\apache group\apache\htdocs\page.php on line 5 i can't figure out what to do, so if anyone can assist me, i'd be greatful. I have a feeling it's something with some quotes but i can't figure out which ones. Thanks a lot, Matt Nigh [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] wht ide ?
Hi, I am using Php Coder and was wondering wht ide others are using ? Vishal - Original Message - From: Beau Lebens [EMAIL PROTECTED] To: 'kachaloo' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, July 02, 2001 1:14 PM Subject: RE: [PHP-DB] Showing an image what you should actually do is save that script as something like image.php and then on the page where you want to have text + images, do something like html body img src=image.php?uid=xxx border=0br I am some text under the image that is grabbed from the DB /body /html assuming that the image.php page accesses teh DB based on a car called uid' which represents a key to pull the right image, in this case it is xxx :) HTH Beau // -Original Message- // From: kachaloo [mailto:[EMAIL PROTECTED]] // Sent: Monday, 2 July 2001 3:38 PM // To: [EMAIL PROTECTED] // Subject: [PHP-DB] Showing an image // // // HI, // I want to show an image from a database but to do that I am using : // $result = @mysql_query($sql); // $data = @mysql_result($result, 0, PICTURE); // $type = @mysql_result($result, 0, FILETYPE); // Header(Content-type: $type); // echo $data; // // // but after this I also want to show some text info. How can I // do this ? I // will have to use something else besides header. Please Help. // Thanks, // Vishal // // // // -- // PHP Database Mailing List (http://www.php.net/) // To unsubscribe, e-mail: [EMAIL PROTECTED] // For additional commands, e-mail: [EMAIL PROTECTED] // To contact the list administrators, e-mail: // [EMAIL PROTECTED] // -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Executing several PHP scripts simultaneously??
Hi Lisa, ... on *nix you could use exec( /path/to/php/php.exe your-first-php-script.php ) note the ampersand at the end of the command ... this will start the task in background, so you can do other things while the script is running in the background. Hope this helps, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Lisa Elita [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 3:21 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Executing several PHP scripts simultaneously?? How can we execute several PHP scripts simultaneously inside a single PHP script? For example, let's say master.php has 10 tasks in different PHP scripts: 1.php, 2.php, ..., 10.php. Each task is independent (the input of each task is not determined by other tasks) so we can do the tasks in any order. But if 2.php is initiated after 1.php is done, and 3.php is initiated after 2.php is done, and so on, the master.php can be expired, causing the remaining tasks not executed. So how can we execute these PHP scripts simultaneously? Regards, Lisa Elita -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Which state and country?
This can give a fair idea of where that person has come from, and if they are international then the country may be obvious. I would be very surprised if you could collect meaningul information about which state they are tho. In my experience, however, lots of hosts turn off reverse DNS lookups last count in my stats was 40%. That said, there are pretty much no other (simple) ways of doing this Turn on referrers in the Apache config file and do reverse DNS lookuips in your web analyser. -Original Message- From: Lisa Elita [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 9:21 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Which state and country? Hi all, How can we know from which state and country a hit came? Regards, Lisa Elita -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Showing an image
Hi, Thanks ! I get it now Regards, Vishal - Original Message - From: Beau Lebens [EMAIL PROTECTED] To: 'kachaloo' [EMAIL PROTECTED] Sent: Monday, July 02, 2001 3:56 PM Subject: RE: [PHP-DB] Showing an image don't really know what you are doing here, the form that you have is multipart, but if you are trying to actually upload an image, then you will also need an input type=file so you can browse and select that file. i am assuming that you alreayd have images saved in your database, which can be accessed using the unique key imageID you then need to do something like what you are doing, grab all the image details (including mime type) from the db, header() the type of the image, then echo the contents this short script should be saved as something like image.php, when you want one of the images from your database, you just put a normal html img src= tag in your html code, but the location or src of your image will be something like image.php?id=23 which will load the image with id 23 from your database, into the img tag in your webpage. hope this helps, if i can find them, i can send some code samples when i get home Beau // -Original Message- // From: kachaloo [mailto:[EMAIL PROTECTED]] // Sent: Monday, 2 July 2001 5:58 PM // To: [EMAIL PROTECTED] // Subject: Re: [PHP-DB] Showing an image // // // Hi Beau, // The logic makes sense but I don't know how to // implement it ? // So pls explain it to me !! // // Thanks, // Vishal // // My code is : // // ___ // // // view.php // // html // head // titleView the files/title // /head // //FORM ENCTYPE=multipart/form-data ACTION=show.php // METHOD=POST //bID/bbrINPUT TYPE=TEXT NAME=id BR //INPUT TYPE=submit VALUE=Send File ///form // // // /head // body // // /body // /html // // ___ // // show.php // // // ?php // // // $connection=mysql_connect('localhost','root') // or die(Sorry could not connect to the database); // // // select database // // $db=mysql_select_db('punebuzz',$connection) // or die(Sorry could not connect to the database); // // // // // now the query // // $sql=Select * from article where ID='$id'; // // // $result=mysql_query($sql); // // /* // $result = @mysql_query($sql); // $data = @mysql_result($result, 0, PICTURE); // $type = @mysql_result($result, 0, FILETYPE); // Header(Content-type: $type); // echo $data; // // // $cateory = @mysql_result($result, 0, CATEORY); // $heading = @mysql_result($result, 0, HEADING); // $body = @mysql_result($result, 0, BODY); // $keyword = @mysql_result($result, 0, KEYWORD); // $name = @mysql_result($result, 0, FILENAME); // $size = @mysql_result($result, 0, FILESIZE); // $id = @mysql_result($result, 0, ID); // // // Header(Content-type: text/html); // echo pbID/b$id/P; // echo pbCATEORY/b$cateory/P; // echo pbHEADING/b$heading/P; // echo pbBODY/b$body/P; // echo pbKEYWORD/b$keyword/P; // echo pbFILENAME/b$filename/P; // echo pbFILESIZE/b$filesize/P; // // */ // // // while ($row = mysql_fetch_object ($result)) // { // // $cateory =$row-CATEORY; // $heading =$row-HEADING; // $body =$row-BODY; // $keyword =$row-KEYWORD; // $name =$row-FILENAME; // $size =$row-FILESIZE; // $id =$row-ID; // $picture =$row-PICTURE; // $filetype =$row-FILETYPE; // // } // // // // mysql_free_result($result); // mysql_close($db); // ? // // // ___ // // // // // // // // - Original Message - // From: Beau Lebens [EMAIL PROTECTED] // To: 'kachaloo' [EMAIL PROTECTED]; [EMAIL PROTECTED] // Sent: Monday, July 02, 2001 1:14 PM // Subject: RE: [PHP-DB] Showing an image // // // what you should actually do is save that script as something like // image.php and then on the page where you want to have // text + images, do // something like // // // html // body // img src=image.php?uid=xxx border=0br // I am some text under the image that is grabbed from the DB // /body // /html // // assuming that the image.php page accesses teh DB based on // a car called // uid' // which represents a key to pull the right image, in this // case it is xxx // :) // // HTH // Beau // // //
Re: [PHP-DB] adding Carrol O'Conner in a form
On Sat, 30 Jun 2001, Ken Sommers wrote: -but how do I get rid of that pesky slash \ ? - -so I can echo exactly what the user typed in? - Try: stripslashes() -I am already using: - - ?php echo(htmlspecialchars ($name, ENT_QUOTES)); ? - -Thanks for the help, - -ken - ** John Huggins Virginia Net Corporation 7101 Oriole Avenue Springfield, VA 22150 703-912-6214 703-912-4831 fax [EMAIL PROTECTED] http://www.va.net/ ** -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] where is my mail going..
I dunno what is happening to my mails sent to this list .. the one i sent a few days ago showed up after 48 hours or so and the last one I sent two days ago is yet to come .. This one I am sending at 2 pm GMT 2 - July 2001 .. as a test mail. jaski -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] cites/states data
Hi Again, I am building a simple php page which has this functionality. 1)It asks user to select his/her country 2)Then Select State 3)Then Select City For the above functionality I have built a MySQL Table which has these fields place_id , parent_id, place_name place_id is a autoincrement primary key parent_id is the place_id of the place which is one level above the current place ie. for a city it will be its parent state and for state it will be its parent country. Now functionality part is all well and working .. but I feel daunted by the task of building the mysql table and would not like to build the table by hand .. searching and adding states and cities one by one .. So is there any solution to this problem. I thought because there is such a functionality on so many sites out there .. there must be some place where I can find the data. It could be an XML file or any other form which I can utilize to feed my table. Thanks for any pointers. Regards Jaskirat At 08:34 AM 6/30/01 -0700, you wrote: Don't know that this will give you what you want, but it may be useful later. It deals with pulling zip codes from the USPS.com site Use IE's Web Browser Control to Extract Data From a Web Site http://www.inquiry.com/techtips/web_pro/10min/10min1199/10min1199.asp Good luck, olinux --- Jaskirat [EMAIL PROTECTED] wrote: Hello all, I am creating a database driven php page for which I need to have a database of US and Canadian states and cities in the back end. Is there some place on the web where I can get such data in the reusable form and I can feed my MySQL tables with that. Right now the only option I have is to add each state/city manually which I guess will be a tedious re-inventing the wheel exercise. Some kind of xml file etc if any one knows about .. or has will be great TIA Jaskirat -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] problems connecting to remote oracle database
Phil, Perhaps I'm being nit-picky, but shouldn't it be OCILogon($user, $PASSWORD, $connect_string); ? Anthony From: [EMAIL PROTECTED] Date: Sat, 30 Jun 2001 09:39:11 -0700 To: [EMAIL PROTECTED] Subject: [PHP-DB] problems connecting to remote oracle database Hi folks, I'm having difficulties getting php4 to connect to a remote oracle database. I have an entry in tnsnames.ora, along the lines of shorthostname = (etc, etc) and I can use sqlplus user/name@shorthostname to connect just fine, as a regular user. Even without ORACLE_SID set, since I have it set in tnsnames.ora for that entry But when I try ocilogin(user,name,shorthostname); on a php page, I get a printout of oracle error 01017: authentication failed. The listener log on that oracle machine confirms that I am actually attempting to connect. But no details on what's going wrong. Any suggestions? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Re: adding Carrol O'Conner in a form
This is automatically done by something called MagicQuotes. You can turn this off in your installation of PHP. -Angela HI, IF i add my name as Carol O'Conner in a form and Echo (PHP 4.06 on win 95) it back I see Carol O\'Conner If I pass that name along to another page I'll see it as: Carol O\\\'Conner Even if I use : ?php echo(htmlspecialchars ($name, ENT_QUOTES)); ? IF I enter my name as:Carol O'Conner died I'll see it echoed as Carol O\'Conner died so I am thrilled that the came back and was displayed as it was typed in by the user but how do I get rid of that pesky slash \ ? so I can echo exactly what the user typed in? I am already using: ?php echo(htmlspecialchars ($name, ENT_QUOTES)); ? Thanks for the help, ken -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Re: adding Carrol O'Conner in a form
+-*-On Mon, 2 Jul 2001, Angela Meehan wrote: -This is automatically done by something called MagicQuotes. You can -turn this off in your installation of PHP. - Yes, and if you do not have control over the server you can usually control this with the .htaccess file. To turn on... php_value magic_quotes_gpc 1 to turn off... php_value magic_quotes_gpc 0 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] problems connecting to remote oracle database
On Mon, Jul 02, 2001 at 10:53:55AM -0400, Anthony Carlos wrote: Phil, Perhaps I'm being nit-picky, but shouldn't it be OCILogon($user, $PASSWORD, $connect_string); ? I have tried both $user=realuser; $password=actualpassword; $dbname=oraclename ocilogon($user,$password,$dbname); AND simply calling ocilogon hardcoded, with the actual values directly in the quotes. both give the same error. From: [EMAIL PROTECTED] Date: Sat, 30 Jun 2001 09:39:11 -0700 To: [EMAIL PROTECTED] Subject: [PHP-DB] problems connecting to remote oracle database Hi folks, ... I can use sqlplus user/name@shorthostname to connect just fine, as a regular user. But when I try ocilogin(user,name,shorthostname); on a php page, I get a printout of oracle error 01017: authentication failed. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] problems connecting to remote oracle database
Hi Phil, Make sure that the web user (usually 'nobody' on an Apache installation) has access to the $ORA_HOME/bin directory and permissions to execute the binaries within. Also, be sure that ORA_HOME and ORACLE_SID are set in the 'nobody' user environment... - Brian - Brian S. Dunworth Sr. Software Development Engineer Oracle Database Administrator The Printing House, Ltd. (850) 875-1500 x225 [EMAIL PROTECTED] - -Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Sent: Saturday, June 30, 2001 12:39 PM To: [EMAIL PROTECTED] Subject:[PHP-DB] problems connecting to remote oracle database Hi folks, I'm having difficulties getting php4 to connect to a remote oracle database. I have an entry in tnsnames.ora, along the lines of shorthostname = (etc, etc) and I can use sqlplus user/name@shorthostname to connect just fine, as a regular user. Even without ORACLE_SID set, since I have it set in tnsnames.ora for that entry But when I try ocilogin(user,name,shorthostname); on a php page, I get a printout of oracle error 01017: authentication failed. The listener log on that oracle machine confirms that I am actually attempting to connect. But no details on what's going wrong. Any suggestions? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] problems connecting to remote oracle database
On Mon, Jul 02, 2001 at 02:07:38PM -0400, Brian S. Dunworth wrote: Hi Phil, Make sure that the web user (usually 'nobody' on an Apache installation) has access to the $ORA_HOME/bin directory and permissions to execute the binaries within. Also, be sure that ORA_HOME and ORACLE_SID are set in the 'nobody' user environment... why should I have to set the ORACLE_SID env var, if it is specified in tnsnames.ora? I dont have to set ORACLE_SID if I use sqlplus from the command line (as nobody, even) I can log in just fine with sqlplus user/pw@machinename So I'm figuring ocilogon(user,pw,machinename) should work just dandy. Is ocilogon broken in that way? I would think not, since it should be using the oracle libraries to automatically read tnsnames.ora and set that kind of stuff automatically. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] PhpMyAdmin phpPgAdmin Security Issues
I don't know how many of you on this list are also on Bugtraq, but there were some *very* interesting posts there this morning by Shaun Clowes. You can see them at: http://www.securereality.com.au/archives.html The relevant links to look at are A Study in Scarlet: http://www.securereality.com.au/studyinscarlet.txt And: (SRPRE1) phpMyAdmin 2.1.0 and phpPgAdmin 2.2.1 http://www.securereality.com.au/srpre1.html I imagine that many on this list do use phpMyAdmin or phpPgAdmin so this post is very important. Basically, depending on configuration, any user on the web can use phpMyAdmin to view sensitive files (/etc/passwd), etc. There is a patch available. The Study in Scarlet goes into details about other common PHP security breaches, and a little about how to avoid them. The problems aren't *so* bad if you're running your own server and access is only given to a few trusted developers. You could probably retrain everyone to use $HTTP_GET_VARS, etc. However, there could be a multitude of problems on hosts with multiple virtual users. For example, the above exploit could be used to get a list of the users and home directories in /etc/passwd and then a malicious user could view directory listings and file contents from another user's directory. That could lead to database passwords escaping and other local users modifying your data. And that's only the tip of the iceberg. I look forward to seeing Rasmus, Andi, Zeev, Stig etc. respond to this. Sincerely, Paul Burney +-+-+ | Paul Burney | P: 310.825.8365 | | Webmaster Programmer | E: [EMAIL PROTECTED] | | UCLA - GSEIS - ETU | W: http://www.gseis.ucla.edu/ | +-+-+ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Formatting Strings in MySQL
Artur- No problem. :-) Well, you could enter it with the spacing you want by using CHAR(11) instead of INT(9) or whatever in SQL. However, depending on how large of a DB this will be, and how many entries, that's not the optimal way to do it as you must store to more (null) bytes with every entry, and transfer 2 more (null) bytes out with every query. Sure, 2 bytes isn't very much, but I'm a stickler for smooth code. The less that NEEDS to be sent, moved or stored, the better. The amount of time it takes to format the query afterwards vs. the time it takes to poll those extra 2 bytes is logically the same, but it taxes the SQL those few bytes less *shrug* Either way will work most acceptably. Otherwise, no, I'm not aware of a command that will specifically format that way in MySQL. Jesse Williams System Administrator DowNET VoIP Team Electronic Data Systems -Original Message- From: Artur Correia [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 11:37 AM To: Jesse S. Williams Subject: Re: [PHP-DB] Formatting Strings in MySQL Hey, Thanks in advance for your trouble replying this. I havent tried it out yet - nor will I untill August. I'm still planning all this database before I start coding. This is going to be my first work using mysql/Apache/php4 (it's going to be a web based administration tool for a lawfirm (intranet). Anyway, it sounds good. As for the string - it's either NULL value or a 9 digit number (initially the idea was to format a social security number (in Portugal we have only 9 digits). Incidentally - i also thought of directly inputing the string formatted into mysql (I'd rather do this, actually). I've tried using the FORMAT (field,0) argument, but the output is always comm separated numbers like 123,123,123, and this isn't exactly what I had in mind. Do you know of a command in mysql (either to use with INSERT or SELECT) that can do this?? Thanks a lot Artur Correia Oliveira, Correia Correia -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] problems connecting to remote oracle database
a little more info... I've just tried a few public oracle-sql tools. Seems to have the same problem. I can connect just fine to the database using sqlplus. But when I try the hand-compiled tools, linked against libclntsh.so, it doenst properly authenticate to the remote system. Hey... $ORACLE_HOME/bin/sqlplus isnt linked against libclntsh.so, funnily enough. any ideas? Some special magic I need to put in tnsnames.ora, thta I've othrewise left out? sample, that works fine with sqlplus; TEST2.STAGING.our.com = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = staging)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = test2.staging.our.com) (SID = test2) ) ) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] RE: Storing Code in a db?
Here was the application I was thinking of creating for my organization. We wanted to make an online survey tool. Where you can create a survey, with sections, possibly subsections, questions, and acceptable answers. It's easy enough to create this stuff each and every time, but it's ridiculously tedious. So why not make an application that does it automatically. So we were thinking that you kind of have to define the different types of questions/answers that can be used in the survey. For example, a straight text field, multiline text field, 5 radio button selection, 5 option pull-down, Yes/No radio button, checkboxes, etc... So in defining the types of questions/answers, we thought it might be cool to define each type of answer and the code that goes along with generating it. So when defining the survey questions, you tell it that the question has a 3 radio button answer, and the system would pull code from the database to help generate the question/answer html dynamically when someone goes to the survey. I know you could store the functions as includes, but just thought it would be cool if people could store the code in the database, because there might just be an answer type that I haven't yet thought to program. Marky on 7/1/01 2:34 PM, olinux at [EMAIL PROTECTED] wrote: Couldn't you just store the php commands as a txt file and then use a SSI [server side include]? olinux It would be very convenient to be able to store PHP (or any other server side code) in a database, then retrieve and execute it. I store a lot of website content with embedded HTML commands in a database. Being able to store PHP code in the database as well would be very convenient. Lets think about something: if we put some code in a field and then we out the of code from code put in temporal file and then include in our principal code :))) but i have a doubt eval funcion we work with functions printf, echo? i don't think so. The only way I can think of doing it would involve a lot of very messy parsing out of the php commands. I expect that would take way to much processing time. I don't imagine that would work for entire functions either. Maybe just individual PHP commands. Any ideas Thanks! Rita _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] pricing info
Hi all - I was wondering if anyone can share with me their pricing info. I am about to begin my first freelance php project. The base of the project is a web-interfaced sql database with about 30 fields. where users can input data and generate reports. I would be curious to know what the going rate is for such work in the US. thanks much, olinux _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] IIS - going live
How difficult is it to connect to a live database on an IIS server. The server is in house and the company would like to have this database [MS SQL Server] interfaced with web forms. Can anyone provide a tutorial/site where I can learn. Would the process be no different than the work i have done on remote servers. [i.e. the only trouble would be establishing a connection between the IIS and SQL server?] TIA olinux _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] pricing info
This is a snip of my email from the [PHP] general mailing list: There's several ways to look at this too. Currently I'm doing some work for a small/home business owner. She needed some work done with some shopping cart stuff, a little MySQL DB and some smart forms. Not a lot of work, but then some of the stuff I've not worked with before. We ended up agreeing on US$1000/flat. I was willing to go this route because being such a small business, I knew that money WOULD be an issue. Also, from my POV, you also benefit intangibly from every job you do... Keep a private portfolio of work you've done and hour many hours you've put into it. Seperate hours designing the code and hours making the code more efficient, et cetera. Now if a client wants something similar to what you've already done, you simply bill out for: (Development Hours of Code + (Code Modification Hours / 10) + (Code Customization Hours /2)) * Hourly Rate This is a good way to build work for yourself too, as once you have a good compiled library of code, you can take on several jobs at once based on pre-written code, and bill out cross hours as you customize a few pieces of code and get your months salary in a couple of hours ;-) Of course, that IS wishful thinking but still!!! - Jesse Williams System Administrator DowNET VoIP Team Electronic Data Systems -Original Message- From: olinux [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 10:05 PM To: php-db Subject: [PHP-DB] pricing info Hi all - I was wondering if anyone can share with me their pricing info. I am about to begin my first freelance php project. The base of the project is a web-interfaced sql database with about 30 fields. where users can input data and generate reports. I would be curious to know what the going rate is for such work in the US. thanks much, olinux _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]