Bitcoin Forum
December 08, 2016, 12:17:39 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: PHP white screen  (Read 2260 times)
sareea
Member
**
Offline Offline

Activity: 76


View Profile
August 12, 2011, 12:01:35 PM
 #1

Hello all ,
recently i tried to install a frontend php script on my server .
At first the index file didn't seem to run, and if i try to download it it downloads blank .
The script requires Memcached , i had only memcached installed , and after i installed php5-memcache some of the script seemed to run, but it is not loading any other php file .

All i get a white screen.
Please help ! It is urgent !

Thanks a lot !
1481156259
Hero Member
*
Offline Offline

Posts: 1481156259

View Profile Personal Message (Offline)

Ignore
1481156259
Reply with quote  #2

1481156259
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481156259
Hero Member
*
Offline Offline

Posts: 1481156259

View Profile Personal Message (Offline)

Ignore
1481156259
Reply with quote  #2

1481156259
Report to moderator
1481156259
Hero Member
*
Offline Offline

Posts: 1481156259

View Profile Personal Message (Offline)

Ignore
1481156259
Reply with quote  #2

1481156259
Report to moderator
newminerr
Member
**
Offline Offline

Activity: 70

like no other.


View Profile
August 12, 2011, 12:36:24 PM
 #2

Do you have ioncube installed?
sareea
Member
**
Offline Offline

Activity: 76


View Profile
August 12, 2011, 12:41:09 PM
 #3

Nope ,
these are my settings
http://78.47.162.164/testphp.php
newminerr
Member
**
Offline Offline

Activity: 70

like no other.


View Profile
August 12, 2011, 12:52:06 PM
 #4

Ok, which file is returning blank.

And can you provide a snippet of the begining of the file?
sareea
Member
**
Offline Offline

Activity: 76


View Profile
August 12, 2011, 01:00:01 PM
 #5

This is the script that is found there
https://github.com/simplecoin/simplecoin

http://78.47.162.164/
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1442



View Profile
August 12, 2011, 01:05:54 PM
 #6

turn error reporting on and it should tell you what the problem is Wink

put this in the php file your trying to run
Code:
error_reporting(-1);

sareea
Member
**
Offline Offline

Activity: 76


View Profile
August 12, 2011, 01:25:24 PM
 #7

I get these errors
Code:
[Fri Aug 12 16:11:18 2011] [error] [client 109.66.112.62
] PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62

[Fri Aug 12 16:11:19 2011] [error] [client 109.66.112.62
] PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62, referer: http://78.47.162.16
4/register.php

[Fri Aug 12 16:11:21 2011] [error] [client 109.66.112.62
] PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62, referer: http://78.47.162.16
4/stats.php

PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62, referer: http://78.47.162.16
4/gettingstarted.php

[error] [client 58.218.199.22
7] script '/var/www/proxyheader.php' not found or unable
 to stat

[Fri Aug 12 16:10:52 2011] [error] [client 109.66.112.62
] PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62, referer: http://78.47.162.16
4/register.php

[Fri Aug 12 16:11:13 2011] [error] [client 109.66.112.62
] PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62, referer: http://78.47.162.16
4/register.php

[Fri Aug 12 16:11:16 2011] [error] [client 109.66.112.62
] PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62, referer: http://78.47.162.16
4/register.

] PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62, referer: http://78.47.162.16
4/about.php

[Fri Aug 12 16:10:49 2011] [error] [client 109.66.112.62
] PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62, referer: http://78.47.162.16
4/about.php

[Fri Aug 12 16:10:51 2011] [error] [client 109.66.112.62
] PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62, referer: http://78.47.162.16
4/stats.php

After i check in apache2 error.log file ...  But i don't think this would stuck all the script :S ?
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1442



View Profile
August 12, 2011, 01:33:26 PM
 #8

So, you must check what file is being called on line 62 of /inc
ludes/stats.php and that's your problem.

sareea
Member
**
Offline Offline

Activity: 76


View Profile
August 12, 2011, 04:53:42 PM
 #9

The problem now is that it doesn't have the permissions to access it ...
And i installed ioncube loader ...
And Can you please take a look  at my php configurations and tell me if one of the security modules is causing this ?
Thanks !
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1442



View Profile
August 12, 2011, 05:50:41 PM
 #10

The problem now is that it doesn't have the permissions to access it ...
And i installed ioncube loader ...
And Can you please take a look  at my php configurations and tell me if one of the security modules is causing this ?
Thanks !
Why do you need ioncube loader? Is a open source script encrypted with ioncube? Or was it because something else on the server needed it?

To fix the permissions, just CHMOD the file with the right permissions using your FTP client.

If it needs 777 permissions on the file to run, please ditch the script LOL or install suPHP, i dunno Wink

Or did you by any chance uploaded the files with your server root account instead of a normal user account? If so, you'll need to chown the files to the correct user.

Not familiar with simplecoin, just with webservers in general. I haven't seen anything in their (small) documentation that said you need to have register_globals, open_base_dir or safe_mode on or off

sareea
Member
**
Offline Offline

Activity: 76


View Profile
August 13, 2011, 07:59:35 AM
 #11

Thanks a lot for your help,
i created the speed file and gave it 777 permissions , and wow ... The script seemed to run ...
Yeah i uploaded them as a root , would this be a problem ? What should i do ?

Now i get another problem with the fopen()
Code:
] PHP Warning:  Invalid argument supplied for foreach()
in /var/www/stats.php on line 75

[Sat Aug 13 11:47:01 2011] [error] [client 84.228.254.88
] PHP Fatal error:  Call to a member function fetch() on
 a non-object in /var/www/includes/stats.php on line 42,
Do you think it is the script problem ?

Thanks a lot !!
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1442



View Profile
August 13, 2011, 08:27:07 AM
 #12

Thanks a lot for your help,
i created the speed file and gave it 777 permissions , and wow ... The script seemed to run ...
Yeah i uploaded them as a root , would this be a problem ? What should i do ?

Now i get another problem with the fopen()
Code:
] PHP Warning:  Invalid argument supplied for foreach()
in /var/www/stats.php on line 75

[Sat Aug 13 11:47:01 2011] [error] [client 84.228.254.88
] PHP Fatal error:  Call to a member function fetch() on
 a non-object in /var/www/includes/stats.php on line 42,
Do you think it is the script problem ?

Thanks a lot !!

Dude, big mistake uploading them as root. chown them to some user with less privileges and you won't need to use 777 on the files. That's a lot insecure for servers facing the web.

Can't tell you exactly to which user to chown them without knowing your server.


Probably this query is not returning a value, so it gives an error.
Code:
$sql = "SELECT count(id) FROM shares WHERE id > $lastwinningshare AND our_result='N'";
Most likely it will go away as soon as it returns something.

sareea
Member
**
Offline Offline

Activity: 76


View Profile
August 13, 2011, 08:35:00 AM
 #13

Can you please give me the CHOWN command ? for user called x with password y ?
Thanks a lot !
I will look into that php later and update this .Thanks a lot mate !
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1442



View Profile
August 13, 2011, 10:09:31 AM
 #14

Can you please give me the CHOWN command ? for user called x with password y ?
Thanks a lot !
I will look into that php later and update this .Thanks a lot mate !

To change the owner of ALL dirs and files under a given dir
Code:
chown -R user:group /dir/to/change/owner

But dude, seriously, a google search would give you an answer faster than me  Roll Eyes

http://lmgtfy.com/?q=chown+command

sareea
Member
**
Offline Offline

Activity: 76


View Profile
August 13, 2011, 02:35:04 PM
 #15

How can i fix it ?
$sql = "SELECT count(id) FROM shares WHERE id > $lastwinningshare AND our_result='N'";

?

Is it possible due to mysql failure ?
Xephan
Jr. Member
*
Offline Offline

Activity: 42


View Profile
August 13, 2011, 03:16:06 PM
 #16

How can i fix it ?
$sql = "SELECT count(id) FROM shares WHERE id > $lastwinningshare AND our_result='N'";

?

Is it possible due to mysql failure ?

Try asking the author, it would be faster since he would be much more familiar with the code than us trying to troubleshoot/debug based on snippets that you might had made changes to.

http://simplecoin.lefora.com/

186q9YUW3x8TVHC5aYBEqgZZYMxft8Cw9f
Furyan
Full Member
***
Offline Offline

Activity: 175



View Profile
August 13, 2011, 03:34:26 PM
 #17

Make sure you've set up your database; make sure you've configured Simplecoin with a mysql user and password, with a user that has permissions to create tables, and insert, update, select and delete data.

As Xephan notes, the Simplecoin author can help you faster than we can..
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!