| View previous topic :: View next topic |
| Author |
Message |
weni
Joined: 23 Aug 2007 Posts: 3
|
Posted: Aug 23, 2007 7:20 am Post subject: Requesting information |
|
|
Hi,
I've just bought XfileSharing and I got troubles..
When I need to analyze a script to personalize it, I usually get a cup of coffee, sit down, take a look at the script, define my priorities and start making-up my customization but this time, it's different. I've been working with PHP & MySQL for years but CGI is not my thing.. May I have a few tips?
1.1 - How does the "inactive file get deleted after x days" work?
1.2 - I already created this function in PHP & MySQL, can I mix XfileSharing and my script?
2.1 - If I want to create accounts for people who uploads stuff, how can I retrieve all their files?
That's all for now =) Thank you in advance
~W~ |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 1107 Location: Undisclosed location
|
Posted: Aug 23, 2007 7:40 am Post subject: |
|
|
1.1: expired filed removing after each upload completed in CleanExpired function. It use files_expire_created & files_expire_access settings in config.
1.2: XFileSharing do not use MySQL, and not sured you can easily use PHP function in Perl script. Probably You can run PHP script every X hours with CRON to remove expired files.
2.1: No such feature in XFileSharing at the moment. It is possible to implement extra code to add file records to mysql with any fields from upload form and then handle them from PHP. |
|
| Back to top |
|
 |
weni
Joined: 23 Aug 2007 Posts: 3
|
Posted: Aug 23, 2007 8:15 am Post subject: |
|
|
I tried to run the script on my server but it doesn't work.. I always get a 500 internal error but the thing is.. I'm sure about my config cuz it's so different from the one which is already in the script:
# Your site URL, witout trailing /
site_url => 'http://branding.mywebsite.com',
# Your site cgi-bin URL, witout trailing /
site_cgi => 'http://branding.mywebsite.com/cgi-bin',
# Path to your site htdocs folder
site_path => '/home/admin/public_html/branding/',
# Directory for temporary using files
temp_dir => '/home/admin/cgi-bin/branding/temp',
# Directory for uploaded files
target_dir => '/home/admin/cgi-bin/branding/uploads',
Any clue?
I get this error in Apache log error:
[Thu Aug 23 11:27:24 2007] [error] [client 84.74.***.*] Premature end of script headers: index.cgi |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 1107 Location: Undisclosed location
|
Posted: Aug 23, 2007 10:47 am Post subject: |
|
|
I guess this is caused by windows linebreaks that were added while you were copying file to server: use binary FTP mode to upload scripts to avoid linebreaks adding.
To remove windows linebreaks from edited file you can use special online tool: http://sibsoft.net/cgi-bin/Tools/nl.cgi
Some users told they used Notepad++ editor to fix windows linebreaks. |
|
| Back to top |
|
 |
weni
Joined: 23 Aug 2007 Posts: 3
|
Posted: Aug 23, 2007 11:01 am Post subject: |
|
|
| Solved! Thank you! =) |
|
| Back to top |
|
 |
|