Closed GoogleCodeExporter closed 9 years ago
UPDATE: I tried manually creating myimouto/log/error.log and now I get this
error:
Parse error: syntax error, unexpected 'version' (T_STRING) in /opt/lampp/htdocs/myimouto/app/views/exception/500.php on line 1
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 5:42
UPDATE_2: I did some research on stack overflow, apparently I have to turn
short_open_tag off in php.ini (there are 3 occurrences of it BTW) (Also, should
you put that on the install guide? Idk. I think it's on by default, because I
didn't change it)
Now I just get "Error Occurred." as error.
It's like some kind of sick game
Each level is more difficult than the one before
Will it ever end?
Please help me! Thank you.
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 7:03
UPDATE_3: Last time I didn't even get an error message. That makes solving this
problem almost impossible. But I'm smarter than whoever is trolling me and
checked
/opt/lampp/htdocs/myimouto/log/error.log
this is what it said:
[25-Oct-2013 19:39:51 CEST] [GET] /
PHP Warning
mkdir(): Permesso negato
/vendor/Rails/Cache/Entry.php (66)
array(3) {
["val"]=>
array(2) {
[0]=>
string(49) "/opt/lampp/htdocs/myimouto/app/assets/javascripts"
[1]=>
string(49) "/opt/lampp/htdocs/myimouto/app/assets/stylesheets"
}
["params"]=>
array(0) {
}
["header"]=>
string(0) ""
}
#0 Rails/Cache/Entry.php(66): mkdir(/opt/lampp/htdo..., 511, 1)
#1 Rails/Cache.php(19): Rails\Cache\Entry->write(Array, Array)
#2 Rails/Assets.php(351): Rails\Cache->write(RAILS_ASSETS_CA..., Array, Array)
#3 Rails/Assets.php(41): Rails\Assets->cache_write(RAILS_ASSETS_CA..., Array)
#4 Rails/Rails.php(195): Rails\Assets->__construct()
#5 install/form.php(43): Rails::assets()
#6 install/setup.php(82): require(/opt/lampp/htdo...)
#7 install/setup.php(46): MyImouto_Setup->_show_install_form()
#8 public/index.php(4): MyImouto_Setup->run()
#9 {main}
[25-Oct-2013 19:39:51 Europe/Rome] PHP Parse error: syntax error, unexpected
'version' (T_STRING) in /opt/lampp/htdocs/myimouto/app/views/exception/500.php
on line 1
[25-Oct-2013 19:55:38 CEST] [GET] /
PHP Warning
mkdir(): Permesso negato
/vendor/Rails/Cache/Entry.php (66)
array(3) {
["val"]=>
array(2) {
[0]=>
string(49) "/opt/lampp/htdocs/myimouto/app/assets/javascripts"
[1]=>
string(49) "/opt/lampp/htdocs/myimouto/app/assets/stylesheets"
}
["params"]=>
array(0) {
}
["header"]=>
string(0) ""
}
#0 Rails/Cache/Entry.php(66): mkdir(/opt/lampp/htdo..., 511, 1)
#1 Rails/Cache.php(19): Rails\Cache\Entry->write(Array, Array)
#2 Rails/Assets.php(351): Rails\Cache->write(RAILS_ASSETS_CA..., Array, Array)
#3 Rails/Assets.php(41): Rails\Assets->cache_write(RAILS_ASSETS_CA..., Array)
#4 Rails/Rails.php(195): Rails\Assets->__construct()
#5 install/form.php(43): Rails::assets()
#6 install/setup.php(82): require(/opt/lampp/htdo...)
#7 install/setup.php(46): MyImouto_Setup->_show_install_form()
#8 public/index.php(4): MyImouto_Setup->run()
#9 {main}
[25-Oct-2013 19:55:38 Europe/Rome] PHP Parse error: syntax error, unexpected
'version' (T_STRING) in /opt/lampp/htdocs/myimouto/app/views/exception/500.php
on line 1
[25-Oct-2013 19:55:44 CEST] [GET] /
PHP Warning
mkdir(): Permesso negato
/vendor/Rails/Cache/Entry.php (66)
array(3) {
["val"]=>
array(2) {
[0]=>
string(49) "/opt/lampp/htdocs/myimouto/app/assets/javascripts"
[1]=>
string(49) "/opt/lampp/htdocs/myimouto/app/assets/stylesheets"
}
["params"]=>
array(0) {
}
["header"]=>
string(0) ""
}
#0 Rails/Cache/Entry.php(66): mkdir(/opt/lampp/htdo..., 511, 1)
#1 Rails/Cache.php(19): Rails\Cache\Entry->write(Array, Array)
#2 Rails/Assets.php(351): Rails\Cache->write(RAILS_ASSETS_CA..., Array, Array)
#3 Rails/Assets.php(41): Rails\Assets->cache_write(RAILS_ASSETS_CA..., Array)
#4 Rails/Rails.php(195): Rails\Assets->__construct()
#5 install/form.php(43): Rails::assets()
#6 install/setup.php(82): require(/opt/lampp/htdo...)
#7 install/setup.php(46): MyImouto_Setup->_show_install_form()
#8 public/index.php(4): MyImouto_Setup->run()
#9 {main}
[25-Oct-2013 19:55:44 Europe/Rome] PHP Parse error: syntax error, unexpected
'version' (T_STRING) in /opt/lampp/htdocs/myimouto/app/views/exception/500.php
on line 1
[25-Oct-2013 20:55:46 CEST] [GET] /
PHP Warning
mkdir(): Permesso negato
/vendor/Rails/Cache/Entry.php (66)
array(3) {
["val"]=>
array(2) {
[0]=>
string(49) "/opt/lampp/htdocs/myimouto/app/assets/javascripts"
[1]=>
string(49) "/opt/lampp/htdocs/myimouto/app/assets/stylesheets"
}
["params"]=>
array(0) {
}
["header"]=>
string(0) ""
}
#0 Rails/Cache/Entry.php(66): mkdir(/opt/lampp/htdo..., 511, 1)
#1 Rails/Cache.php(19): Rails\Cache\Entry->write(Array, Array)
#2 Rails/Assets.php(351): Rails\Cache->write(RAILS_ASSETS_CA..., Array, Array)
#3 Rails/Assets.php(41): Rails\Assets->cache_write(RAILS_ASSETS_CA..., Array)
#4 Rails/Rails.php(195): Rails\Assets->__construct()
#5 install/form.php(43): Rails::assets()
#6 install/setup.php(82): require(/opt/lampp/htdo...)
I think the most relevant part here is
mkdir(): Permesso negato
Permesso negato is italian for Permission denied
So this all could be just a permission problem
But I have the ownership of htdocs AND subfolders
should I chmod -R 777 on it?
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 7:10
The system doesn't have permissions to write files. Try giving it permissions
for log, install, tmp and public folders.
The first error on "safe_ips" was a parse error. I can reproduce the problem by
omitting a comma in an array:
[ 'foo' 'bar' ]
while it should be like this:
[ 'foo', 'bar' ]
Apparently you forgot the comma while listing your IP~
About short open tags, there was another report about the same error (I set the
issue as "done" some days ago, so it's not listed by default anymore). The
thing is I didn't think about short tags being turned on in some systems.
Original comment by asterixvader
on 25 Oct 2013 at 7:46
[deleted comment]
(Why did you remove your comment?)
I have a similar problem with my Ubuntu VM. Apache2 has its own user called
www-data, but then I manipulate files with my user... so sometimes my user
creates a folder, but www-data can write files on it. Or something like that.
Appliying "sudo chmod 777 -R folder" through console solves this, although
that's not the most professional fix.
Original comment by asterixvader
on 25 Oct 2013 at 9:15
Thank you for your advice. About the safe_ips array, having made such a mistake
is a bit embarassing because I'm a programmer (Java).
Giving permissions DID resolve the problem, but after seeing the config screen
(finally! It took me 3 days to configure everything like xampp, ubuntu, vnc,
ssh etc)
and entering username and password I get
Fatal error: Cannot redeclare class PostFilenameParsingMethods in
/opt/lampp/htdocs/myimouto/app/models/post/filename_parsing_methods.php on line
3
From the log:
[25-Oct-2013 23:47:26 Europe/Rome] PHP Notice: Undefined index: admin_name in
/opt/lampp/htdocs/myimouto/install/setup.php on line 130
[25-Oct-2013 23:47:26 Europe/Rome] PHP Notice: Undefined index: admin_password
in /opt/lampp/htdocs/myimouto/install/setup.php on line 131
[25-Oct-2013 23:47:26 CEST] [POST] /user/error.json
Error on database query execution
[SQLSTATE 23000] (1048) Column 'name' cannot be null
Query: INSERT INTO users (created_at, name, password_hash, level,
show_advanced_editing) VALUES (?, ?, ?, ?, ?)
Values: array (
0 => '2013-10-25 23:47:26',
1 => NULL,
2 => 'e4591d99cd7e632d30cc86bef922b47517d95617',
3 => 50,
4 => 1,
)
[25-Oct-2013 23:47:26 CEST] [POST] /user/error.json
Error on database query execution
[SQLSTATE 23000] (1452) Cannot add or update a child row: a foreign key
constraint fails (`myimouto`.`user_blacklisted_tags`, CONSTRAINT
`fk_user_bl_tags__user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON
DELETE CASCADE)
Query: INSERT INTO user_blacklisted_tags VALUES (?, ?)
Values: array (
0 => '0',
1 => 'rating:q
rating:e',
)
[25-Oct-2013 23:47:27 Europe/Rome] PHP Fatal error: Cannot redeclare class
PostFilenameParsingMethods in
/opt/lampp/htdocs/myimouto/app/models/post/filename_parsing_methods.php on line
3
[25-Oct-2013 23:55:22 Europe/Rome] PHP Fatal error: Cannot redeclare class
PostFilenameParsingMethods in
/opt/lampp/htdocs/myimouto/app/models/post/filename_parsing_methods.php on line
3
[26-Oct-2013 00:04:24 Europe/Rome] PHP Fatal error: Cannot redeclare class
PostFilenameParsingMethods in
/opt/lampp/htdocs/myimouto/app/models/post/filename_parsing_methods.php on line
3
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 10:06
lol.
err... mm does the file
"myimouto/app/models/post/filename_parsing_methods.php.example" exist? if so,
delete it.
Original comment by asterixvader
on 25 Oct 2013 at 10:12
no it does not but I had a copy of filename_parsing_methods.php with a
different filename that's all
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 10:19
I guess deleting that file fixed the problem.
Original comment by asterixvader
on 25 Oct 2013 at 10:20
i deleted filename_parsing_methods.php (w/o example) and imouto SEEMS to be working.
BUT I can't see an image i uploaded
I see the post but not the image
log:
[26-Oct-2013 00:28:14 CEST] [GET]
/post/show/127.0.0.1:3000/data/image/4eb481705b2e27d4ab9c2586c16ca7ab.jpg
Routing Error
No route matches [GET]
"/post/show/127.0.0.1:3000/data/image/4eb481705b2e27d4ab9c2586c16ca7ab.jpg"
[26-Oct-2013 00:28:27 CEST] [GET]
/post/show/127.0.0.1:3000/data/image/4eb481705b2e27d4ab9c2586c16ca7ab.jpg
Routing Error
No route matches [GET]
"/post/show/127.0.0.1:3000/data/image/4eb481705b2e27d4ab9c2586c16ca7ab.jpg"
[26-Oct-2013 00:28:43 CEST] [GET]
/post/show/127.0.0.1:3000/data/image/4eb481705b2e27d4ab9c2586c16ca7ab.jpg
Routing Error
No route matches [GET]
"/post/show/127.0.0.1:3000/data/image/4eb481705b2e27d4ab9c2586c16ca7ab.jpg"
[26-Oct-2013 00:28:44 CEST] [GET]
/post/show/127.0.0.1:3000/data/image/4eb481705b2e27d4ab9c2586c16ca7ab.jpg
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 10:30
I think this is a config problem
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 10:31
Can you upload your config.php file?
Original comment by asterixvader
on 25 Oct 2013 at 10:37
url_base should be "http://127.0.0.1:3000", it's missing the "http://" part.
Original comment by asterixvader
on 25 Oct 2013 at 10:46
<?php
# This is the file you use to overwrite the default config values.
# Look at default_config.php and copy over any settings you want to change.
class Moebooru_Config extends Moebooru_DefaultConfig
{
public $app_name = 'my.imouto';
public $server_host = '127.0.0.1:3000';
public $url_base = 'http://127.0.0.1:3000';
public $admin_contact = 'admin@myimouto';
Still not working
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 10:54
I even tried to make another post but... nothing
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 10:54
Are you accessing the file from the same machine that is hosting the system?
Original comment by asterixvader
on 25 Oct 2013 at 10:58
yes but i want to make my server public in the near future
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:00
It's the same machine and yet you can't see the posts?
Please manually check if the files were successfuly created. Check the
generated URL in the <img> tags.
Original comment by asterixvader
on 25 Oct 2013 at 11:03
i can see the images at
127.0.0.1:3000/data/image/4eb481705b2e27d4ab9c2586c16ca7ab.jpg for example and
i see the posts but the images aren't displayed in the posts
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:06
The corresponding file for that image (public/data/image/4e/b4/4eb4....jpg)
exists, and if you go to that address the image is loaded succesfuly, but when
you go to the view page (/post/show/...) the image isn't displayed?
Can you check what is the URL created for the image in the corresponding <img>
tag?
Original comment by asterixvader
on 25 Oct 2013 at 11:10
<img alt="ubuntu" id="image" class="image" width="1500" height="844"
large_width="1920" large_height="1080"
src="127.0.0.1:3000/data/sample/f60bedfc2412fc0c0275b43b7feada57.jpg" />
</div>
I think the problem is what you said before, there's no http:// so it thinks
127.0.0.1:3000 is a subdirectory
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:18
That's a malformed URL, it's missing the scheme (https://). That URL is
appended to the current URL, so it ends up being something like noted in the
errors above:
http://127.0.0.1/post/show/2/tags/127.0.0.1/data/sample......jpg.
The problem resides in the config. Please check and double check it.
Original comment by asterixvader
on 25 Oct 2013 at 11:23
<?php
# This is the file you use to overwrite the default config values.
# Look at default_config.php and copy over any settings you want to change.
class Moebooru_Config extends Moebooru_DefaultConfig
{
public $app_name = 'my.imouto';
public $server_host = 'http//127.0.0.1:3000/';
public $url_base = 'http://127.0.0.1:3000/';
public $admin_contact = 'admin@myimouto';
}
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:27
besides even the default config is almost identical
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:28
corrected the missing :
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:29
$server_host must not include the scheme, $url_base must include the scheme.
And both must not include trailing slash:
class Moebooru_Config extends Moebooru_DefaultConfig
{
public $app_name = 'my.imouto';
public $server_host = '127.0.0.1:3000';
public $url_base = 'http://127.0.0.1:3000';
public $admin_contact = 'admin@myimouto';
}
Original comment by asterixvader
on 25 Oct 2013 at 11:31
changed to:
public $server_host = 'ghfhfgfg';
public $url_base = 'hgfhfg/';
reload site
still same url in source
something's wrong here
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:33
Quote:
$server_host must not include the scheme, $url_base must include the scheme.
And both must not include trailing slash
Believe me, I tried every combination of slash and scheme
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:36
lol. Try reloading the server. Try causing a syntax error to see if the file is
actually being included D:
Original comment by asterixvader
on 25 Oct 2013 at 11:37
tried to cause synthax error. No message. I am 100% sure it's the right file
and I reopen it after each edit so I know it's being saved. Restarded apache,
no results
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:42
<?php
# This is the file you use to overwrite the default config values.
# Look at default_config.php and copy over any settings you want to change.
class Moebooru_Config extends Moebooru_DefaultConfig
{
public $app_name = 'my.imouto';
public $server_host 3/0 lolololol;
public $url_base = lolololo;
public $admin_contact = 'admin@myimouto';
}
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:42
this can't possibly be a valid synthax, can it?
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:43
lol~
Ok there's something wrong. There's something that is really wrong. But I have
no idea what it is. Cache or something maybe, I don't know D:
Original comment by asterixvader
on 25 Oct 2013 at 11:45
WOOOOORKS
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:48
IDK what happened
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:49
No way that's a valid syntax. I get this:
Parse error: syntax error, unexpected '3' (T_LNUMBER), expecting ',' or ';' in
/....../myimouto/config/config.php on line 14
Original comment by asterixvader
on 25 Oct 2013 at 11:49
Oh I see it now
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:49
Maybe some cache somewhere. I once came accross a similar problem, had to
restart Apache.
If you get more errors, let me know.
Original comment by asterixvader
on 25 Oct 2013 at 11:50
No actually I'm not sure
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:51
Thank you for your support and patience.
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:51
One more thing: can I open my booru to the web?
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:52
Yes you can... you mean using your computer as host? You can but you'd need to
set things up, like opening ports and stuff.
Original comment by asterixvader
on 25 Oct 2013 at 11:57
no I mean how do I access from a not-safe ip
I already set the ports and everything
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:59
I mean how to deactivate the whitelist
Original comment by ainselvi...@gmail.com
on 25 Oct 2013 at 11:59
I set the imouto up so that it uses my domain now but I can't access it from
devices not in the whitelist
Original comment by ainselvi...@gmail.com
on 26 Oct 2013 at 12:02
Oh, safe-ips are only used when installing and updating.
Original comment by asterixvader
on 26 Oct 2013 at 12:04
ahhhhhh thank you, that's all I wanted to hear.
Ok I was fearing this was a Local only booru. So now everything works.
Thank you.
Original comment by ainselvi...@gmail.com
on 26 Oct 2013 at 12:05
Bye for now, I'm going to bed
Original comment by ainselvi...@gmail.com
on 26 Oct 2013 at 12:06
Original issue reported on code.google.com by
ainselvi...@gmail.com
on 25 Oct 2013 at 5:24