Search Results

Search found 31806 results on 1273 pages for 'php learner'.

Page 32/1273 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • Errors installing the Curl library with PHP/Apache/Windows

    - by MarathonStudios
    I'm having a hell of a time getting Curl to work with PHP/Apache on my Windows XP 64-bit development box. I have PHP and Apache successfully installed, but when I tried to enable Curl I get the following error (twice) from PHP on Apache startup: "PHP Startup: Unable to load dynamic library 'C:\php\ext\php_curl.dll' - The operating system cannot run %1." I did uncomment the correct line in PHP.ini. I did move the two DLLs (php_curl.dll and ssleay32.dll) into my PHO root, into my System32, even my apache root - but no matter where I put them, PHP can't find them. I keep getting the error above. Anyone have any idea how to remedy this?

    Read the article

  • No input file specified on nginx and php-cgi

    - by Sandeep Bansal
    I'm trying to run nginx and php-cgi on my Windows PC, I've got up to the point where I want to move the html directory back two directory's so I can sort of create a structure. The only problem I have now is that PHP doesn't pick up any .php file. I have tried loading a static html file (localhost/test.html) and it works fine but localhost/info.php doesn't work at all. Can anyone give me some guidance on this? The part of the server block can be found below. server { listen 80; server_name localhost; root ../../www; index index.html index.htm index.php; #charset koi8-r; #access_log logs/host.access.log main; location ~ \.php$ { fastcgi_pass 127.0.0.1:9123; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } Thanks

    Read the article

  • How to set the PHP Api Version for phpize

    - by Tom Frost
    I'm upgrading php on my server but I'm running into a problem with phpize and compiling external modules. phpize -v reports: Configuring for: PHP Api Version: 20041225 Zend Module Api No: 20090115 Zend Extension Api No: 220090115 But on my test server (which I'm trying to replicate) I get this: Configuring for: PHP Api Version: 20090626 Zend Module Api No: 20090626 Zend Extension Api No: 220090626 I'm running debian squeeze, pulling the php 5.3.0-2 packages from the experimental repo. The difference betweent he two servers is that the first server has had old verisons of php on it, and the test server was installed with php 5.3.0-2 from the start. I've attempted uninstalling all PHP packages from the first server (using --purge to get rid of all the config files) and re-installing 5.3 fresh, but I'm still having the same issue. Help!

    Read the article

  • Link mysql with php on apache

    - by Cristy
    THE STORY: I've installed Apache 2.2.17 , PHP 5.2.16 , MySQL 5.5.8 . The PHP woks great, the phpinfo() works on the localhost. THE PROBLEM: The thing is that in phpinfo() there is no mysql mentionened. I've done the following: moved php.ini to C:\windows removed the ";" in front of the mysql extension line ( extension=php_mysql.dll ) copied the libmysql.dll to php folder & windows\system32 checked the extension path in php.ini to be " C:\php\ext" searched the internet for a solution for about 2 hours... ADDITIONAL INFO: In the Apache Enviorment path I have the following: C:\Program Files (x86)\PHP\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\OJI\MinGWStudio\work\mingw\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\; I think the Microsoft SQL path should be replaced with the MySQL one, but I don't know where to change that...

    Read the article

  • What permissions / ownership to set on PHP Sessions Folder when running FastCGI / PHP-FPM (as user "nobody")?

    - by Professor Frink
    I'm having trouble getting a number of scripts running because PHP-FPM can't write to my session folder: "2009/10/01 23:54:07 [error] 17830#0: *24 FastCGI sent in stderr: "PHP Warning: Unknown: open(/var/lib/php/session/sess_cskfq4godj4ka2a637i5lq41o5, O_RDWR) failed: Permission denied (13) in Unknown on line 0 PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0" while reading upstream" Obviously this is a permission issue; my session folder's owner/group is the webserver's user, NGINX. PHP-FPM runs as nobody though, and hence adding it to the nginx group is not so trivial. A temporary solution is to set the permissions of /var/lib/php/session to 777 - I have a feeling that's not the "best practice" though. What is the best practice when you need to assign a daemon write access to a folder, but it is running as nobody ?

    Read the article

  • Error with Internationalization extension while compiling php 5.4.8

    - by Umakant Patil
    I downloaded latest php version from php.net i.e. PHP 5.4.8 I configured it with following command ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --enable-intl --with-libdir=lib64 --with-pear --with-mcrypt --with-mhash --enable-mbstring --with-iconv --with-icu-dir=/usr --with-gettext --with-curl --with-mysqli --with-freetype --with-gd --with-curlwrappers --with-jpeg-dir=/usr --with-png-dir=/usr After this I run 'make' which start building / compiling PHP. After some time It throws me error ext/intl/.libs/php_intl.o: In function `zm_startup_intl': php-5.4.8/ext/intl/php_intl.c:651: undefined reference to `spoofchecker_register_Spoofchecker_class' php-5.4.8/ext/intl/php_intl.c:654: undefined reference to `spoofchecker_register_constants' collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1 Spent lots of hours finding solutions. I can't come out of any. Does anyone know what this error exactly means? How to get rid of this error?

    Read the article

  • Updating PHP on a Plesk managed Server

    - by mblaettermann
    I just updated PHP and MySQl on my VPS with the current Versions from Atomic Repo. Everything worked out fine so far. From console I get the new PHP 5.3: [root@server phpMyAdmin]# php -v PHP 5.3.16 (cli) (built: Aug 20 2012 11:18:05) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies with the ionCube PHP Loader v4.0.5, Copyright (c) 2002-2011, by ionCube Ltd. But through Apache I still get the old version (5.1.6). The server is running some old version of crappy Plesk Panel. That gives me the option to choose between Apache Modul, fCGI and CGI-BIN. Any hints, how to update apache, so it will use the new PHP Version? EDIT: I just needed to restart httpd (/etc/init.d/httpd restart)

    Read the article

  • Install additional PHP version in different folder on Ubuntu 8.04

    - by chessweb
    Hi, I'm on a Host Europe VPS running Ubuntu 8.04 server. PHP version is 5.2.4. Now there is an application (Moodle 2.0) that needs at least PHP 5.2.8. I don't want to upgrade serverwide to PHP 5.2.8 because that might impair other applications (e.g. Plesk). The FAQ at Host Europe suggest to install an additional PHP 5.2.8 in /opt/php and I think I can handle that with $ dpkg -i php_..._.deb --root /opt/php (Is that correct, by the way?) However, how do I point Apache to the new PHP installation? Thanks for any advice, Ralf

    Read the article

  • Creating a portable PHP install?

    - by Xeoncross
    I would like to create a folder with a couple versions of PHP that I can start in cgi mode as needed. I use different windows machines for development and I would like to be able to move around computers without needing to install PHP on each one. Something like below F:/PHP /5.3.2 /5.2.8 /5.1.0 Then I could just start each up as needed with something like F:\php\5.3.2\php-cgi.exe -b 127.0.0.1:9000 Which would allow nginx or apache to use the PHP service. This would really help to make my development environment decoupled. Does anyone know how to create a portable PHP install?

    Read the article

  • CURL on PHP 5.2 works in CLI but not in IIS

    - by Ben Reisner
    I have a Windows 2003 Server running IIS with php 5.2.8, I'm trying to use CURL, and it works in CLI mode (if i execute php.exe) but it does not seem to be registered when running under IIS. The output of PHP info in both CLI and IIS show the same 'Loaded Configuration File', but under IIS it does not give the CURL info box. c:\program files\php\php.exe -i shows ... Loaded Configuration File => C:\Program Files\PHP\php.ini ... curl cURL support => enabled cURL Information => libcurl/7.16.0 OpenSSL/0.9.8i zlib/1.2.3 phpinfo() ... Loaded Configuration File => C:\Program Files\PHP\php.ini ... NOTE: This server also runs php 5.3 in c:\program files\php-5.3.0 and CURL does properly work with that installation.

    Read the article

  • Previewing php pages inside Expression Web 3 suddently stopped working

    - by user1660569
    On a Windows 7 development machine, I have expression web 3, PHP 5 installed I have been using expression web and PHP for a while, and previewing php pages etc on pressing F12 (preview using local server). Suddenly on F12 all PHP pages display as blank, even a phpinfo() file. Standard html pages continue to work correctly on F12. If I place the same page php inside the default website on inetpub and browse using localhost then the phpinfo() file works. So I know that php is installed and configured correctly for IIS. Things I've checked: Gone into site settings in Expression web and confirmed that php is selected and it is pointing to the php executable Reinstalled php Checked iis that the php extension is registered. Copied files to a different machine with expression web and php installed and it works on. The strange thing is that it gives a blank (no errors) page inside expression web, but does work inside inetpub This was working up until recently, then suddenly stopped for no reason.

    Read the article

  • What features would you like to have in PHP?

    - by StasM
    Since it's the holiday season now and everybody's making wishes, I wonder - which language features you would wish PHP would have added? I am interested in some practical suggestions/wishes for the language. By practical I mean: Something that can be practically done (not: "I wish PHP would guess what my code means and fix bugs for me" or "I wish any code would execute under 5ms") Something that doesn't require changing PHP into another language (not: "I wish they'd drop $ signs and use space instead of braces" or "I wish PHP were compiled, statically typed and had # in it's name") Something that would not require breaking all the existing code (not: "Let's rename 500 functions and change parameter order for them") Something that does change the language or some interesting aspect of it (not: "I wish there was extension to support for XYZ protocol" or "I wish bug #12345 were finally fixed") Something that is more than a rant (not: "I wish PHP wouldn't suck so badly") Anybody has any good wishes? Mod edit: Stanislav Malyshev is a core PHP developer.

    Read the article

  • Type Casting variables in PHP: Is there a practical example?

    - by Stephen
    PHP, as most of us know, has weak typing. For those who don't, PHP.net says: PHP does not require (or support) explicit type definition in variable declaration; a variable's type is determined by the context in which the variable is used. Love it or hate it, PHP re-casts variables on-the-fly. So, the following code is valid: $var = "10"; $value = 10 + $var; var_dump($value); // int(20) PHP also alows you to explicitly cast a variable, like so: $var = "10"; $value = 10 + $var; $value = (string)$value; var_dump($value); // string(2) "20" That's all cool... but, for the life of me, I cannot conceive of a practical reason for doing this. I don't have a problem with strong typing in languages that support it, like Java. That's fine, and I completely understand it. Also, I'm aware of—and fully understand the usefulness of—type hinting in function parameters. The problem I have with type casting is explained by the above quote. If PHP can swap types at-will, it can do so even after you force cast a type; and it can do so on-the-fly when you need a certain type in an operation. That makes the following valid: $var = "10"; $value = (int)$var; $value = $value . ' TaDa!'; var_dump($value); // string(8) "10 TaDa!" So what's the point? Can anyone show me a practical application or example of type casting—one that would fail if type casting were not involved? I ask this here instead of SO because I figure practicality is too subjective. Edit in response to Chris' comment Take this theoretical example of a world where user-defined type casting makes sense in PHP: You force cast variable $foo as int -- (int)$foo. You attempt to store a string value in the variable $foo. PHP throws an exception!! <--- That would make sense. Suddenly the reason for user defined type casting exists! The fact that PHP will switch things around as needed makes the point of user defined type casting vague. For example, the following two code samples are equivalent: // example 1 $foo = 0; $foo = (string)$foo; $foo = '# of Reasons for the programmer to type cast $foo as a string: ' . $foo; // example 2 $foo = 0; $foo = (int)$foo; $foo = '# of Reasons for the programmer to type cast $foo as a string: ' . $foo;

    Read the article

  • Does the deprecation of mysql_* functions in PHP carry over to other Databases(MSSQL)?

    - by MobyD
    I'm not talking about MySQL, I'm talking about Microsoft SQL Server I've been aware of PDO for quite some time now, standard mysql functions are dangerous and should be avoided. http://php.net/manual/en/function.mysql-connect.php But what about the MSSQL function in PHP? They are, for most purposes, identical sets of functions, but the PHP page describing mssql_* carries no warning of deprecation. http://us.php.net/manual/en/function.mssql-connect.php There are PDO drivers available for MSSQL, but they aren't quite as readily available or used as the MySQL drivers. Ideally, it looks to me like I should get them working and move from mssql_* to PDO like I have with MySQL, but is it as big of a priority? Is there some hidden safety to MSSQL that means it's exempt from all of the mysql_* hatred as of late? Or is its obscurity as a backend the only reason there hasn't been more PDO encouragement?

    Read the article

  • Why does PHP create these log entries on every page access?

    - by HXCaine
    My server's error log (in cPanel) has an entry for every single time a PHP page is loaded that looks like this (where 'username' has been substituted for my actual username): [2012-06-09 09:02:07]: info: [usr/grp]: username/username cmd: /home/username/public_html/error.php php: /usr/local/php53/bin/php I know it's only an 'info' message but it's filling up my error log. It can't be related to the content of my PHP files because it even happens when I load a page with this as its content: <?php phpinfo(); ?> Any ideas on what it means or if I can get rid of it?

    Read the article

  • What features would you like to have in PHP? [closed]

    - by StasM
    Since it's the holiday season now and everybody's making wishes, I wonder - which language features you would wish PHP would have added? I am interested in some practical suggestions/wishes for the language. By practical I mean: Something that can be practically done (not: "I wish PHP would guess what my code means and fix bugs for me" or "I wish any code would execute under 5ms") Something that doesn't require changing PHP into another language (not: "I wish they'd drop $ signs and use space instead of braces" or "I wish PHP were compiled, statically typed and had # in it's name") Something that would not require breaking all the existing code (not: "Let's rename 500 functions and change parameter order for them") Something that does change the language or some interesting aspect of it (not: "I wish there was extension to support for XYZ protocol" or "I wish bug #12345 were finally fixed") Something that is more than a rant (not: "I wish PHP wouldn't suck so badly") Anybody has any good wishes? Mod edit: Stanislav Malyshev is a core PHP developer.

    Read the article

  • How to use different php.ini files for different VirtualHosts?

    - by gsingh2011
    I have my site and it's staging subdomain running on the same CentOS machine running apache. The subdomain is created using a VirtualHost, and I use it to find any bugs before I push to production. I want the php.ini file for the staging VirtualHost to be a development one, and the production site will use a production php.ini. How can I configure apache to use different php.ini files? I don't want to use php_value/php_flag for everything, I'd rather just use the php.ini file I already have available. I've tried creating an .htaccess file that looks like this, SetEnv PHPRC /path/to/php.ini/directory This has no effect, as phpinfo() tells me it's still using /etc/php.ini. I've also tried setting PHPIniDir for both virtual hosts (www and staging) and it complains about seeing the directive twice.

    Read the article

  • Is "PHP and MySQL Web Development, 4th ed." an outdated book to learn from?

    - by ForeverLearnNeverMaster
    I want to get into web stuff, and thought of going with PHP+MySQL. I have experience in C#, C++, desktop graphics, but no web stuff besides HTML, CSS which I started learning 2 months ago. On SO PHP-book question, the highest rated book is "PHP Objects, Patterns and Practice". However, I'm not sure if it's a book to start PHP with... or is it? Most of the books mentioned in that SO question seem to be for those who already know PHP. I considered "PHP & MySQL Web Development, 4th Ed.", but someone mentioned that "it uses the mysql_* functions which are almost deprecated." Help?

    Read the article

  • How do I pitch ASP.NET over PHP to a potential client?

    - by roman m
    I work at a Microsoft shop doing mainly web development. We had a client who asked us to review (improve) the data model for his web app, but said that he wants to develop his app in PHP (he knows "a guy" who can do it). When I asked him why he wants to go with PHP, he gave me the standard set of arguments from the 90's: Microsoft is evil, and PHP is free Writing an ASP.NET app is more expensive (software-wise) Why would Facebook use PHP if it was a bad idea? [classic] He had a few more comments about the costs associated with going .NET. The truth is that "Microsoft is expensive" does not hold water any longer, with their "Express" suite, you can develop an ASP.NET app without paying anything for software. When it comes to hosting, you can save a few bucks with PHP over .NET, but that's a small fraction of the projected development costs (we quoted 10-15k). Going back to my question, what arguments would I give to a client in favor of ASP.NET over PHP? [please provide sources for quantitative claims]

    Read the article

  • Consistent PHP _SERVER variables between Apache and nginx?

    - by Alix Axel
    I'm not sure if this should be asked here or on ServerFault, but here it goes... I am trying to get started on nginx with PHP-FPM, but I noticed that the server block setup I currently have (gathered from several guides including the nginx Pitfalls wiki page) produces $_SERVER variables that are different from what I'm used to seeing in Apache setups. After spending the last evening trying to "fix" this, I decided to install Apache on my local computer and gather the variables that I'm interested in under different conditions so that I could try and mimic them on nginx. The Apache setup I've on my computer has only one mod_rewrite rule: RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L] And these are the values I get for different request URIs (left is Apache, right is nginx): localhost/ - http://www.mergely.com/GnzBHRV1/ localhost/foo/bar/baz/?foo=bar - http://www.mergely.com/VwsT8oTf/ localhost/index.php/foo/bar/baz/?foo=bar - http://www.mergely.com/VGEFehfT/ What configuration directives would allow me to get similar values on requests handled by nginx? My current configuration in nginx is: server { listen 80; listen 443 ssl; server_name default; ssl_certificate /etc/nginx/certificates/dummy.crt; ssl_certificate_key /etc/nginx/certificates/dummy.key; root /var/www/default/html; index index.php index.html; autoindex on; location / { try_files $uri $uri/ /index.php; } location ~ /(?:favicon[.]ico|robots[.]txt)$ { log_not_found off; } location ~* [.]php { #try_files $uri =404; include fastcgi_params; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_split_path_info ^(.+[.]php)(/.+)$; } location ~* [.]ht { deny all; } } And my fastcgi_params file looks like this: fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param REQUEST_URI $request_uri; fastcgi_param DOCUMENT_URI $document_uri; fastcgi_param DOCUMENT_ROOT $document_root; fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param GATEWAY_INTERFACE CGI/1.1; fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; fastcgi_param REMOTE_ADDR $remote_addr; fastcgi_param REMOTE_PORT $remote_port; fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; fastcgi_param HTTPS $https; I know that the try_files $uri =404; directive is commented and that it is a security vulnerability but, if I uncomment it, the third request (localhost/index.php/foo/bar/baz/?foo=bar) will return a 404. It's also worth noting that my PHP cgi.fix_pathinfo in On (contrary to what some of the guides recommend), if I try to set it to Off, I'm presented with a "Access denied." message on every PHP request. I'm running PHP 5.4.8 and nginx/1.1.19. I don't know what else to try... Help?

    Read the article

  • Vim: Context sensitive code completion for PHP

    - by eddy147
    Vim gives me too much options when I use code completion. In a class, and type $class- it gives me about a zillion options, so not only from the class itself but also from php, all globals ever created, in short: a mess. I only want to have the options from the class itself (or the parent subtype class it extends from), so context or scope sensitive code completion, just like Netbeans for example. How can I do that? My current configuration is this: I am using ctags, and created 1 ctags file for our (big) application in the root. This is the .ctags file I used to create the ctags file: -R -h ".php" --exclude=.svn --languages=+PHP,-JavaScript --tag-relative=yes --regex-PHP=/abstract\s+class\s+([^ ]+)/\1/c/ --regex-PHP=/interface\s+([^ ]+)/\1/c/ --regex-PHP=/(public\s+|static\s+|protected\s+|private\s+)\$([^ \t=]+)/\2/p/ --regex-PHP=/const\s+([^ \t=]+)/\1/d/ --regex-PHP=/final\s+(public\s+|static\s+|abstract\s+|protected\s+|private\s+)function\s+\&?\s*([^ (]+)/\2/f/ --PHP-kinds=+cdf --fields=+iaS This is the .vimrc file: " autocomplete funcs and identifiers for languages autocmd FileType php set omnifunc=phpcomplete#CompletePHP autocmd FileType python set omnifunc=pythoncomplete#Complete autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS autocmd FileType html set omnifunc=htmlcomplete#CompleteTags autocmd FileType css set omnifunc=csscomplete#CompleteCSS autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags autocmd FileType php set omnifunc=phpcomplete#CompletePHP autocmd FileType c set omnifunc=ccomplete#Complete " exuberant ctags " the magic is the ';' at end. it will make vim tags file search go up from current directory until it finds one. set tags=projectrootdir/tags; map <F8> :!ctags " TagList " :tag getUser => Jump to getUser method " :tn (or tnext) => go to next search result " :tp (or tprev) => to to previous search result " :ts (or tselect) => List the current tags " => Go back to last tag location " +Left click => Go to definition of a method " More info: " http://vimdoc.sourceforge.net/htmldoc/tagsrch.html (official documentation) " http://www.vim.org/tips/tip.php?tip_id=94 (a vim tip) let Tlist_Ctags_Cmd = "~/bin/ctags" let Tlist_WinWidth = 50 map <F4> :TlistToggle<cr> "see http://vim.wikia.com/wiki/Make_Vim_completion_popup_menu_work_just_like_in_an_IDE " will change the 'completeopt' option so that Vim's popup menu doesn't select the first completion item, but rather just inserts the longest common text of all matches :set completeopt=longest,menuone " will change the behavior of the <Enter> key when the popup menu is visible. In that case the Enter key will simply select the highlighted menu item, just as <C-Y> does :inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>" " inoremap <expr> <C-n> pumvisible() ? '<C-n>' : \ '<C-n><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>' inoremap <expr> <M-,> pumvisible() ? '<C-n>' : \ '<C-x><C-o><C-n><C-p><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >