Netbeans and CodeIgniter on Windows and Linux? - php

I installed a plugin for NB 7.0.1 which enabled CodeIgniter but when I went to create a project using it, I was told I need to specify a PHP interpreter for Netbeans. I tried to do this using the php.exe you get with Xampp but I get a Java null pointer error. I can't seem to fix this but I'm thinking, why do I need an interpreter on Windows when the Linux machine can do that? I have already set this up on the VM.
Any advice from here? Thanks a lot!

I am using NB 7.1.1 and had similar issue with CodeIgniter plugin when creating a new project. NetBeans would complain No PHP Interpreter was defined in Tools->Options->PHP General. It would not enable finish button so a New Project could not be setup.
I just created a dummy batch file called nb_cli.bat and pointed NB to that for the PHP interpreter. I don't plan on executing (or debugging) CodeIgniter CLI code on local machine so that file will likely never get executed.
If you want to debug or run php locally, make sure xammp works OK outside of NetBeans. But if not, this fix should get you by the NetBeans issues.
I have a separate linux server on my local network for development as I don't need apache/php locally when I use multiple machines for dev/testing/etc.
NetBeans should bugfix that by downing that PHP Interpreter message from an Alert preventing project setup to a warning that No PHP interpreter is defined (or found) so CLI testing may not function.
As an alternative, if you have a linux box with NB installed, you can create the New project there and copy the whole folder (including the nbproject folder) to your PC and you should be able to get by having No PHP Interpreter defined.
Hopefully that gets you going with NB and CodeIgniter. If you need additional details, just ask.

Related

I had XAMPP on my device but I have to uninstall it now my project does not run on localhost

XAMPP has some error about ports I uninstall it but did not back up any information and now my project does not run on local host is there any way for me to restore my old project or I have to do it again on new XAMPP? another problem is after reinstalling XAMPP windows do not know PHP what should I do?
by the way I am a very beginner in this :)))
So, I will try to explain this:
Websites (i.e. with PHP) need a webserver. For example when you go to stackoverflow.com, you automatically call a webserver who then compiles the PHP scripts on the server to HTML code.
This principe does also apply to your local installation.
When you call localhost, you basically call yourself as the webserver. XAMPP is a tool that can "simulate" a webserver on your PC, thats why PHP sites do not work without it, because your browser doesn't know what to do with PHP code, it only understands HTML.
If you install XAMPP again you should be able to get it running.
If you have any questions/problems with the XAMPP installation, feel free to ask again.

PHP on Windows IIS with coreserver

i have the following server setup:
a DC with DNS [works perfect]
a webserver with GUI [works perfect]
a webserver Core [stuck at PHP installation]
I'm trying to install PHP on the core server. I have a simple site with a php file that shows the phpinfo();. From the GUI webserver I was able to manage to use the gui to do a lot of stuff, but now i'm stuck.
What did i do:
on the core server, i put a php folder and eddited the ini file
On the IIS of the GUI, i manage the Core server and added the module mapping for php. I could not browse (did not get the button witht the 3 points to browse) because its managing the coreserver so i just added the path manualy c:\php\php-cgi.exe
the next step would be to add that php path to the environment variables (path). I did this with powershell. When showing the $env:path, the path of php is added. Also after a reboot, it's still added
when following guides, now i should be able to let the cmd tool tell me what version of php i'm running. I tried php -v, php -m and php --version in command line and in terminal. What gave no errors, but also no other output.
Can someone help me debug this one? The core makes it harder for me because when i did this on a gui, it worked. But then i changed settings like the path environment in gui screens.
Thank you for your time!

which server to install for phpEclipse and how to do it?

