Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Closed Thread
 
Thread Tools Display Modes
  #1  
Old 29th November 2007, 18:04
dschmid dschmid is offline
Member
 
Join Date: Dec 2005
Posts: 52
Thanks: 1
Thanked 1 Time in 1 Post
Default Drupal and suPHP Problem

Hello I'm running Gutsy Perfect Setup with Drupal on it. My first problem was that enabling clean-urls results in an error I had fixed the problem by creating this .htaccess file described by falco (thanks):
Code:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
</IfModule>
The other problem was when I uploaded files with a module the owner of the file was always www-data. I searched in the forums and found a link to another excellent Howto: http://www.howtoforge.com/suphp_debian_etch_ispconfig

I followed the instructions and I only had a little problem with the /etc/suphp.conf file. Because it is in one line in the tutorial. After manual editing the suphp.conf file the Internal Server Error was gone.

Everything seems to work fine. But creating new Content was now not possible. By hitting the Submit button the same page loads again without an error and the content isn't created.
Because it's only an test page I deleted the whole web folder and the database, after that I created new one and unzipped the drupal folder and replaced the .htaccess file with the above one.

By trying to install drupal the "Database Configuration" screen loads like normal when I open the webpage but when I insert my database information and hit "Save configuration" the screen loads again with no error message.

Under the comments of the tutorial toolwizard wrote that php5-mysql isn't enabled after suphp installation. So I reinstalled it like with
Code:
apt-get php5-mysql --reinstall
In the error.log files are no errors.

Now I have no idea what problem could be. Thx for any help
Sponsored Links
  #2  
Old 29th November 2007, 18:26
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,263
Thanks: 216
Thanked 649 Times in 295 Posts
Default

I host lots of individual Drupal sites on my ISPConfig server with suphp enabled, which has been setup according my howto here: http://www.howtoforge.com/drupal_ispconfig and http://www.howtoforge.com/suphp_debian_etch_ispconfig.

The only thing i put within the Apache Directive field of the Drupal site is this:

<Directory /var/www/mydrupalwebsite.tld/web/>
Options +Includes +FollowSymlinks -Indexes
AllowOverride All
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>

It should work then. I do not use the .htaccess file you describe.
__________________
Hans

MrHostman | Managed Hosting
  #3  
Old 29th November 2007, 20:30
dschmid dschmid is offline
Member
 
Join Date: Dec 2005
Posts: 52
Thanks: 1
Thanked 1 Time in 1 Post
Default

Thanks Hans but don't works for me I'm using Drupal 5. Are you using Ubuntu on some servers too? I have deleted all again including the database and created a new one with isp config. Then I puted in the Apache Directives and saved again. And then untared the drupal 5 again and deleted the included .htaccess. I had to do a
Code:
chown web1_myuser:web1 web -R
and then the page pops up. But when I give in my credatials in and hit "save configuration" the page loads again.
  #4  
Old 29th November 2007, 21:20
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,263
Thanks: 216
Thanked 649 Times in 295 Posts
Default

To make sure the ownership has been setup correctly, you can execute this command within your webX:
chown -R -v -f webX_admin:webX web/*

(webX_admin is the account admin and webX your webnumber, as created with ISPConfig).

By the way, i use Debian (Etch on the moment).
__________________
Hans

MrHostman | Managed Hosting
  #5  
Old 29th November 2007, 22:02
dschmid dschmid is offline
Member
 
Join Date: Dec 2005
Posts: 52
Thanks: 1
Thanked 1 Time in 1 Post
Default

Hi i tried your command and
ownership of `web/update.php' retained as web1_myuser:webX
...
comes. But still the same. Normaly when somethings wrong with the database connection an error message in the top of the page should pop up. But nothing comes.
My phpinfo file shows this:
Code:
...
Server API 	CGI/FastCGI
Virtual Directory Support 	disabled
Configuration File (php.ini) Path 	/etc/php5/cgi
Loaded Configuration File 	/etc/php5/cgi/php.ini
Scan this dir for additional .ini files 	/etc/php5/cgi/conf.d 
...
Registered PHP Streams 	zip, php, file, data, http, ftp, compress.bzip2, compress.zlib, https, ftps
Registered Stream Socket Transports 	tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters 	string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, bzip2.*, zlib.*
...
allow_call_time_pass_reference	On	On
allow_url_fopen	On	On
allow_url_include	Off	Off
always_populate_raw_post_data	Off	Off
arg_separator.input	&	&
arg_separator.output	&	&
asp_tags	Off	Off
auto_append_file	no value	no value
auto_globals_jit	On	On
auto_prepend_file	no value	no value
browscap	no value	no value
default_charset	no value	no value
default_mimetype	text/html	text/html
define_syslog_variables	Off	Off
disable_classes	no value	no value
disable_functions	no value	no value
display_errors	On	On
display_startup_errors	Off	Off
doc_root	no value	no value
docref_ext	no value	no value
docref_root	no value	no value
enable_dl	On	On
error_append_string	no value	no value
error_log	no value	no value
error_prepend_string	no value	no value
error_reporting	6135	6135
expose_php	On	On
extension_dir	/usr/lib/php5/20060613+lfs	/usr/lib/php5/20060613+lfs
file_uploads	On	On
highlight.bg	#FFFFFF	#FFFFFF
highlight.comment	#FF8000	#FF8000
highlight.default	#0000BB	#0000BB
highlight.html	#000000	#000000
highlight.keyword	#007700	#007700
highlight.string	#DD0000	#DD0000
html_errors	On	On
ignore_repeated_errors	Off	Off
ignore_repeated_source	Off	Off
ignore_user_abort	Off	Off
implicit_flush	Off	Off
include_path	.:/usr/share/php:/usr/share/pear	.:/usr/share/php:/usr/share/pear
log_errors	Off	Off
log_errors_max_len	1024	1024
magic_quotes_gpc	On	On
magic_quotes_runtime	Off	Off
magic_quotes_sybase	Off	Off
mail.force_extra_parameters	no value	no value
max_execution_time	1000	1000
max_input_nesting_level	64	64
max_input_time	1000	1000
memory_limit	128M	128M
open_basedir	no value	no value
output_buffering	no value	no value
output_handler	no value	no value
post_max_size	2048M	2048M
precision	12	12
realpath_cache_size	16K	16K
realpath_cache_ttl	120	120
register_argc_argv	On	On
register_globals	Off	Off
register_long_arrays	On	On
report_memleaks	On	On
report_zend_debug	On	On
safe_mode	Off	Off
safe_mode_exec_dir	no value	no value
safe_mode_gid	Off	Off
safe_mode_include_dir	no value	no value
sendmail_from	no value	no value
sendmail_path	/usr/sbin/sendmail -t -i 	/usr/sbin/sendmail -t -i 
serialize_precision	100	100
short_open_tag	On	On
SMTP	localhost	localhost
smtp_port	25	25
sql.safe_mode	Off	Off
track_errors	Off	Off
unserialize_callback_func	no value	no value
upload_max_filesize	1024M	1024M
upload_tmp_dir	no value	no value
user_dir	no value	no value
variables_order	EGPCS	EGPCS
xmlrpc_error_number	0	0
xmlrpc_errors	Off	Off
y2k_compliance	On	On
zend.ze1_compatibility_mode	Off	Off
...
Active Persistent Links 	0
Active Links 	0
Client API version 	5.0.45
MYSQL_MODULE_TYPE 	external
MYSQL_SOCKET 	/var/run/mysqld/mysqld.sock
MYSQL_INCLUDE 	-I/usr/include/mysql
MYSQL_LIBS 	-L/usr/lib -lmysqlclient

Directive	Local Value	Master Value
mysql.allow_persistent	On	On
mysql.connect_timeout	60	60
mysql.default_host	no value	no value
mysql.default_password	no value	no value
mysql.default_port	no value	no value
mysql.default_socket	no value	no value
mysql.default_user	no value	no value
mysql.max_links	Unlimited	Unlimited
mysql.max_persistent	Unlimited	Unlimited
mysql.trace_mode	Off	Off
...
Environment
DOCUMENT_ROOT 	/var/www/webX/web
GATEWAY_INTERFACE 	CGI/1.1
HTTP_ACCEPT 	text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_ACCEPT_CHARSET 	ISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_ACCEPT_ENCODING 	gzip,deflate
HTTP_ACCEPT_LANGUAGE 	de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
HTTP_CONNECTION 	keep-alive
HTTP_COOKIE 	SESSf7a942eda524b5d4d0b6e6ca13bf911f=d025ff935a71efe7eb35c2171ab033d5; SESSb56328779a490748facdafb0135b63d0=be773bb0b9fb45f8b971a33f3e3991d5
HTTP_HOST 	www.mydomain.de
HTTP_KEEP_ALIVE 	300
HTTP_USER_AGENT 	Mozilla/5.0 (Macintosh; U; Intel Mac OS X; de; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9
PATH 	/bin:/usr/bin
QUERY_STRING 	no value
REDIRECT_STATUS 	200
REMOTE_ADDR 	xx.xx.xx.xx
REMOTE_PORT 	22110
REQUEST_METHOD 	GET
REQUEST_URI 	/info.php
SCRIPT_FILENAME 	/var/www/webX/web/info.php
SCRIPT_NAME 	/info.php
SERVER_ADDR 	xx.xx.xx.xx
SERVER_ADMIN 	webmaster@mydomain.de
SERVER_NAME 	www.mydomain.de
SERVER_PORT 	80
SERVER_PROTOCOL 	HTTP/1.1
SERVER_SIGNATURE 	<address>Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6 mod_ssl/2.2.4 OpenSSL/0.9.8e Server at www.mydomain.de Port 80</address>
SERVER_SOFTWARE 	Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6 mod_ssl/2.2.4 OpenSSL/0.9.8e

PHP Variables
_SERVER["DOCUMENT_ROOT"]	/var/www/webX/web
_SERVER["GATEWAY_INTERFACE"]	CGI/1.1
_SERVER["HTTP_ACCEPT"]	text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
_SERVER["HTTP_ACCEPT_CHARSET"]	ISO-8859-1,utf-8;q=0.7,*;q=0.7
_SERVER["HTTP_ACCEPT_ENCODING"]	gzip,deflate
_SERVER["HTTP_ACCEPT_LANGUAGE"]	de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
_SERVER["HTTP_CONNECTION"]	keep-alive
_SERVER["HTTP_COOKIE"]	SESSf7a942eda524b5d4d0b6e6ca13bf911f=d025ff935a71efe7eb35c2171ab033d5; SESSb56328779a490748facdafb0135b63d0=be773bb0b9fb45f8b971a33f3e3991d5
_SERVER["HTTP_HOST"]	www.mydomain.de
_SERVER["HTTP_KEEP_ALIVE"]	300
_SERVER["HTTP_USER_AGENT"]	Mozilla/5.0 (Macintosh; U; Intel Mac OS X; de; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9
_SERVER["PATH"]	/bin:/usr/bin
_SERVER["QUERY_STRING"]	no value
_SERVER["REDIRECT_STATUS"]	200
_SERVER["REMOTE_ADDR"]	xx.xx.xx.xx
_SERVER["REMOTE_PORT"]	22110
_SERVER["REQUEST_METHOD"]	GET
_SERVER["REQUEST_URI"]	/info.php
_SERVER["SCRIPT_FILENAME"]	/var/www/webX/web/info.php
_SERVER["SCRIPT_NAME"]	/info.php
_SERVER["SERVER_ADDR"]	xx.xx.xx.xx
_SERVER["SERVER_ADMIN"]	webmaster@mydomain.de
_SERVER["SERVER_NAME"]	www.mydomain.de
_SERVER["SERVER_PORT"]	80
_SERVER["SERVER_PROTOCOL"]	HTTP/1.1
_SERVER["SERVER_SIGNATURE"]	<address>Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6 mod_ssl/2.2.4 OpenSSL/0.9.8e Server at www.mydomain.de Port 80</address>
_SERVER["SERVER_SOFTWARE"]	Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6 mod_ssl/2.2.4 OpenSSL/0.9.8e
_SERVER["PHP_SELF"]	/info.php
_SERVER["REQUEST_TIME"]	1196365849
_SERVER["argv"]	
_SERVER["argc"]	0
_ENV["DOCUMENT_ROOT"]	/var/www/webX/web
_ENV["GATEWAY_INTERFACE"]	CGI/1.1
_ENV["HTTP_ACCEPT"]	text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
_ENV["HTTP_ACCEPT_CHARSET"]	ISO-8859-1,utf-8;q=0.7,*;q=0.7
_ENV["HTTP_ACCEPT_ENCODING"]	gzip,deflate
_ENV["HTTP_ACCEPT_LANGUAGE"]	de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
_ENV["HTTP_CONNECTION"]	keep-alive
_ENV["HTTP_COOKIE"]	SESSf7a942eda524b5d4d0b6e6ca13bf911f=d025ff935a71efe7eb35c2171ab033d5; SESSb56328779a490748facdafb0135b63d0=be773bb0b9fb45f8b971a33f3e3991d5
_ENV["HTTP_HOST"]	www.mydomain.de
_ENV["HTTP_KEEP_ALIVE"]	300
_ENV["HTTP_USER_AGENT"]	Mozilla/5.0 (Macintosh; U; Intel Mac OS X; de; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9
_ENV["PATH"]	/bin:/usr/bin
_ENV["QUERY_STRING"]	no value
_ENV["REDIRECT_STATUS"]	200
_ENV["REMOTE_ADDR"]	xx.xx.xx.xx
_ENV["REMOTE_PORT"]	22110
_ENV["REQUEST_METHOD"]	GET
_ENV["REQUEST_URI"]	/info.php
_ENV["SCRIPT_FILENAME"]	/var/www/webX/web/info.php
_ENV["SCRIPT_NAME"]	/info.php
...
I hope that helps.
  #6  
Old 29th November 2007, 22:11
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,263
Thanks: 216
Thanked 649 Times in 295 Posts
Default

Do you see anything related within the log file of the website itself (not the global logfile within /var/log/) ?
__________________
Hans

MrHostman | Managed Hosting
  #7  
Old 29th November 2007, 22:35
dschmid dschmid is offline
Member
 
Join Date: Dec 2005
Posts: 52
Thanks: 1
Thanked 1 Time in 1 Post
Default

This was the last entry in /var/www/webX/log/error.log:
Code:
[Thu Nov 29 19:17:37 2007] [error] [client xx.xx.xx.xx] SoftException in Application.cpp:351: Mismatch between target UID (10001) and UID (1080) of file "/var/www/webX/web/index.php"
[Thu Nov 29 19:17:37 2007] [error] [client xx.xx.xx.xx] Premature end of script headers: index.php
My last entry in the web.log was about 17:00. Since the no more entry and I have rebootet the system and have many times tried to install drupal.

Last edited by dschmid; 29th November 2007 at 22:49.
  #8  
Old 30th November 2007, 11:28
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,263
Thanks: 216
Thanked 649 Times in 295 Posts
Default

It looks like a owner/permission problem to me.
Are you really sure that you've created a user with administrative rights within ISPConfig for that website?
__________________
Hans

MrHostman | Managed Hosting
The Following User Says Thank You to Hans For This Useful Post:
dschmid (30th November 2007)
  #9  
Old 30th November 2007, 13:17
dschmid dschmid is offline
Member
 
Join Date: Dec 2005
Posts: 52
Thanks: 1
Thanked 1 Time in 1 Post
Default

Hi I reinstalled the website with ispconfig and recompiled suphp but still the same problem. I wrote a small php script that connects succesfully to my database. So php5-mysql is running. But still don't get drupal up and running. The new account that I created has Admin rights.
My /var/log/suphp.log only got normal entrys:
Code:
[Fri Nov 30 11:57:43 2007] [info] Executing "/var/www/web2/web/connect.php" as UID 10002, GID 10002
[Fri Nov 30 11:58:28 2007] [info] Executing "/var/www/web2/web/connect.php" as UID 10002, GID 10002
[Fri Nov 30 11:59:18 2007] [info] Executing "/var/www/web2/web/index.php" as UID 10002, GID 10002
[Fri Nov 30 11:59:18 2007] [info] Executing "/var/www/web2/web/install.php" as UID 10002, GID 10002
[Fri Nov 30 11:59:18 2007] [info] Executing "/var/www/web2/web/install.php" as UID 10002, GID 10002
[Fri Nov 30 11:59:43 2007] [info] Executing "/var/www/web2/web/install.php" as UID 10002, GID 10002
[Fri Nov 30 12:01:35 2007] [info] Executing "/var/www/web2/web/index.php" as UID 10002, GID 10002
[Fri Nov 30 12:01:35 2007] [info] Executing "/var/www/web2/web/install.php" as UID 10002, GID 10002
[Fri Nov 30 12:01:35 2007] [info] Executing "/var/www/web2/web/install.php" as UID 10002, GID 10002
[Fri Nov 30 12:03:49 2007] [info] Executing "/var/www/web2/web/install.php" as UID 10002, GID 10002
But strange is that /var/www/web2/log/error.log only got entrys when I try to open a file that doesn't exist like this:
Code:
[Fri Nov 30 11:52:11 2007] [error] [client xx.xx.35.xx] File does not exist: /var/www/web2/web/i
[Fri Nov 30 12:00:58 2007] [error] [client xx.xx.35.xx] File does not exist: /var/www/web2/web/ins
Shouldn't exit a /var/www/web2/log/web.log file ??
  #10  
Old 30th November 2007, 13:33
dschmid dschmid is offline
Member
 
Join Date: Dec 2005
Posts: 52
Thanks: 1
Thanked 1 Time in 1 Post
 
Default

The permissions on /var/www/web2 are 777 www-data:web2
and on /var/www/web2/web 755 web2_myadminusername:web2
The log folder has 755 web2_myadminusername:web2
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
All PHP uploaded files are 777 permissions dabro Installation/Configuration 2 11th September 2007 19:44


All times are GMT +2. The time now is 23:22.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.