NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Debugging without any extension


Joined: 29 Sep 2004
Posts: 62
Location: �' AND sleep(21); /*
Reply with quote
I'm having problems debugging a php file without any extension at all. The PHPEd recognises the script once I add *.* to the PHP line in Tools>Settings>Associations, and the script is properly hilighted and the Run/Run in debugger (F9) buttons are available, but when I click either of them I get error: "PhpED is not currently configured to handle files with "" extension." I added *. and *.* to Tools>Settings>SRV Web Server>File extensions, but I still get the same error. The script runs fine outside of PHPEd. How do I get PHPEd to debug this script? I'm running PHPEd 3.3.3
View user's profileFind all posts by pointySend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
How would you run such scripts on the server?

Apache for example requires the line below:
AddType application/x-httpd-php .php

without an extension you can't run php scripts.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 29 Sep 2004
Posts: 62
Location: �' AND sleep(21); /*
Reply with quote
The php script is called "main"
My .htaccess has:

<Files main>
SetHandler application/x-httpd-php
</Files>

AddType application/x-httpd-php . .php .phtml .html

I'm not too sure how valid the AddType is, but on my win2000 server it works fine.

I've also seen php scripts in production without any extensions, eg the cms app "sitellite" uses "index" php script without an extension.
From the sitellite .htaccess:

<Files index>
ForceType application/x-httpd-php
</Files>
View user's profileFind all posts by pointySend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
Any response?


Joined: 29 Sep 2004
Posts: 62
Location: �' AND sleep(21); /*
Reply with quote
Hello - any response yet how to debug scripts without any extension? I've figured that I can add extensions to the scripts and use find/replace to change the script names where referenced within the scripts whenever I want to debug, and then change them all back before loading for production, but it's (a) a real pain, and (b) not all the scripts are that neatly named so I've already had a few problems using this find/replace method, and (c) some scripts (ADODB) keep their extensions, so it just adds to the problem using this work-around. There are more than a hundred scripts in my app, so I'm really keen to find another way to do this. Any help would be appreciated.
View user's profileFind all posts by pointySend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
I tried and did not experience any problems so far.
a) open tools->settings->IDE->Associations
and add *. for either php4 or php5 language

b) create new file and save it as index.
(don't forget to add dot at the end of the name)

c) add necessary content to the file and run with debugger.

FYI: I'm using phped v4.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 29 Sep 2004
Posts: 62
Location: �' AND sleep(21); /*
Reply with quote
Ahh... the dot after the filename - I hadn't tried that. I've just downloaded v4 now to upgrade, so I'll give it a try. Thanks.
View user's profileFind all posts by pointySend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
Debugging without any extension
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic