upload fails with joomla CMS

Discussion in 'Installation/Configuration' started by robd, Jan 6, 2006.

  1. robd

    robd New Member

    Hello,

    Perhaps someone has some insight as to why I can not upload images to the CMS tool joomla running on a client site in my ispconfig setup.

    Here's the output of my httpd log

    Code:
    84.45.205.50 - - [06/Jan/2006:09:55:19 -0500] "POST /administrator/index2.php HTTP/1.1" 301 - "http://neilnerva.org/administrator/index2.php?option=com_media&listdir=/&mosmsg=Upload+FAILED" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6"
    84.45.205.50 - - [06/Jan/2006:09:55:19 -0500] "GET /administrator/index2.php?option=com_media&listdir=/&mosmsg=Upload+FAILED HTTP/1.1" 200 18505 "http://neilnerva.org/administrator/index2.php?option=com_media&listdir=/&mosmsg=Upload+FAILED" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6"
    84.45.205.50 - - [06/Jan/2006:09:55:21 -0500] "GET /administrator/index3.php?option=com_media&task=list&listdir= HTTP/1.1" 200 46860 "http://neilnerva.org/administrator/index2.php?option=com_media&listdir=/&mosmsg=Upload+FAILED" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6"
    
    And here's what is in my error log as I make an upload.
    Code:
    [Fri Jan 06 09:55:19 2006] [error] an unknown filter was not added: PHP
    [Fri Jan 06 09:55:19 2006] [error] an unknown filter was not added: PHP
    [Fri Jan 06 09:55:19 2006] [error] an unknown filter was not added: PHP
    [Fri Jan 06 09:55:19 2006] [error] an unknown filter was not added: PHP
    [Fri Jan 06 09:55:21 2006] [error] an unknown filter was not added: PHP
    [Fri Jan 06 09:55:21 2006] [error] an unknown filter was not added: PHP
    My directories on the server are all set with permissions 755 (as per this thread.

    Should I investigate php as su_exec (as per this thread?)

    thank you in advance for any input!
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Please post the output of
    Code:
    ls -la /path/to/upload_directory
    (replace /path/to/upload_directory with the directory that Joomla tries to upload to).
     
  3. robd

    robd New Member

    I believe that I am uploading to /home/www/web1/web
    Code:
    -bash-3.00$ ls -la images/
    total 116
    drwxrwxr-x   6 web1_neilnerva web1 4096 Nov 20 23:44 .
    drwx-wxr-x  17 web1_neilnerva web1 4096 Dec 27 08:26 ..
    drwxrwxr-x   2 web1_neilnerva web1 4096 Nov 20 23:44 M_images
    -rwxrwxr-x   1 web1_neilnerva web1 1352 Nov 20 23:41 apply_f2.png
    -rwxrwxr-x   1 web1_neilnerva web1 1648 Nov 20 23:41 archive_f2.png
    -rwxrwxr-x   1 web1_neilnerva web1 1620 Nov 20 23:41 back_f2.png
    drwxrwxr-x   2 web1_neilnerva web1 4096 Nov 20 23:44 banners
    -rwxrwxr-x   1 web1_neilnerva web1  151 Nov 20 23:41 blank.png
    -rwxrwxr-x   1 web1_neilnerva web1  564 Nov 20 23:41 cancel.png
    -rwxrwxr-x   1 web1_neilnerva web1 1457 Nov 20 23:41 cancel_f2.png
    -rwxrwxr-x   1 web1_neilnerva web1 1776 Nov 20 23:41 css_f2.png
    -rwxrwxr-x   1 web1_neilnerva web1 1719 Nov 20 23:41 edit_f2.png
    -rwxrwxr-x   1 web1_neilnerva web1 1150 Nov 20 23:41 favicon.ico
    -rwxrwxr-x   1 web1_neilnerva web1 1744 Nov 20 23:41 html_f2.png
    -rwxrwxr-x   1 web1_neilnerva web1   44 Nov 20 23:41 index.html
    -rwxrwxr-x   1 web1_neilnerva web1 7200 Nov 20 23:41 joomla_logo_black.jpg
    -rwxrwxr-x   1 web1_neilnerva web1  190 Nov 20 23:41 menu_divider.png
    -rwxrwxr-x   1 web1_neilnerva web1 1655 Nov 20 23:41 new_f2.png
    -rwxrwxr-x   1 web1_neilnerva web1 2404 Nov 20 23:41 powered_by.png
    -rwxrwxr-x   1 web1_neilnerva web1 1699 Nov 20 23:41 preview_f2.png
    -rwxrwxr-x   1 web1_neilnerva web1 1800 Nov 20 23:41 publish_f2.png
    -rwxrwxr-x   1 web1_neilnerva web1  698 Nov 20 23:41 save.png
    -rwxrwxr-x   1 web1_neilnerva web1 1822 Nov 20 23:41 save_f2.png
    drwxrwxr-x   2 web1_neilnerva web1 4096 Nov 20 23:44 smilies
    drwxrwxr-x   4 web1_neilnerva web1 4096 Nov 20 23:44 stories
    -rwxrwxr-x   1 web1_neilnerva web1 1525 Nov 20 23:41 unarchive_f2.png
    -rwxrwxr-x   1 web1_neilnerva web1 1679 Nov 20 23:41 unpublish_f2.png
    -rwxrwxr-x   1 web1_neilnerva web1 1658 Nov 20 23:41 upload_f2.png
    -bash-3.00$ 
    these permissions are 755, no?
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Please make sure if you're uploading to /home/www/web1/web or to a subdirectory.

    The permissions of /home/www/web1/web are 775, which means the owner web1_neilnerva and the group web1 are allowed to read (4), write (2) and execute (1); all others are only allowed to read and execute, but not to write (which includes uploads). I guess Apache is running as another user and group so you would have to make the upload directory world writable:
    Code:
    chmod 777 /path/to/upload_directory
     
  5. maxgen

    maxgen New Member

    PHP in Apache with the CMS Joomla(prior to 1.5 i.e. 1.0.x) wants to run with user apache and group apache:

    So to get a web running with joomla I have found I need to chown it and chmod it thus-
    [fedora core 5 paths]
    expand the joomla files or upload them to /var/www/webxx which you have created in ispconfig with the user webxx_user and a suitable db and db user (webxx_db1 & webxx_u1 with 'somepassword')
    This will give the files in /var/www/webxx/web the user and group ownership of webxx_user and webxx.
    Then from /var/www/webxx run the following

    chown -R -v -f apache:apache web/*

    then run from the same place

    chmod -R -v 775 web/*

    once you have done this then run your joomla install from your web browser via your chosen dns. (not pretty but it works for me - you could probably write a shell script if you were doing it often.)

    PHP5 in this fedora pefect install causes some issues and I haven't worked them out yet.:confused:
     
  6. falko

    falko Super Moderator Howtoforge Staff

    What kind of problems do you have with PHP5?
     
  7. maxgen

    maxgen New Member

    Sorry only just seen this post >

    It is not (to the best of my knowledge) an ISPConfig problem. Some Joomla Components or mods etc. have issues with PHP5 especially with parsing configs for display/css etc. Alterarions to the PHP in the component often seem to resolve it but sometimes just abandoning the component is the best way.

    Debugging generally works out the error or a search on the related forum. I know the issues exist because on a commercial site with PHP4.x the Joomla installs just work and yet on the ISPConfig box they have PHP errors.
     
  8. djtremors

    djtremors New Member

    You will have these problems if you have safe mode on.
    If it's turned off and you have set the 'chmod 777' on the appropriate directories then all is well.
    ie.
    components
    media
    administrator
    images
    .
    .etc.

    I have my joomla working fine (1.0.10) and with safemode on (all php_admin_values except 'safemode On' to make CMS easier to work with).

    Another option if you really want safe mode on is to use safe mode in GID mode and then chmod g+s the directories and it'll always work which I did but then opted for the simpler version. suphp was too much of a pain to get working for me at the time.
     

Share This Page