[PHP] Re: php-general =?unknown?b?zOG5qUNETUHO3s/fuau7sLL6xrc=?=
ÄãºÃ! Unknown command - ÄúÃ!. Try HELP. ÎÒ¹«Ë¾ÌṩCDMAÎÞÏß¹«»°²úÆ·,²úÆ·°üÀ¨CDMAת½ÓºÐ/CDMAÉÌÎñµç»°,ÓÐÒÔÏÂ4ÖÖ·þÎñ Unknown command - ÎÒ¹«Ë¾ÌÁ¹©CDMAÎÞÏß¹«»°²ÚÆ·,²ÚÆ·°ÜÀ¨CDMAת½ÓºÐ. Try HELP. ·½Ê½: Unknown command - ·½Ê½:. Try HELP. (1)Ö±½ÓÏúÊÛÎÒ¹«Ë¾Æ·ÅƵÄCDMAÎÞÏß¹«»°²úÆ·. Unknown command - (1)Ö±½ÓÏÚÊÛÎÒ¹«Ë¾Æ·ÅƵÄCDMAÎÞÏß¹«»°²ÚÆ·.. Try HELP. (2)ÌṩOEM»òODM·þÎñ. Unknown command - (2)ÌÁ¹©OEM»ÒODM·ÞÎÑ.. Try HELP. (3)ÌṩºËÐÄCDMAÄ£¿é¼°ÎÞÏß¹«»°È«ÌײúÆ·µÄ½â¾ö·½°¸/µç·ͼ. Unknown command - (3)ÌÁ¹©ºËÐÄCDMAÄ£¿É¼°ÎÞÏß¹«»°È«ÌײÚÆ·µÄ½Â¾Ö·½°¸. Try HELP. (4)ÌṩÆäËûCDMAÎÞÏßÓ¦ÓÃ(CDMAIC¿¨µç»°/ÎÞÏß²ÊƱ»ú/ÎÞÏßPOS»ú)µÄCDMAÓ¦Óýâ¾ö Unknown command - (4)ÌÁ¹©ÆÄËÛCDMAÎÞÏßÓ¦ÓÃ. Try HELP. ·½°¸. Unknown command - ·½°¸.. Try HELP. ²úÆ·×ÊÁϼ°ÏêϸÐÅÏ¢,ÇëÀ´µç×Éѯ. Unknown command - ²ÚÆ·×ÊÁϼ°ÏÊϸÐÅÏ¢,ÇËÀ´µÇ×Éѯ.. Try HELP. µç»°:13305829981 E-mail:[EMAIL PROTECTED] Unknown command - µÇ»°:13305829981. Try HELP. All subsequent commands have been flushed. Summary of resource utilization --- CPU time:0.010 sec Overhead CPU:0.000 sec CPU model: sun4u Job origin: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error 1045
ike strong wrote: I don't know if this is the right place to ask this, This is not the right place to ask this. Ask on a MySQL mailing list. This is php. but can anyone help me to figure out why each time I try to access my database using: c:\mysql\bin\inmysql -root -p In windows -- unless you specifically create a user, you don't need to pass a user. c:\mysql\bin\mysql will launch you as root. -u username is the syntax you want to use if you want to login as a particular user. and afterwards:(i.e. after the password prompt) Enter Password: '**' I get the following: Error 1045: Access denied foruser: '[EMAIL PROTECTED]'(Using password: YES) Obviously the system thinks your are ODBC. If you haven't done so already, run winmysqladmin and check your system. Use the -u command line option to specify a user. There is no such option as -root Next time, ask on the MySQL list. -- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com --- Documentation is like sex: when it is good, it is very, very good; and when it is bad, it is better than nothing. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Running PHP for different virtual domains on different Apaches
Philip Mak wrote: Something that I wrote recently that I thought may be of general interest for system administrators running PHP: The web server runs on port 80, with the priviledges of the username apache. On most webhosts that support PHP, this web server executes the PHP scripts. The PHP scripts would thus all run under the same username. Problem #1 is that a single web server generally services multiple websites. Under the common setup, all of their PHP scripts will run under the common apache username. This is a security flaw, because a programmer for a website would be able to read the PHP scripts of any other website, and probably also gain access to any databases or files that those scripts make use of. Most webhosts probably get away with this since one can only exploit this if they have an account on the server, can only attack other websites on the server, and most people aren't skilled/devious enough to do this. check out php_admin_value open_basedir, should solve this. allows you to specify what directory's a php script can read from. Problem #2 is that the use of PHP makes each Apache process consume more memory. The process consumes more memory even when it is serving static (non-PHP) files such as a JPG. It would be more efficient to have a pool of small processes serving static files, and some larger processes serving the PHP scripts. can't think of any other way to solve this problem than what you've done. So on my server, the main web server on port 80 does not run PHP. Rather, the client has a private PHP-enabled Apache that listens on localhost port 8024. This private Apache runs under the priviledges of the client's UNIX account, and only serves pages from the client's domain. Whenever the main Apache receives a request that requires PHP to service(*), it will proxy the request to the PHP-enabled Apache. This solves problems #1 and #2 above. However, (*) is a bit problematic. Consider the following URLs: (a) http://www.domain.org/page.php (b) http://www.domain.org/page.html (c) http://www.domain.org/image.jpg (d) http://www.domain.org/ (a) should obviously be proxied, since it ends in .php and thus must be a PHP script. (b) and (c) have obvious static file extensions, so should not be proxied. But what about (d)? It could be either index.php or index.html, but this can't be determined just from pattern matching on the URL. I came up with a recipe in httpd.conf to account for case (d): In the case of a request to a directory, it will proxy if and only if index.php exists. RewriteEngine On # Proxy any request to *.php RewriteRule (.*)\.php$ http://127.0.0.1:8024$1.php [l,p] # Proxy any request to a directory if index.php exists RewriteCond %{REQUEST_URI} /$ RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME}index.php -f RewriteRule (.*) http://127.0.0.1:8024$1 [l,p] where http://127.0.0.1:8024 is the address to the backend PHP. %{DOCUMENT_ROOT} could be replaced with another directory path, if the PHP scripts are kept in a separate directory tree. Note that the RewriteCond -f means that the apache user will need to be able to list the files in the directory (but does not need read access to the files themselves). If more security is needed, the PHP files could be kept in a separate tree (configured as the DocumentRoot on the private Apache), and: RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME}index.php -f could be replaced with a directive that determines whether the frontend Apache can handle the indexing for the directory (e.g. if index.html exists, or index.shtml, etc.), and not proxy if that is the case, and proxy otherwise. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Based Web Hosting Management
I am looking for a reasonable free Web Host Management System that is mainly based in PHP(so I can modify it a bit to my liking) I have used WebCP(webcp.can-host.com) but it is too buggy to be worth fixing. All suggestions welcome. _ Nigel Jones [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Running PHP for different virtual domains on different Apaches
Tim Garton wrote: Problem #2 is that the use of PHP makes each Apache process consume more memory. The process consumes more memory even when it is serving static (non-PHP) files such as a JPG. It would be more efficient to have a pool of small processes serving static files, and some larger processes serving the PHP scripts. can't think of any other way to solve this problem than what you've done. I don't think his solution really worked, in fact it makes the problem worse. Compared to a single pool of larger processes serving the PHP scripts, there is also a pool of small apache processes that serve static content with the overhead of proxying requests to php scripts to the other server. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] passthru gives error in httpd/error_log
Then there must be some kind of restriction on the server, Is it running in chrooot enviroment. Try copying ls to a directory in the server root and try again. -- regards, Tom I've tried that too, with ls and other programs in the local directory where the script was located. And with permissions set to 777. Even on the dir. No go. Still the same error log message : sh: /ls: No such file or directory. Specifying a specific path will give, for instance : sh: /bin/ls: No such file or directory. This seems impossible, as the file is clearly there, but I can't find any more info on this message. /Jesper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Execute programs
How do i execute a program and leave it running and while it is running the php-script is still continued and outputs HTML when the other program is still running. I need that is works on windows. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Execute programs
Bas wrote: How do i execute a program and leave it running and while it is running the php-script is still continued and outputs HTML when the other program is still running. I need that is works on windows. Oh, ohmanual http://www.php.net/manual/en/ref.exec.php -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Execute programs
John Nichel [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Bas wrote: How do i execute a program and leave it running and while it is running the php-script is still continued and outputs HTML when the other program is still running. I need that is works on windows. Oh, ohmanual http://www.php.net/manual/en/ref.exec.php -- By-Tor.com It's all about the Rush http://www.by-tor.com I've read the manual, but it says this: Note: If you start a program using this function and want to leave it running in the background, you have to make sure that the output of that program is redirected to a file or some other output stream or else PHP will hang until the execution of the program ends. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Execute programs
Bas wrote: John Nichel [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Bas wrote: How do i execute a program and leave it running and while it is running the php-script is still continued and outputs HTML when the other program is still running. I need that is works on windows. Oh, ohmanual http://www.php.net/manual/en/ref.exec.php I've read the manual, but it says this: Note: If you start a program using this function and want to leave it running in the background, you have to make sure that the output of that program is redirected to a file or some other output stream or else PHP will hang until the execution of the program ends. Okay, so what's wrong with that? -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 22 Nov 2003 14:28:50 -0000 Issue 2430
php-general Digest 22 Nov 2003 14:28:50 - Issue 2430 Topics (messages 170644 through 170667): Re: looking for some software (helpdesk, intranet) 170644 by: Tim Garton 170653 by: Jason Wong Re: question about security 170645 by: Chris W. Parker 170647 by: John W. Holmes Re: Echo HTML code Verses breaking out of ?php ? 170646 by: DvDmanDT Re: echo or print 170648 by: Tom Rogers 170651 by: Eugene Lee 170654 by: Jon Kriek 170656 by: Curt Zirzow 170657 by: Robert Cummings Re: [ERR] RE: [PHP] tar and ownership 170649 by: John Nichel Re: passthru gives error in httpd/error_log 170650 by: Tom Rogers 170663 by: Jesper Hansen Running PHP for different virtual domains on different Apaches 170652 by: Philip Mak 170660 by: Tim Garton 170662 by: Marek Kilimajer Re: Function disabled. 170655 by: Pedro Faria Re: php-general ÌṩCDMAÎÞÏß¹«»°²úÆ· 170658 by: L-Soft list server at LISTS.NAU.EDU (1.8d) Re: Error 1045 170659 by: Burhan Khalid PHP Based Web Hosting Management 170661 by: Nigel Jones Execute programs 170664 by: Bas 170665 by: John Nichel 170666 by: Bas 170667 by: John Nichel 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] -- ---BeginMessage--- RT can be difficult to install, and uses perl rather than php, just fyi. if you do decide to go with it, when i set it up on a redhat 9 box i had to reinstall perl from source due to a bug in the stock perl shipped with rh 9. tim Gabriel Guzman wrote: On Friday 21 November 2003 04:01 pm, Richard Baskett wrote: on 11/21/03 15:49, Chris W. Parker at [EMAIL PROTECTED] wrote: I'm looking for some helpdesk software and some intranet software with a MySQL backend. RT... http://bestpractical.com/ gabe. ---End Message--- ---BeginMessage--- On Saturday 22 November 2003 07:49, Chris W. Parker wrote: I just googled, freshmeated, and sourceforged but didn't find anything good (or what I thought to be good that was free). I'm looking for some helpdesk software and some intranet software with a MySQL backend. Anyone have any suggestions? 1) State what exactly you're looking for -- what features are must-have, what are nice-to-have etc. 2) State what packages you have already looked at. Give a short evaluation of each with what you like and dislike about them. Based on this people can then give an *informed* opinion. This way people will not point you to packages that you've already tried and did not like, or packages that do not have the features that you require. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* You're using a keyboard! How quaint! */ ---End Message--- ---BeginMessage--- Alan Fullmer mailto:[EMAIL PROTECTED] on Friday, November 21, 2003 5:00 PM said: do i have to htmlspecialchars every entry? Yes you have to protect yourself from your users data each and every time you receive user data, ever, always. does this make any sense? I think so. Chris. -- Don't like reformatting your Outlook replies? Now there's relief! http://home.in.tum.de/~jain/software/outlook-quotefix/ ---End Message--- ---BeginMessage--- Alan Fullmer wrote: Is php capable of recognizing things such as in a text box, someone were to put ?php insert php code here; ? and display say, variables? No, not normally. If you just display the code, it'll show as plain PHP code and not be run. However, if it makes its way into an include file or eval() call, then it could be evaluated. do i have to htmlspecialchars every entry? Depends on your program. For most text, yes. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com ---End Message--- ---BeginMessage--- ?HTML? is almost double as fast according to some stats I saw a while ago (at phpbeginner.com).. But that's compared to HTML, using singlequotes is faster ('HTML')... But I haven't confirmed those stats... -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com ## Please, if you are using windows, you may be infected by Swen. Please go here to find out more: http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED] ## Joe Harman [EMAIL PROTECTED] skrev i meddelandet
[PHP] An Application Server in PHP
Hi guys, some times ago I started a project called PHPlet with this purpose: implement an application server where phplet can be deployed. phplet are just like Java servlets, they have init(), destroy() and service() methods; they run into the phplet container, from which they receive an HttpPhpletRequest and send an HttpPhpletResponse. API for all these class are similar to java one. I've developed a lot of modules yet, the daemon works both in sigle process (win32, Linux) multiprocess mode (on Linux). The project can be found here: http://phplet.sourceforge.net . I'm writing here to have some feedback from PHP lovers; what do you think about this idea? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Textfields dont fully populate
Hello again guys This week i have been on here and made a few posts regarding a small admin site app http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html Most of it is now working thank god, but still have have problems fully populating the textfields when i go to edit a record. Only one of the fields fully populates with the data returned from the $query If i view the source file via the broswer(right click / view source) i can see that the data has been sent ok input type='text' name='format' size=25 maxlength=25 value=cd format But all i see is cd Anyone cheers Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Textfields dont fully populate
Paul Ferrie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello again guys This week i have been on here and made a few posts regarding a small admin site app http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html Most of it is now working thank god, but still have have problems fully populating the textfields when i go to edit a record. Only one of the fields fully populates with the data returned from the $query If i view the source file via the broswer(right click / view source) i can see that the data has been sent ok input type='text' name='format' size=25 maxlength=25 value=cd format But all i see is cd Anyone cheers Paul Try to do it in double quotes(the query-data) In an echo statement, there you must escape the double quotes. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Textfields dont fully populate
Sorry m8 i am a total newbie to php+html, I dont get these problems with PHP+Flash Here is the code i am using to return the edit page with the data. $result = mysql_query(SELECT * FROM $tablename WHERE id= $id)or die(brther was an errorbr tablename:= $tablenamebr row id:= $id); if ($myrow = mysql_fetch_array($result)) { echo form method='post' action='edit3.php?tablename=$tablename'\n; do { printf(input type='hidden' name='id' value=%s Artist brinput type='text' name='artist' size=25 maxlength=25 value=%sbr Title brinput type='text' name='title' size=25 maxlength=25 value=%sbr Picture brinput type='text' name='picture' size=25 maxlength=25 value=%sbr Review brtextarea name='review' cols=30 rows=5%s/textareabr Labelbrinput type='text' name='label' size=25 maxlength=25 value=%sbr Format brinput type='text' name='format' size=25 maxlength=25 value=%sbr Price brinput type='text' name='price' size=10 maxlength=8 value=%sbr Rating brinput type='text' name='rating' size=10 maxlength=8 value=%sbr\n, $myrow[id], $artist=$myrow[artist], $title=$myrow[title], $picture=$myrow[picture], $review=$myrow[review], $lable=$myrow[label], $format=$myrow[format], $price=$myrow[price], $rating=$myrow[rating]); } while ($myrow = mysql_fetch_array($result)); echo brinput type='submit' value='Submit' name='submit'; echo input type='reset' value='Reset' name='reset'/form\n; } Cheers Paul Bas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Paul Ferrie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello again guys This week i have been on here and made a few posts regarding a small admin site app http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html Most of it is now working thank god, but still have have problems fully populating the textfields when i go to edit a record. Only one of the fields fully populates with the data returned from the $query If i view the source file via the broswer(right click / view source) i can see that the data has been sent ok input type='text' name='format' size=25 maxlength=25 value=cd format But all i see is cd Anyone cheers Paul Try to do it in double quotes(the query-data) In an echo statement, there you must escape the double quotes. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] looking for some software (helpdesk, intranet)
At 03:49 PM 11/21/2003 -0800, Chris W. Parker wrote: I'm looking for some helpdesk software and some intranet software with a MySQL backend. I use OneOrZero's helpdesk software for a couple of sites. Here's the website: http://helpdesk.oneorzero.com/ It's not perfect, but it's free. Plus their forums have a number of hacks you can add in! -Patrick Patrick Schneider [EMAIL PROTECTED] Technical Support Specialist, RMS Treasurer, Midwest Animation Promotion Society Board of Directors External Operations Section Chief, ACEN 2k4 Director of Registration, ACEN 2k4 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Java and PHP
hi The same way that you invoke any other system binary with backticks, exec etc like this: `java javasystem -scenario`; NOTE: using java objects directly in PHP is a different kettle of fish altogether, there are some interesting articles on that topic on many web sites including phpbuilder. all the best Fredrik wrote: Hi I want to start a java system from a php script, anybody who know how i can do that. Something like this: if(isset($trigger)){ java javasystem -scenario; } Is this possible and how can i do it. -Fred -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Textfields dont fully populate
Just change your code to: $result = mysql_query(SELECT * FROM $tablename WHERE id= $id)or die(brther was an errorbr tablename:= $tablenamebr row id:= $id); if ($myrow = mysql_fetch_array($result)) { echo form method='post' action='edit3.php?tablename=$tablename'\n; do { printf(input type='hidden' name='id' value=%s Artist brinput type='text' name='artist' size=25 maxlength=25 value='%s'br Title brinput type='text' name='title' size=25 maxlength=25 value='%s'br Picture brinput type='text' name='picture' size=25 maxlength=25 value='%s'br Review brtextarea name='review' cols=30 rows=5%s/textareabr Labelbrinput type='text' name='label' size=25 maxlength=25 value='%s'br Format brinput type='text' name='format' size=25 maxlength=25 value='%s'br Price brinput type='text' name='price' size=10 maxlength=8 value='%s'br Rating brinput type='text' name='rating' size=10 maxlength=8 value='%s'br\n, $myrow[id], $artist=$myrow[artist], $title=$myrow[title], $picture=$myrow[picture], $review=$myrow[review], $lable=$myrow[label], $format=$myrow[format], $price=$myrow[price], $rating=$myrow[rating]); } while ($myrow = mysql_fetch_array($result)); echo brinput type='submit' value='Submit' name='submit'; echo input type='reset' value='Reset' name='reset'/form\n; } I have not tested this, but it should work(it was a html-problem) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Textfields dont fully populate
Thank you Bas, i cant believe that once again it has been down to simple syntx cheers Bas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] b1.pair.com... Just change your code to: $result = mysql_query(SELECT * FROM $tablename WHERE id= $id)or die(brther was an errorbr tablename:= $tablenamebr row id:= $id); if ($myrow = mysql_fetch_array($result)) { echo form method='post' action='edit3.php?tablename=$tablename'\n; do { printf(input type='hidden' name='id' value=%s Artist brinput type='text' name='artist' size=25 maxlength=25 value='%s'br Title brinput type='text' name='title' size=25 maxlength=25 value='%s'br Picture brinput type='text' name='picture' size=25 maxlength=25 value='%s'br Review brtextarea name='review' cols=30 rows=5%s/textareabr Labelbrinput type='text' name='label' size=25 maxlength=25 value='%s'br Format brinput type='text' name='format' size=25 maxlength=25 value='%s'br Price brinput type='text' name='price' size=10 maxlength=8 value='%s'br Rating brinput type='text' name='rating' size=10 maxlength=8 value='%s'br\n, $myrow[id], $artist=$myrow[artist], $title=$myrow[title], $picture=$myrow[picture], $review=$myrow[review], $lable=$myrow[label], $format=$myrow[format], $price=$myrow[price], $rating=$myrow[rating]); } while ($myrow = mysql_fetch_array($result)); echo brinput type='submit' value='Submit' name='submit'; echo input type='reset' value='Reset' name='reset'/form\n; } I have not tested this, but it should work(it was a html-problem) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Form with browse for file to upload ftp
Getting bit of a regular on here :) I am hoping that someone can point me to a script that allows me to attach a file to be uploaded to a set dir. I have already got the form built, except for a browse file option. The form is part of this admin area http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html Instead of having a textfield displaying a url of the image and the admin having to upload it sepratly i thought that i could get the admin to upload the image via the form. keeps it altogether. I wouldnt know were to begin adding this to the form. i am pretty sure there a pre-built script that can do this. Can someone point me to one. i had a quick look but came up with very little. Cheers Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form with browse for file to upload ftp
There is nothing special to be done with the form itself for it to support file uploading aside from supply a browse field: input type=file name=file As for uploading it, here's some untested code: if(!empty($_FILES['file']['tmp_name'])) { $name = strtolower(eregi_replace('#| |\?|!', '', $_FILES['file']['name'])); $destination = 'path/to/where/you/want/the/file/saved/'.$name; if(move_uploaded_file($_FILES['file']['tmp_name'], $destination)) { echo 'Successful'; } else { echo 'Failed'; } } - Original Message - From: PAUL FERRIE To: [EMAIL PROTECTED] Sent: Saturday, November 22, 2003 2:04 PM Subject: [PHP] Form with browse for file to upload ftp Getting bit of a regular on here :) I am hoping that someone can point me to a script that allows me to attach a file to be uploaded to a set dir. I have already got the form built, except for a browse file option. The form is part of this admin area http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html Instead of having a textfield displaying a url of the image and the admin having to upload it sepratly i thought that i could get the admin to upload the image via the form. keeps it altogether. I wouldnt know were to begin adding this to the form. i am pretty sure there a pre-built script that can do this. Can someone point me to one. i had a quick look but came up with very little. Cheers Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form with browse for file to upload ftp
There is nothing special to be done with the form itself for it to support file uploading aside from supply a browse field: input type=file name=file As for uploading it, here's some untested code: if(!empty($_FILES['file']['tmp_name'])) { $name = strtolower(eregi_replace('#| |\?|!', '', $_FILES['file']['name'])); $destination = 'path/to/where/you/want/the/file/saved/'.$name; if(move_uploaded_file($_FILES['file']['tmp_name'], $destination)) { echo 'Successful'; } else { echo 'Failed'; } } - Original Message - From: PAUL FERRIE To: [EMAIL PROTECTED] Sent: Saturday, November 22, 2003 2:04 PM Subject: [PHP] Form with browse for file to upload ftp Getting bit of a regular on here :) I am hoping that someone can point me to a script that allows me to attach a file to be uploaded to a set dir. I have already got the form built, except for a browse file option. The form is part of this admin area http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html Instead of having a textfield displaying a url of the image and the admin having to upload it sepratly i thought that i could get the admin to upload the image via the form. keeps it altogether. I wouldnt know were to begin adding this to the form. i am pretty sure there a pre-built script that can do this. Can someone point me to one. i had a quick look but came up with very little. Cheers Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form with browse for file to upload ftp
Oh and also, don't forget to set: enctype=multipart/form-data in the form tag. Nathan - Original Message - From: Nathan Taylor To: PAUL FERRIE ; [EMAIL PROTECTED] Sent: Saturday, November 22, 2003 2:20 PM Subject: Re: [PHP] Form with browse for file to upload ftp There is nothing special to be done with the form itself for it to support file uploading aside from supply a browse field: input type=file name=file As for uploading it, here's some untested code: if(!empty($_FILES['file']['tmp_name'])) { $name = strtolower(eregi_replace('#| |\?|!', '', $_FILES['file']['name'])); $destination = 'path/to/where/you/want/the/file/saved/'.$name; if(move_uploaded_file($_FILES['file']['tmp_name'], $destination)) { echo 'Successful'; } else { echo 'Failed'; } } - Original Message - From: PAUL FERRIE To: [EMAIL PROTECTED] Sent: Saturday, November 22, 2003 2:04 PM Subject: [PHP] Form with browse for file to upload ftp Getting bit of a regular on here :) I am hoping that someone can point me to a script that allows me to attach a file to be uploaded to a set dir. I have already got the form built, except for a browse file option. The form is part of this admin area http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html Instead of having a textfield displaying a url of the image and the admin having to upload it sepratly i thought that i could get the admin to upload the image via the form. keeps it altogether. I wouldnt know were to begin adding this to the form. i am pretty sure there a pre-built script that can do this. Can someone point me to one. i had a quick look but came up with very little. Cheers Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php ignores if statement
I recently started coding online and i have the weirdest response, my code is: ?php include 'function.inc'; echo $idbr; print (gettype($id)); if ($id = add ) { echo is add; exit; } if ($id = own ) { echo id is own; exit; } if ($id = all ) { echo id is all; exit; } ? $id in this case = own, but it totally ignores this value and uses the first if statement and treats $id as if it has a value of add. I am very frustrated and i really hope someone can help me. The server is linux, and php version 4.1.2 Thanks
Re: [PHP] Php ignores if statement
On Sat, 2003-11-22 at 13:57, Pieter wrote: I recently started coding online and i have the weirdest response, my code is: ?php include 'function.inc'; echo $idbr; print (gettype($id)); if ($id = add ) { echo is add; exit; } if ($id = own ) { echo id is own; exit; } if ($id = all ) { echo id is all; exit; } ? $id in this case = own, but it totally ignores this value and uses the first if statement and treats $id as if it has a value of add. I am very frustrated and i really hope someone can help me. The server is linux, and php version 4.1.2 Thanks Don't use = use == By using the = you are assigning $id to that value making the if statement always true. The compare one to the other use == instead -- I have a photographic memory. I just forgot the film --Unknown = Ryan Thompson [EMAIL PROTECTED] http://osgw.sourceforge.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php ignores if statement
Pieter wrote: I recently started coding online and i have the weirdest response, my code is: ?php include 'function.inc'; echo $idbr; print (gettype($id)); if ($id = add ) { echo is add; exit; } snip '=' sets value. '==' checks equality. http://www.php.net/manual/en/language.operators.comparison.php -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form with browse for file to upload ftp
I am getting this error once i run the script Warning: move_uploaded_file(img/matrix.jpg): failed to open stream: Permission denied in /blah/blah Do i need to set the chmod of the img folder? Cheers Paul Nathan Taylor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] There is nothing special to be done with the form itself for it to support file uploading aside from supply a browse field: input type=file name=file As for uploading it, here's some untested code: if(!empty($_FILES['file']['tmp_name'])) { $name = strtolower(eregi_replace('#| |\?|!', '', $_FILES['file']['name'])); $destination = 'path/to/where/you/want/the/file/saved/'.$name; if(move_uploaded_file($_FILES['file']['tmp_name'], $destination)) { echo 'Successful'; } else { echo 'Failed'; } } - Original Message - From: PAUL FERRIE To: [EMAIL PROTECTED] Sent: Saturday, November 22, 2003 2:04 PM Subject: [PHP] Form with browse for file to upload ftp Getting bit of a regular on here :) I am hoping that someone can point me to a script that allows me to attach a file to be uploaded to a set dir. I have already got the form built, except for a browse file option. The form is part of this admin area http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html Instead of having a textfield displaying a url of the image and the admin having to upload it sepratly i thought that i could get the admin to upload the image via the form. keeps it altogether. I wouldnt know were to begin adding this to the form. i am pretty sure there a pre-built script that can do this. Can someone point me to one. i had a quick look but came up with very little. Cheers Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Form with browse for file to upload ftp
User executing the script (www-data or nobody or some other user) has to vave the permission to wotk with this directory. Brona I am getting this error once i run the script Warning: move_uploaded_file(img/matrix.jpg): failed to open stream: Permission denied in /blah/blah Do i need to set the chmod of the img folder? Cheers Paul Nathan Taylor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] There is nothing special to be done with the form itself for it to support file uploading aside from supply a browse field: input type=file name=file As for uploading it, here's some untested code: if(!empty($_FILES['file']['tmp_name'])) { $name = strtolower(eregi_replace('#| |\?|!', '', $_FILES['file']['name'])); $destination = 'path/to/where/you/want/the/file/saved/'.$name; if(move_uploaded_file($_FILES['file']['tmp_name'], $destination)) { echo 'Successful'; } else { echo 'Failed'; } } - Original Message - From: PAUL FERRIE To: [EMAIL PROTECTED] Sent: Saturday, November 22, 2003 2:04 PM Subject: [PHP] Form with browse for file to upload ftp Getting bit of a regular on here :) I am hoping that someone can point me to a script that allows me to attach a file to be uploaded to a set dir. I have already got the form built, except for a browse file option. The form is part of this admin area http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html Instead of having a textfield displaying a url of the image and the admin having to upload it sepratly i thought that i could get the admin to upload the image via the form. keeps it altogether. I wouldnt know were to begin adding this to the form. i am pretty sure there a pre-built script that can do this. Can someone point me to one. i had a quick look but came up with very little. Cheers Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form with browse for file to upload ftp
eh? Bronislav kluèka [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] User executing the script (www-data or nobody or some other user) has to vave the permission to wotk with this directory. Brona I am getting this error once i run the script Warning: move_uploaded_file(img/matrix.jpg): failed to open stream: Permission denied in /blah/blah Do i need to set the chmod of the img folder? Cheers Paul Nathan Taylor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] There is nothing special to be done with the form itself for it to support file uploading aside from supply a browse field: input type=file name=file As for uploading it, here's some untested code: if(!empty($_FILES['file']['tmp_name'])) { $name = strtolower(eregi_replace('#| |\?|!', '', $_FILES['file']['name'])); $destination = 'path/to/where/you/want/the/file/saved/'.$name; if(move_uploaded_file($_FILES['file']['tmp_name'], $destination)) { echo 'Successful'; } else { echo 'Failed'; } } - Original Message - From: PAUL FERRIE To: [EMAIL PROTECTED] Sent: Saturday, November 22, 2003 2:04 PM Subject: [PHP] Form with browse for file to upload ftp Getting bit of a regular on here :) I am hoping that someone can point me to a script that allows me to attach a file to be uploaded to a set dir. I have already got the form built, except for a browse file option. The form is part of this admin area http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html Instead of having a textfield displaying a url of the image and the admin having to upload it sepratly i thought that i could get the admin to upload the image via the form. keeps it altogether. I wouldnt know were to begin adding this to the form. i am pretty sure there a pre-built script that can do this. Can someone point me to one. i had a quick look but came up with very little. Cheers Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form with browse for file to upload ftp
On Sat, Nov 22, 2003 at 08:18:30PM -, PAUL FERRIE wrote: : : Bronislav kluèka [EMAIL PROTECTED] wrote in message : news:[EMAIL PROTECTED] : : User executing the script (www-data or nobody or some other user) has to : vave the permission to wotk with this directory. : : eh? I think he meant to say: : The user executing the script (www-data or nobody or some other user) : has to have the permission to work with this directory. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form with browse for file to upload ftp
Hello, He said that you have to check under which user/group is your webserver running (webserver is handling the scripts)... and then set the correct file/directory permissions on that /blah/blah directory.. yes u have to set at least chmod but look to chown also... On Saturday 22 November 2003 21:18, PAUL FERRIE wrote: eh? Bronislav kluka [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] User executing the script (www-data or nobody or some other user) has to vave the permission to wotk with this directory. Brona I am getting this error once i run the script Warning: move_uploaded_file(img/matrix.jpg): failed to open stream: Permission denied in /blah/blah Do i need to set the chmod of the img folder? Cheers Paul -- : :. kind regards :.. Martin Hudec :.: :.: =w= http://www.aeternal.net :.: =m= +421.907.303393 :.: [EMAIL PROTECTED] [EMAIL PROTECTED] :.: :.: When you want something, all the universe :.: conspires in helping you to achieve it. :.: - The Alchemist (Paulo Coelho) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form with browse for file to upload ftp
PAUL FERRIE wrote: I am getting this error once i run the script Warning: move_uploaded_file(img/matrix.jpg): failed to open stream: Permission denied in /blah/blah Do i need to set the chmod of the img folder? Cheers Paul snip The user or group that your webserver is running as (default for Apache: nobody/nobody) has to have write permission in both the temp upload directory, and the directory that you're trying to move the file to. -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Form with browse for file to upload ftp
Got it working :) thanks for the help Paul Paul Ferrie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Getting bit of a regular on here :) I am hoping that someone can point me to a script that allows me to attach a file to be uploaded to a set dir. I have already got the form built, except for a browse file option. The form is part of this admin area http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html Instead of having a textfield displaying a url of the image and the admin having to upload it sepratly i thought that i could get the admin to upload the image via the form. keeps it altogether. I wouldnt know were to begin adding this to the form. i am pretty sure there a pre-built script that can do this. Can someone point me to one. i had a quick look but came up with very little. Cheers Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php ignores if statement
--- Pieter [EMAIL PROTECTED] wrote: I recently started coding online and i have the weirdest response, my code is: if ($id = add ) When you convert the string add to a boolean, it equates to true. I'm assuming you want to be using a conditional expression rather than an assignment statement. Either this was a typo, or you should really read a lot of introductory material on PHP's syntax, as I'm guessing this is your first programming language. Start with the PHP manual: http://www.php.net/manual/ Expressions are discussed here: http://www.php.net/manual/en/language.expressions.php PHP's conditional expressions are given as follows: -- PHP supports (bigger than), = (bigger than or equal to), == (equal), != (not equal), (smaller than) and = (smaller than or equal to). -- Hope that helps. Chris = Chris Shiflett - http://shiflett.org/ PHP Security Handbook Coming mid-2004 HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SQLITE
Hi, I've got questions: I've got sqlite like PHP module (under windows). I tried this: a)execute script 1 (selecting from some table), it tooks 2 minutes b)execute script 2 , it tooks 3 minutes c)execute them both at the same time (from different browser windows), both of them stopped also at the same time and it tooks 5 minutes I've tried another questions and both of the scripts allways stopped at the same time with duration of he sum of the time fo each process separated. This is not, of course, the behaviour I would expect... Is this some feature of sqlite or an I doing something wrong?? I've also tried the same with MySql and the result should be like 1/ first script alone - 2 minutes 2/ second script alone - 3 minutes 3/ both of them at the same time - first took 3 minutes, second took 4 minutes... Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SQLITE
--- Bronislav_Kluèka [EMAIL PROTECTED] wrote: Hi, I've got questions: I only noticed one. I've got sqlite like PHP module (under windows). I tried this: a)execute script 1 (selecting from some table), it tooks 2 minutes b)execute script 2 , it tooks 3 minutes c)execute them both at the same time (from different browser windows), both of them stopped also at the same time and it tooks 5 minutes [snip] Is this some feature of sqlite or an I doing something wrong? Without seeing any code or being given any details, all I can make is an educated guess. SQLite uses the filesystem for storage. If your queries are needing to access the same file (maybe you're querying the same table), SQLite is going to serialize those queries to help you avoid threading problems. So, your queries are going to basically take turns. Hope that helps. Chris = Chris Shiflett - http://shiflett.org/ PHP Security Handbook Coming mid-2004 HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: [PHP-DB] Re: [PHP] SQLITE
That's my code: $dbfile=db.sdb; $db=sqlite_open($dbfile); $res=sqlite_query($db,select a.*,b.* from a left join b on a.id=b.id_a where a.name like \%1%\ or b.street like \%1%\ order by cellphone); echo sqlite_num_rows($res).CRLF; sqlite_close($db); It's realy just benchmark I've done. I'm pretty much aware of system sqlite is useing to store the data, and I also find obvious that if it would be runnig like web database module, users will ask the same table ata the same time (like with other db system, they are looking at the same page) but I find it not good, I was only asking if there is a way to change it Bronislav Klucka Is this some feature of sqlite or an I doing something wrong? Without seeing any code or being given any details, all I can make is an educated guess. SQLite uses the filesystem for storage. If your queries are needing to access the same file (maybe you're querying the same table), SQLite is going to serialize those queries to help you avoid threading problems. So, your queries are going to basically take turns. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Form with browse for file to upload ftp
Glad to be of service. =) - Original Message - From: PAUL FERRIE To: [EMAIL PROTECTED] Sent: Saturday, November 22, 2003 3:52 PM Subject: [PHP] Re: Form with browse for file to upload ftp Got it working :) thanks for the help Paul Paul Ferrie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Getting bit of a regular on here :) I am hoping that someone can point me to a script that allows me to attach a file to be uploaded to a set dir. I have already got the form built, except for a browse file option. The form is part of this admin area http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html Instead of having a textfield displaying a url of the image and the admin having to upload it sepratly i thought that i could get the admin to upload the image via the form. keeps it altogether. I wouldnt know were to begin adding this to the form. i am pretty sure there a pre-built script that can do this. Can someone point me to one. i had a quick look but came up with very little. Cheers Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Certificate failure for (IMAP)
Dear Sirs, I try to connect to email inbox via IMAP but I am getting folowing error: Certificate failure for xx self signed certificate: /C=--/ST=SomeState/L=SomeCity Any idea what is it mean? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $_GET String Edit
Hey - this one should be simple. I am parsing some data and have $_GET variables in the URL stipulating on which record to start and how many records to display (these then get basses to the limit command in my database query). So here is the catch. I am trying to make a page navigation menu (we have all seen them, Page: 1 2 3...), and I would like to continue doing this via the URL variables. Right now, each of the page numbers is a hyper link is set like this: page.php?.$_SERVER[QUERY_STRING].more variables here. The problem, however, is that those variables are a string. If the variables that the menu defines are already in the string, it doesn't update them, it just adds more definitions to the URL. How have you people dealt with this? I am sure that there is some elegant solution and I would love to know what it is. Thanks in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 23 Nov 2003 03:02:09 -0000 Issue 2431
php-general Digest 23 Nov 2003 03:02:09 - Issue 2431 Topics (messages 170668 through 170696): An Application Server in PHP 170668 by: Luca Mariano Textfields dont fully populate 170669 by: PAUL FERRIE 170670 by: Bas 170671 by: PAUL FERRIE 170674 by: Bas 170675 by: PAUL FERRIE Re: looking for some software (helpdesk, intranet) 170672 by: Patrick Re: Java and PHP 170673 by: Raditha Dissanayake Form with browse for file to upload ftp 170676 by: PAUL FERRIE 170677 by: Nathan Taylor 170678 by: Nathan Taylor 170679 by: Nathan Taylor 170683 by: PAUL FERRIE 170684 by: Bronislav Kluèka 170685 by: PAUL FERRIE 170686 by: Eugene Lee 170687 by: Martin Hudec 170688 by: John Nichel 170689 by: PAUL FERRIE 170694 by: Nathan Taylor Php ignores if statement 170680 by: Pieter 170681 by: RT 170682 by: John Nichel 170691 by: Chris Shiflett SQLITE 170690 by: Bronislav Kluèka 170692 by: Chris Shiflett Re: [PHP-DB] Re: [PHP] SQLITE 170693 by: Bronislav Kluèka Certificate failure for (IMAP) 170695 by: QT $_GET String Edit 170696 by: Jed R. Brubaker 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] -- ---BeginMessage--- Hi guys, some times ago I started a project called PHPlet with this purpose: implement an application server where phplet can be deployed. phplet are just like Java servlets, they have init(), destroy() and service() methods; they run into the phplet container, from which they receive an HttpPhpletRequest and send an HttpPhpletResponse. API for all these class are similar to java one. I've developed a lot of modules yet, the daemon works both in sigle process (win32, Linux) multiprocess mode (on Linux). The project can be found here: http://phplet.sourceforge.net . I'm writing here to have some feedback from PHP lovers; what do you think about this idea? ---End Message--- ---BeginMessage--- Hello again guys This week i have been on here and made a few posts regarding a small admin site app http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html Most of it is now working thank god, but still have have problems fully populating the textfields when i go to edit a record. Only one of the fields fully populates with the data returned from the $query If i view the source file via the broswer(right click / view source) i can see that the data has been sent ok input type='text' name='format' size=25 maxlength=25 value=cd format But all i see is cd Anyone cheers Paul ---End Message--- ---BeginMessage--- Paul Ferrie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello again guys This week i have been on here and made a few posts regarding a small admin site app http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html Most of it is now working thank god, but still have have problems fully populating the textfields when i go to edit a record. Only one of the fields fully populates with the data returned from the $query If i view the source file via the broswer(right click / view source) i can see that the data has been sent ok input type='text' name='format' size=25 maxlength=25 value=cd format But all i see is cd Anyone cheers Paul Try to do it in double quotes(the query-data) In an echo statement, there you must escape the double quotes. ---End Message--- ---BeginMessage--- Sorry m8 i am a total newbie to php+html, I dont get these problems with PHP+Flash Here is the code i am using to return the edit page with the data. $result = mysql_query(SELECT * FROM $tablename WHERE id= $id)or die(brther was an errorbr tablename:= $tablenamebr row id:= $id); if ($myrow = mysql_fetch_array($result)) { echo form method='post' action='edit3.php?tablename=$tablename'\n; do { printf(input type='hidden' name='id' value=%s Artist brinput type='text' name='artist' size=25 maxlength=25 value=%sbr Title brinput type='text' name='title' size=25 maxlength=25 value=%sbr Picture brinput type='text' name='picture' size=25 maxlength=25 value=%sbr Review brtextarea name='review' cols=30 rows=5%s/textareabr Labelbrinput type='text' name='label' size=25 maxlength=25 value=%sbr Format brinput type='text' name='format' size=25 maxlength=25 value=%sbr Price brinput type='text' name='price' size=10 maxlength=8 value=%sbr Rating brinput type='text' name='rating' size=10 maxlength=8 value=%sbr\n, $myrow[id], $artist=$myrow[artist], $title=$myrow[title], $picture=$myrow[picture], $review=$myrow[review], $lable=$myrow[label], $format=$myrow[format], $price=$myrow[price],
Re: [PHP] Execute programs
- Original Message - If you start a program using this function and want to leave it running in the background, you have to make sure that the output of that program is redirected to a file or some other output stream or else PHP will hang until the execution of the program ends. Use system() and background it with : $cmd = tail -f /var/log/messages ; system($cmd); -eric -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $_GET String Edit
--- Jed R. Brubaker [EMAIL PROTECTED] wrote: I am trying to make a page navigation menu (we have all seen them, Page: 1 2 3...), and I would like to continue doing this via the URL variables. Right now, each of the page numbers is a hyper link is set like this: page.php?.$_SERVER[QUERY_STRING].more variables here. The problem, however, is that those variables are a string. If the variables that the menu defines are already in the string, it doesn't update them, it just adds more definitions to the URL. I had a hard time interpreting your question, but I think you're saying that you are generating URLs like this: /page.php?foo1=bar1foo2=bar2foo1=bar3foo2=bar4 And, you're wanting to not duplicate variables in your URL, correct? You could always keep your query string in an array or something. This would allow you to update values in the array prior to the end of your script. You can start this array using $_GET: $query = $_GET; Of course, you might want to rather filter this data on each page, so that you don't spread tainted data more than necessary. Regardless, this will allow you to update values in your query string. If you want to update foo1, you don't have to care whether it's already set: $query['foo1'] = 'newvalue'; Hope that helps. Chris = Chris Shiflett - http://shiflett.org/ PHP Security Handbook Coming mid-2004 HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $_GET String Edit
Sorry for the confusing initial request. You were correct in assuming that I am generating URLs like: page.php?foo1=bar1foo2=bar2foo1=bar3foo2=bar4 So I suppose the consise follow-up question is how can I get a hyperlink to change one of those varibles in the string. In the past I have just tacked a varible on to the end of the string, but I don't want to be redundant. Thanks again. Chris Shiflett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] --- Jed R. Brubaker [EMAIL PROTECTED] wrote: I am trying to make a page navigation menu (we have all seen them, Page: 1 2 3...), and I would like to continue doing this via the URL variables. Right now, each of the page numbers is a hyper link is set like this: page.php?.$_SERVER[QUERY_STRING].more variables here. The problem, however, is that those variables are a string. If the variables that the menu defines are already in the string, it doesn't update them, it just adds more definitions to the URL. I had a hard time interpreting your question, but I think you're saying that you are generating URLs like this: /page.php?foo1=bar1foo2=bar2foo1=bar3foo2=bar4 And, you're wanting to not duplicate variables in your URL, correct? You could always keep your query string in an array or something. This would allow you to update values in the array prior to the end of your script. You can start this array using $_GET: $query = $_GET; Of course, you might want to rather filter this data on each page, so that you don't spread tainted data more than necessary. Regardless, this will allow you to update values in your query string. If you want to update foo1, you don't have to care whether it's already set: $query['foo1'] = 'newvalue'; Hope that helps. Chris = Chris Shiflett - http://shiflett.org/ PHP Security Handbook Coming mid-2004 HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ldap_search() question
Do I use ldap_search to authenticate users in LDAP? I can successfully search the LDAP and retrieve user's data based on a search criteria like (cn=something). If I use (password=somepass) or (userPassword=somepass) in the search criteria it comes back with no hits. How should this be done? Do I have to encrypt the password somehow? Thank you! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $_GET String Edit
--- Jed R. Brubaker [EMAIL PROTECTED] wrote: Sorry for the confusing initial request. You were correct in assuming that I am generating URLs like: page.php?foo1=bar1foo2=bar2foo1=bar3foo2=bar4 So I suppose the consise follow-up question is how can I get a hyperlink to change one of those varibles in the string. In the past I have just tacked a varible on to the end of the string, but I don't want to be redundant. To make this easy, I really think you need to not use a string like you keep suggesting and use some other data structure. I mentioned an array, simply because I think one of PHP's strengths is its rich collection of array functions. You can build your query string as the very last step, prior to using it in a link. While you are constructing it, I think you will find using a string to be about the most cumbersome approach possible. Hope that helps. Chris = Chris Shiflett - http://shiflett.org/ PHP Security Handbook Coming mid-2004 HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] function that appends dollar symbol
Hi all: The money_format function does not do it for me. Is there a simple php function which appends the '$' symbol to a string value. Example $money = 30 $money = some_php_function($money) echo $money //should show $30 thanks __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] function that appends dollar symbol
Joffrey Leevy wrote: Hi all: The money_format function does not do it for me. Is there a simple php function which appends the '$' symbol to a string value. Example $money = 30 $money = some_php_function($money) echo $money //should show $30 thanks How 'bout... $money = '$' . 30; -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] function that appends dollar symbol
On Sat, 2003-11-22 at 23:35, John Nichel wrote: Joffrey Leevy wrote: Hi all: The money_format function does not do it for me. Is there a simple php function which appends the '$' symbol to a string value. Example $money = 30 $money = some_php_function($money) echo $money //should show $30 thanks How 'bout... $money = '$' . 30; Hmmm, that's prepending... how about: $money = 30.'$'; or if he wants it at the beginning: $money = strrev( strrev( '30' ).'$' ); *heheh* Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Why MySql doesn't free space when erasing BLOB fields?
Hello, sorry this mysql question here, but I cant't answer this one. I have database with BLOB fields to hold pictures (60-90 kb each). Actually I am erasing these BLOB fields (move '' into and update rcord) to free some space from my DB, but space is not released by mysql. I verified BLOB fields really were erased. How can I tell mysql recover these space? Thanks Miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Temporarily signing off
Unfortunately, I just can't keep up with the list traffic right now so I'll be unsubscribing for a bit. If anyone needs to reach me, please use this address. Thanks for all the help. Edward Dudlik Becoming Digital www.becomingdigital.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Why MySql doesn't free space when erasing BLOB fields?
ummm Flush maybe _ Nigel Jones [EMAIL PROTECTED] -Original Message- From: M [mailto:[EMAIL PROTECTED] Sent: Sunday, November 23, 2003 5:57 PM To: [EMAIL PROTECTED] Subject: [PHP] Why MySql doesn't free space when erasing BLOB fields? Hello, sorry this mysql question here, but I cant't answer this one. I have database with BLOB fields to hold pictures (60-90 kb each). Actually I am erasing these BLOB fields (move '' into and update rcord) to free some space from my DB, but space is not released by mysql. I verified BLOB fields really were erased. How can I tell mysql recover these space? Thanks Miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Certificate failure for (IMAP)
On Sunday 23 November 2003 18:49, QT wrote: I try to connect to email inbox via IMAP but I am getting folowing error: Certificate failure for xx self signed certificate: /C=--/ST=SomeState/L=SomeCity What code are you using? And have you studied the examples for imap_open()? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* 17. ...and if we just swap these two disc controllers like _this_... --Top 100 things you don't want the sysadmin to say */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] function that appends dollar symbol
/* Hmmm, that's prepending... how about: $money = 30.'$'; or if he wants it at the beginning: $money = strrev( strrev( '30' ).'$' ); *heheh* Rob. */ Pretty damn good and didnt require the installation of Interjinn either!!! Hehehe Peace. -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] passthru gives error in httpd/error_log
On Friday 21 November 2003 08:53, Jesper Hansen wrote: I'm trying to run a super simple command through passthru. Here's my test.php file: htmlbody ? passthru('ls -l'); ? /body/html It works if run directly with php test.php. When this is run from the browser, there is no output, and the following error is logged in /var/log/httpd/error_log : sh: /ls: No such file or directory What does the php error log say? What does this mean ? Any command I try instead of ls -l, gives a similar error. The funky thing is that it HAS worked, but now it doesn't, and I have no idea what happened. Find out what funky thing it was that you did to make it stop working. Are you using safe mode and is safe_mode_exec_dir set appropriately? -- Jason Wong - Gremlins Associates - www.gremlins.biz /* What is research but a blind date with knowledge? -- Will Harvey */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php