Skip to content

fix: correct loadEnv.php path in scraper jobs upload endpoint - #1117

Merged
AndreiBarari merged 7 commits into
masterfrom
fix/scraper-upload-loadenv-path
Jul 27, 2026
Merged

fix: correct loadEnv.php path in scraper jobs upload endpoint#1117
AndreiBarari merged 7 commits into
masterfrom
fix/scraper-upload-loadenv-path

Conversation

@sebiboga

Copy link
Copy Markdown
Member

Problem

/v1/scraper/jobs/upload/ returns a PHP fatal error:

Failed opening required '/var/www/html/v1/scraper/jobs/upload/../../../util/loadEnv.php'

The file v1/scraper/jobs/upload/index.php is 4 directories deep from root but only goes up 3 levels (../../../), resolving to v1/util/loadEnv.php instead of util/loadEnv.php.

Fix

Change ../../../ to ../../../../ — same pattern used by v1/firme/company/add/index.php which is at the same depth.

Path from v1/scraper/jobs/upload/ needs 4 levels up (../../../../) not 3 (../../../)
to reach root util/loadEnv.php. Same pattern as v1/firme/company/add/.
sebiboga added 6 commits July 27, 2026 08:51
- Fix TestValidation: case-sensitive string comparison ('at least one' -> 'At least one')
- Fix v1/random/index.php: use PROD_SERVER instead of SOLR_SERVER to match test env
- Uncomment v1/cleanjobs/index.php endpoint (entire code was commented out)
- Create v1/empty/index.php endpoint (was missing entirely)
- Change REPORT_FILE from tests/report/index.html to tests/report.html
- Remove old tests/report/ directory from git
- Add tests/results.json and cleanjobs.log to .gitignore
- Replace PROD_SERVER with SOLR_SERVER in all 12 endpoints
- Add PROTOCOL env var for URL construction (replace hardcoded http://)
- Update test env and docs to match
- Remove v1/empty endpoint and its tests (reduce risk of mass data deletion)
…b-endpoints

Missed 23 nested files under v1/firme/ and v1/scraper/jobs/ in the
previous commit. All endpoints now consistently use SOLR_SERVER + PROTOCOL.
@AndreiBarari
AndreiBarari merged commit d46b4b5 into master Jul 27, 2026
1 check passed
@sebiboga
sebiboga deleted the fix/scraper-upload-loadenv-path branch July 27, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants