Built-in Web Server w/PHP

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
BillAnton
Posts: 33
Joined: Thu Jul 26, 2007 10:00 pm

Built-in Web Server w/PHP

Post by BillAnton »

Has anyone (other than Karlis and staff) gotten the built-in web server to function so that a page of PHP code can be tested locally?

When I asked for help from them the two answers were so sketchy it seems as if it is a hit or miss thing.

This is with PHP5 installed and tested and either the latest WeBuilder or RapidPHP.
Regards,
Bill Antonacchio
BertrandH
Posts: 11
Joined: Sun Sep 07, 2008 8:36 pm

Re: Built-in Web Server w/PHP

Post by BertrandH »

Hi,
I got RapidPHP 2008 and haven't found any integrated server (either PHP or SQL). Would like to know about it too...
Maybe, you can try EasyPHP, which has everything (Apache, PHP, and MySQL).
Bertrand
BillAnton
Posts: 33
Joined: Thu Jul 26, 2007 10:00 pm

Re: Built-in Web Server w/PHP

Post by BillAnton »

Hi Bertrand,

Thank you for your suggestion.

By the way, in RapidPHP try Options/Preferences/Preview/Script Preview and then click on the Web Server settings button.

Have you tried to Preview a PHP file. Of, course you need to set the path to your copy of PHP on your computer as part of the Web Server settings. I would be interested if you can get it to work for you.
Regards,
Bill Antonacchio
BertrandH
Posts: 11
Joined: Sun Sep 07, 2008 8:36 pm

Re: Built-in Web Server w/PHP

Post by BertrandH »

Hi Bill,

Yes, I got it to work. EasyPHP has to be running in order the preview to work.

Here is what you can do:
1) go to http://www.easyphp.org/ and download it (it's free)
2) install using the default settings (next all the time)
3) in RapidPHP/WeBuilder 2008, here are the required settings in options > preferences:
-> in PHP settings: path to php is C:\Program Files\EasyPHP 2.0b1\php5\php.exe
-> in preview > general, the temporary folder has to in the www folder of EasyPHP installation. The path is: C:\Program Files\EasyPHP 2.0b1\www\. In my case, I created a subfolder specific for RapidPHP and it works very well (my path is C:\Program Files\EasyPHP 2.0b1\www\Rapid2008php).

I hope it will be easier when the integrated web server is ready. Would like to hear about it. In the meantime, this way of previewing php pages works.

Hope it helps.

Bertrand
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Re: Built-in Web Server w/PHP

Post by chrisjlocke »

Got it working fine here.
Image

I downloaded the .zip package from here:
http://uk2.php.net/get/php-5.2.6-Win32. ... his/mirror

Unzipped to a folder. In WeBuilder, I set the location to php-cgi in Options, Preferences, Preview, Script Preview, then click 'Web Server Settings'. You can also set the path in 'PHP Settings'.
Image

When you view PHP pages, what error do you get?
BertrandH
Posts: 11
Joined: Sun Sep 07, 2008 8:36 pm

Re: Built-in Web Server w/PHP

Post by BertrandH »

I didn't try the PHP alternative.
:)

Anyway, EasyPHP can be useful for MySQL. :wink:
BillAnton
Posts: 33
Joined: Thu Jul 26, 2007 10:00 pm

Re: Built-in Web Server w/PHP

Post by BillAnton »

Hi chrisjlocke ,

I have version 5.2.3.3 of PHP on my computer, BUT... I do not see a file php-cgi. If you mean that I need to install PHP as per the install.txt file states, that would mean adding a server to my computer.

The Web server settings page clearly states php-cgi but I only install PHP into a separate folder and the executable is php.exe for version 5.2.3.3

Any suggestions you might want to offer will be greatly appreciated.
Regards,
Bill Antonacchio
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Re: Built-in Web Server w/PHP

Post by chrisjlocke »

You don't need to install PHP - just unzip the package (linked in my previous post) to a directory of your choosing.
That package I linked to includes php-cgi.exe in it.
BillAnton
Posts: 33
Joined: Thu Jul 26, 2007 10:00 pm

Re: Built-in Web Server w/PHP

Post by BillAnton »

Hi chrisjlocke,

That did it! I had to uninstall PHP and then find php-cgi.exe in the folder from unzipping the download and reboot my computer to get rid of the reference to the php.exe in the settings, but then it worked a treat. (hope I got that last little cliche right for you Brit types!)

Thanks again. Now please tell me how/why you knew that those were the steps to get the built-in server working.

And, by the way, since you are a Global Moderator, you might want to have this little gem included into the KB.

I will probably be upgrading now that I can work quickly on changes to my code as I dig deeper into my application of PHP to my needs.
Regards,
Bill Antonacchio
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Re: Built-in Web Server w/PHP

Post by chrisjlocke »

Glad you got it working! :) Sorry you had troubles.
Unfortunately my god-like powers only stretch to moving topics and deleting people I don't like - I have no control over the knowledge-base. Hopefully this topic may help others who come here searching for the 'holy grail' in getting php to work! ;)

As for how I knew they were the steps to take, if you don't have PHP set up right, there are some instructions in the preview window.
PHP not installed
PHP interpreter was not found.

Please install the PHP interpreter:

Download the latest PHP zip package (not the installer) from http://www.php.net
Unpack the downloaded package to some folder
Open Options -> Preferences -> Preview -> Script Preview
Click Web Server Settings
Enter the path to php-cgi.exe file (a part of PHP interpreter)
So I just followed that! ;)
BillAnton
Posts: 33
Joined: Thu Jul 26, 2007 10:00 pm

Re: Built-in Web Server w/PHP

Post by BillAnton »

So, there lies the rub! I had previously installed PHP BEFORE downloading and trying the RapidPHP/WeBuilder apps. I NEVER SAW THAT PAGE.

Now I feel a little bit better.
Regards,
Bill Antonacchio
BillAnton
Posts: 33
Joined: Thu Jul 26, 2007 10:00 pm

Re: Built-in Web Server w/PHP

Post by BillAnton »

Unfortunately, I have another problem associated with this. The KB states:
To enable PHP debugging, you must have PHP installed on your computer and you must also have xDebug extension added to your PHP setup. Also the PHP file preview must be configured to work either with the built-in or any external web server.
But, installing PHP 5.2.3.3 causes the Web Settings to change from the php-cgi.exe file to the php.exe after the PHP installation. The only way to use the built-in Web Server is without PHP being installed but the only way to debug PHP scripts is by installing PHP along with several other files as per the KB.

Can someone please help?
Regards,
Bill Antonacchio
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Re: Built-in Web Server w/PHP

Post by Karlis »

You have gotten this wrong. If you download PHP package from the PHP official website then you must download the ZIP package and NOT the installer because for some unknown reason the official installer dioes not include php-cgi.exe

However if you want to install our special PHP + xDebug package (pre-configured, ready to work with internal web server) from OUR website, rest assured, it includes everything you need.
Karlis Blumentals
Blumentals Software
www.blumentals.net
BillAnton
Posts: 33
Joined: Thu Jul 26, 2007 10:00 pm

Re: Built-in Web Server w/PHP

Post by BillAnton »

Hi Karlis,

As a paying customer I really like being insulted and told I got it wrong, especially when your wonderful documentation DID NOT specify NOT to install PHP. I had PHP installed on my computer prior to downloading RapidPHP or WeBuilder so it would have saved me a lot of time and trouble to know that your built-in server can not function with an installed copy of PHP on the computer.

Additionally, I did not get any help or even a clue from my support request. Your Gatis Avots gave me inaccurate information as you can see below:
Web server and PHP interpreter are 2 completely different things.
Our editors do have a built-in web server; but you must have also a PHP interpreter (php.exe file) on your computer.
In you response above in this thread you mention having a
special PHP + xDebug package (pre-configured, ready to work with internal web server) from OUR website
but do not provide a link to this package.

Searching for this package using your search box shows:
Search

From this page you can search the Blumentals Software Web site. Just type in a few words or phrases. Try to use discriminating terms that are likely to be found only in the documents you seek. The more words you give, the better results you'll get.

Warning: eregi() [function.eregi]: REG_BADRPT in /home/k/kblums/public_html/sitenav/db/tpl.search.php on line 186
Warning: eregi() [function.eregi]: REG_BADRPT in /home/k/kblums/public_html/sitenav/db/tpl.search.php on line 186
...etc
No results found
Maybe you can at least save me and my fellow customers of your products some time and provide a link. I also think corrections in the KB and on the Help file to specify NOT to have an installed copy of PHP and use of php-cgi.exe with version 5 of PHP would be helpful.

Regards,
Bill Antonacchio
Regards,
Bill Antonacchio
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Re: Built-in Web Server w/PHP

Post by chrisjlocke »

BillAnton wrote:Maybe you can at least save me and my fellow customers of your products some time and provide a link.
See this knowledge-base article.
http://kb.blumentals.net/kb/index.php?V ... EntryID=24

I may be wrong, but I think this 'Don't install it' business is due to php4 and php5. If you install php4 then WeBuilder can use php.exe. However, if you install php5 then you don't get the php-cgi.exe file you need - this is only included in the .zip file. This may be more of a 'grr' with php than with Blumentals.

I amended your post to allow bbcode - this allows your quotes to work.

Sorry again you've had hassles - hope at least its working OK now.
Post Reply