Skip to main content

Posts

Showing posts with the label path

Case-inconsistency of PHP file paths on Mac / MAMP?

I'm developing a PHP program on MAMP, and just realized the following screwy behavior: echo "<br/>PATH = ".dirname(__FILE__); include 'include.php'; include.php: <?php echo "<br/>PATH = ".dirname(__FILE__); ?> Result: PATH = /users/me/stuff/mamp_server/my_site (All lower case) PATH = /Users/me/Stuff/mamp_server/my_site (Mixed case) What is causing this inconsistent behavior, and how can I protect against it? (Note that I can't just convert everything to lowercase, because the application is destined for a Linux server, where file paths are case sensitive. ) Update: This problem exists for __FILE__ and __DIR__ . It looks like this might be a real problem with no work around... going to file a bug report unless I hear otherwise. Bug report: https://bugs.php.net/bug.php?id=60017 Update: And another note: If you're doing an absolute path include(...) on Mac, it requires the mixed case version.

Eclipse - no Java (JRE) / (JDK) &hellip; no virtual machine

I am trying to get Eclipse Galileo to re-run on my computer - i have run it before with no problems but now i keep getting this error: A java Runtime Environment (JRE) or Java Development kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations: C:\eclipse\jre\javaw.exe javaw.exe in your current PATH I've just done a fresh install of both the JDK and the SDK I have Windows 7 (x64) what's up with this? / how do i fix it->? UPDATE-> i can't run any of the ipconfig / tracert / ping