symlink() cannot create symlink
Posted by: jikkee (---.24.nat.tls1b-cgn01.myaisfibre.com)
Date: March 11, 2021 07:29AM

Hi,

First time I using Wamp
my problem is when I starting wamp (3.1.9 x64)

this error showing in wamp64/logs/php_error

PHP Warning: symlink(): Cannot create symlink, error code(5) in c:\wamp64\scripts\wampserver.lib.php on line 157


ps. its in side wampserver.lib.php -> switchPhpVersion(), is its wierd ? becase my another computer look like does not run this function while wamp start

Im sry to my poor english

Options: ReplyQuote
Re: symlink() cannot create symlink
Posted by: RiggsFolly (Moderator)
Date: March 11, 2021 07:54AM

Hi,

1. Is the disk that WAMPServer is installed on formatted as NTFS

2. Did you install WAMPServer using the "Run as Administrator

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: symlink() cannot create symlink
Posted by: jikkee (---.24.nat.tls1b-cgn01.myaisfibre.com)
Date: March 11, 2021 08:00AM

Hi Rigg

1. Is the disk that WAMPServer is installed on formatted as NTFS
yes i did checked NTFS

2. Did you install WAMPServer using the "Run as Administrator
helpdesk install + test run by admin privilege

thx



Edited 1 time(s). Last edit at 03/11/2021 08:04AM by jikkee.

Options: ReplyQuote
Re: symlink() cannot create symlink
Posted by: RiggsFolly (Moderator)
Date: March 11, 2021 08:19AM

Hi again,

Why are you installing such an old version of WAMPServer?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: symlink() cannot create symlink
Posted by: jikkee (---.24.nat.tls1b-cgn01.myaisfibre.com)
Date: March 11, 2021 08:28AM

Its come from helpdesk.

btw I already tried with 3.2.3 and get same result.

Options: ReplyQuote
Re: symlink() cannot create symlink
Posted by: jikkee (---.24.nat.tls1b-cgn01.myaisfibre.com)
Date: March 11, 2021 08:47AM

btw
Another computer just install wamp64 3.1.9 by helpdesk
its working fine.

Options: ReplyQuote
Re: symlink() cannot create symlink
Posted by: Otomatic (Moderator)
Date: March 11, 2021 09:39AM

Hi,

> Another computer just install wamp64 3.1.9 by helpdesk its working fine.

It means that on your machine, you don't have enough rights to create symbolic links.

The latest full version of Wampserver is 3.2.3.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: symlink() cannot create symlink
Posted by: jikkee (---.24.nat.tls1b-cgn01.myaisfibre.com)
Date: March 11, 2021 09:43AM

thx you somuch, rigg

i will talk with helpdesk again.

Options: ReplyQuote
Re: symlink() cannot create symlink
Posted by: Kaizouku (112.198.226.---)
Date: March 15, 2021 09:59AM

Hi Rigg,

I believe I'm the helpdesk that's been helping jikkee, I just want to know what's the meaning behind the symlink

error code (5). Btw I already tried installing Wampserver 3.2.3 but we still get the same error and jikkee already

have an admin access on this machine

Options: ReplyQuote
Re: symlink() cannot create symlink
Posted by: Otomatic (Moderator)
Date: March 15, 2021 11:17AM

Hi,

> I just want to know what's the meaning behind the symlink

A symbolic link is a file-system object that points to another file-system object. The object that's pointed to is called the target. Symbolic links are transparent to users. The links appear as normal files or directories, and they can be acted upon by the user or application in exactly the same manner.

Under Windows, this is done by mklink
Type: mklink /? in a command window

With PHP this is done by symlink()

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: symlink() cannot create symlink
Posted by: Kaizouku (112.198.226.---)
Date: March 16, 2021 04:30AM

But what is the meaning of symlink error code (5)?. I previously followed a different thread here and found that the error code (1314) has something to do with admin permission. Does error code(5) also have something to do with the admin permission problem?

Options: ReplyQuote
Re: symlink() cannot create symlink
Posted by: Otomatic (Moderator)
Date: March 16, 2021 11:10AM

Hi,

> Does error code(5) also have something to do with the admin permission problem?
Maybe, but I don't know.

What is the result of a command DIR in the bin folder of Apache used version?

Open a command windows as an administrator (The Word Administrator MUST be in the title bar of the command windows)
With CD command go to the bin folder of Wampserver Apache installation, for example :
CD /D C:\wamp64\bin\apache\apache2.4.46c\bin
Then type DIR

You can put the result directly into the clipboard by the command:
DIR | clip

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: symlink() cannot create symlink
Posted by: Otomatic (Moderator)
Date: March 17, 2021 03:59PM

Hi,

You can check if you have sufficient rights to create symbolic links by trying to do so via a command window.

Several things are required:
- The full path to the bin folder of the Apache version used by Wampserver, for example
e:\wamp64\bin\apache\apache2.4.46c\bin\

- The full path of the phpForApache.ini file of the PHP version used by Wampserver, for example
e:\wamp64\bin\php8.0.3\phpForApache.ini

Open a command window as administrator (The word Administrator must appear in the title bar of the command window).

In the command window, we will go to the bin folder of Apache by the command CD /D followed by the full path of the bin folder of Apache previously noted:
CD /D e:\wamp64\bin\apache\apache2.4.46c\bin\

Then we will try to create a symbolic link php.ini whose target is the full path of phpForApache.ini previously noted.

mklink php.ini e:\wamp64\bin\php8.0.3\phpForApache.ini
If the answer is: "Impossible to create an already existing file." it means that a file or a symbolic link with the name php.ini already exists and that it is necessary to delete it by the command del php.ini before creating the symbolic link.

The response should be:
Symbolic link created for php.ini <<===>> e:\wamp64\bin\php8.0.3\phpForApache.ini

C:\Windows\system32>CD /D e:\wamp64\bin\apache\apache2.4.46c\bin\

e:\wamp64\bin\apache\apache2.4.46c\bin>mklink php.ini e:\wamp64\bin\php8.0.3\phpForApache.ini
Impossible de créer un fichier déjà existant.

e:\wamp64\bin\apache\apache2.4.46c\bin>del php.ini

e:\wamp64\bin\apache\apache2.4.46c\bin>mklink php.ini e:\wamp64\bin\php8.0.3\phpForApache.ini
Lien symbolique créé pour php.ini <<===>> e:\wamp64\bin\php8.0.3\phpForApache.ini

e:\wamp64\bin\apache\apache2.4.46c\bin>

Of course, you have to adapt the different paths according to your own installation of Wampserver.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.