1josh13 Posted April 18, 2009 Share Posted April 18, 2009 Hello everyone, Im Josh, and Im somewhat new at php coding. I have a friend that gave me an internet application for a game called eve online.The tool uses a members API information to let the person manage data. However when I go to add my personal API user ID and key, I get the following errors: Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/account/Characters.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/A/corp/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/A/char/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/corp/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/char/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/C/corp/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/C/char/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/corp/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/char/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/P/corp/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/P/char/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/corp/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/char/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/P/corp/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/P/char/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/corp/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/char/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/G/corp/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/G/char/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/corp/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/char/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/S/corp/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/S/char/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/corp/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 Warning: mkdir() [function.mkdir]: Permission denied in /home/evewebsp/public_html/v2/api/class/class.api.php on line 749 Warning: fopen(./xmlcache/1544856/char/AccountBalance.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/evewebsp/public_html/v2/api/class/class.api.php on line 752 query errorINSERT INTO `evetool_forum`.`api_keys` (`keyID`, `user`, `userID`, `key`, `keyType`, `LastCheckDate`) VALUES (NULL, '1', '1544856', 'kk876vDJV32O0cjQAvLAjNGIxznSFzqNOAhOlzUuOUUE55IxJp0iGb9C7YMLxeDK', '3', NOW()); The code for the class.api.php file is below included are lines 747 to 759: function store($contents, $path) { if (!file_exists(dirname($path))) { mkdir(dirname($path), 0777, true); } $fp = fopen($path, "w"); if ($fp) { fwrite($fp, $contents); fclose($fp); } else { if ($this->debug) { $this->addMsg("Error", "Could not open file for writing: " . $path); If anyone could assist me in this error, I would be grateful. Thanks! -Josh Quote Link to comment https://forums.phpfreaks.com/topic/154582-solved-coding-help/ Share on other sites More sharing options...
Maq Posted April 18, 2009 Share Posted April 18, 2009 The first error is because the user you're executing "mkdir" doesn't have correct permissions to perform that command. If you're running as root you can just use "sudo mkdir" but I doubt you do if this a shared server. Are you testing this on your local machine? The second error should go away if you fix the first. Quote Link to comment https://forums.phpfreaks.com/topic/154582-solved-coding-help/#findComment-812838 Share on other sites More sharing options...
1josh13 Posted April 18, 2009 Author Share Posted April 18, 2009 No sir, I use a reseller account that was given to me. When you say "user" Does it mean my user to get into cpanel and all that? or the user for the database? Quote Link to comment https://forums.phpfreaks.com/topic/154582-solved-coding-help/#findComment-812841 Share on other sites More sharing options...
Maq Posted April 18, 2009 Share Posted April 18, 2009 When you say "user" Does it mean my user to get into cpanel and all that? or the user for the database? Neither. I mean the user these scripts are running as on your actual server. Quote Link to comment https://forums.phpfreaks.com/topic/154582-solved-coding-help/#findComment-812843 Share on other sites More sharing options...
1josh13 Posted April 18, 2009 Author Share Posted April 18, 2009 Well sir, I dont really know whats your saying, As far as I know, theres no "user" the scripts are running as, under my cpanel, i went to error log and here are one of the following errors: [Fri Apr 17 19:49:48 2009] [error] [client 71.36.188.227] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: Permission denied in /home/user/public_html/v2/api/class/class.api.php on line 749, referer: http://www.website.com/v2/api/index.keys.php Quote Link to comment https://forums.phpfreaks.com/topic/154582-solved-coding-help/#findComment-812846 Share on other sites More sharing options...
Maq Posted April 18, 2009 Share Posted April 18, 2009 Just like most OS's Linux has users that are given special permissions. If your user does not have matched permissions to edit/delete/update/modify etc... then you will receive these errors. I've never used a reseller account. Do you, by any chance, have SSH access? Quote Link to comment https://forums.phpfreaks.com/topic/154582-solved-coding-help/#findComment-812849 Share on other sites More sharing options...
1josh13 Posted April 18, 2009 Author Share Posted April 18, 2009 Not on this cpanel, I do not have SSH access, I could maybe get it, but not until I contact an admin. I do have SSH access on a different webhosting provider, but do not want to link people to the other sites hosted there, and because I wouldnt be able to host other accounts, it would not be an option anyways. Quote Link to comment https://forums.phpfreaks.com/topic/154582-solved-coding-help/#findComment-812851 Share on other sites More sharing options...
meomike2000 Posted April 18, 2009 Share Posted April 18, 2009 most likely the user would need to have permission to write to the folder that u want to create the directory in.... that username is most likely WWW-DATA.... Quote Link to comment https://forums.phpfreaks.com/topic/154582-solved-coding-help/#findComment-812874 Share on other sites More sharing options...
1josh13 Posted April 18, 2009 Author Share Posted April 18, 2009 Well I contacted support via support ticket, lets see if they will allow my account to haev these permissions Quote Link to comment https://forums.phpfreaks.com/topic/154582-solved-coding-help/#findComment-812881 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.