I know this is a newbie question, but i want to study php. i have phpeclipse and its running well, the problem is when i run a simple html file with the default server the page says cant display this page and thats it. i dont know if i need to install a new server or is there something wrong with the server configurations. ive tried installing tomcat on my computer but i cant see it under windows->preferences->server->runtime enviroments->add. iv also tried under the same page to fetch geronimo v2.2 and 3.0 and the dependencies were wernt satisfied. iv also tried the repository for zend debugger. what do i need to do in order to compile and see php and html pages with php eclipse?
You don't need to compile PHP.
Depending on your operating system and PHP version there are a few options.
As of PHP 5.4+ you can run your application using PHP's built in server, on the command line, if you cd into your website root directory (i.e. where the index file is) and then run the following
php -S localhost:8989
Then if you navigate to http://localhost:8989 in your browser you should see your application.
If you are unable to run the inbuilt web server, you need to look at Apache2. Most PHP websites run inside the Apache 2 web server. You will generally need a *AMP (WAMP/LAMP) environment.
L/W (Linux / Windows)
A pache (Web server)
M ySQL (Database)
P HP
Hope this is enough of a pointer ;)

PHP define is not working sometimes on some servers

I am working on a PHP web app with another developer. We have 3 total different environments:
Configuration 1: Windows XAMPP, PHP 5.3.5
Configuration 2: Turnkey LAMP, PHP 5.3.X (turnkey-lamp-11.2-lucid-x86) - not sure which ver, running from virtualbox on a mac
Configuration 3: production server, hostgator shared running CentOS, php 5.3.9 fastcgi
Configuration 2 sometimes will not recognize the defines that are handled in our settings.php file which is require_once at the top of any page which uses it. The defines work fine on Configuration 1 and 3 always. There was nothing of interest in the apache logs, other than the errors generated as a result of the define being treated as a string.
I've searched for a while and cannot find anything that describes this issue. Configuration 2 is the other developer, and i do not have access to his machine right now. Looking for suggestions on how to track this issue down. I think we are going to try a new instance of the VM, using an upgraded turnkey-lamp, however i'd really like to root cause this.
Ok, so i figured out what was happening... and as expected, it wasn't PHP or defines. The errors reported were accurrate. We use Eclipse as the IDE, and Subclipse for SVN. Configuration 2 uses a VM running from a mac, and we added a command in eclipse to sync when files are saved. Apparently the syncing only was happening for the main public_html directory, and not our other same-level directory which has the include file with the defines in it. Ultimately, i needed to look at the actual VM to notice it was way out of date on that one file, and was missing the define statement, which results in the error, but Eclipse was showing the HEAD revision from SVN, which is why it was so confusing, but simple.
Lesson: Make sure you plugged in the TV before calling the repairman.

Entry Point Error when running PHP script from command line

I am trying to schedule a PHP script to run on Windows by writing a batch file. Here is the line that runs the script:
C:\Program Files (x86)\PHP>php.exe -f D:\Web\Sites\scriptPage.php
This runs the page and the results of the page process fine but it is poping up this message
"The procedure entry point zend_ini_string_ex could not be located in the dynamic link library php5.dll"
I am not sure why this is happening. We are not using Zend at all on this. I have tried this on a few different pages and the same thing happens.
Any help on this would be great.
Thanks!
I had this problem when I installed xdebug under Apache and PHP.
In your php.ini find a line that looks like this:
zend_extension_ts="c:/PHP/ext/php_xdebug-2.1.2-5.2-vc6.dll"
and comment it out.
If you do need to use xdebug make sure you have downloaded the right version of xdebug
for your php installation. I had Apache 2.2.17 with PHP 5.2.17 and I was trying to install xdebug
for PHP 5.3 which gave me extactly this error message:
*The procedure entry point zend_ini_string_ex could not be located in the dynamic link library php5.dll*
I know it's been a while since this is solved but I run into problem with the same symptoms. I have Zend Server installed on a Windows server and was trying to configure scheduled task but it was not launching
the procedure entry point php_checkuid could not be located in the dynamic limk library php5.dll
Problem was that previously I had another PHP version (standalone, not with Zend Server) installed and in Windows Environment Variables PHPRC variable was pointing to that old version of PHP. I changed this variable so it pointed to Zend Srever's PHP and everything worked.
I had a standalone version of PHP installed and then installed Zend Server. Like Juris mentioned, the PHPRC variable was pointing to the stand alone php5.dll. I changed the path and all is good.
For future googlers: uncommenting the opcache enable and opcache_cli seemed to fix the problem for me.
That being said, I don't know what the error means

Categories