Coder Social home page Coder Social logo

Comments (8)

jtreminio avatar jtreminio commented on June 21, 2024

Hi,

To run puphpet locally you need to clone https://github.com/puphpet/vagrant-puppet-lamp and run $ vagrant up. It'll set everything you need up for you!

from puphpet.

tonicospinelli avatar tonicospinelli commented on June 21, 2024

Ok! =)
but when I created the VM with puphpet, I had problems to create compressed data.
I fixed this problem with Php ZipArchive, and I believe this improvement is good for all OS.

It is a simple refactoring ;)

from puphpet.

jtreminio avatar jtreminio commented on June 21, 2024

I had originally chosen ZipArchive, but a few problems:

  1. It can't add a directory at once,
  2. Attempting to replace a file within a zip archive overwrites everything in that tree structure.

Looking back I probably could have gone another, more logical route before jumping to exec(). Will look through this PR to see if it makes sense for us.

Can you tell me what problems you had with the compression? It should work perfectly on all VMs, that's the whole point.

from puphpet.

frastel avatar frastel commented on June 21, 2024

I also have a problem with ZipArchive. When I jumped onto this project I thought "man this has to be refactored to ZipArchive as soon as possible" after I have seen this exec call. Time has passed and I do not see the benefit using this PHP feature anymore.
Viewing at the lines of code needed to copy a folder recursive does not convince me without any further added test.
However this refactoring is great and I like your motivation but I am not really sure if we should go this way.

Besides like @jtreminio I do not understand your initial problem. Did you use vagrant-puppet-lamp for provisioning your dev box or did you configure your dev box with the help of puPHPet and perhaps missed to add the zip package?
Could you please explain this problem further more?

from puphpet.

tonicospinelli avatar tonicospinelli commented on June 21, 2024

OK, I explain my problem. =)
I didn't use vagrant-puppet-lamp to create my box. I created my box with PuPHPet.com to test this repository.
After clicked in "Create My Manifest" warnings occurred, because the zip file didn't exists.
Warning: filemtime(): stat failed for /tmp/51ac952e9ef78FA0isn.zip in /var/www/puphpet.dev/src/Puphpet/Controller/Front.php on line 140
Warning: filesize(): stat failed for /tmp/51ac952e9ef78FA0isn.zip in /var/www/puphpet.dev/src/Puphpet/Controller/Front.php on line 142
Warning: readfile(/tmp/51ac952e9ef78FA0isn.zip): failed to open stream: No such file or directory in /var/www/puphpet.dev/src/Puphpet/Controller/Front.php on line 130

You can look my commit, in my fork, with this changes to resolve the warnings: tonicospinelli@badb6b2

Could you understand now? =)

from puphpet.

jtreminio avatar jtreminio commented on June 21, 2024

Gotcha.

The thing is, if you want to actually run a local copy of puphpet.com, you should do the following:

$ git clone https://github.com/puphpet/vagrant-puppet-lamp.git
$ cd vagrant-puppet-lamp
$ vagrant up

I realize the documentation isn't very good at all right now, but we've been pumping out so much new stuff it was hard to find time. I will make sure to find time soon.

from puphpet.

jtreminio avatar jtreminio commented on June 21, 2024

Hi,

After juggling with the decision, I've decided not to merge this in.

Requiring devs to use vagrant-puppet-lamp for developing puphpet gives us the freedom to use any tool and any version that we want, without worrying about compatibility issues.

Please don't stop submitting PRs are you create something new and awesome, though!

Thanks,
Juan

from puphpet.

tonicospinelli avatar tonicospinelli commented on June 21, 2024

Ok my friend! =)

I will do new PRs when I find new improvements or features.

Thanks,
Antonio

from puphpet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.