Upload folder created twice (v2024)

Using

  • phpmaker2024: latest version, latest template
  • project file: demo

Advanced Settings
Web root relative path: Default (“.” without quotes)
File upload path (absolute) for temporary files: Default (empty)

PHP Settings
Upload folder: upload/
Project folder: C:\xampp\htdocs\demo
Generate completed successfully without errors.

PROBLEM
Upload folder created twice: C:\xampp\htdocs\demo\upload (expected) and C:\upload (not expected)

Any ideas of what is the possible cause of this problem?Thank you.

Did you see both upload folder have the same uploaded files, too?

No.
C:\upload is always empty.
C:\xampp\htdocs\demo\upload works as expected. CRUD operations (of files) work as expected with this folder.

I did clean install all softwares (windows 10, apache 24, php 8.3, node, composer, etc). The problem still persisted.
I’m using VMware.What is the script (inside the template) which create this folder?
I observed that folders log and upload was created during compilation of .pmp (before the actual files generation).

You better check your Apache config file under C:\xampp\apache\conf\httpd.conf, make sure you use correct Windows paths for your XAMPP installation, not Linux paths (starting with “/”), e.g.

DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
...
</Directory>

Tried both Windows path (“C:\xampp\htdocs”) and Linux path (“C:/xampp/htdocs”).
Restart apache, restart machine.
The problem still persisted.

Double check your upload folders (which are paths relative to the project folder) in your project, make sure they are not absolute paths (i.e. they do not starts with “/” or "C:").

PHP → General Options → File Upload → Upload folder = upload/If I change the value to anothername/ the behavior is still persisted. It will create folder anothername twice, both in C:\ and C:<project folder>

I cannot reproduce, you may want to delete the C:\upload and then upload a file again, see after which step the folder is created. Also post more info, e.g.

  • Upload to folder or database? Multiple file upload or single?
  • Upload in which page?
    etc.

I generated project demo2024.pmp as is with only few changes:

  • change connection strings (as mentioned in readme.txt).
  • uncheck tables locations, locations2, and locations3 (due to googlemaps API and leaflet)
  • enable Debug

Generate completed successfully without errors.
The only strange behavior is that it created folder C:\uploadGenerated apps looks goods.
C:\xampp\htdocs\demo\upload works as expected. CRUD operations (of files) work as expected with this folder.
CRUD operations was done using http://localhost/demo/employeeslist (employee photo). Add, edit, and delete pages works as expected.C:\upload is always empty, during CRUD operations of employee table.
Deleting folder C:\upload has no effect, CRUD operations of employee table still working as expected.However, folder C:\upload always re-created each time I re-generate the app.

1 Like

Cannot simulate. If you are a registered user, please send your project file to the support email for checking.

I have exactly the same problem, the folder C:\upload is always re-created each time than regenerate the app. I just delete C:\upload each time, I hope someone can discover a solution. PHPMaker v2024.3, v2024.7, v2024.8, v2024.15 all them have the same issue.