简体   繁体   中英

EasyPHP: setting working directory simply fails

If one image worths more than 1000 words lets simply show the issue

https://youtu.be/1-1s-SkuENE

I have set up the working dir as follow在此处输入图片说明

Restarted the server

But when I try to visit the page ( http://127.0.0.1/edsa-superinformati_tmp or http://127.0.0.1/superinformati_tmp )

It gives me an error.

This should be the basic of easy PHP how can it be broken?

I also had this problem, and didn't find any answer, here or elsewhere.

But I finally managed to understand what was the problem: it comes from EasyPHP adding its new prefix edsa- to whatever directory name you cite when defining an alias.

If you want to work with, say test , it's saved as edsa-test .
From this, when you try accessing to:

  • 127.0.0.1/test , EasyPHP doesn't recognize it as a registered alias
  • 127.0.0.1/edsa-test , it recognizes it but tries to reach the edsa-test directory, that obviously doesn't exist

I found that registered alias are saved as a PHP serialized array in YourInstallFolder/EasyPHP-Devserver-17/eds-dashboard/store_alias.php , which looks like:

a:1:{i:0;a:2:{s:10:"alias_path";s:12:"/path/to/test";s:10:"alias_name";s:9:"edsa-test";}}

You have to modify this file to change the alias name, like this:

a:1:{i:0;a:2:{s:10:"alias_path";s:12:"/path/to/test";s:10:"alias_name";s:5:"test";}}

In this example s:9:"edsa-test" becomes s:5:"test" , because you must:

  • drop the edsa- prefix
  • AND
  • adjust the cited string size behind it (always 5 less than original size)

Here the beginning a:1 means that only 1 alias was registered; it may be a:N , where N is the number of registered aliases. Repeat this for each of them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM