Author

Topic: PHP white screen (Read 2542 times)

full member
Activity: 175
Merit: 102
August 13, 2011, 10:34:26 AM
#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..
newbie
Activity: 42
Merit: 0
August 13, 2011, 10:16:06 AM
#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/
member
Activity: 78
Merit: 10
August 13, 2011, 09:35:04 AM
#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 ?
legendary
Activity: 1358
Merit: 1002
August 13, 2011, 05: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
member
Activity: 78
Merit: 10
August 13, 2011, 03: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 !
legendary
Activity: 1358
Merit: 1002
August 13, 2011, 03: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.
member
Activity: 78
Merit: 10
August 13, 2011, 02: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 !!
legendary
Activity: 1358
Merit: 1002
August 12, 2011, 12: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
member
Activity: 78
Merit: 10
August 12, 2011, 11:53:42 AM
#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 !
legendary
Activity: 1358
Merit: 1002
August 12, 2011, 08:33:26 AM
#8
So, you must check what file is being called on line 62 of /inc
ludes/stats.php and that's your problem.
member
Activity: 78
Merit: 10
August 12, 2011, 08:25:24 AM
#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 ?
legendary
Activity: 1358
Merit: 1002
August 12, 2011, 08:05:54 AM
#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);
member
Activity: 78
Merit: 10
August 12, 2011, 08:00:01 AM
#5
member
Activity: 147
Merit: 11
The day to rise has come.
August 12, 2011, 07:52:06 AM
#4
Ok, which file is returning blank.

And can you provide a snippet of the begining of the file?
member
Activity: 78
Merit: 10
August 12, 2011, 07:41:09 AM
#3
Nope ,
these are my settings
http://78.47.162.164/testphp.php
member
Activity: 147
Merit: 11
The day to rise has come.
August 12, 2011, 07:36:24 AM
#2
Do you have ioncube installed?
member
Activity: 78
Merit: 10
August 12, 2011, 07:01:35 AM
#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 !
Jump to: