File open error from php script

php version - 7.3.27
Komodo ver 12.0.1
OS: Windows 10

I have a php script which has herf tag to call another script in same path which is throwing error as it trying to locate file from %temp% location. can someone help me to fix this issue as i suspect default path set somewhere in komodo taking preference ?

script line:

NEW ARTICLE

copy of log file pystderr.log after reproducing issue:
[2021-03-17 19:01:09,661] [WARNING] console-logger: Unknown descriptor ‘font-display’ in @font-face rule. Skipped to next declaration. (1) in less://komodo/skin/global/global.less:1429
[2021-03-17 19:01:28,272] [WARNING] console-logger: Key event not available on GTK2: key=“u” modifiers=“control,shift” (1) in chrome://komodo/content/tail/tail.xul:0
[2021-03-17 19:12:20,140] [WARNING] console-logger: Key event not available on GTK2: key=“u” modifiers=“control,shift” (1) in chrome://komodo/content/debugger/debuggerPanel.xul:0
[2021-03-17 19:14:41,026] [WARNING] console-logger: Unknown descriptor ‘font-display’ in @font-face rule. Skipped to next declaration. (1) in less://komodo/skin/global/global.less:1429

@careyh & team - can you help me for this issue to fix as i have recently adapted your tool for php which is now stopping me from further work,

@nathanr tagging for support

Hey @sajitha_safrin,

Check Edit menu (Komodo on OSX) > Preferences > Environment: Startup environment variables. That’s the variables Komodo is aware of.

I can’t help more without more information. If you can’t figure it out from the above please share:

  • Code sample that’s breaking
  • What you expect to happen
  • What is actually happening

@careyh thanks for reply, apologies for delay in response. Please find below more info to clarify this request.

  • Code sample that’s breaking- below main code calling another php file through href html tag.

    <h2><a href="htmlcopy.php?id=<?= $article['id']; ?>"><?= $article['title']; ?></a></h2>
    
  • What you expect to happen - I have all my php files in same directory( eg:c:\code) if I run this main php file , this should give me list of links which is working and clicking on link should redirect to next page (htmlcopy.php from above code) .

  • What is actually happening - clicking on link throws me error as its looking for file in TEMP path instead of launching file from same path where maim code resides.

Hope I have clarified requirement and error details here, appreciate your help and support.

Morning @sajitha_safrin,

How are you preview the webpage?
Can you share the HTML that is rendered by the PHP?

Please provide more details about your workflow. Something like:

  1. I open file blah.php in Komodo
  2. I start my PHP server
  3. I open the page in a browsers and click the link

Something like the above. It’s not clear to me how you’re getting from your editor code to the error you’re reporting. A few things could be possible but I don’t want to guess.

So far my best guess is that your PHP server has your DocumentRoot configured to your system temp dir.

  • Carey

thanks @careyh for your support again.

  1. Open code in editor and click on start debugging.
  2. Code run and display HTML output as below.
  3. Click on HREF text link in html page throws me this error.
  4. I presume document root points to location of php script. Not sure if any place to check as getenv(“SCRIPT_NAME”); returns php script path.

Note: I have started my php study in MAMP server, hence I still have this in my laptop , do you think this create any conflicts in php server?

image
image

@sajitha_safrin thanks for clarifying. You need to test your code through MAMP, not Komodo. If you want to debug PHP server code that servers up a website you need to setup remote debugging:

@careyh thanks for your clarification. Apologies if your answered already, how do I setup my pc to debug and run php code without MAMP and using Komodo which should execute all features of php,? can you share any documentation to understand and guide this steps.

Morning @sajitha_safrin,

I shared the documentation in my last comment. It should have opened to the Remote Debugging docs for PHP. Did it not? That’s all the information you should need.

  • Carey