Re: [PHP] Re: php framework, large site
So, Much off topic, but ok. 1. drupal are ok, but soo slow.. and I don't need CMS. I want to write my own. The main reason I want write my own framework / project is performance. Now I think to use postgresql, memcached, PDO, apc. Need some help from experienced users! How to get done big project! Ok, thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php framework, large site
hi, can some body help me, how to start php framwork for large site? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please Help with simple Noob problem
Use ?php phpinfo()? instead of ?phpinfo()?, or try to add some space after the ? . The php usually comes with the short_tags directive turned off. Good Luck Scott Bounds wrote: Hello all. I seem to be having a terrible tim ewith something that is so simple it makes me sick. I have a server running FC2. it has Apache 2.x.x on it and it came installed with php-4.x.x. Sorry I don't have the exact versions but fatigue and frustration has taken over. I can get them if you really need them. Here's the major problem. When I try and view a simple php page in the browser, it doesn't display anything that has to do with the php tags. By that I mean it won't recognize the php directives (I guess). I made a simple page (the infamous phpinfo () page) right out of the books. Saved it as test.php just like it said. Made sure that apache is running and browsed to the page. Nothing, no errors, no nothing. I have made up some other pages (mostly from some php books - real simple ones) to view and they all display the same action. Now when these machines (I actually have a couple of these servers and they all act the same) were installed, it was from FC2 CD's with the webserver full package. There were all kinds of php files installed, etc. In my httpd.conf file it calls the php.ini file, etc. So it seems to be all there. Can anyone out there help me figure out how to make this work? I would be truly indebted to you, put you on my Christmas card list, etc. Thanks in advance to all of you kind and wonderful people. Scott
[PHP] IMPORTANT: PHP does NOT cause browser issues.
Hi everybody. Due some recent messages in this list and other CSS/XHTML list, I´ve decided to post this to clarify a very common question: PHP is compatible with ALL browsers. Why? Because PHP runs at the server, aside from the browser. The only thing the browser will see is the response (in plain text or html code). The response code may be incompatible, but not the PHP code. So, again: PHP is compatible with ALL browsers because PHP does not run at the browser. The other issue is: I would like to run some PHP code when the user click a link or press a button. Sorry pal... unless you use AJAX or iFrames, it will not gonna happen. Consider post this types of questions in Javascript or AJAX lists. As said before, PHP runs at the server and this kind of problem require client-side scripting. Questions about rendering bugs in HTML should be posted at CSS or HTML Lists. Sorry if I sounded too cranky. But it´s for a good reason. Good PHPíng. P.S.: My suggestion is to send a message explaining that to every member that joins the list. -- Love all. Trust a few. Do wrong to none.
[PHP] Prevent XSS using DOM Extension and/or SimpleXML
Hi there! I´m building a form validator using PHP and JS. It´s working fine by now, but I want to make a little improvement. Here is how its working now: 1. The user fill the form. Every time he leaves the field, the JS code match the value against a regexp to validate. 2. When the user submits the form, the PHP script match all the values against the same regexp's. Now, i want to validate my fields to prevent XSS, allowing my html tags but only the attributes that I want. I thought something like: (the tags and the valid attributes). ?php $form_html_validation = array( p=array(), a=array(href,name,rel), ol=array(), ul=array(), li=array(), h2=array(), h3=array(), h4=array(), h5=array(), h6=array(), strong=array(), em=array() ); $valid_elements = .join(,array_keys($form_html_validation)).; $userInput = strip_tags($userInput,$valid_elements); //perform DOM Attribute Validation ? But I don´t know how to loop over every attribute for each tag in the DomTree. Someone has any ideas? Thank You -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mysql strategy
Larry Garfield escreveu: On Monday 13 November 2006 17:51, Chris wrote: It's not going to make a great deal of difference if you do the processing in the MySQL or the PHP, in this case it's basically the same operation in each. I suspect that efficiently recreating the LIKE functionality in PHP wouldn't be trivial to do, if you are just doing straight comparisons the MySQL STRCMP function should be faster. I'd say there will be a big difference. Pulling in 10,000 entries from the database and then sorting them in php will take a lot of memory (and database time to retrieve all of the entries). Getting the database to restrict that number of entries will take a little time but it doesn't have to return all entries, your php memory won't blow out and it won't have bugs in it. As a general rule, I try to push as much logic into the query as I can for the simple reason that MySQL is optimized C and my PHP code gets interpreted. The odds of me writing something in PHP that's faster than MySQL AB's C code are slim. :-) The exception is grouping, which I've often had to do in PHP with a loop to rebuild a result array. The performance hit for that is not that big, however, and if you free() the result set afterward then the memory usage is not a major issue either. If you're finding your query is slow, look into your indexes. Just today I cut a single query from 230 seconds to 21 seconds just by adding two indexes. :-) I´m buiding a system that perform searches based on comma-separated tags. I´m using the MySQL FIND_IN_SET function. :D -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] DOM Validation using PHP
Hi there! I´m building a form validator using PHP and JS. It´s working fine by now, but I want to make a little improvement. Here is how its working now: 1. The user fill the form. Every time he leaves the field, the JS code match the value against a regexp to validate. 2. When the user submits the form, the PHP script match all the values against the same regexp's. Now, i want to validate my fields to prevent XSS, allowing my html tags but only the attributes that I want. I thought something like: (the tags and the valid attributes). ?php $form_html_validation = array( p=array(), a=array(href,name,rel), ol=array(), ul=array(), li=array(), h2=array(), h3=array(), h4=array(), h5=array(), h6=array(), strong=array(), em=array() ); $valid_elements = .join(,array_keys($form_html_validation)).; $userInput = strip_tags($userInput,$valid_elements); //perform DOM Attribute Validation ? But I don´t know how to loop over every attribute for each tag in the DomTree. Someone has any ideas? Thank You -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Permanent Links - Blog
Hi, How do I implement that http://myhost/blog/date/of/post/name-of-the-post; thing, instead of http://myhost/blog/view.php?id=id-of-the-post; ? I´ve seen this in many blogs, but it´s easy to implement? See it in action at wikipedia, blogger blogs, simplebits http://www.simplebits.com. Both simplebits and wikipedia is written in PHP, I guess. Help! Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Permanent Links - Blog
Hi, How do I implement that http://myhost/blog/date/of/post/name-of-the-post; thing, instead of http://myhost/blog/view.php?id=id-of-the-post; ? I´ve seen this in many blogs, but it´s easy to implement? See it in action at wikipedia, blogger blogs, simplebits http://www.simplebits.com. Both simplebits and wikipedia is written in PHP, I guess. Help! Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FTP
I will be sending files over my php script... One client asked me for a project where he allow clients to send some large files (like 50mb)...I thought that FTP (via PHP) will allow that. Today he just give the FTP server user and password to his clients, but he is worried about the security (of course!). Is there a better way? I was thinking in split the files in several .RAR volumes... (actually, the client will send his .RAR files instead of a 50mb file), and use remote scripting to upload each file separatly. Any Ideas? Thank you! 2006/10/8, Yannick Warnier [EMAIL PROTECTED]: Le samedi 07 octobre 2006 à 20:50 -0300, Raphael Martins a écrit : Hi, When I send files via FTP, the file size is limited to the php.ini max upload value? Thank you! No, unless you handle the FTP server with a PHP script. php.ini only limits the size of files handled by PHP (generally via HTTP), so it should not affect FTP (unless your FTP server is in PHP). Yannick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] FTP
Hi, When I send files via FTP, the file size is limited to the php.ini max upload value? Thank you!
[PHP] FTP
Hi, I need to send large files over my website...I was wondering if I could do this using the PHP FTP Commands. The files will be larger then the MAX_UPLOAD_SIZE in php.ini. Is that possible? Or should I use a regular FTP program? Thank you!
[PHP] gd library
Title: Mensagem I have just installed php 4.3.0what do I have to do now to get the gd library to work? thanks Jorge Martins J[EMAIL PROTECTED]Engenheiro de InformáticaEngineering Department Tel: +351 22 3744827 WeMake - Tecnologias de Informação, Ldahttp://www.WeMake.pt/Rua Pinto de Aguiar, 223 2º ESQ 4400-252 V.N. GAIA - PortugalFax: +351 22 3744831 Este E-mail contém informação dirigida e para uso exclusivo das pessoas acima enunciadas. O seu conteúdo é confidencial e é expressamente proibida qualquer utilização não autorizada. Se recebeu este mail por engano, por favor notifique o seu remetente imediatamente. Muito obrigado.The information contained in this E-mail is intended for the exclusive use of the individual named above. The contents may be confidential and any unauthorized use of whatever kind is strictly prohibited. If you have received this comunication in error, please notify de sender immediately. Thank you.
[PHP] Re: No ouput until program end, why?
Have you tried this way ? php -q your_file.php /path/to/output_filename Jean-Christian Imbeault [EMAIL PROTECTED] escreveu na mensagem [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am running a PHP program under Linux on the command line. The problem I have is that I get no output to the screen until the program finishes. I have lots of echo statements throughout the program to help me debug but none of them are printed until the program finishes, which is really a pain since the prog takes 30 minutes to run ... The main() looks something like this. Can someone help me figure out why it is not printing anything until the program exists? pg_exec($CONN, BEGIN); for ($i = 0; $i 6001; $i++) { $retval = process($aFields); if ( ($i % 100) == 0 ) echo $i\n; if ($retval == 1) echo error on line $i \n; } echo COMMIT \n; pg_exec($CONN, COMMIT); Thanks, Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: after mysqlfront?
Mascon or Free Mascon is really a good value HTH, Ernani Lallous [EMAIL PROTECTED] escreveu na mensagem [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello MySqlfront.de's mysqlfront program has been discontinued any equivalent alternative? thanks, Elias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php
Hi Murat, You can generate the code above with php and the javascript is a text that the browser will execute... PHP has its processes on the server site...ie.: Your webserver Javascrip has its processes on the browser of any user who wants to access your webserver HTH, Ernani Murat Saygili [EMAIL PROTECTED] escreveu na mensagem news:006601cb7809$5f8ff5e0$7d0a@altaymrk... hello friends, is it possible to write the below code just using php without javascript. HTML HEAD TITLEfirst/TITLE META NAME=description CONTENT= META NAME=keywords CONTENT=R script language=JavaScript function AksiyonDegis (aksiyon){ document.Formum.action = aksiyon; document.Formum.submit(); }/script /HEAD BODY form action= method=post name=Formum Tar1: input type=text name=tar1 size=25 maxlength=30br Tar2: input type=text name=tar2 size=25 maxlength=30br input type=button value=Ekle onClick=AksiyonDegis('test1.php3') input type=button value=Güncelle onClick=AksiyonDegis('test2.php3') input type=button value=Sil onClick=AksiyonDegis('test7.php3') input type=button value=Bul onClick=AksiyonDegis('test5.php3') input type=button value=Bul onClick=AksiyonDegis('test5.php3') /form /BODY /HTML -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: ASP PHP
Try to search for asp2php at google.com []'s Ernani Nwakaji Eppie [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED]... Does anyone know if there is a script that converts ASP to PHP?? Thanks in advance Nwakaji -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Web based FTP client
Try to find at google for noFTP It was made with php and it is a good client for FTP. []'s Ernani Jonathan Abbey [EMAIL PROTECTED] escreveu na mensagem [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Mark McCulligh wrote: I am trying to build or find a web FTP client. I can create a server side FTP app in PHP no problem, but I would like the user to be able to browse their own file system. I thought about using upload functions with PHP FTP functions on the server but I didn't want just an input box with a browse button on the screen. I have also search though JavaScript for FTP functions but I didn't see anything that would really work. I want it to look like a windows based FTP client a list box on one site for the user's file system and a list box on the other for the ftp server. Does anyone know of a good web FTP program in exists or point me in the right direction on how to build one.. I don't think JavaScript gives you this kind of power. I imagine you'd either need to take advantage of Java on the client, or perhaps something based on a cross-platform toolkit like Mozilla. I expect you could build something like what you want with Mozilla's XUL and JavaScript. Thanks, Mark. _ Mark McCulligh, Application Developer / Analyst Sykes Canada Corporation www.SykesCanada.com [EMAIL PROTECTED] -- -- - Jonathan Abbey [EMAIL PROTECTED] Applied Research Laboratories The University of Texas at Austin Ganymede, a GPL'ed metadirectory for UNIX http://www.arlut.utexas.edu/gash2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP_AUTH_USER
I have a bunch of pages on my site inside an apache .htaccess protected directory. After visitors have logged in I am on part of my site I need to find out which user it is that has logged in. I thought this information was stored in the $PHP_AUTH_USER variable, but when I print this you can use the REMOTE_USER server variable -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ASP vs PHP
Hi! I've been programming in PHP for long. But one question that always is coming to my mind is to know if there exists some kind of tools (like for SP. It exists a tool called ASPWebTools for wich it is possible to develop applications written in ASP and connecting with DB like SQL Server in an automatic way) that can help in the development of applications using PHP and databases. For instance, that could allow to develop automatically forms to connect to databases using PHP. Does anyone know any related application or tools. Because in ASP with that tool is more easy to develop code. Thanks in advance Ciro Martins -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best way to get the remote IP address?
Hi, Simply... test for HTTP_X_FORWARDED_FOR if it exists, then your client are behind a proxy server, the REMOTE_ADDR is the proxy IP, and HTTP_X_FORWARDED_FOR is the client IP (if not faked by the proxy). hope this helps, Antonio. On Mon, 21 Jan 2002, Bogdan Stancescu wrote: I can't seem to find any references to HTTP_X_FORWARDED_FOR in the PDF PHP documentation from January 2001, so you should probably best stick with either $HTTP_SERVER_VARS['REMOTE_ADDR'] or simply $REMOTE_ADDR (if you use $REMOTE_ADDR in functions make sure you do a global on it first) - I personally use $REMOTE_ADDR, but you should read the docs for details... Bogdan Alan McFarlane wrote: I'm trying to get the remote IP address of a user in a (PHP) version and server-software independant way, but am having a few problems. Obviously, I've seen $HTTP_SERVER_VARS['REMOTE_ADDR'], but Ive also seen references to $HTTP_SERVER_VARS['HTTP_X_FORWARDED_FOR']. Is there any generic solution to this problem (and if so, what is it?) Cheers -- Alan McFarlane [EMAIL PROTECTED] ICQ: 20787656 -- PHP General 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 General 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] +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Antonio S. Martins Jr. - System Analist | Only The Shadow Knows | | WorldNet Internet Maringa - PR - Brasil | what evil lurks in the | | E-Mail: [EMAIL PROTECTED] | Heart of Men! | | [EMAIL PROTECTED] | !!! Linux User: 52392 !!! | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ This e-mail message is 100% Microsoft free! /\ \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL / \ -- PHP General 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] ok, I ask again.. how to encrypt to be able to matchdatabase info?
On Mon, 21 Jan 2002, Hawk wrote: I've asked this several times but it doesn't seem like anyone understands my problem, the passwords are encrypted in the database, but I don't know how to match an unencrypted password from the login form with the database? is it possible to encrypt the password I sent from the form in php or does that have to be done in mysql? in any case, how do I do it? If you don't have anything bright to say, don't, in some of the replys I've had earlier it sounds like you think I'm an idiot... And even if I am, I don't want to be refered as one ;) How you had encrypted your password? with MySQL 'password' function? if yes, try: select user, ... from table where user = $user and passwd = password($passwd) I think you get the idea :) hope this helps, Antonio. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Antonio S. Martins Jr. - System Analist | Only The Shadow Knows | | WorldNet Internet Maringa - PR - Brasil | what evil lurks in the | | E-Mail: [EMAIL PROTECTED] | Heart of Men! | | [EMAIL PROTECTED] | !!! Linux User: 52392 !!! | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ This e-mail message is 100% Microsoft free! /\ \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL / \ -- PHP General 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] PHP4.1.1 + RH7.2 + UCD-Snmp
Hi Everybody, Has anyone doing it sucefuly? I can compile it. The phpinfo(); call returns ok! (UCD-Snmp enable) but when I call the snmp functions I got a SegFault (on PHP-CGI). I already tried with an without --enable-ucd-snmp-hack, and recompiling the UCD-Snmp packages as told on the PHP manual pages (http://www.php.net/snmp). Any tips on this? Thanks in advance, Antonio. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Antonio S. Martins Jr. - System Analist | Only The Shadow Knows | | WorldNet Internet Maringa - PR - Brasil | what evil lurks in the | | E-Mail: [EMAIL PROTECTED] | Heart of Men! | | [EMAIL PROTECTED] | !!! Linux User: 52392 !!! | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ This e-mail message is 100% Microsoft free! /\ \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL / \ -- PHP General 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] About the $allowed problem
On Mon, 27 Aug 2001, Andrey Hristov wrote: ?php session_start(); if (!session_is_registered(allowed)){ $allowed=3306; session_register(allowed); } var_dump($allowed); ? called with : http://192.168.1.11/test2.php?allowed=5000 returns : int(3306) Ok, remeber, on the first run the var isn't registered, then you set it to 3306, on the subsequents calls it restore the value on the session_start(); then the value 3306 will replace the 5000. Try puting the var_dump before the session_start, or try testing $HTTP_GET_VARS[allowed] . Antonio. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Antonio S. Martins Jr. - System Analist | Only The Shadow Knows | | WorldNet Internet Maringa - PR - Brasil | what evil lurks in the | | E-Mail: [EMAIL PROTECTED] | Heart of Men! | | [EMAIL PROTECTED] | !!! Linux User: 52392 !!! | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ This e-mail message is 100% Microsoft free! /\ \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL / \ -- PHP General 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] new php release?
Hi, I'm using PHP-4.0.4pl1, and I'm trying to using the odbc_error/odbc_erromsg functions, but this are only availabe on the CVS tree! Before I set up a cvs client download the fonts and try to compile it, I'm willing to know if there is a new version soon to be released? Or if the above odbc functions are working in the CVS tree? thanks in advance, Antonio. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Antonio S. Martins Jr. - System Analist | "Only The Shadow Knows | | WorldNet Internet Maringa - PR - Brasil | what evil lurks in the | | E-Mail: [EMAIL PROTECTED] | Heart of Men!" | | [EMAIL PROTECTED] | !!! Linux User: 52392 !!! | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ This e-mail message is 100% Microsoft free! /"\ \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL / \ -- PHP General 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] new php release?
On Wed, 7 Mar 2001, Henrik Hansen wrote: I'm using PHP-4.0.4pl1, and I'm trying to use the odbc_error/odbc_erromsg functions, but this are only availabe on the CVS tree! Before I set up a cvs client download the fonts and try to compile it, I'm willing to know if there is a new version soon to be released? Or if the above odbc functions are working in the CVS tree? take a look at www.php4win.de fro bleeding edge versions of the php dist (also including many more precompiled modules) Thanks for the URL Henrik, but I'm finding a linux dist :) My odbc functions are used on a linux box to access DB2/AIX :) thanks for the atention Antonio. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Antonio S. Martins Jr. - System Analist | "Only The Shadow Knows | | WorldNet Internet Maringa - PR - Brasil | what evil lurks in the | | E-Mail: [EMAIL PROTECTED] | Heart of Men!" | | [EMAIL PROTECTED] | !!! Linux User: 52392 !!! | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ This e-mail message is 100% Microsoft free! /"\ \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL / \ -- PHP General 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] HowTo: IBM DB2 w/PHP
On Tue, 30 Jan 2001, Karl J. Stubsjoen wrote: We have succesfully installed the IBM DB2 RDMS on our Linux box and have successfully made a connection to our AS400. All through command line though. What are the versions of your AS400 and DB2 for Linux? I had tryied to connect on an AS400 some time ago without success (both from Linux and AIX)! And from what I read on that time I tought the only way to connect to an AS400 is from windows! I am new to PHP, and am wondering: How do I instantiate the IBM DB2 in PHP, call commands, run queries, etc...? I'm not looking for all the answers, but tips on How to Get Started. This isn't difficult (but isn't simple too!), try compile PHP using --with-ibm-db2, and then use the "odbc" comand set (odbc_connect, etc). The implentation of DB2 in PHP uses the odbc calls (it isn't odbc, it uses the native DB2 cli). I use it here on my university to access a DB2 AIX box from my Linux Web Server. Antonio. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Antonio S. Martins Jr. - System Analist | "Only The Shadow Knows | | WorldNet Internet Maringa - PR - Brasil | what evil lurks in the | | E-Mail: [EMAIL PROTECTED] | Heart of Men!" | | [EMAIL PROTECTED] | !!! Linux User: 52392 !!! | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ This e-mail message is 100% Microsoft free! /"\ \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL / \ -- PHP General 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] PHP as a MUD engine?
On Tue, 16 Jan 2001, Daniel Grace wrote: Yes, I know this sounds crazy, but think about it. I've often pondered the feasibility of using PHP as a MUD engine. While it would probably not run nearly as fast as something implemented in C/C++, it would have a lot of flexibility: - Changes to the common code wouldn't neccessarily have to require a restart of the MUD engine but could be implemented on-the-fly. - Rooms, characters, items, etc. could use all the power of PHP's scripting language. This means you can a complex scripting language for them. - We get PHP's flexibility with dealing with strings, etc. - We don't have to worry about malloc() and free() in C -- less potential memory leaks. The biggest issue would be maintaining security, as using PHP to handle room scripts means that anyone who builds for the MUD would be able to run PHP code on the server. You can only imagine what would happen if someone put an exit; in their script, or if the script had errors in syntax. Well as using a script language to make a MUD engine, I had both played and made one a couple of years ago (well it's about 10 years). They ran on IBM mainframes using REXX over the late BITNET :) As using PHP to do this you had the strenght to use their DB support and use SQL to implement lots of thinks! Well... take a look at this site: www.astronest.com it isn't a MUD and I didn't know if it is made with PHP, but it's an online game that run on HTML :) Antonio +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Antonio S. Martins Jr. - System Analist | "Only The Shadow Knows | | WorldNet Internet Maringa - PR - Brasil | what evil lurks in the | | E-Mail: [EMAIL PROTECTED] | Heart of Men!" | | [EMAIL PROTECTED] | !!! Linux User: 52392 !!! | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ This e-mail message is 100% Microsoft free! /"\ \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL / \ -- PHP General 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] mixing HTML and PHP code
On Fri, 12 Jan 2001, MR wrote: Philip Olson ... You know what's annoying? This (yes, it happens) : echo ("table bgcolor=\"#ff\""); echo ("tr"); echo ("td bgcolor=\"#ee\" width=\"300\""); print("Name :"); $name = 'johnny'; printf("%s %s %s","b","$name","/b"); echo ("/td"); echo ("td bgcolor=\"#ee\" width=\"300\""); print("Title :"); $title = 'smith'; printf("%s %s %s","b","$title","/b"); echo("/td"); echo("/tr"); echo("/table"); I'd suggest: echo "table bgcolor='#ff' tr td bgcolor='ee' width='300' Name : "; $name = 'johnny'; echo "B$name/B /td td bgcolor='#ee' width='300' Title : "; $title = 'smith'; echo"B$title/B /td /tr /table"); This way, the code IS readable, for small-medium size echoing. I on the other hand suggest something like this: ? $name = 'Johnny'; $title= 'Smith'; ? table bgcolor='#ff' tr td bgcolor='ee' width='300' Name : B?=$name?/B /td td bgcolor='#ee' width='300' Title : B?=$title?/B /td /tr /table or this: ? $name = 'Johnny'; $title= 'Smith'; echo " table bgcolor='#ff' tr td bgcolor='ee' width='300' Name : B $name /B /td td bgcolor='#ee' width='300' Title : B $title /B /td /tr /table"; ? I think is better (when possible) to format the data and then put it on their way :) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Antonio S. Martins Jr. - System Analist | "Only The Shadow Knows | | WorldNet Internet Maringa - PR - Brasil | what evil lurks in the | | E-Mail: [EMAIL PROTECTED] | Heart of Men!" | | [EMAIL PROTECTED] | !!! Linux User: 52392 !!! | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ This e-mail message is 100% Microsoft free! /"\ \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL / \ -- PHP General 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]