hi all,

i've installed drupal on my win2k3 server running:

drupal 4.6.0
now upgraded to 4.6.1 (but have same issues)

php.4.3.11
mysql 4.latest

setup goes well, and i've customized it for my reqs.
installed many modules. and all are working fine on this configuration.

now i've purchased a paid linux hosting running:

php 4.3.11
mysql 4.somthing, (there are no db issues with my prob)
apache

because i've setup my drupal installation on win2k3, i've not enabled clean urls, and its not necessary for me.

i've uploaded the current installed drupal to my new hosting, dumped db from win2k3 mysql to new hosting mysql. on the first run it worked.

now i'm having following errors, which are stupid, because i belive that mysql, php and overall drupal should run better on linux. but in my case its running well on win2k3 not on linux :|

i am facing these probs with drupal running on my linux hosting:

1) i'm logged in as admin(used/1), i goto diffirent admin sections on my drupal site and do delete action. when i goto drupal log, i see following messages:

    access denied Jun 26 2005 - 7:06am node/44/edit denied access. Anonymous view details 
    access denied Jun 26 2005 - 7:06am node/44/edit denied access. Anonymous view details 
    access denied Jun 26 2005 - 7:06am node/44/edit denied access. Anonymous view details 
    content Jun 26 2005 - 7:06am story: deleted testing 123. admin  details 

if i perform same actions on my local win2k3 installation, there are not a single message like that.

details of the acccess denied error shows these:

details
Type access denied 
Date Sunday, June 26, 2005 - 7:06am 
User Anonymous 
Location /?q=node/44/edit&destination=admin%2Fnode 
Message node/44/edit denied access. 
Severity warning 
Hostname xxxxxxx

2) i am unable to upload any kind of file. i get this error: "File copy failed: source file does not exist.". also, im unable to find "tmp" directory for drupal site, on my local setup, i used c:\windows\temp, but on my linux host what it should be? i donno :|
i simply put "websitetemp" in the temp dir field, and it showed me message that there's a new dir created named files\websitetemp.

3)image module is also not working, it gives following errors when i try to upload new image:

Invalid argument supplied for foreach() in /home/myuser/public_html/modules/image/image.module on line 310.

Cannot modify header information - headers already sent by (output started at /home/myuser/public_html/includes/common.inc:384) in /home/myuser/public_html/includes/common.inc on line 192.

4) i've also notice that when i goto admin>users and try to delete any user and clicks the deleted link, the confirmation page does not apear at all, users list is shown, and user is not deleted.
when i clicks the user name and goto its account>edit and perform delete, it works.

5) PHPSESSID is apearing on POST actions, and and does not apear on other pages. i think this is making some probs with users not getting deleted.

i'm eagerly waiting for response with solutions to my probs. kindly try tell me solution breifly so i can understand it and fix my drupal site.

many thanks in adv.

// chall3ng3r //

Comments

kmo’s picture

It appears that a few of the errors you have described (2 and 3) are the result of incorrect file system permissions. Chances are that the user running the web server (usually called nobody) does not have write permission to the various directory it needs.

In relation to 2, it depends on your ISP, but usually the temporary directory is called /tmp. In addition, you will need to set the permission of your file system path (usually called files) to be writable by the web server. If you have shell access to the linux server, this command will usually work:

chmod o+w directory_name

You will need to do a similar thing to the "Default image path", "Default thumb path" and "Temporary image path" for image.module.

chall3ng3r’s picture

my hosting does not provide me shell support. i use FlashFXP for FTP and web-based filemanager to do these things.

i'm not familiar with linux permissions things. so kindly tell me permissions settings in number format, like 755 or 644 or 777. i can easily change the permissions using FlashFXP a good FTP program.

i'm also unable to find correct permissions for all the drupal files & folders.

i'm printing a directory tree here, please write the correct permissions for folders in fornt of them. also tell if all the files in the folder should have same permissions as the folder?

in the list below you'll also find what extra modules i'm using on my drupal site.

+---files
|   +---images
|   |   \---temp
|   +---pictures
|   \---websitetemp
+---grafix
+---includes
+---misc
+---modules
|   +---buddylist
|   |   \---po
|   +---dba
|   |   \---scripts
|   +---feedback
|   |   \---po
|   +---image
|   |   \---po
|   +---img_assist
|   |   \---po
|   +---legal
|   +---notify
|   |   \---po
|   +---sitemenu
|   +---site_map
|   \---tinymce
|       +---plugins
|       |   \---drupalimage
|       |       +---images
|       |       \---langs
|       \---tinymce
|           +---docs
|           \---jscripts
|               \---tiny_mce
+---scripts
+---sites
|   \---default
\---themes
    +---bluemarine
    +---chameleon
    |   \---marvin
    +---engines
    |   +---phptemplate
    |   \---xtemplate
    \---pushbutton

i think the prob 1 i described in my first post also is because of incorrect permissions.

on my linux host, i've these directories at root level:

public_html
tmp
.mail
...

the drupal is setup in public_html folder which is wwwroot. can i use this tmp folder which is located outside the public_html folder?

thanks,

// chall3ng3r

chall3ng3r’s picture

keen for reply!!!

// chall3ng3r //

kmo’s picture

I think 757 should work. However, you should set this permission for only the directories that need it (see my earlier comment). From your directory structure, you will need this permission for files, and all subdirectories underneath that.

This follows the principle that one should give only as much permission for something to work, and no more.

Yes you can use /tmp, but make sure (1) your web server can write to it, and (2) you put the / when you set your Drupal options.

If that doesn't work, just create a directory under your web root, and again, set the correct permissions.

chall3ng3r’s picture

thanks for the reply, but things are still not working.

i've just reinstalled drupal with new 4.6.1 clean install. setup the files as 777 and /home/myaccount/tmp as 777.

enabled upload module, when i try to attach any type of file, it does not give any errors, nor log entry. but file is not attached. and in attachments list i get this:

http://www.mywebsite.com/test2/files/_0 bytes 

the core issues is upload is not working. when it'll start working, then i'll need to get working the image thing. but i've to fix this first.

// chall3ng3r //

kmo’s picture

The only thing I can think of at this stage is that there is something wrong with the way PHP is configured at your ISP's web server, or there is still more configuration outside of Drupal to do.

I'll explain what actually happens when a file is uploaded in PHP and Drupal.

1. When a file is uploaded, it is written to a first temporary directory. This directory is determined by your ISP in its configuration of PHP.

2. Drupal then moves it to its own temporary directory. This directory is determined by you in your Durpal configuration (/home/myaccount/tmp). The file is held there during various previous of the node you are editing until you click the "Submit" button.

3. Once you finally submit the node, Drupal moves the file from the temporary direcotry to the files directory.

A problem with any of these steps will result in upload not working. A problem at step 2 and 3, I believe, is logged. So there may be a problem with the server configuration.

chall3ng3r’s picture

thanks for the replys.

i've somehow managed to get work that upload module.

what i did is,

applied the following patch:
http://drupal.org/node/4410

along with, http://drupal.org/node/5961 for image module.
uploading the files as attachments is working fine.

now this time i need to fix image thing.

when i try to create new image type node, i get the following errors:

warning: Invalid argument supplied for foreach() in /home/myaccount/public_html/modules/image/image.module on line 310.
warning: Cannot modify header information - headers already sent by (output started at /home/myaccount/public_html/includes/common.inc:384) in /home/myaccount/public_html/includes/common.inc on line 192.

but empty node is created with no image within it.

kindly suggest what should i do to fix it?

tia,

// chall3ng3r //

kmo’s picture

I looked at line 310 of image.module, except there is nothing there. Are you sure that the version of image.module you have downloaded is compatible with the version of Drupal you are using?

kbahey’s picture

5) PHPSESSID is apearing on POST actions, and and does not apear on other pages. i think this is making some probs with users not getting deleted.

Did you manage to get that fixed? I know of a friend's site that suffers from the same problem.

If PHPSESSID is ALWAYS in the URL, then it is PHP's setting, and can be fixed. But only for POSTs?

--
Drupal development and customization: 2bits.com
Personal: Baheyeldin.com

--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba

chall3ng3r’s picture

PHPSESSID is not apearing on all pages, but only on pages which does add, delete actions.

like if i delete an empty image node i get to the confirmation page, there i see PHPSESSID.

currently im stuck with image module, and waiting replys.

// chall3ng3r //

kmo’s picture

PHPSESSID is a variable used to track sessions (things such as whether the user has logged on, and if so, the user name, etc). It is a PHP feature.

You can make the PHPSESSID disappear by altering the PHP configuration. However, your ISP may not allow you to do that; you will have to check.

If your ISP allows .htaccess, the following code should work:

<IfModule mod_php4.c>
   # If you are using Apache 2, you have to use <IfModule sapi_apache2.c>
   # instead of <IfModule mod_php4.c>.
   php_value session.cache_expire    200000
   php_value session.gc_maxlifetime  200000
   php_value session.use_only_cookies 1
   php_value session.use_trans_sid   0
   php_value session.auto_start      0
   php_value session.save_handler    user
   php_value session.cache_limiter   none
</IfModule>

Some of these may already be present in the .htaccess file. You do not need to duplicate them.