-- Parse error index.php on line 145 --

All support enquiries for DFH go in here...

-- Parse error index.php on line 145 --

Postby Why » Sun Apr 10, 2011 11:16 am

I have error
Parse error: syntax error, unexpected $end in htdocs\upload\up\index.php on line 145
Why
Newbie Member
 
Posts: 2
Joined: Wed Apr 06, 2011 10:52 am

Re: Parse error index.php on line 145

Postby hiddew » Sun Apr 10, 2011 11:23 am

im having the same problem
hiddew
Standard Member
 
Posts: 5
Joined: Sun Apr 10, 2011 11:06 am

Re: Parse error index.php on line 145

Postby SamEA » Sun Apr 10, 2011 1:56 pm

Why wrote:I have error
Parse error: syntax error, unexpected $end in htdocs\upload\up\index.php on line 145


That is indeed odd, are you both on Linux or Windows? What version of PHP are you using? And please provide more details about your server. Furthermore, what code is on line 145?
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: Parse error index.php on line 145

Postby SamEA » Sun Apr 10, 2011 2:20 pm

Okay, I have figured out the issue after installing the script from fresh where no such error was shown.

This error is caused when short_open_tag is set to OFF in php.ini. The script throughout has many labels labelled as <? instead of <?php, where <? is referred to as a short open tag. Open php.ini and locate short_open_tag, change the value from Off to On followed by an apache service restart which should solve both of your problems.
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: -- Parse error index.php on line 145 --

Postby hiddew » Sun Apr 10, 2011 3:00 pm

solved it, thank you so much!
hiddew
Standard Member
 
Posts: 5
Joined: Sun Apr 10, 2011 11:06 am

Re: -- Parse error index.php on line 145 --

Postby hiddew » Sun Apr 10, 2011 3:10 pm

Also one more question,
I want to customize the entire layout to my own needs, how would I do that? without damaging the uploading
hiddew
Standard Member
 
Posts: 5
Joined: Sun Apr 10, 2011 11:06 am

Re: -- Parse error index.php on line 145 --

Postby PeterS » Sun Apr 10, 2011 3:53 pm

hiddew wrote:Also one more question,
I want to customize the entire layout to my own needs, how would I do that? without damaging the uploading


Create a new folder in ./styles, and copy all the files in Indigo to the new folder. Then modify the footer and header to your own needs. In regards to the styles.css, remove all content apart from the swfupload elements! You may also modify the other files to your own needs.

Goodluck!
PeterS
Global Moderator
 
Posts: 159
Joined: Mon Feb 21, 2011 4:58 am

Re: -- Parse error index.php on line 145 --

Postby hiddew » Sun Apr 10, 2011 4:07 pm

Ah thanks, 1 more thing :( where do I find the text in the file upload form?
FileBox is a free file and image hosting service. Feel free to upload your files here! Just browse the files you wish to upload and click on 'Open' when finished selecting the files or on the Upload button if using the HTML form where you will later recieve a download link.
Upload File?
hiddew
Standard Member
 
Posts: 5
Joined: Sun Apr 10, 2011 11:06 am

Re: -- Parse error index.php on line 145 --

Postby PeterS » Sun Apr 10, 2011 7:01 pm

hiddew wrote:Ah thanks, 1 more thing :( where do I find the text in the file upload form?
FileBox is a free file and image hosting service. Feel free to upload your files here! Just browse the files you wish to upload and click on 'Open' when finished selecting the files or on the Upload button if using the HTML form where you will later recieve a download link.
Upload File?


In ./styles/file_upload_form.php, but if you just want to change that line, you can modify it via ./lang/english.php.

If you're a web designer, you could post some modified styles in the styles forum if you want to contribute to the community =).
PeterS
Global Moderator
 
Posts: 159
Joined: Mon Feb 21, 2011 4:58 am

Re: -- Parse error index.php on line 145 --

Postby tom » Tue Apr 19, 2011 6:52 pm

Sorry completly wrong topic... please admin move this posting :)

I found the issue!

In my Server Environment it seems that uploads via FLASH are UTF8 Filenames.
HTML Form Uploads are Standard ASCII

So i need to detect if its uploaded via FLASH or HTML

This Line does the job, included decoding:
if ($_GET['method'] == "flash") $filename = utf8_decode($filename);




Code: Select all
$filename = $_FILES['upfile']['name'];
if ($_GET['method'] == "flash") $filename = utf8_decode($filename);
$filename = str_replace("'",'',"$filename");
$filename = str_replace("&",'_',"$filename");
$filename = str_replace("!",'_',"$filename");
$filename = str_replace("@",'_',"$filename");
$filename = str_replace("#",'_',"$filename");
$filename = str_replace("$",'_',"$filename");
$filename = str_replace("%",'_',"$filename");
$filename = str_replace("^",'_',"$filename");
$filename = str_replace("*",'_',"$filename");
$filename = str_replace("(",'_',"$filename");
$filename = str_replace(")",'_',"$filename");
$filename = str_replace("-",'_',"$filename");
$filename = str_replace("+",'_',"$filename");
$filename = str_replace("=",'_',"$filename");
$filename = str_replace("|",'_',"$filename");
$filename = str_replace(" ",'',"$filename");
$filename = str_replace("ä",'ae',"$filename");
$filename = stripslashes("$filename");
$filesize = $_FILES['upfile']['size'];
$fancyurl=rand('1','999');
tom
Standard Member
 
Posts: 8
Joined: Sat Apr 16, 2011 2:04 pm

Next

Return to Daddy's File Host v1.X

Who is online

Users browsing this forum: No registered users and 1 guest

cron