• 0

Accessing Phing/PHPUnit On Shared Hosting


Question

Right, I'm not sure whether this is just an absolutely crazy idea but I'm trying to use Phing and PHPUnit on a project but the web server I have them installed on is shared hosting :( and I can't access the command line as the host doesn't allow it.

I want to play around with PHPUnit first, and I know you can implement it through Phing. So looking at the Phing executable it just runs the phing.php file in the PEAR directory.

What would be the best way around the no CLI? I had a crazy thought about creating a web script that would convert form input parameters into command line arguments and then call the phing.php, but I have very little idea how to hand the CLI output streams?

Any ideas?

Thanks

5 answers to this question

Recommended Posts

  • 0

You could try using PHP system calls to run commands on the server, not sure if it would have the required permissions though.

Otherwise, if it does just call phing.php from PEAR then you should just be able to include this from your script and run it yourself maybe?

  • 0

Well I'm now starting to see why a host with SSH would be helpful.. The host we have at the minute is very limited in terms of SSH (not even SFTP, only FTPS, which is supported by very few FTP clients).

Knad, I doubt we'd have the required permissions, and it sounds a bit hit and miss :/

Kudos, I see your point about running on the production server but my main issue is this. We're only a small company (well actually I'm the only developer, if I can even call myself one) and we don't have a full time testing server in house right now as we're only just starting the project fully. So at the minute I'm running tests on a secured subdomain on the shared hosting, which is obviously not ideal for resources and it also presents the issue I'm at now.

Alternatively I could install PHP on one of the normal work computers and develop on there, but then if I want to work at home, I would have to either do the same here and synchronise the files at snail speed or set up a webserver/SSH on that computer, which more than likely when I go to connect will be turned off or unplugged by somebody.

As you can probably tell, I'm still learning, so do you have any suggestions on a system where I could run command line PHP and access the development files in multiple locations? Is the only solution to go the full nine yards, get a proper internet connection and a development server?

  • 0

Dropbox would be a simple way of syncing your development web directory to various machines.

At a minimum, a virtual machine simulating your production environment should be what you are using for development and testing. You can do this for free and run it on your desktop computer. Once you've got it all configured, you can copy this VM image to your home computer and use it there too. You can develop and run your tests here, deploying to the shared hosting when you reach your goals.

You should also be running a version control system such as Git or SVN to track changes to your code.

  • 0

Definitely an idea. I should be able to duplicate the environment in a VM easy enough, and Dropbox would certainly be easy to access.

Where do you suggest I run git/SVN, on the on one of the work desktop machines? If I'm running it on the desktop machine, then I wouldn't easily be able to see revisions and similar from home, where a lot of coding also gets done.

I have been reading up on version control recently but the basics seem to escape me, so sorry once again more than likely ridiculous questions..

Thanks

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • What they really need to do is automatically spell "loses" and "lose" correctly since nobody seems to know how to anymore. Then they blame spellcheck/autocomplete and don't realize autocomplete is just filling in the word for them automatically so it was misspelled in the first place.
    • If someone chooses to continue using SB and therefore goes through the manual intervention in the thread, afterwards the BSOD problem is gone. Whether they then re-enable the task doesn't matter, they're done, though on such machines it might pay to keep it disabled in case the next update (if there is a next) causes the same problem. OTOH, if someone disables SB in the BIOS, the problem is also gone. Incidentally, I noticed that this task exists even on machines that don't support SB. It's just installed across the board...and runs. Doing what on such machines is a little hazy.
    • qBittorrent 5.2.2 by Razvan Serea The qBittorrent project aims to provide a Free Software alternative to µtorrent. qBittorrent is an advanced and multi-platform BitTorrent client with a nice user interface as well as a Web UI for remote control and an integrated search engine. qBittorrent aims to meet the needs of most users while using as little CPU and memory as possible. qBittorrent is a truly Open Source project, and as such, anyone can and should contribute to it. qBittorrent features: Polished µTorrent-like User Interface Well-integrated and extensible Search Engine Simultaneous search in most famous BitTorrent search sites Per-category-specific search requests (e.g. Books, Music, Movies) All Bittorrent extensions DHT, Peer Exchange, Full encryption, Magnet/BitComet URIs, ... Remote control through a Web user interface Nearly identical to the regular UI, all in Ajax Advanced control over trackers, peers and torrents Torrents queueing and prioritizing Torrent content selection and prioritizing UPnP / NAT-PMP port forwarding support Available in ~25 languages (Unicode support) Torrent creation tool Advanced RSS support with download filters (inc. regex) Bandwidth scheduler IP Filtering (eMule and PeerGuardian compatible) IPv6 compliant Available on most platforms: Linux, Mac OS X, Windows, OS/2, FreeBSD qBittorrent 5.2.2 changelog: FEATURE: Use D-Bus to show file in file managers (Chocobo1) #24340 BUGFIX: Fix friendlyUnitCompact precision calculation (vafada) #24323 BUGFIX: Remove all top-level folders (glassez) #24333 BUGFIX: Use proper API for checking exit status (Chocobo1) #24349 BUGFIX: Delete stale lockfile when hostname mismatch (TurboTheTurtle, glassez) #24363 BUGFIX: Fix wrong removal procedure of watched folder paths (Chocobo1) #24413 BUGFIX: Don't reannounce before interface changes are applied (glassez) #24447 BUGFIX: Use Latin script for Bosnian locale name (Andy Ye) #24342 WEBUI: Fix performance of global checkbox toggling (tehcneko) #24316 WEBUI: Fix Safari transfer list header misalignment (Piccirello) #24377 WEBUI: Fix error when submitting magnet before metadata loads (Piccirello) #24378 WEBUI: Use correct row id when updating Rss Downloader feed selection (Chocobo1) #24402 WEBUI: Use SameSite=Lax for session cookie to fix cross-site login (Piccirello) #24422 WEBUI: Bring back properties panel expand/collapse button (vafada) #24430 WEBAPI: Only use X-Forwarded-Host header when reverse proxy support is enabled (Chocobo1) #24457 RSSS: Fix "RSS Smart Episode Filter" RegEx (nathanon-akk, glassez) #24398 RSS: Fix previously matched episode format (glassez) #24452 WINDOWS: Fix Python fallback search path (TurboTheTurtle) #24325 WINDOWS: NSIS: Allow to install x64 binary on ARM64 (Chocobo1) #24358 Download: qBittorrent 5.2.2 | 41.1 MB (Open Source) Download: qBittorrent 64-bit installer (qt6) | 43.6 MB Links: qBittorrent Home page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Weechat. https://weechat.org/
  • Recent Achievements

    • Veteran
      branfont went up a rank
      Veteran
    • Reacting Well
      Almohandis earned a badge
      Reacting Well
    • First Post
      Cosminus earned a badge
      First Post
    • One Year In
      ThatGuyOnline earned a badge
      One Year In
    • Week One Done
      Jeroen Wilms earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      485
    2. 2
      +Edouard
      185
    3. 3
      PsYcHoKiLLa
      126
    4. 4
      Steven P.
      87
    5. 5
      neufuse
      72
  • Tell a friend

    Love Neowin? Tell a friend!