Koozali.org: home of the SME Server

help needed config Apache

Offline mgb

  • *****
  • 558
  • +0/-0
help needed config Apache
« on: February 21, 2008, 03:21:32 PM »
i get eroor www.web site
to uploaded-file from index.php
i test my web site in  xampp for windows is work ok http:\\217.194.194.156   
(www.apachefriends.org/en/xampp-windows.html)
in sme server 7.3 is not work

error.log  ftp://217.194.194.156/1.bmp
 
function.move-uploaded-file 

i config sme
Information bay name w   
Description   
Group   Admin 
User access via file sharing or user ftp 
 Write = admin, Read = groupWrite = group, Read = everyoneWrite = group, Read = group
Public access via web or anonymous ftp   Entire Internet (no password required)Entire Internet (password required)Entire Internet (password required outside local network)Local network (no password required)Local network (password required)No access
Execution of enahled
 chown -R www /home/e-smith/files/ibays/w/html/*
is not uploaded-file ?
« Last Edit: February 21, 2008, 03:25:28 PM by mgb »
Thanks all for helping
Skype yosii2009

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: help needed config Apache
« Reply #1 on: February 21, 2008, 03:41:29 PM »
chown -R www /home/e-smith/files/ibays/w/html/*
is not uploaded-file ?
AFAIK you do not need to chown files in ibays provided you upload with one of the users that has access to the ibays.

Please post the output of the following command run as root user on the server shell and replace the ibayname with the name of your ibay (probably Primary):
Code: [Select]
db accounts show ibayname
Please try to explain your problem as clear as you can and make some work on the format of your post to make it more readable to other users, this might improve the level of support you will be receiving.

For instance I can not see what the setting is for access to users from the entire internet, is this no, with or without a password? You just seem to have posted possible options and not the configuration you implemented.

I have trouble understanding what you have done and what your problem seems to be. Judging from the error message you provided it seems that you are trying to upload to a folder outside the scope of the ibay, dus to security implications this is not allowed. Try to configure your application to upload images to the files folder of the ibay.

Please post the contents of the /var/log/http/access_log and /var/log/httpd/error_log at the time the error occured, to see if I am correct.

Two other word of serious advice is to immediately reconfigure your application not to use the mysql root user accoutn, see the wiki on how to create proper users for applications that need to access a mysql database: http://wiki.contribs.org/MySQL#Administration

And start reading the manual, if you are done do it again and if finished read it once more, yes you read that correct I am suggesting that you read the manual at least three times!
« Last Edit: February 21, 2008, 03:50:58 PM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline mgb

  • *****
  • 558
  • +0/-0
Re: help needed config Apache
« Reply #2 on: February 21, 2008, 05:55:11 PM »
sore..
is mysql is OK http://217.194.194.155  is not ...156
 ftp://217.194.194.156/error_log.txt
ftp://217.194.194.156/access_log.txt

login from https://myserver/loginuploaded-file.php
user
password

OK
uploaded-file from my pc to myserver http://myserver/w/
is begin to work the stop error load file
the is look the link is no good
 
db accounts show w
w=ibay
    CgiBin=enabled
    Gid=5000
    Group=admin
    Name=w
    PasswordSet=no
    PublicAccess=global
    Uid=5000
    UserAccess=wr-admin-rd-group
[root@n ~]#





0] "GET /server-common/css/sme_h
new 192.168.183.2 - - [21/Feb/2008:12:19:01 +0200] "GET /server-manager/initial.
new 192.168.183.2 - - [21/Feb/2008:12:19:02 +0200] "GET /server-common/css/sme_c
new 192.168.183.2 - - [21/Feb/2008:12:19:02 +0200] "GET /server-common/css/sme_m
new 192.168.183.2 - - [21/Feb/2008:12:19:20 +0200] "GET / HTTP/1.1" 200 364 "-"
ne
« Last Edit: February 21, 2008, 07:43:21 PM by mgb »
Thanks all for helping
Skype yosii2009

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: help needed config Apache
« Reply #3 on: February 21, 2008, 08:41:12 PM »
sore..
is mysql is OK http://217.194.194.155  is not ...156
 ftp://217.194.194.156/error_log.txt
Did you change the default certificate? It seems your webserver is restarting over and over again or is this something you are doing yourself?
I see some referrences to xampp. Did you install that on SME Server? If so please remove it as you do not need it, all functionality of xampp is available by SME Server plus more.

It would be nice if you could be a little more specific in posting the relevant section of your server log files as it is quite hard to understand what occurs when you try anything from over 10 hours of log data, it would help if you specify which file you are trying to access and post only the relevant section of the log file from around the time you tried and received the error.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline mgb

  • *****
  • 558
  • +0/-0
Re: help needed config Apache
« Reply #4 on: February 22, 2008, 07:37:59 AM »
sore my engelis no good
i am test install xappm to sme the is work ok is not loginuploaded-file.php
i am stop xappm
howto chek my error log ? sme


config.php
function upload($file, $dir) {
   if (@$_FILES[$file]["name"]) {
      $newFileName = @$_FILES[$file]["name"];
      $newFileType = @$_FILES[$file]["type"];
      $newFileLocation = @$_FILES[$file]["tmp_name"];
      $newFileSize = @$_FILES[$file]["size"];
      $newFileExt = strrev(substr(strrev($newFileName), 0, strpos(strrev($newFileName), ".")));
      $newFileName = str_replace(" ", "", microtime()).'.'.$newFileExt;
      if($newFileName != "") {      
         if($newFileSize == 0)
            $log = "file is empty";
         if(in_array(strtolower($newFileExt), array("gif","jpg","jpeg","bmp","tiff","tif","png","doc", "rtf", "pdf","xls","txt","ppt"))) {
            #print @$_SERVER["DOCUMENT_ROOT"] . "/$dir/<br>";
            #print $newFileLocation;
            #exit;
            if(@copy($newFileLocation, @$_SERVER["DOCUMENT_ROOT"] . "/$dir/" . $newFileName)) {
               $log = "$newFileName successfully uploaded";
               return $newFileName;
            }
            else {
Thanks all for helping
Skype yosii2009

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: help needed config Apache
« Reply #5 on: February 22, 2008, 11:48:40 AM »
sore my engelis no good
i am test install xappm to sme the is work ok is not loginuploaded-file.php
i am stop xappm
howto chek my error log ? sme
You should not install xampp on SME Server, as the functionality provided by Xampp is already provided by SME Server, like I stated in an earlier post. I think you are best off understanding the funtionality SME Server provides by reading the manual carefully and perhaps we can help you a bit by knowing what you want to achieve, what your goal is.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline mgb

  • *****
  • 558
  • +0/-0
Re: help needed config Apache
« Reply #6 on: February 22, 2008, 06:40:42 PM »
i am install xappm because  loginuploaded-file.php is not woke in sme-server
i
to install xappm is only to copy to sme -
stop the serves apahe sme - start apahe in xappm
the file loginuploaded-file.php is not work  because premishn to apahe to upload file
error
 warning: Divisin by zero in /home/e-smith/files/ibays/Primary/w/html/config.php on line 207
warning: Divisin by zero in /home/e-smith/files/ibays/Primary/w/html/config.php on line 209

 
 config.php   [
                      if (!strstr($thumbnailwidth, "%")) {^
                                if($size[0] > $size[1]) {^
                                        $ratio = $size[0]/$thumbnailwidth;^
                                        $height = $size[1]/$ratio;^
                                        $height = round($height);^
                                        $width = $size[0]/$ratio;^
                                } else {^
    207 line           $ratio = $size[1]/$thumbnailwidth;^
                                        $width = $size[0]/$ratio;^
   line 209            $width = round($width);^
                                        $height = $size[1]/$ratio;^
                                }^
                        } else {^
                                $ratio = str_replace("%", "", $thumbnailwidth)/1
                                $width = round($size[0]*$ratio);^
                                $height = round($size[1]*$ratio);^
                        }^
                }^
                // Create new image (true colour if available).^
              if ($error == 0) {^
     220 line                   if (function_exists('imagecreatetruecolor')) {^
                                $newimg = imagecreatetruecolor($width, $height);
 
error
 warning imagecreatetruecolor():invalid dimensions in /home/e-smith/files/ibays/Primary/w/html/config.php on line 220
 
Thanks all for helping
Skype yosii2009

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: help needed config Apache
« Reply #7 on: February 23, 2008, 12:29:28 AM »
i am install xappm because  loginuploaded-file.php is not woke in sme-server
i
to install xappm is only to copy to sme -
stop the serves apahe sme - start apahe in xappm
It will certainly give you more problem than trying to find and fix the error on SME Server, it is of no use and will certainly be causing you more problems than trying to fix the issue you are having.

[
the file loginuploaded-file.php is not work  because premishn to apahe to upload file
error
 warning: Divisin by zero in /home/e-smith/files/ibays/Primary/w/html/config.php on line 207
warning: Divisin by zero in /home/e-smith/files/ibays/Primary/w/html/config.php on line 209

 
 config.php   [
                      if (!strstr($thumbnailwidth, "%")) {^
                                if($size[0] > $size[1]) {^
                                        $ratio = $size[0]/$thumbnailwidth;^
                                        $height = $size[1]/$ratio;^
                                        $height = round($height);^
                                        $width = $size[0]/$ratio;^
                                } else {^
    207 line           $ratio = $size[1]/$thumbnailwidth;^
                                        $width = $size[0]/$ratio;^
   line 209            $width = round($width);^
                                        $height = $size[1]/$ratio;^
                                }^
                        } else {^
                                $ratio = str_replace("%", "", $thumbnailwidth)/1
                                $width = round($size[0]*$ratio);^
                                $height = round($size[1]*$ratio);^
                        }^
                }^
                // Create new image (true colour if available).^
              if ($error == 0) {^
     220 line                   if (function_exists('imagecreatetruecolor')) {^
                                $newimg = imagecreatetruecolor($width, $height);
 
error
 warning imagecreatetruecolor():invalid dimensions in /home/e-smith/files/ibays/Primary/w/html/config.php on line 220
Judging from the code you pasted the error is caused by $ratio not being set properly, it has a value of zero, you need to find out why as I can not determine that from the code you posted.

BTW next time if you post code use the
Code: [Select]
[code ][/ code] tags for it, it makes it more readable
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline mgb

  • *****
  • 558
  • +0/-0
Re: help needed config Apache
« Reply #8 on: February 23, 2008, 09:30:52 AM »
print /galleries/gal_27/
print /tmp/phpTu224T/tmp/phpTu224T

   print @$_SERVER["DOCUMENT_ROOT"] . "/$dir/<br>";
             print $newFileLocation;
            #exit;
            if(@copy($newFileLocation, @$_SERVER["DOCUMENT_ROOT"] . "/$dir/" . $newFileName)) {
               $log = "$newFileName successfully uploaded";
               return $newFileName;
            }
            else {
               $log = "$newFileName unsuccessfully uploaded";
            }
         }
         else {
            $log = "Invalid file type";


if ($error == 0) {
         if (!strstr($thumbnailwidth, "%")) {
            if($size[0] > $size[1]) {
               $ratio = $size[0]/$thumbnailwidth;
               $height = $size[1]/$ratio;
               $height = round($height);
               $width = $size[0]/$ratio;
            } else {
               $ratio = $size[1]/$thumbnailwidth;
               $width = $size[0]/$ratio;
               $width = round($width);
               $height = $size[1]/$ratio;


Thanks all for helping
Skype yosii2009

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: help needed config Apache
« Reply #9 on: February 23, 2008, 09:35:18 AM »
print /galleries/gal_27/
print /tmp/phpTu224T/tmp/phpTu224T

   print @$_SERVER["DOCUMENT_ROOT"] . "/$dir/<br>";
             print $newFileLocation;
            #exit;
            if(@copy($newFileLocation, @$_SERVER["DOCUMENT_ROOT"] . "/$dir/" . $newFileName)) {
               $log = "$newFileName successfully uploaded";
               return $newFileName;
            }
            else {
               $log = "$newFileName unsuccessfully uploaded";
            }
         }
         else {
            $log = "Invalid file type";


if ($error == 0) {
         if (!strstr($thumbnailwidth, "%")) {
            if($size[0] > $size[1]) {
               $ratio = $size[0]/$thumbnailwidth;
               $height = $size[1]/$ratio;
               $height = round($height);
               $width = $size[0]/$ratio;
            } else {
               $ratio = $size[1]/$thumbnailwidth;
               $width = $size[0]/$ratio;
               $width = round($width);
               $height = $size[1]/$ratio;



Next time use the code tag!

There is not much we can do with this code as I have no context what so ever, you need to check the flow of your program yourself and do some debugging to see if variables have the proper value at execution. There is nothing we can do for you with the above. Besides it is off topic since it is not SME Server related, but PHP code related.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline mgb

  • *****
  • 558
  • +0/-0
Re: help needed config Apache
« Reply #10 on: March 15, 2008, 04:56:04 AM »
new upfile.php
 work in sme server

http://217.194.194.156/wr/

 
Thanks all for helping
Skype yosii2009