I'm trying to set up Symfony on my 64-bit Vista laptop that's using Zend Server CE for an all-in-one PHP stack. I'm trying to configure it with Netbeans as the IDE but I keep getting an error when I try to create a Symfony project; I've pointed it to my PHP.exe file located in C:\Program Files (x86)\Zend\ZendServer\bin\php.exe and my symfony.bat located in C:\Users\Wayne\Frameworks\symfony\data\bin\symfony.bat. Netbeans gives me a generic "Cannot create symfony project" error, so I tried to check it manually and create the project. This gives me an error call to undefined function token_get_all(), which seems to reference the built-in tokenizer for PHP 5. Checking my PHP extensions in Zend, tokenizer is enabled and the php_tokenizer.dll is where it should be, so I'm not sure why this isn't working right.
Any ideas? I'll gladly provide more information if necessary. I'm using the latest version of Zend Server CE with PHP 5.3.2, so tokenizer should be working fine.
Keep in mind that the CLI and the webserver may use different php.ini files. Do a php -i > info.txt to check the CLI's settings (including the .ini file it uses).
Related
When checking with app/check.php Symfony2 says this Configuration file used by PHP : /etc/php5/cli/php.ini however phpinfo(); displays that Apache is using /etc/php5/apache2/php.ini.
I tried searching but couldn't find a solution. Could someone explain how do I tell my Symfony2 app to use Apache2's php.ini? Or is there something obvious I am missing here?
I am new to Symfony
PHP cli uses another ini than PHP apache. That happends quite often (you often also want other configuration).
When you use Symfony from both console (the commands) and apache (the app), you should make sure both ini files are correctly configured for Symfony.
In the browser, you can go to web/config.php to see a report of Symfony about your PHP settings and such.
On Ubuntu Apache uses /etc/php5/apache2/php.ini and the command line uses /etc/php5/cli/php.ini. This is related to your OS and not Symfony2.
I am following JetBrains' official instructions on setting up the built-in server HERE
I am currently on the "Enabling a built-in Web server" section:
Download PHP 5.4.0 or higher.
Done! There is now a folder on my desktop named "php-7.1.4", untouched since download, now for number 2: "Configure the downloaded PHP interpreter in PhpStorm" (HERE)
I am stuck on 4.2, when I select the directory of the folder on my desktop, nothing happens. It does not "display the version of the PHP engine detected in the specified folder", as per the instructions. It simply continues to say PHP is not installed.
What do I do?
After abandoning the built-in server in favour of MAMP, I have found the solution. The download from php.net seems to be all kinds of messed up.
My solution is to download MAMP and use the php executable it provides (MAMP/bin/php/php[version]/bin/php), but then just continue without using the MAMP server.
Works fine!
I have a tedious setup and have ended up with multiple versions of PHP on Mac OSX Yosemite, and now it has become confusing.
So, I managed to have gettext working with PHP for localization, and it works for Apache. But now when I have installed PHPStorm, I get:
Call to undefined function bindtextdomain()
indicating the gettext isn't supported. I understand that php.ini is also telling this isn't enabled and infact, there are different phpinfo() outputs for when I run the same file using apache and then using built-in server with PHPStorm.
Is there a way to be able to know which PHP is currently being used by apache and replicate the exact functionality with PHPStorm ? I wished that it will make debugging faster, but instead the setup has me stuck.
I have been struggling with installing the ImageMagick module to my XAMPP installation for my Typo3 application. The PHP is 5.4.19, x86, MSVC9. I have tried different versions of IM and IM module, always with different errors on Apache startup including
%1 is not a valid win32 application
php5.dll is missing
The procedure entry point MagickGetImageMatte could not be located in the dynamic CORE_RL_wan_.dll
The last of the errors was with the PHP 5.4 thread safe x86 module and the ImageMagick-6.8.8-7-Q16-x86-dll.exe ImageMagick installation. I then tried to copy the CORE dlls, which the module archive contained, into the ImageMagick folder (replacing the original ones). The error went away, the Apache starts without any errors, the imagick module finally appears in phpinfo, however it says
ImageMagick number of supported formats: 0
ImageMagick supported formats no value
and in Typo3 the associated functionalities suggest it still is not working properly. What can be done to make it work?
If I was you, I wouldn't try to use the ImageMagick PHP module any more.
This is not really necessary.
I am not even sure if TYPO3 can handle this module at all since I never tried it.
Since many years I just point the TYPO3 to the binary folder of ImageMagick where all the tools (convert, composite, identify) are located.
PHP must be able to call those binaries of course (exec() function must be anabled and this folder must be within open_basedir if used). It works this way since ever :-)
I recall the very few times I used WAMP environment I had no issues with it either.
Simply download the windows binary of ImageMagick and install it.
Inside the installation folder must be a folder called /bin.
The tools needed must be there as exec-files.
Now just set the TYPO3 configuration to point to this folder including the trailing slash.
For windows it must be something like this as I recall.
$TYPO3_CONF_VARS['GFX']['im_path'] = 'C:\\programs\\imagemagick\\bin\\';
You can use the binaries of GraphicsMagic instead of ImageMagick as well.
They are easier to find and perform very well.
I am trying to install PHP onto my development box (XP SP3 / IIS 5.1) I've got PHP 5.2.6 stable downloaded (the MSI installer package) and I am getting an error "Cannot find httpd.conf". After that the install seems to breeze by quickly (more quickly than I would have expected) and when I try to execute a simple PHP script from my localhost test directory that I created, I get a slew of missing DLL errors. I have seen posts out there which indicate that its possible and has been done. I dont see any bug reports for this MSI at PHP.NET support. Any ideas?
Not sure if you already have this but I use WAMP from http://www.wampserver.com/en
It's easy and simple to set up, it has an icon in the system tray to show that its active and you can make it go online or available to the outside by clicking the icon and setting it. I used this when I was first learning PHP since it has everything in one, no need to setup any other service like IIS.
Probably the installer didn't configure your server to use PHP properly. Check out Microsoft's page on enabling PHP on IIS or alternatively switch to Apache if that's a viable option.
I'll see if I can remember it correctly:
Unzip PHP zip file into c:\Program Files\php (or run the installer)
Copy php5ts.dll into c:\windows\system32
Copy php.ini.dist into c:\windows and rename it to php.ini
Edit c:\windows\php.ini and look for extension dir - make it point to c:\Program Files\php\extensions (or wherever you put it)
This is where my memory gets fuzzy: Edit your IIS application settings, add a script map for .php files, and set the executable to php5ts.dll
Profit!?!??!?!