HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Error from m_zip.php

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#107658 (In Topic #20978)
Avatar

Well-settled

I was attempting to update one of our downloads by uploading a more recent file when I received this error:

Code

Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /sites/lanotd.viclan.org.au/www/sources/m_zip.php on line 37

Anyone know that that's about?

[OMA] Clawcity - If It Ain't You….Frag It!!!
LAN Of The Damned - Admin
Back to the top
 
Posted
Rating:
#107661
Avatar

What PHP version are you running?


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#107662
Avatar

Long story short, I'd definitely recommend upgrading to PHP5, or install the PHP zip extension if you really can't upgrade.

I could give a much longer explanation, but it'd get overly-complex and go in 5 directions.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#107665
Avatar

Well-settled

It's version 4.4.7 and I don't have manage the webserver itself, so no chance I can upgrade it.
With that in mind, could I even install the zip extension?

[OMA] Clawcity - If It Ain't You….Frag It!!!
LAN Of The Damned - Admin
Back to the top
 
Posted
Rating:
#107666
Avatar

Ok then quickly…

sources/m_zip.php

Remove:

Code

eval("class ZIPARCHIVE
{
   const ER_OK=0;  /* N No error */
   const ER_MULTIDISK=1;  /* N Multi-disk zip archives not supported */
   const ER_RENAME=2;  /* S Renaming temporary file failed */
   const ER_CLOSE=3;  /* S Closing zip archive failed */
   const ER_SEEK=4;  /* S Seek error */
   const ER_READ=5;  /* S Read error */
   const ER_WRITE=6;  /* S Write error */
   const ER_CRC=7;  /* N CRC error */
   const ER_ZIPCLOSED=8;  /* N Containing zip archive was closed */
   const ER_NOENT=9;  /* N No such file */
   const ER_EXISTS=10;  /* N File already exists */
   const ER_OPEN=11;  /* S Can't open file */
   const ER_TMPOPEN=12;  /* S Failure to create temporary file */
   const ER_ZLIB=13;  /* Z Zlib error */
   const ER_MEMORY=14;  /* N Malloc failure */
   const ER_CHANGED=15;  /* N Entry has been changed */
   const ER_COMPNOTSUPP=16;  /* N Compression method not supported */
   const ER_EOF=17;  /* N Premature EOF */
   const ER_INVAL=18;  /* N Invalid argument */
   const ER_NOZIP=19;  /* N Not a zip archive */
   const ER_INTERNAL=20;  /* N Internal error */
   const ER_INCONS=21;  /* N Zip archive inconsistent */
   const ER_REMOVE=22;  /* S Can't remove file */
   const ER_DELETED=23;  /* N Entry has been deleted */
}
");

Search and replace constant('ZIPARCHIVE::ER_INTERNAL') with 20.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#107700
Avatar

Well-settled

Well that had interesting results.

PHP WARNING [2] mkdir(/sites/clawcity/tmp/Z422921931000000010dcdm_Lit6yj/) [<a href='http://www.php.net/manual/en/function.mkdir.php'>function.mkdir.php</a>]: No such file or directory in /sites/lanotd.viclan.org.au/www/sources/m_zip.php on line 56 (version: 7.1.4, PHP version: 4.4.7, URL: /cms/index.php?page=cms_downloads&type=__ed&id=4&redirect=http%3A%2F%2Flanotd.viclan.org.au%2Findex.php%3Fpage%3Ddownloads%26type%3Dentry%26id%3D4&uploading=1

[OMA] Clawcity - If It Ain't You….Frag It!!!
LAN Of The Damned - Admin
Back to the top
 
Posted
Rating:
#107701
Avatar

Configure the "Unzip directory" option.

You can also try this OcCLE command to avoid search indexing:

Code

:set_value('no_dload_search_index','1');
I know it works in v9, I don't know about v7.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: