NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Newbie needs configuration/general help.


Joined: 17 Jul 2008
Posts: 5
Reply with quote
OK. I'm really trying to like this software but can't seem to make it do anything other than be a nice GUI PHP editor. Here's my setup and hopefully someone can tell me what I should or shouldn't be doing differently.

I have a Linux server running Apache, MySQL 5, PHP5. On this server, I have several different applications. ALL of my coding so far has been by using a ssh session to get logged into the Linux server, editing the file with vi, and then testing them out by hitting the server with my web browser. I know, archaic sounding. But it has worked well for me over the years. I have work in Unix and vi for well over 20 years which makes data manipulation and code typing fairly easy for me. And now that the newer vi versions use syntax/color highlighting, it has been easier.

I've installed PhpED on my Vista desktop. The Linux is also running Samba so I can mount its drives on the PC. So I can open my source files in PhpED and edit/save them. But that is all I've been able to do with them so far. Every application is dependent on access to the MySQL services running on the Linux box. I know these are proably pretty basic easy questions to answer, but I've not been able to find clear cut examples/tutorials on how to set this all up for best practices.

1) I'd like to be able to run my php programs in the editor for debugging purposes so that I don't have to resort to looking at my server's apache logs. When I type the simplest of php scripts ( print "Hello there, World!"; ) it won't run. Complains about the TCP port on the SRV web server. I made sure that IIS is not running on my PC but other than that, there isn't much else I know where to look.

2) I'd like to have the php programs run inside PhpED and access the MySQL services on the server so that they will have access to all of my databases. I can't find anything on setting on this type of data connection.

3) In general, are there any tutorials/examples available to point me in the proper direction for this kind of development?

Thank,
MW
View user's profileFind all posts by BeagleSend private message
Veteran

Joined: 24 Jan 2006
Posts: 311
Reply with quote
Hi there, PhpED handles this setup actually very well. What you want is using Run MOde set to 3-rd party webserver and your project mapping set to your files on Linux. IMHO the most straightforward way is using dbg-wizard for that, more over so since you are looking to set the debugging:
http://www.nusphere.com/products/dbg_wizard_download.htm

There is also a very useful link on Project settings:
http://www.nusphere.com/kb/technicalfaq/howto_set_project_mapping.htm - one of the examples there describes your use case with Samba.

Hope it helps! THanks
View user's profileFind all posts by yfaktorSend private message


Joined: 17 Jul 2008
Posts: 5
Reply with quote
Well that certainly got me closer to a proper configuration. I was able to run the debugger php setup script. What a GREAT way to help someone with setup and not really knowing their configuration. Let the script figure it out and make recommendations.

However, when I set the mapping fields in "Project Properties" as indicate in the script output, I get this error:

Can't debug W:\data\htdocs\eval\Baseline\main.php" file.
Make sure that "Remote root directory" and "Root URL".
are correct in the project settings.


I've toyed with everything I can think of on these 2 settings and can't get past this error. Changed things to match DocumentRoot on the server, added trailing slashes, removed trailing slashes, "project"settings, "mapping" settings, you name it. I've looked through the link that the error message provides for project mapping and from what I can see, I've set it up correctly.
View user's profileFind all posts by BeagleSend private message
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
If I understand correctly, you are mapping your Samba share as W:\, and your PHP scripts reside there. Your project settings should be similar to that for a local project:
* Root directory: W:\data\htdocs\
* Remote root directory: The same as the root directory, i.e. W:\data\htdocs\
* Root URL: the URL that would display the pages in W:\data\htdocs

My directories all have trailing back slashes, but I do not know if they are needed.

I hope this helps Wink

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website


Joined: 17 Jul 2008
Posts: 5
Reply with quote
Here's a link to a screen shot of my "Project Properties" screen whenever I click "OK" from the error message:

http://mywebserver/phped.jpg

It always highlights "Remote root directory:" as if that is the problem. But whatever I type in there makes not a bit of difference.

"/storage" on my server is mounted as "W:\" on my PC using Samba.
My Linux box has "/storage/data/htdocs" as DocumentRoot for the Apache server.

