WAMP and dotfiles

55 views
Skip to first unread message

Steven Berkson

unread,
Apr 18, 2024, 11:40:52 PMApr 18
to joomla-de...@googlegroups.com

Anyone have any advice on this maddening issue that complicates my development server?

 

I am using WAMP on Windows 11 with SSL for Joomla 5.0.3 development. WAMP is running Apache 2.4.58 with PHP 8.1.26

 

Everything works fine except I cannot install extension updates or Joomla updates.

 

I have determined that in the file Filesystem\Folder.php, each installation is proceeding just fine until it reaches an .htaccess file and then it fails with a permissions error. The thing is, I have done everything with windows permission possible on this, and there is no specific permission associated with the .htaccess file in question, so it seems like PHP/Apache must just be deciding that it does not have permission to manipulate dot-files.

 

The error is occurring in Filesystem\Folder.php at line 147-148.

 

if (!@copy($sfid, $dfid)) {

    throw new \RuntimeException('Copy file failed', -1);

}

 

I can watch all the files successfully copy until an .htaccess file comes up and then it throws the exception. This does not happen on my Ubuntu development server nor on my cPanel/CentOS7.9 server.

 

Anyone have an idea why this might be happening in the windows/WAMP environment or how I can correct it?

shumisha

unread,
Apr 19, 2024, 6:51:29 AMApr 19
to Joomla! General Development
Hi

Can't say why it happens but I'd suggest editing that file and removing the @ symbol before the copy() instructions. 

Things will fail the same but you'll have likely a more detailed error message displayed, which may help in figuring it out.


Steven Berkson

unread,
Apr 19, 2024, 12:41:56 PMApr 19
to joomla-de...@googlegroups.com
Tried that and got no additional detail really.

Steven Berkson


From: joomla-de...@googlegroups.com <joomla-de...@googlegroups.com> on behalf of shumisha <shum...@gmail.com>
Sent: Friday, April 19, 2024 3:51:29 AM
To: Joomla! General Development <joomla-de...@googlegroups.com>
Subject: [jgen] Re: WAMP and dotfiles
 
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/joomla-dev-general/f7fd6ae1-ab7d-42cd-b105-53fdc66afcc2n%40googlegroups.com.

Glenn Arkell

unread,
Apr 19, 2024, 5:08:19 PMApr 19
to Joomla! General Development
This may not be an appropriate answer ( due to my lack of knowledge around the .htaccess) but I don't use this file on my development server locally.  So if this is on your local machine, delete it or rename it to htaccess.txt.

JeeJee Studio

unread,
Apr 20, 2024, 7:57:03 AMApr 20
to Joomla! General Development
Hi,

in the past I had strange errors with PHP on Windows 10, meaning when developed on Windows and showed no errors in Xampp, it had errors on Linux with Xampp. So when I found and corrected the errors on Linux it also worked flawless on Windows with Xampp. Really strange.
So now with Dual boot I only work in Linux Ubuntu to develop.

I also got rid of Xampp on Linux and followed this blog which allows me to run several versions of PHP which can be usefull.

Also PHP and Apache run really fast on Ubuntu, muuuuch faster than on Windows. Actually muuuuuuuuuuuuuuuuch faster.

Cheers!

Op vrijdag 19 april 2024 om 05:40:52 UTC+2 schreef Neo314:

shumisha

unread,
Apr 21, 2024, 6:56:43 AMApr 21
to Joomla! General Development
Hi

1 - You did not provide the actual error (when removing the @ symbol, which suppresses errors). For instance, is the permission error happening when trying to access the source of the copy or when trying to write it?
2 - Are you running wamp as an administrator? are PHP/apache installed as services?

Steven Berkson

unread,
Apr 21, 2024, 2:33:29 PMApr 21
to joomla-de...@googlegroups.com
  1. Not much feedback, but here is what I know. I seem to get the Joomla message:
    “JSON.parse: unexpected character at line 1 column 1 of the JSON data” but since the failure is a native PHP function, I’m not sure what to do with that. If I reload, I get the copy file failed and the error installing component message. The messages below represent 2 different components because I tried different components testing.

    I get the PHP error: “PHP Warning: copy(C:\mywebsite\public_html\media\com_jchoptimize\assets/.htaccess): Failed to open stream: Permission denied in /C:/mywebsite/public_html/libraries/src/Filesystem/Folder.php on line 147

    $dfid = C:\mywebsite\public_html\administrator\components\com_admintools\src/Scanner/.htaccess

    $ sfid = C:\mywebsite\public_html\tmp\install_66255a3b5845b\install_66255a3b9e073\backend\src/Scanner/.htaccess

  2. I was not, but before these tests I made the wampapache64 service run under the administrator account (account services, logon tab, restart service). No change.

 

From: joomla-de...@googlegroups.com <joomla-de...@googlegroups.com> On Behalf Of shumisha
Sent: Sunday, April 21, 2024 03:57
To: Joomla! General Development <joomla-de...@googlegroups.com>
Subject: [jgen] Re: WAMP and dotfiles

 

Hi

--

You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.

shumisha

unread,
Apr 22, 2024, 6:58:35 AMApr 22
to Joomla! General Development
> Not much feedback, but here is what I know. I seem to get the Joomla message:

That's likely not relevant, it's a consequence of the underlying problem

ok, so we know now it's about reading the source file. As this is of course not what happens normally on windows with PHP, I'd say the most likely reason are:

- there's indeed a permissions issue
- your antivirus is blocking access to .htaccess. Blocking that file is not part of Windows Defender so maybe you're using another one? try disabling it.

> there is no specific permission associated with the .htaccess file in question
May be an ownership permission, either on that file or any folder up the folders chain


Steven Berkson

unread,
Apr 22, 2024, 1:50:21 PMApr 22
to joomla-de...@googlegroups.com

I’ll try to dig into it again. I made the parent folders owned by “Everyone” in an effort to resolve it. I am using Norton, and I could give that a try.

 

Since no other files are affected, and no unix-like permissions are carried forward in the zip file to windows, Your anti-virus theory, or something else that is triggered by the dotfile name seems the most likely culprit.

 

My web space is not inside of the WAMP folder (c:\mywebsites and c:\wamp64), but everything else works and this is how I have been configured many times before, including updating extensions, without any issue. I did try other php/apache version, no change.

Steven Berkson

unread,
Apr 22, 2024, 1:51:52 PMApr 22
to joomla-de...@googlegroups.com

No change disabling both Norton AV and Firewall.

Russ Winter

unread,
Apr 22, 2024, 8:11:31 PMApr 22
to joomla-de...@googlegroups.com
have you tried disabling "Admin Tools" temporarily as the message is coming from that extension.


--
Regards,
Russ Winter






Steven Berkson

unread,
Apr 22, 2024, 8:39:23 PMApr 22
to joomla-de...@googlegroups.com
That is one of the extensions I tried to update, so I think that is what you are seeing. That said, I did have the problem with the whole admin tools disabled. This was a clone of the live site and admin tools was a hassle on the dev server, so I did have it disabled for part of the time.

I believe the issue is with WAMP, but I don't know why.

Steven Berkson


Sergio Manzi

unread,
Apr 23, 2024, 2:32:44 AMApr 23
to joomla-de...@googlegroups.com

Steven,

I'm not into Joomla dev any more since a long time, but have you tried with a different WAMP stack? For my needs I'm very happy with the Wamp.NET stack (https://wamp.net/).

Cheers,

Sergio

Reply all
Reply to author
Forward
0 new messages