Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: File Upload not working in PHP

  1. #1

    Default File Upload not working in PHP

    Hello

    We have a web application written in PHP5. The same code works on XaMPP/Enterprise linux and XAMPP/Windows. However the code doesn't work on Suse Linux. I have tried everything possible. It looks like something at system level stopping the file upload process.

    Does it have anything to do with SELINUX?? The xampp server on enterrprie linux has a little box on the bottom that say SELinux = T-file. but I don't see that box on suse linux.

    Any clue ?? Need some help real bad.

    Thanks
    Websoul

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,005

    Default Re: File Upload not working in PHP

    Welcome here.

    I am afraid that you did not provide much information. Not even which version of openSUSE you are running. And as you say somewhere "Suse Linux", it could even be that you do not have openSUSE at all, but SLES (or SLED). In which case you are at the wrong forum. The SLED/SLES forum is at: SUSE Forums
    Henk van Velden

  3. #3

    Default Re: File Upload not working in PHP

    Henk,

    Sorry about that! We are running suse 11.2. All other functionality of the website is working correctly except this file upload which is critical to the business. I will appreciate greatly if I can fix this issue by tomorrow.

    = I have already checked php.ini, already made the directory writable , checked Apache setting to make sure directory entries are correct. My programmer have given up and I think it is something in the OS that we need to fix/setup..

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,005

    Default Re: File Upload not working in PHP

    Quote Originally Posted by websoul67 View Post
    Henk,

    Sorry about that! We are running suse 11.2.
    That does not bring us much further. Is this openSUSE 11.2 (which is not supported anymore btw) or SUSE 11 service pack 2.
    Please be precise in what you say. It seems that you are in a critical situation, thus do not loose much time in providing vague statements.
    Henk van Velden

  5. #5

    Default Re: File Upload not working in PHP

    Henk,

    It is 11 service pack 2.

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,005

    Default Re: File Upload not working in PHP

    Well, that is SLED/SLES. I say again, you are at the wrong forums. The link to the correct one is in my first post above.

    People here might be able to help you, but the majority never used SLED/SLES. I did never.

    That said, your problem might point to access denied somewhere. When you decide to ask further here and not at the SLES/SLED forums (you could go for both of course), you should provide real technical information. Most what you said is just some explanation that should go with the technical facts that are missng.

    E.g. when you say "already made the directory writable", you should tell which directory and at best post what it's ownership and access bits are now by posting the command and the output:
    Code:
    ls -ld <path-to-and-name-of-that-directory>
    And why we are at it, as access is for user/group/world, it is important to know which user/group runs the PHP scripts and that is the same user/group that runs the Apache server. And the output of
    Code:
    ps -ef | grep apache
    will tell us.

    And so on. Just saying that you checked something without showing us what you saw is useless. You have a problem, thus you most prrobably did NOT see something that others might see. But only when there is something to look at.

    BTW do not forget to use CODE tags about that copied/pasted output. See: http://forums.opensuse.org/english/i...ags-guide.html
    Henk van Velden

  7. #7
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,806
    Blog Entries
    14

    Default Re: File Upload not working in PHP

    Hi,

    In modern PHP environments, you cannot just change the folder permissions to 777 and files to 666. Perms working elsewhere should work on openSUSE. But ....... who is the owner of the webcontent? On openSUSE the owner-group should be wwwrun-www. Please check. Also, check whether the appropriate php modules have been installed, apache restarted after addition of php modules.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  8. #8

    Default Re: File Upload not working in PHP

    The owner is wwwrun. I have installed all module related to PHP. Apache have been restarted many times. The worst part is I do not have any error for this stupid thing not working. The only difference between my old Oracle Linux (xampp) and Suse (lampp) is that the former has SELINUX installed where Suse I don't have SELINUX installed. In the XAMPP set up, I see a SELINUX= 't-file' on the window granting write authority to the folder.

  9. #9

    Default Re: File Upload not working in PHP

    Maybe I am giving you and info you already know but did you use in your code something like this to see the errors?


    Code:
    <?php
        error_reporting(E_ALL);
        ini_set("display_errors", 1); 
    ?>
    If the file is big, could be an issue of php.ini settings related to file size, memory limit, execution time.

    Are the paths for uploads correctly passed?

    Cheers.

  10. #10

    Default Re: File Upload not working in PHP

    Yes I did!! The problem is it doesn't throw any error in log or in the screen.

    I took the advice from the gentleman above and compared the modules between the working Linux (oracle ) and non working (SUSE) and found that the SUSE linux has missing many modules. Now the question is how do i install these module.?

    ====

    Quote Originally Posted by ghostintheruins View Post
    Maybe I am giving you and info you already know but did you use in your code something like this to see the errors?


    Code:
    <?php
        error_reporting(E_ALL);
        ini_set("display_errors", 1); 
    ?>
    If the file is big, could be an issue of php.ini settings related to file size, memory limit, execution time.

    Are the paths for uploads correctly passed?

    Cheers.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •