Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

ERROR administration/submissions.php on line 343 PLS HELP ME

Asked Modified Viewed 3,423 times
L
lklk
L
lklk 10
4EVER WWW.PHP-FUSION.CO.UK and 4EVERY ONE
  • Member, joined since
  • Contributed 53 posts on the community forums.
  • Started 18 threads in the forums
  • Started this discussions
asked
Member

Hi have one problem withe PHOTO ALBUM.

Now i have one error withe my php fusion.

Warning: copy(../images/photoalbum/album_5/alimevarke.jpg) [function.copy]: failed to open stream: Permission denied in /home/lklk/public_html/usa/administration/submissions.php on line 343

Warning: chmod() [function.chmod]: No such file or directory in /home/halban0/public_html/usa/administration/submissions.php on line 344

Warning: imagesx(): supplied argument is not a valid Image resource in /home/lklk/public_html/usa/includes/photo_functions_include.php on line 22

Warning: imagesy(): supplied argument is not a valid Image resource in /home/lklk/public_html/usa/includes/photo_functions_include.php on line 23

Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /home/lklk/public_html/usa/includes/photo_functions_include.php on line 45

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/lklk/public_html/usa/includes/photo_functions_include.php on line 46

Warning: touch() [function.touch]: Unable to create file ../images/photoalbum/album_5/alimevarke_t1.jpg because Permission denied in /home/lklk/public_html/usa/includes/photo_functions_include.php on line 49


PLS HELP ME
0 replies

6 posts

G
GameAction
G
  • Member, joined since
  • Contributed 50 posts on the community forums.
  • Started 2 threads in the forums
answered
Member

are you on windows hosting?
0 replies
E
elbertvan
E
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
answered
Newbie

looks like a rights problem.

If you have root access do chmod -R 777 /home/lklk/public_html/usa/images/*

Otherwise make sure the proper image directories are writable by the webserver (probably your user name) or make them world writable like it is explained when you install the CMS.

Just make sure the image directories are writable.
Edited by elbertvan on 07-12-2008 03:14,
0 replies
L
lklk
L
lklk 10
4EVER WWW.PHP-FUSION.CO.UK and 4EVERY ONE
  • Member, joined since
  • Contributed 53 posts on the community forums.
  • Started 18 threads in the forums
  • Started this discussions
answered
Member

Quote

GameAction wrote:
are you on windows hosting?


Operating system is Linux .
0 replies
L
lklk
L
lklk 10
4EVER WWW.PHP-FUSION.CO.UK and 4EVERY ONE
  • Member, joined since
  • Contributed 53 posts on the community forums.
  • Started 18 threads in the forums
  • Started this discussions
answered
Member

Quote

elbertvan wrote:
looks like a rights problem.

If you have root access do chmod -R 777 /home/lklk/public_html/usa/images/*

Otherwise make sure the proper image directories are writable by the webserver (probably your user name) or make them world writable like it is explained when you install the CMS.

Just make sure the image directories are writable.


Hi elbertvan .

Yes i have one explained with my hosting but i have continue now everything work good just i have now problem with my PhotoAlbum when i go at Administration + User Admin + Submissions + View
Click here to view the photo
The above photo was submitted by lklklk

Do you want to publish or delete this photo?


+ Publish Photo ore Delete Photo.

When i clik Publish Photo i have this error :

Warning: copy(../images/photoalbum/album_5/alimevarke.jpg) [function.copy]: failed to open stream: Permission denied in /home/lklk/public_html/usa/administration/submissions.php on line 343

Warning: chmod() [function.chmod]: No such file or directory in /home/halban0/public_html/usa/administration/submissions.php on line 344

Warning: imagesx(): supplied argument is not a valid Image resource in /home/lklk/public_html/usa/includes/photo_functions_include.php on line 22

Warning: imagesy(): supplied argument is not a valid Image resource in /home/lklk/public_html/usa/includes/photo_functions_include.php on line 23

Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /home/lklk/public_html/usa/includes/photo_functions_include.php on line 45

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/lklk/public_html/usa/includes/photo_functions_include.php on line 46

Warning: touch() [function.touch]: Unable to create file ../images/photoalbum/album_5/alimevarke_t1.jpg because Permission denied in /home/lklk/public_html/usa/includes/photo_functions_include.php on line 49

Here is all with command 777 /home/lklk/public_html/usa/images/*

# images/
# images/imagelist.js
# images/articles/
# images/avatars/
# images/news/
# images/news_cats/
# images/photoalbum/
# images/photoalbum/submissions/
Edited by lklk on 07-12-2008 13:22,
0 replies
E
elbertvan
E
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
answered
Newbie

It still looks like your having a rights problem.
You have some sort of admin pannel for your site like cpannel or directadmin? If you do there are allways file browsers/directory browsers in it.
Browse to this directory: /images/photoalbum/album_5/ where images is directly under your websites root. Check the rights on that directory and if it is world writable.
0 replies
L
lklk
L
lklk 10
4EVER WWW.PHP-FUSION.CO.UK and 4EVERY ONE
  • Member, joined since
  • Contributed 53 posts on the community forums.
  • Started 18 threads in the forums
  • Started this discussions
answered
Member

Quote

elbertvan wrote:
It still looks like your having a rights problem.
You have some sort of admin pannel for your site like cpannel or directadmin? If you do there are allways file browsers/directory browsers in it.
Browse to this directory: /images/photoalbum/album_5/ where images is directly under your websites root. Check the rights on that directory and if it is world writable.


Now i have open dhe file administration/submissions.php

Now i m at line 343

copy(PHOTOS."submissions/".$submit_criteria['photo_file'], $photo_dest.$photo_file);


AND

line 344

chmod($photo_dest.$photo_file, 0644);


What i need to channge here?

Now i m at file :

includes/photo_functions_include.php


Line28,29,48,49,55 :
$thumb_h = $new_h;

} elseif ($old_x > $old_y) {

touch($thumbfile);

What i need to channge here.

Here is file photo_functions_include.php:

<?php
/*---------------------------------------------------+
| PHPFusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../index.php"); exit; }

function createthumbnail($filetype, $origfile, $thumbfile, $new_w, $new_h) {
   
   global $settings;
   
   if ($filetype == 1) { $origimage = imagecreatefromgif($origfile); }
   elseif ($filetype == 2) { $origimage = imagecreatefromjpeg($origfile); }
   elseif ($filetype == 3) { $origimage = imagecreatefrompng($origfile); }
   
   $old_x = imagesx($origimage);
   $old_y = imagesy($origimage);
   
   if ($old_x > $new_w || $old_y > $new_h) {
      if ($old_x < $old_y) {
         $thumb_w = round(($old_x * $new_h) / $old_y);
         $thumb_h = $new_h;
      } elseif ($old_x > $old_y) {
         $thumb_w = $new_w;
         $thumb_h = round(($old_y * $new_w) / $old_x);
      } else {
         $thumb_w = $new_w;
         $thumb_h = $new_h;
      }
   } else {
      $thumb_w = $old_x;
      $thumb_h = $old_y;
   }
   
   if ($settings['thumb_compression'] == "gd1") {
      $thumbimage = imagecreate($thumb_w,$thumb_h);
      $result = imagecopyresized($thumbimage, $origimage, 0, 0, 0, 0, $thumb_w, $thumb_h, $old_x, $old_y);
   } else {
      $thumbimage = imagecreatetruecolor($thumb_w,$thumb_h);
      $result = imagecopyresampled($thumbimage, $origimage, 0, 0, 0, 0, $thumb_w, $thumb_h, $old_x, $old_y);
   }
   
   touch($thumbfile);

   if ($filetype == 1) { imagegif($thumbimage, $thumbfile); }
   elseif ($filetype == 2) { imagejpeg($thumbimage, $thumbfile); }
   elseif ($filetype == 3) { imagepng($thumbimage, $thumbfile); }
}

function image_exists($dir, $image) {
   $i = 1;
   $image_name = substr($image, 0, strrpos($image, "."));
   $image_ext = strrchr($image,".");
   while (file_exists($dir.$image)) {
      $image = $image_name."_".$i.$image_ext;
      $i++;
   }
   return $image;
}
?>






Here is file :administration/submissions.php

<?php
/*---------------------------------------------------+
| PHPFusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "../maincore.php";
require_once BASEDIR."subheader.php";
require_once ADMIN."navigation.php";
include LOCALE.LOCALESET."admin/settings.php";

if (!checkRights("S7") || !defined("iAUTH") || $aid != iAUTH) fallback("../index.php");
$count = 0;

if (isset($_POST['saveoptions'])) {
   dbquery("UPDATE ".$db_prefix."messages_options SET
      pm_email_notify = '".$_POST['pm_email_notify']."',
      pm_save_sent = '".$_POST['pm_save_sent']."',
      pm_inbox = '".$_POST['pm_inbox']."',
      pm_sentbox = '".$_POST['pm_sentbox']."',
      pm_savebox = '".$_POST['pm_savebox']."'
      WHERE user_id='0'"
   );
   redirect(FUSION_SELF.$aidlink);
}

$options = dbarray(dbquery("SELECT * FROM ".$db_prefix."messages_options WHERE user_id='0'"),0);
$pm_inbox = $options['pm_inbox'];
$pm_sentbox = $options['pm_sentbox'];
$pm_savebox = $options['pm_savebox'];

opentable($locale['400']);
require_once ADMIN."settings_links.php";
echo "<form name='optionsform' method='post' action='".FUSION_SELF.$aidlink."&amp;folder=options'>
<table align='center' cellpadding='0' cellspacing='0' width='500'>
<tr>
<td class='tbl2' align='center' colspan='2'>".$locale['707']."</td>
</tr>
<tr>
<td class='tbl' width='50%'>".$locale['701']."<br><span class='small2'>".$locale['704']."</span></td>
<td class='tbl' width='50%'><input type='text' name='pm_inbox' maxlength='4' class='textbox' style='width:40px;' value='".$pm_inbox."'></td>
</tr>
<tr>
<td class='tbl' width='50%'>".$locale['702']."<br><span class='small2'>".$locale['704']."</span></td>
<td class='tbl' width='50%'><input type='text' name='pm_sentbox' maxlength='4' class='textbox' style='width:40px;' value='".$pm_sentbox."'></td>
</tr>
<tr>
<td class='tbl' width='50%'>".$locale['703']."<br><span class='small2'>".$locale['704']."</span></td>
<td class='tbl' width='50%'><input type='text' name='pm_savebox' maxlength='4' class='textbox' style='width:40px;' value='".$pm_savebox."'></td>
</tr>
<tr><td class='tbl' align='center' colspan='2'><br></td></tr>   
<tr>
<td class='tbl2' align='center' colspan='2'>".$locale['708']."</td>
</tr>
<tr>
<td class='tbl' width='50%'>".$locale['709']."</td>
<td class='tbl' width='50%'>
<select name='pm_email_notify' class='textbox'>
<option value='0'".($options['pm_email_notify'] == "0" ? " selected" : "").">".$locale['509']."</option>
<option value='1'".($options['pm_email_notify'] == "1" ? " selected" : "").">".$locale['508']."</option>
</select>
</td>
</tr>
<tr>
<td class='tbl' width='50%'>".$locale['710']."</td>
<td class='tbl' width='50%'>
<select name='pm_save_sent' class='textbox'>
<option value='0'".($options['pm_save_sent'] == "0" ? " selected" : "").">".$locale['509']."</option>
<option value='1'".($options['pm_save_sent'] == "1" ? " selected" : "").">".$locale['508']."</option>
</select>
</td>
</tr>
<tr>
<td align='center' colspan='2' class='tbl'><span class='small2'>".$locale['711']."</span></td>
</tr>
<tr>
<td align='center' colspan='2' class='tbl'><br>
<input type='submit' name='saveoptions' value='".$locale['750']."' class='button'>
</td>
</tr>
</table>
</form>\n";
closetable();

echo "</td>\n";
require_once BASEDIR."footer.php";
?>


Pls help me what i need to channgeThanks for all Answer.
Edited by lklk on 07-12-2008 19:14,
0 replies

Category Forum

Bugs and Errors - 6

Labels

None yet

Statistics

  • Views 0 views
  • Posts 6 posts
  • Votes 0 votes
  • Topic users 3 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet