RE: [PHP] Uploading file problem
> Thanks!! I'll give that a try! > > On Thu, 6 Mar 2003, 1LT John W. Holmes wrote: > > > > Well, I have a statement that says: > > > > > > if ([EMAIL PROTECTED]($photo, $long_path . "speakers/" . $photo_name)) { > > > echo an error > > > }else{ > > > proceed with renaming the file > > > } > > > > > > The error that is echoed after the copy is the one that pops > up. So, it > > > could be some other problem, but I'm not sure what to look for. > > > > Take out the @ sign so you can see what the PHP error message is. > > > > ---John Holmes... Try using move_uploaded_file() as well... Rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Uploading file problem
Thanks!! I'll give that a try! On Thu, 6 Mar 2003, 1LT John W. Holmes wrote: > > Well, I have a statement that says: > > > > if ([EMAIL PROTECTED]($photo, $long_path . "speakers/" . $photo_name)) { > > echo an error > > }else{ > > proceed with renaming the file > > } > > > > The error that is echoed after the copy is the one that pops up. So, it > > could be some other problem, but I'm not sure what to look for. > > Take out the @ sign so you can see what the PHP error message is. > > ---John Holmes... > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Uploading file problem
On Friday 07 March 2003 03:28, Amanda McComb wrote: > Well, I have a statement that says: > > if ([EMAIL PROTECTED]($photo, $long_path . "speakers/" . $photo_name)) { > echo an error > }else{ > proceed with renaming the file > } The copy() function allows you to specify a destination filename so there is no need for the extra step of renaming the file. -- 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 -- /* People usually get what's coming to them ... unless it's been mailed. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Uploading file problem
> Well, I have a statement that says: > > if ([EMAIL PROTECTED]($photo, $long_path . "speakers/" . $photo_name)) { > echo an error > }else{ > proceed with renaming the file > } > > The error that is echoed after the copy is the one that pops up. So, it > could be some other problem, but I'm not sure what to look for. Take out the @ sign so you can see what the PHP error message is. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Uploading file problem
Well, I have a statement that says: if ([EMAIL PROTECTED]($photo, $long_path . "speakers/" . $photo_name)) { echo an error }else{ proceed with renaming the file } The error that is echoed after the copy is the one that pops up. So, it could be some other problem, but I'm not sure what to look for. On Thu, 6 Mar 2003, Mark Heintz PHP Mailing Lists wrote: > > What do you mean by "fails at the copy"? Have you verified that the > filename and path you're copying to is valid? Otherwise, if the filename > that is failing is consistently the same, and if it's attempting to > overwrite an existing file, it could be a permissions problem. Just a > couple of guesses... > > mh. > > On Thu, 6 Mar 2003, Amanda McComb wrote: > > > I'm very new to PHP, so I hope no one is offended by reading my very basic > > questions. > > > > I have created a web form that saves some data to a database and uploads > > three files, copies them to a new directory, and renames them. From my > > work machine and home machine, it works great for me - there are never any > > errors. When my boss tries it, two of the files work fine, but the other > > fails at the copy. I have watched him do it, and it's not user error. > > What could the problem be? I'm stumped! > > > > I can include code or links if needed. > > > > Thanks, > > Amanda > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Uploading file problem
What do you mean by "fails at the copy"? Have you verified that the filename and path you're copying to is valid? Otherwise, if the filename that is failing is consistently the same, and if it's attempting to overwrite an existing file, it could be a permissions problem. Just a couple of guesses... mh. On Thu, 6 Mar 2003, Amanda McComb wrote: > I'm very new to PHP, so I hope no one is offended by reading my very basic > questions. > > I have created a web form that saves some data to a database and uploads > three files, copies them to a new directory, and renames them. From my > work machine and home machine, it works great for me - there are never any > errors. When my boss tries it, two of the files work fine, but the other > fails at the copy. I have watched him do it, and it's not user error. > What could the problem be? I'm stumped! > > I can include code or links if needed. > > Thanks, > Amanda -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Uploading file problem
The files go to different directories, but I checked the permissions on all of the directories, and they are all '777'. I am able to upload files, so I think the directory is ok. The server is unix. I am going to ask my boss to send me the files he is trying to upload to see if the files are the problem. If they are, what sort of problems would I look for? On Thu, 6 Mar 2003, Rich Gray wrote: > > I'm very new to PHP, so I hope no one is offended by reading my very basic > > questions. > > > > I have created a web form that saves some data to a database and uploads > > three files, copies them to a new directory, and renames them. From my > > work machine and home machine, it works great for me - there are never any > > errors. When my boss tries it, two of the files work fine, but the other > > fails at the copy. I have watched him do it, and it's not user error. > > What could the problem be? I'm stumped! > > > > I can include code or links if needed. > > > > Thanks, > > Amanda > > From what you say above I'd check the permissions on the 3rd target > directory to check if it allows writes by the web server process. Are all 3 > files going into the same directory? Is the server *nix or Windows? > > Rich > > > -- > 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] Uploading file problem
> I'm very new to PHP, so I hope no one is offended by reading my very basic > questions. > > I have created a web form that saves some data to a database and uploads > three files, copies them to a new directory, and renames them. From my > work machine and home machine, it works great for me - there are never any > errors. When my boss tries it, two of the files work fine, but the other > fails at the copy. I have watched him do it, and it's not user error. > What could the problem be? I'm stumped! > > I can include code or links if needed. > > Thanks, > Amanda >From what you say above I'd check the permissions on the 3rd target directory to check if it allows writes by the web server process. Are all 3 files going into the same directory? Is the server *nix or Windows? Rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php