473,756 Members | 6,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why when upgrading my web server I get unexpected $end

4 New Member
Just so everyone can know, I would LOVE to stay with yellowtip webserver, if you know how to install the GD files to it PLEASE let me know.

This php worked on my 4.x php server but I get unexpected end with any other.

Needless to say I only upgraded to 5.2 because

Yellowtip web server 2.0's php did not come with the GD librarys which I needed to upload pics using mini file host.

If you can fix ethier problem I would be so greatful

herse the current problem
unexpected $end
line 165 which is the end of file

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3.  
  4. include("./config.php");
  5. include("./header.php");
  6.  
  7. $userip=$_SERVER['REMOTE_ADDR'];
  8. $time=time();
  9.  
  10. ///////////////////////////////////////////TIMER////////////////////////////////////
  11.  
  12. if(file_exists("./uploader/".$userip.".mfh"))
  13. {
  14.  
  15. $downloaders = fopen("./uploader/".$userip.".mfh","r+");
  16. flock($downloaders,2);
  17.  
  18. while (!feof($downloaders)) {
  19.   $user[] = chop(fgets($downloaders,65536));
  20. }
  21.  
  22. fseek($downloaders,0,SEEK_SET);
  23. ftruncate($downloaders,0);
  24.  
  25. $youcantdownload = 0;
  26. foreach ($user as $line) {
  27. list($savedip,$savedtime) = explode('|',$line);
  28.  if ($savedip == $userip) {
  29.     if ($time < $savedtime + ($uploadtimelimit*60)) {
  30.       $youcantdownload = 1;
  31.       $downtimer = $time - $savedtime ;
  32.       $counter = $uploadtimelimit*60 - $downtimer;
  33.     }
  34.   }
  35.  
  36.   if ($time < $savedtime + ($uploadtimelimit*60)) {
  37.     fputs($downloaders,"$savedip|$savedtime\n");
  38.   }
  39. }
  40.  
  41.  
  42. if($youcantdownload==1) {
  43. ?><center><table style="margin-top:0px;width:790px;height:400px;"><tr><td style="border:1px #AAAAAA solid;height:100%;background-color:#FFFFFF;padding:20px;text-align:left;" valign=top><?
  44. echo "<h1><center>Upload Time Limit</center></h1>";
  45.         ?><script type="text/javascript">
  46.  
  47. var running = false
  48. var endTime = null
  49. var timerID = null
  50. var totalMinutes = <?php echo $counter;?>;
  51.  
  52. function startTimer() {
  53.     running = true
  54.     now = new Date()
  55.     now = now.getTime()
  56.     endTime = now + (1000 * totalMinutes);
  57.     showCountDown()
  58. }
  59.  
  60. function showCountDown() {
  61.     var now = new Date()
  62.     now = now.getTime()
  63.     if (endTime - now <= 0) {
  64.        clearTimeout(timerID)
  65.        window.location.reload()
  66.  
  67.     } else {
  68.         var delta = new Date(endTime - now)
  69.         var theMin = delta.getMinutes()
  70.         var theSec = delta.getSeconds()
  71.         var theTime = theMin
  72.         theTime += ((theSec < 10) ? ":0" : ":") + theSec
  73.         document.getElementById('SessionTimeCount').innerHTML = 'Please wait ( <font color="#FF0000">' + theTime + '</font> ) Minutes for Upload'
  74.         if (running) {
  75.             timerID = setTimeout("showCountDown()",1000)
  76.         }
  77.     }
  78. }
  79.  
  80. window.onload=startTimer
  81. </script>
  82.  
  83.  
  84. <center><span id="SessionTimeCount"></span></center><br /><br /><br /><br />
  85.  <?
  86.  
  87.         include("./bottomads.php");
  88.  
  89. ?><td><tr><table><?
  90.  include("./footer.php");
  91.       die();
  92.  
  93. }
  94.  
  95. }
  96.  
  97. ///////////////////////////////////////////TIMER///////////////////////
  98.  
  99.  
  100. $sizehosted = 0; //get the storage size hosted
  101. $handle = opendir("./storage/");
  102. while($file = readdir($handle)) {
  103. $sizehosted = $sizehosted + filesize ("./storage/".$file);
  104.   if((is_dir("./storage/".$file.'/')) && ($file != '..')&&($file != '.'))
  105.   {
  106.   $sizehosted = $sizehosted + total_size("./storage/".$file.'/');
  107.   }
  108. }
  109. $sizehosted = round($sizehosted/1024/1024,2);
  110.  
  111. if(isset($allowedtypes)){ //get allowed filetypes.
  112.   $types = implode(", ", $allowedtypes);
  113.   $filetypes = "<b>$lang[allfile]</b> ".$types."<br /><br />";
  114. } else { $filetypes = ""; }
  115.  
  116. if(isset($categories)){ //get categories
  117.   $categorylist = "$lang[cat2]: <select name=\"category\">";
  118.   foreach($categories as $category){
  119.     $categorylist .= "<option value=\"".$category."\">".$category."</option>";
  120.   }
  121.   $categorylist .= "</select><br />";
  122. } else { $filetypes = ""; }
  123.  
  124. if(isset($_GET['page']))
  125.   $p = $_GET['page'];
  126. else
  127.   $p = "0";
  128. include 'total.php';
  129.  
  130. switch($p) {
  131. case "tos": include("./pages/tos.php"); break;
  132. case "faq": include("./pages/faq.php"); break;
  133. case "img": include("./pages/image.php"); break;
  134. default: include("./pages/upload.php"); break;
  135. }
  136.  
  137. include("./footer.php");
  138. ?>
  139.  
or if you can fix problem 2

in yellowtip 2.0 web server I need to INSTALL the gd files, it does NOT have any with it and I un ; the php_gd2.dll line (errors that its not there)

ive tried installing every form of web software that uses http and php that I could find ranging from xampp (currently on) wamp(same problem) easyphp(connect ion always reset). AND yellowtip 2.0 (I REALLY want to use this, PLEASE assist in installing GD files.)

Please assist as my mind is now gone.
Aug 5 '09 #1
6 1789
Markus
6,050 Recognized Expert Expert
You've probably neglected to close a block with '}' - check your included files.

What was the exact error message?
Aug 5 '09 #2
LordZyse
4 New Member
@Markus
its the same one with the resolution you are referring to, but as I said when I use yellow tip I get the error about the

Fatal error: Call to undefined function: imagecreatefrom jpeg() in C:\Program Files\YellowTip \Htdocs\uploadt est\basic.php on line 49

instead of the unexpected end line, I checed al the coding and I cant find a braket to close,

Hense why the yellow tip just need the installation of the gd library files.

hense why I am at such a loss.
Aug 5 '09 #3
Markus
6,050 Recognized Expert Expert
Confused.com

What's wrong with your XAMPP installation - it comes with GD.
Aug 5 '09 #4
dlite922
1,584 Recognized Expert Top Contributor
@Markus
Car insurance?

ImLost.com




Dan
Aug 5 '09 #5
LordZyse
4 New Member
@Markus
xampp, gives me the end of file error.
Aug 5 '09 #6
LordZyse
4 New Member
ITS FIXED!!!!
using this webpage
http://museum.php.net/win32/
downloading the previous version that yellow tip was using 4.3.6
extracting the extension folder
(you have to use same version of dll's as the php version)
on the
extensions_dir
I HAD to put c:\program files\yellowtip/extensions/
Had to put the / instead of the \.
uncommented the php_gd2.dll

AND IT WORKS!

If you want to help me test upload a pic to http://zyse.ath.cx/uploadtest/

Thanks for helping tho!

Lord Zyse
Aug 6 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

15
7740
by: Andrew | last post by:
Last night I was reading about implementing my own stack. The example given pushes items on and off the stack at the start and end of each procedure (ie. in a std module). What's not so clear is how this would work with class objects. In this case do you have to push the object on the stack at the start of every public procedure etc. in the class and pop it off at the end? I can't see how else you can know which object is active - or...
1
1409
by: torbs | last post by:
I am trying to use the methods in quicktimes plugin, but IE generetes an error. I have tried to use the "document.all" instead of getElementById but the results remain the same. It won't recognise "movie1" and "movie2" as objects, and it won't allow me to use their methods. And of course IE generates an error message that says nothing about what might be wrong.
5
512
by: Mike Owen | last post by:
Hi, I have just used the import Wizard to import a VS 2003 app to VS 2005. I have a lot of work to do to enable it to compile successfully with all the errors and warnings it gave me, but as a starting point the compiler can no longer find the function as at the bottom of this posting, that was in the Global.asax.vb file. All the function does is give an easy / quick way of getting the application
19
6270
by: MLH | last post by:
I call the following Sub and Function in frmLaunch's OnOpen event code. I keep getting Property Not Found error for the AllowBypassKey setting. Failure point is line #30 in the Function (not the Sub). Ideas? Sub SetStartupProperties() On Error GoTo SetStartupProperties_Err 10 ChangeProperty "StartupForm", dbText, "frmLaunch" ' Form you want to open at startup 20 ChangeProperty "StartupShowDBWindow", dbBoolean, False ...
4
1939
by: Al Williams | last post by:
Hi, I have error handling in place throughout my application. I also start the application wrapped in error handling code to catch any unexpected exceptions (i.e. exceptions that occur where I haven't placed error handling code). When I run my app from the IDE, the unhandled errors are caught by the error handling code in my Sub Main routine and the error details are logged to a text file and optionally e-mailed to me for follow-up.
4
2040
by: Rob Richardson | last post by:
Greetings! I am working on an application that targets a Pocket PC running Windows CE and SQL Server CE. Almost all functions in the application use a Try block with a Catch block that looks like this: Try TryToDoIt() Catch e as Exception LogTheError(e)
1
6631
by: Peter | last post by:
I've purchased VS.NET 2005 Standard and have tried to install SQL Server 2005 Express, but get the following error in the error log. Please could someone help me.... Microsoft SQL Server 2005 Express Edition x86: Component Microsoft SQL Server 2005 Express Edition x86 returned an unexpected value. ***EndOfSession***? Microsoft SQL Server 2005 Express Edition x86: Component Microsoft SQL Server 2005 Express Edition x86 returned an...
7
7792
by: Jan | last post by:
Hi: When I searched the newsgroup for this problem, I saw two or three instances of the question being asked, but it was never answered. Not too promising, but here goes: I have a form with four subforms, and bit of code that cycles through the data in the subform (bound to a local temp table) and writes it to a table on the server. This code has run at the client with no problems for over a year.
1
2138
by: Adrienne Boswell | last post by:
This is the strangest thing. On my local beta server (WinXP Pro SP3, PHP 5.2.3), I am getting an unexpected $end. On the production server, I am not. The files are identical. Just for shits and giggles, I made a new folder on my local machine, copied all the files from the production server, opened it, and again got the same thing. The production server is running version 4.4.7. So I thought, aha! - older version of PHP. So I opened...
0
9384
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9212
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9973
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9779
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9645
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8645
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5247
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2612
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.