Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73517 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44674 invoked from network); 2 Apr 2014 13:15:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Apr 2014 13:15:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=oneil@saxonica.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=oneil@saxonica.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain saxonica.com from 217.69.47.236 cause and error) X-PHP-List-Original-Sender: oneil@saxonica.com X-Host-Fingerprint: 217.69.47.236 uk1rly2283.eechost.net Linux 2.6 Received: from [217.69.47.236] ([217.69.47.236:34320] helo=uk1rly2283.eechost.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EE/C1-34012-25D0C335 for ; Wed, 02 Apr 2014 08:14:59 -0500 Received: from [82.152.109.199] (helo=[192.168.0.112]) by uk1rly2283.eechost.net with esmtpa (Exim 4.72) (envelope-from ) id 1WVL1Q-0006Py-E3 for internals@lists.php.net; Wed, 02 Apr 2014 14:16:04 +0100 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Message-ID: <42E6A56D-0FF1-4408-BCF5-DFBCEDA735EB@saxonica.com> Date: Wed, 2 Apr 2014 14:14:54 +0100 To: internals@lists.php.net Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) X-Mailer: Apple Mail (2.1874) X-Auth-Info: oneil@saxonica.com (plain) Subject: PHP C++ extension on Windows: setting the working directory the same as PHP From: oneil@saxonica.com (O'Neil Delpratt) Hi, I am having trouble getting the correct working directory in the C/C++ = code of my PHP extension. It should be the same as the PHP working = directory, but it is not. I have tried looking this on the web, but with not much joy. I found a = blog which describes my problem: = https://www.ibm.com/developerworks/community/blogs/phpblog/entry/comparing= _windows_and_php_working?lang=3Den In linux the C function getcwd() does as expected. It is the same as the = PHP cwd, but on windows it always uses the =93C:\Program Files\Apache = software Foundation\Apache2.2=94, whereas in my php script the call =91echo getcwd();=92 returns = =93C:\www\html=94 as expected. Please may someone point me in the write direction of how to get to the = PHP current working directory in a C/C++ PHP extension. Thanks in advance, ------------------------------- O'Neil Delpratt Software Developer, Saxonica Limited Email: oneil@saxonica.com Tel: +44 118 946 5894 Web: http://www.saxonica.com Saxonica Community site: http://dev.saxonica.com Bug tracking site: https://saxonica.plan.io/