"eval/Baseline" is a subdirectory where I'm doing my development. To get there in Linux and edit via vi, I "cd /storage/data/htdocs/eval/Baseline". To try my code through my web browser, I use a URL of "http://mywebserver/eval/Baseline/". So I'm at a loss as to what I've got set wrong and can't find any combination that works correctly.
View user's profileFind all posts by BeagleSend private message
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
Your project settings do not specify an account, and that implies your Remote Root Directory must be a local folder (or mapped drive). Therefore, I do not think /storage/data/htdocs/eval/Baseline will be a valid setting.

Have you tried making the Remote Root Directory the same as the Root Directory as I suggested? In other words:
* Root directory: W:\data\htdocs\eval\Baseline\
* Root URL: http://mywebserver/eval/Baseline/
* Remote root directory: The same as the root directory, i.e. W:\data\htdocs\eval\Baseline\

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website


Joined: 17 Jul 2008
Posts: 5
Reply with quote
anno wrote:
Have you tried making the Remote Root Directory the same as the Root Directory as I suggested?


Yes, I tried that. Get the same error.

As far as the Account goes, my understanding is that since I am able to save the files directly to my Samba mounted drive/directory, I don't need to enter any thing in order to publish the files. I'm not trying to edit/place any source files via http or ftp, and am able to just do File/Save from the menus.
View user's profileFind all posts by BeagleSend private message
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
Indeed. Using Samba and a mapped drive, you have taken care of the mapping outside of PhpED and you do not need to use an (FTP/SFTP) account too. And account is only needed with remote debugging. The Remote Root Directory setting of /storage/data/htdocs/eval/Baseline would be a typical one with an SFTP account, but for local debugging (as you have), it does not seem appropriate.

In my environment, I have local projects (files on C: drive, and IIS on http://localhost), and also remote projects (files on C: drive, SFTP accounts for uploading to /home/something on server, and remote Apache at http://mywebserver). Debugging on all of these work like a charm. I am not using mapped drives anywhere. Perhaps there is a limitation preventing one from debugging on a mapped drive, but I do not know.

Sorry, I wish I knew the answer.

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website


Joined: 10 Feb 2007
Posts: 48
Reply with quote
Beagle, I feel your pain. Recently set up a desktop server on XP and felt like the slowest kid in the room. Not sure if this will help since I used NuSphere's TechPlat to install the services.

Here's how I figured out how to map to Apache/PHP.

After the server is installed and you can open http://local chances are the 'Welcome to NuSphere' page opens. If it doesn't open the index.html page.

Click on the link for the admin site.

On the left you should see links for: Admin Home, Documentation, and Site Testing. Click Documentation.

Under the heading 'NuSphere' you should see 'NuSphere PHP Debugger Wizard Script [Read more]'. Click on the link for NuSphere PHP Debugger Wizard Script.

You should see two main listings: 'What did I find out about your system' and 'How to setup your PhpED Project Properties'.

This information was all that was needed to configure the mapping parameters.
View user's profileFind all posts by StorymanSend private message


Joined: 17 Jul 2008
Posts: 5
Reply with quote
Unfortunately, my configuration is different in that my server is a completely different computer than my desktop. I've run the debug script and tried the settings it gave me without any difference. But I appreciate your relating your setup. Hopefully someone will come along and help me out. I've got about 10 days left on my evaluation and if I can't get this to be more than a fancy editor, I won't be spending the money on the product.
View user's profileFind all posts by BeagleSend private message


Joined: 10 Feb 2007
Posts: 48
Reply with quote
Beagle, here's a copy of what the program suggested. Maybe it'll help. Maybe it won't.

Project -> Root Directory: C:\Program Files\nusphere\TechPlat\apache\htdocs\
Mapping -> Run Mode: HTTP Mode (3-rd party WEB server)
Mapping -> Remote URL: http://storyman-123456/
Mapping -> Remote Root Directory: C:\Program Files\nusphere\TechPlat\apache\htdocs\ , same as Project -> Root Directory.
View user's profileFind all posts by StorymanSend private message
Newbie needs configuration/general help.
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