Re: [PHP] Problem's addign a script to my web page.
--- Marek Kilimajer <[EMAIL PROTECTED]> wrote: > Yes, it will get rid of the permission problems. > > Example of creating a directory: > > $fp=ftp_connect('localhost'); > if(ftp_login($fp, $ftpuser, $ftppass)) { > if(ftp_mkdir($fp, $ftpbasedir .'members/'.$iid)) { > /*if(!ftp_site($fp, 'chmod 0777 '.$ftpbasedir > .'members/'.$iid)) > die('Could not change permission on user directory > (chmod 0777 > '.$ftpbasedir .'members/'.$iid.')!'); this would not > work for you*/ > } else { > die('Could not create directory, user directory not > created!'); > } > } else { > die('Could not login, user directory not created!'); > } > > I had to create directory with ftp so I could later > open it using > opendir(). Because chmod does not work for you you > will have to even > create files using ftp functions. Awesome! I tilt my hat to you! Thank's again. __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem's addign a script to my web page.
--- Marek Kilimajer <[EMAIL PROTECTED]> wrote: > Optionaly you can use ftp functions to create files > and directories. Will that get rid of the parmission's problem? Can you explain a little? __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem's addign a script to my web page.
--- Marek Kilimajer <[EMAIL PROTECTED]> wrote: > Do you have shell access(ssh)? You can use that. > Other way is to ask > your ISP to change the parmissions or to enable > chmod command. I had a feeling i might have to ask my ISP, they seem cool they might do it, unless there is a security concern about changing the permisson's of said directory. I seriously doubt they will enable the 'chmod' command, i think that would be a security concern. No i don't have ssh access. I will ask them to change the permission's, if that doesn't work, i will keep working on it. Thank's for the reply marek, your a life saver, and a *time saver*. stratis. __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem's addign a script to my web page.
Hello, i will be a succinct as possible. I downloaded a php script (a chatbox) for my web page. The web page is from my ISP, 15Mb space, you have to have knowledge of UNIX and Html to use the service(to create the page and upload to the site). I wrote the page in Html, downloaded the php script, intalled and changed the file extention from html to php. The site from which i got the php chatbox script say's i have to 'chmod' the directory where the file's are to be created to 777...the script create the file's if they don't exist with 'touch': if(!is_writable($latest) || !is_writable($archive)) { touch($latest); touch($archive) if (!is_writable($latest) || !is_writable($archive)) { exit("$latest or $archive is not writable, please check your permission's and try again"); } One problem i have is the 'chmod'command is not implemented on this site (SunOS 5.8): lftp [EMAIL PROTECTED]:~/public_html/ext> chmod 777 archives chmod: Access failed: 502 SITE command not implemented. (archives) lftp [EMAIL PROTECTED]:~/public_html/ext> i then tryed to do using the php 'chmod' function to 777 on the directory in question, no go. (hey...don't laugh) When i try to use the chatbox in question, i get the error's: Warning: utime failed: Permission denied in /export/home/stratus/public_html/ext/minichat2.inc.php on line 102 Warning: utime failed: Permission denied in /export/home/stratus/public_html/ext/minichat2.inc.php on line 103 /export/home/stratus/public_html/ext/archive/minichat2.latest or /export/home/stratus/public_html/ext/archive/minichat2.archive is not writable. Please check your permissions and try again. those line's are both the touch command's, the file's are not being created, it won't even work if i create them myself. I *hope* that's enough info for a diagnosis. Any help would be welcome. stratis. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php