[PHP] Re: #!/usr/local ignore option?
why not just keep the module and drop the #!/usr/local/bin/php at the beginning of each script .. ? I've not heard of an ISP that asked for this b4 ... Steve Michael Rice [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi All, I have a kind of unique problem that I've had trouble finding information on around the net. I have a site that I pay a hosting company for that expects my php scripts to have #!/usr/local/bin/php at the beginning of each script which works fine. Now, I'd like to keep a development server at home that uses Apache 22 and the latest php. I followed the installation instructions carefully can got php running great at home. The only problem is that it serves up the #!/usr... at the beginning of file, which wouldn't bother me except that it causes major problems with redirects. Any ideas on how to tell my development server to ignore that line or to reconfigure my apache/php in some such that it won't serve up that line?? I promise that I did due diligence in looking around but came up empty handed... keyword searching has its limitations... Thanks very much in advance. -- Sent through GMX FreeMail - http://www.gmx.net -- 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: emailing attachments
you need: input type=file/input {can't remember the exact syntax but it's the file type you're looking for, opens the file open dialogue so they can choose local file} Steve Don [EMAIL PROTECTED] wrote in message 004a01c16b33$b43a2c60$4fad2b18@cr993021a">news:004a01c16b33$b43a2c60$4fad2b18@cr993021a... Hi, I have a class that allows me to send e-mail with an attachment. I have a form that gathers information and I would like to allow the user to attach a file from his local drive. Is there a PHP routine that allows the user to browse his drive and choose a file? Thanks, 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] Re: executing another php.script
you don't need a sepaerate script. define two functions and then loop through calling the second function. much neater (and easier) Steve David Tod Sigafoos [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am sure that I am just .. missing this .. From one script I wish to 'execute' another script. How is this done? Setting a link and clicking is not the answer .. one script loops through all the 'selected' rows and I want to 'execute' another script for each row .. can this be done? thanks DSig David -- 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: Apostrophes and Textareas
have a look at get_html_translation_table htmlspecialchars() , htmlentities() and get_html_translation_table. these function do all the work for you without reinventing the wheel. Steve Joe Van Meer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Hi there...I'm new to php coming from an asp background. I have a form with two textarea form elements which is eventually inserted into a sqlServer db. Everything works great, but one small problem How do I work around apostrophes within the textareas? I keep getting errors when they are present and no errors when I remove all of the apostrophes. Thx in advance, Joe -- 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 update a variable on a other frame.
you need to update the page that the frame displays. call the page and then use 'target=frame' to direct the output to the frame of your choice. Steve Hvm [EMAIL PROTECTED] wrote in message 001001c14270$8a563380$0601a8c0@Hans">news:001001c14270$8a563380$0601a8c0@Hans... Hi all, Is there a command to update a variable on a other frame generated by a php script. This is needed to show the number of records selected in the bottom frame (this frame is also generated from a php script). Manny thanks, Hans. -- 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: Legal advice
why not just drop access and move to postgresql or mysql. go on .. make the leap; you know you want to Steve Jon [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, We are working with PHP MYSQL, and we would like to publish some information that we have with MS ACCESS and MS EXCEL, and altough I know that it is posible to connect an access database using ODBC from PHP, however I don't know if it is legal to do this without having to pay licenses to Microsoft for accessing its database through the web. On the other hand and if it will be too expensive to use access with ODBC, I would to know if there is an easy way to insert the information in EXCEL / ACCESS to a MYSQL database. 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: konquerer and php
konquerer is krap. :-) only kidding. i seem to remember that konquerer has specific settings for script execution - it may be worth checking out the setup... Steve Scott [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a database browser that I made with php and mysql. When I use it in Netscape it behaves normally. However when I view it using Konquerer, all kinds of php code shows up on the screen when I execute a php page. I thought that Konquerer might not be recognizing the ? and ? start and end tags so I tried script language=php and /script. However if I use these nothing at all shows up on the screen. Can someone tell me what the problem is? Thanks, SW -- 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] numrows
i'd have a look at the table structure. also if you're using to denote inequality then use != both of the previous posts are incorrect Steve Chris Fry [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Should be ORDER BY ID, DESC Chris Martin Kampherbeek wrote: What's wrong with this? I get the error: Warning: Supplied argument is not a valid MySQL result resource in /home/sites/site49/web/vragen/vragen.php on line 42 $query = SELECT * FROM question WHERE answer'1' AND id250 ORDER BY id DESC; $result = MYSQL_QUERY($query); $number = MYSQL_NUM_ROWS($result); -- Chris Fry Quillsoft Pty Ltd Specialists in Secure Internet Services and E-Commerce Solutions 10 Gray Street Kogarah NSW 2217 Australia Phone: +61 2 9553 1691 Fax: +61 2 9553 1692 Mobile: 0419 414 323 eMail: [EMAIL PROTECTED] http://www.quillsoft.com.au You can download our Public CA Certificate from:- https://ca.secureanywhere.com/htdocs/cacert.crt ** This information contains confidential information intended only for the use of the authorised recipient. If you are not an authorised recipient of this e-mail, please contact Quillsoft Pty Ltd by return e-mail. In this case, you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments may also contain copyright material belonging to Quillsoft Pty Ltd. The views expressed in this e-mail or attachments are the views of the author and not the views of Quillsoft Pty Ltd. You should only deal with the material contained in this e-mail if you are authorised to do so. This notice should not be removed. -- 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] while loop with if statement - here's the attachment
did you do it again ? :-) pasting you code is ok ... Steve [EMAIL PROTECTED] wrote in message BB6D932A42D6D211B4AC0090274EBB1D2EF0EE@GLOBAL1">news:BB6D932A42D6D211B4AC0090274EBB1D2EF0EE@GLOBAL1... Here's the attachment - I hate it when I do that! :) -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 8/20/01 10:25 AM Subject: [PHP] while loop with if statement I can't figure out why the if statement isn't working. The page displays the same with or without the if statement. Any idea what I'm doing wrong? I attached the code in a word document. Thank you, Shawna -- 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] while loop with if statement - here's the code
try using mysql_num_rows() to get the number of rows returned by the query. you need to supply it with the identifier for the query not the sql you sent to the query. not exactly sure what you're trying to do though ... Steve [EMAIL PROTECTED] wrote in message BB6D932A42D6D211B4AC0090274EBB1D2EF0F0@GLOBAL1">news:BB6D932A42D6D211B4AC0090274EBB1D2EF0F0@GLOBAL1... Thanks Steve! :) Here's the code: ? $results = mysql_db_query($db, select * from $table where $query order by update_datetime desc limit $offset, 10); while($one = mysql_fetch_array($results)){ $id=$one[id]; $title=$one[title]; $description=$one[description]; print TRTD VALIGN=TOPimg src=/assets/images/bullet.gif width=10 height=8/TDTDFONT FACE=VERDANA,ARIAL,HELVETICA,SANS-SERIF SIZE=2A HREF=/view_top.php3?id=$id$title/ABR$description/TD/TR\n TRTD VALIGN=TOP COLSPAN=2img src=/assets/images/spacer.gif width=10 height=6/TD/TR\n ; }; $numrows=mysql_num_rows($one); if($numrows= =0) { print TRTDFONT FACE=VERDANA,ARIAL,HELVETICA,SANS-SERIF SIZE=2NO RESULTS/TD/TR\n TRTD VALIGN=TOP COLSPAN=2img src=/assets/images/spacer.gif width=10 height=6/TD/TR\n ; } ? -- 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] while loop with if statement - here's the code
okay - read all the code now. this might be a better way: ?php $results = mysql_db_query($db, select * from $table where $query order by update_datetime desc limit $offset, 10); $one = mysql_fetch_array($results); $numrows=mysql_num_rows($one);// get the number of results if ($numrows0) { for ($x=0;$x$numrows;$x++) { $id=$one[id]; $title=$one[title]; $description=$one[description]; print TRTD VALIGN=TOPimg src=/assets/images/bullet.gif width=10 height=8/TDTDFONT FACE=VERDANA,ARIAL,HELVETICA,SANS-SERIF SIZE=2A HREF=/view_top.php3?id=$id$title/ABR$description/TD/TR\n TRTD VALIGN=TOP COLSPAN=2img src=/assets/images/spacer.gif width=10 height=6/TD/TR\n ; } // end of for } else { print TRTDFONT FACE=VERDANA,ARIAL,HELVETICA,SANS-SERIF SIZE=2NO RESULTS/TD/TR\n TRTD VALIGN=TOP COLSPAN=2img src=/assets/images/spacer.gif width=10 height=6/TD/TR\n ; } ? -- 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: Multi-Task on PHP by submitting a form!
you're there already. have an if statement on mail.php: if (isset($posted_info)) { // send mail here // do db insert here } // end of if Steve Jack [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Dear all I was trying to get a user input form to insert to a mysql_database and e-mail to me! Is it possible to make php perform two task in one single submit button? The form will post the input -- mail.php. In the mail.php, i was thinking to add another process just after the mail process had finish, which will insert the data from the from to mysql_database. Thx Jack [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] Instalation
i think pgp has a quick install text file that is superb. sorta step-by-step simple and complicated. Steve Jean-Arthur Silve [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... check de readme or install files provided in each one ! At 15:39 14/08/01 +0200, Roman wrote: Help me. I have RED HAT Linux 7.0 and I want install Apache web server with php and mysql support. How ? I have : apache_1.3.20.tar.gz php-4.0.6.tar.gz mysql-3.23.38.tar.gz thanx roman -- 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] EuroVox 4, place Félix Eboue 75583 Paris Cedex 12 Tel : 01 44 67 05 05 Fax : 01 44 67 05 19 Web : http://www.eurovox.fr -- 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: session security issue
what about registering a var called loggedin with the session and then testing on each script to see if it's set to 1 or something ? then base the access on that ? that's what i use and then register uid with the session as well so you can use it througout your site ... ok you've got me worried now, are there any problems with security doing it that way Steve Christian Dechery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have pages that uses session for security that looks something like this: ?php session_start(); if( !isset($uid) ) { include(include/auth.inc.php); auth_user(); } more code... ? so $uid tells me if the user is logged on or not... but what if somebody calls the script directly from the address bar like this: http://server/script.php?uid=10 wouldn't this be a security problem? Christian Dechery (lemming) http://www.tanamesa.com.br Gaita-L Owner / Web Developer -- 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 works at last!
oh dear. Steve [EMAIL PROTECTED] [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Okay I got it working! http://www.futurebird.com/wordstream/index.php3 go on give it a try! Susan -- [EMAIL PROTECTED] http://futurebird.diaryland.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] CGI error
i tend to get this error when the page being called doesn't exist. check the link and the file name Steve Phil Driscoll [EMAIL PROTECTED] wrote in message 01080909463405.04245@linux">news:01080909463405.04245@linux... On Thursday 09 August 2001 09:46, karthik wrote: Hi, In install.txt there seems to be settings on how to install under various web servers. Well what about this bit: You have installed PHP, but when try to access a php script file via your browser, you get the error: cgi error: The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: This error message means that php failed to output anything at all. From the command line hange to the directory containing php.exe. Run php.exe -i If php has any problems running, then a suitable error message will be displayed which will give you a clue as to what needs to be done next. If you get a screen full of html codes (the output of the phpinfo() function) then php is working ok. Once php is working at the command line, try accessing the php script via the browser again. If it still fails then it could be one of the following: file permissions on your php script, php.exe, php4ts.dll, php.ini or any php extensions you are trying to load are such that the anonymous internet user ISUR_machinename cannot access them. The script file does not exist (or possibly isn't where you think it is relative to your web root directory). Note that for IIS you can trap this error by ticking the 'check file exists' box when setting up the script mappings in the Internet Services Manager. If a script file does not exist then the server will return a 404 error instead. There is also the additional benefit that IIS will do any authentication required for you based on the NTLanMan permissions on your script file. -- Phil Driscoll -- 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: Error using databases
check the cache settings in IE and change to check for new version always. sounds like you're reading a cached version of your page. Steve Jorge Fernando Tamez Seceñas wrote in message news:[EMAIL PROTECTED]... Hi: I'm coding my first programs in PHP using MySQL in Windows. I instaled the Xitami Web Server for Windows. I have a simple table catalog that includes 3 fields and one php script that insert records into the table catalog using a the label FORM and it works ok. I have another php script that print a the records in a table of HTML and it doesn't work correctly. The fisrt time I run this code works Ok, but then I go to add a new record using the fisrt code and then return to scrip that print the table and it doesn´t consider the last records I added. I make the consult in mysql.exe and effectively there are the new records. I have to suthdown the server and start again and the second script work correclty. I have been locking how to solve this problem by myself but a couldn´t. I think that it's a basic problem but I'm beginning in this programs. If somebody can help me i would be thankful. Thanks. George Tamez -- 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] file upload problem - urgent help needed
i know this has been posted before but i still haven't figured it out. the bloke who runs the server for a 'client' of mine has set safe mode on and therefore the standard file upload scripts fail. i needed to create a 'dump' of the database in text files whihc i've done by creating a dir within the httpd dir and chaning the permissions but when i try to upload files i keep running into the problem whereby php can't write to the temp dir as it uploads the file. i get various errors from '. safe mode in operation...' to 'user blah blah does not have permission to write to /foo/bar/tmp'. is there ANY way round this ? Steve -- 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: Upgrading to Windows 2000
instalation under windows 2000 is very simple. just reinstall php. Steve Amarjit Jutley [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... We are presently running PHP on a Windows NT 4.0 platform and all is working correctly, we however want to upgeade to Windows 2000 server platform My question is the application compatible with Windows 2000. I cannot find the version but listed the size and date of the files installed. PHP.exe20kb12/10/2000 PHP.ini24Kb06/10/2000 php4ts.dll964kb12/10/2000 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: exec problem
if you have a shell account write a batch file and install it in the crontab of the user whihc mysql runs under. i did this at work for a postgresql database and it owrks perfectly. something like this will work. crontab -u user -e add: 30 7-19/2,23 * * * /backup/dumpit which runs /backup/dumpit every 2 hours at 30 mins past the hour between 7am and 7 pm and then again at 11 pm dumpit consists of: #!/bin/sh backdate=$(date +%Y%m%d%H%M.gz) /usr/local/pgsql/bin/pg_dump XXX | gzip /backup/edb-backup_$backdate cp /backup/edb-backup_$backdate /var/autofs/misc/ecalnet/ so i effect the file creates a file called edb-backup_date and time which is a zipped copy of the dump file. should be simple for you to substitute the mysql dump commands etc. Steve [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi I'm trying to create a script which my cron will run once a day to backup my MySQL database, but the exec command doesn't want to work no matter what I try... exec(mysqldump -h localhost -u user -p pass --opt DataBase BACKUPS/backup.mysql) or die(Problem); I have tried adding the full path to mysqldump, I have tried using my root access, I have tried using a different dir to store the files, changed permissions all sorts and nothing works. It always returns Problem and if I take out the or die then it just returns a blank screen. I also tried system () and that gave the same results. Anyone have any other ideas??? TIA __ -Ade ~~Good things come to those who wait~~ -- 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: window.open (javascript)
ive used a very similar function and found that javascript like single queted strings passed into it. i.e. java_function('link/to/file') just noticed in the original post that double quotes were used Steve Dave [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... have used the following on occasion, script language=Javascript function Popup(page) { OpenWin = this.open(page, PopupWindow, 'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizabl e=1, width=775,height=500'); } /script a href=javascript:Popup('http://mydomain.url/file.php?var=value')link/a don't recall any problems Dave -Original Message- From: elias [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 31, 2001 9:42 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: window.open (javascript) can you show us the code that does the window.open('myfile.php?test=hey') for example ? Eduardo Kokubo [EMAIL PROTECTED] wrote in message 016e01c119b4$d784d920$a102a8c0@cttmar">news:016e01c119b4$d784d920$a102a8c0@cttmar... I passed some vars to another page using window.open and it worked fine (but had to hide the toolbar). The problem is that wen I check their values like this: ?php if ($test){ print bTest: /b; print $test; print brbr\n;} if ($adicionais){ print bInformações adicionais: /b; print $adicionais; print brbr\n;} ? This code always prints Teste and a 0 when it shouldn't print anything. ?php if ($test != 0){ print bTest: /b; print $test; print brbr\n;} if ($adicionais != 0){ print bInformações adicionais: /b; print $adicionais; print brbr\n;} ? This one never prints anything. When I use or ' ' to check the 0, it happens the same thing that the first code. The other vars that don't use if are working fine. Can anybody please explain this? -- 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] Re: Session life time
check this in php.ini session.gc_maxlifetime specifies the number of seconds after which data will be seen as 'garbage' and cleaned up Steve Sheni R. Meledath [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I am using sessions for user authentication on one of our sites. I want to set up a time period for each session, ie, after a particular time period the session should automatically expire. How can this be achieved? Could you please help me. Many thanks Sheni R Meledath [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] Re: Upgrading to Windows 2000
indeed. i also use the cgi version. Steve Bernie Kruger [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I am running PHP 4.0.5 on Win2K. The ISAPI module gave me lots of headaches and crashed the server every other minute, but the CGI one runs like a dream. I am using IIS5. BK Amarjit Jutley [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... We are presently running PHP on a Windows NT 4.0 platform and all is working correctly, we however want to upgeade to Windows 2000 server platform My question is the application compatible with Windows 2000. I cannot find the version but listed the size and date of the files installed. PHP.exe20kb12/10/2000 PHP.ini24Kb06/10/2000 php4ts.dll964kb12/10/2000 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: declaring variables in PHP???
the zend ide @ www.zend.com is a pretty cool debugging env. Steve René Moonen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I'm using PHP for a few weeks now, so you can imagine that I'm making a lot of typing errors... Often I make a typing error in one of the variable names ($helo instead of $hello or worse still $Hello instead of $hello). Since PHP does not care about declaring variables before using them, it is very easy to overlook such small typing error in a large PHP script. In the old days of ANSI C, there where things like LINT that would help you with these problems. Of course in ANSI C these things were easier, because of the fact that variables need to be declared before they could be used. My questions: 1. can you configure PHP in such away that variables need to be declared? 2. are there source code checking tools that could help me locate problems like described above? Thanks for your help René -- 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 stand alone
i don't think the last post was right, there is some stuff at phpbuilder about using php with shell access, i guess you could write a shell script that is called from cron ... here you go ... http://www.phpbuilder.com/columns/darrell2319.php3 Steve Adrian D'Costa [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, How do I compile php to work as a stand alone. Right now it is working thru the web but need to run it from a cron job. TIA Adrian -- 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
'order by text asc' will sort in alphabetical order A-Z .. and your query should be select [campo] from table where campo like 'A%' ... seems like an expensive way of sorting ... i think mysql has natural order sorting functions in there somewhere ... Steve Marisol díaz e. [EMAIL PROTECTED] wrote in message 000e01c1113b$5df255f0$[EMAIL PROTECTED]">news:000e01c1113b$5df255f0$[EMAIL PROTECTED]... select [campo] from [tabla] order by [campo] if you want for each leter select [campo] from [tabla] where [campo] like 'A' Marisol - Original Message - From: Erich Kolb [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 20, 2001 11:32 AM Subject: [PHP] PHP MySQL When you query a MySQL Database, how do you set the order alphabetically? -- 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] Re: One2Many Logic Problem - phpMySQL bibliography
wouldn't the structure of the database be determined by the fact you have a many to many relationship ? i.e. the two tables would decompose into three with a 'link' table defining the many to may part ? steve Mike Gifford [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, I'm not sure if anyone else as the need for a php/MySQL based bibliography, but the application that I am developing (which is basically a module for phpSlash) is coming along fairly well. If anyone is interested in seeing the code I can bundle it up and send it out to them (still a long way from finished mind). The draft version of it is up and running here: http://openconcept.ca/WLP/biblio/index.php3 I'm running into a couple problems though that I don't have the logic language for and I was hoping folks here could help me (as you have done in the past). The problem is that I've set up a many to many table to ensure that I can have an author be listed as writing many books and a book be written by many authors. However in listing the books as a bibliography (as the URL above), I want to be able to list multiple authors, and do so in a different format for the first author than for all subsequent ones. I'm hoping to be able to produce output like this: Young, D. and N. Dixon. Helping Leaders Take Effective Action: A Program Evaluation. Greensboro, North Carolina: Center for Creative Leadership, 1996. So, I think the first challenge should be to calculate which books have multiple authors by doing something like this (It's using phplib structures, sorry): $q2 = SELECT * FROM WLPbib2profile ORDER BY bibID; $this-db-query($q2); // Performs above query while ($this-db-next_record()) { if ($this-db-Record[bibID] != $last_bibID) { echo br . $this-db-Record[bibID] . : . $this-db-Record[profileID]; } else { // Multiple Authors echo , . $this-db-Record[profileID]; $multiple_profileID .= array ($this-db-Record[bibID] = $this-db-Record[profileID]); $multiple_profileID .= array($this-db-Record[bibID] = yes); } $last_bibID = $this-db-Record[bibID]; } } With this I can then use the value $multiple_profileID to determine if this record has duplicates or not and use something like this to include both authors and not repeat the bibliography item: if ($multiple_profileID[$bibID]==yes) { while (list($key, $val) = each($multiple_profileID)) { $written_by = $key . : . $val . br; if ($this-db-Record[firstName]) { $written_by .= stripslashes($this-db-Record[firstName]) . ; } if($this-db-Record[lastName]) { $written_by .= stripslashes($this-db-Record[lastName]); } } } else { if($this-db-Record[lastName]) { $written_by .= stripslashes($this-db-Record[lastName]) . , ; } if ($this-db-Record[firstName]) { $written_by .= stripslashes($this-db-Record[firstName]); } } But this seems really awkward (at the best of times) and (worst of all) it isn't working. I've got another related problem in that I've set up the following fields in one table: firstName lastName organization and I need to be able to order them by a combination of lastName organization. I could list the organization field simply as the lastName, but that seems like it would be confusing the data types... Must be a way around this.. I suspect it is limited by my logic not PHP's. Any ideas would be appreciated. Mike -- Mike Gifford, OpenConcept Consulting, http://openconcept.ca Offering everything your organization needs for an effective web site. Abolish Nuclear Weapons Now!: http://pgs.ca/petition/ It is a miracle that curiosity survives formal education. - A Einstein -- 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: Zipping Output Before Sending To Browser
yup. what you need is ob_start(ob_gzhandler); at the beginning of the bit you want to compress, usually at the top of the script and //ob_end_flush(); to send the output to the browser. bit of a time lag as the browser decompresses but should save you a bomb on bandwidth. check out the php manual for the full descriptions. Steev Corin Rathbone [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I read a while ago somewhere that is possible in PHP to zip or gzip or just compress the output of a PHP file before sending it to a browser. Apparently the browser can then uncompress this and output the finished page. This would be very useful as one of my scripts outputs about 1.5Mb of data. Does anybody know how to do this? Any help most appreciated. Regards, Corin Rathbone [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] Prevent user to close web browser
have a javascript function that is fired when you load the index page. i have a calendar system that i wrote at work that is displayed in a window with most of the features turned off like toolbars etc. have a look at 'on load' and window properties. it's a doddle. and no i didn't find it on a porn site. ;-) Steve Slavomir Slizik [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... So, try to surf some free erotic,porn sites. They're full of that window-spawing stuff :( slavko On Thu, 19 Jul 2001, kath wrote: Not with PHP. Maybe some Javascript could. But why would you want this? Planning some infinite spawning pop up website? =) - k On Thursday 19 July 2001 08:28 am, you wrote: Hello, I need to prevent user to close the web browser on close button or by pressing ALT+F4. Is this possible? Thanks, Mihailo. _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.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] -- 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: Sessions + Variables + includes
great minds and all that this is some code i use but i have a login page that takes the username and passowrd and passes that to another page that does the verification. so: page 1 takes the username and password. page 2 registers session vars and sets logged in to true if accepted. every page from then on has this include file ?php session_start(); if ($loggedin != true) { echo'headmeta HTTP-EQUIV=Refresh CONTENT=0;URL=login.php/head'; session_destroy(); exit; } i use the meta http=equiv to direct them to the index page of the site if they are verified. Steve Dosenbrei [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi Sorry for my bad english ;-) I'm writing an application using php and sessions. In the first include file i'm writing something like this session_start(); session_register(loggedin); The i have another include file with the functions. When i'm submitting the username and passwort to the function which checks them i'd like to set loggedin to 1 how does this work? function CheckLogin($username,$password) { if($username=='test' $password=='user') { $loggedin=1; header(location:secretpage.php); } else { $loggedin =0; header(location:login.php) } Can i user include with sessions or doe i have to use requiere? I also tried to set the $loggedin to 1 this way: $HTTP_SESSION_VARS[loggedin]=1; This doesn't work too. Please help me THX -- 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: Basic database questions.
Seb Frost [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi everyone, this is my first ever post on the list so please be gentle with me ;-) OK I want to put a database on my website. Up until yesterday my knowledge of databases was having created a very simple one when I was about 15 for GCSE IT. Don't ask how, but I've always avoided them, learning c++ and all the rest of it instead. SO, I'm pretty computer literate, but know nothing about databases. SO I'm told I should use PHP and MySQL. Been learning PHP for the last day or so, seems easy enough (so far!) But I'm confused. 1) Is MySQL just a set of instructions for querying a database or is it an actual format for storing a database. Somehting I read suggested that MySQL should be used to access Acess DB's - wtf? mysql is a database management system that is relational to a certain extent (no flames). php has an abstraction layer that allows php to interface directly with mysql (and other 'better' databases such as postgresql) via a port (5432 in the case of postgresql). drop access from your mind altogether. you simply don't need to use it if you use mysql. 2) OK so I can see how the mysql instructions will get data from a database but how do I create the little bastard in the first place? SHOULD I be using something like access? It makes no sense to me! get mysql and install it. then get a front end editor like mysql-front or pg_admin for mysql. you can either use the front end to create your database or do it via the command line using SQL. Sorry for the dumb questions, but I need soem dumb answers! It seems everything about MySQL on the web is directed at people who have used databases extensively. to be hones that's true to a certain extent but i always thought of mysql being the access of open source dbs (just to cnfuse you further!!!) but it certainly isn't the case. not as robust as postgresql for 100's of concurrent users but feature rich and easy to use. time to jump off the micro$oft bandwaggon - you'll never look back !! Steve thanks everyone, - seb -- 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: Session problems
id' resgister the session var first then change / set it. don't actually know if it makes a diff Steve Bernie Kruger [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I use this simple session script below, but the session variables are not carried over from 1.php to 2.php. What can be wrong? I can see on the server that the files are created. When I open 1.php a 1K file is created on the server and the contents (my_session_variable|s:10:some value;). When I open 2.php afterwards a 0K file is created on the server which is empty. I use IIS5, Win2k, PHP 4.0.5, IE5.5. Session method: files (1.php) ?php session_start(); $my_session_variable = some value; session_register(my_session_variable); ? and (2.php) ?php session_start(); print Value of 'my_session_variable': $my_session_variable; ? Tx BK -- 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: Session problems
another thing you could try is find out where the php session data is stored and see if the session files are there - i think on win2k they are in c:\php\sessiondata ... Steve Bernie Kruger [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I use this simple session script below, but the session variables are not carried over from 1.php to 2.php. What can be wrong? I can see on the server that the files are created. When I open 1.php a 1K file is created on the server and the contents (my_session_variable|s:10:some value;). When I open 2.php afterwards a 0K file is created on the server which is empty. I use IIS5, Win2k, PHP 4.0.5, IE5.5. Session method: files (1.php) ?php session_start(); $my_session_variable = some value; session_register(my_session_variable); ? and (2.php) ?php session_start(); print Value of 'my_session_variable': $my_session_variable; ? Tx BK -- 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: Basic database questions.
i meant for writing your code etc and testing. i generally write stuff on my windows machine and then ftp them to the production server after i've tested/debugges them etc. Steve Seb Frost [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Im using win2k, but I have no intetntion of serving a webpage off of it, I only have a 56k modem! I'll be running the website off of an ISP. Do I still need to install IIS and stuff? What for? - seb -Original Message- From: Steve Brett [mailto:[EMAIL PROTECTED]] Sent: 19 July 2001 15:33 To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Basic database questions. you can get mysql font from http://www.anse.de/mysqlfront/ be sure to install mysql first though. if you're using windows 2000 then get php from http://www.php.net and install after installing IIS5 then install mysql front. the nice thing about it is the installers are superb and you can get away with installing the three progs and off you go. let me know if you need any further help. Steve Seb Frost [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Thanks Steve that's exactly the kind of 100% definate answers I needed :-) Hadn't seen nor heard of front ends for it, will look into them! - seb -Original Message----- From: Steve Brett [mailto:[EMAIL PROTECTED]] Sent: 19 July 2001 14:27 To: [EMAIL PROTECTED] Subject: [PHP] Re: Basic database questions. Seb Frost [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi everyone, this is my first ever post on the list so please be gentle with me ;-) OK I want to put a database on my website. Up until yesterday my knowledge of databases was having created a very simple one when I was about 15 for GCSE IT. Don't ask how, but I've always avoided them, learning c++ and all the rest of it instead. SO, I'm pretty computer literate, but know nothing about databases. SO I'm told I should use PHP and MySQL. Been learning PHP for the last day or so, seems easy enough (so far!) But I'm confused. 1) Is MySQL just a set of instructions for querying a database or is it an actual format for storing a database. Somehting I read suggested that MySQL should be used to access Acess DB's - wtf? mysql is a database management system that is relational to a certain extent (no flames). php has an abstraction layer that allows php to interface directly with mysql (and other 'better' databases such as postgresql) via a port (5432 in the case of postgresql). drop access from your mind altogether. you simply don't need to use it if you use mysql. 2) OK so I can see how the mysql instructions will get data from a database but how do I create the little bastard in the first place? SHOULD I be using something like access? It makes no sense to me! get mysql and install it. then get a front end editor like mysql-front or pg_admin for mysql. you can either use the front end to create your database or do it via the command line using SQL. Sorry for the dumb questions, but I need soem dumb answers! It seems everything about MySQL on the web is directed at people who have used databases extensively. to be hones that's true to a certain extent but i always thought of mysql being the access of open source dbs (just to cnfuse you further!!!) but it certainly isn't the case. not as robust as postgresql for 100's of concurrent users but feature rich and easy to use. time to jump off the micro$oft bandwaggon - you'll never look back !! Steve thanks everyone, - seb -- 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 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: Session problems
you only need to register vars with the session once. Steve Rudolf Visagie [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi Bernie, Do a session_register in the second script as well: ?php session_start(); session_register(my_session_variable); print Value of 'my_session_variable': $my_session_variable; ? Rudolf Visagie -Original Message- From: Bernie Kruger [mailto:[EMAIL PROTECTED]] Sent: 19 July 2001 04:55 To: [EMAIL PROTECTED] Subject: [PHP] Re: Session problems Tried everything all of you suggested, still no luck :-( BK Bernie Kruger [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I use this simple session script below, but the session variables are not carried over from 1.php to 2.php. What can be wrong? I can see on the server that the files are created. When I open 1.php a 1K file is created on the server and the contents (my_session_variable|s:10:some value;). When I open 2.php afterwards a 0K file is created on the server which is empty. I use IIS5, Win2k, PHP 4.0.5, IE5.5. Session method: files (1.php) ?php session_start(); $my_session_variable = some value; session_register(my_session_variable); ? and (2.php) ?php session_start(); print Value of 'my_session_variable': $my_session_variable; ? Tx BK -- 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] Re: mail() help
as afr as i know it's a recompile with a path to sendmail ... great when it works though ! Steve Patrick W. Rateliff [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am getting this error when using the trying to use the mail function. Any insite will help, I have been up for too long working on a few projects and my brain is damn near melted. mail() is not supported in this PHP build in so when I built PHP 4.06 I am assuming I missed a option, but just want to make sure before i head back and re-do things. Is there a simple option to turn on the mail support. -- 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: echo vs printf
don't echo and printf do different jobs ? as i understand it echo will dump anything to screen, fprint will accept formatted text args like you owe me %d dollars,$owed_amount) or something like that. i kind of use print by itself (harking back to the old days of basic etc) but use echo quite a lot. only use printf when i have to put cash amounts in and stuff like that. Steve Brother [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Why should I use printf instead of echo and vice versa? As for today I use printf mostly but I don't know why. brother Mail: [EMAIL PROTECTED] UIN: 4722160 Web: http://motd.st -- 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: string search
have a look at ereg() (regular expression match) functions in manual. they'll do exactly what you want. Steve Joseph Bannon [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I need a search function (if statement) that performs a search on a string and if the string contains something like aol.com, performs another function. Can anyone help me? Thanks. Joseph -- 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] escape char hell
hi, i've got myself into a bit of a mess. i have a database with approx 4000 records (mysql) and when i populated the database i was given 4000 text files with the product name as the file name and the description of the product as the contents. so i set up a text field in the table to hold the descriptions and wrote a script in php to handle the import. all went well, client impressed etc, but now i'm running into problems with allsorts of escape chars in the description field and am looking for a script that will strip the escape chars from the database ... anyone had similar problems ? new records added to the db now have all html chars translated on input and translated on query. many thanks, Steve -- 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: escape char hell
sorry posted to wrong group Steve Steve Brett [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi, i've got myself into a bit of a mess. i have a database with approx 4000 records (mysql) and when i populated the database i was given 4000 text files with the product name as the file name and the description of the product as the contents. so i set up a text field in the table to hold the descriptions and wrote a script in php to handle the import. all went well, client impressed etc, but now i'm running into problems with allsorts of escape chars in the description field and am looking for a script that will strip the escape chars from the database ... anyone had similar problems ? new records added to the db now have all html chars translated on input and translated on query. many thanks, Steve -- 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] echo vs printf
i seem to remember reading somewhere that print acts like (is) a function, presumably returning false if it cannot print to screen, whereas echo just dumps it. also you can drop vars in print like print you have $points points; whereas to echo it you'd have to concatenate the string. Steve Don Read [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On 16-Jul-01 brother wrote: Why should I use printf instead of echo and vice versa? printf print-formated $a=12.3456; echo $a, 'BR'; printf('%1.2fBR', $a); 12.3456BR 12.34BR As for today I use printf mostly but I don't know why. You prolly mean print; There may be some minor differences from echo, but i've never seen 'em. (i think they threw print in PHP to keep JAPHs happy). Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- 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] Alternative to phpMyAdmin
if you install mysql on a windoze machine then you can administer ANY mysql database going through the socket. i do it all the time. Steve -Original Message- From: Alexander Skwar [mailto:[EMAIL PROTECTED]] Sent: 12 July 2001 19:15 To: Matthew Loff Cc: 'Steve Brett'; 'Steph'; [EMAIL PROTECTED] Subject: Re: [PHP] Alternative to phpMyAdmin So sprach »Matthew Loff« am 2001-07-12 um 14:07:16 -0400 : I second that recommendation-- MySQL-Front is downright excellent! http://www.mysqlfront.de/ Well, but how is that going to work, if Steph wants to manage his databases on his providers server? Besides, mysqlfront is a Windows program... Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 23 hours 13 minutes -- 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] Alternative to phpMyAdmin
i'm sorry but i seem to be completely missing your point. mysql accepts incoming requests on a specific socket (can't remember which one, but postgresql is 5432) and therefore where you are is not an issue. i administer databases via a modem connection that sit on servers somewhere in the states. i install mysql and php in windows and then develop at home, then i update the live db throught mysql-front. Steve -Original Message- From: Alexander Skwar [mailto:[EMAIL PROTECTED]] Sent: 13 July 2001 10:15 To: Steve Brett; Alexander Skwar; Matthew Loff; Steve Brett; 'Steph'; [EMAIL PROTECTED] Subject: RE: [PHP] Alternative to phpMyAdmin if you install mysql on a windoze machine then you can administer ANY mysql database going through the socket. Okay, for a development this may be fine, but I still fail to see how a tool that runs on your own computer (no matter if it's a Windows tool, or a Linux tool) can help you administer databases which are not on the same computer (unless the mysql database on the providers server can be contacted from any machine and not just from localhost). -- Homepage:http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen -- 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] Alternative to phpMyAdmin
-Original Message- From: Alexander Skwar [mailto:[EMAIL PROTECTED]] Sent: 13 July 2001 10:57 To: Steve Brett; Alexander Skwar; Steve Brett; Matthew Loff; Steve Brett; 'Steph'; [EMAIL PROTECTED] Subject: RE: [PHP] Alternative to phpMyAdmin i'm sorry but i seem to be completely missing your point. mysql accepts incoming requests on a specific socket (can't remember You mean port, don't you? i do indeed. gess who's psending most of his time at the minute socket programming :-) one, but postgresql is 5432) and therefore where you are is not an issue. Well, the issue is, that normally, connects to mysql are NOT allowed from any arbitrary host. Normally, in safe setups, network connections to mysql are not possible. And if they are, you need to specify a ip from which connects are allowed. this should be set up by your isp though so as part of a mysql package you'd get this type of access to your db's Steve -- Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Alexander Skwar [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... i'm sorry but i seem to be completely missing your point. Yeah, seems like so :) mysql accepts incoming requests on a specific socket (can't remember You mean port, don't you? one, but postgresql is 5432) and therefore where you are is not an issue. Well, the issue is, that normally, connects to mysql are NOT allowed from any arbitrary host. Normally, in safe setups, network connections to mysql are not possible. And if they are, you need to specify a ip from which connects are allowed. -- Homepage:http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen -- 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] time compare in my sql
have a look at date_format in the mysql help and pull your sate filed out as a date Steve -Original Message- From: Jack [mailto:[EMAIL PROTECTED]] Sent: 12 July 2001 21:04 To: [EMAIL PROTECTED] Subject: [PHP] time compare in my sql Hi folks I have a filed in data type time , how would I compare the value submited from the form with the value in that filed, which is in format 11:00:00 ? When I do this in query: select * from table where time = '12:00:00'; ( in order select all records that have time before noon) it keeps saying sql syntax error. What should I do? Jack [EMAIL PROTECTED] Love your enemies, it will drive them nuts -- 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] Alternative to phpMyAdmin
mysql front is by far my favourite available from mysql download section. Steve -Original Message- From: Steph [mailto:[EMAIL PROTECTED]] Sent: 12 July 2001 05:01 To: [EMAIL PROTECTED] Subject: [PHP] Alternative to phpMyAdmin Hi all! I love phpMyAdmin, just makes life so easy :) But I just moved my site, and phpMyAdmin isnt working on my server yet, so does any one have any solid alternatives that I can install?? Thanks, Steph -- 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] Oracle 8i + non perstistant database connections remaining open.
you could move to a database that supports hot backups. postgresql perhaps ? -Original Message- From: Thies C. Arntzen [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 10:40 To: Taylor, Stewart Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Oracle 8i + non perstistant database connections remaining open. On Tue, Jul 10, 2001 at 09:32:32AM +0100, Taylor, Stewart wrote: Hello, I'm using OCI8 Revision 1.96 Oracle Version 8.1 Apache Apache/1.3.11 Redhat Linux 6.2 php 4.0.2 I am connecting to my database using a non-persistant connection (ocilogin). My applications run with no problems during the day. However, at the end of the day there is about 20 database connections still open. This has caused a problem because when the database is shutdown to backup (overnight) and then restarted apache still retains the 20 connections. This means that when users begin using the applications again in the morning apache starts reusing the old connections plus creating some new ones and causes users to be intermittently logged out/refused access/random query failures etc.. The error messages logged when this happens are below: PHP Warning: failed to rollback outstanding transactions!: ORA-01012: not logged on PHP Warning: failed to rollback outstanding transactions!: ORA-24324:service handle not initialized A quick fix to this problem is to shutdown apache when the backup is run so all the connections are dropped/ Hovever, should these connections be remaining open in the first place? Has anyone got any ideas? if you only use ocilogon and _not_ ociplogon the connection will be closed at request and, and apache/php will not keep then open - believe me! please triple check your setup and report back! tc -- 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] Average of column...
$age_result = mysql_query(select AVG(age) as avgage FROM bat_rost WHERE ownerID = '$teamID'); $row = mysql_fetch_row($age_result); $average_age=$row[0]; echo Average age of .$teamID. is .$average_age; or $age_result = mysql_query(select AVG(age) as avgage FROM bat_rost WHERE ownerID = '$teamID'); $row = mysql_fetch_array($age_result); $average_age=$row[avgage]; echo Average age of .$teamID. is .$average_age; read the php manual pages on stuff like mysql_fetch_row and mysql_fetch_array etc. Steve -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 16:54 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] Average of column... This doesn't work: $age_result = mysql_query(select AVG(age) as avgage FROM bat_rost WHERE ownerID = '$teamID'); $row = mysql_fetch_object($age_result); $age=$avgage; echo Average age - .$teamID.$avgage; Neither does this: $age_result = mysql_query(select AVG(age) as avgage FROM bat_rost WHERE ownerID = '$teamID'); $res = mysql_fetch_row($age_result) $age=$res[0]; echo Average age - .$teamID.$avgage; -Original Message- From: Remo Pini [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 11:41 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] Average of column... if you do a $res = mysql_fetch_row($age_result) $res[0] will be the value of AVG(age). -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 5:27 PM To: [EMAIL PROTECTED] Subject: [PHP] Average of column... I am trying to obtain the average age for a few teams in my database. Am using the below code: $age_result = mysql_query(select AVG(age) FROM bat_rost WHERE ownerID = '$teamID'); while(($row = mysql_fetch_object($age_result))){ $age=$row-age; echo Average age - .$teamID.$age;} How can I get the average age from this? Jeff -- 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 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] Socket Madness !!!!
many thanks. i settled for fgetc and checking for a NULL (ascii 0) Steve -Original Message- From: David George [mailto:[EMAIL PROTECTED]] Sent: 05 July 2001 21:50 To: Justin Farnsworth Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Socket Madness Justin Farnsworth wrote: Steve Brett wrote: does anyone know the ascii value for EOF ? I think it is four (CTRL-D), viz: | 00 nul| 01 soh| 02 stx| 03 etx| 04 eot| 05 enq| 06 ack| 07 bel| Actually EOT is not EOF. There is no such ASCII character as EOF. It is a condition not a character. Different functions that use an EOF condition have different ways of indicating it. There are examples at: http://www.php.net/manual/en/function.fgets.php Here is a link to PHP's feof function: http://www.php.net/manual/en/function.feof.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 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] Single quote
string stripslashes (string str) Returns a string with backslashes stripped off. (\' becomes ' and so on.) Double backslashes are made into a single backslash. Steve -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: 06 July 2001 10:29 To: [EMAIL PROTECTED] Subject: [PHP] Single quote I got a data file containing this line: $ 1'000'000.- Then I read and echo this line $fp = fopen ( $sFilename,r); $sData = fgets ( $fp, 1000 ) ) echo $sData Now what came out is $ 1\'000\'000.- I tried to get rid of these slashes with ereg_replace( \\', ', $sData ); but I had no luck. Who can help? 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] -- 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] Socket Madness !!!!
Hi, I need to set up a sockets connection to a server that was written in Delphi. Using the following code I can connect to the socket and send a message through it but don't get a reply back ... { echo Socket opened ok ... sending messagebr; $message=sprintf(Steve%c Hello world,255); fputs($socket,$message); echo fgets($socket, 255); fclose($socket); } the socket is opened using fsockopen() and the message get there but i only get the reply when the remote socket server is closed ... can anyone help ? thanks in advance Steve Brett Internal Development tel: 3263 EMIS Ltd. Privileged and /or Confidential information may be contained in this message. If you are not the original addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, please delete this message, and notify us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my firm or employer unless otherwise indicated by an authorised representative independently of this message. Egton Medical Information Systems Limited. Registered in England. No 2117205. Registered Office: Park House Mews, 77 Back Lane, Off Broadway, Horsforth, Leeds, LS18 4RF -- 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] Socket Madness !!!!
fixed it now by adding ascii(10) to reply from server BUT what if i use fgetc ? does anyone know the ascii value for EOF ? cheers, Steve -Original Message- From: Steve Brett [mailto:[EMAIL PROTECTED]] Sent: 05 July 2001 12:58 To: Php-General (E-mail) Subject: [PHP] Socket Madness Hi, I need to set up a sockets connection to a server that was written in Delphi. Using the following code I can connect to the socket and send a message through it but don't get a reply back ... { echo Socket opened ok ... sending messagebr; $message=sprintf(Steve%c Hello world,255); fputs($socket,$message); echo fgets($socket, 255); fclose($socket); } the socket is opened using fsockopen() and the message get there but i only get the reply when the remote socket server is closed ... can anyone help ? thanks in advance Steve Brett Internal Development tel: 3263 EMIS Ltd. Privileged and /or Confidential information may be contained in this message. If you are not the original addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, please delete this message, and notify us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my firm or employer unless otherwise indicated by an authorised representative independently of this message. Egton Medical Information Systems Limited. Registered in England. No 2117205. Registered Office: Park House Mews, 77 Back Lane, Off Broadway, Horsforth, Leeds, LS18 4RF -- 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] session troubles
your session_start() has to be the first thing in the page. no blank lines etc. like ?php session_start(); include(db.inc); include(classes/user-class.inc); session_register(user); ? right at the top of your page. a blank line will send header info ... Steve -Original Message- From: Brad Wright [mailto:[EMAIL PROTECTED]] Sent: 05 July 2001 16:21 To: [EMAIL PROTECTED] Subject: [PHP] session troubles Hi all, Im new to this mailing list so im not sure what to expect from 'y'all' but i'm hoping this will be the beginning of a long and beautiful friendship. My question: i have a series of PHP4 pages that if I start a session (session_start()) on the first page (adminLogin.php), all is fine and dandy...all the session_resources get passed to the next page (login2.php) and i can get acccess to those session resources. Te problem is, at the top of the page a warning message is displayed: Warning: Cannot send session cache limiter - headers already sent (output started at /home/e-smith/files/ibays/test/html/login2.php:1) in /home/e-smith/files/ibays/test/html/login2.php on line 1 What does this mean?? If i comment out the session_start() line, i dodnt get this message BUT i also dont get the session variuables i need. Hope Im making some sense, Hope someone can help. Thanks, Brad -- 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] file deletions ....
hi, i need to delete files in my web folder so i can 'tidy' them up. i have a username and password that has ftp access and so far i've tried system(), unlink() and setting up an ftp connection (they use php 4.03 whihc seems to have ftp access closed). i have no problem listing the files i want to delete but seem unable to delete them. can anyone help ? Steve -- 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] file deletions ....
""Phil Driscoll"" [EMAIL PROTECTED] wrote in message 001201c0b768$60da60a0$0c81@philsntserver">news:001201c0b768$60da60a0$0c81@philsntserver... Steve unlink works fine for me (on my nt boxes) providing the anonymous web user has permission to delete the files. Note that under IIS and possibly PWS, i think that may be the problem. the site is on a server on an ISP and the web user does not have permission to delete the files. i was hoping to use ftp_connect but don't think that's suported either ... maybe sudo via system() would work the damn server keeps files open for a few minutes after it has served them up, and consequently nobody can delete or modify the files during this period. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- 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] php sessions and classes
hi, i'm busily rewriting an exisitng calendar system that is in use at work. we're using UML as a design tool and hope to have an OO version of the system we have at the minute that wil 'fit in' with future devs. our system at the moment makes heavy use of postgresql and i am hoping to populate various object from the data in the db. our system also relies on session for passing data between pages and the site as a whole. what i need to know is this in a kind of yes or no fashion: will php allow me to create a class and then have access to the class from other pages and scripts ? Steve -- 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]