[PHP] phpmyadmin is installed, now how to access it?
I just installed the FreeBSD port for PHPMyAdmin and was reading the docs on the php wizard site but cannot figure out how to actually access the interface. Is it through a particular port like webmin? Can some clue me in please? -- Chip W. -- 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] phpmyadmin is installed, now how to access it?
In your web browser like you would any other web interface on your machine jason - Original Message - From: Chip [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, October 28, 2001 4:39 PM Subject: [PHP] phpmyadmin is installed, now how to access it? I just installed the FreeBSD port for PHPMyAdmin and was reading the docs on the php wizard site but cannot figure out how to actually access the interface. Is it through a particular port like webmin? Can some clue me in please? -- Chip W. -- 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]
[PHP] HELP: Still Learning
Still learning! But need syntax help. This works: $myconnection = mysql_pconnect($host,MyAccount,MyPassword); ... $news = mysql_query(SHOW TABLE STATUS FROM MyAccount LIKE 'MyTable'); ... This does not: $MyAccount = MyAccount; $MyTable = MyTable; $MyPassword = MyPassword; $myconnection = mysql_pconnect($host,$MyTable,$MyPassword); ... $news = mysql_query(SHOW TABLE STATUS FROM MyAccount LIKE 'MyTable'); ... So? ... How do I use $MyAccount, $MyTable $MyPassword correctly? ... I'm creating a function.inc ... An email post reply would help ... (help me get to bed faster tonight :) ) John
[PHP] Toronto PHP user group active.
Toronto PHP user group active. Welcoming all php developers with questions and answers. If we get enough people we will be setting up meetings but again based on how many people we can have. www.realsoftstudio.com [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]
Re: [PHP] Arrays
On Friday 26 October 2001 10:17, Ashley M. Kirchner wrote: I'd like to create an array of available resources, and be able to check it every time. What I'd like to do is something like; $site = array( section1 = #, section2 = #, etc.. ) where section* is a STRING variable and # is an INT (if it's even possible to do that) Once I have this setup properly, I'm going to have a routine that extracts data from PATH_INFO, namely '$section' and '$page' which should then be checked against the array: - if $section exists in the array [...] http://www.php.net/manual/en/ref.array.php -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) Drink wet cement. Get stoned. -- 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] Include Precompiled C binaries
On Friday 26 October 2001 22:32, Daelic wrote: I was debating perl Vs. PHP with a friend, and he came up with this: Perl can include compiled C binaries without backprocessing them, which is a pretty useful trick. Ask him what he means with backprocessing -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) CPU not found. retry, abort, ignore? -- 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] Re: Problem redirecting
You have to put Header( "Location:http://www.mydomain.com/mypage.html"); on top of your php code - Original Message - From: Justin Garrett [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 28. listopad 2001 07:00 Subject: [PHP] Re: Problem redirecting From the manual: Remember that the header() function must be called before any actual output is sent, either by normal HTML tags blank lines in a file, or from PHP. This is the cause of your error. Something is sending output before your call to header(); -- Justin Garrett "Don" [EMAIL PROTECTED] wrote in message 000c01c15f67$1a06ad80$[EMAIL PROTECTED]">news:000c01c15f67$1a06ad80$[EMAIL PROTECTED]... Hi, I have a form which when submitted, calls an html page which contains PHP code. Within that code, I wish to redirect my users to another page under certain conditions. So, in my code, I have the following lines: Header( "Location:http://www.mydomain.com/mypage.html"); exit; However, when the above is run, I get the following error generated: Warning: Cannot add header information - headers already sent by (output started at /usr/local/www/vhosts/mydomain.com/htdocs/mypage.html:7) in ../phpscript/general/formmail.php on line 100 Does anyone know what this error means? hanks, Don -- 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]
Re: [PHP] HELP: Still Learning
On Sunday 28 October 2001 07:18, jtjohnston wrote: Still learning! But need syntax help. This works: mysql_pconnect($host,MyAccount,MyPassword); ... This does not: mysql_pconnect($host,$MyTable,$MyPassword); Notice something? :) -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) CPU not found. retry, abort, ignore? -- 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] HELP: Still Learning
Still learning! But need syntax help. This works: Notice something? :) Yep, you forgot to paste the error message into the email. -- 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] HELP: Still Learning
$host :) - Original Message - From: Christian Reiniger [EMAIL PROTECTED] To: jtjohnston [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 28. listopad 2001 11:15 Subject: Re: [PHP] HELP: Still Learning On Sunday 28 October 2001 07:18, jtjohnston wrote: Still learning! But need syntax help. This works: mysql_pconnect($host,MyAccount,MyPassword); ... This does not: mysql_pconnect($host,$MyTable,$MyPassword); Notice something? :) -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) CPU not found. retry, abort, ignore? -- 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]
php-general Digest 28 Oct 2001 11:52:35 -0000 Issue 961
php-general Digest 28 Oct 2001 11:52:35 - Issue 961 Topics (messages 72595 through 72619): Re: I'm not username, log me out 72595 by: Matthew Loff Re: FTP or Telnet files/directories with PHP? 72596 by: CC Zona Re: Replace text 72597 by: DL Neil Re: command line option f -- how do i get the name of the file? 72598 by: DL Neil Q: System user and password 72599 by: taipan.shofiah.kusza.edu.my array_search() 72600 by: Ashley M. Kirchner Re: help needed for multimania.com 72601 by: Andrew Brampton Re: include-ing results in variable? 72602 by: Nathaniel Merriam Multi-dimensional nested arrays in Smarty 72603 by: Chad Guilette Re: how to recognize local or server execution? 72604 by: John A. Grant Problem redirecting 72605 by: Don 72606 by: Justin Garrett 72616 by: Nikola Karoviæ some.php/value - on win32 72607 by: c Re: problems with sessions (not working) 72608 by: Yasuo Ohgaki phpmyadmin is installed, now how to access it? 72609 by: Chip 72610 by: Jason Brooke Re: Still Learning 72611 by: jtjohnston 72617 by: Christian Reiniger 72618 by: speedboy 72619 by: Nikola Karoviæ Toronto PHP user group active. 72612 by: Dariush Toronto php users group meeting. 72613 by: Dariush Re: Arrays 72614 by: Christian Reiniger Re: Include Precompiled C binaries 72615 by: Christian Reiniger Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- I found sessions to be kind of fussy to get working, perhaps that's just because I didn't have any experience with them until the last site I did... A simple call to session_unset() won't erase the session, but should clear whatever username/passkey (I say passkey, assuming/hoping it's encrypted) is stored in the session. -Original Message- From: Andy Lewis [mailto:[EMAIL PROTECTED]] Sent: Saturday, October 27, 2001 9:45 AM To: [EMAIL PROTECTED] Subject: [PHP] I'm not username, log me out Hello All, I'm trying to use php sessions to logout a user that may be sharing a computer with another user. In other words. I don't want user1 to access my site and then user2 be able to access user1's account with an auto login because the session was saved. I've seen a few sites that have a URL or button that a user can click on such as: I'm not Joe Smith, please log me out. This is what I am trying to accomplish. Can someone point me in the right direction? I have sessions implemented using username and password but, on my login page since those vars are saved in the session the user automatically gets logged in. I also would like to have a checkbox on the login page that, if checked, doesn't cache the username and password. So if they logout they must enter a username and password, instead of getting automatically logged in. Any help will be highly appreciated. Andy -- 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] In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Jeff Gannaway) wrote: Can PHP run some FTP or TELNET commands? http://php.net/ftp http://php.net/fsockopen -- CC Hello guys function replace_text_smiley(){ global $comment; // To add a relation between a text smiley a an image smiley do this: // $faces[text smiley here] = img tag to image smile here; $faces[:)] = IMG SRC=\emoticons/smile.gif\; $faces[:P] = IMG SRC=\emoticons/tongue.gif\; $faces[:D] = IMG SRC=\emoticons/happy.gif\; $faces[:(] = IMG SRC=\emoticons/mad.gif\; $faces[;)] = IMG SRC=\emoticons/wink.gif\; while(list($text,$image) = each($faces)) { $comment = str_replace($text,$image,$comment); } return $comment; } this function replaces faces to smilies images then in a separete file i use this function and another one to replace urls... the url replacement is ok but it doesn't change the text to smilies.. any guesses?? :) =do you really want those quotation marks in the str_replace function call? =dn I am writing a script using php's command line ability and I am lost on how to work with a file when I don't kow what the file's name is. Example: script.php -f file In my script, how do I reference the file when I have no idea what it's name is going to be? The scrip will get called by another application: the other application will pipe a file to my scrip and then the scrip has to work with the file and output an altered file with a new filename. I have no idea what the name of the file is going to be beforehand. lucas Take a
Re: [PHP] Excel to MySQL
I use to save my access data to a dbf file and then use the dbf2mysql (see www.mysql.com site). dbf2mysql will create proper tables and export data to the mysql really faster than odbc. Very easy. I have exported someting like 5.000.000 records into 8 differents tables in 4 hours (3 cdroms of access data, 1 cd of dbf data :) And no need to create the table into mysql (this could be long if the table is big). Byez Daniel Harik [EMAIL PROTECTED] ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Guys getting more serious here now, 3 500 000 records, foxPro i'll try Jeff's method -- 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] Finding out document type for a stored file.
Hi all, I am trying to find out what the mime type is for files that are stored on my webserver, so I can convert the contents into a database. Basically, if it is in 'text/richtext' format I want to run one routine, if it's in 'application/msword' format another routine, and everything else another. I can retrieve this fine when a user uploads a file to the server, by using the 'input type=file name=userfile' command ($userfile_type), but I am stuck when retrieving the file from the server. All I can think of is to 're-upload' the file, but there must be a more efficient way. Any help would be most appreciated. Many thanks Alexis -- 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] How Do I Re-Compile PHP4
I've always had PHP set up on a shared server before. Now that I'm leasing a server that had it installed, I can change the configuration of it. I need to enable the FTP commands. I found the command in the FTP section of the PHP manual, but I'm not sure hwo to actually use it. I've tried looking at the docs on-line, but can't tell exactly what to do, and I don't wnat to risk crashing my server since so many of my clients are running PHP scripts. The command I found was: ./configure --enable-ftp I know the directory that my PHP files are found at. I'm using a Linux/Apache system. How do I re-compile??? I assume it's fairly easy since I read so many messages that say just recompile PHP with --with-blah-blah-blah. Thanks! -Jeff Gannaway ___ Save 15% on 2002 Calendars and Holiday Cards! http://www.AvantGifts.com Discount Code: hopper22ct Offer Good Through October 31, 2001 ___ -- 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] Toronto PHP user group active.
So is this a monthly thing like Lug meetings? If it is, then count me in! -Original Message- From: Dariush [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 28, 2001 2:47 AM To: [EMAIL PROTECTED] Subject: [PHP] Toronto PHP user group active. Toronto PHP user group active. Welcoming all php developers with questions and answers. If we get enough people we will be setting up meetings but again based on how many people we can have. www.realsoftstudio.com [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] -- 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] how to recognize local or server execution?
John, Netscape! Differences between servers AND differences between browsers AND differences between in-browser and command-line operations! Isn't life fun? Like you I'm messing around with some of these differences as part of a bid to 'convert' an existing set of scripts from browser i/f to command-line. At present I'm putting up with all the HTML output - that's a ToDo 'soon' I guess; but have fixed the time-clock base so that everything is converted back and forth between UTC/GMT and local times. Like you I have rolled-my-own function which uses the following two variables: SetSuffix($argv[0], $GLOBALS[SERVER_NAME]); $ServerName is used to work out which (Apache) Vserver is running the script, whereas $directory is used to work out where code is being run from (at the command line). The main decision being driven from here is whether to run off the 'production' or 'test' database - I've just tweaked that from code I wrote some weeks ago around another global. I guess I'll now have to emulate your plan and now work out how to control all the output, if not logging, then displaying at the command line/green screen as opposed to the browser. Regards, =dn Thanks for the idea. I have just resurrected and had another play with my 'testbench.php', running it from both IE/Apache and in a DOS box. It includes the following code: [...] Thanks (also thanks to the others for the useful comments ideas). I don't have $HTTP_SERVER_VARS[SERVER_NAME] or $GLOBALS[SERVER_ADDR] or $SERVER_SOFTWARE probably because my server is netscape (nsapi?). They are all blank. Yes I declared them 'global'. I ended up with these functions which seem to do the trick, at least for my server and NT. function isonserver() { global $PHP_SELF,$argc; return $argc==0 isset($PHP_SELF) $PHP_SELF; } function getpagename() { global $PHP_SELF,$argv; return basename(isonserver() ? $PHP_SELF : $argv[0]); } function getlinedelimiter() { return isonserver() ? \n : \r\n; } The pagename is critical to my site, because the code needs the page name to recognize certain suffixes and 'special page names. Perhaps it is only sufficient to test for $PHP_SELF and not $argc, but I threw in $argc==0 anyway. -- 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] How Do I Re-Compile PHP4
I actually have never compiled or re-compiled PHP, but if you are so concerned about not crashing PHP, how about you set up a test server first, play with that for a while, and then once you are happy with the results apply them to the real server... If you don't have a spare machine to do this on then just use the computer you are using at the moment. U can more than easily set up a Dual Boot of Windows 1gig Linux partions... I think this is allways a good general admin tip to carry out Andrew - Original Message - From: Jeff Gannaway [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, October 28, 2001 2:51 PM Subject: [PHP] How Do I Re-Compile PHP4 I've always had PHP set up on a shared server before. Now that I'm leasing a server that had it installed, I can change the configuration of it. I need to enable the FTP commands. I found the command in the FTP section of the PHP manual, but I'm not sure hwo to actually use it. I've tried looking at the docs on-line, but can't tell exactly what to do, and I don't wnat to risk crashing my server since so many of my clients are running PHP scripts. The command I found was: ./configure --enable-ftp I know the directory that my PHP files are found at. I'm using a Linux/Apache system. How do I re-compile??? I assume it's fairly easy since I read so many messages that say just recompile PHP with --with-blah-blah-blah. Thanks! -Jeff Gannaway ___ Save 15% on 2002 Calendars and Holiday Cards! http://www.AvantGifts.com Discount Code: hopper22ct Offer Good Through October 31, 2001 ___ -- 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]
[PHP] How do I prevent remote loading of jpegs from my site
Hello. I run a site that has lots of pictures (jpegs). It is pretty popular, but some visitors have gotten into the habit of going to forums and bulletin boards on other sites and making direct links (you know, img src=http...) of my pictures there. My hosting provider is going to charge me extra for that bandwidth, and I am not getting any benefits since users are not looking at the pictures on my site. So, the question is, how do I prevent this remoting loading from happening. Please help. -- Ivan R. Quintero E.* (507)228-3477 Aptdo 1263 * (507)228-9105 Balboa, Ancon * 612-1103 Republic of Panama * -- 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] How do I prevent remote loading of jpegs from my site
On Sun, 28 Oct 2001, rodrigo wrote: So, the question is, how do I prevent this remoting loading from happening. Go to the Apache site (assuming you use apache) and look at the rewriting and so on. You'll find your answer in there. -- Sapere aude My mind not only wanders, it sometimes leaves completely. -- 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] How do I prevent remote loading of jpegs from my site
On Sunday 28 October 2001 10:26 am, you wrote: So, the question is, how do I prevent this remoting loading from happening. Well, since the users are linking directly to your image, then you can't use PHP commands to prevent it. (since that would requuire the user loading a PHP page that then loaded the image) However, Apache has features built in that allow you to filter out all calls to a certain directory (such as /images) that don't come from the local machine. Check out the apache docs for more info (httpd.apache.org) hth --kurt -- 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] How Do I Re-Compile PHP4
I'm not sure if you can add functionality using ./config.status, but inside that file is the command line you used to originally compile it, so what you can do is copy that ./configure line, then add your --enable-ftp, and go. Might wanna run make clean first (not distclean!) Mike Jeff Gannaway wrote: I've always had PHP set up on a shared server before. Now that I'm leasing a server that had it installed, I can change the configuration of it. I need to enable the FTP commands. I found the command in the FTP section of the PHP manual, but I'm not sure hwo to actually use it. I've tried looking at the docs on-line, but can't tell exactly what to do, and I don't wnat to risk crashing my server since so many of my clients are running PHP scripts. The command I found was: ./configure --enable-ftp I know the directory that my PHP files are found at. I'm using a Linux/Apache system. How do I re-compile??? I assume it's fairly easy since I read so many messages that say just recompile PHP with --with-blah-blah-blah. Thanks! -Jeff Gannaway ___ Save 15% on 2002 Calendars and Holiday Cards! http://www.AvantGifts.com Discount Code: hopper22ct Offer Good Through October 31, 2001 ___ -- 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] RE: overloading variables in child classes
Andrew, Thanks for your reply. There still is something I don't understand. I understand that my derived class inherits all the member variables and functions of the base class. I would expect however that upon redeclaring a variable in a derived class, the variable in the derived class shadows the variable in the base class (as it does in java). The PHP behaviour mimics for variables the behaviour for member functions. This behaviour on functions is necessary to have polymorphism, but I believe it is dangerous for variables. Imagine I define a base class of shapes, in which I declare a variable called $depth representing the size of my object on the z axis. Assume someone (could be me) derives a colored_shape class from my shape class, and declares a variable called $depth to represent the color depth. Evidently, setting the $depth variable in the class colored_shape will change the shape of the object, which is probably not the desired behaviour. The current treatment of member variables in PHP forces a programmer deriving from a class to know the names of all the variables defined in the base class and its (recursive) parents in order to avoid corrupting them. It seems to me that this hinders the reuse of classes, which I believe is one of the main objectives of OOP. Regards, Alain Andrew Kirilenko [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Hello! Is there something I don't understand ? Yes. According OOP concepts, derived class inherits all functionality and data from the base. So, if you have $shared variable in the base class, your derived class will have it automatically. But PHP allows you to declare this variable once again in the derived class. In C++ you will get comilation error in this case. Best regards, Andrew Kirilenko. -Original Message- From: Alain Dresse [mailto:[EMAIL PROTECTED]] Sent: Saturday, October 27, 2001 10:12 PM To: [EMAIL PROTECTED] Subject: [PHP] overloading variables in child classes Hi all, I am a bit puzzled by the way PHP treates variables that have the same name in a base class and a child class. It seems to me that if a child class and its parent both have a variable with the same name, then they should be different variables. Instead, the example below indicates that they is only one variable : class base { var $shared; function base() {$this-shared = base;} function test() {echo(\$shared in base : . $this-shared . br\n);} } class child extends base { var $shared; function child(){$this-base(); $this-shared = child;} function test() { echo (\$shared in child : . $this-shared . br\n); parent::test(); } } $the_child = new child(); $the_child-test(); I would have expected the output to be $shared in child : child $shared in base : base instead I have $shared in child : child $shared in base : child Is there something I don't understand ? Regards, Alain Dresse [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]
[PHP] Preventing remote linking of files
Hello. I found this on the web after a couple of people who answered my original request pointed me to it. It is a document that tells you how to prevento people from inserting files directly from your site, stealing your bandwidth. I hope it is useful to you. http://apachetoday.com/news_story.php3?ltsn=2000-06-14-002-01-PS -- Ivan R. Quintero E.* (507)228-3477 Aptdo 1263 * (507)228-9105 Balboa, Ancon * 612-1103 Republic of Panama * -- 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] Attaching a file to a form!
I am trying to let a person attach a file to my form. Can anyone help? -- 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]
FW: [PHP] Trying to create a site-template system.. and..
Just a refresher.. I never got any feedback on this, and would appreciate any input anyone has. Thanks! Ryan -Original Message- From: Ryan Christensen [mailto:[EMAIL PROTECTED]] Sent: Friday, October 26, 2001 6:03 PM To: [EMAIL PROTECTED] Subject: [PHP] Trying to create a site-template system.. and.. First.. here's the synopsis of what I'm trying to do: I'm working on a site where everything is based off a really simple template system I'm using, see the chunk of my index page that deals with the plates for example: - $tmpl_file = fopen (./template.htm, r); $tmpl = fread($tmpl_file,16000); $tmpl = str_replace({title}, $title, $tmpl); $tmpl = str_replace({header}, $header, $tmpl); $tmpl = str_replace({header_url}, $header_url, $tmpl); $tmpl = str_replace({header_home}, $header_home, $tmpl); $tmpl = str_replace({header_cat}, $header_cat, $tmpl); $tmpl = str_replace({header_caturl}, $header_caturl, $tmpl); $tmpl = str_replace({header_title}, $header_title, $tmpl); $tmpl = str_replace({pretext}, $pretext, $tmpl); $tmpl = str_replace({content}, $content, $tmpl); $tmpl = str_replace({content_source}, $page_source, $tmpl); eval(echo \$tmpl;); - The template file looks like blah.. blah.. {title}.. the code above then takes the {blah} tags, and turns them into variables, which are defined in the actual content pages (which are included (via an include(); function..) The content files appear as: - $title = testing; $content = etc; - And so on.. My problem is.. that when I do something like - $content = show_source(/path/to/file); // or $content = Blah.. blah.. .include(/some/file)... some more blah..; - It includes the files (or executes the code that is assigned to the variable), however it all appears OUTSIDE the template. To see what I'm saying, see http://olypen.com/ryan/go/main/news or http://olypen.com/ryan/go/source/source_index .. that will give you a better idea as to what I'm saying. Anyone have any thoughts/explanations as to why this is happening? I can provide more source.. or info if needed. Thanks in advance! -Ryan -- 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]
[PHP] help measuring time for img creating...
I have a script that generates quite a complex report... at this script I call several times another script that generates images (of course based on the main report script)... I'd like some ideas on how I can measure the WHOLE time it took the build the entire page... because the images are not accounted for in the main script... it always returns something like 1 or 2 seconds when it actually took 30 or 40 seconds to finish... any ideas? _ . Christian Dechery . . Gaita-L Owner / Web Developer . . http://www.webstyle.com.br . . http://www.tanamesa.com.br -- 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] HELP: Syntax Needed
Jokes aside, I still don't get it. $host = localhost; $MyAccount = AccountName; $MyTable = Table1; $MyPassword = beep; This works: mysql_pconnect($host,AccountName,beep); $news = mysql_query(SHOW TABLE STATUS FROM AccountName LIKE 'Table1'); Why doesn;'t this? $myconnection = mysql_pconnect($host,$MyTable,$MyPassword); ... $news = mysql_query(SHOW TABLE STATUS FROM $MyAccount LIKE '$MyTable'); I have tried variations with or without and '. Is there a way to make this work? Or do I have to do as above every time? $host :) Your telling me to put $host in $host? OK: $myconnection = mysql_pconnect($host,$MyAccount,$MyPassword); It doesn't work?! Neither does: $myconnection = mysql_pconnect($host,$MyAccount,$MyPassword); $myconnection = mysql_pconnect('$host','$MyAccount','$MyPassword'); If I try this, $stringing just $host, it works!? mysql_pconnect($host,AccountName,beep); -- 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] switch-statement overrides use of global arrays?
Hi all, a very frustrating problem. For some reason I am not able to pass on an array between two functions, although I declare it global in both of them. I suspect my use of a switch statement to control the flow of the functions is causing some trouble, but I'm not sure. Changing the order in which I declare the array global did not help, nor the use of $GLOBALS. This is a simple representation of what I do: switch ($action) { default: main(); break; case test_one: test_one(); break; } // --- function main() { $array_test = array(); global $array_test; $array_test[0] = First array, first element; $array_test[1] = First array, second element; print(Content of first array in the main function is now:br); var_dump($array_test); print (pform method=\post\ action=\arraytest.php\ enctype=\multipart/form-data\); ? input type=hidden name=action value=test_one input type=submit value=Test tabindex=6 /form ? } // --- function test_one() { global $array_test; // This results in NULL print(Content of first array in the first test function is now:br); var_dump($array_test); $array_test[2] = First array, third element; $array_test[3] = First array, fourth element; // This results in the third and fourth element being shown print(pAfter addition, content of first array is:br); var_dump($array_test); } -- Imar de Vries - [EMAIL PROTECTED] - ICQ 6972439 -- 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] Re: help measuring time for img creating...
[EMAIL PROTECTED] (Christian Dechery) wrote: I have a script that generates quite a complex report... at this script I call several times another script that generates images (of course based on the main report script)... I'd like some ideas on how I can measure the WHOLE time it took the build the entire page... because the images are not accounted for in the main script... it always returns something like 1 or 2 seconds when it actually took 30 or 40 seconds to finish... any ideas? if i got you right, you can use microtime(); look at http://www.php.net/manual/en/function.microtime.php -- Henrik Hansen -- 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] switch-statement overrides use of global arrays?
Hey- I would think you would need to define $array_test outside in a global environment rather then inside the function since I think/thought it will just stay scoped in there and that global was used to access variables which weren't defined inside a functions scope and make it look outside. In other words //Define GLOBAL $array_test = array(); switch(){ BLAH BLAH } function main() { global $array_test; BLAH BLAH } function test_one(){ global $array_test; BLAH BLAH } Hope that helps. Henrik On Sunday 28 October 2001 15:17, Imar de Vries wrote: Hi all, a very frustrating problem. For some reason I am not able to pass on an array between two functions, although I declare it global in both of them. I suspect my use of a switch statement to control the flow of the functions is causing some trouble, but I'm not sure. Changing the order in which I declare the array global did not help, nor the use of $GLOBALS. This is a simple representation of what I do: switch ($action) { default: main(); break; case test_one: test_one(); break; } // --- function main() { $array_test = array(); global $array_test; $array_test[0] = First array, first element; $array_test[1] = First array, second element; print(Content of first array in the main function is now:br); var_dump($array_test); print (pform method=\post\ action=\arraytest.php\ enctype=\multipart/form-data\); ? input type=hidden name=action value=test_one input type=submit value=Test tabindex=6 /form ? } // --- function test_one() { global $array_test; // This results in NULL print(Content of first array in the first test function is now:br); var_dump($array_test); $array_test[2] = First array, third element; $array_test[3] = First array, fourth element; // This results in the third and fourth element being shown print(pAfter addition, content of first array is:br); var_dump($array_test); } -- Henrik Hudson [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]
Re: [PHP] switch-statement overrides use of global arrays?
Henrik Hudson wrote: I would think you would need to define $array_test outside in a global environment rather then inside the function since I think/thought it will just stay scoped in there and that global was used to access variables which weren't defined inside a functions scope and make it look outside. In other words //Define GLOBAL $array_test = array(); switch(){ BLAH BLAH } function main() { global $array_test; BLAH BLAH } function test_one(){ global $array_test; BLAH BLAH } Yes, the only way I could avoid errors that occurred when I tried to manipulate the array, was to add a $array_test = array(); a few lines before the switch statement. Alas, this also emptied the array each time I went from one function to another via the switch statement. I guess I am trying something that is just not possible (when I insist on using the switch statement)? -- Imar de Vries - [EMAIL PROTECTED] - ICQ 6972439 -- 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] One last kick at the cat
Sigh ... I have functions.inc in which I have Table_Title(). As soon as I put my database connection inside my function called Table_Title(), my database connection fails. (See second example below.) My database connection works fine whenever IT IS NOT inside function Table_Title(). (See first example below.) It seems that when I try to connect to my database inside function Table_Title(), my function cannot read the values of $server, $user, $pass, $db or $table ??? I call it normally?? ?php Table_Title() ? Can anyone help?? --SNIP THIS WORKS FINE! ?php $server = localhost; $user = MyAccount; $pass = MyPassword; $db = MyDatabase; $table = bookmark_unit4; $myconnection = mysql_pconnect($server,$user,$pass); mysql_select_db($db,$myconnection); $news = mysql_query(SHOW TABLE STATUS FROM .$db. LIKE '$table'); while ($news_story = mysql_fetch_array($news)) { $table_comment = $news_story['Comment']; } echo $table_comment; function Table_Title() { echo Nothing; } ? -- SNIP THIS DOES NOT WORK ?php $server = localhost; $user = MyAccount; $pass = MyPassword; $db = MyDatabase; $table = bookmark_unit4; function Table_Title() { $myconnection = mysql_pconnect($server,$user,$pass); mysql_select_db($db,$myconnection); $news = mysql_query(SHOW TABLE STATUS FROM .$db. LIKE '$table'); while ($news_story = mysql_fetch_array($news)) { $table_comment = $news_story['Comment']; } echo $table_comment; //echo Nothing; } ? -- 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] switch-statement overrides use of global arrays?
Well, the switch statement will only run ONE of the functions, never both. The default runs and then you break out of the switch, also: shouldn't default be at the bottom of the switch? or is that just convention? Anyways, there is no way for main() to ever pass anything to test_one(), since only one or the other is called in the switch (unless your switch is in a loop and $action changes in that loop). Oh, your passing it back in via a form and then telling it to use: test_one. Oh, ummm, everytime you submit the code you are calling a new instance of the script. It will never remember variables between instances unless they are passed to the script via POST and hidden fields. At least as far as I know...but I might be missing something. I would try and do whatever you are trying to do without resorting to a resubmit or just pass the variable to the function inside main: test_one($array_global); Sorry I couldn't be of more help. On Sunday 28 October 2001 15:48, you wrote: Hi Henrik, I would think you would need to define $array_test outside in a global environment rather then inside the function since I think/thought it will just stay scoped in there and that global was used to access variables which weren't defined inside a functions scope and make it look outside. Yes, the only way I could avoid errors that occurred when I tried to manipulate the array, was to add a $array_test = array(); a few lines before the switch statement. Alas, this also emptied the array each time I went from one function to another via the switch statement. I guess I am trying something that is just not possible (when I insist on using the switch statement)? -- Henrik Hudson [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]
Re: [PHP] One last kick at the cat
Inside your function define: global $server; global $pass; global $user; etc It is using variables insides it's own scope and unless you have use GLOBAL_VARIABLES defined in your php.config file, it won't go outside of it's scope to look for values, hence they are getting asigned NULL and you can't connect to a NULL DB :) Henrik On Sunday 28 October 2001 14:57, jtjohnston wrote: Sigh ... I have functions.inc in which I have Table_Title(). As soon as I put my database connection inside my function called Table_Title(), my database connection fails. (See second example below.) My database connection works fine whenever IT IS NOT inside function Table_Title(). (See first example below.) It seems that when I try to connect to my database inside function Table_Title(), my function cannot read the values of $server, $user, $pass, $db or $table ??? I call it normally?? ?php Table_Title() ? Can anyone help?? --SNIP THIS WORKS FINE! ?php $server = localhost; $user = MyAccount; $pass = MyPassword; $db = MyDatabase; $table = bookmark_unit4; $myconnection = mysql_pconnect($server,$user,$pass); mysql_select_db($db,$myconnection); $news = mysql_query(SHOW TABLE STATUS FROM .$db. LIKE '$table'); while ($news_story = mysql_fetch_array($news)) { $table_comment = $news_story['Comment']; } echo $table_comment; function Table_Title() { echo Nothing; } ? -- SNIP THIS DOES NOT WORK ?php $server = localhost; $user = MyAccount; $pass = MyPassword; $db = MyDatabase; $table = bookmark_unit4; function Table_Title() { $myconnection = mysql_pconnect($server,$user,$pass); mysql_select_db($db,$myconnection); $news = mysql_query(SHOW TABLE STATUS FROM .$db. LIKE '$table'); while ($news_story = mysql_fetch_array($news)) { $table_comment = $news_story['Comment']; } echo $table_comment; //echo Nothing; } ? -- Henrik Hudson [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]
Re: [PHP] One last kick at the cat
On Sunday 28 October 2001 12:57 pm, you wrote: It seems that when I try to connect to my database inside function Table_Title(), my function cannot read the values of $server, $user, $pass, $db or $table ??? you need to declare the variables as global. See below and also see the manual to understand how global works. ?php $server = localhost; $user = MyAccount; $pass = MyPassword; $db = MyDatabase; $table = bookmark_unit4; function Table_Title() { global $server,$user,$pass,$db,$table; $myconnection = mysql_pconnect($server,$user,$pass); mysql_select_db($db,$myconnection); $news = mysql_query(SHOW TABLE STATUS FROM .$db. LIKE '$table'); while ($news_story = mysql_fetch_array($news)) { $table_comment = $news_story['Comment']; } echo $table_comment; //echo Nothing; } ? -- 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] Trying to create a site-template system.. and..
Try this: (see http://www.php.net/manual/en/ref.outcontrol.php for more info) My problem is.. that when I do something like - $content = show_source(/path/to/file); // or $content = Blah.. blah.. .include(/some/file)... some more blah..; - It includes the files (or executes the code that is assigned to the variable), however it all appears OUTSIDE the template. ob_start(); // start buffer eval(?.include (/path/to/file)); $file_content = ob_get_contents(); ob_end_clean(); // delete the buffer $content = Blah.. blah.. .$file_content... some more blah..; Hope this helps... -- 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] HELP: Syntax Needed
Jokes aside, I still don't get it. =the word it is part of the difficulty everyone faces in thinking about whether they could help or not - what it is, is not apparent 1 there is a problem with a mysql_pconnect() call, and 2 there is a problem with a mysql_query() call. Which one is it? =the confusing presentation of the question, even more confused by the lack of substance/focus in the rejoinder, is not helping. =the very first suggestion that those who have answered more-or-less this exact 'pconnect' question many times a week for ..., is a not-so-subtle hint to RTFM (and/or to review the list archives). When you read up about how to write variables and constants, and how to use the mysql_... functions, then more will become obvious, and less sarcasm will come your way. =worse, you have quoted incomplete/inaccurate code fragments, so immediately the question arises: what else has been left out? (the answer being closely related to it). =The manual clearly says that missing out certain calls may not matter because MySQL will make assumptions and attempt to carry on, but the instant problems arise, surely it would be better to follow all the examples in the manual - which step through all of the calls, in sequence? =next point: if you have a problem with a series of instructions, go back to first principles, break things down and throw in echo/printr statements to 'prove' any and all assumptions - particularly the first time you try out some code. =last point: EVERY call to a client-server function should be checked (there's RTFM again), this will show if the fault lies at 'pconnect', at 'open', and/or at the 'query' stage. =dn PS lecture mode off - please take advantage of our 'two-fer' special offer: any two well formed questions sent to the list this week will be answered for the same price as one! $host = localhost; $MyAccount = AccountName; $MyTable = Table1; $MyPassword = beep; This works: mysql_pconnect($host,AccountName,beep); $news = mysql_query(SHOW TABLE STATUS FROM AccountName LIKE 'Table1'); Why doesn;'t this? $myconnection = mysql_pconnect($host,$MyTable,$MyPassword); ... $news = mysql_query(SHOW TABLE STATUS FROM $MyAccount LIKE '$MyTable'); I have tried variations with or without and '. Is there a way to make this work? Or do I have to do as above every time? $host :) Your telling me to put $host in $host? OK: $myconnection = mysql_pconnect($host,$MyAccount,$MyPassword); It doesn't work?! Neither does: $myconnection = mysql_pconnect($host,$MyAccount,$MyPassword); $myconnection = mysql_pconnect('$host','$MyAccount','$MyPassword'); If I try this, $stringing just $host, it works!? mysql_pconnect($host,AccountName,beep); -- 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]
Re: [PHP] switch-statement overrides use of global arrays?
Imar, The global array is being defined in the mainline, but not populated. What happens if you set element 0 to some value (to take up some storage space first) and then try the switched function calls? When you say Alas, this also emptied the array each time I went from one function to another via the switch statement. do you mean that the array definition line is inside the same loop that causes the switch statement to be revisited? (it shouldn't be - put it right at the beginning of the 'mainline' and ensure that it is not re-executed (which would indeed 'reset' the values)) Regards, =dn - Original Message - From: Imar de Vries [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 28 October 2001 21:49 Subject: Re: [PHP] switch-statement overrides use of global arrays? Henrik Hudson wrote: I would think you would need to define $array_test outside in a global environment rather then inside the function since I think/thought it will just stay scoped in there and that global was used to access variables which weren't defined inside a functions scope and make it look outside. In other words //Define GLOBAL $array_test = array(); switch(){ BLAH BLAH } function main() { global $array_test; BLAH BLAH } function test_one(){ global $array_test; BLAH BLAH } Yes, the only way I could avoid errors that occurred when I tried to manipulate the array, was to add a $array_test = array(); a few lines before the switch statement. Alas, this also emptied the array each time I went from one function to another via the switch statement. I guess I am trying something that is just not possible (when I insist on using the switch statement)? -- Imar de Vries - [EMAIL PROTECTED] - ICQ 6972439 -- 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]
Re: [PHP] phpmyadmin is installed, now how to access it?
On Saturday 27 October 2001 23:47, Peter wrote: Very easy. After I expanded the PhpMyAdmin files in the appropriate directory, which is...? I installed it into /usr/local/apache/htdocs/phpMyAdmin/ is that okay? It doesn't want to work correctly. I just set the appropriate server name, username and password for SQL server in the config.php.inc file Done. Then I accessed the directory with my web browser and I was successfully in using PHPMyAdmin. Peter I see all the files are name php3 rather than php. When I access the index.php3 of course it my browser doesn't know what to do so it asks if I want to download it. So I copied it as index.php and then I get all the code and not the actual rendered page. Then I copied all the php3 files to php and still get just the code only. The docs are not clear on this stuff. Supposedly just install it to the appropriate directory (which is...?), then set the user name and password, and away you go. Hmm, not for me. Do I need to do something to my httpd.conf so it will know how to handle php3 files? I uncommented the appropriate lines so it will handle php3 as well as php, but that did no good. I added AddModule lines for php3, still no good. I don't know what to try next. I'm sure it's easier than I make it out to be, but I don't know how to make a php3 program work on a php4 system, and the docs don't cover this. -- Chip On Sat, 27 Oct 2001, Chip wrote: I just installed the FreeBSD port for PHPMyAdmin and was reading the docs on the php wizard site but cannot figure out how to actually access the interface. Is it through a particular port like webmin? Can some clue me in please? -- 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] switch-statement overrides use of global arrays?
Dl Neil wrote: The global array is being defined in the mainline, but not populated. What happens if you set element 0 to some value (to take up some storage space first) and then try the switched function calls? This did not produce the desired result, unfortunately. The array is filled correctly within the first function, but is empty after we've passed the switch statement en route to the second function. When you say Alas, this also emptied the array each time I went from one function to another via the switch statement. do you mean that the array definition line is inside the same loop that causes the switch statement to be revisited? (it shouldn't be - put it right at the beginning of the 'mainline' and ensure that it is not re-executed (which would indeed 'reset' the values)) The array definition line was not inside the same loop as the switch, which it looked like of course because there was a reset at some point, it seemed. Henriks answer at 23:17 seems to have hit the nail in the head: each time the variable $action is changed (using a FORM), this causes the switch statement to run another function, but this also creates a new instance of the script, in which the variables from the older instance are not known. I'm now working on a solution that uses the same form to pass on some data I need. A bit complex maybe, but I'll leave the code cleaning for version 2.0 of my software :) -- Imar de Vries - [EMAIL PROTECTED] - ICQ 6972439 -- 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] One last kick at the cat
Henrik Hudson wrote: Inside your function define: global $server; global $pass; global $user; etc It is using variables insides it's own scope and unless you have use GLOBAL_VARIABLES defined in your php.config file, it won't go outside of it's scope to look for values, hence they are getting asigned NULL and you can't connect to a NULL DB :) Looking at the content of this post and my post above this one, it seems like it is global day/night again g -- Imar de Vries - [EMAIL PROTECTED] - ICQ 6972439 -- 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] php.ini executable
Has anyone made a Windows executable to configure the php.ini? ... just asking, before I find myself doing it myself. -- 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] RE: It's ok
Unsecured Visa or Mastercard with credit line up to $1000, Guaranteed! GO HERE! -- http://creditcardnow.com0to=4u=6@1089728774/-ci58MM4/ ::: To be removed please write, ::: [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]
[PHP] Create images jpeg
Hi All I have installed package GD, I am creating images with imagejpeg, but when I load the browser a messager error appear: ImageJpeg: No JPG support in this PHP build in I read the GD readme and say: gd 1.8.3 creates PNG, JPEG and WBMP images, not GIF images. This is a good thing. PNG is a more compact format, and full compression is available. JPEG works well with photographic images, and is still more compatible with the major Web browsers than even PNG is. I need to give format jpeg because is more work with more version of browser. How can I do it? Thanks in Advanced, Regards, _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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] Breaking a string
On Fri, 26 Oct 2001 22:36, Dan McCullough wrote: I was looking to take a string like Dan or Dan is great and return it like D a n or D a n i s g r e a t is it the str function that does that and if so does someone have an example? thanks You can dealt with the string as if it were an array of characters. Or you could use substr to work your way through the string. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Useless Invention: Strap-on portable chairs. -- 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] Create images jpeg
ImageJpeg: No JPG support in this PHP build in No jpeg support. Isn't it obvious? Recompile php --with-jpeg-dir=/usr/local For more information: http://database.sourceforge.net/documentation/installing_apache_with_gd_zlib_png_jpg_tiff_pdf_support.html -- 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] phpmyadmin is installed, now how to access it?
I see all the files are name php3 rather than php. When I access the index.php3 of course it my browser doesn't know what to do so it asks if I want to download it. Sounds like you need to add .php3 to your AddType directive in the httpd.conf file i.e.the line in httpd.conf that says: AddType application/x-httpd-php .php Should be changed to: AddType application/x-httpd-php .php .php3 This should solve the problem with .php3 scripts not executing on your server :-) Otherwise, if you want/have to change all the extensions to .php, you'll have to change all the requires and includes in the phpMyAdmin scripts to reflect these changes. -- 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] SSI
How do you get a SSI to work on a php page? TIA Gary -- 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] Breaking a string
I was looking to take a string like Dan or Dan is great and return it like D a n... http://www.php.net/manual/en/function.wordwrap.php -- 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-mysql question
On Fri, 26 Oct 2001 23:27, Gerard Onorato wrote: Hello, I am a recent return to the list. Wow has the traffic grown! This is awesome. I have a couple of questions and one may be a RTFM but I can't find the answer. #1) While I thought I was extremely familiar with the MYSQL functions available in PHP I found on e in a code snippet that I have not used before and can't find. It is simply MYSQL(dbname, querystring). On a *nix box with Apache it is returning a resource ID but on a w2k box with apache (or iss) it is returning nothing at all. It does execute the query however. Any ideas or any pointer as to where I can actually find this function would be appreciated! Thanks. An older version of the docs here shows that mysql is available for downwards compatibility, from mysql_db_query, which is deprecated since 4.06. Changing to mysql_query is recommended. #2) Does anyone know of a convention / conference which will have any PHP coverage in the North East? Northeast of where :-) -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA I tripped over the lamp plug, Tom said cordially. -- 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] sending email to php script
On Sat, 27 Oct 2001 03:23, JSheble wrote: A while ago an email came through here about how to parse out email message from a php script. The thing that was mostly of interest to me is the ability to send an email to a php script, I guess through a sendmail alias? I asked how to accomplish this, and never saw an answer come through. So I'd like to ask again :o) Does anybody know what would be required or necessary to send an email to an address that would run a php script? You say sendmail, so do it thusly: Edit /etc/aliases and add a line like phpmail: | /pathto/your/php/script and run newaliases to update your alias database. You'll also need to compile php as a standalone, and put as the first line of your php script #!/path/to/php -q Cheers -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA He's dead, Jim. Get his ears! - Spock -- 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] SMTP
On Sat, 27 Oct 2001 18:51, Lucas Chan wrote: Hi, I have PHP running on my Debian (unstable distribution) box. I'm trying to generate an email via the mail() function. It keeps failing because I do not have a properly installed/configured SMTP daemon on my machine. This is despite the fact that I have modified the SMTP variable in the php.ini file to point to my ISP's SMTP server. Has anyone else experienced this problem before? Regards, [ lucas ] The *nix version of php expects to find a functional mail transport agent on the local host; the SMTP setting in the ini file is (or should be) clearly marked as Windows only. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA I don't know any shanties, said Tom unceasingly. -- 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] SMTP
The *nix version of php expects to find a functional mail transport agent on the local host Hrm. Yeah. I think that's kind've umm, I dunno silly. Regards, [ lucas ] -- 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] SSI
At 19:04 28/10/01 -0500, Gary wrote: How do you get a SSI to work on a php page? you don't need SSI if you're running PHP... just use include()... _ . Christian Dechery . . Gaita-L Owner / Web Developer . . http://www.webstyle.com.br . . http://www.tanamesa.com.br -- 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] SSI
Yes I do, it is to run a pre-exiting program. I figured it out. I was uing double quotes in the ssi and excaping them when echoing. I should of been using single quotes. Thanks Gary Christian Dechery wrote: At 19:04 28/10/01 -0500, Gary wrote: How do you get a SSI to work on a php page? you don't need SSI if you're running PHP... just use include()... _ . Christian Dechery . . Gaita-L Owner / Web Developer . . http://www.webstyle.com.br . . http://www.tanamesa.com.br -- 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] How to determine a valid Date
Hello all, Is there any built-in function to determine a valid date? If there's not I will have to translate one that I've wrote with DrScheme to PHP. I just want to save time :) thanks again, Carlos Fernando. Linux User #207984
[PHP] feature sugestion
A lot of visually based editors support embeded java scripts. This can easily be used to make the system support php with one problem. Most of these system use the concept that these scripts ignore html comments to help them ignore the code. How about making the php engine ignore these to. That is any string like !-- or //-- is treated as white space. Ray Todd Stevens Specialists in Network and Security Consulting Senior ConsultantSoftware audit service available Stevens Services Suite 21 3754 Old State Rd 37 N Bedford, IN 47421 (812) 279-9394 [EMAIL PROTECTED] Thought for the day: Communist (n): one who has given up all hope of becoming a Capitalist. For PGP public key send message with subject please send PGP key If this message refers to an attachment the attachment may arrive as a seperate mail message depending on the type of mail client and gateway software you are using. -- 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] Problem appending data in a file with fopen(ftp://...,a)
I am able to create the file when it is not already there but I got a file exists error when I try to fopen it in append mode the second time. I wrote this to store a log of the traffic on my site (userid in a cookie+timestamp) in a file. Don't know if i'm using the good technique but it's very frustrating. I tried with 2 different FTP servers where I have all the necessary rights. Is it possible to solve this problem or it's a feature in PHP? Dave Létourneau [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]
[PHP] now I can compile
I asked for help because I could not compile php 4. I now have this working thanks to several nifty helpers. Thr problem was that in the src directory there is a directory for each version of linux, and then a symlink called linux to the version that is currently running. This symlink had not been added some how or rather. Got the proper link and everything is going great guns. Thanks to all. Ray Todd Stevens Specialists in Network and Security Consulting Senior ConsultantSoftware audit service available Stevens Services Suite 21 3754 Old State Rd 37 N Bedford, IN 47421 (812) 279-9394 [EMAIL PROTECTED] Thought for the day: Advertising (n): the science of arresting the human intelligence for long enough to get money from it. -- Stephen Leacock. For PGP public key send message with subject please send PGP key If this message refers to an attachment the attachment may arrive as a seperate mail message depending on the type of mail client and gateway software you are using. -- 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] Problem appending data in a file with fopen(ftp://...,a)
On Sunday 28 October 2001 06:41 pm, you wrote: Is it possible to solve this problem or it's a feature in PHP? If I understand your problem, you are trying to open the same file twice. I'm not sure why you would want to do that, but assuming you have a good reason, you need to make sure you fclose($filename) before you try to fopen($filename) again. Otherwise, PHP maintains the file open for reading (and writing, if that's how you opened it.) hth --kurt -- 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] Attention Die-Hard SEC Fans!
Dear [EMAIL PROTECTED], Are You A Crazed SEC Football or Sports Fan? If you are, then go to: http://www.sectraditions.com to find out about the most comprehensive books on SEC sports ever written. A Tailgater's Guide To SEC Football and SEC Baseball History Tradition by sports writer Chris Warner Forthcoming by November, 2001, SEC Basketball History Tradition, that has an afterword with Dale Brown Visit http://www.sectraditions.com for more info. THESE BOOKS MAKE GREAT GIFTS FOR ANY OCCASION! Books can also be found in Barnes Nobles, Books-A-Million Amazon.com. -- 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] feature sugestion
On Sunday 28 October 2001 06:10 pm, Ray Todd Stevens wrote: How about making the php engine ignore these to. That is any string like !-- or //-- is treated as white space. Um...maybe I don't understand your statement but php already has commenting built in. Anything between /* and */ is ignored by the scripting engine. (just like !-- and -- in HTML) --kurt -- 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] Problem appending data in a file with fopen(ftp://...,a)
I only fopen my file once... My program checks if there is a specific session cookie. If not (it's a new user that browse the site) I set a cookie and try to store the unique ID of this user (other cookie) in a file with a timestamp to track which user came and when (+ nb of times...). That's where I use my fopen() then I fclose the file. The fopen(..., a) creates the file if it's not already there but once it's created, it cannot append a new line (User;timestamp) to this file : Error : File exists. :(( Kurt Lieber [EMAIL PROTECTED] a écrit dans le message news: [EMAIL PROTECTED] On Sunday 28 October 2001 06:41 pm, you wrote: Is it possible to solve this problem or it's a feature in PHP? If I understand your problem, you are trying to open the same file twice. I'm not sure why you would want to do that, but assuming you have a good reason, you need to make sure you fclose($filename) before you try to fopen($filename) again. Otherwise, PHP maintains the file open for reading (and writing, if that's how you opened it.) hth --kurt -- 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] phpmyadmin is installed, now how to access it?
On Sunday 28 October 2001 15:52, Moody wrote: I see all the files are name php3 rather than php. When I access the index.php3 of course it my browser doesn't know what to do so it asks if I want to download it. Sounds like you need to add .php3 to your AddType directive in the httpd.conf file i.e.the line in httpd.conf that says: AddType application/x-httpd-php .php Should be changed to: AddType application/x-httpd-php .php .php3 This should solve the problem with .php3 scripts not executing on your server :-) Otherwise, if you want/have to change all the extensions to .php, you'll have to change all the requires and includes in the phpMyAdmin scripts to reflect these changes. Interesting that it only worked after adding .php3 to the existing .php line. Earlier I had uncommented the lines just above that one which is almost identical except it is for .php3, but that didn't do the trick. Thanks for the help, -- Chip W. -- 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] Re: How to determine a valid Date
checkdate(); http://www.php.net/manual/en/function.checkdate.php -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Carlos Fernando Scheidecker Antunes [EMAIL PROTECTED] wrote in message 009e01c16013$d2627ec0$0a505ad1@Nando4">news:009e01c16013$d2627ec0$0a505ad1@Nando4... Hello all, Is there any built-in function to determine a valid date? If there's not I will have to translate one that I've wrote with DrScheme to PHP. I just want to save time :) thanks again, Carlos Fernando. Linux User #207984 -- 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] How to determine a valid Date
On Mon, 29 Oct 2001 11:21, Carlos Fernando Scheidecker Antunes wrote: Hello all, Is there any built-in function to determine a valid date? If there's not I will have to translate one that I've wrote with DrScheme to PHP. I just want to save time :) Quicker to ask online than look in the manual, is it? http://www.php.net/manual/en/function.checkdate.php -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Oxymoron: Unusual Routine. -- 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] Problem appending data in a file with fopen(ftp://...,a)
On Mon, 29 Oct 2001 13:59, Dave Létourneau wrote: I only fopen my file once... My program checks if there is a specific session cookie. If not (it's a new user that browse the site) I set a cookie and try to store the unique ID of this user (other cookie) in a file with a timestamp to track which user came and when (+ nb of times...). That's where I use my fopen() then I fclose the file. The fopen(..., a) creates the file if it's not already there but once it's created, it cannot append a new line (User;timestamp) to this file : Error : File exists. :(( Kurt Lieber [EMAIL PROTECTED] a écrit dans le message news: [EMAIL PROTECTED] On Sunday 28 October 2001 06:41 pm, you wrote: Is it possible to solve this problem or it's a feature in PHP? If I understand your problem, you are trying to open the same file twice. I'm not sure why you would want to do that, but assuming you have a good reason, you need to make sure you fclose($filename) before you try to fopen($filename) again. Otherwise, PHP maintains the file open for reading (and writing, if that's how you opened it.) hth --kurt This may be a 'feature' of your ftp target. There may be limitations on what you can do via ftp including overwrite existing files. If you have control of the box, or admin access, check /etc/ftpaccess if it is a *nix OS. About BillOS, I have no idea. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Life is Roff when yer Stewpid -- 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] Problem appending data in a file with fopen(ftp://...,a)
On Sunday 28 October 2001 07:29 pm, you wrote: I only fopen my file once... My program checks if there is a specific session cookie. If not (it's a new user that browse the site) I set a cookie and try to store the unique ID of this user (other cookie) in a file with a timestamp to track which user came and when (+ nb of times...). That's where I use my fopen() then I fclose the file. The fopen(..., a) creates the file if it's not already there but once it's created, it cannot append a new line (User;timestamp) to this file : Error : File exists. Aha -- I understand. I also didn't see the first time that you're using FTP. You can't fopen() a file for read/write through FTP. You can do one, or the other, but not both. http://www.php.net/manual/en/function.fopen.php -- 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] MySQL command log
I've done it before, but I cant remember how to view the commands that have been sent to MySQL. I normally try not to ask MySQL questions here even though it's pretty much a standard with PHP :) But I have exhausted myself in researching the problem and I hope one of you might have the answer. A friend had his server hacked and they thought it would be funny to change the username and password to the mysql table in mysql plus a couple other tables We're hunting now ;) Thanks ahead of time! Rick -- 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] MySQL command log
On Mon, 29 Oct 2001 14:59, Richard Baskett wrote: I've done it before, but I cant remember how to view the commands that have been sent to MySQL. I normally try not to ask MySQL questions here even though it's pretty much a standard with PHP :) But I have exhausted myself in researching the problem and I hope one of you might have the answer. A friend had his server hacked and they thought it would be funny to change the username and password to the mysql table in mysql plus a couple other tables We're hunting now ;) Thanks ahead of time! Rick If you have logging enabled for mysql, check that log. It might be in your mysql/data directory. Also check ~/.mysql_history for caommands ent via the mysql command line monitor. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Now I can chop down that tree, said Tom with a heavy accent. -- 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] Array's
Please help! Im have been trying to get a multi-dimentional array for so time now and dont seems to get a right! I have the following : while($row=db_range()){ list($co_id,$surname,$init,$ba) = $row; $acid[$i] = array($a=array($co_id), $b=array($surname,$init), // does it work like this ??? $c=array($ba)) ; $i++; }//end while 1 I have 4 fields that i want to to put in an array and about 3000 records. How can i list the fields in an array and retrive the values out of the array PLS help! -- 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] Re: Array's
$b=array($surname,$init), // does it work like it does work like that, but you're creating an array of one item which is a string holding to values comma seperated. you can do this too: $b=array($surname,$init), // does it work like w/o the quotes. and also no need to put quotes around the $b or $a. and when you're storing one element no need to put it in an array like you did for this: = array($a=array($co_id), do directly: array($a = $co_id, ... I have 4 fields that i want to to put in an array and about 3000 records. How can i list the fields in an array and retrive the values out of the array $values = array(); $i =0; while (getting the rows) { list($id, $surname, $ba) = $row; $values[$i]['surname'] = $surname; $values[$i]['id'] = $id; $values[$i]['ba'] = $ba; $i++; } retrieve any element as: $values[INDEX HERE]['surname'] for example. De Necker Henri [EMAIL PROTECTED] wrote in message 3A8ED7A62794D311AA7700508B6164EC08DCA35E@SCPTS01">news:3A8ED7A62794D311AA7700508B6164EC08DCA35E@SCPTS01... Please help! Im have been trying to get a multi-dimentional array for so time now and dont seems to get a right! I have the following : while($row=db_range()){ list($co_id,$surname,$init,$ba) = $row; $acid[$i] = array($a=array($co_id), $b=array($surname,$init), // does it work like this ??? $c=array($ba)) ; $i++; }//end while 1 I have 4 fields that i want to to put in an array and about 3000 records. How can i list the fields in an array and retrive the values out of the array PLS help! -- 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] Re: php.ini executable
go for it...even if someone did a visual tool for that. my question goes, has anyone made a *nix program to configure php.ini ? ;) before i Jtjohnston [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Has anyone made a Windows executable to configure the php.ini? ... just asking, before I find myself doing it myself. -- 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] Re: Random
$ceiling is too big. try to do this and see: echo getrandmax(); you might get 32767 as an output! therefore, $ceiling must be = getrandmax(); try to scale down your floor and ceiling, ie: $max = $ceiling - $floor; $random = rand(0, $max) + $floor; Andrew Duck [EMAIL PROTECTED] wrote in message 005f01c15ea6$30375800$017f@localhost">news:005f01c15ea6$30375800$017f@localhost... #Create Random number $floor = 10; $ceiling = 99; srand((double)microtime()*100); $random = rand($floor, $ceiling); Warning: rand(): Invalid range: 10..99 in c:\my documents\ezone\testing\signup2.php on line 49 Can someone please tell me where i went wonr gin this coding. Thanks -- 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] RE: Array
Now i did the following : My output is only null or blank values!,but my data is there! while($row=db_range()){ list($co_id,$surname,$init,$ba) = $row; echo $co_id $surnamebr; # This works perfect! $values[$i]['id'] = $co_id; $values[$i]['surname'] = $surname; $values[$i]['init'] = $init; $values[$i]['ba'] = $ba; $cid = $values[$i]['id']; echo $idbr ; # Doesnt wanna work list($a,$b,$c,$d) = $values[$i]; echo $a ; # Doesnt wanna work $i++; }//end while 1 -- 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] Re: Array
$values[$i]['id'] = $co_id; you didn't initialize the $i did you? should put $i =0; before the while loop. echo $idbr ; # Doesnt wanna work what is $id ? i don't see it defined in your code, i see $cid instead. list($a,$b,$c,$d) = $values[$i]; sure won't work, try: list($a,$b,$c,$d) = each($values[$i]); De Necker Henri [EMAIL PROTECTED] wrote in message 3A8ED7A62794D311AA7700508B6164EC08DCA35F@SCPTS01">news:3A8ED7A62794D311AA7700508B6164EC08DCA35F@SCPTS01... Now i did the following : My output is only null or blank values!,but my data is there! while($row=db_range()){ list($co_id,$surname,$init,$ba) = $row; echo $co_id $surnamebr; # This works perfect! $values[$i]['id'] = $co_id; $values[$i]['surname'] = $surname; $values[$i]['init'] = $init; $values[$i]['ba'] = $ba; $cid = $values[$i]['id']; echo $idbr ; # Doesnt wanna work list($a,$b,$c,$d) = $values[$i]; echo $a ; # Doesnt wanna work $i++; }//end while 1 -- 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] POSTing values to file
anybody help me please... how can I open a file from php (something like require, but without closing the php-file) and then send some string to that file with POST is thispossible?/? -- 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] Re: POSTing values to file
see http://www.php.net/fopen Michiel Van Heusden [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... anybody help me please... how can I open a file from php (something like require, but without closing the php-file) and then send some string to that file with POST is thispossible?/? -- 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]