PHP and Log files - not working

Status
Not open for further replies.

bli87x10

New Member
Messages
1
Reaction score
0
Points
1
I created an account/website to see if X10 would be a suitable place to host my website, so I'm testing everything out.

So I have a PHP script that's supposed to track visitors to my webpage. I got this to work on another free webhost, but it's not working here. I uploaded all the files, set the file permissions, and inserted the code into the webpage I want to track. The php file is basically supposed to write to the log file, but it's not. Plus, the log file will not open into my browser like a webpage, I have to download it. I'm not very experienced with PHP, but I did get this to work on another free host. I can't figure out why it's not working here. I don't think it's using any of the disabled php functions. Any ideas?

I'm not sure what additional information to provide.
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
This looks to be a coding issue. I took a look at your script, and your logdir variable is set to "./logwriter", even though the script is already in logwriter. I'm guessing what's happening here then is it's looking in "/logwriter/logwriter/" for the file. You should probably change the logdir variable to "./".
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
Side note, unless you set up your html files to process as PHP, the PHP code at the top of the testlw file will not actually process. If the file isn't passed through the PHP interpreter (which html doesn't on x10 by default), it'll never actually run; you'll either need to set up a .htaccess directive to process html as php, or you'll need to rename it to a .php file.
 
Status
Not open for further replies.
Top