[PHP] Deployment and maintenance of php software
Hi all I am a php developer and develop huge packages. Those packages are then installed by my clients or clients of my resellers on a score of webservers. As with all applications, bugfixes, and updates are issued on an almost weekly bases. I developed an application that runs on the php cli and connects to a list of ftp sites and is capable of performing *some* updates but all of this is shady at most. What I really would like is to have an rpm style system. So that I can have for instance package dbfunctions-1.0-1-noarch.rpm (provides dbfunctions) package dbadmin-1.0-1-noarch (provides dbadmin, requires dbfunctions) I read up on the rpm command and find that it is very suitable for this kind of functionality. It support scripts that are run when a package is installed or removed, as well as triggers that can execute scripts. For instance if package dbadmin is updated, it can trigger a script in package dbfunctions to for example, update a configuration script. The downside of it all is that it requires shell access which most clients do not have. Furthermore, not all clients are running linux, some are running Mac (Unix based, but...?), or windows. Even though rpm exists for virtually all platforms. Three more requirements are not met: 1. The location of where the files in the package are installed is fixed in the rpm 2. Many packages require updates to the database, which means that a php cli with mysql support must be available on the system. 3. In case of a first install, information needs to be collected about the environment and user/password stuff. Is there anyone that can provide a solution to this or suggest another approach to the problem? With kind regards x_terminat_or_3 -- Now listening to Top! Radio Live www.topradio.be/stream on amaroK Geek code: www.vlaamse-kern.com/geek Registered Linux User No 379093 If life was for sale, what would be its price? www.vlaamse-kern.com/sas/ for free php utilities -- pgpHUSFeSKHs2.pgp Description: PGP signature
[PHP] Re: Some good framework for new website
赵光 wrote: i am new to php,i want to write a website contain blog(mutil-user),forum and album. This is pretty basic stuff. Why don't you try some CMS first? http://www.xaraya.com/ http://www.joomla.org/ http://www.drupal.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can't execute external program
Hello, I cannot get exec(), system() or passthru() to run an extenal program. >From the command line it runs perfectly: [EMAIL PROTECTED] html]# /var/www/html/myprog -E 123456789098.dat sample1.txt sample1.new (no output, it just creates the file .new) Here is the php I've created, fairly simple: I've tried using full paths as well >From other threats I've double-checked this: - safe mode is disabled - the values for max_execution_time and memory_limit are large enough for this simple program. - permissions are correct for all files involved: any user can run the program ( rwxr-xr-x ) any user can read input files apache is the owner of all files involved I'm getting frustrated, Any help will be deeply appreciated Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: new to sessions, but learning
I mean, yes they will work across multiple pages. Thy store data locally and re-load it, identifying necessary information by session ID which is stored in cookie on the client side. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: new to sessions, but learning
matt VanDeWalle wrote: hello, I know session vars work between two pages but will sessions work across 3 and 4 pages or not? Yes. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] new to sessions, but learning
hello, I am writing basically what is hopefully going to turn out eventually to be a penpal website. There are millions out there i know but some are to slow and only load half the page whenever it feels like it + has a bazillion ads and well, other things..so I decided to write my own. What I am wanting to know, is it possible to do the signup thing in two parts using sessions. I basically have the signup info first, then so the user doesn't have to come back later, they can fill out their profile right then and there, on the next page. I'm thinking about saving the signup info and then when the user clicks continue, it would have their info. I know session vars work between two pages but will sessions work across 3 and 4 pages or not? thanks matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Some good framework for new website
i am new to php,i want to write a website contain blog(mutil-user),forum and album. who can tell me some good framework can accelerate developing.and any exist web site implement the fuction i wanted,please tell me some for reference. thanks for all. -- /** * Love in Gentoo-Linux C and Python * Look at my blog * http://poorc.wordpress.com **/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with PHP5 & phpMyAdmin
On Fri, Nov 18, 2005 at 12:07:00PM -0800, Russ F wrote: > I've reinstalled Apache2, PHP5, phpMyAdmin and MYSQl several times. I still > get the same error when i try to use phpmyadmin Can not load mysql > extensions. I checked the path it is correct, the extensions exist > in /etc/php5/extensions but they do not have a .so after them. The php.ini > file and config files appear correct from a server setup. I read you need > to put a loadmodule statement in httpd but am not sure when. The script > says not to modify this file, put mods in /etc/sisconfig. But I'm not sure > where as there are no loadmod commands in the scripts. My authorities all > appear correct. > > Can anyone poiny me to the right configuration file. How you install all of apache2, php5, phpMyAdmin and Mysql all matters on what file to edit. With your extension dir existing in /etc/php5/extension, i would assume you insalled via some package system. With out any of the information, it will be hard to help. -- cat .signature: No such file or directory -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Local PEAR install confusion
Colin Andrews wrote: Thanks a ton- So then that means that the only way to get rid of the warnings is to change the error reporting level? No, report the warnings as a bug at pear.php.net/bugs You can also hand-fix the source in the mean time, it's only 5-10 lines of code, right? Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Local PEAR install confusion
Thanks a ton- So then that means that the only way to get rid of the warnings is to change the error reporting level? Quoting Greg Beaver <[EMAIL PROTECTED]>: Colin Andrews wrote: about 3 months ago I set up a local install of pear on my web host account (a ... Any suggestions? Enlightenment? Hi Colin, Your setup sounds just fine to me. The "features.h" message is a bug in PEAR 1.4.4 that is fixed in PEAR 1.4.5 that will be released any day now, and Archive_Tar is a brand new version, so automatic upgrade is disallowed until it can be tested in the wild. THis is because if it were to break PEAR, this would make it difficult to grab any packages. Hwoever, if you would like, upgrading via "pear upgrade --loose Archive_Tar" should work, or "pear upgrade --force Archive_Tar" You do not need to re-install from scratch. Your host has an older CLI version of PHP than the PHP version used by apache. Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: AW: [PHP] how can I CALL a PHP script from different TEXT LINKS with differentPARAMETERS?
That's right Curt, this is the reason I characterised sending parameters via url not safe! But in case of selecting data, I think there is no problem to send data via url, right? anyway, I found more simple using POST in any case because I have already used that and works, so I prefer POST... Thanks! Curt Zirzow wrote: > On Sun, Nov 20, 2005 at 04:12:05PM +1300, Jasper Bryant-Greene wrote: >>xkorakidis wrote: >>>Webmaster, thanks very much but I think it would be safer to do that by >>>post, not by get. Furthermore, if I use indivudual files >>The difference between POST and GET lies in the semantics -- POST >>represents something changing on the server, e.g. updating a database >>field, and allows the browser to warn the user if they try to refresh. >>GET represents nothing of importance changing on the server, e.g. >>performing a search on the database, and can safely be repeated. > > Another good reason to use POST to modify data, consider the link: > > http://example.com/posts.php?postid=1&action=delete > > If googlebot comes across your page containing a list of all your > posts, with a link like that, you just might wake up one morning > wondering why all your posts are gone. > > Curt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Local PEAR install confusion
Colin Andrews wrote: about 3 months ago I set up a local install of pear on my web host account (a cpanel system). A couple days ago, my hosting company upgraded us to php 4.4.2-dev. I started seeing a lot of warnings coming out my PEAR includes: "Notice: Only variable references should be returned by reference in /home/headbonk/pear/lib/DB.php on line 1132" and other similar ones. So I figured maybe PEAR needs an upgrade to go with the php upgrade. I did pear upgrade-all and that seemed to fix some of the warnings - not sure I didn't keep track of exactly which modules were giving warnings. I also go a couple messages from the pear installer that I didn't understand: Failed to download pear/Archive_Tar (recommended version 1.3.1), latest release is version 1.3.2, stability "stable", use "channel://pear.php.net/Archive_Tar-1.3.2" to install /tmp/glibctestqGYBFW:1:22: features.h: No such file or directory pear/PEAR dependency package "pear/Archive_Tar" installed version 1.3.2 is not the recommended version 1.3.1, but may be compatible, use --force to install I started poking around, and found that pear -V reports my PHP version # as 4.3.10. phpinfo() in my document root reports the php version as 4.4.2-dev. My gut is just to redo the local install from scratch, but I don't know if there's something I need to worry about going on. I could just set a higher error reporting level in my .htaccess file. Any suggestions? Enlightenment? Hi Colin, Your setup sounds just fine to me. The "features.h" message is a bug in PEAR 1.4.4 that is fixed in PEAR 1.4.5 that will be released any day now, and Archive_Tar is a brand new version, so automatic upgrade is disallowed until it can be tested in the wild. THis is because if it were to break PEAR, this would make it difficult to grab any packages. Hwoever, if you would like, upgrading via "pear upgrade --loose Archive_Tar" should work, or "pear upgrade --force Archive_Tar" You do not need to re-install from scratch. Your host has an older CLI version of PHP than the PHP version used by apache. Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with the fwrite function (not as simple as it sounds though)
Brian V Bonini napisał(a): > What does 'df -h' say on your system? !!! The simplest of all is the most unforseen.. Wow. that's it ;) I NEVER EVEN Imagined to check for that, in fact that _IS_ the thing. I feel so totaly stupid right now, I checked everything except this, although I think the fwrite _SHOULD_ return false on this, and it should print out an error saying that there's no space available.. The thing is that my system has a few partitions, one of them is the one containing wwwroot. I never even once got a msg that the filesystem is full, as most of my operations (recompiling etc.) were conducted on a seperate partition. Now I see it and can take it all together, as there is one script doing backup of the www sites, it does so every night, and that was the thing that made it full. BIG ENORMOUS Thanks for the help to all of You, and sorry for the problem, I would never ever thought about this, until You suggested it. a modification to the topic of this message, "Simpler the You could've thought" ;] -- Best wishes Łukasz Hejnak -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Local PEAR install confusion
about 3 months ago I set up a local install of pear on my web host account (a cpanel system). A couple days ago, my hosting company upgraded us to php 4.4.2-dev. I started seeing a lot of warnings coming out my PEAR includes: "Notice: Only variable references should be returned by reference in /home/headbonk/pear/lib/DB.php on line 1132" and other similar ones. So I figured maybe PEAR needs an upgrade to go with the php upgrade. I did pear upgrade-all and that seemed to fix some of the warnings - not sure I didn't keep track of exactly which modules were giving warnings. I also go a couple messages from the pear installer that I didn't understand: Failed to download pear/Archive_Tar (recommended version 1.3.1), latest release is version 1.3.2, stability "stable", use "channel://pear.php.net/Archive_Tar-1.3.2" to install /tmp/glibctestqGYBFW:1:22: features.h: No such file or directory pear/PEAR dependency package "pear/Archive_Tar" installed version 1.3.2 is not the recommended version 1.3.1, but may be compatible, use --force to install I started poking around, and found that pear -V reports my PHP version # as 4.3.10. phpinfo() in my document root reports the php version as 4.4.2-dev. My gut is just to redo the local install from scratch, but I don't know if there's something I need to worry about going on. I could just set a higher error reporting level in my .htaccess file. Any suggestions? Enlightenment? PS. my prefered package state is beta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with the fwrite function (not as simple as it sounds though)
On Sun, 2005-11-20 at 09:38, Łukasz Hejnak wrote: > Brian V Bonini napisał(a): > > You are saying: > > From the CLI you can write to a file all day long, no prob. > Yes, the shell command "php test.php" works fine when executed as root > (any other user has the same problem as from the web) > > From the web, if the file does not exist it is created, however, no > > content is appended to it. Furthermore, IF there is content in the file > > it can be appended to via web, but if it's an empty file it will not get > > written too. Am I following correctly? > > Exactly, as strange as it sounds, it's just like it is. > > And another thing, the whole instalation was working perfectly for the > past month or two, and now (friday->saturday) suddenly the above symptom > have appeared. > No config changes, no updates or anything else I could relate was > happening on the server, and there is no info in the log files on this > behaviour, the is_writable says it is writable. The safe mode is disabled. > > Hope this tells You something, and gives You an idea on how to solve this. What does 'df -h' say on your system? -- s/:-[(/]/:-)/g BrianGnuPG -> KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu == gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC Key Info: http://gfx-design.com/keys Linux Registered User #339825 at http://counter.li.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: imagecopyresized just copies
Andy Pieters escreveu: Hi all I wanted to make a simple script to make a resized image from an uploaded one. See this page and... http://www.educar.pro.br/abc/mathgd/index.php?xyz=18 zerof -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: AW: [PHP] how can I CALL a PHP script from different TEXT LINKS with differentPARAMETERS?
On Sun, Nov 20, 2005 at 04:12:05PM +1300, Jasper Bryant-Greene wrote: > xkorakidis wrote: > >Webmaster, thanks very much but I think it would be safer to do that by > >post, not by get. Furthermore, if I use indivudual files > > The difference between POST and GET lies in the semantics -- POST > represents something changing on the server, e.g. updating a database > field, and allows the browser to warn the user if they try to refresh. > GET represents nothing of importance changing on the server, e.g. > performing a search on the database, and can safely be repeated. Another good reason to use POST to modify data, consider the link: http://example.com/posts.php?postid=1&action=delete If googlebot comes across your page containing a list of all your posts, with a link like that, you just might wake up one morning wondering why all your posts are gone. Curt. -- cat .signature: No such file or directory -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imagecopyresized just copies
On Sun, Nov 20, 2005 at 05:14:08PM +0100, Andy Pieters wrote: > Hi all > > I wanted to make a simple script to make a resized image from an uploaded one. > > I used the example found on the php.net website > > ... >{imagecopyresized($thumb,$main,0,0,0,0,$newwidth,$newheight,$width, > $height); > switch($type) >case 2:imagejpeg($main,$thumbname); > ... > When I examine the two files, the are binary different but size and width are > equal. You are re-saving the original file, not the thumb. I think you really wanted: imagejpeg($thumb,$thumbname); btw, it would help to make the code more readable if you removed all those leading tabs when posting it to the list. Curt. -- cat .signature: No such file or directory -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imagecopyresized just copies
On Sunday 20 November 2005 17:14, Andy Pieters wrote: > {case 1: > imagegif($main,$thumbname); > > break; >case 2: > imagejpeg($main,$thumbname); > > break; >case 3: > imagepng($main,$thumbname); > > chmod($thumbname,0600); #read&write for apache only > } > > imagedestroy($main); > > imagedestroy($thumb); > > When I examine the two files, the are binary different but size and width > are equal. > Never mind, after a long day, I overlooked the fact that instead of imagegif($thumb,$thumbname) I was doing imagegif($main,$thumbname)... Andy -- Now listening to Top! Radio Live www.topradio.be/stream on amaroK Geek code: www.vlaamse-kern.com/geek Registered Linux User No 379093 If life was for sale, what would be its price? www.vlaamse-kern.com/sas/ for free php utilities -- pgpI1Al5nJPGD.pgp Description: PGP signature
Re: [PHP] Problem with the fwrite function (not as simple as it sounds though)
thanks, never thought about that. Suhas On 11/20/05, Curt Zirzow <[EMAIL PROTECTED]> wrote: > On Sun, Nov 20, 2005 at 09:26:15AM -0700, Suhas wrote: > > This is not a disk usage as it works when script is run from terminal as su\ > > root can break the 100% barrier, it usually can get around 110%. > > [EMAIL PROTECTED]:/tmp> df -h /tmp > Filesystem SizeUsed Avail Capacity Mounted on > /dev/ad0s1e248M8.2M220M 4%/tmp > [EMAIL PROTECTED]:/tmp> cat /dev/random > foobar > > /tmp: write failed, filesystem is full > cat: stdout: No space left on device > [EMAIL PROTECTED]:/tmp> df -h /tmp > Filesystem SizeUsed Avail Capacity Mounted on > /dev/ad0s1e248M228M8.0K 100%/tmp > [EMAIL PROTECTED]:/tmp> su > [EMAIL PROTECTED]:/tmp# cat /dev/random > foobar > > /tmp: write failed, filesystem is full > cat: stdout: No space left on device > [EMAIL PROTECTED]:/tmp# df -h /tmp > Filesystem SizeUsed Avail Capacity Mounted on > /dev/ad0s1e248M248M-20M 109%/tmp > > > > Curt. > -- > cat: .signature: No such file or directory > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Contact @ Suhas Pharkute. [EMAIL PROTECTED] 208 830 8915 (C) 208 429 6943 (H) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with the fwrite function (not as simple as it sounds though)
On Sun, Nov 20, 2005 at 09:26:15AM -0700, Suhas wrote: > This is not a disk usage as it works when script is run from terminal as su\ root can break the 100% barrier, it usually can get around 110%. [EMAIL PROTECTED]:/tmp> df -h /tmp Filesystem SizeUsed Avail Capacity Mounted on /dev/ad0s1e248M8.2M220M 4%/tmp [EMAIL PROTECTED]:/tmp> cat /dev/random > foobar /tmp: write failed, filesystem is full cat: stdout: No space left on device [EMAIL PROTECTED]:/tmp> df -h /tmp Filesystem SizeUsed Avail Capacity Mounted on /dev/ad0s1e248M228M8.0K 100%/tmp [EMAIL PROTECTED]:/tmp> su [EMAIL PROTECTED]:/tmp# cat /dev/random > foobar /tmp: write failed, filesystem is full cat: stdout: No space left on device [EMAIL PROTECTED]:/tmp# df -h /tmp Filesystem SizeUsed Avail Capacity Mounted on /dev/ad0s1e248M248M-20M 109%/tmp Curt. -- cat: .signature: No such file or directory -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with the fwrite function (not as simple as it sounds though)
This is not a disk usage as it works when script is run from terminal as su\ Suhas On 11/20/05, Curt Zirzow <[EMAIL PROTECTED]> wrote: > On Sun, Nov 20, 2005 at 03:38:56PM +0100, ukasz Hejnak wrote: > > Brian V Bonini napisa�(a): > > >You are saying: > > >From the CLI you can write to a file all day long, no prob. > > Yes, the shell command "php test.php" works fine when executed as root > > (any other user has the same problem as from the web) > > >From the web, if the file does not exist it is created, however, no > > >content is appended to it. Furthermore, IF there is content in the file > > >it can be appended to via web, but if it's an empty file it will not get > > >written too. Am I following correctly? > > > > Exactly, as strange as it sounds, it's just like it is. > > > > And another thing, the whole instalation was working perfectly for the > > past month or two, and now (friday->saturday) suddenly the above symptom > > have appeared. > > This almost sounds as your disk usage (or quota) is at 100%. > > Curt. > -- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Contact @ Suhas Pharkute. [EMAIL PROTECTED] 208 830 8915 (C) 208 429 6943 (H)
[PHP] imagecopyresized just copies
Hi all I wanted to make a simple script to make a resized image from an uploaded one. I used the example found on the php.net website list($width,$height,$type)=getimagesize($newfile); $newwidth=350; $newheight=50; $thumb=imagecreatetruecolor($newwidth,$newheight); $thumbname=str_replace(".$filedetails[extension]", "_thumb.$filedetails[extension]",$newfile); $main=null; switch($type) {case 1: $main=imagecreatefromgif($newfile); #gif break; case 2: $main=imagecreatefromjpeg($newfile); #jpeg break; case 3: $main=imagecreatefrompng($newfile); #png break; } if(!(is_null($main))) {imagecopyresized($thumb,$main,0,0,0,0,$newwidth,$newheight,$width, $height); switch($type) {case 1: imagegif($main,$thumbname); break; case 2: imagejpeg($main,$thumbname); break; case 3: imagepng($main,$thumbname); chmod($thumbname,0600); #read&write for apache only } imagedestroy($main); imagedestroy($thumb); When I examine the two files, the are binary different but size and width are equal. Anybody know why? With kind regards Andy -- Currently not listening to amaroK Geek code: www.vlaamse-kern.com/geek Registered Linux User No 379093 If life was for sale, what would be its price? www.vlaamse-kern.com/sas/ for free php utilities -- pgp4XeKFLyhs9.pgp Description: PGP signature
Re: [PHP] Problem with the fwrite function (not as simple as it sounds though)
On Sun, Nov 20, 2005 at 03:38:56PM +0100, ukasz Hejnak wrote: > Brian V Bonini napisa�(a): > >You are saying: > >From the CLI you can write to a file all day long, no prob. > Yes, the shell command "php test.php" works fine when executed as root > (any other user has the same problem as from the web) > >From the web, if the file does not exist it is created, however, no > >content is appended to it. Furthermore, IF there is content in the file > >it can be appended to via web, but if it's an empty file it will not get > >written too. Am I following correctly? > > Exactly, as strange as it sounds, it's just like it is. > > And another thing, the whole instalation was working perfectly for the > past month or two, and now (friday->saturday) suddenly the above symptom > have appeared. This almost sounds as your disk usage (or quota) is at 100%. Curt. -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP 4.4.1 on Apache 2.0.x issue
On Thu, Nov 17, 2005 at 09:34:08PM +0100, Max Belushkin wrote: > Does anyone have any information/updates on this issue perhaps? The thread > on http://lists.freebsd.org/pipermail/freebsd-ports/2005-November/027056.html > hasn't had anything new (since Nov 6), and on > http://bugs.php.net/bug.php?id=35059 it's been stated as "fixed" ever since > (Nov 2). The problem looks fixed in php 4.1.1_2. After installing this patch, I didn't see the problems anymore. http://www.freshports.org/lang/php4 Commit History: 16 Nov 2005 07:24:47 - Fix pear pkg-plist - Increase pear memory limit (requested by amd64) - Revert apache2handler to the latest working version found in PHP 4.4.0, since PHP developers seem not interested in fixing the bug with apache2 and mod_rewrite Geert Booster signature.asc Description: Digital signature
RE: [PHP] Re: [PHP-DB] Drag and Drop with PHP and MySQL
I've used this (radlinks upload) on one of my sites and it works great. Drag and drop, even multiple files. Jason Karns ~~~ Web Designer & Applications Programmer 3AM Productions - Things look different @3AM -Original Message- From: Joe Harman [mailto:[EMAIL PROTECTED] Sent: Friday, November 18, 2005 11:31 PM To: php-general@lists.php.net Subject: Re: [PHP] Re: [PHP-DB] Drag and Drop with PHP and MySQL Here is what you are asking for I think.. it uses Java. I did have a complication letting the applet install.. also, it's not free, but there is a Lite version. Hope this helps http://www.radinks.com/upload/dnd.php Joe On 11/18/05, Nate Nielsen <[EMAIL PROTECTED]> wrote: > > You wont be able to do the drag and drop, but you can gracefully do > multiple file uploads with flash (via flash 8). It also lets you know > the progress of the file upload itself. > > I've done a snazzy picture upload tool for a Flex (generates flash > applications on the fly with ActionScript and XML files only - no > actual flash IDE) - it allows you to select a file, hit upload, shows > a progress bar of the transfer (you can cancel at any time) - and when > done, the image is made into a thumbnail and shown on the screen. > -obviously, no page reloads and totally cross compatible. > > I wouldnt know where to start with regular flash as I'm a programmer, > so only Flex appeals to me - but I know it can be done, and isnt > extremely complicated. My guess is that you could have a flash guru > whip something out pretty fast. > > =) > > -Nate Nielsen > [EMAIL PROTECTED] > > - Original Message - > From: "Jasper Bryant-Greene" <[EMAIL PROTECTED]> > To: "Joe Harman" <[EMAIL PROTECTED]> > Cc: > Sent: Friday, November 18, 2005 8:52 PM > Subject: Re: [PHP] Re: [PHP-DB] Drag and Drop with PHP and MySQL > > > > Joe Harman wrote: > >> Hi Chris, > >> I would think that there has to be something out there like a > Javascript > >> that would accomplish that... that would be my first guess anyhow... > >> there > >> possibly could be something done in flash that would act as a drop > >> area for the file... let us know what you find Joe > > > > There's no way the browser is going to let JS have access to the > > user's filesystem. I would expect ditto for Flash, although I don't use it. > > > > Jasper > > > > > >> > >> On 11/18/05, Micah Stevens <[EMAIL PROTECTED]> wrote: > >>> > >>> No. That would be nice though eh? > >>> > >>> What I have done in the past is when a user needs to upload a > >>> file, I give them a linked button that links to a ftp:// style > >>> address. This ftp account points to a directory that PHP can have > >>> access to. > >>> > >>> The user then drags and drops (IE only) the files on this new > >>> window, which uploads the files to this directory. > >>> > >>> Once they're done, they close the window, and hit a second button > 'Click > >>> here > >>> when finished uploading' which tells php to grab all the files in > >>> the upload directory and put them where they need to go. > >>> > >>> This is far from ideal, causes miserable problems when more than > >>> one person is using the technique at once, and offers a host of > >>> security and > usability > >>> issues. Oh, and it's IE only, Firefox can't do this, and I don't > >>> think opera/safari can either. > >>> > >>> However, it's much better than uploading a ton of files > >>> individually using a form. I only use this for applications where > >>> I can be sure that only > one > >>> user > >>> will use it at once, and they're trusted. > >>> > >>> In a pinch it works though. I don't care so much about drag and > >>> drop, > I > >>> was > >>> just trying to solve the multi-file upload issue. I wish there was > >>> a better way. > >>> > >>> If I'm stupid and there is, I'd love to hear about it. > >>> > >>> -Micah > >>> > >>> On Friday 18 November 2005 5:42 pm, Chris Payne wrote: > HI there everyone, > > > > I have a file upload system where you select via requester the > file > to > upload, it then uploads it with PHP and stores the info in a > MySQL database. Is there an interface / programming method I can > use which > I > >>> can > DRAG a file from the desktop into an area in a form just as if I > had > >>> used a > file requester to select a file? Learning a new programming > technique is no problem as long as it can be used with PHP and > MYSQL. > > > > Any helps / pointers would be REALLY welcome. > > > > Chris > >>> -- > >>> PHP Database Mailing List (http://www.php.net/) To unsubscribe, > >>> visit: http://www.php.net/unsub.php > >>> > >>> > >> > >> > >> -- > >> Joe Harman > >> - > >> Do not go where the path may lead, go instead where there is no > >> path > and > >> leave a trail. - Ralph Waldo Emerson > >> > > > > -- > > PHP General Mailing List (http://www.php.net/) To unsubscrib
Re: [PHP] Server Client Architecture, best parctice
> On 11/20/05, ahmed <[EMAIL PROTECTED]> wrote: >> BSD-style sockets > how secure are sockets?? This is very flexible. Practically, you'll need a "protocol" for client/server communication. So how secure depends on how secure is your protocol design and implementation. You might opt to work atop secure socket layer, as well. -ahmed
Re: [PHP] Problem with the fwrite function (not as simple as it sounds though)
Brian V Bonini napisał(a): You are saying: From the CLI you can write to a file all day long, no prob. Yes, the shell command "php test.php" works fine when executed as root (any other user has the same problem as from the web) From the web, if the file does not exist it is created, however, no content is appended to it. Furthermore, IF there is content in the file it can be appended to via web, but if it's an empty file it will not get written too. Am I following correctly? Exactly, as strange as it sounds, it's just like it is. And another thing, the whole instalation was working perfectly for the past month or two, and now (friday->saturday) suddenly the above symptom have appeared. No config changes, no updates or anything else I could relate was happening on the server, and there is no info in the log files on this behaviour, the is_writable says it is writable. The safe mode is disabled. Hope this tells You something, and gives You an idea on how to solve this. -- Best wishes Łukasz Hejnak -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with the fwrite function (not as simple as it sounds though)
On Sun, 2005-11-20 at 05:44, Łukasz Hejnak wrote: > Hello again, here's some more extra info on my case that came out while > Suhas Pharkute was helping me find a resolution: > So the safe-mode is off, that's for sure, I turned it off at compile stage. > > I delete the file after each run of the script, the folder where the > script is located has 777 permissions and the ownership is given to uid > 1027 gid 1020, whereas these are the uid/gid set for apache to run with > (and it does!). > The script: > > $data="some data"; > $file="file.txt"; > $handle = fopen($file,"w"); > fwrite($handle,$data); > fflush($handle); > fclose($handle); > if (is_writable($file)) > echo "Is writable"; > else > echo "Isn't writable"; > > works when I run it as root, from the shell (php script.php), > but when it's run from the server, it doesn't. I missed the beginning of this thread... You are saying: >From the CLI you can write to a file all day long, no prob. >From the web, if the file does not exist it is created, however, no content is appended to it. Furthermore, IF there is content in the file it can be appended to via web, but if it's an empty file it will not get written too. Am I following correctly? -Brian -- s/:-[(/]/:-)/g BrianGnuPG -> KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu == gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC Key Info: http://gfx-design.com/keys Linux Registered User #339825 at http://counter.li.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with the fwrite function (not as simple as it sounds though)
Hello again, here's some more extra info on my case that came out while Suhas Pharkute was helping me find a resolution: So the safe-mode is off, that's for sure, I turned it off at compile stage. I delete the file after each run of the script, the folder where the script is located has 777 permissions and the ownership is given to uid 1027 gid 1020, whereas these are the uid/gid set for apache to run with (and it does!). The script: $data="some data"; $file="file.txt"; $handle = fopen($file,"w"); fwrite($handle,$data); fflush($handle); fclose($handle); if (is_writable($file)) echo "Is writable"; else echo "Isn't writable"; works when I run it as root, from the shell (php script.php), but when it's run from the server, it doesn't. I mean, the output _IS_ in _BOTH_ cases "Is writable" but that doesn't change a thing, cause when executed from the apache, it just creates an empty file without content. The other thing I was supposed to check was stat($file); with clearstatcache(); called beforehand. The output of this is: device number: 777 inode number: 1142470 inode protection mode: 33188 number of links: 1 _userid_of_owner:_1027_ groupid of owner: 1020 device type, if inode device *: 0 _size_in_bytes:_0_ time of last access (Unix timestamp): 1132482491 time of last modification (Unix timestamp): 1132482505 time of last inode change (Unix timestamp): 1132482505 blocksize of filesystem IO *: 4096 _number_of_blocks_allocated:_0_ and of course when executed as root: device number: 777 inode number: 1142470 inode protection mode: 33188 number of links: 1 _userid_of_owner:_0_ groupid of owner: 1020 device type, if inode device *: 0 _size_in_bytes:_9_ time of last access (Unix timestamp): 1132482980 time of last modification (Unix timestamp): 1132482980 time of last inode change (Unix timestamp): 1132482980 blocksize of filesystem IO *: 4096 _number_of_blocks_allocated:_8_ Can anybody help me? -- Best wishes Łukasz Hejnak -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] POST headers empty when using SSLProxyEngine
Hi Mirco, > I had a simmalar problem myself and didn't find a solutions. > As far as I fond out the ssl_proxy module simply does not route POST. It > just routes the link, wich means GET should work. thanks for your reply! That sounds logical, indeed. I have posted my help request to the Apache users mailing list as well, maybe someone there comes up with a solution or even a patch. > My solutions would be that I bypass the proxy for file transfer. How could I achieve that without losing my session variables? > I you find another solutions I would be glad to know how. Of course, I'll do! :) Thanks Florian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php